US20130132062A1 - Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon - Google Patents

Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon Download PDF

Info

Publication number
US20130132062A1
US20130132062A1 US13/740,469 US201313740469A US2013132062A1 US 20130132062 A1 US20130132062 A1 US 20130132062A1 US 201313740469 A US201313740469 A US 201313740469A US 2013132062 A1 US2013132062 A1 US 2013132062A1
Authority
US
United States
Prior art keywords
instruction sequence
optimization
cpu
optimized
section
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US13/740,469
Inventor
Satoshi Hieda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to US13/740,469 priority Critical patent/US20130132062A1/en
Publication of US20130132062A1 publication Critical patent/US20130132062A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Definitions

  • This invention relates to a CPU emulation system, a CPU emulation method, and a recording medium having a CPU emulation program recorded thereon.
  • this invention relates to a CPU emulation system, a CPU emulation method, and a recording medium having a CPU emulation program recorded thereon, which are capable of performing, with the use of a multiprocessor, optimization processing of an instruction sequence without delaying instruction sequence execution processing.
  • a CPU emulation system is a system for software-emulating a physical CPU to implement, as a virtual CPU, a CPU having an instruction set architecture (ISA) different from that of the physical CPU.
  • the virtual CPU reads an instruction sequence for the ISA, which is manageable by the virtual CPU, and, after translating the read instruction sequence into an instruction sequence executable on the physical CPU, executes the translated instruction sequence.
  • ISA instruction set architecture
  • Patent Document 1 Japanese Unexamined Patent Application Publication (JP-A) No. 2002-312180 A (Hereinafter, referred to as Patent Document 1) discloses a CPU emulation system that uses a multiprocessor.
  • processing of prefetching an original instruction processing of interpreting and executing an original instruction sequence, and processing of translating and optimizing an instruction sequence are each executed on a different CPU.
  • the optimization processing of the instruction sequence is made to have no adverse effect on processing throughput of the instruction sequence execution processing.
  • Patent Document 2 discloses an instruction sequence optimization system that uses a multiprocessor.
  • profile information thereon is collected, and, based on that information, the instruction sequence is optimized on another CPU during the execution.
  • the optimization processing of the instruction sequence is made to have no adverse effect on processing throughput of the instruction sequence execution processing.
  • This invention has been made in view of the above-mentioned problem inherent in the existing technologies, and therefore it is an object thereof to make it possible to perform the optimization processing of an instruction sequence according to the usage rates of CPUs.
  • a CPU emulation system includes:
  • an instruction sequence selecting section for selecting an instruction sequence to be optimized
  • a virtual CPU selecting section for selecting one of the plurality of virtual CPUs, which is to perform optimization processing of the selected instruction sequence, based on usage rates of the plurality of virtual CPUs;
  • an optimization level selecting section for determining an optimization level of the optimization processing that is to be executed by the selected one of the plurality of virtual CPUs, and giving a direction to perform the optimization processing to the selected one of the plurality of virtual CPUs.
  • another CPU emulation system includes:
  • an instruction sequence association management section for managing association among an untranslated instruction sequence, a translated instruction sequence, and an optimized instruction sequence, the untranslated instruction sequence being an instruction sequence before architecture translation processing, the translated instruction sequence being an instruction sequence obtained by translating the untranslated instruction sequence into a format executable on a physical CPU, the optimized instruction sequence being an instruction sequence obtained by subjecting the translated instruction sequence to optimization processing;
  • an instruction sequence selecting section for selecting an instruction sequence to be optimized
  • an optimization direction section for giving directions to perform the optimization processing of the selected instruction sequence to the plurality of virtual CPUs, the directions specifying different optimization levels among the plurality of virtual CPUs;
  • an optimization information writing section for writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on the optimized instruction sequence thus obtained into the instruction sequence association management section in association with the translated instruction sequence that is a source of the optimized instruction sequence.
  • a CPU emulation method includes:
  • another CPU emulation method includes:
  • a recording medium has a CPU emulation program recorded thereon, the CPU emulation program causing a computer to execute the processings of:
  • a recording medium has another CPU emulation program recorded thereon, the another CPU emulation program causing a computer to execute the processings of:
  • FIG. 1 is a block diagram illustrating a configuration of a first embodiment of this invention
  • FIG. 2 is a flow chart illustrating operation of the first embodiment of this invention
  • FIG. 3 is a block diagram illustrating a configuration of a second embodiment of this invention.
  • FIG. 4 is a flow chart illustrating operation of the second embodiment of this invention.
  • FIG. 5 is a block diagram illustrating a configuration of a third embodiment of this invention.
  • FIG. 6 is a flow chart illustrating operation of the third embodiment of this invention.
  • FIG. 7 is a block diagram illustrating a first example of this invention.
  • FIG. 8 is a diagram illustrating how a time length is calculated and how an optimization level is selected according to a second example of this invention.
  • FIG. 9 is a diagram illustrating how an optimized instruction sequence is selected according to a third example of this invention.
  • FIG. 10A is a diagram illustrating an instruction sequence association management section during a period between T 1 and T 2 according to the third example of this invention.
  • FIG. 10B is a diagram illustrating the instruction sequence association management section after T 2 according to the third example of this invention.
  • ISA instruction set architecture
  • this invention relates to optimization processing of a translated instruction sequence, and hence, hereinbelow, description is given mainly of the optimization processing of an instruction sequence.
  • an information processing device 100 includes an instruction sequence selecting section 101 , a virtual CPU selecting section 102 , an optimization level selecting section 103 , a first virtual CPU section 201 , a second virtual CPU section 202 , an untranslated instruction sequence management section 301 , a translated instruction sequence management section 302 , and an optimized instruction sequence management section 303 .
  • the untranslated instruction sequence management section 301 is a storage area for managing an instruction sequence for the ISA, which is manageable by the virtual CPU, that is, a storage area for managing an instruction sequence to be emulated. It should be noted that the instruction sequence to be emulated is hereinbelow referred to as an untranslated instruction sequence.
  • the translated instruction sequence management section 302 is a storage area for storing an instruction sequence translated through the above-mentioned instruction sequence translation processing.
  • the translated instruction sequence management section 302 further manages, for each translated instruction sequence, an optimization level adopted in the instruction sequence translation processing. This configuration is based on the assumption that the optimization processing is performed to some extent in the instruction sequence translation processing as well. It should be noted that an instruction sequence translated through the instruction sequence translation processing is hereinbelow referred to as a translated instruction sequence.
  • the optimized instruction sequence management section 303 is a storage area for storing an instruction sequence that has been subjected to the optimization processing. It should be noted that an instruction sequence that has been subjected to the optimization processing is hereinbelow referred to as an optimized instruction sequence.
  • the instruction sequence selecting section 101 selects an instruction sequence to be optimized next in the CPU emulation system.
  • the virtual CPU selecting section 102 selects a virtual CPU having a low usage rate as a virtual CPU that is to perform the optimization processing of the instruction sequence.
  • the optimization level selecting section 103 determines an optimization level of the optimization processing to be executed on the selected virtual CPU.
  • the optimization level selecting section 103 refers to the translated instruction sequence management section 302 to acquire the optimization level that has been adopted to the selected instruction sequence in the instruction sequence translation processing, and then selects an optimization level higher than the acquired optimization level.
  • the first virtual CPU section 201 and the second virtual CPU section 202 are CPU functions provided by the CPU emulation system, and are executed on physical CPUs.
  • the first virtual CPU section 201 and the second virtual CPU section 202 read an untranslated instruction sequence stored in the untranslated instruction sequence management section 301 , and then translate the untranslated instruction sequence into an instruction sequence executable on the physical CPUs. It should be noted that the instruction sequence thus translated is stored, as the translated instruction sequence, in the translated instruction sequence management section 302 , and can be used repeatedly when the same instruction sequence is executed again.
  • first virtual CPU section 201 and the second virtual CPU section 202 execute the translated instruction sequence on the physical CPUs.
  • the first virtual CPU section 201 and the second virtual CPU section 202 perform the optimization processing of the translated instruction sequence according to a direction given from the optimization level selecting section 103 . Specifically, after the instruction sequence to which the direction has been given is analyzed, the instructions are rearranged or translated for such purposes as enhancing execution speed for the instruction sequence, suppressing the amount of memory usage for the instruction sequence, and increasing a cache hit rate. The instruction sequence generated through the optimization processing is the optimized instruction sequence. It should be noted that the first virtual CPU section 201 and the second virtual CPU section 202 are executed on different physical CPUs or on different CPU cores of a multi-core processor.
  • the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step A 1 of FIG. 2 ).
  • the virtual CPU selecting section 102 monitors the first virtual CPU section 201 and the second virtual CPU section 202 to select a virtual CPU having the lower usage rate as a virtual CPU that is to perform the optimization (Step A 2 ).
  • the optimization level selecting section 103 refers to the translated instruction sequence management section 302 to determine an optimization level to be adopted to the selected instruction sequence, and then gives a direction specifying the selected instruction sequence and optimization level to the selected virtual CPU (Step A 3 ).
  • the first virtual CPU section 201 performs the optimization processing of the instruction sequence according to the direction (Step A 5 ).
  • the second virtual CPU section 202 performs the optimization processing according to the direction (Step A 6 ).
  • a virtual CPU section that is to perform the optimization processing is selected based on the usage rates of virtual CPUs.
  • a virtual CPU section having a high usage rate is not given a direction to perform the optimization processing, and hence it is possible to execute the essential processing of translating/executing an instruction sequence without delay.
  • this embodiment is different from the first embodiment in that a unit time management section 304 , an optimization processing time management section 305 , and a time calculation section 104 are provided.
  • the rest of the configuration is the same as in the first embodiment. Hence, only differences in configuration are described here.
  • the unit time management section 304 is a storage area in which a given time length is stored as a unit time.
  • the unit time is used for calculating an idle time of a virtual CPU based on the usage rate of the virtual CPU expressed in percentage. For example, when the usage rate of the first virtual CPU section 201 is 90% with the unit time being one second, the first virtual CPU section 201 is considered as being used for 900 milliseconds and being in an idle state for 100 milliseconds.
  • the optimization processing time management section 305 is a storage area in which a length of time to be required for the optimization processing is stored for each optimization level. For example, there is stored information indicating that an optimization level O 1 takes 10 milliseconds for each instruction sequence of 100 bytes and that an optimization level O 2 takes 20 milliseconds for each instruction sequence of 100 bytes.
  • the time calculation section 104 calculates an allowable time length that can be used for the optimization processing according to the usage rate of the virtual CPU selected by the virtual CPU selecting section 102 and the unit time management section 304 . For example, when the usage rate of the first virtual CPU section 201 is 90% with the unit time being one second, the first virtual CPU section 201 is in the idle state for 100 milliseconds, and hence the time calculation section 104 obtains 100 milliseconds through calculation as the allowable time length for the optimization processing.
  • the time calculation section 104 refers to the optimization processing time management section 305 , to thereby calculate a time length to be required for the optimization processing of the specified instruction sequence for each optimization level.
  • the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step B 1 of FIG. 4 ).
  • the virtual CPU selecting section 102 monitors the first virtual CPU section 201 and the second virtual CPU section 202 to select a virtual CPU having the lower usage rate as a virtual CPU that is to perform the optimization (Step B 2 ).
  • the time calculation section 104 calculates the allowable time length that can be used for the optimization processing according to the usage rate of the selected virtual CPU and the unit time management section 304 (Step B 3 ).
  • time calculation section 104 refers to the optimization processing time management section 305 , to thereby calculate a time length to be required for the optimization processing of the specified instruction sequence for each optimization level (Step B 4 ).
  • the optimization level selecting section 103 determines the highest optimization level from among the optimization levels for which the processing can be completed within the calculated allowable time length, and then gives a direction specifying the selected instruction sequence and optimization level to the selected virtual CPU (Step B 5 ).
  • the first virtual CPU section 201 performs the optimization processing of the instruction sequence according to the direction (Step B 7 ).
  • the second virtual CPU section 202 performs the optimization processing according to the direction (Step B 8 ).
  • the optimization level is determined in consideration of a time length to be required for the optimization processing in addition to the usage rate of the virtual CPU. Therefore, it is possible to further reduce the possibility that the essential processing of translating/executing an instruction sequence is delayed on the virtual CPU selected for performing the optimization processing.
  • this embodiment is different from the first embodiment in that the virtual CPU selecting section 102 and the optimization level selecting section 103 are not provided, and that an instruction sequence association management section 306 , an optimization direction section 105 , and an optimization information writing section 106 are provided.
  • the rest of the configuration is the same as in the first embodiment. Hence, only differences in configuration are described here.
  • the instruction sequence association management section 306 is a storage area in which, regarding an untranslated instruction sequence manageable by a virtual CPU, a translated instruction sequence obtained by translating the untranslated instruction sequence into an instruction sequence having a format executable on a physical CPU, and an optimized instruction sequence generated by subjecting the translated instruction sequence to the optimization processing, based on an identifier associated with the untranslated instruction sequence, the translated instruction sequence and the optimized instruction sequence corresponding to that instruction sequence are associated with each other.
  • the optimization direction section 105 gives the respective virtual CPU sections directions to perform the optimization processing of a selected instruction sequence.
  • the optimization direction section 105 gives the respective virtual CPU sections directions specifying different optimization levels from one another based on the usage rates of the respective virtual CPU sections.
  • a method of specifying the optimization level for example, a lower optimization level may be specified for a virtual CPU section having a higher usage rate whereas a higher optimization level may be specified for a virtual CPU section having a lower usage rate.
  • the optimization information writing section 106 When the optimization processing is finished by a virtual CPU section, the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 in association with the translated instruction sequence that is a source of the optimized instruction sequence. It should be noted that the optimization information writing section 106 also writes information on the optimization level selected in the optimization processing.
  • the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step C 1 of FIG. 6 ).
  • the optimization direction section 105 gives the respective virtual CPU sections the directions to perform the optimization processing of the translated instruction sequence for which different optimization levels have been selected based on the usage rates (Step C 2 ).
  • the first virtual CPU section 201 performs the optimization processing according to the translated instruction sequence and optimization level thus specified (Step C 3 - 1 ).
  • the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 (Step C 4 - 1 ).
  • the second virtual CPU section 202 also performs the optimization processing according to the translated instruction sequence and optimization level thus specified (Step C 3 - 2 ).
  • the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 (Step C 4 - 2 ).
  • the third embodiment of this invention there is employed a configuration in which a plurality of virtual CPU sections are given the directions to perform the optimization processing with different optimization levels, and, every time one of the virtual CPU sections finishes the optimization processing, information on the optimized instruction sequence is written into the instruction sequence association management section 306 .
  • this configuration even when there occurs a necessity to perform instruction sequence execution processing for an instruction sequence that is being subjected to the optimization processing while the optimization processing is performed, an instruction sequence having the highest optimization level at this point can be used for the execution processing based on the information written in the instruction sequence association management section 306 .
  • this example relates to a CPU emulation system for an ARM processor operated on an x86 computer 700 .
  • the x86 computer 700 , a first virtual ARM processor section 701 , and a second virtual ARM processor section 702 correspond to the information processing device 100 , the first virtual CPU section 201 , and the second virtual CPU section 202 according to the first embodiment of this invention, respectively.
  • the instruction sequence selecting section 101 , the virtual CPU selecting section 102 , the optimization level selecting section 103 , and the first virtual ARM processor section 701 are executed on a first physical CPU 710 whereas the second virtual ARM processor section 702 is executed on a second physical CPU 720 .
  • the translated instruction sequence management section 302 and the optimized instruction sequence management section 303 are located in a memory 730 .
  • the untranslated instruction sequence management section 301 is located in a hard disk 740 .
  • an ARM-format instruction sequence stored in the untranslated instruction sequence management section 301 is read by the first virtual ARM processor section 701 and the second virtual ARM processor section 702 , and then, the ARM-format instruction sequence is translated into an x86-format instruction sequence, which is subsequently executed.
  • translated instruction sequence is cached in the translated instruction sequence management section 302 of the memory managed by the CPU emulation system. This is because instruction sequences translated into the x86 format contain an instruction sequence that is repeatedly executed, such as in loop processing.
  • the optimization processing is performed. For example, in a case where the usage rate of the first virtual ARM processor section 701 is 10% and the usage rate of the second virtual ARM processor section 702 is 90%, the optimization processing is performed by the first virtual ARM processor section 701 having the lower usage rate. Therefore, compared to a case in which the optimization processing is performed by the second virtual ARM processor section 702 having the higher usage rate, the processing of translating and executing an instruction sequence can be executed without delay.
  • the usage rate of the first virtual CPU section 201 is 90% and the usage rate of the second virtual CPU section 202 is 10%.
  • a translated instruction sequence to be optimized is 500 bytes.
  • the unit time management section 304 stores 100 milliseconds as the unit time.
  • the optimization processing time management section 305 stores information indicating that: (1) the optimization processing for the optimization level O 1 takes 10 milliseconds for each instruction sequence of 100 bytes; and (2) the optimization processing for the optimization level O 2 takes 20 milliseconds for each instruction sequence of 100 bytes.
  • the virtual CPU selecting section 102 selects the second virtual CPU section 202 having the lower usage rate as the virtual CPU that is to execute the optimization processing.
  • the time calculation section 104 determines through calculation that the allowable time length for the optimization processing is 90 milliseconds. Based on the assumption that the translated instruction sequence to be optimized is 500 bytes, the time calculation section 104 determines through calculation that it takes 50 milliseconds in the case of the optimization at the optimization level O 1 and that it takes 100 milliseconds in the case of the optimization at the optimization level O 2 .
  • the optimization level selecting section 103 determines to cause the second virtual CPU section 202 to execute the optimization processing at the optimization level O 1 , and then requests the second virtual CPU section 202 to perform the optimization processing.
  • the optimization processing can be completed within the allowable time length even at the optimization level O 2 . Accordingly, the optimization level selecting section 103 requests the second virtual CPU section 202 to perform the optimization processing at the optimization level O 2 .
  • the usage rate of the first virtual CPU section 201 is 10%
  • the usage rate of the second virtual CPU section 202 is 90%.
  • the optimization direction section 105 gives the first virtual CPU section 201 and the second virtual CPU section 202 directions to perform the optimization at the optimization levels O 1 and O 2 , respectively. It is assumed that, as a result, the respective optimization processings are completed at time points T 1 and T 2 , respectively, and that optimized instruction sequences ⁇ 1 902 and ⁇ 2 903 are generated, respectively.
  • the generation of the optimized instruction sequences is completed only for ⁇ 1 , and hence the instruction sequences are associated in the instruction sequence association management section 306 (see FIG. 5 ) as illustrated in FIG. 10A .
  • the instruction sequence association management section 306 (see FIG. 5 ) is referred to, and then, it is understood that the optimized instruction sequence ⁇ 1 having the highest optimization level needs to be executed.
  • the generation of the optimized instruction sequence ⁇ 2 is also completed, and hence the instruction sequences are associated in the instruction sequence association management section 306 as illustrated in FIG. 10B .
  • the instruction sequence association management section 306 (see FIG. 5 ) is referred to, and then, it is understood that the optimized instruction sequence ⁇ 2 having the highest optimization level needs to be selected.
  • a CPU emulation system using two physical CPUs is assumed.
  • a CPU emulation system having three or more physical CPUs may also be employed.
  • a CPU emulation system using one or more multi-core CPUs may also be employed.
  • a virtual CPU having a high usage rate is not given a direction to perform the optimization processing, and hence the essential processing of translating and executing an instruction sequence can be executed without delay.
  • this invention employs such a configuration that a virtual CPU that is to perform the optimization processing is selected based on the usage rates of virtual CPUs.
  • This invention can be applied for the purpose of performing, in a CPU emulation system in which a CPU having a different ISA from that of a physical CPU is software-emulated, the optimization processing of a cached instruction sequence while maintaining processing throughput of the virtual CPU as much as possible.

Abstract

A CPU emulation system includes; a plurality of virtual CPUs each operating on a different physical CPU; an instruction sequence selecting section for selecting an instruction sequence to be optimized; a virtual CPU selecting section for selecting one of the plurality of virtual CPUs, which is to perform optimization processing of the selected instruction sequence, based on usage rates of the plurality of virtual CPUs; and an optimization level selecting section for determining an optimization level of the optimization processing that is to be executed by the selected one of the plurality of virtual CPUs, and giving a direction to perform the optimization processing to the selected one of the plurality of virtual CPUs.

Description

  • This application is a continuation of U.S. Ser. No. 12/607,479, filed Oct. 28, 2009, which is based upon and claims the benefit of priority from Japanese patent application No. 2008-277098, filed on Oct. 28, 2008, the disclosure of which is incorporated herein in its entirety by reference.
  • BACKGROUND OF THE INVENTION
  • 1. Field of the Invention
  • This invention relates to a CPU emulation system, a CPU emulation method, and a recording medium having a CPU emulation program recorded thereon. In particular, this invention relates to a CPU emulation system, a CPU emulation method, and a recording medium having a CPU emulation program recorded thereon, which are capable of performing, with the use of a multiprocessor, optimization processing of an instruction sequence without delaying instruction sequence execution processing.
  • 2. Description of the Related Art
  • A CPU emulation system is a system for software-emulating a physical CPU to implement, as a virtual CPU, a CPU having an instruction set architecture (ISA) different from that of the physical CPU. The virtual CPU reads an instruction sequence for the ISA, which is manageable by the virtual CPU, and, after translating the read instruction sequence into an instruction sequence executable on the physical CPU, executes the translated instruction sequence.
  • As such a CPU emulation system, Japanese Unexamined Patent Application Publication (JP-A) No. 2002-312180 A (Hereinafter, referred to as Patent Document 1) discloses a CPU emulation system that uses a multiprocessor.
  • In the CPU emulation system including a plurality of processors described in Patent Document 1, processing of prefetching an original instruction, processing of interpreting and executing an original instruction sequence, and processing of translating and optimizing an instruction sequence are each executed on a different CPU. By separating a CPU for executing an instruction sequence from a CPU for performing optimization of the instruction sequence in this manner, the optimization processing of the instruction sequence is made to have no adverse effect on processing throughput of the instruction sequence execution processing.
  • Further, Japanese Unexamined Patent Application Publication (JP-A) No. 2004-110824 (Hereinafter, referred to as Patent Document 2) discloses an instruction sequence optimization system that uses a multiprocessor. According to Patent Document 2, with regard to a program that is being executed on one CPU, profile information thereon is collected, and, based on that information, the instruction sequence is optimized on another CPU during the execution. By separating a CPU for executing an instruction sequence from a CPU for optimizing the instruction sequence in this manner, the optimization processing of the instruction sequence is made to have no adverse effect on processing throughput of the instruction sequence execution processing.
  • SUMMARY OF THE INVENTION
  • The existing technologies have failed to utilize the idle time of a CPU efficiently. This is because those technologies are based on the assumption that execution processing of an instruction sequence and optimization processing of the instruction sequence are executed on different CPUs from each other in order to prevent those processings from having adverse effects on each other's performance throughput.
  • This invention has been made in view of the above-mentioned problem inherent in the existing technologies, and therefore it is an object thereof to make it possible to perform the optimization processing of an instruction sequence according to the usage rates of CPUs.
  • According to this invention, a CPU emulation system includes:
  • a plurality of virtual CPUs each operating on a different physical CPU;
  • an instruction sequence selecting section for selecting an instruction sequence to be optimized;
  • a virtual CPU selecting section for selecting one of the plurality of virtual CPUs, which is to perform optimization processing of the selected instruction sequence, based on usage rates of the plurality of virtual CPUs; and
  • an optimization level selecting section for determining an optimization level of the optimization processing that is to be executed by the selected one of the plurality of virtual CPUs, and giving a direction to perform the optimization processing to the selected one of the plurality of virtual CPUs.
  • Further, according to this invention, another CPU emulation system includes:
  • an instruction sequence association management section for managing association among an untranslated instruction sequence, a translated instruction sequence, and an optimized instruction sequence, the untranslated instruction sequence being an instruction sequence before architecture translation processing, the translated instruction sequence being an instruction sequence obtained by translating the untranslated instruction sequence into a format executable on a physical CPU, the optimized instruction sequence being an instruction sequence obtained by subjecting the translated instruction sequence to optimization processing;
  • a plurality of virtual CPUs each operating on a different physical CPU;
  • an instruction sequence selecting section for selecting an instruction sequence to be optimized;
  • an optimization direction section for giving directions to perform the optimization processing of the selected instruction sequence to the plurality of virtual CPUs, the directions specifying different optimization levels among the plurality of virtual CPUs; and
  • an optimization information writing section for writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on the optimized instruction sequence thus obtained into the instruction sequence association management section in association with the translated instruction sequence that is a source of the optimized instruction sequence.
  • Further, according to this invention, a CPU emulation method includes:
  • selecting an instruction sequence to be optimized;
  • selecting, based on usage rates of a plurality of virtual CPUs each operating on a different physical CPU, one of the plurality of virtual CPUs, which is to perform optimization processing of the selected instruction sequence;
  • determining an optimization level of the optimization processing that is to be executed by the selected one of the plurality of virtual CPUs; and
  • giving a direction to perform the optimization processing to the selected one of the plurality of virtual CPUs.
  • Further, according to this invention, another CPU emulation method includes:
  • selecting an instruction sequence to be optimized;
  • giving a plurality of virtual CPUs directions to perform optimization processing at different optimization levels with regard to the selected instruction sequence; and
  • writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on an optimized instruction sequence thus obtained into an instruction sequence association management section in association with a translated instruction sequence that is a source of the optimized instruction sequence.
  • Further, according to this invention, a recording medium has a CPU emulation program recorded thereon, the CPU emulation program causing a computer to execute the processings of:
  • selecting an instruction sequence to be optimized;
  • selecting, based on usage rates of a plurality of virtual CPUs each operating on a different physical CPU, one of the plurality of virtual CPUs, which is to perform optimization processing of the selected instruction sequence; and
  • giving a direction to perform the optimization processing to the selected one of the plurality of virtual CPUs after determining an optimization level of the optimization processing that is to be executed by the selected one of the plurality of virtual CPUs.
  • Further, according to this invention, a recording medium has another CPU emulation program recorded thereon, the another CPU emulation program causing a computer to execute the processings of:
  • selecting an instruction sequence to be optimized;
  • giving a plurality of virtual CPUs directions to perform optimization processing at different optimization levels with regard to the selected instruction sequence; and
  • writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on an optimized instruction sequence thus obtained into an instruction sequence association management section in association with a translated instruction sequence that is a source of the optimized instruction sequence.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 is a block diagram illustrating a configuration of a first embodiment of this invention;
  • FIG. 2 is a flow chart illustrating operation of the first embodiment of this invention;
  • FIG. 3 is a block diagram illustrating a configuration of a second embodiment of this invention;
  • FIG. 4 is a flow chart illustrating operation of the second embodiment of this invention;
  • FIG. 5 is a block diagram illustrating a configuration of a third embodiment of this invention;
  • FIG. 6 is a flow chart illustrating operation of the third embodiment of this invention;
  • FIG. 7 is a block diagram illustrating a first example of this invention;
  • FIG. 8 is a diagram illustrating how a time length is calculated and how an optimization level is selected according to a second example of this invention;
  • FIG. 9 is a diagram illustrating how an optimized instruction sequence is selected according to a third example of this invention;
  • FIG. 10A is a diagram illustrating an instruction sequence association management section during a period between T1 and T2 according to the third example of this invention; and
  • FIG. 10B is a diagram illustrating the instruction sequence association management section after T2 according to the third example of this invention.
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment
  • With reference to the drawings, detailed description is given of a first embodiment of this invention.
  • Here, in a CPU emulation system, the following processing is mainly performed: an instruction sequence for an instruction set architecture (ISA), which is manageable by a virtual CPU, is read; the instruction sequence thus read is then translated into an instruction sequence executable on a physical CPU; and the translated instruction sequence is executed. Of the above-mentioned processing, this invention relates to optimization processing of a translated instruction sequence, and hence, hereinbelow, description is given mainly of the optimization processing of an instruction sequence.
  • First, referring to FIG. 1, according to the first embodiment of this invention, an information processing device 100 includes an instruction sequence selecting section 101, a virtual CPU selecting section 102, an optimization level selecting section 103, a first virtual CPU section 201, a second virtual CPU section 202, an untranslated instruction sequence management section 301, a translated instruction sequence management section 302, and an optimized instruction sequence management section 303.
  • The untranslated instruction sequence management section 301 is a storage area for managing an instruction sequence for the ISA, which is manageable by the virtual CPU, that is, a storage area for managing an instruction sequence to be emulated. It should be noted that the instruction sequence to be emulated is hereinbelow referred to as an untranslated instruction sequence.
  • The translated instruction sequence management section 302 is a storage area for storing an instruction sequence translated through the above-mentioned instruction sequence translation processing. The translated instruction sequence management section 302 further manages, for each translated instruction sequence, an optimization level adopted in the instruction sequence translation processing. This configuration is based on the assumption that the optimization processing is performed to some extent in the instruction sequence translation processing as well. It should be noted that an instruction sequence translated through the instruction sequence translation processing is hereinbelow referred to as a translated instruction sequence.
  • The optimized instruction sequence management section 303 is a storage area for storing an instruction sequence that has been subjected to the optimization processing. It should be noted that an instruction sequence that has been subjected to the optimization processing is hereinbelow referred to as an optimized instruction sequence.
  • The instruction sequence selecting section 101 selects an instruction sequence to be optimized next in the CPU emulation system. The virtual CPU selecting section 102 selects a virtual CPU having a low usage rate as a virtual CPU that is to perform the optimization processing of the instruction sequence.
  • The optimization level selecting section 103 determines an optimization level of the optimization processing to be executed on the selected virtual CPU. The optimization level selecting section 103 refers to the translated instruction sequence management section 302 to acquire the optimization level that has been adopted to the selected instruction sequence in the instruction sequence translation processing, and then selects an optimization level higher than the acquired optimization level.
  • The first virtual CPU section 201 and the second virtual CPU section 202 are CPU functions provided by the CPU emulation system, and are executed on physical CPUs. The first virtual CPU section 201 and the second virtual CPU section 202 read an untranslated instruction sequence stored in the untranslated instruction sequence management section 301, and then translate the untranslated instruction sequence into an instruction sequence executable on the physical CPUs. It should be noted that the instruction sequence thus translated is stored, as the translated instruction sequence, in the translated instruction sequence management section 302, and can be used repeatedly when the same instruction sequence is executed again.
  • Further, the first virtual CPU section 201 and the second virtual CPU section 202 execute the translated instruction sequence on the physical CPUs.
  • Further, the first virtual CPU section 201 and the second virtual CPU section 202 perform the optimization processing of the translated instruction sequence according to a direction given from the optimization level selecting section 103. Specifically, after the instruction sequence to which the direction has been given is analyzed, the instructions are rearranged or translated for such purposes as enhancing execution speed for the instruction sequence, suppressing the amount of memory usage for the instruction sequence, and increasing a cache hit rate. The instruction sequence generated through the optimization processing is the optimized instruction sequence. It should be noted that the first virtual CPU section 201 and the second virtual CPU section 202 are executed on different physical CPUs or on different CPU cores of a multi-core processor.
  • Next, with reference to FIG. 1 and a flow chart of FIG. 2, description is given of overall operation of this embodiment.
  • First, the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step A1 of FIG. 2).
  • Next, the virtual CPU selecting section 102 monitors the first virtual CPU section 201 and the second virtual CPU section 202 to select a virtual CPU having the lower usage rate as a virtual CPU that is to perform the optimization (Step A2).
  • Next, the optimization level selecting section 103 refers to the translated instruction sequence management section 302 to determine an optimization level to be adopted to the selected instruction sequence, and then gives a direction specifying the selected instruction sequence and optimization level to the selected virtual CPU (Step A3).
  • On this occasion, in a case where the first virtual CPU section 201 is selected (Step A4), the first virtual CPU section 201 performs the optimization processing of the instruction sequence according to the direction (Step A5).
  • In a case where the second virtual CPU section 202 is selected, the second virtual CPU section 202 performs the optimization processing according to the direction (Step A6).
  • According to the first embodiment of this invention, there is employed a configuration in which a virtual CPU section that is to perform the optimization processing is selected based on the usage rates of virtual CPUs. As a result, a virtual CPU section having a high usage rate is not given a direction to perform the optimization processing, and hence it is possible to execute the essential processing of translating/executing an instruction sequence without delay.
  • Second Embodiment
  • Next, with reference to the drawings, detailed description is given of a second embodiment of this invention.
  • With reference to FIG. 3, this embodiment is different from the first embodiment in that a unit time management section 304, an optimization processing time management section 305, and a time calculation section 104 are provided. However, the rest of the configuration is the same as in the first embodiment. Hence, only differences in configuration are described here.
  • The unit time management section 304 is a storage area in which a given time length is stored as a unit time. The unit time is used for calculating an idle time of a virtual CPU based on the usage rate of the virtual CPU expressed in percentage. For example, when the usage rate of the first virtual CPU section 201 is 90% with the unit time being one second, the first virtual CPU section 201 is considered as being used for 900 milliseconds and being in an idle state for 100 milliseconds.
  • The optimization processing time management section 305 is a storage area in which a length of time to be required for the optimization processing is stored for each optimization level. For example, there is stored information indicating that an optimization level O1 takes 10 milliseconds for each instruction sequence of 100 bytes and that an optimization level O2 takes 20 milliseconds for each instruction sequence of 100 bytes.
  • First, the time calculation section 104 calculates an allowable time length that can be used for the optimization processing according to the usage rate of the virtual CPU selected by the virtual CPU selecting section 102 and the unit time management section 304. For example, when the usage rate of the first virtual CPU section 201 is 90% with the unit time being one second, the first virtual CPU section 201 is in the idle state for 100 milliseconds, and hence the time calculation section 104 obtains 100 milliseconds through calculation as the allowable time length for the optimization processing. Next, the time calculation section 104 refers to the optimization processing time management section 305, to thereby calculate a time length to be required for the optimization processing of the specified instruction sequence for each optimization level.
  • Next, with reference to FIG. 3 and a flow chart of FIG. 4, detailed description is given of overall operation of this embodiment.
  • First, the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step B1 of FIG. 4).
  • Next, the virtual CPU selecting section 102 monitors the first virtual CPU section 201 and the second virtual CPU section 202 to select a virtual CPU having the lower usage rate as a virtual CPU that is to perform the optimization (Step B2).
  • Next, the time calculation section 104 calculates the allowable time length that can be used for the optimization processing according to the usage rate of the selected virtual CPU and the unit time management section 304 (Step B3).
  • Further, the time calculation section 104 refers to the optimization processing time management section 305, to thereby calculate a time length to be required for the optimization processing of the specified instruction sequence for each optimization level (Step B4).
  • Next, the optimization level selecting section 103 determines the highest optimization level from among the optimization levels for which the processing can be completed within the calculated allowable time length, and then gives a direction specifying the selected instruction sequence and optimization level to the selected virtual CPU (Step B5).
  • Here, in the case where the first virtual CPU section 201 is selected (Step B6), the first virtual CPU section 201 performs the optimization processing of the instruction sequence according to the direction (Step B7).
  • In the case where the second virtual CPU section 202 is selected, the second virtual CPU section 202 performs the optimization processing according to the direction (Step B8).
  • According to the second embodiment of this invention, there is employed a configuration in which the optimization level is determined in consideration of a time length to be required for the optimization processing in addition to the usage rate of the virtual CPU. Therefore, it is possible to further reduce the possibility that the essential processing of translating/executing an instruction sequence is delayed on the virtual CPU selected for performing the optimization processing.
  • Third Embodiment
  • Next, with reference to the drawings, detailed description is given of a third embodiment of this invention.
  • With reference to FIG. 5, this embodiment is different from the first embodiment in that the virtual CPU selecting section 102 and the optimization level selecting section 103 are not provided, and that an instruction sequence association management section 306, an optimization direction section 105, and an optimization information writing section 106 are provided. However, the rest of the configuration is the same as in the first embodiment. Hence, only differences in configuration are described here.
  • The instruction sequence association management section 306 is a storage area in which, regarding an untranslated instruction sequence manageable by a virtual CPU, a translated instruction sequence obtained by translating the untranslated instruction sequence into an instruction sequence having a format executable on a physical CPU, and an optimized instruction sequence generated by subjecting the translated instruction sequence to the optimization processing, based on an identifier associated with the untranslated instruction sequence, the translated instruction sequence and the optimized instruction sequence corresponding to that instruction sequence are associated with each other.
  • The optimization direction section 105 gives the respective virtual CPU sections directions to perform the optimization processing of a selected instruction sequence. On this occasion, the optimization direction section 105 gives the respective virtual CPU sections directions specifying different optimization levels from one another based on the usage rates of the respective virtual CPU sections. As a method of specifying the optimization level, for example, a lower optimization level may be specified for a virtual CPU section having a higher usage rate whereas a higher optimization level may be specified for a virtual CPU section having a lower usage rate. With this configuration, different optimized instruction sequences are generated for an identical translated instruction sequence from one virtual CPU section to another.
  • When the optimization processing is finished by a virtual CPU section, the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 in association with the translated instruction sequence that is a source of the optimized instruction sequence. It should be noted that the optimization information writing section 106 also writes information on the optimization level selected in the optimization processing.
  • Next, with reference to FIG. 5 and a flow chart of FIG. 6, detailed description is given of overall operation of this embodiment.
  • First, the instruction sequence selecting section 101 selects an instruction sequence to be optimized from among the translated instruction sequences stored in the translated instruction sequence management section 302 (Step C1 of FIG. 6).
  • Next, the optimization direction section 105 gives the respective virtual CPU sections the directions to perform the optimization processing of the translated instruction sequence for which different optimization levels have been selected based on the usage rates (Step C2).
  • In response to this, the first virtual CPU section 201 performs the optimization processing according to the translated instruction sequence and optimization level thus specified (Step C3-1).
  • After the optimization processing is finished, the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 (Step C4-1).
  • Further, the second virtual CPU section 202 also performs the optimization processing according to the translated instruction sequence and optimization level thus specified (Step C3-2).
  • After the optimization processing is finished, the optimization information writing section 106 writes information on the optimized instruction sequence into the instruction sequence association management section 306 (Step C4-2).
  • According to the third embodiment of this invention, there is employed a configuration in which a plurality of virtual CPU sections are given the directions to perform the optimization processing with different optimization levels, and, every time one of the virtual CPU sections finishes the optimization processing, information on the optimized instruction sequence is written into the instruction sequence association management section 306. With this configuration, even when there occurs a necessity to perform instruction sequence execution processing for an instruction sequence that is being subjected to the optimization processing while the optimization processing is performed, an instruction sequence having the highest optimization level at this point can be used for the execution processing based on the information written in the instruction sequence association management section 306.
  • EXAMPLES First Example
  • Next, with reference to FIG. 7, description is given of a first example of this invention. This example corresponds to the first embodiment of this invention.
  • As illustrated in FIG. 7, this example relates to a CPU emulation system for an ARM processor operated on an x86 computer 700. In this example, the x86 computer 700, a first virtual ARM processor section 701, and a second virtual ARM processor section 702 correspond to the information processing device 100, the first virtual CPU section 201, and the second virtual CPU section 202 according to the first embodiment of this invention, respectively.
  • Further, the instruction sequence selecting section 101, the virtual CPU selecting section 102, the optimization level selecting section 103, and the first virtual ARM processor section 701 are executed on a first physical CPU 710 whereas the second virtual ARM processor section 702 is executed on a second physical CPU 720. Further, the translated instruction sequence management section 302 and the optimized instruction sequence management section 303 are located in a memory 730. Further, the untranslated instruction sequence management section 301 is located in a hard disk 740.
  • In the CPU emulation system having such a configuration as described above, an ARM-format instruction sequence stored in the untranslated instruction sequence management section 301 is read by the first virtual ARM processor section 701 and the second virtual ARM processor section 702, and then, the ARM-format instruction sequence is translated into an x86-format instruction sequence, which is subsequently executed.
  • Further, the translated instruction sequence is cached in the translated instruction sequence management section 302 of the memory managed by the CPU emulation system. This is because instruction sequences translated into the x86 format contain an instruction sequence that is repeatedly executed, such as in loop processing.
  • In the CPU emulation system, after the instruction sequence selecting section 101 selects a translated instruction sequence for executing the optimization processing, the optimization processing is performed. For example, in a case where the usage rate of the first virtual ARM processor section 701 is 10% and the usage rate of the second virtual ARM processor section 702 is 90%, the optimization processing is performed by the first virtual ARM processor section 701 having the lower usage rate. Therefore, compared to a case in which the optimization processing is performed by the second virtual ARM processor section 702 having the higher usage rate, the processing of translating and executing an instruction sequence can be executed without delay.
  • Second Example
  • Next, with reference to FIG. 8, description is given of a second example of this invention. This example corresponds to the second embodiment of this invention.
  • In this example, detailed description is given of a method of selecting a virtual CPU that is to execute the optimization processing, which is used within the CPU emulation system illustrated in the first example.
  • First, a situation as illustrated in FIG. 8 is assumed. That is, the usage rate of the first virtual CPU section 201 is 90% and the usage rate of the second virtual CPU section 202 is 10%. Further, a translated instruction sequence to be optimized is 500 bytes. Further, the unit time management section 304 (see FIG. 3) stores 100 milliseconds as the unit time. Further, the optimization processing time management section 305 (see FIG. 3) stores information indicating that: (1) the optimization processing for the optimization level O1 takes 10 milliseconds for each instruction sequence of 100 bytes; and (2) the optimization processing for the optimization level O2 takes 20 milliseconds for each instruction sequence of 100 bytes.
  • Under such a condition, the virtual CPU selecting section 102 (see FIG. 3) selects the second virtual CPU section 202 having the lower usage rate as the virtual CPU that is to execute the optimization processing.
  • Next, based on the assumption that the unit time is 100 milliseconds and the usage rate of the second virtual CPU section 202 is 10%, the time calculation section 104 (see FIG. 3) determines through calculation that the allowable time length for the optimization processing is 90 milliseconds. Based on the assumption that the translated instruction sequence to be optimized is 500 bytes, the time calculation section 104 determines through calculation that it takes 50 milliseconds in the case of the optimization at the optimization level O1 and that it takes 100 milliseconds in the case of the optimization at the optimization level O2.
  • Based on the calculation result thus obtained by the time calculation section 104, the optimization level selecting section 103 determines to cause the second virtual CPU section 202 to execute the optimization processing at the optimization level O1, and then requests the second virtual CPU section 202 to perform the optimization processing.
  • Here, if the translated instruction sequence to be optimized is 300 bytes, the optimization processing can be completed within the allowable time length even at the optimization level O2. Accordingly, the optimization level selecting section 103 requests the second virtual CPU section 202 to perform the optimization processing at the optimization level O2.
  • Third Example
  • Next, with reference to FIGS. 9 and 10, description is given of a third example of this invention. This example corresponds to the third embodiment of this invention.
  • In this example, detailed description is given of a method of making a request for the optimization processing and a method of selecting, at the time of execution, an optimized instruction sequence, which are used within the CPU emulation system illustrated in the first example.
  • First, a situation as illustrated in FIG. 9 is assumed. That is, the usage rate of the first virtual CPU section 201 is 10%, and the usage rate of the second virtual CPU section 202 is 90%. Further, on the occasion of optimizing a translated instruction sequence β (cached instruction sequence β 901) obtained by translating an untranslated instruction sequence α, the optimization direction section 105 (see FIG. 5) gives the first virtual CPU section 201 and the second virtual CPU section 202 directions to perform the optimization at the optimization levels O1 and O2, respectively. It is assumed that, as a result, the respective optimization processings are completed at time points T1 and T2, respectively, and that optimized instruction sequences γ1 902 and γ 2 903 are generated, respectively.
  • During a period between T1 and T2, the generation of the optimized instruction sequences is completed only for γ1, and hence the instruction sequences are associated in the instruction sequence association management section 306 (see FIG. 5) as illustrated in FIG. 10A. Here, in the CPU emulation system, if the instruction sequence execution processing is performed for the instruction sequence α, the instruction sequence association management section 306 (see FIG. 5) is referred to, and then, it is understood that the optimized instruction sequence γ1 having the highest optimization level needs to be executed.
  • Further, after T2, the generation of the optimized instruction sequence γ2 is also completed, and hence the instruction sequences are associated in the instruction sequence association management section 306 as illustrated in FIG. 10B. Here, in the CPU emulation system, if the instruction sequence execution processing is performed for the instruction sequence α, the instruction sequence association management section 306 (see FIG. 5) is referred to, and then, it is understood that the optimized instruction sequence γ2 having the highest optimization level needs to be selected.
  • It should be noted that, in the above-mentioned examples, a CPU emulation system using two physical CPUs is assumed. However, a CPU emulation system having three or more physical CPUs may also be employed. Further, a CPU emulation system using one or more multi-core CPUs may also be employed.
  • According to this invention, a virtual CPU having a high usage rate is not given a direction to perform the optimization processing, and hence the essential processing of translating and executing an instruction sequence can be executed without delay. In other words, it is possible to shorten a time length for executing a program that is to be emulated. This is because this invention employs such a configuration that a virtual CPU that is to perform the optimization processing is selected based on the usage rates of virtual CPUs.
  • This invention can be applied for the purpose of performing, in a CPU emulation system in which a CPU having a different ISA from that of a physical CPU is software-emulated, the optimization processing of a cached instruction sequence while maintaining processing throughput of the virtual CPU as much as possible.
  • Hereinabove, detailed description has been given of this invention made by the inventor of the present application with reference to the embodiments. However, it should be understood that this invention is not limited to the above-mentioned embodiments, and that various modifications may be made without departing from the spirit and scope of this invention.

Claims (9)

What is claimed is:
1. A CPU emulation system, comprising:
an instruction sequence association management section for managing association among an untranslated instruction sequence, a translated instruction sequence, and an optimized instruction sequence, the untranslated instruction sequence being an instruction sequence before architecture translation processing, the translated instruction sequence being an instruction sequence obtained by translating the untranslated instruction sequence into a format executable on a physical CPU, the optimized instruction sequence being an instruction sequence obtained by subjecting the translated instruction sequence to optimization processing;
a plurality of virtual CPUs each operating on a different physical CPU;
an instruction sequence selecting section for selecting an instruction sequence to be optimized;
an optimization direction section for giving directions to perform the optimization processing of the selected instruction sequence to the plurality of virtual CPUs, the directions specifying different optimization levels among the plurality of virtual CPUs; and
an optimization information writing section for writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on the optimized instruction sequence thus obtained into the instruction sequence association management section in association with the translated instruction sequence that is a source of the optimized instruction sequence.
2. A CPU emulation system according to claim 1, wherein, when instruction sequence execution processing is performed, the instruction sequence association management section is referred to, and an instruction sequence having a highest optimization level is selected and executed.
3. A CPU emulation system according to claim 1, wherein, when the information on the optimized instruction sequence is written, the optimization information writing section further writes information on the optimization level adopted for the optimized instruction sequence.
4. A CPU emulation method, comprising:
selecting an instruction sequence to be optimized;
giving a plurality of virtual CPUs directions to perform optimization processing at different optimization levels with regard to the selected instruction sequence; and
writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on an optimized instruction sequence thus obtained into an instruction sequence association management section in association with a translated instruction sequence that is a source of the optimized instruction sequence.
5. A CPU emulation method according to claim 4, further comprising referring to, when instruction sequence execution processing is performed, the instruction sequence association management section, to thereby select and execute an instruction sequence having a highest optimization level.
6. A CPU emulation method according to claim 4, further comprising further writing, when the information on the optimized instruction sequence is written, information on the optimization level adopted for the optimized instruction sequence.
7. A recording medium having a CPU emulation program recorded thereon, the CPU emulation program causing a computer to execute the processings of:
selecting an instruction sequence to be optimized;
giving a plurality of virtual CPUs directions to perform optimization processing at different optimization levels with regard to the selected instruction sequence; and
writing, upon completion of the optimization processing by one of the plurality of virtual CPUs, information on an optimized instruction sequence thus obtained into an instruction sequence association management section in association with a translated instruction sequence that is a source of the optimized instruction sequence.
8. A recording medium having a CPU emulation program recorded thereon according to claim 7, the CPU emulation program further causing the computer to execute processing of referring to, when instruction sequence execution processing is performed, the instruction sequence association management section, to thereby select and execute an instruction sequence having a highest optimization level.
9. A recording medium having a CPU emulation program recorded thereon according to claim 7, the CPU emulation program further causing the computer to execute processing of further writing, when the information on the optimized instruction sequence is written, information on the optimization level adopted for the optimized instruction sequence.
US13/740,469 2008-10-28 2013-01-14 Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon Abandoned US20130132062A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/740,469 US20130132062A1 (en) 2008-10-28 2013-01-14 Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP2008277098A JP5093509B2 (en) 2008-10-28 2008-10-28 CPU emulation system, CPU emulation method, and CPU emulation program
JP2008-277098 2008-10-28
US12/607,479 US8355901B2 (en) 2008-10-28 2009-10-28 CPU emulation system, CPU emulation method, and recording medium having a CPU emulation program recorded thereon
US13/740,469 US20130132062A1 (en) 2008-10-28 2013-01-14 Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US12/607,479 Continuation US8355901B2 (en) 2008-10-28 2009-10-28 CPU emulation system, CPU emulation method, and recording medium having a CPU emulation program recorded thereon

Publications (1)

Publication Number Publication Date
US20130132062A1 true US20130132062A1 (en) 2013-05-23

Family

ID=42118345

Family Applications (2)

Application Number Title Priority Date Filing Date
US12/607,479 Active 2030-12-27 US8355901B2 (en) 2008-10-28 2009-10-28 CPU emulation system, CPU emulation method, and recording medium having a CPU emulation program recorded thereon
US13/740,469 Abandoned US20130132062A1 (en) 2008-10-28 2013-01-14 Cpu emulation system, cpu emulation method, and recording medium having a cpu emulation program recorded thereon

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US12/607,479 Active 2030-12-27 US8355901B2 (en) 2008-10-28 2009-10-28 CPU emulation system, CPU emulation method, and recording medium having a CPU emulation program recorded thereon

Country Status (2)

Country Link
US (2) US8355901B2 (en)
JP (1) JP5093509B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9501311B2 (en) 2014-01-28 2016-11-22 Electronics And Telecommunications Research Instit Apparatus and method for multicore emulation based on dynamic context switching
US9836401B2 (en) 2016-01-05 2017-12-05 Electronics And Telecommunications Research Institute Multi-core simulation system and method based on shared translation block cache

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9538493B2 (en) 2010-08-23 2017-01-03 Finetrak, Llc Locating a mobile station and applications therefor
CN102364455B (en) * 2011-10-31 2013-10-23 杭州华三通信技术有限公司 Balanced share control method and device for virtual central processing units (VCPUs) among cascaded multi-core central processing units (CPUs)
US9202056B2 (en) * 2013-03-15 2015-12-01 Intel Corporation Inter-processor attestation hardware
US10635465B2 (en) * 2015-03-28 2020-04-28 Intel Corporation Apparatuses and methods to prevent execution of a modified instruction
US9335982B1 (en) 2015-04-28 2016-05-10 Microsoft Technology Licensing, Llc Processor emulation using multiple translations
JP6365454B2 (en) * 2015-08-03 2018-08-01 京セラドキュメントソリューションズ株式会社 Image forming apparatus
US20190163642A1 (en) 2017-11-27 2019-05-30 Intel Corporation Management of the untranslated to translated code steering logic in a dynamic binary translation based processor

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6164841A (en) * 1998-05-04 2000-12-26 Hewlett-Packard Company Method, apparatus, and product for dynamic software code translation system
US6195676B1 (en) * 1989-12-29 2001-02-27 Silicon Graphics, Inc. Method and apparatus for user side scheduling in a multiprocessor operating system program that implements distributive scheduling of processes
US20030022395A1 (en) * 2001-07-17 2003-01-30 Thoughtbeam, Inc. Structure and method for fabricating an integrated phased array circuit
US20040015888A1 (en) * 2001-04-11 2004-01-22 Hiroaki Fujii Processor system including dynamic translation facility, binary translation program that runs in computer having processor system implemented therein, and semiconductor device having processor system implemented therein
US20040054992A1 (en) * 2002-09-17 2004-03-18 International Business Machines Corporation Method and system for transparent dynamic optimization in a multiprocessing environment
US20050039180A1 (en) * 2003-08-11 2005-02-17 Scalemp Inc. Cluster-based operating system-agnostic virtual computing system
US20080270508A1 (en) * 2007-04-25 2008-10-30 International Business Machines Corporation Detection of potential need to use a larger data format in performing floating point operations
US20090049220A1 (en) * 2007-05-10 2009-02-19 Texas Instruments Incorporated Interrupt-related circuits, systems, and processes
US20090276771A1 (en) * 2005-09-15 2009-11-05 3Tera, Inc. Globally Distributed Utility Computing Cloud
US7734895B1 (en) * 2005-04-28 2010-06-08 Massachusetts Institute Of Technology Configuring sets of processor cores for processing instructions
US7802073B1 (en) * 2006-03-29 2010-09-21 Oracle America, Inc. Virtual core management
US7898545B1 (en) * 2004-12-14 2011-03-01 Nvidia Corporation Apparatus, system, and method for integrated heterogeneous processors
US7953588B2 (en) * 2002-09-17 2011-05-31 International Business Machines Corporation Method and system for efficient emulation of multiprocessor address translation on a multiprocessor host
US8108863B2 (en) * 2005-12-30 2012-01-31 Intel Corporation Load balancing for multi-threaded applications via asymmetric power throttling

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134883A (en) * 1991-11-08 1993-06-01 Fujitsu Ltd Distributed compilation processing system
US5970249A (en) * 1997-10-06 1999-10-19 Sun Microsystems, Inc. Method and apparatus for performing byte-code optimization during pauses
JP3605327B2 (en) * 1999-11-18 2004-12-22 富士通株式会社 Program execution device
JP5167589B2 (en) * 2006-02-13 2013-03-21 富士通株式会社 Application server device and virtual machine program

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6195676B1 (en) * 1989-12-29 2001-02-27 Silicon Graphics, Inc. Method and apparatus for user side scheduling in a multiprocessor operating system program that implements distributive scheduling of processes
US6164841A (en) * 1998-05-04 2000-12-26 Hewlett-Packard Company Method, apparatus, and product for dynamic software code translation system
US20040015888A1 (en) * 2001-04-11 2004-01-22 Hiroaki Fujii Processor system including dynamic translation facility, binary translation program that runs in computer having processor system implemented therein, and semiconductor device having processor system implemented therein
US20030022395A1 (en) * 2001-07-17 2003-01-30 Thoughtbeam, Inc. Structure and method for fabricating an integrated phased array circuit
US20040054992A1 (en) * 2002-09-17 2004-03-18 International Business Machines Corporation Method and system for transparent dynamic optimization in a multiprocessing environment
US7953588B2 (en) * 2002-09-17 2011-05-31 International Business Machines Corporation Method and system for efficient emulation of multiprocessor address translation on a multiprocessor host
US20050039180A1 (en) * 2003-08-11 2005-02-17 Scalemp Inc. Cluster-based operating system-agnostic virtual computing system
US7898545B1 (en) * 2004-12-14 2011-03-01 Nvidia Corporation Apparatus, system, and method for integrated heterogeneous processors
US7734895B1 (en) * 2005-04-28 2010-06-08 Massachusetts Institute Of Technology Configuring sets of processor cores for processing instructions
US8078832B1 (en) * 2005-04-28 2011-12-13 Massachusetts Institute Of Technology Virtual architectures in a parallel processing environment
US20090276771A1 (en) * 2005-09-15 2009-11-05 3Tera, Inc. Globally Distributed Utility Computing Cloud
US8108863B2 (en) * 2005-12-30 2012-01-31 Intel Corporation Load balancing for multi-threaded applications via asymmetric power throttling
US7802073B1 (en) * 2006-03-29 2010-09-21 Oracle America, Inc. Virtual core management
US20080270508A1 (en) * 2007-04-25 2008-10-30 International Business Machines Corporation Detection of potential need to use a larger data format in performing floating point operations
US20090049220A1 (en) * 2007-05-10 2009-02-19 Texas Instruments Incorporated Interrupt-related circuits, systems, and processes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HP, NPL, "Enabling Optimization to Achieve Higher Performance on the HP PA-RISC Architecture", 1997 *
Joel Emer, NPL, "Virtual Machines and Dynamic Translation: Implementing ISAs in Software", December 2005 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9501311B2 (en) 2014-01-28 2016-11-22 Electronics And Telecommunications Research Instit Apparatus and method for multicore emulation based on dynamic context switching
US9836401B2 (en) 2016-01-05 2017-12-05 Electronics And Telecommunications Research Institute Multi-core simulation system and method based on shared translation block cache

Also Published As

Publication number Publication date
JP5093509B2 (en) 2012-12-12
JP2010108086A (en) 2010-05-13
US20100106479A1 (en) 2010-04-29
US8355901B2 (en) 2013-01-15

Similar Documents

Publication Publication Date Title
US8355901B2 (en) CPU emulation system, CPU emulation method, and recording medium having a CPU emulation program recorded thereon
US8874851B2 (en) Systems and methods for intelligent content aware caching
US9256533B2 (en) Adjustment of destage rate based on read and write response time requirements
JP4151977B2 (en) Prefetching device, prefetching method, and prefetching program
US9063754B2 (en) Profiling and optimization of program code/application
US20100037226A1 (en) Grouping and dispatching scans in cache
JP2006048164A (en) Information processor and software prefetch control method
Laga et al. Lynx: A learning linux prefetching mechanism for ssd performance model
JP2009501368A (en) Selective precompilation of virtual code to improve emulator performance
TW202014884A (en) Block device interface using non-volatile pinned memory
US20120204182A1 (en) Program generating apparatus and program generating method
US11226798B2 (en) Information processing device and information processing method
US10346070B2 (en) Storage control apparatus and storage control method
US20130007765A1 (en) Software control device, software control method, and computer product
US20140157248A1 (en) Conversion apparatus, method of converting, and non-transient computer-readable recording medium having conversion program stored thereon
US20070079109A1 (en) Simulation apparatus and simulation method
CN108052296B (en) Data reading method and device and computer storage medium
JP5953808B2 (en) Random number processing apparatus, random number processing method, and program
JP4558003B2 (en) Data access processing method and storage control device
US10452368B2 (en) Recording medium having compiling program recorded therein, information processing apparatus, and compiling method
JP2009199367A (en) Computer system, i/o scheduler and i/o scheduling method
US11467748B2 (en) Control apparatus and computer-readable recording medium having stored therein control program
JP2015184883A (en) Computing system
TW201435579A (en) System and method for booting multiple servers from snapshots of an operating system installation image
US20120017070A1 (en) Compile system, compile method, and storage medium storing compile program

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION