Method and system for cache elimination and conversion from multiprocessor instruction set to machine instruction

By using an elimination strategy that combines scoring functions and timestamps in cache management, the elimination process of cache blocks is optimized, which solves the resource waste problem caused by unreasonable cache strategy design in the existing technology and achieves efficient instruction set conversion and compatibility. promote.

CN118585247APending Publication Date: 2024-09-03SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410689368.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

When existing instruction dynamic translation technology handles the conversion of multiple processor instruction sets to machine instructions, the cache strategy design is unreasonable, resulting in frequent cache replacement and re-translation, consuming a large amount of computing resources, and reducing efficiency and compatibility.

Method used

The scoring function is used to calculate the score of the cache block, and the cache block with the lowest score is eliminated. Combined with the access timestamp and frequency, the cache elimination strategy is optimized, the protection mechanism and protection period are set, and the cache management efficiency is improved.

Benefits of technology

It achieves efficient and accurate conversion of various processor instruction sets into machine instructions, improves instruction conversion efficiency and compatibility, reduces repeated conversion overhead, and improves system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118585247A
    Figure CN118585247A
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a method and a system for cache elimination and conversion from a multiprocessor instruction set to a machine instruction. The cache elimination method comprises the following steps: receiving an instruction storage request of a target machine; if the to-be-requested data is not in the preset cache, judging whether the cache is full or not, and if the cache is not full, directly storing the target machine instruction into the cache; otherwise, calculating the score of each cache block in the cache by adopting a scoring function, and eliminating the cache block with the lowest score; wherein the scoring function is obtained by dividing the total access frequency of the to-be-scored cache block by the difference between the current timestamp and the timestamp of the last access of the cache block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for cache elimination and conversion of multi-processor instruction sets to machine instructions. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development of computer technology, processor architectures and instruction sets have become more diverse, and compatibility issues between different processors have become increasingly prominent. In order to solve this problem, instruction dynamic translation technology has emerged. However, when the existing instruction dynamic translation technology processes the conversion of multiple processor instruction sets to machine instructions, if the cache strategy is not designed reasonably during the instruction dynamic translation process, the system may need to perform frequent cache replacement and re-translation, which will consume a lot of computing resources, reduce the efficiency of instruction translation, and cause poor compatibility. Summary of the invention

[0004] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a method and system for cache elimination and conversion of multiple processor instruction sets to machine instructions. The present invention can realize efficient and accurate conversion from multiple processor instruction sets to machine instructions.

[0005] In order to achieve the above object, the present invention adopts the following technical solution:

[0006] A first aspect of the present invention provides a cache elimination method.

[0007] A cache elimination method, comprising:

[0008] receiving a target machine instruction storage request;

[0009] If the data to be requested is not in the preset cache, it is determined whether the cache is full. If not, the target machine instruction is directly stored in the cache; otherwise, a scoring function is used to calculate the score of each cache block in the cache, and the cache block with the lowest score is eliminated; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp when the cache block was last accessed.

[0010] Furthermore, if there are multiple cache blocks with the same and lowest scores, the position of the cache blocks in the cache is considered, and the cache block at the front will be given priority for elimination; if the positions of multiple cache blocks are the same or similar, they will be eliminated based on the time when the cache blocks were last selected as elimination candidates, and the cache block that was selected as the elimination candidate the earliest will be given priority for elimination; wherein, the elimination candidate will record a timestamp when it is identified as an elimination candidate.

[0011] Furthermore, a protection mechanism is set for cache blocks that have not been accessed for a long time but are frequently accessed; and a certain protection period is set for newly added cache blocks.

[0012] A second aspect of the present invention provides a cache elimination system.

[0013] A cache elimination system, comprising:

[0014] A first receiving module is configured to: receive a target machine instruction storage request;

[0015] The judgment module is configured to: if the data to be requested is not in the preset cache, determine whether the cache is full, and if not, directly store the target machine instruction in the cache; otherwise, use a scoring function to calculate the score of each cache block in the cache, and eliminate the cache block with the lowest score; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp of the last time the cache block was accessed.

[0016] A third aspect of the present invention provides a method for converting a multi-processor instruction set into a machine instruction.

[0017] A method for converting a multiprocessor instruction set into a machine instruction, comprising:

[0018] Receive the source processor instruction set, identify the instruction type and parse the instruction parameters;

[0019] According to the instruction type and instruction parameters, the corresponding target machine instruction is searched in the preset instruction mapping table; if the corresponding target machine instruction is found, the source processor instruction set is directly converted into the target machine instruction; if not found, the corresponding target machine instruction is generated according to the preset instruction conversion rules;

[0020] The converted target machine instructions are stored in the cache, and the steps of the cache elimination method described in the first aspect are used in the cache;

[0021] Execute the converted target machine instructions.

[0022] Furthermore, the process of identifying the instruction type includes: encoding the instruction data in the source processor instruction set, identifying the operation code of each instruction according to the encoding format of the instruction, and determining the instruction type according to the operation.

[0023] Furthermore, the process of searching for the corresponding target machine instruction in the preset instruction mapping table includes: using the instruction type and instruction parameters as indexes, searching in the preset instruction mapping table, and extracting the corresponding target machine instruction when a match is found; if there are multiple matches in the instruction mapping table, selecting the optimal target machine instruction according to a preset priority rule.

[0024] A fourth aspect of the present invention provides a method for converting a multi-processor instruction set into a machine instruction.

[0025] A system for converting a multiprocessor instruction set into a machine instruction, comprising:

[0026] A second receiving module is configured to: receive a source processor instruction set, identify an instruction type and parse instruction parameters;

[0027] A search module is configured to: search for corresponding target machine instructions in a preset instruction mapping table according to the instruction type and instruction parameters; if the corresponding target machine instructions are found, directly convert the source processor instruction set into the target machine instructions; if not found, generate the corresponding target machine instructions according to the preset instruction conversion rules;

[0028] A cache module, which is configured to: store the converted target machine instructions in a cache, and use the steps of the cache elimination method described in the first aspect in the cache;

[0029] The execution module is configured to execute the converted target machine instructions.

[0030] A fifth aspect of the present invention provides a computer-readable storage medium.

[0031] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the cache elimination method as described in the first aspect, or implements the steps in the method for converting a multi-processor instruction set into a machine instruction as described in the third aspect.

[0032] A sixth aspect of the present invention provides a computer device.

[0033] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the cache elimination method described in the first aspect are implemented, or the steps in the method for converting a multi-processor instruction set into a machine instruction described in the third aspect are implemented.

[0034] Compared with the prior art, the present invention has the following beneficial effects:

[0035] The present invention receives the source processor instruction set, identifies the instruction type and parses the instruction parameters, performs efficient and accurate conversion according to the preset instruction mapping table and instruction conversion rules, and uses the cache elimination strategy to perform cache optimization, thereby improving the efficiency and compatibility of instruction conversion and realizing support for multiple processor instruction sets. The present invention is applicable to the conversion scenarios of multiple processor instruction sets to machine instructions and has broad application prospects.

[0036] The present invention introduces access timestamp and access frequency into cache blocks (TB blocks) and combines these two parameters to make cache elimination decisions. When the cache is full, the TB block with the lowest score is eliminated according to a scoring function that comprehensively considers access timestamp and access frequency. In addition, the processing of special cases is also considered, such as TB blocks that have not been accessed for a long time but have a high frequency and a protection mechanism for newly added TB blocks. The present invention reduces the overhead of repeated conversion and improves the overall performance of the system through the designed cache elimination mechanism. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0038] Figure 1 is a flow chart of a cache elimination method shown in the present invention;

[0039] Figure 2 The present invention is a flowchart of a method for converting a multi-processor instruction set into a machine instruction. DETAILED DESCRIPTION

[0040] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0041] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0042] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0043] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the methods and systems according to various embodiments of the present disclosure. It should be noted that each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of a code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the flowchart and / or block diagram, and the combination of boxes in the flowchart and / or block diagram can be implemented using a dedicated hardware-based system that performs a specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0044] Embodiment 1

[0045] like Figure 1 As shown, this embodiment provides a cache elimination method, including:

[0046] receiving a target machine instruction storage request;

[0047] If the data to be requested is not in the preset cache, it is determined whether the cache is full. If not, the target machine instruction is directly stored in the cache; otherwise, a scoring function is used to calculate the score of each cache block in the cache, and the cache block with the lowest score is eliminated; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp when the cache block was last accessed.

[0048] The cache elimination method described in this embodiment includes: data structure design, update mechanism, elimination decision, special case processing, optimization and adjustment. Each part is described in detail below:

[0049] 1. Data structure design:

[0050] Two fields are added to the data structure of each TB block (Translation Block): last_access_time and access_count.

[0051] last_access_time is used to record the timestamp of the last time a TB block was accessed.

[0052] access_count is used to record the total number of times a TB block is accessed.

[0053] 2. Update mechanism:

[0054] Whenever a TB block is accessed, its last_access_time is updated to the current timestamp and access_count is increased by one.

[0055] Set a time window (for example, the last hour, day, etc.) and count the access frequency within this time window.

[0056] 3. Elimination decision:

[0057] When the cache reaches its capacity limit and a TB block needs to be eliminated to make room, last_access_time and access_count are considered comprehensively.

[0058] Define an elimination scoring function:

[0059] Where current_time is the current timestamp, and last_access_tim is the timestamp when the TB block was last accessed.

[0060] This scoring function combines access frequency and recency: if a TB block is accessed frequently and recently, it will score higher.

[0061] Traverse all TB blocks in the cache, calculate their scores, and select the TB block with the lowest score for elimination.

[0062] 4. Handling of special situations:

[0063] For TB blocks that have not been accessed for a long time but are accessed frequently (may be critical parts of the program but are not frequently accessed in the current execution process), a protection mechanism is set up for them to prevent them from being easily eliminated.

[0064] A certain protection period may be given to the newly added TB blocks so that they will not be eliminated during this period, thereby ensuring that the newly added instructions have a chance to be executed.

[0065] 5. Optimization and adjustment:

[0066] Over time, the value of access_count can be periodically decayed to reflect the importance of recent accesses.

[0067] Embodiment 2

[0068] This embodiment provides a cache elimination system, including:

[0069] A first receiving module is configured to: receive a target machine instruction storage request;

[0070] The judgment module is configured to: if the data to be requested is not in the preset cache, determine whether the cache is full, and if not, directly store the target machine instruction in the cache; otherwise, use a scoring function to calculate the score of each cache block in the cache, and eliminate the cache block with the lowest score; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp of the last time the cache block was accessed.

[0071] It should be noted that the examples and application scenarios implemented by the above-mentioned first receiving module and the judgment module are the same as those in the steps of Embodiment 1, but are not limited to the contents disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0072] Embodiment 3

[0073] This embodiment provides a method for converting a multiprocessor instruction set into a machine instruction, including:

[0074] Receive the source processor instruction set, identify the instruction type and parse the instruction parameters;

[0075] According to the instruction type and instruction parameters, the corresponding target machine instruction is searched in the preset instruction mapping table; if the corresponding target machine instruction is found, the source processor instruction set is directly converted into the target machine instruction; if not found, the corresponding target machine instruction is generated according to the preset instruction conversion rules;

[0076] The converted target machine instructions are stored in the cache, and the steps of the cache elimination method described in the first aspect are used in the cache;

[0077] Execute the converted target machine instructions.

[0078] The present embodiment is described in detail below. Figure 2 As shown, a method for converting a multi-processor instruction set into a machine instruction comprises:

[0079] Step 1: Receive the source processor instruction set, identify the instruction type and parse the instruction parameters.

[0080] Instruction set data is received from a source processor through a communication interface or a memory buffer.

[0081] Decode the received command data.

[0082] According to the encoding format of the instruction, the operation code (opcode) of each instruction is identified. The operation code is the part that uniquely identifies the instruction type.

[0083] According to the opcode, determine the specific type of instruction, such as arithmetic operation instructions, logical operation instructions, data transfer instructions, etc.

[0084] Further parse other fields in the instruction to extract necessary parameters such as operands, register addresses, memory addresses, and immediate values.

[0085] The parsed instruction type and parameters are stored in an internal data structure for subsequent instruction mapping and conversion.

[0086] Step 2: According to the parsed instruction type and parameters, search for the corresponding target machine instruction in the preset instruction mapping table.

[0087] Access the preset instruction mapping table, which is a table containing the correspondence between source processor instruction types and parameters and target machine instructions.

[0088] Use the instruction type and parameters parsed in step 1 as indexes to search in the instruction mapping table.

[0089] If an exact matching entry is found, the corresponding target machine instruction is extracted.

[0090] If no exact matching entry is found, similar instructions are searched.

[0091] If there are multiple possible matches in the mapping table, the most appropriate target machine instruction is selected according to the preset priority rules.

[0092] The found target machine instructions or information that needs further processing are passed to the next step.

[0093] Step 3: Generate target instructions according to the found target machine instructions or conversion rules.

[0094] Receive the information passed from step 2, which may be a target machine instruction that has been found or an indication that further processing is required.

[0095] If step 2 finds an exact matching target machine instruction, the instruction is directly prepared as the conversion result.

[0096] If an exact match is not found in step 2, the target machine instructions are generated according to the preset instruction conversion rules.

[0097] After the conversion is completed, the generated target machine instructions are passed to the next step.

[0098] Step 4: Cache the translated target machine instructions (apply cache eviction strategy).

[0099] Receive the converted target machine instructions passed in step 3.

[0100] Check whether the conversion result of the instruction already exists in the cache.

[0101] If it exists, there is no need to store it repeatedly and the result in the cache can be used directly.

[0102] If the conversion result of the instruction does not exist in the cache, it is added to the cache.

[0103] Apply cache eviction policy.

[0104] Check cache status: First, check whether the cache is full. If the cache is not full, skip the elimination decision step directly and add the new transformation result to the cache.

[0105] Calculate the elimination score: If the cache is full, you need to use the scoring function to calculate the score for each TB block (conversion result) in the cache. Use access_count (access frequency) and last_access_time (last access timestamp) to calculate the elimination score for each TB block.

[0106] Select TB blocks to be eliminated: According to the calculated score, find the TB block with the lowest score as the candidate to be eliminated. If there are multiple TB blocks with the same and lowest score, further selection can be made based on other factors (such as the position in the cache, the time when they were last selected as candidates for elimination, etc.). Specifically, if multiple cache blocks have the same and lowest scores, the TB blocks are considered to be eliminated based on their positions in the cache, and the front TB blocks (i.e., the TB blocks that entered the cache earliest) will be given priority for elimination. If the positions of the TB blocks are the same or similar, they will continue to be eliminated based on the time when they were last selected as candidates for elimination, and the TB blocks that were selected as candidates for elimination earliest will be given priority for elimination. This selection as an elimination candidate means that in the cache strategy, in order to make room for new data, some TB blocks will be initially considered as elimination candidates, but not all candidates will eventually be eliminated, which needs to be determined in combination with the subsequent scores. Whenever a TB block is considered as an elimination candidate, a timestamp is recorded as the time when the current TB block was selected as an elimination candidate, and then auxiliary decisions are made based on this timestamp. This can avoid the situation where some TB blocks frequently become elimination candidates due to the same score but are never eliminated.

[0107] Special case handling: When selecting TB blocks to be eliminated, special case handling mechanisms should be considered. For TB blocks that have not been accessed for a long time but have a high access frequency, if they are marked as "protected", they should not be selected for elimination. For newly added TB blocks, if they are within their protection period, they should also be avoided from being eliminated.

[0108] Perform elimination operations: If a TB block to be eliminated is found, it is removed from the cache and the corresponding space is released.

[0109] Add new conversion result: Create a new TB block in the cache for the newly converted target machine instruction, set its last_access_time to the current timestamp, and initialize access_count to 1 (or to other values ​​according to the policy).

[0110] Updates the cached index or tag for quick subsequent retrieval and use.

[0111] Ensure cache consistency to avoid data conflicts or staleness.

[0112] Step 5: Send the cached target machine instructions to the target processor for execution.

[0113] Get the converted target machine instructions from the cache.

[0114] Check the state of the target processor to see if it is ready to receive new instructions.

[0115] The target machine instructions are encapsulated according to the instruction format and communication protocol of the target processor.

[0116] Send the packaged instructions to the target processor.

[0117] Wait for a response from the target processor to confirm whether the instruction was successfully executed.

[0118] If the instruction is executed successfully, the next instruction will be sent; if the execution fails, error processing will be performed and the instruction will be sent again.

[0119] Embodiment 4

[0120] This embodiment provides a system for converting a multi-processor instruction set into a machine instruction, including:

[0121] A second receiving module is configured to: receive a source processor instruction set, identify an instruction type and parse instruction parameters;

[0122] A search module is configured to: search for corresponding target machine instructions in a preset instruction mapping table according to the instruction type and instruction parameters; if the corresponding target machine instructions are found, directly convert the source processor instruction set into the target machine instructions; if not found, generate the corresponding target machine instructions according to the preset instruction conversion rules;

[0123] A cache module, which is configured to: store the converted target machine instructions in a cache, and use the steps of the cache elimination method described in the first aspect in the cache;

[0124] The execution module is configured to execute the converted target machine instructions.

[0125] It should be noted that the second receiving module, search module, cache module and execution module are the same as the examples and application scenarios implemented by the steps in Embodiment 3, but are not limited to the contents disclosed in Embodiment 3. It should be noted that the above modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0126] Embodiment 5

[0127] This embodiment provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program implements the steps of the cache elimination method described in Embodiment 1, or implements the steps of the method for converting a multi-processor instruction set into a machine instruction as described in Embodiment 3.

[0128] Embodiment 6

[0129] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the cache elimination method described in Embodiment 1 are implemented, or the steps of the method for converting a multi-processor instruction set into a machine instruction as described in Embodiment 3 are implemented.

[0130] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0131] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0134] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A cache elimination method, characterized in that: include: receiving a target machine instruction storage request; If the data to be requested is not in the preset cache, it is determined whether the cache is full. If not, the target machine instruction is directly stored in the cache; Otherwise, a scoring function is used to calculate the score of each cache block in the cache, and the cache block with the lowest score is eliminated; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp when the cache block was last accessed.

2. The cache elimination method according to claim 1, characterized in that: If there are multiple cache blocks with the same and lowest scores, the cache blocks at the front will be eliminated first, considering their positions in the cache. If multiple cache blocks are at the same or similar positions, they will be eliminated based on the time when they were last selected as elimination candidates, and the cache blocks that were selected as elimination candidates the earliest will be eliminated first. When the elimination candidate is identified as an elimination candidate, a timestamp will be recorded.

3. The cache elimination method according to claim 1, characterized in that: For cache blocks that have not been accessed for a long time but are frequently accessed, a protection mechanism is set; for newly added cache blocks, a certain protection period is set.

4. Cache elimination system, characterized in that: include: A first receiving module is configured to: receive a target machine instruction storage request; A determination module, which is configured to: if the data to be requested is not in the preset cache, determine whether the cache is full, and if not, directly store the target machine instruction in the cache; Otherwise, a scoring function is used to calculate the score of each cache block in the cache, and the cache block with the lowest score is eliminated; wherein the scoring function is: the total number of times the cache block to be scored is accessed divided by the difference between the current timestamp and the timestamp when the cache block was last accessed.

5. A method for converting a multiprocessor instruction set into a machine instruction, characterized in that: include: Receive the source processor instruction set, identify the instruction type and parse the instruction parameters; According to the instruction type and instruction parameters, the corresponding target machine instruction is searched in the preset instruction mapping table; if the corresponding target machine instruction is found, the source processor instruction set is directly converted into the target machine instruction; if not found, the corresponding target machine instruction is generated according to the preset instruction conversion rules; Storing the converted target machine instructions in a cache, and using the steps of the cache elimination method described in any one of claims 1 to 3 in the cache; Execute the converted target machine instructions.

6. The method for converting a multiprocessor instruction set into a machine instruction according to claim 5, characterized in that: The process of identifying the instruction type includes: encoding the instruction data in the source processor instruction set, identifying the operation code of each instruction according to the encoding format of the instruction, and determining the instruction type according to the operation code.

7. The method for converting a multiprocessor instruction set into a machine instruction according to claim 5, characterized in that: The process of searching for the corresponding target machine instruction in the preset instruction mapping table includes: using the instruction type and instruction parameters as indexes, searching in the preset instruction mapping table, and extracting the corresponding target machine instruction when a match is found; if there are multiple matches in the instruction mapping table, selecting the optimal target machine instruction according to the preset priority rules.

8. A system for converting a multiprocessor instruction set into a machine instruction, characterized in that: include: A second receiving module is configured to: receive a source processor instruction set, identify an instruction type and parse instruction parameters; A search module is configured to: search for corresponding target machine instructions in a preset instruction mapping table according to the instruction type and instruction parameters; if the corresponding target machine instructions are found, directly convert the source processor instruction set into the target machine instructions; if not found, generate the corresponding target machine instructions according to the preset instruction conversion rules; A cache module, configured to: store the converted target machine instructions in a cache, and use the steps of the cache elimination method according to any one of claims 1 to 3 in the cache; The execution module is configured to execute the converted target machine instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the cache elimination method described in any one of claims 1 to 3 are implemented, or the steps of the multi-processor instruction set to machine instruction conversion method described in any one of claims 5 to 7 are implemented.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the cache elimination method described in any one of claims 1-3 are implemented, or the steps of the multi-processor instruction set to machine instruction conversion method described in any one of claims 5-7 are implemented.