WO2016203647A1 - 計算機及び処理のスケジューリング方法 - Google Patents

計算機及び処理のスケジューリング方法 Download PDF

Info

Publication number
WO2016203647A1
WO2016203647A1 PCT/JP2015/067760 JP2015067760W WO2016203647A1 WO 2016203647 A1 WO2016203647 A1 WO 2016203647A1 JP 2015067760 W JP2015067760 W JP 2015067760W WO 2016203647 A1 WO2016203647 A1 WO 2016203647A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical
processor
state
physical processor
physical cpu
Prior art date
Application number
PCT/JP2015/067760
Other languages
English (en)
French (fr)
Inventor
真哉 今泉
周平 松本
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2015/067760 priority Critical patent/WO2016203647A1/ja
Publication of WO2016203647A1 publication Critical patent/WO2016203647A1/ja

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/46Multiprogramming arrangements
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to a scheduling method for common processing in a computer including a plurality of LPARs.
  • server virtualization that integrates a plurality of servers into a high-performance server is performed.
  • a computer resource of a high-performance server is divided to divide the server into logical partition (LPAR: Logical Partitioning) units and operate the LPAR as one server.
  • the LPAR is also called a “virtual computer”, and an OS (Operating System) operating on the LPAR is called a “guest OS”.
  • the guest OS is functionally identical to the OS running on the physical server.
  • Server virtualization implementation methods include “physical partitioning” and “logical partitioning”.
  • Physical partitioning is a method of assigning computer resources to one LPAR in hardware units.
  • Logical partitioning is a method of allocating computer resources so that a plurality of LPARs share one piece of hardware at the same time.
  • hypervisor type is a system in which a plurality of LPARs are operated on a hypervisor which is a special management program existing on a bare machine.
  • the host OS type is a method in which an OS corresponding to the host OS executes a management program for managing LPAR as one application, and operates a plurality of LPARs on the application. Any of the above-described methods is realized by a control function called VMM (Virtual Machine Monitor).
  • VMM Virtual Machine Monitor
  • VMM controls various processes such as instruction emulation, memory management, I / O control, and scheduling.
  • processes controlled by the VMM there is a common process required from all LPARs.
  • the common process is a process required because each LPAR shares a computer resource.
  • a CPU is preferentially assigned to the common process.
  • the CPU assigned to the LPAR is temporarily assigned to the common process.
  • time sharing method As a method for assigning processing to CPUs, there is a time sharing method that is a scheduling algorithm that guarantees fairness of processing. By using the time sharing method, it is possible to assign CPUs to all processes without causing processing delays and the like. However, in the time sharing method, it is not possible to consider whether the assigned CPU is a CPU that executes busy LPAR processing or an idle LPAR CPU.
  • control method using the “job class” is effective in a closed system in one computer (OS), but it is difficult to adapt to a system including an LPAR and a hypervisor. This is because the hypervisor manages the processing priority of the LPAR as statically the same, and the internal state of the LPAR dynamically changes from the busy state to the idle state or from the idle state to the busy state. Because.
  • Patent Document 1 describes a method for effectively utilizing idle CPU resources. Specifically, the cited document 1 states that “a plurality of physical CPUs and a plurality of physical CPUs are allocated and a plurality of LPARs each executing a program on the guest OS and a management for managing the plurality of LPARs”.
  • a guest OS monitoring unit capable of grasping the state of the guest OS on the LPAR and a shared process by a management program having a higher priority than the LPAR process are allocated to any physical CPU.
  • the dispatch processing unit dispatches the shared processing preferentially to the physical CPU that is processing the idle LPAR. "Yes" is described.
  • the method described in Patent Document 1 is based on the assumption that the hypervisor can detect the state of the CPU assigned to the LPAR.
  • a method of detecting that the CPU to which the hypervisor is exclusively assigned to the LPAR is in an idle state there is a method in which the hypervisor traps power management instructions such as HALT and MWAIT.
  • the hypervisor traps a power management command issued from the guest OS
  • the hypervisor performs emulation so that the logical CPU changes the state according to the command to the guest OS. Therefore, if the method described in the cited document 1 is used, the hypervisor can be assigned to a common process for an idle CPU.
  • the hypervisor can improve the processing performance of the LPAR by controlling the CPU to which the LPAR is assigned so that the power management instruction can be directly executed.
  • the hypervisor does not trap the power management command, and thus cannot determine whether the CPU assigned to the LPAR is in an idle state. Therefore, the method described in Patent Document 1 cannot be applied. That is, the hypervisor common process cannot be assigned to an idle CPU.
  • An object of the present invention is to assign an idle CPU with high probability to a common process even if the hypervisor cannot detect an idle state of a CPU that is exclusively assigned to the LPAR.
  • a typical example of the invention disclosed in the present application is as follows. That is, as a computer resource, a computer including a plurality of physical processors and a physical memory connected to each of the plurality of physical processors, wherein the physical memory is logically divided into a plurality of logical partitions.
  • a program for realizing a virtualization management unit for allocating the computer resource is stored, and an operating system for managing a plurality of logical processors and logical memories is operated in each of the plurality of logical partitions, and the virtualization management unit
  • a resource management unit that manages the allocation of the computer resources to a plurality of logical partitions; and a scheduling processing unit that manages the allocation of processes to the physical processors associated with the logical processors, the plurality of logical partitions
  • Each of the plurality of logical processors includes the plurality of physical processors.
  • the physical processor that is estimated to be in an idle state is identified based on the monitoring result
  • the physical processor to be allocated to the common process is selected from the physical processors estimated to be in the idle state.
  • VMM virtualization management unit
  • common processing can be assigned to the physical processor so that the processing performance of the logical partition does not deteriorate.
  • FIG. 3 is an explanatory diagram illustrating a configuration example of a computer system according to the first embodiment.
  • FIG. 3 is an explanatory diagram illustrating a configuration example of a scheduling processing unit according to the first embodiment.
  • FIG. 3 is an explanatory diagram illustrating a configuration example of CPU configuration information according to the first embodiment. It is explanatory drawing which shows the structural example of CPU statistical information of Example 1.
  • FIG. 6 is a flowchart illustrating processing executed when the physical CPU of the first embodiment accepts a timer interrupt. 6 is a flowchart illustrating processing executed by the physical CPU according to the first embodiment when common processing occurs.
  • 3 is a flowchart illustrating search processing according to the first exemplary embodiment.
  • FIG. 6 is a flowchart for explaining processing when a common process is assigned to an occupied physical CPU estimated to be in an idle state according to the first embodiment.
  • 10 is an explanatory diagram illustrating an example of a common process allocation method for physical CPUs described in Patent Document 1.
  • FIG. It is explanatory drawing which shows an example of the allocation method of the common process with respect to physical CPU in case LPAR can execute a power management command directly to physical CPU.
  • FIG. 1 is an explanatory diagram illustrating a configuration example of a computer system according to the first embodiment.
  • the computer system includes a computer 100 and an external storage device 150.
  • the computer 100 is connected to the external storage apparatus 150 directly or via a network.
  • SAN etc. comprised by FC (Fibre Channel) can be considered.
  • the computer 100 may include a storage device inside the device.
  • the computer 100 includes a plurality of physical CPUs 101, a memory 102, a NIC 103, and an HBA 104.
  • the physical CPU 101 executes a program stored in the memory 102.
  • the computer 100 shown in FIG. 1 includes four physical CPUs 101: a physical CPU 1 (101-1), a physical CPU 2 (101-2), a physical CPU 3 (101-3), and a physical CPU 4 (101-4).
  • a physical CPU 1 101-1
  • a physical CPU 2 101-2
  • a physical CPU 3 101-3
  • a physical CPU 4 101-4
  • the physical CPU 101 executes the program, functions such as the hypervisor 110 and the guest OS 130 are realized.
  • processing is mainly described with respect to a program, it indicates that the program is being executed by the physical CPU 101.
  • the physical CPU 101 of this embodiment includes a virtualization support mechanism.
  • the physical CPU 101 having the virtualization support mechanism has a first mode for executing the processing of the LPAR 120 and a second mode for executing the processing of the hypervisor 110.
  • the transition from the second mode to the first mode is called “VM-entry”, and the transition from the first mode to the second mode is called “VM-exit”.
  • the memory 102 stores a program executed by the physical CPU 101 and information necessary for executing the program.
  • the memory 102 also includes a work area for each program.
  • the NIC 103 is an interface that connects to other devices via a network.
  • the HBA 104 is an interface connected to the external storage apparatus 150.
  • the number of NICs 103 and HBAs 104 included in the computer 100 is one, but may be plural. Further, the computer 100 may include an I / O device other than the NIC 103 and the HBA 104.
  • the external storage device 150 stores a program of the guest OS 130, a program of an application operating on the guest OS 130, and data.
  • the external storage device 150 includes a plurality of storage media 151. Examples of the storage medium 151 include an HDD (Hard Disk Drive), an SSD (Solid State Drive), and the like.
  • the computer 100 may be connected to a storage system including a plurality of storage media 151 and a controller.
  • a program for realizing the hypervisor 110 is stored in the memory 102 of the computer 100.
  • One of the physical CPUs 101 included in the computer 100 executes a program for realizing the hypervisor 110.
  • the hypervisor 110 logically divides the computer resources of the computer 100 and allocates the divided computer resources to one or more LPARs 120.
  • the LPAR 120 includes one or more logical CPUs 121, one or more logical memories 122, one or more logical NICs 123, and the like.
  • the guest OS 130 operates on the LPAR 120.
  • the hypervisor 110 shown in FIG. 1 generates two LPAR1 (120-1) and LPAR2 (120-2).
  • the LPAR1 (120-1) includes a logical CPU1 (121-1), a logical CPU2 (121-2), a logical memory 1 (122-1), and a logical NIC1 (123-1), and the LPAR2 (120-2) Includes a logical CPU 3 (121-3), a logical CPU 4 (121-4), a logical memory 2 (122-2), and a logical NIC 2 (123-2).
  • the guest OS1 (130-1) operates on the LPAR1 (120-1), and the guest OS2 (130-2) operates on the LPAR2 (120-2).
  • the hypervisor 110 includes an emulation unit 111, a scheduling processing unit 112, an I / O processing unit 113, and a resource management unit 114.
  • the emulation unit 111 converts an instruction issued from the guest OS 130 to the logical device into an instruction executable by the physical device.
  • the hypervisor 110 can be controlled so as not to emulate the power management command issued from the guest OS 130 operating on the LPAR 120 to which the physical CPU 101 is exclusively allocated, according to the setting of the LPAR 120.
  • the guest OS 130 can directly execute a power management command to the physical CPU 101.
  • the scheduling processor 112 controls a scheduling process for assigning the physical CPU 101 to an arbitrary process (for example, a task).
  • the processing includes processing for assigning the physical CPU 101 to the logical CPU 121 of the LPAR 120 and common processing for the hypervisor 110.
  • the common processing of the hypervisor 110 includes I / O device control processing shared by a plurality of LPARs 120 and the like.
  • the I / O processing unit 113 controls I / O for the I / O device.
  • the resource management unit 114 manages allocation of computer resources included in the computer 100 to the LPAR 120 and the state of the computer resources.
  • the resource management unit 114 holds the CPU configuration information 115.
  • the CPU configuration information 115 is definition information related to the allocation of the physical CPU 101 to the LPAR 120. Details of the CPU configuration information 115 will be described later with reference to FIG. Note that the resource management unit 114 also holds definition information related to allocation of the memory 102, the NIC 103, and the HBA 104 to the LPAR 120 (not shown).
  • FIG. 9 is an explanatory diagram illustrating an example of a common process allocation method for the physical CPU 101 described in Patent Document 1.
  • FIG. 10 is an explanatory diagram showing an example of a common process allocation method for the physical CPU 101 when the LPAR 120 can directly execute a power management command to the physical CPU 101.
  • FIG. 9 will be described.
  • the physical CPU 1 (101-1) assigned to the logical CPU 121 of the LPAR1 (120-1) is busy, and the physical CPU 2 (101-2) assigned to the logical CPU 121 of the LPAR2 (120-2) is busy. I know I'm idle.
  • the hypervisor assigns the common process to the idle physical CPU 2 (101-2).
  • the physical CPU 2 (101-2) is assigned to the common process until the physical CPU 1 (101-1) assigned to the logical CPU 121 of the LPAR1 (120-1) transitions to the idle state.
  • FIG. 10 it is assumed that the hypervisor does not emulate the power management instruction. That is, it is assumed that the guest OS 130 directly executes a power management command for the physical CPU 101. In this case, since the hypervisor recognizes that the physical CPU 101 is busy, it cannot grasp the actual state of the physical CPU 101.
  • the physical CPU 1 (101-1) assigned to the logical CPU 121 of the LPAR1 (120-1) is busy, and the physical CPU 2 (101-2) assigned to the logical CPU 121 of the LPAR2 (120-2). Is idle.
  • the hypervisor assigns the physical CPU 101 to the common process so that the number of executions of the common process in each physical CPU 101 is leveled.
  • the hypervisor alternately assigns the physical CPU 1 (101-1) and the physical CPU 2 (101-2) to the common process every cycle.
  • the hypervisor is assigned to the common processing to the physical CPU 2 (101-2) in the idle state.
  • FIG. 2 is an explanatory diagram illustrating a configuration example of the scheduling processing unit 112 according to the first embodiment.
  • the scheduling processing unit 112 includes an OS state monitoring unit 201, a dispatch processing unit 202, and a CPU statistical information management unit 203.
  • the OS state monitoring unit 201 periodically generates a timer interrupt for each physical CPU 101 included in the computer 100.
  • the dispatch processing unit 202 assigns the physical CPU 101 to the common process or the process of the LPAR 120.
  • the CPU statistical information management unit 203 manages CPU statistical information 204 that stores the state of the physical CPU 101 and the like. Details of the CPU statistical information 204 will be described later with reference to FIG.
  • the physical CPU 101 When the physical CPU 101 receives a timer interrupt, the physical CPU 101 checks the state of the physical CPU 101 itself. When the physical CPU 101 is in the idle state, the physical CPU 101 determines that the physical CPU 101 is in the idle state from the time when the previous timer interrupt is accepted until the time when the current timer interrupt is accepted. On the other hand, when the physical CPU 101 is busy, the physical CPU 101 determines that the physical CPU 101 is busy from the time when the previous timer interrupt is accepted until the time when the current timer interrupt is accepted. Further, the physical CPU 101 calculates a moving average of the duration time of the idle state.
  • the physical CPU 101 refers to the CPU statistical information 204 and stores the above-described processing result in an entry corresponding to the physical CPU 101.
  • FIG. 3 is an explanatory diagram illustrating a configuration example of the CPU configuration information 115 according to the first embodiment.
  • the CPU configuration information 115 stores information indicating an allocation method of each physical CPU 101 to the LPAR 120. Specifically, the CPU configuration information 115 includes a CPU number 301, a scheduling mode 302, and a power management command execution 303.
  • the CPU number 301 is an identification number for uniquely identifying a plurality of physical CPUs 101 included in the computer 100.
  • the scheduling mode 302 is information indicating an allocation method of the physical CPU 101 to the LPAR 120. In the scheduling mode 302 of this embodiment, either “occupied” or “shared” is stored. When the scheduling mode 302 is “occupied”, it indicates that the physical CPU 101 is allocated to only one logical CPU 121. That is, one LPAR 120 uses the physical CPU 101 exclusively. When the scheduling mode 302 is “shared”, it indicates that the physical CPU 101 is assigned to a plurality of logical CPUs 121. That is, the physical CPU 101 is shared by a plurality of LPARs 120.
  • the physical CPU 101 whose scheduling mode 302 is “occupied” is also referred to as an occupied physical CPU 101.
  • the physical CPU 101 whose scheduling mode 302 is “shared” is also referred to as a shared physical CPU 101.
  • the power management command execution 303 is information indicating whether or not the physical CPU 101 directly executes a power management command issued by the guest OS 130 operating on the LPAR 120. In the power management command execution 303 of this embodiment, either “valid” or “invalid” is stored. When the power management command execution 303 is “valid”, this indicates that the physical CPU 101 directly executes the power management command. When the power management command execution 303 is “invalid”, it indicates that the physical CPU 101 is not allowed to directly execute the power management command. When the power management command execution 303 is “invalid”, the hypervisor 110 traps the power management command and performs emulation.
  • the hypervisor 110 manages the allocation of the physical CPU 101 and the execution method of the power management command based on the CPU configuration information 115. For example, the hypervisor 110 manages the allocation of the physical CPU 101 so that an arbitrary logical CPU 121 occupies the physical CPU 1 (101-1) based on the top entry of the CPU configuration information 115 in FIG. Any logical CPU 121 manages the power management command so that it can be directly executed on the physical CPU 1 (101-1).
  • FIG. 4 is an explanatory diagram illustrating a configuration example of the CPU statistical information 204 according to the first embodiment.
  • the CPU statistical information 204 is information for managing the current state and state transition of each physical CPU 101 provided in the computer 100.
  • the CPU statistics information 204 includes a CPU number 401, a state 402, a state transition time 403, an average duration 404, an allocation count 405, a hit count 406, and a hit ratio 407.
  • the CPU number 401 is the same as the CPU number 301.
  • Status 402 indicates the current status of the physical CPU 101.
  • the state 402 stores either “busy” or “idle”. When the state 402 is “busy”, it indicates that the physical CPU 101 is busy. When the state 402 is “idle”, it indicates that the physical CPU 101 is in the idle state.
  • State transition time 403 is the time when the state transitions to the state set in state 402. In this embodiment, when the physical CPU 101 has changed the time when the current timer interrupt is accepted from the state when the previous timer interrupt was accepted, the state transition is made to the time when the current timer interrupt was accepted. Set to time 403.
  • Average duration 404 is a moving average of idle duration.
  • the allocation count 405 is the number of times that the common process is allocated to the physical CPU 101, that is, the number of times that the physical CPU 101 executes the common process.
  • the hit count 406 is the number of times that the physical CPU 101 has been in an idle state when the common process is assigned.
  • the hit rate 407 is a probability that the physical CPU 101 to which the common process is assigned is actually in an idle state. The hit rate 407 is calculated by dividing the value of the allocation count 405 by the value of the hit count 406.
  • FIG. 5 is a flowchart for explaining processing executed when the physical CPU 101 according to the first embodiment accepts a timer interrupt.
  • the OS state monitoring unit 201 of the scheduling processing unit 112 executed by at least one physical CPU 101 periodically generates timer interrupts and outputs the timer interrupts to all physical CPUs 101 included in the computer 100. At this time, a timer interrupt is also output to the physical CPU 101 that executes the hypervisor 110. It is assumed that the period for generating the timer interrupt is set so as not to affect the processing of the LPAR 120.
  • the physical CPU 101 that executes the hypervisor 110 that generates the timer interrupt may be set in advance or may be determined based on the same processing as the processing illustrated in FIG.
  • step S501 When the physical CPU 101 receives a timer interrupt (step S501), the physical CPU 101 switches from the processing of the guest OS 130 to the processing of the hypervisor 110. That is, the physical CPU 101 generates a VM-exit. Note that it is not necessary to generate a VM-exit for the physical CPU 101 that executes the hypervisor 110.
  • the physical CPU 101 that executes the hypervisor 110 refers to the CPU configuration information 115 and determines whether or not the power management instruction execution 303 is “valid” (step S502).
  • the physical CPU 101 that executes the hypervisor 110 refers to the CPU configuration information 115 and searches for an entry in which the CPU number 301 matches its own identification number.
  • the physical CPU 101 executing the hypervisor 110 determines whether or not the power management instruction execution 303 of the retrieved entry is “valid”.
  • step S503 If it is determined that the power management instruction execution 303 is “valid”, the physical CPU 101 that executes the hypervisor 110 has changed the state of the physical CPU 101 from the state of the physical CPU 101 at the time of accepting the previous timer interrupt. It is determined whether or not (step S503).
  • the physical CPU 101 executing the hypervisor 110 determines whether the current state of the physical CPU 101 is “idle” or “busy”. Further, the physical CPU 101 executing the hypervisor 110 refers to the state 402 of the entry searched in step S502, and compares the current state of the physical CPU 101 with the state of the physical CPU 101 at the time of accepting the previous timer interrupt. For example, if the current state of the physical CPU 101 is “idle” and “busy” is set in the state 402, the physical CPU 101 that executes the hypervisor 110 determines that the state of the physical CPU 101 has changed.
  • the physical CPU 101 that executes the hypervisor 110 ends the process.
  • the physical CPU 101 that executes the hypervisor 110 updates the CPU statistical information 204 (step S504). Thereafter, the physical CPU 101 that executes the hypervisor 110 ends the process.
  • the physical CPU 101 executing the hypervisor 110 sets the current state of the physical CPU 101 in the state 402 of the entry searched in step S502, and accepts the current timer interrupt at the state transition time 403. Set the time.
  • the physical CPU 101 that executes the hypervisor 110 treats the time interval between the time when the previous timer interrupt is accepted and the time when the current timer interrupt is accepted as the continuation time of the current physical CPU 101, thereby The moving average of the duration of is calculated.
  • the physical CPU 101 that executes the hypervisor 110 sets the moving average calculated in the average duration 404 of the entry searched in step S502.
  • the physical CPU 101 that executes the hypervisor 110 generates a VM-entry as necessary after the processing is completed. For example, before accepting a timer interrupt, the physical CPU 101 in the first mode generates a VM-entry.
  • FIG. 6 is a flowchart for explaining processing executed by the physical CPU 101 according to the first embodiment when common processing occurs.
  • the physical CPU 101 assigned to the LPAR 120 on which the guest OS 130 that issued the instruction operates is the physical CPU 101 that executes the processing of the hypervisor 110.
  • the physical CPU 101 that executes processing described below may be set in advance.
  • the physical CPU 101 that executes the hypervisor 110 determines whether or not there is an idle shared physical CPU 101 (step S601). Specifically, the following processing is executed.
  • the physical CPU 101 that executes the hypervisor 110 searches for an entry in which “shared” is set in the scheduling mode 302 of the CPU configuration information 115 and “invalid” is set in the power management instruction execution 303.
  • the physical CPU 101 that executes the hypervisor 110 acquires the identification number of the physical CPU 101 from the CPU number 301 of the retrieved entry.
  • the physical CPU 101 executing the hypervisor 110 refers to the CPU statistical information 204 and searches for an entry in which the CPU number 401 matches the acquired identification number of the physical CPU 101.
  • the physical CPU 101 that executes the hypervisor 110 determines whether or not there is an entry for which “idle” is set in the state 402 among the retrieved entries.
  • the physical CPU 101 that executes the hypervisor 110 selects the shared physical CPU 101 in the idle state as the physical CPU 101 assigned to the common process (step S602), and ends the process.
  • the physical CPU 101 that executes the hypervisor 110 determines whether there is an idle occupied physical CPU 101 (step S603).
  • the physical CPU 101 that executes the hypervisor 110 searches for an entry in which “occupancy” is set in the scheduling mode 302 of the CPU configuration information 115 and “invalid” is set in the power management instruction execution 303.
  • Other processes are the same as those in step S601.
  • the physical CPU 101 that executes the hypervisor 110 selects the idle occupied physical CPU 101 as the physical CPU 101 to be assigned to the common process (step S604), and ends the process.
  • the physical CPU 101 that executes the hypervisor 110 determines whether there is an occupied physical CPU 101 whose power management instruction execution 303 is “valid” (step S605). ).
  • the physical CPU 101 executing the hypervisor 110 has an entry in which “occupancy” is set in the scheduling mode 302 of the CPU configuration information 115 and “valid” is set in the power management instruction execution 303. Determine whether or not.
  • the physical CPU 101 that executes the hypervisor 110 determines that there is an occupied physical CPU 101 whose power management instruction execution 303 is “valid”.
  • step S608 If it is determined that there is no occupied physical CPU 101 whose power management instruction execution 303 is “valid”, the physical CPU 101 that executes the hypervisor 110 proceeds to step S608.
  • the physical CPU 101 executing the hypervisor 110 executes a search process for searching for the occupied physical CPU 101 estimated to be in an idle state. (Step S606).
  • the physical CPU 101 that executes the hypervisor 110 searches for the occupied physical CPU 101 that is estimated to be in the idle state, and selects the physical CPU 101 to be allocated to the common process from the searched occupied physical CPUs 101. Details of the search process will be described with reference to FIG.
  • the physical CPU 101 that executes the hypervisor 110 determines whether or not the occupied physical CPU 101 estimated to be in the idle state is selected as the physical CPU 101 to be assigned to the common process after the search process is completed (step S607).
  • the physical CPU 101 that executes the hypervisor 110 proceeds to step S608.
  • the physical CPU 101 that executes the hypervisor 110 ends the process.
  • step S605 or step S607 determines whether the shared physical CPU 101 exists (step S608).
  • the physical CPU 101 that executes the hypervisor 110 refers to the CPU configuration information 115 and determines whether there is an entry for which “shared” is set in the scheduling mode 302. When it is determined that there is an entry for which “shared” is set in the scheduling mode 302, the physical CPU 101 that executes the hypervisor 110 determines that the shared physical CPU 101 exists.
  • the physical CPU 101 that executes the hypervisor 110 selects the shared physical CPU 101 as the physical CPU 101 to be assigned to the common process (step S609), and ends the process.
  • the physical CPU 101 that executes the hypervisor 110 selects the occupied physical CPU 101 as the physical CPU 101 to be assigned to the common process (step S610), and ends the process.
  • the physical CPU 101 that executes the hypervisor 110 generates a VM-entry as necessary after the processing is completed. For example, before accepting a timer interrupt, the physical CPU 101 in the first mode generates a VM-entry.
  • the selection order of the physical CPUs 101 assigned to the common processing is that the idle physical CPU 101 whose power management instruction execution 303 is “invalid”, the power management instruction execution 303 is “valid”, and idle
  • the physical CPU 101 is estimated to be in a state, and the physical CPU 101 is in a busy state.
  • FIG. 7 is a flowchart for explaining search processing according to the first embodiment.
  • the physical CPU 101 that executes the hypervisor 110 identifies the occupied physical CPU 101 whose power management instruction execution 303 is “valid” (step S701).
  • the physical CPU 101 that executes the hypervisor 110 extracts an entry in which “occupancy” is set in the scheduling mode 302 of the CPU configuration information 115 and “valid” is set in the power management instruction execution 303.
  • the physical CPU 101 that executes the hypervisor 110 selects the target physical CPU 101 from the identified physical CPUs 101 (step S702). Furthermore, the physical CPU 101 that executes the hypervisor 110 determines whether or not the current state of the target physical CPU 101 is an idle state (step S703).
  • the physical CPU 101 that executes the hypervisor 110 refers to the CPU statistical information 204 and searches for an entry corresponding to the target physical CPU 101.
  • the physical CPU 101 that executes the hypervisor 110 determines whether or not the state 402 of the searched entry is “idle”. When the state 402 of the retrieved entry is “idle”, the physical CPU 101 that executes the hypervisor 110 determines that the current state of the target physical CPU 101 is the idle state. That is, the physical CPU 101 becomes the physical CPU 101 that is estimated to be in an idle state when the common process occurs.
  • the physical CPU 101 that executes the hypervisor 110 calculates the duration of the idle state (step S704). Specifically, the following processing is executed.
  • the physical CPU 101 that executes the hypervisor 110 acquires the time from the state transition time 403 and the average duration 404 of the entry searched in step S703. Further, the physical CPU 101 that executes the hypervisor 110 acquires the time when the common processing has occurred as the current time. The physical CPU 101 executing the hypervisor 110 calculates the duration of the idle state by substituting each acquired time into the following equation (1).
  • the physical CPU 101 that executes the hypervisor 110 acquires the value of the hit rate 407 of the entry searched in step S703.
  • the physical CPU 101 that executes the hypervisor 110 temporarily creates a list on the memory 102, and associates the identification number of the target physical CPU 101, the value of the hit rate 407, and the calculated duration of the idle state. Is registered in the list.
  • the generated list is deleted by the physical CPU 101 that executes the hypervisor 110 after the search process is completed. The above is the description of the processing in step S704.
  • step S705 the physical CPU 101 executing the hypervisor 110 determines whether or not the processing has been completed for all the physical CPUs 101 specified in step S701 (step S705).
  • step S701 When it is determined that the processing has not been completed for all the physical CPUs 101 identified in step S701, the physical CPU 101 that executes the hypervisor 110 returns to step S702 and executes the same processing.
  • step S701 If it is determined in step S701 that the processing has been completed for all the physical CPUs 101 identified, the physical CPU 101 that executes the hypervisor 110 determines whether there is at least one physical CPU 101 that is estimated to be in an idle state. (Step S706).
  • the physical CPU 101 that executes the hypervisor 110 determines whether a list exists on the memory 102. When the list exists on the memory 102, the physical CPU 101 that executes the hypervisor 110 determines that at least one physical CPU 101 estimated to be in an idle state exists.
  • the physical CPU 101 that executes the hypervisor 110 ends the process.
  • the physical CPU 101 that executes the hypervisor 110 determines whether there are two or more physical CPUs 101 that have the longest idle state duration. (Step S707).
  • the physical CPU 101 that executes the hypervisor 110 selects the physical CPU 101 with the longest duration in the idle state as the physical CPU 101 to be assigned to the common process (step S708). Thereafter, the physical CPU 101 that executes the hypervisor 110 ends the process. This is because the physical CPU 101 having a long duration in the idle state is highly likely to be in the idle state even when common processing occurs.
  • the physical CPU 101 executing the hypervisor 110 refers to the list, and selects the physical CPU 101 having the longest duration in the idle state from the physical CPUs 101 having the longest duration in the idle state.
  • the physical CPU 101 having the highest middle rate is selected as the physical CPU 101 to be assigned to the common process (step S709). Thereafter, the physical CPU 101 that executes the hypervisor 110 ends the process.
  • the hit rate is an index indicating the past allocation result of common processing. Therefore, when the hit rate is high, it indicates that there is a high possibility of being in an idle state.
  • FIG. 8 is a flowchart for explaining processing when common processing is allocated to the occupied physical CPU 101 that is estimated to be in the idle state according to the first embodiment.
  • the physical CPU 101 to which the common process is assigned updates the CPU statistical information 204 (step S801). Specifically, the following processing is executed.
  • the physical CPU 101 to which the common process is assigned refers to the CPU statistical information 204 and searches for an entry corresponding to itself.
  • the physical CPU 101 to which the common process is assigned adds “1” to the value of the assigned entry count 405 of the searched entry.
  • the physical CPU 101 to which the common process is assigned determines whether or not the state when the common process is assigned is an idle state.
  • the physical CPU 101 to which the common process is assigned that is, the physical CPU 101 that executes the hypervisor 110, can check the state of the physical CPU 101 itself when the common process is assigned.
  • the state of the physical CPU 101 when the common process is assigned is “idle”
  • the physical CPU 101 that executes the common process adds “1” to the value of the hit count 406 of the retrieved entries.
  • the physical CPU 101 to which the common process is assigned calculates the hit rate by dividing the assigned number 405 value by the hit number 406 value.
  • the physical CPU 101 to which the common process is assigned sets the hit ratio calculated to the hit ratio 407 of the searched entry. The above is the description of the process in step S801.
  • the physical CPU 101 to which the common process is assigned executes the common process (step S802). Thereafter, the physical CPU 101 to which the common process is assigned ends the process.
  • the hypervisor 110 occupies a common process even when the guest OS 130 cannot directly grasp the state of the physical CPU 101 by directly executing the power management instruction to the physical CPU 101.
  • the physical CPU 101 can be selected. As a result, it is possible to avoid degradation of processing of the LPAR 120 and to effectively use computer resources.
  • this invention is not limited to the above-mentioned Example, Various modifications are included. Further, for example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those provided with all the described configurations. Further, a part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
  • each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • the present invention can also be realized by software program codes that implement the functions of the embodiments.
  • a storage medium in which the program code is recorded is provided to the computer, and a CPU included in the computer reads the program code stored in the storage medium.
  • the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention.
  • Examples of storage media for supplying such program codes include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, A non-volatile memory card, ROM, or the like is used.
  • program code for realizing the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembler, C / C ++, Perl, Shell, PHP, Java, and the like.
  • the program code is stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R.
  • the CPU included in the computer may read and execute the program code stored in the storage unit or the storage medium.
  • control lines and information lines indicate those that are considered necessary for the explanation, and do not necessarily indicate all the control lines and information lines on the product. All the components may be connected to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

計算機リソースとして、物理プロセッサ及び物理メモリを備える計算機であって、物理メモリは、論理区画に論理的に分割された計算機リソースを割当てる仮想化管理部を実現するプログラムを格納し、仮想化管理部は、計算機リソースの割当を管理するリソース管理部と、物理プロセッサに対する処理の割当を管理するスケジューリング処理部とを有し、論理区画が有する論理プロセッサが物理プロセッサを占有するように、物理プロセッサの割当を管理し、オペレーティングシステムが電力管理命令を直接物理プロセッサに対して実行できるように管理し、スケジューリング処理部は、物理プロセッサの状態を監視し、共通処理が発生した場合、監視の結果に基づいて、アイドル状態と推定される物理プロセッサを特定し、アイドル状態と推定された物理プロセッサの中から共通処理に割り当てる物理プロセッサを選択する。

Description

計算機及び処理のスケジューリング方法
 本発明は、複数のLPARを含む計算機における共通処理のスケジューリング方法に関する。
 近年、分散処理に伴い増大したサーバの運用管理コストの削減が求められている。また、複数のサーバは各サーバにおいて発生する一時的なイベントに対応することを目的として大量の計算機リソースを有しており、必ずしも十分に計算機リソースが活用されていないという問題もある。
 前述した課題を解決するために、複数のサーバを高性能のサーバに統合するサーバ仮想化が行われている。サーバ仮想化では、高性能なサーバの計算機リソースを分割することによって論理的なパーティション(LPAR:Logical Partitioning)単位に当該サーバを分割し、LPARを一つのサーバとして稼働させる。LPARは「仮想計算機」とも呼ばれ、LPAR上で動作するOS(Operating System)は「ゲストOS」と呼ばれる。ゲストOSは物理サーバ上で動作するOSと機能的に同一のものである。
 サーバ仮想化の実現方法には、「物理分割」及び「論理分割」がある。物理分割は、一つのLPARにハードウェア単位で計算機リソースを割当てる方法である。論理分割は、複数のLPARが同時に一つのハードウェアを共有するように計算機リソースを割当てる方法である。
 また、サーバ仮想化を制御する方式は、LPARの動作環境によって、ハイパバイザ型及びホストOS型に分類される。ハイパバイザ型は、ベアマシン上に存在する特殊な管理プログラムであるハイパバイザ上で複数のLPARを稼働させる方式である。ホストOS型は、ホストOSに対応するOSがLPARを管理する管理プログラムを一つのアプリケーションとして実行し、アプリケーション上で複数のLPARを稼働させる方式である。前述したいずれの方式も、VMM(Virtual Machine Monitor)と呼ばれる制御機能によって実現される。
 VMMは、命令エミュレーション、メモリ管理、I/O制御、及びスケジューリング等の各種処理を制御する。また、VMMが制御する処理の中には、全てのLPARから必要とされる共通処理が存在する。共通処理は、各LPARが計算機リソースを共有しているために必要となる処理である。
 一般的に、共通処理は、各LPARの処理よりも優先して実行する必要があるため、当該共通処理に対して優先的にCPUが割当てられる。共通処理にCPUが割当てられておらず、かつ、全てのCPUがLPARに割当てられている場合、LPARに割当てられているCPUが一時的に共通処理に割当てられる。
 この場合、LPARに割当てられるCPUリソースが共通処理によって独占されてしまうため、LPARの処理が続行できないという問題がある。すなわち、共通処理の実行によって、LPARの処理にCPUリソースが配分されない問題が存在する。
 CPUに対する処理の割当方式としては、処理の公平性を保証するスケジューリングアルゴリズムであるタイムシェアリング方式がある。タイムシェアリング方式を用いることによって、処理の遅延等を発生させることなく、全ての処理に対してCPUを割当てることが可能となる。しかし、タイムシェアリング方式では、割当てられたCPUが、ビジー状態のLPARの処理を実行するCPUであるか、又は、アイドル状態のLPARのCPUであるかは考慮できない。
 一方、前述した課題を解決する方法として、「ジョブクラス」を定義する方法がある。「ジョブクラス」を定義することによって、優先度に応じてリソース配分を変動させ、特定の処理の遅延を回避することができる。より具体的には、システムに複数の階層的な優先度が予め定義され、アプリケーション等がプロセス実行時に当該階層を指定することによって処理が実行される。これによって、優先度を考慮したCPUリソースの配分が可能となる。
 しかし、「ジョブクラス」を用いた制御方法は、一つの計算機(OS)内の閉じたシステムでは有効であるが、LPAR及びハイパバイザを備えるシステムへの適応は困難である。なぜならば、ハイパバイザはLPARの処理の優先度を静的に同一のものとして管理し、また、LPARの内部的な状態はビジー状態からアイドル状態、又は、アイドル状態からビジー状態に動的に遷移するためである。
 一方、前述した課題を解決する方法として、特許文献1には、アイドル状態のCPUリソースを有効活用する方法が記載されている。具体的には、引用文献1には、「複数の物理CPUと、複数の物理CPUのいずれかが割り当てられ、それぞれゲストOS上でプログラムを実行する複数のLPARと、複数のLPARを管理する管理プログラムとを有する計算機システムにおいて、LPAR上のゲストOSの状態を把握することができるゲストOS監視部と、LPARの処理よりも優先度が高い管理プログラムによる共有処理を、いずれかの物理CPUに割り当てるディスパッチ処理部とを有する。共有処理が発生した場合、ゲストOS監視部による監視に基づいて、ディスパッチ処理部は、アイドル状態のLPARを処理している物理CPUに対して共有処理を優先的にディスパッチする」が記載されている。
 特許文献1に記載の方法は、ハイパバイザがLPARに割当てられるCPUの状態を検知できることが前提となっている。ハイパバイザがLPARに占有的に割当てられるCPUがアイドル状態であることを検知する方法として、ハイパバイザがHALT及びMWAIT等の電力管理命令をトラップする方法がある。ハイパバイザは、ゲストOSから発行された電力管理命令をトラップした場合、ゲストOSに対して論理CPUが当該命令にしたがって状態が遷移したようにエミュレーションを行う。したがって、引用文献1に記載の方法を用いれば、ハイパバイザは、アイドル状態のCPUに対して共通処理に割当てることができる。
特開2008-186136号公報
 一般的に、ハイパバイザが、電力管理命令等のLPARから発行される命令をトラップし、エミュレーションを行う制御方法の場合、LPARの処理の性能が劣化するという問題がある。そのため、ハイパバイザは、LPARが割当てられたCPUに対して、直接、電力管理命令を実行できるように制御することによってLPARの処理の性能向上が可能となる。
 前述したような制御を行うシステムの場合、ハイパバイザは、電力管理命令をトラップしないため、LPARに割当てられるCPUがアイドル状態であるか否かを把握できない。したがって、特許文献1に記載の方法を適用することができない。すなわち、ハイパバイザの共通処理をアイドル状態のCPUに割当てることができない。
 本発明の目的は、ハイパバイザがLPARに占有的に割当てたCPUのアイドル状態を検知することができない場合でも、ハイパバイザが、共通処理に対して高い確率でアイドル状態のCPUを割当てることにある。
 本願において開示される発明の代表的な一例を示せば以下の通りである。すなわち、計算機リソースとして、複数の物理プロセッサ、及び前記複数の物理プロセッサの各々に接続される物理メモリを備える計算機であって、前記物理メモリは、複数の論理区画の各々に論理的に分割された前記計算機リソースを割当てる仮想化管理部を実現するプログラムを格納し、前記複数の論理区画の各々では、複数の論理プロセッサ及び論理メモリを管理するオペレーティングシステムが稼働し、前記仮想化管理部は、前記複数の論理区画に対する前記計算機リソースの割当を管理するリソース管理部と、前記論理プロセッサに対応づけられた前記物理プロセッサに対する処理の割当を管理するスケジューリング処理部と、を有し、前記複数の論理区画の各々が有する前記複数の論理プロセッサが前記複数の物理プロセッサを占有するように、前記複数の物理プロセッサの割当を管理し、前記オペレーティングシステムが前記物理プロセッサの電力を制御する電力管理命令を直接前記物理プロセッサに対して実行できるように管理し、前記スケジューリング処理部は、前記複数の物理プロセッサの状態を監視し、前記仮想化管理部が前記計算機全体の制御を行う共通処理が発生した場合、前記監視の結果に基づいて、アイドル状態と推定される物理プロセッサを特定し、前記アイドル状態と推定された物理プロセッサの中から、前記共通処理に割当てる前記物理プロセッサを選択することを特徴とする。
 本発明によれば、仮想化管理部(ハイパバイザ等のVMM)が物理プロセッサの状態を把握できない場合でも、論理区画の処理性能が劣化しないよう物理プロセッサに共通処理を割当てることができる。前述した以外の課題、構成及び効果は、以下の実施例の説明によって明らかにされる。
実施例1の計算機システムの構成例を示す説明図である。 実施例1のスケジューリング処理部の構成例を示す説明図である。 実施例1のCPU構成情報の構成例を示す説明図である。 実施例1のCPU統計情報の構成例を示す説明図である。 実施例1の物理CPUがタイマ割込を受け付けた場合に実行する処理を説明するフローチャートである。 実施例1の物理CPUが共通処理の発生時に実行する処理を説明するフローチャートである。 実施例1の検索処理を説明するフローチャートである。 実施例1のアイドル状態と推定される占有物理CPUに共通処理が割当てられた場合の処理を説明するフローチャートである。 特許文献1に記載の物理CPUに対する共通処理の割当方法の一例を示す説明図である。 LPARが物理CPUに直接電力管理命令を実行できる場合における物理CPUに対する共通処理の割当方法の一例を示す説明図である。
 本発明の実施例を図面に基づいて説明する。
 図1は、実施例1の計算機システムの構成例を示す説明図である。
 実施例1の計算機システムは、計算機100及び外部ストレージ装置150から構成される。計算機100は、外部ストレージ装置150と直接、又は、ネットワークを介して接続される。ネットワークとしては、FC(Fibre Channel)で構成されたSAN等が考えられる。なお、計算機100は、装置内部にストレージ装置を備えていてもよい。
 計算機100は、複数の物理CPU101、メモリ102、NIC103、及びHBA104を備える。
 物理CPU101は、メモリ102に格納されるプログラムを実行する。図1に示す計算機100は物理CPU1(101-1)、物理CPU2(101-2)、物理CPU3(101-3)、及び物理CPU4(101-4)の四つの物理CPU101を備える。物理CPU101がプログラムを実行することによって、ハイパバイザ110、ゲストOS130等の機能が実現される。以下、プログラムを主体に処理を説明する場合、当該プログラムが物理CPU101によって実行されていることを示す。
 本実施例の物理CPU101は、仮想化支援機構を備える。仮想化支援機構を備える物理CPU101には、LPAR120の処理を実行する第1のモードと、ハイパバイザ110の処理を実行する第2のモードを有する。第2のモードから第1のモードへの遷移を「VM-entry」と呼ぶ、また、第1のモードから第2のモードへの遷移を「VM-exit」と呼ぶ。
 メモリ102は、物理CPU101が実行するプログラム及び当該プログラムの実行に必要な情報を格納する。また、メモリ102は、各プログラムのワークエリアを含む。
 NIC103は、ネットワークを介して他の装置と接続するインタフェースである。HBA104は、外部ストレージ装置150と接続するインタフェースである。図1に示す例では、計算機100が備えるNIC103及びHBA104の数は一つであるが、複数であってもよい。また、計算機100は、NIC103及びHBA104以外のI/Oデバイスを備えてもよい。
 外部ストレージ装置150は、ゲストOS130のプログラム、ゲストOS130上で動作するアプリケーションのプログラム、及びデータを格納する。外部ストレージ装置150は、複数の記憶媒体151を備える。記憶媒体151は、例えば、HDD(Hard Disk Drive)、及びSSD(Solid State Drive)等が考えられる。
 なお、計算機100は、複数の記憶媒体151及びコントローラを備えるストレージシステムと接続されてもよい。
 計算機100のメモリ102には、ハイパバイザ110を実現するプログラムが格納される。計算機100が備えるいずれかの物理CPU101が、ハイパバイザ110を実現するプログラムを実行する。
 ハイパバイザ110は、計算機100が有する計算機リソースを論理的に分割して、一つ以上のLPAR120に分割された計算機リソースを割当てる。LPAR120は、一つ以上の論理CPU121、一つ以上の論理メモリ122、及び一つ以上の論理NIC123等から構成される。また、LPAR120上ではゲストOS130が稼働する。
 図1に示すハイパバイザ110は、二つのLPAR1(120-1)、LPAR2(120-2)を生成する。LPAR1(120-1)は、論理CPU1(121-1)、論理CPU2(121-2)、論理メモリ1(122-1)、及び論理NIC1(123-1)を含み、LPAR2(120-2)は、論理CPU3(121-3)、論理CPU4(121-4)、論理メモリ2(122-2)、及び論理NIC2(123-2)を含む。また、LPAR1(120-1)上ではゲストOS1(130-1)が動作し、また、LPAR2(120-2)上ではゲストOS2(130-2)が動作する。
 ハイパバイザ110は、エミュレーション部111、スケジューリング処理部112、I/O処理部113、及びリソース管理部114を含む。
 エミュレーション部111は、ゲストOS130から論理デバイスに対して発行された命令を、物理デバイスが実行可能な命令へと変換する。なお、本実施例では、ハイパバイザ110は、LPAR120の設定に応じて、物理CPU101が占有的に割当てられるLPAR120上で動作するゲストOS130から発行される電力管理命令のエミュレーションを行わないように制御できる。この場合、ゲストOS130は、直接、物理CPU101に対して電力管理命令を実行できる。
 スケジューリング処理部112は、任意の処理(例えば、タスク)に対して物理CPU101を割当てるスケジューリング処理を制御する。処理には、LPAR120の論理CPU121に物理CPU101を割当てる処理、及びハイパバイザ110の共通処理が含まれる。なお、ハイパバイザ110の共通処理には、複数のLPAR120によって共有されるI/Oデバイスの制御処理等が含まれる。
 I/O処理部113は、I/Oデバイスに対するI/Oを制御する。リソース管理部114は、LPAR120に対する計算機100が備える計算機リソースの割当、及び計算機リソースの状態を管理する。本実施例では、リソース管理部114は、CPU構成情報115を保持する。CPU構成情報115は、LPAR120に対する物理CPU101の割当に関する定義情報である。CPU構成情報115の詳細については図3を用いて後述する。なお、リソース管理部114は、図示しない、LPAR120に対するメモリ102、NIC103、及びHBA104の割当に関する定義情報も保持する。
 ここで、従来の、物理CPU101に対する共通処理の割当方法について説明する。図9は、特許文献1に記載の物理CPU101に対する共通処理の割当方法の一例を示す説明図である。図10は、LPAR120が物理CPU101に直接電力管理命令を実行できる場合における物理CPU101に対する共通処理の割当方法の一例を示す説明図である。
 以下の説明では、物理CPU1(101-1)がLPAR1(120-1)に割当てられ、物理CPU2(101-2)がLPAR2(120-2)に割当てられているものとする。
 まず、図9について説明する。ハイパバイザは、LPAR1(120-1)の論理CPU121に割当てられる物理CPU1(101-1)がビジー状態であり、また、LPAR2(120-2)の論理CPU121に割当てられる物理CPU2(101-2)がアイドル状態であることを把握している。
 共通処理が発生した場合、ハイパバイザは、アイドル状態の物理CPU2(101-2)に共通処理を割当てる。LPAR1(120-1)の論理CPU121に割当てられる物理CPU1(101-1)がアイドル状態に遷移するまでの間、共通処理に対して物理CPU2(101-2)が割当てられる。
 ハイパバイザは、LPAR1(120-1)の論理CPU121に割当てられる物理CPU1(101-1)がアイドル状態に遷移したことを検知した場合、各物理CPU101における共通処理の実行回数を平準化するために、物理CPU1(101-1)に共通処理を割当てる。
 前述したように、特許文献1に記載の方法では、共通処理の実行回数が均等になるように、アイドル状態の物理CPU101に共通処理が割当てられる。
 次に、図10について説明する。図10では、ハイパバイザが電力管理命令をエミュレーションしないものとする。すなわち、ゲストOS130が直接物理CPU101に対して電力管理命令を実行するものとする。この場合、ハイパバイザは、物理CPU101がビジー状態であると認識するため、実際の物理CPU101の状態を把握できない。なお、LPAR1(120-1)の論理CPU121に割当てられた物理CPU1(101-1)がビジー状態であり、また、LPAR2(120-2)の論理CPU121に割当てられた物理CPU2(101-2)がアイドル状態であるものとする。
 共通処理が発生した場合、ハイパバイザは、各物理CPU101における共通処理の実行回数が平準化されるように、共通処理に対して物理CPU101を割当てる。本実施例では、ハイパバイザは、1サイクル毎に、共通処理に対して物理CPU1(101-1)及び物理CPU2(101-2)を交互に割当てる。
 この場合、ビジー状態の物理CPU1(101-1)が共通処理を実行するため、LPAR1(120-1)の処理の性能劣化が発生する。本来、ハイパバイザは、アイドル状態の物理CPU2(101-2)に共通処理に割当てる方が好ましい。
 図2は、実施例1のスケジューリング処理部112の構成例を示す説明図である。
 スケジューリング処理部112は、OS状態監視部201、ディスパッチ処理部202、及びCPU統計情報管理部203を含む。
 OS状態監視部201は、周期的に、計算機100が備える各物理CPU101に対するタイマ割込を生成する。ディスパッチ処理部202は、共通処理、又はLPAR120の処理に対して物理CPU101を割当てる。CPU統計情報管理部203は、物理CPU101の状態等を格納するCPU統計情報204を管理する。CPU統計情報204の詳細については図6を用いて後述する。
 物理CPU101は、タイマ割込を受け付けた場合、物理CPU101自身の状態を確認する。物理CPU101がアイドル状態の場合、物理CPU101は、前回のタイマ割込の受け付け時から今回のタイマ割込の受け付け時までの間、当該物理CPU101がアイドル状態であると判定する。一方、物理CPU101がビジー状態の場合、物理CPU101は、前回のタイマ割込の受け付け時から今回のタイマ割込の受け付け時までの間、当該物理CPU101がビジー状態であると判定する。また、物理CPU101は、アイドル状態の継続時間の移動平均を算出する。
 物理CPU101は、CPU統計情報204を参照し、当該物理CPU101に対応するエントリに前述した処理の結果を格納する。
 図3は、実施例1のCPU構成情報115の構成例を示す説明図である。
 CPU構成情報115は、LPAR120に対する各物理CPU101の割当方法等を示す情報を格納する。具体的には、CPU構成情報115は、CPU番号301、スケジューリングモード302、及び電力管理命令実行303を含む。
 CPU番号301は、計算機100が備える複数の物理CPU101を一意に識別するための識別番号である。
 スケジューリングモード302は、LPAR120に対する物理CPU101の割当方法を示す情報である。本実施例のスケジューリングモード302には「占有」又は「共有」のいずれかが格納される。スケジューリングモード302が「占有」の場合、当該物理CPU101が一つの論理CPU121に対してのみ割当てられていることを示す。すなわち、一つのLPAR120が占有的に物理CPU101を使用する。スケジューリングモード302が「共有」の場合、当該物理CPU101は、複数の論理CPU121に対して割当てられていることを示す。すなわち、複数のLPAR120が共有して物理CPU101を使用する。
 以下の説明では、スケジューリングモード302が「占有」である物理CPU101を占有物理CPU101とも記載する。また、スケジューリングモード302が「共有」である物理CPU101を共有物理CPU101とも記載する。
 電力管理命令実行303は、LPAR120上で動作するゲストOS130が発行する電力管理命令を物理CPU101に直接実行させる否かを示す情報である。本実施例の電力管理命令実行303には「有効」又は「無効」のいずれかが格納される。電力管理命令実行303が「有効」の場合、物理CPU101に直接電力管理命令を実行させることを示す。電力管理命令実行303が「無効」の場合、物理CPU101に直接電力管理命令を実行させないことを示す。電力管理命令実行303が「無効」の場合、ハイパバイザ110が電力管理命令をトラップし、エミュレーションを行う。
 ハイパバイザ110は、CPU構成情報115に基づいて物理CPU101の割当、及び電力管理命令の実行方式を管理する。例えば、ハイパバイザ110は、図3のCPU構成情報115の一番上のエントリに基づいて、任意の論理CPU121が物理CPU1(101-1)を占有するように当該物理CPU101の割当を管理し、また、任意の論理CPU121が電力管理命令を直接物理CPU1(101-1)に対して実行できるように管理する。
 図4は、実施例1のCPU統計情報204の構成例を示す説明図である。
 CPU統計情報204は、計算機100が備える各物理CPU101の現在の状態、及び状態遷移等を管理する情報である。具体的には、CPU統計情報204は、CPU番号401、状態402、状態遷移時間403、平均持続時間404、割当回数405、的中回数406、及び的中率407を含む。なお、CPU番号401は、CPU番号301と同一のものである。
 状態402は、物理CPU101の現在の状態を示す。状態402には「ビジー」又は「アイドル」のいずれかが格納される。状態402が「ビジー」の場合、物理CPU101はビジー状態であることを示す。状態402が「アイドル」の場合、物理CPU101はアイドル状態であることを示す。
 状態遷移時間403は、状態402に設定された状態に遷移した時刻である。本実施例では、物理CPU101が、前回のタイマ割込の受け付け時の状態から今回のタイマ割込の受け付け時の状態が変化している場合に、今回のタイマ割込を受け付けた時刻を状態遷移時間403に設定する。平均持続時間404は、アイドル状態の継続時間の移動平均である。
 割当回数405は、物理CPU101に共通処理が割当てられた回数、すなわち、物理CPU101が共通処理を実行した回数である。的中回数406は、物理CPU101が、共通処理の割当て時にアイドル状態であった回数である。的中率407は、共通処理を割当てた物理CPU101が実際にアイドル状態であった確率である。なお、的中率407は、割当回数405の値を的中回数406の値で除算することによって算出される。
 図5は、実施例1の物理CPU101がタイマ割込を受け付けた場合に実行する処理を説明するフローチャートである。
 少なくとも一つの物理CPU101が実行するスケジューリング処理部112(ハイパバイザ110)のOS状態監視部201が、周期的にタイマ割込を生成し、計算機100が有する全ての物理CPU101にタイマ割込を出力する。このとき、ハイパバイザ110を実行する物理CPU101に対してもタイマ割込が出力される。タイマ割込を生成する周期は、LPAR120の処理に影響を与えないように設定されているものとする。
 なお、タイマ割込を生成するハイパバイザ110を実行する物理CPU101は、予め設定されてもよいし、また、図7に示す処理と同様の処理に基づいて決定されてもよい。
 物理CPU101は、タイマ割込を受け付けた場合(ステップS501)、ゲストOS130の処理からハイパバイザ110の処理へ切り替える。すなわち、物理CPU101は、VM-exitを発生させる。なお、ハイパバイザ110を実行する物理CPU101についてはVM-exitを発生させる必要はない。
 ハイパバイザ110を実行する物理CPU101は、CPU構成情報115を参照して、電力管理命令実行303が「有効」であるか否かを判定する(ステップS502)。
 ハイパバイザ110を実行する物理CPU101は、CPU構成情報115を参照して、CPU番号301が自身の識別番号と一致するエントリを検索する。ハイパバイザ110を実行する物理CPU101は、検索されたエントリの電力管理命令実行303が「有効」であるか否かを判定する。
 電力管理命令実行303が「有効」ではないと判定された場合、ハイパバイザ110を実行する物理CPU101は処理を終了する。
 電力管理命令実行303が「有効」であると判定された場合、ハイパバイザ110を実行する物理CPU101は、当該物理CPU101の状態が前回のタイマ割込の受け付け時の物理CPU101の状態から変化しているか否かを判定する(ステップS503)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、現在の物理CPU101の状態が「アイドル」又は「ビジー」のいずれであるか否かを判定する。さらに、ハイパバイザ110を実行する物理CPU101は、ステップS502において検索されたエントリの状態402を参照し、現在の物理CPU101の状態と前回のタイマ割込の受け付け時の物理CPU101の状態とを比較する。例えば、現在の物理CPU101の状態が「アイドル」であり、状態402に「ビジー」が設定されている場合、ハイパバイザ110を実行する物理CPU101は、物理CPU101の状態が変化していると判定する。
 物理CPU101の状態が変化していないと判定された場合、ハイパバイザ110を実行する物理CPU101は処理を終了する。
 物理CPU101の状態が変化していると判定された場合、ハイパバイザ110を実行する物理CPU101は、CPU統計情報204を更新する(ステップS504)。その後、ハイパバイザ110を実行する物理CPU101は処理を終了する。
 具体的には、ハイパバイザ110を実行する物理CPU101は、ステップS502において検索されたエントリの状態402に現在の物理CPU101の状態を設定し、また、状態遷移時間403に今回のタイマ割込を受け付けた時刻を設定する。ハイパバイザ110を実行する物理CPU101は、前回のタイマ割込の受け付け時から今回のタイマ割込の受け付け時までの間の時間間隔を、現在の物理CPU101の状態の継続時間として扱うことによって、アイドル状態の継続時間の移動平均を算出する。ハイパバイザ110を実行する物理CPU101は、ステップS502において検索されたエントリの平均持続時間404に算出された移動平均を設定する。
 なお、ハイパバイザ110を実行する物理CPU101は、処理の終了後、必要に応じてVM-entryを発生させる。例えば、タイマ割込を受け付ける前、第1のモードであった物理CPU101は、VM-entryを発生させる。
 図6は、実施例1の物理CPU101が共通処理の発生時に実行する処理を説明するフローチャートである。
 ゲストOS130から共通処理の実行が必要な命令が発行された場合、少なくともいずれかの物理CPU101がVM-exitを発生させることによって、ハイパバイザ110の処理を開始する。例えば、命令を発行したゲストOS130が動作するLPAR120に割当てられた物理CPU101が、ハイパバイザ110の処理を実行させる物理CPU101となる。また、予め、以下で説明する処理を実行する物理CPU101を設定してもよい。
 ハイパバイザ110を実行する物理CPU101は、アイドル状態の共有物理CPU101が存在するか否かを判定する(ステップS601)。具体的には、以下のような処理が実行される。
 ハイパバイザ110を実行する物理CPU101は、CPU構成情報115のスケジューリングモード302に「共有」が設定され、かつ、電力管理命令実行303に「無効」が設定されたエントリを検索する。ハイパバイザ110を実行する物理CPU101は、検索されたエントリのCPU番号301から物理CPU101の識別番号を取得する。
 ハイパバイザ110を実行する物理CPU101は、CPU統計情報204を参照して、CPU番号401が取得された物理CPU101の識別番号と一致するエントリを検索する。ハイパバイザ110を実行する物理CPU101は、検索されたエントリの中に、状態402に「アイドル」が設定されたエントリが存在するか否かを判定する。
 状態402に「アイドル」が設定されたエントリが存在する場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の共有物理CPU101が存在すると判定する。以上がステップS601の処理の説明である。
 アイドル状態の共有物理CPU101が存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の共有物理CPU101を共通処理に割当てる物理CPU101として選択し(ステップS602)、処理を終了する。
 アイドル状態の共有物理CPU101が存在しないと判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の占有物理CPU101が存在するか否かを判定する(ステップS603)。
 具体的には、ハイパバイザ110を実行する物理CPU101が、CPU構成情報115のスケジューリングモード302に「占有」が設定され、かつ、電力管理命令実行303に「無効」が設定されたエントリを検索する。その他の処理は、ステップS601の処理と同一である。
 アイドル状態の占有物理CPU101が存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の占有物理CPU101を共通処理に割当てる物理CPU101として選択し(ステップS604)、処理を終了する。
 アイドル状態の占有物理CPU101が存在しないと判定された場合、ハイパバイザ110を実行する物理CPU101は、電力管理命令実行303が「有効」である占有物理CPU101が存在するか否かを判定する(ステップS605)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、CPU構成情報115のスケジューリングモード302に「占有」が設定され、かつ、電力管理命令実行303に「有効」が設定されたエントリが存在するか否かを判定する。前述した条件を満たすエントリが存在する場合、ハイパバイザ110を実行する物理CPU101は、電力管理命令実行303が「有効」である占有物理CPU101が存在すると判定する。
 電力管理命令実行303が「有効」である占有物理CPU101が存在しないと判定された場合、ハイパバイザ110を実行する物理CPU101は、ステップS608に進む。
 電力管理命令実行303が「有効」である占有物理CPU101が存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態と推定される占有物理CPU101を検索するための検索処理を実行する(ステップS606)。検索処理では、ハイパバイザ110を実行する物理CPU101が、アイドル状態と推定される占有物理CPU101を検索し、検索された占有物理CPU101の中から共通処理に割当てる物理CPU101を選択する。なお、検索処理の詳細については図9を用いて説明する。
 ハイパバイザ110を実行する物理CPU101は、検索処理の終了後、共通処理に割当てる物理CPU101として、アイドル状態と推定される占有物理CPU101が選択されたか否かを判定する(ステップS607)。
 共通処理に割当てる物理CPU101として、アイドル状態と推定される占有物理CPU101が選択されていない場合、ハイパバイザ110を実行する物理CPU101は、ステップS608に進む。
 共通処理に割当てる物理CPU101として、アイドル状態と推定される占有物理CPU101が選択された場合、ハイパバイザ110を実行する物理CPU101は、処理を終了する。
 ステップS605又はステップS607の判定結果がNoの場合、ハイパバイザ110を実行する物理CPU101は、共有物理CPU101が存在するか否かを判定する(ステップS608)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、CPU構成情報115を参照し、スケジューリングモード302に「共有」が設定されたエントリが存在するか否かを判定する。スケジューリングモード302に「共有」が設定されたエントリが存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、共有物理CPU101が存在すると判定する。
 共有物理CPU101が存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、共有物理CPU101を共通処理に割当てる物理CPU101として選択し(ステップS609)、処理を終了する。
 共有物理CPU101が存在しないと判定された場合、ハイパバイザ110を実行する物理CPU101は、占有物理CPU101を共通処理に割当てる物理CPU101として選択し(ステップS610)、処理を終了する。
 なお、ハイパバイザ110を実行する物理CPU101は、処理の終了後、必要に応じてVM-entryを発生させる。例えば、タイマ割込を受け付ける前、第1のモードであった物理CPU101は、VM-entryを発生させる。
 図6に示すように、共通処理に割当てる物理CPU101の選択順番は、電力管理命令実行303が「無効」であるアイドル状態の物理CPU101、電力管理命令実行303が「有効」であり、かつ、アイドル状態と推定される物理CPU101、及びビジー状態の物理CPU101となる。
 図7は、実施例1の検索処理を説明するフローチャートである。
 ハイパバイザ110を実行する物理CPU101は、電力管理命令実行303が「有効」である占有物理CPU101を特定する(ステップS701)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、CPU構成情報115のスケジューリングモード302に「占有」が設定され、かつ、電力管理命令実行303に「有効」が設定されたエントリを抽出する。
 ハイパバイザ110を実行する物理CPU101は、特定された物理CPU101の中から対象の物理CPU101を選択する(ステップS702)。さらに、ハイパバイザ110を実行する物理CPU101は、対象の物理CPU101の現在の状態がアイドル状態であるか否かを判定する(ステップS703)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、CPU統計情報204を参照して、対象の物理CPU101に対応するエントリを検索する。ハイパバイザ110を実行する物理CPU101は、検索されたエントリの状態402が「アイドル」であるか否かを判定する。検索されたエントリの状態402が「アイドル」である場合、ハイパバイザ110を実行する物理CPU101は、対象の物理CPU101の現在の状態がアイドル状態であると判定する。すなわち、当該物理CPU101は、共通処理の発生時にアイドル状態であると推定される物理CPU101となる。
 対象の物理CPU101の現在の状態がアイドル状態でないと判定された場合、ハイパバイザ110を実行する物理CPU101は、ステップS705に進む。
 対象の物理CPU101の現在の状態がアイドル状態であると判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の継続時間を算出する(ステップS704)。具体的には、以下のような処理が実行される。
 ハイパバイザ110を実行する物理CPU101は、ステップS703において検索されたエントリの状態遷移時間403、及び平均持続時間404から時刻を取得する。また、ハイパバイザ110を実行する物理CPU101は、共通処理の発生した時間を現在の時刻として取得する。ハイパバイザ110を実行する物理CPU101は、取得された各時刻を下式(1)に代入することによって、アイドル状態の継続時間を算出する。
Figure JPOXMLDOC01-appb-M000001
 また、ハイパバイザ110を実行する物理CPU101は、ステップS703において検索されたエントリの的中率407の値を取得する。ハイパバイザ110を実行する物理CPU101は、メモリ102上に一時的にリストを生成し、対象の物理CPU101の識別番号、的中率407の値、及び算出されたアイドル状態の継続時間を対応づけたエントリを当該リストに登録する。なお、生成されたリストは検索処理の終了後、ハイパバイザ110を実行する物理CPU101によって削除される。以上がステップS704の処理の説明である。
 ステップS705において、ハイパバイザ110を実行する物理CPU101は、ステップS701において特定された全ての物理CPU101について処理が完了したか否を判定する(ステップS705)。
 ステップS701において特定された全ての物理CPU101について処理が完了していないと判定された場合、ハイパバイザ110を実行する物理CPU101は、ステップS702に戻り、同様の処理を実行する。
 ステップS701において特定された全ての物理CPU101について処理が完了したと判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態と推定された物理CPU101が少なくとも一つ存在するか否かを判定する(ステップS706)。
 具体的には、ハイパバイザ110を実行する物理CPU101は、メモリ102上にリストが存在するか否かを判定する。メモリ102上にリストが存在する場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態と推定された物理CPU101が少なくとも一つ存在すると判定する。
 アイドル状態と推定された物理CPU101が存在しないと判定された場合、ハイパバイザ110を実行する物理CPU101は、処理を終了する。
 アイドル状態と推定された物理CPU101が少なくとも一つ存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の継続時間が最も長い物理CPU101が二つ以上存在するか否かを判定する(ステップS707)。
 アイドル状態の継続時間が最も長い物理CPU101が一つである場合、ハイパバイザ110を実行する物理CPU101は、アイドル状態の継続時間が最も長い物理CPU101を共通処理に割当てる物理CPU101として選択する(ステップS708)。その後、ハイパバイザ110を実行する物理CPU101は、処理を終了する。アイドル状態の継続時間が長い物理CPU101は、共通処理の発生時もアイドル状態である可能性が高いためである。
 アイドル状態の継続時間が最も長い物理CPU101が二つ以上存在すると判定された場合、ハイパバイザ110を実行する物理CPU101は、リストを参照し、アイドル状態の継続時間が最も長い物理CPU101の中から、的中率が最も高い物理CPU101を共通処理に割当てる物理CPU101として選択する(ステップS709)。その後、ハイパバイザ110を実行する物理CPU101は、処理を終了する。的中率は、過去の共通処理の割当実績を示す指標である。したがって、的中率が高い場合、アイドル状態である可能性が高いことを示す。
 図8は、実施例1のアイドル状態と推定される占有物理CPU101に共通処理が割当てられた場合の処理を説明するフローチャートである。
 共通処理が割当てられた物理CPU101は、CPU統計情報204を更新する(ステップS801)。具体的には、以下のような処理が実行される。
 共通処理が割当てられた物理CPU101は、CPU統計情報204を参照し、自身に対応するエントリを検索する。共通処理が割当てられた物理CPU101は、検索されたエントリの割当回数405の値を「1」加算する。
 共通処理が割当てられた物理CPU101は、共通処理が割当てられた時の状態がアイドル状態か否かを判定する。共通処理が割当てられた物理CPU101、すなわち、ハイパバイザ110を実行する物理CPU101は、共通処理が割当てられた時の当該物理CPU101自身の状態を確認できる。共通処理が割当てられた時の物理CPU101の状態が「アイドル」である場合、共通処理を実行する物理CPU101は、検索されたエントリの的中回数406の値を「1」加算する。
 共通処理が割当てられた物理CPU101は、割当回数405の値を的中回数406の値で除算することによって的中率を算出する。共通処理が割当てられた物理CPU101は、検索されたエントリの的中率407に算出された的中率を設定する。以上がステップS801の処理の説明である。
 共通処理が割当てられた物理CPU101は、共通処理を実行する(ステップS802)。その後、共通処理が割当てられた物理CPU101は、処理を終了する。
 以上で説明したように、本発明によれば、ハイパバイザ110は、ゲストOS130が直接物理CPU101に対して電力管理命令を実行することによって当該物理CPU101の状態を把握できない場合でも、共通処理を割当てる占有物理CPU101を選択できる。これによって、LPAR120の処理の劣化を回避し、かつ、計算機リソースを有効に活用することができる。
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。また、例えば、上記した実施例は本発明を分かりやすく説明するために構成を詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、各実施例の構成の一部について、他の構成に追加、削除、置換することが可能である。
 また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、本発明は、実施例の機能を実現するソフトウェアのプログラムコードによっても実現できる。この場合、プログラムコードを記録した記憶媒体をコンピュータに提供し、そのコンピュータが備えるCPUが記憶媒体に格納されたプログラムコードを読み出す。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することになり、そのプログラムコード自体、及びそれを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、CD-ROM、DVD-ROM、ハードディスク、SSD(Solid State Drive)、光ディスク、光磁気ディスク、CD-R、磁気テープ、不揮発性のメモリカード、ROMなどが用いられる。
 また、本実施例に記載の機能を実現するプログラムコードは、例えば、アセンブラ、C/C++、perl、Shell、PHP、Java等の広範囲のプログラム又はスクリプト言語で実装できる。
 さらに、実施例の機能を実現するソフトウェアのプログラムコードを、ネットワークを介して配信することによって、それをコンピュータのハードディスクやメモリ等の記憶手段又はCD-RW、CD-R等の記憶媒体に格納し、コンピュータが備えるCPUが当該記憶手段や当該記憶媒体に格納されたプログラムコードを読み出して実行するようにしてもよい。
 上述の実施例において、制御線や情報線は、説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。全ての構成が相互に接続されていてもよい。

Claims (10)

  1.  計算機リソースとして、複数の物理プロセッサ、及び前記複数の物理プロセッサの各々に接続される物理メモリを備える計算機であって、
     前記物理メモリは、複数の論理区画の各々に論理的に分割された前記計算機リソースを割当てる仮想化管理部を実現するプログラムを格納し、
     前記複数の論理区画の各々では、複数の論理プロセッサ及び論理メモリを管理するオペレーティングシステムが稼働し、
     前記仮想化管理部は、
     前記複数の論理区画に対する前記計算機リソースの割当を管理するリソース管理部と、
     前記論理プロセッサに対応づけられた前記物理プロセッサに対する処理の割当を管理するスケジューリング処理部と、を有し、
     前記複数の論理区画の各々が有する前記複数の論理プロセッサが前記複数の物理プロセッサを占有するように、前記複数の物理プロセッサの割当を管理し、
     前記オペレーティングシステムが前記物理プロセッサの電力を制御する電力管理命令を直接前記物理プロセッサに対して実行できるように管理し、
     前記スケジューリング処理部は、
     前記複数の物理プロセッサの状態を監視し、
     前記仮想化管理部が前記計算機全体の制御を行う共通処理が発生した場合、前記監視の結果に基づいて、アイドル状態と推定される物理プロセッサを特定し、
     前記アイドル状態と推定された物理プロセッサの中から、前記共通処理に割当てる前記物理プロセッサを選択することを特徴とする計算機。
  2.  請求項1に記載の計算機であって、
     前記スケジューリング処理部は、
     前記複数の物理プロセッサに対する割込を周期的に生成する状態監視部を含み、
     前記割込に基づく前記複数の物理プロセッサの状態の監視の結果を格納するプロセッサ統計情報を保持し、
     前記プロセッサ統計情報は、前記物理プロセッサの識別情報、前記割込を受け付けた前記物理プロセッサの状態、状態遷移時刻、及びアイドル状態の移動平均時間を対応づけたエントリを複数含み、
     前記スケジューリング処理部は、
     前記プロセッサ統計情報を参照して、前記割込を受け付けた物理プロセッサの状態がアイドル状態である前記物理プロセッサを特定し、
     前記プロセッサ統計情報及び前記共通処理の発生時の時刻に基づいて、前記アイドル状態の物理プロセッサのアイドル状態の継続時間を算出し、
     前記算出されたアイドル状態の継続時間が最も長い前記物理プロセッサを、前記共通処理に割当てる前記物理プロセッサとして選択することを特徴とする計算機。
  3.  請求項2に記載の計算機であって、
     前記プロセッサ統計情報に含まれる前記エントリは、前記共通処理が割当てられた前記物理プロセッサが実際にアイドル状態であった確率を含み、
     前記スケジューリング処理部は、
     前記算出されたアイドル状態の継続時間が最も長い前記物理プロセッサが複数存在する場合、前記確率が最も高い前記物理プロセッサを前記共通処理に割当てる前記物理プロセッサとして選択することを特徴とする計算機。
  4.  請求項3に記載の計算機であって、
     前記共通処理が割当てられた物理プロセッサは、
     前記物理プロセッサ自身の状態を確認し、
     前記確認の結果に基づいて、前記確率を算出し、
     前記プロセッサ統計情報の前記物理プロセッサに対応するエントリに、前記算出された確率を設定することを特徴とする計算機。
  5.  請求項2に記載の計算機であって、
     前記複数の物理プロセッサの各々は、
     前記割込を受け付けた場合、前記物理プロセッサ自身の状態を確認し、
     前記プロセッサ統計情報を参照して、前記物理プロセッサ自身の状態が変化しているか否かを判定し、
     前記物理プロセッサ自身の状態が変化していると判定された場合、前回の前記割込の受け付け時から今回の前記割込の受け付け時までの時間間隔を、現在の前記物理プロセッサの状態の継続時間として扱うことによって、前記アイドル状態の移動平均時間を算出し、
     前記プロセッサ統計情報の対応するエントリに、現在の前記物理プロセッサ自身の状態、前記割込を受け付けた時刻、及び前記算出されたアイドル状態の移動平均時間を設定することを特徴とする計算機。
  6.  計算機リソースとして、複数の物理プロセッサ、及び前記複数の物理プロセッサの各々に接続される物理メモリを有する計算機における処理のスケジューリング方法であって、
     前記物理メモリは、複数の論理区画の各々に論理的に分割された前記計算機リソースを割当てる仮想化管理部を実現するプログラムを格納し、
     前記複数の論理区画の各々では、複数の論理プロセッサ及び論理メモリを管理するオペレーティングシステムが稼働し、
     前記仮想化管理部は、
     前記複数の論理区画に対する前記計算機リソースの割当を管理するリソース管理部と、
     前記論理プロセッサに対応づけられた前記物理プロセッサに対する処理の割当を管理するスケジューリング処理部と、を有し、
     前記リソース管理部は、
     前記複数の論理区画の各々が有する前記複数の論理プロセッサが前記複数の物理プロセッサを占有するように、前記複数の物理プロセッサの割当を管理し、
     前記オペレーティングシステムが前記物理プロセッサの電力を制御する電力管理命令を直接前記物理プロセッサに対して実行できるように管理し、
     前記処理のスケジューリング方法は、
     前記スケジューリング処理部が、前記複数の物理プロセッサの状態を監視する第1のステップと、
     前記スケジューリング処理部が、前記仮想化管理部が前記計算機全体の制御を行う共通処理が発生した場合、前記監視の結果に基づいて、アイドル状態と推定される物理プロセッサを特定する第2のステップと、
     前記スケジューリング処理部が、前記アイドル状態と推定された物理プロセッサの中から、前記共通処理に割当てる前記物理プロセッサを選択する第3のステップと、を含むことを特徴とする処理のスケジューリング方法。
  7.  請求項6に記載の処理のスケジューリング方法であって、
     前記スケジューリング処理部は、
     前記複数の物理プロセッサに対する割込を周期的に生成する状態監視部を含み、
     前記割込に基づく前記複数の物理プロセッサの状態の監視の結果を格納するプロセッサ統計情報を保持し、
     前記プロセッサ統計情報は、前記物理プロセッサの識別情報、前記割込を受け付けた前記物理プロセッサの状態、状態遷移時刻、及びアイドル状態の移動平均時間を対応づけたエントリを複数含み、
     前記第2のステップは、前記プロセッサ統計情報を参照して、前記割込を受け付けた物理プロセッサの状態がアイドル状態である前記物理プロセッサを特定するステップを含み、
     前記第3のステップは、
     前記プロセッサ統計情報及び前記共通処理の発生時の時刻に基づいて、前記アイドル状態の物理プロセッサのアイドル状態の継続時間を算出する第4のステップと、
     前記算出されたアイドル状態の継続時間が最も長い前記物理プロセッサを、前記共通処理に割当てる前記物理プロセッサとして選択する第5のステップと、を含むことを特徴とする処理のスケジューリング方法。
  8.  請求項7に記載の処理のスケジューリング方法であって、
     前記プロセッサ統計情報に含まれる前記エントリは、前記共通処理が割当てられた前記物理プロセッサが実際にアイドル状態であった確率を含み、
     前記第5のステップは、前記算出されたアイドル状態の継続時間が最も長い前記物理プロセッサが複数存在する場合、前記確率が最も高い前記物理プロセッサを前記共通処理に割当てる前記物理プロセッサとして選択するステップを含むことを特徴とする処理のスケジューリング方法。
  9.  請求項8に記載の処理のスケジューリング方法であって、
     前記共通処理が割当てられた物理プロセッサが、前記物理プロセッサ自身の状態を確認するステップと、
     前記共通処理が割当てられた物理プロセッサが、前記確認の結果に基づいて、前記確率を算出するステップと、
     前記共通処理が割当てられた物理プロセッサが、前記プロセッサ統計情報の前記物理プロセッサに対応するエントリに、前記算出された確率を設定するステップと、を含むことを特徴とする処理のスケジューリング方法。
  10.  請求項7に記載の処理のスケジューリング方法であって、
     前記複数の物理プロセッサの各々が、前記割込を受け付けた場合、前記物理プロセッサ自身の状態を確認し、前記プロセッサ統計情報を参照して、前記物理プロセッサ自身の状態が変化しているか否かを判定するステップと、
     前記複数の物理プロセッサの各々が、前記物理プロセッサ自身の状態が変化していると判定された場合、前回の前記割込の受け付け時から今回の前記割込の受け付け時までの時間間隔を、現在の前記物理プロセッサの状態の継続時間として扱うことによって、前記アイドル状態の移動平均時間を算出するステップと、
     前記複数の物理プロセッサの各々が、前記プロセッサ統計情報の対応するエントリに、現在の前記物理プロセッサ自身の状態、前記割込を受け付けた時刻、及び前記算出されたアイドル状態の移動平均時間を設定するステップと、を含むことを特徴とする処理のスケジューリング方法。
PCT/JP2015/067760 2015-06-19 2015-06-19 計算機及び処理のスケジューリング方法 WO2016203647A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/067760 WO2016203647A1 (ja) 2015-06-19 2015-06-19 計算機及び処理のスケジューリング方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/067760 WO2016203647A1 (ja) 2015-06-19 2015-06-19 計算機及び処理のスケジューリング方法

Publications (1)

Publication Number Publication Date
WO2016203647A1 true WO2016203647A1 (ja) 2016-12-22

Family

ID=57545581

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/067760 WO2016203647A1 (ja) 2015-06-19 2015-06-19 計算機及び処理のスケジューリング方法

Country Status (1)

Country Link
WO (1) WO2016203647A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296915A (zh) * 2021-12-22 2022-04-08 中汽创智科技有限公司 一种操作系统调度方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268078A1 (en) * 2004-05-12 2005-12-01 Zimmer Vincent J Distributed advanced power management
JP2008186136A (ja) * 2007-01-29 2008-08-14 Hitachi Ltd 計算機システム
JP2011150694A (ja) * 2009-12-28 2011-08-04 Intel Corp 非効率なコアホッピングを回避し、ハードウェア(補助)による低電力状態選択を提供するメカニズム
JP2013054534A (ja) * 2011-09-05 2013-03-21 Fujitsu Ltd 仮想マシン制御装置,仮想マシン制御プログラムおよび仮想マシン制御方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050268078A1 (en) * 2004-05-12 2005-12-01 Zimmer Vincent J Distributed advanced power management
JP2008186136A (ja) * 2007-01-29 2008-08-14 Hitachi Ltd 計算機システム
JP2011150694A (ja) * 2009-12-28 2011-08-04 Intel Corp 非効率なコアホッピングを回避し、ハードウェア(補助)による低電力状態選択を提供するメカニズム
JP2013054534A (ja) * 2011-09-05 2013-03-21 Fujitsu Ltd 仮想マシン制御装置,仮想マシン制御プログラムおよび仮想マシン制御方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296915A (zh) * 2021-12-22 2022-04-08 中汽创智科技有限公司 一种操作系统调度方法、装置、设备及存储介质

Similar Documents

Publication Publication Date Title
JP6219512B2 (ja) 仮想ハドゥープマネジャ
EP2411915B1 (en) Virtual non-uniform memory architecture for virtual machines
US10108460B2 (en) Method and system for integrated deployment planning for virtual appliances
US8140817B2 (en) Dynamic logical partition management for NUMA machines and clusters
CN104508634B (zh) 虚拟机的动态资源分配
US9183016B2 (en) Adaptive task scheduling of Hadoop in a virtualized environment
US8291430B2 (en) Optimizing system performance using spare cores in a virtualized environment
KR102028096B1 (ko) 하이퍼바이저 기반의 가상 머신 격리 장치 및 방법
JP4705051B2 (ja) 計算機システム
US20160196157A1 (en) Information processing system, management device, and method of controlling information processing system
US8332611B2 (en) Method and system for managing memory
US9183061B2 (en) Preserving, from resource management adjustment, portions of an overcommitted resource managed by a hypervisor
US9792142B2 (en) Information processing device and resource allocation method
KR20040028805A (ko) 프로세서로 산출하기 위한 시스템
US10691481B2 (en) System and method for detection of underprovisioning of memory in virtual machines
WO2017006458A1 (ja) 計算機及びメモリ領域管理方法
JP2013210833A (ja) ジョブ管理装置、ジョブ管理方法、及びプログラム
WO2014141419A1 (ja) 仮想計算機システムおよびスケジューリング方法
JP2010205208A (ja) ホストコンピュータ、マルチパスシステム、パス割当方法およびプログラム
WO2016203647A1 (ja) 計算機及び処理のスケジューリング方法
JP6157719B2 (ja) 計算機
Garrido et al. SmarTmem: Intelligent management of transcendent memory in a virtualized server
WO2015193947A1 (ja) 物理計算機及び仮想計算機移行方法
JP2010205207A (ja) ホストコンピュータ、マルチパスシステム、パス割当方法およびプログラム
JP2010211259A (ja) 仮想マシンシステム、情報処理装置、リソース管理方法、プログラム及び記録媒体

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15895667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15895667

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP