WO2012144011A1 - スレッド処理方法、およびスレッド処理システム - Google Patents
スレッド処理方法、およびスレッド処理システム Download PDFInfo
- Publication number
- WO2012144011A1 WO2012144011A1 PCT/JP2011/059570 JP2011059570W WO2012144011A1 WO 2012144011 A1 WO2012144011 A1 WO 2012144011A1 JP 2011059570 W JP2011059570 W JP 2011059570W WO 2012144011 A1 WO2012144011 A1 WO 2012144011A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- thread
- clock
- phase
- cpu
- frequency
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
- G06F9/3851—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution from multiple instruction streams, e.g. multistreaming
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1675—Temporal synchronisation or re-synchronisation of redundant processing components
- G06F11/1687—Temporal synchronisation or re-synchronisation of redundant processing components at event level, e.g. by interrupt or result of polling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/1695—Error detection or correction of the data by redundancy in hardware which are operating with time diversity
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0811—Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0842—Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
Definitions
- the present invention relates to a thread processing method and a thread processing system for processing threads.
- multiple CPUs operate multiple threads.
- a shared resource shared by a plurality of CPUs such as a memory and a bus
- access may be received simultaneously from the plurality of CPUs.
- the shared resource for example, since processing related to a plurality of accesses cannot be performed at the same time, the priority of each access is determined, and the processing related to access is performed in order.
- a technique that makes all the CPUs operate in the same manner when a failure mode is entered. That is, access to the shared resource from a plurality of CPUs competes but the same data of the shared resource is accessed. Therefore, in order to return the access result of the master CPU to the slave CPU without allowing the master CPU to access the shared resource and allowing the slave CPU to access the shared resource, the phase of the clock supplied to the master CPU is reversed. The clock is supplied to the slave CPU.
- a technique is known in which the timing of access from the slave CPU to the shared resource is delayed from the timing of access from the master CPU to the shared resource (see, for example, Patent Document 1).
- the conventional technique has a problem in that when two accesses to the shared resource occur at the same time when the failure mode is not set, processing related to one of the accesses is made to wait.
- An object of the present invention is to provide a thread processing method and a thread processing system capable of reducing the collision of access to a shared resource from a plurality of CPUs in order to solve the above-described problems caused by the prior art. To do.
- a second thread executes a first thread execution instruction to the first processor and is executed by the first thread and the second processor.
- a dependency relationship with a thread is determined, the access frequency of the first thread to the shared memory or shared cache memory is compared with a first threshold, and when the access frequency is greater than the first threshold, the dependency does not exist Is determined, a thread processing method and a thread processing system for changing the phase of the first operation clock of the first processor are proposed.
- FIG. 1 is an explanatory view showing an embodiment of the present invention.
- FIG. 2 is a block diagram illustrating an example of a multi-core processor system.
- FIG. 3 shows an example of the clock generation circuit 204.
- FIG. 4 is an explanatory diagram showing an example of the application table.
- FIG. 5 is an explanatory diagram showing an example of an allocation table.
- FIG. 6 is a block diagram illustrating a function example of the OS 231-i.
- FIG. 7 is an explanatory diagram illustrating Example 1.
- FIG. 8 is an explanatory diagram illustrating Example 2.
- FIG. 9 is an explanatory diagram illustrating Example 3.
- FIG. 10 is an explanatory diagram of Example 4.
- FIG. 11 is a flowchart (part 1) illustrating an example of a thread processing procedure by the OS 231-i.
- FIG. 11 is a flowchart (part 1) illustrating an example of a thread processing procedure by the OS 231-i.
- FIG. 11 is a flowchart (part
- FIG. 12 is a flowchart (part 2) illustrating an example of a thread processing procedure by the OS 231-i.
- FIG. 13 is a flowchart (part 1) illustrating an example of a thread processing procedure performed by the OS 231-1.
- FIG. 14 is a flowchart (part 2) illustrating an example of a thread processing procedure performed by the OS 231-1.
- FIG. 15 is a flowchart illustrating an example of a change processing procedure performed by the clock generation circuit 204.
- a multi-core processor system is taken as an example of a thread processing system.
- the multi-core processor is a processor in which a plurality of cores are mounted. If a plurality of cores are mounted, a single processor having a plurality of cores may be used, or a processor group in which single core processors are arranged in parallel may be used.
- a processor group in which single-core processors are arranged in parallel will be described as an example.
- FIG. 1 is an explanatory view showing an embodiment of the present invention.
- the first OS (1) dispatches the first thread to the first CPU.
- the first OS (2) compares the access frequency of the first thread to the shared resource with the first threshold.
- examples of the shared resource include a shared memory, a shared cache memory, and a bus.
- the first OS determines (3) a dependency relationship between the first thread and the second thread being executed by the second CPU.
- the thread is an execution unit of processing in the application program as is well known. For example, there is a case where the first thread and the second thread share data. For example, it is assumed that a designer analyzes in advance whether or not cache coherence is obtained between CPUs when designing an application.
- the first OS determines that (4) the access frequency is greater than the first threshold and that there is no dependency (marked with x), the phase of the clock supplied to the first CPU and the second The setting of the clock generation circuit is changed so that the phase of the clock supplied to the CPU is reversed.
- the first OS (4) changes the setting of the clock generation circuit so that the frequency of the clock supplied to the shared resource is twice the frequency of the clock supplied to the first CPU.
- the access to the shared resource between the first CPU and the second CPU does not collide.
- FIG. 2 is a block diagram illustrating an example of a multi-core processor system.
- the secondary cache 203, clock generation circuit 204, display 205, keyboard 206, I / F 212, and memory controller 207 are connected via a bus 213.
- the CPUs 201-1 to 201-4 are connected to each unit via the secondary cache 203.
- the shared memory 208 is connected to each unit via the memory controller 207.
- the CPUs 201-1 to 201-4 have a register, a core, and primary caches 221-1 to 221-4, respectively.
- the core has a calculation function.
- the registers in each CPU have a PC (Program Counter) and a reset register.
- the CPU 201-1 is a master CPU, which controls the entire multi-core processor system 200 and executes the OS 231-1.
- the OS 231-1 is a master OS, and executes a thread assigned to the CPU 201-1.
- the OS 231-1 has a scheduler, and the scheduler has a function of controlling which CPU 201 of the multi-core processor an application that has received a start instruction is assigned.
- the scheduler has a function of controlling the execution order of applications assigned to the CPU 201-1.
- the CPUs 201-2 to 201-4 are slave CPUs and execute the OSs 231-2 to 231-4, respectively.
- the OSs 231-2 to 231-4 are slave OSs, and execute threads assigned to the CPUs 201-2 to 201-4, respectively.
- the OSs 231-2 to 231-4 each have a scheduler, and each scheduler has a function of controlling the execution order of applications assigned to the CPUs 201-2 to 201-4.
- the OSs 231-1 to 231-4 respectively have run queues 241-1 to 241-4, and the run queues 241-1 to 241-4 have application contexts assigned to the CPUs 201-1 to 201-4, respectively.
- Information pointers are stacked.
- the context information is information including, for example, an execution state of a loaded application and variables in the application.
- the OS 231-1 to 231-4 can execute the application immediately by acquiring the pointer of the context information in the run queues 241-1 to 241-4 and accessing the context information of the application.
- the primary caches 221-1 to 221-4 each have a cache memory and a cache controller.
- the primary caches 221-1 to 221-4 temporarily store write processing from the thread executed by the OS 231-1 to 231-4 to the shared memory 208, respectively.
- the primary caches 221-1 to 221-4 temporarily store data read from the shared memory 208.
- the snoop circuit 202 detects the update and updates the other primary caches 221.
- the secondary cache 203 has a cache memory and a cache controller.
- the secondary cache 203 stores data evicted from the primary caches 221-1 to 221-4.
- the secondary cache 203 stores data shared by the OS 231-1 to OS 231-4.
- the secondary cache 203 has a larger storage capacity and slower access speed from the CPUs 201-1 to 201-4 than the primary caches 221-1 to 221-4.
- the secondary cache 203 has a smaller storage capacity and a higher access speed from the CPUs 201-1 to 201-4 than the shared memory 208.
- the display 205 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
- data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
- a TFT liquid crystal display can be adopted as the display 205.
- the keyboard 206 has keys for inputting numbers, various instructions, and the like, and inputs data.
- the keyboard 206 may be a touch panel type input pad or a numeric keypad.
- the I / F 212 is connected to a network such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and is connected to another device via the network.
- the I / F 212 controls a network and an internal interface, and controls input / output of data from an external device.
- a modem or a LAN adapter can be adopted as the I / F 212.
- the memory controller 207 controls access to the shared memory 208.
- the shared memory 208 includes, for example, a RAM 209 (Random Access Memory), a ROM 210 (Read Only Memory), and a flash ROM 211.
- the ROM 210 stores a program such as a boot program.
- the RAM 209 is used as a work area for each CPU.
- the flash ROM 211 stores system software such as OSs 231-1 to 231-4 and application programs.
- the RAM 209 has a faster access speed from each CPU than the flash ROM 211.
- Each OS loads an application program from the flash ROM 211 to the RAM 209, whereby the context information of the application is expanded in the RAM 209.
- the clock generation circuit 204 supplies a clock to each unit.
- the clock CLK is a reference clock input from an oscillation circuit or the outside.
- Clocks CLK1 to CLK4 are clocks supplied to the CPUs 201-1 to 201-4, respectively.
- the clock CLK-2CM is a clock supplied to the secondary cache 203. Further, although the clock is shared from the clock generation circuit 204 to the memory controller 207, the shared memory 208, the bus 213, the I / F 212, the display 205, the keyboard 206, and the like, wiring is omitted in the drawing.
- the phase of the clock supplied to each CPU and the frequency of the clock supplied to the secondary cache 203 are determined according to the control signal CPUCTRL1, the control signal CPUCTRL2, the control signal CPUCTRL3, and the control signal CPUCTRL4. .
- FIG. 3 shows an example of the clock generation circuit 204.
- the clock generation circuit 204 includes a control determination circuit 301, a selection circuit 302, an inverter 303, a 120 ° delay circuit 304, a 90 ° delay circuit 305, a selection circuit 306, an inverter 307, and a 120 ° delay circuit 308. ,have.
- the clock generation circuit 204 includes a 90 ° delay circuit 309, a selection circuit 310, an inverter 311, a 90 ° delay circuit 312, and a multiplication circuit 313.
- the inverter 303 outputs a clock having a phase opposite to that of the clock CLK by inverting and outputting the clock CLK.
- the inverter 307 outputs a clock having a phase opposite to that of the clock CLK by inverting and outputting the clock CLK.
- the inverter 311 outputs a clock having a phase opposite to that of the clock CLK by inverting and outputting the clock CLK.
- the 120 ° delay circuit 304 shifts the phase of the clock CLK by 120 °.
- the 120 ° delay circuit 308 shifts the phase of the clock output from the 120 ° delay circuit 304 by 120 °.
- the 90 ° delay circuit 305 shifts the phase of the clock CLK by 90 °.
- the 90 ° delay circuit 309 shifts the phase of the clock output from the 90 ° delay circuit 305 by 90 °.
- the 90 ° delay circuit 312 shifts the phase of the clock output from the 90 ° delay circuit 309 by 90 °.
- the selection circuit 302 selects a clock to be supplied to the CPU 201-2 according to the value of the control signal CTRL2. In the selection circuit 302, when the control signal CTRL2 is “1”, the clock CLK is selected. In the selection circuit 302, when the control signal CTRL2 is “2”, a clock having a phase opposite to that of the clock CLK is selected. In the selection circuit 302, when the control signal CTRL2 is “3”, the clock whose phase of the clock CLK is shifted by 120 ° is selected. In the selection circuit 302, when the control signal CTRL2 is “4”, the clock whose phase of the clock CLK is shifted by 90 ° is selected.
- the selection circuit 306 selects a clock to be supplied to the CPU 201-3 according to the value of the control signal CTRL3.
- the control signal CTRL3 when the control signal CTRL3 is “1”, the clock CLK is selected.
- the control signal CTRL3 when the control signal CTRL3 is “2”, a clock having a phase opposite to that of the clock CLK is selected.
- the control signal CTRL3 when the control signal CTRL3 is “3”, the clock whose phase of the clock CLK is shifted by 120 ° is selected.
- the control signal CTRL3 is “4”, a clock whose phase of the clock CLK is shifted by 240 ° is selected.
- the control signal CTRL3 when the control signal CTRL3 is “5”, the clock whose phase of the clock CLK is shifted by 180 ° is selected.
- the selection circuit 310 selects a clock to be supplied to the CPU 201-4 according to the value of the control signal CTRL4.
- the control signal CTRL4 when the control signal CTRL4 is “1”, the clock CLK is selected.
- the control signal CTRL4 when the control signal CTRL4 is “2”, a clock having a phase opposite to that of the clock CLK is selected.
- the control signal CTRL4 when the control signal CTRL4 is “3”, a clock in which the phase of the clock CLK is shifted by 120 ° is selected.
- the control signal CTRL4 when the control signal CTRL4 is “4”, the clock whose phase of the clock CLK is shifted by 240 ° is selected.
- the control signal CTRL3 when the control signal CTRL3 is “5”, a clock whose phase of the clock CLK is shifted by 270 ° is selected.
- Multiplication circuit 313 multiplies clock CLK according to RATE.
- the multiplier circuit 313 outputs the clock CLK as it is when the value of the control signal RATE is “1”.
- the multiplier circuit 313 outputs a clock having a frequency twice that of the clock CLK.
- the multiplier circuit 313 outputs a clock having a frequency three times the frequency of the clock CLK.
- the multiplication circuit 313 when the value of the control signal RATE is “4”, a clock having a frequency four times the frequency of the clock CLK is output.
- the maximum value of the control signal RATE is “4”.
- the control determination circuit 301 determines the phase of the clock supplied to each CPU and the frequency of the clock supplied to the secondary cache 203 according to the control signal CPUCTRL4 from the control signal CPUCTRL1.
- the bit width of each of the control signals CPUCTRL1 to CPUCTRL4 is 12 bits (3 [bits] ⁇ 4 [control signals]).
- the control signal CPUCTRL1 to control signal CPUCTRL4 indicate the value of the control signal CTRL2, the value of the control signal CTRL3, the value of the control signal CTRL4, and the value of the control signal RATE in order of the upper 3 bits.
- the control determination circuit 301 sets the value of the control signal CTRL1 to “1” and the value of the control signal CTRL2 to “2”. I will do it. Further, it is assumed that the value of the control signal CTRL3 becomes “3” and the value of the control signal RATE becomes “4” by the control determination circuit 301.
- the control determination circuit 301 detects a change from “0000” to the change value of the control signals CPUCTRL1 to CPUCTRL4, but does not detect a change from the change value to “0000”.
- FIG. 4 is an explanatory diagram illustrating an example of an application table.
- the application table 400 includes fields for an application ID, a thread ID, a dependent thread ID, an access frequency, and a load amount.
- identification information for identifying each application is registered.
- Identification information for identifying each thread is registered in the thread ID field.
- identification information of a thread having a dependency relationship with the thread whose identification information is registered in the thread ID field of the same record is registered.
- the access frequency field the number of accesses per unit time from the thread whose identification information is registered in the thread ID field of the same record to the secondary cache 203 is registered.
- the load amount field the ratio of the execution time per unit time of the thread whose identification information is registered in the thread ID field of the same record is registered. The access frequency and load amount are registered based on the analysis and simulation results of each thread during compilation.
- Application information (for example, application information 401-1 to 401-4) is stored as a record by setting information in the field.
- the application table 400 is stored in a storage device such as the RAM 209, the ROM 210, and the flash ROM 211. Further, the application table 400 copied in the secondary cache 203 or the primary cache 221 may be stored.
- FIG. 5 is an explanatory diagram showing an example of an allocation table.
- the allocation table 500 has fields for an application ID, a thread ID, and an allocation destination CPU ID. Identification information for identifying each application is registered in the application ID field. Identification information for identifying each thread is registered in the thread ID field. In the assignment destination CPU ID field, the identification information of the assignment destination CPU of the thread whose identification information is registered in the thread ID field of the same record is registered.
- allocation information (for example, allocation information 501-1 to 501-5) is stored as a record.
- the allocation table 500 is stored in a storage device such as the RAM 209, the ROM 210, and the flash ROM 211. Further, the application table 400 copied in the secondary cache 203 or the primary cache 221 may be stored.
- FIG. 6 is a block diagram illustrating a function example of the OS 231-i.
- the OS 231-i includes a reception unit 601-i, a determination unit 602-i, a comparison unit 603-i, a grouping setting unit 604-i, a change unit 605-i, and an execution unit 606-i. Have.
- the OS 231-i having the receiving unit 601-i to the changing unit 605-i is stored in a storage such as the flash ROM 211.
- the CPU 201-i accesses the storage device to read out the OS 231-i and executes the processing coded in the OS 231-i, whereby the processing from the reception unit 601-i to the execution unit 606-i is performed. Executed.
- the reception unit 601-1 receives an event.
- Events received by the master OS include thread generation, thread dispatch, thread switching, and thread execution termination.
- Events accepted by the slave OS include thread dispatch, thread switching, and thread execution termination.
- the event is thread switching will be described as an example.
- the accepting unit 601-1 accepts switching of the thread, and the determining unit 602-1 accepts the thread (first thread) for which the accepting unit 601-1 accepted the switching and each thread being executed by another CPU. It is determined whether or not there is a dependency.
- the determination unit 602-1 detects application information having the ID of the first thread in the thread ID field from the application table 400. For example, the determination unit 602-1 identifies the ID of a thread registered in the dependent thread ID field of the detected application information. Thereby, the ID of the thread having a dependency relationship with the first thread is specified.
- the determination unit 602-1 acquires the ID of the executing thread from the other OS 231 by the inter-processor communication function. For example, the determination unit 602-1 compares the identified thread ID with the acquired thread ID. Thus, it is determined whether or not there is a dependency relationship between the first thread and each thread being executed by another CPU. Note that the determination result is stored in a storage device such as the RAM 209 and the flash ROM 211.
- the comparison unit 603-1 determines the access frequency of the first thread to the secondary cache 203. Is compared with a first threshold.
- the comparison unit 603-1 detects application information having the ID of the first thread in the thread ID field from the application table 400. For example, the comparison unit 603-1 identifies the access frequency registered in the access frequency field of the detected application information. For example, the comparison unit 603-1 determines whether or not the specified access frequency is equal to or higher than the first threshold value. Thereby, it is determined whether or not the access frequency of the first thread to the secondary cache 203 is equal to or higher than the first threshold value.
- the comparison unit 603-1 determines that the access frequency of the first thread to the secondary cache 203 is equal to or higher than the first threshold, the comparison unit 603-1 compares the load amount of the first thread with the second threshold. For example, the comparison unit 603-1 determines whether or not the load amount of the first thread registered in the load amount field of the detected application information is equal to or greater than the second threshold value.
- the comparison unit 603-1 determines whether the frequency multiplication rate of the clock supplied to the secondary cache 203 is the maximum. For example, the comparison unit 603-1 acquires the value of the control signal RATE from the clock generation circuit 204, and determines whether or not the value of the control signal RATE is the maximum value.
- the maximum value is 4.
- the determining unit 602-1 determines whether the remaining CPUs other than the CPU 201-1 are executing threads. Determine whether there is a dependency. For example, the determination unit 602-1 determines whether there is a dependency between the thread being executed by the CPU 201-2 and the thread being executed by the CPU 201-3. For example, the determination unit 602-1 determines whether there is a dependency between the thread being executed by the CPU 201-2 and the thread being executed by the CPU 201-4. For example, the determination unit 602-1 determines whether there is a dependency between the thread being executed by the CPU 201-3 and the thread being executed by the CPU 201-4.
- the specific determination method is the same as the process for determining whether or not there is a dependency between the thread being executed by the CPU 201-1 and the thread being executed by each of the CPUs 201-2 to 201-4. The detailed explanation is omitted. Note that the determination result is stored in a storage device such as the RAM 209 and the flash ROM 211.
- FIG. 7 is an explanatory diagram illustrating Example 1.
- a symbol added in a circle indicates a thread being executed by the CPU 201 corresponding to each symbol.
- a cross is attached between the arrows connecting the first thread that has been switched in the CPU 201-1 and the thread that is being executed in each of the CPUs 201-2 to 201-4.
- the grouping setting unit 604-1 groups CPUs according to the dependency relationship.
- one group is equal to or more than one CPU, and a CPU that is executing a thread having a dependency relationship directly or indirectly is defined as one group.
- the grouping setting unit 604-1 sets each CPU to a different group.
- the CPU 201-1 belongs to the group G1, the CPU 201-2 belongs to the group G2, the CPU 201-3 belongs to the group G3, and the CPU 201-4 belongs to the group G4.
- the CPU group number GC is four.
- the grouping setting result is stored in a storage device such as the RAM 209 and the flash ROM 211.
- the changing unit 605-1 changes the phase of the clock supplied to each CPU according to the grouping setting result, and changes the frequency of the clock supplied to the secondary cache 203 according to the number of CPU groups GC. For example, the changing unit 605-1 changes the value of the control signal CPUCTRL1 from 0 to “4554”.
- the clock generation circuit 204 detects a change in the control signal CPUCTRL1. Based on the value of the control signal CPUCTRL1, the clock generation circuit 204 sets the value of the control signal CTRL2 to “4”, the value of the control signal CTRL3 to “5”, the value of the control signal CTRL4 to “5”, and the control signal The value of RATE is set to “4”.
- a clock having a phase shifted by 90 ° from the phase of the clock supplied to the CPU 201-2 is supplied to the CPU 201-3.
- a clock having a phase shifted by 90 ° from the phase of the clock supplied to the CPU 201-3 is supplied to the CPU 201-4.
- the frequency of the clock CLK-2CM is four times the frequency of the clock CLK.
- the execution unit 606-1 executes the first thread after the change by the change unit 605-1 is completed. That is, the clock supplied between the groups is asynchronous, and the frequency of the clock CLK-2CM is synchronized with any group.
- FIG. 8 is an explanatory diagram illustrating Example 2.
- the thread being executed by the CPU 201-3 and the thread being executed by the CPU 201-4 are directly dependent.
- the arrows between the x marks indicate that there is no dependency, and the arrows between the circles indicate that there is a dependency.
- the grouping setting unit 604-1 sets the CPU 201-1 to the group G1, the CPU 201-2 to the group G2, and the CPU 201-3 and the CPU 201-4 to the group G3.
- the CPU group number GC is three.
- the grouping setting result is stored in a storage device such as the RAM 209 and the flash ROM 211.
- the changing unit 605-1 changes the phase of the clock supplied to each CPU according to the number of CPU groups GC, and changes the frequency of the clock supplied to the secondary cache 203 according to the number of groups. For example, the changing unit 605-1 changes the value of the control signal CPUCTRL1 from 0 to “3443”.
- the clock generation circuit 204 detects a change in the control signal CPUCTRL1. Based on the value of the control signal CPUCTRL1, the clock generation circuit 204 sets the value of the control signal CTRL2 to “3”, sets the value of the control signal CTRL3 to “4”, sets the value of the control signal CTRL4 to “4”, and sets the control signal The value of RATE is set to “3”.
- a clock having a phase shifted by 120 ° from the phase of the clock supplied to the CPU 201-2 is supplied to the CPU 201-3.
- a clock having a phase shifted by 120 ° from the phase of the clock supplied to the CPU 201-2 is supplied to the CPU 201-4.
- the frequency of the clock CLK-2CM is three times the frequency of the clock CLK.
- FIG. 9 is an explanatory diagram illustrating Example 3. There is no dependency between the first thread that has been switched by the CPU 201-1 and the thread that is being executed by each of the CPUs 201-2 to 201-4. In FIG. 9, there is a dependency relationship between the thread being executed by the CPU 201-2 and the thread being executed by the CPU 201-3. There is a dependency relationship between the thread being executed by the CPU 201-3 and the thread being executed by the CPU 201-4. There is no direct dependency between the thread being executed by the CPU 201-2 and the thread being executed by the CPU 201-4, but there is an indirect dependency via the CPU 201-3.
- the grouping setting unit 604-1 sets the CPU 201-1 to the group G1, and sets the CPU 201-2, the CPU 201-3, and the CPU 201-4 to the group G2.
- the CPU group number GC is two.
- the changing unit 605-1 changes the phase of the clock supplied to each CPU according to the number of CPU groups GC, and changes the frequency of the clock supplied to the secondary cache 203 according to the number of groups. For example, the changing unit 605-1 changes the value of the control signal CPUCTRL1 from 0 to “2222”.
- the clock generation circuit 204 detects a change in the control signal CPUCTRL1. Based on the value of the control signal CPUCTRL1, the clock generation circuit 204 sets the value of the control signal CTRL2 to “2”, the value of the control signal CTRL3 to “2”, the value of the control signal CTRL4 to “2”, and the control signal The value of RATE is set to “2”.
- a clock having a phase opposite to that of the clock supplied to the CPU 201-2 is supplied to the CPU 201-3.
- a clock having a phase opposite to that of the clock supplied to the CPU 201-2 is supplied to the CPU 201-4.
- the frequency of the clock CLK-2CM is twice the frequency of the clock CLK.
- Example 4 Also, if the determination unit 602-1 determines that there is a dependency relationship between the first thread whose switching is received by the receiving unit 601-1 and each thread being executed by another CPU, all the CPUs Determine whether there is a dependency between running threads.
- FIG. 10 is an explanatory diagram showing Example 4.
- the first thread that has been switched by the CPU 201-1 and the thread that is being executed by the CPU 201-2 have a direct dependency relationship.
- the thread being executed by the CPU 201-2 and the thread being executed by the CPU 201-3 have a direct dependency relationship.
- the thread being executed by the CPU 201-3 and the thread being executed by the CPU 201-4 are directly dependent.
- the first thread that has been switched by the CPU 201-1 and the thread that is being executed by the CPU 201-3 have no direct dependency, but are indirectly dependent through the thread that is being executed by the CPU 201-2. .
- the first thread that has been switched by the CPU 201-1 and the thread that is being executed by the CPU 201-4 have no direct dependency, but the thread that is being executed by the CPU 201-2 and the thread that is being executed by the CPU 201-3 There is an indirect dependency via
- the grouping setting unit 604-1 sets the CPUs 201-1 to 201-4 to the group G1.
- the CPU group number GC is 1.
- the grouping setting result is stored in a storage device such as the RAM 209 and the flash ROM 211.
- the changing unit 605-1 changes the phase of the clock supplied to each CPU according to the CPU group number GC, and changes the frequency of the clock supplied to the secondary cache 203 according to the CPU group number GC. For example, the changing unit 605-1 changes the value of the control signal CPUCTRL1 from 0 to “1111”.
- the clock generation circuit 204 detects a change in the control signal CPUCTRL1. Based on the value of the control signal CPUCTRL1, the clock generation circuit 204 sets the value of the control signal CTRL2 to “1”, sets the value of the control signal CTRL3 to “1”, sets the value of the control signal CTRL4 to “1”, and controls the control signal The value of RATE is set to “1”.
- the execution unit 606-1 executes the first thread after the change by the change unit 605-1 is completed.
- FIG. 11 and FIG. 12 are flowcharts showing an example of a thread processing procedure by the OS 231-i.
- the OS 231-i determines whether or not an event has been received by the receiving unit 601-i (step S 1101). If the OS 231-i determines that no event has been received (step S ⁇ b> 1101: NO), the process returns to step S ⁇ b> 1101.
- step S 1101: dispatch the OS 231-i proceeds to step S 1123.
- step S 1101 end of execution
- the OS 231-i determines whether there is a thread waiting for execution (step S 1102). Whether there is a thread waiting for execution is determined by whether a pointer of context information is registered in the run queue 241-i.
- step S 1102: No the OS 231-i proceeds to step S 1116. If the OS 231-i determines that there is a thread waiting for execution (step S 1102: Yes), the OS 231-i proceeds to step S 1103.
- step S1101 if the OS 231-i determines that a thread switch has been received (step S1101: switch), the process proceeds to step S1103.
- the OS 231-i depends on the thread (first thread) to be executed next by the determination unit 602-i and the thread being executed by another CPU. It is determined whether or not there is (step S1103).
- the thread to be executed next is a thread after switching in the case of thread switching, and is a thread in which a context information pointer is registered at the head of the run queue 241-i in the case of termination of thread execution.
- step S 1104 the OS 231-i checks the dependency between the threads being executed by the other CPU.
- step S 1105 determines whether or not all CPUs have a dependency relationship directly or indirectly.
- step S 1105: Yes it changes the phase of the clock supplied to all the CPUs to the same phase.
- step S 1106 changes the frequency of the clock supplied to the secondary cache 203 to the default (step S 1107), and proceeds to step S 1123.
- step S1105 when the OS 231-i does not determine that all the CPUs have a dependency (step S1105: No), the process proceeds to step S1112.
- step S1103 when the OS 231-i determines that there is no dependency between the first thread and the thread being executed by another CPU (step S1103: No), the memory access frequency of the first thread> predetermined frequency It is determined whether or not (step S1108).
- the predetermined frequency is a first threshold value. If the OS 231-i determines that the memory access frequency of the first thread is not greater than the predetermined frequency (step S 1108: No), the OS 231-i proceeds to step S 1116.
- the OS 231-i determines whether or not the load amount of the first thread> the predetermined load amount (step S1108). S1109).
- the predetermined load amount is a second threshold value.
- step S 1109: NO determines whether the load amount of the first thread is not greater than the predetermined load amount. If the OS 231-i determines that the load amount of the first thread is not greater than the predetermined load amount (step S 1109: NO), the process proceeds to step S 1116.
- the OS 231-i determines that the load amount of the first thread> the predetermined load amount (step S 1109: Yes) determines whether or not the multiplication rate of the frequency of the clock supplied to the secondary cache 203 is the maximum. Judgment is made (step S1110). If the OS 231-i determines that the multiplication rate of the frequency of the clock supplied to the secondary cache 203 is the maximum (step S 1110: Yes), the OS 231-i proceeds to step S 1123.
- step S 1110 determines that the frequency multiplication rate of the clock supplied to the secondary cache 203 is not the maximum (step S 1110: No)
- the determination unit 602-i determines the dependence between threads being executed by other CPUs. The relationship is confirmed (step S1111).
- the OS 231-i groups the CPUs having a dependency relationship directly or indirectly (step S 1112), and determines the CPU group number GC (step S 1113).
- the OS 231-i changes the phase of the clock supplied to the CPU for each grouped CPU (step S 1114), and changes the frequency of the clock supplied to the secondary cache 203 based on the CPU group number GC (step S 1114). S1115), the process proceeds to step S1123.
- the OS 231-i causes the comparison unit 603-i to use the memory access frequency of the thread that has been executed before the switch or the thread that has finished executing> predetermined. It is determined whether the frequency is reached (step S1116). If the OS 231-i determines that the memory access frequency of the thread executed before the switch or the thread that has been executed is not greater than the predetermined frequency (step S 1116: No), the process proceeds to step S 1123. If the OS 231-i determines that the memory access frequency of the thread that was executed before the switch or the thread that has been executed is greater than the predetermined frequency (step S 1116: Yes), the OS 231-i proceeds to step S 1117.
- the OS 231-i determines whether or not the load amount of the thread that was executed before the switch or the thread that has been executed is greater than the predetermined load amount (step S 1117). If the OS 231-i determines that the load amount of the thread executed before the switch or the thread that has been executed is not greater than the predetermined load amount (step S 1117: NO), the OS 231-i proceeds to step S 1123.
- the OS 231-i decrements the CPU group number GC (step S 1118) when it is determined that the load amount of the thread executed before the switch or the thread finished execution is greater than the predetermined load amount (step S 1117: Yes).
- the OS 231-i confirms the dependency relationship between the threads being executed by other CPUs (step S 1119), and groups the CPU 201 according to the reduced CPU group number GC and the dependency relationship (step S 1120). For example, it is good also as creating the group for CPU group number GC so that the number of CPUs may become equal along a dependency.
- the OS 231-i changes the phase of the clock supplied to the CPU for each grouped CPU (step S 1121).
- the OS 231-i changes the frequency of the clock supplied to the secondary cache 203 based on the CPU group number GC (step S ⁇ b> 1122), and proceeds to step S ⁇ b> 1123.
- the OS 231-i executes the first thread by the execution unit 606-i (step S 1123), and returns to step S 1101.
- Step S1123 is executed after the dispatch of Step S1101, Step S1107, Yes of Step S1110, Step S1115, No of Step S1116, No of Step S1117, or Step S1122.
- step S1301 determines whether the generated thread has a dependency relationship with a thread being executed by another CPU (step S1302).
- the OS 231-1 determines that the generated thread has a dependency relationship with the thread being executed by another CPU (step S ⁇ b> 1302: Yes)
- step S1303 determines whether or not all CPUs have a dependency relationship directly or indirectly (step S1304).
- step S1304: No the process proceeds to step S1313.
- step S1304 determines that all CPUs have a direct or indirect dependency relationship (step S1304: Yes)
- the phase of the clock supplied to all CPUs is changed to the same phase (step S1305).
- the OS 231-1 changes the frequency of the clock supplied to the secondary cache 203 to the default (step S1306), assigns the generated thread to the CPU with the smallest load (step S1307), and returns to step S1301.
- the OS 231-1 identifies the thread assigned to each CPU using the assignment table 500.
- the OS 231-1 refers to the application table 400 and searches for the load amount of the identified thread.
- the OS 231-1 calculates the total value of the searched load amounts of the allocated threads for each CPU, and identifies the CPU having the smallest total value as the CPU having the smallest load.
- step S ⁇ b> 1302: No whether or not the memory access frequency of the generated thread is greater than a predetermined frequency. Is determined (step S1308).
- step S1308: No the process proceeds to step S1311.
- step S1308 determines whether the memory access frequency of the generated thread> predetermined frequency (step S1308: Yes). If the OS 231-1 determines that the load amount of the generated thread> predetermined load amount (step S1308). S1309). If the OS 231-1 determines that the load amount of the generated thread is not greater than the predetermined load amount (step S1309: NO), the process proceeds to step S1311.
- step S1309: Yes it is determined whether the frequency multiplication rate of the clock supplied to the secondary cache 203 is the maximum. Judgment is made (step S1310).
- step S1310: Yes the process proceeds to step S1311.
- step S1311 the OS 231-1 allocates the generated thread to the CPU with the smallest load (step S1311), and the process returns to step S1301.
- step S1310 when the OS 231-1 determines that the frequency multiplication rate of the clock supplied to the secondary cache 203 is not the maximum (step S1310: No), the dependency relationship between the threads being executed by other CPUs is confirmed.
- the OS 231-1 groups the CPUs having a dependency relationship directly or indirectly (step S1313), and changes the phase of the clock supplied to each CPU based on the number of CPU groups GC and the grouped CPUs.
- Step S1314 The OS 231-1 changes the frequency of the clock supplied to the secondary cache 203 based on the CPU group number GC (step S1315), and the process returns to step S1301.
- FIG. 15 is a flowchart illustrating an example of a change processing procedure performed by the clock generation circuit 204.
- the control command is, for example, a change from “0000” of any one of the control signals CPUCTRL1 to CPUCTRL4 to a changed value.
- step S1501 determines that a control command from each CPU has been received (step S1501: Yes)
- the control signal is changed (step S1502), and the process returns to step S1501.
- the control signal is, for example, the control signals CTRL1 to CTRL4 or the control signal RATE.
- the thread processing method and the thread processing system determine whether there is a dependency between the first thread executed by the first CPU and the second thread executed by the second CPU. to decide. If there is no dependency between the first thread and the second thread, and the access frequency to the shared resource of the first thread is equal to or higher than a predetermined frequency, the phase of the clock supplied to the first CPU is set to the second The phase is changed to a phase different from the phase of the clock supplied to the CPU.
- the phase of clocks supplied to each CPU is different, so that the collision of accesses to shared resources from a plurality of CPUs can be reduced. Moreover, the peak current can be reduced by the phase of the clock supplied to the CPU being different.
- the phase of the clock supplied to the first CPU is changed, and the frequency of the clock supplied to the plurality of CPUs is not increased, but the frequency of the clock to the shared resource is increased.
- the frequency of the clock supplied to the shared resource is changed to twice the frequency of the clock supplied to the first CPU. It is possible to reduce the collision of access to shared resources from a plurality of CPUs, and to reduce waiting time caused by concentration of access from a plurality of CPUs to shared resources.
- the load amount when executing the first thread is compared with the second threshold value, and the dependency is determined when the load amount is larger than the second threshold value.
- the larger the load amount of the first thread the higher the possibility that the access from the first thread to the shared resource will collide with the access from the second thread to the shared resource. Therefore, since the phases of clocks supplied to the CPUs are different, it is possible to reduce the collision of accesses to shared resources from a plurality of CPUs, and to suppress power consumption to a minimum.
- the dependency relationship is registered in the shared memory or the memory of the first processor. As a result, the dependency relationship between the first thread and the second thread can be easily determined, and the processing time can be shortened.
- threads with dependencies are grouped for each CPU group being executed.
- the phase of the clock supplied to each CPU group is set to an asynchronous phase between different CPU groups.
- the frequency of the clock supplied to the shared resource is set to a frequency that is synchronized with any CPU group.
- the thread processing method described in the present embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation.
- the thread processing program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer.
- the thread processing program may be distributed via a network such as the Internet.
- Multi-core processor system 201-1 to 201-4 CPU 203 Secondary cache 204 Clock generation circuit 208 Shared memory 400 Application table
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Multi Processors (AREA)
Abstract
第1のOSが、(1)第1のスレッドを第1のCPUへディスパッチする。第1のOSが、(2)第1のスレッドの共有資源へのアクセス頻度を第1閾値と比較する。第1のOSが、(3)第1のスレッドと第2のCPUで実行中の第2のスレッドとの依存関係を判断する。第1のOSが、(4)アクセス頻度が第1閾値よりも大きいと判断し、かつ依存関係がない(×印)と判断した場合、第1のCPUへ供給されるクロックの位相と第2のCPUへ供給されるクロックの位相とが逆相となるようにクロック生成回路の設定を変更する。第1のOSが、(4)共有資源へ供給されるクロックの周波数を第1のCPUへ供給されるクロックの周波数の2倍になるようにクロック生成回路の設定を変更する。
Description
本発明は、スレッドを処理するスレッド処理方法、およびスレッド処理システムに関する。
マルチコアプロセッサシステムでは、複数のCPUが複数のスレッドを動作させる。メモリやバスなどの複数のCPUで共有する共有資源では、複数のCPUから同時にアクセスを受け付ける場合がある。共有資源では、たとえば、同時に複数のアクセスに関する処理を行うことができないため、各アクセスの優先度を判断し、アクセスに関する処理を順に行っている。
また、フォールトトレラントシステムにおいて、故障モードになると、すべてのCPUの動作を同一にする技術が知られている。すなわち、複数のCPUから共有資源へのアクセスが競合するが、共有資源の同一のデータにアクセスする。そこで、マスタCPUには共有資源へアクセスさせ、スレーブCPUには共有資源へアクセスさせずに、マスタCPUのアクセス結果をスレーブCPUに返すために、マスタCPUに供給されるクロックの位相と逆位相のクロックをスレーブCPUに供給させる。そして、スレーブCPUから共有資源へのアクセスのタイミングをマスタCPUから共有資源へのアクセスのタイミングよりも遅らせる技術が知られている(たとえば、特許文献1参照。)。
しかしながら、従来技術では、故障モードでない場合に、共有資源へ同時に2つのアクセスが発生した場合、いずれか一方のアクセスに関する処理は待機させられることになるという問題点がある。
本発明は、上述した従来技術による問題点を解消するため、複数のCPUから共有資源へのアクセスが衝突することを減少させることができるスレッド処理方法、およびスレッド処理システムを提供することを目的とする。
上述した課題を解決し、目的を達成するため、本発明の一側面によれば、第1スレッドの実行命令を第1プロセッサに供給し、前記第1スレッドと第2プロセッサで実行される第2スレッドとの依存関係を判断し、前記第1スレッドの共有メモリまたは共有キャッシュメモリへのアクセス頻度を第1閾値と比較し、前記アクセス頻度が第1閾値よりも大きいとき、かつ前記依存関係がないと判断されるときは、前記第1プロセッサの第1動作クロックの位相を変更するスレッド処理方法、およびスレッド処理システムが提案される。
本発明の一側面によれば、共有資源へのアクセスが衝突することを減少させることができるという効果を奏する。
以下に添付図面を参照して、本発明にかかるスレッド処理方法、およびスレッド処理システムの実施の形態を詳細に説明する。本実施の形態では、スレッド処理システムの一例として、マルチコアプロセッサシステムを挙げる。ここで、マルチコアプロセッサシステムにおいて、マルチコアプロセッサとは、コアが複数搭載されたプロセッサである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、説明を単純化するため、シングルコアのプロセッサが並列されているプロセッサ群を例に挙げて説明する。
図1は、本発明の一実施例を示す説明図である。第1のOSが、(1)第1のスレッドを第1のCPUへディスパッチする。第1のOSが、(2)第1のスレッドの共有資源へのアクセス頻度を第1閾値と比較する。ここで、共有資源には、たとえば、共有メモリ、共有キャッシュメモリやバスなどが挙げられる。第1のOSが、(3)第1のスレッドと第2のCPUで実行中の第2のスレッドとの依存関係を判断する。ここで、スレッドは、周知のようにアプリケーションプログラム内での処理の実行単位である。依存関係があるとは、たとえば、第1のスレッドと第2のスレッドとでデータを共有している場合が挙げられる。たとえば、CPU間でキャッシュコヒーレントを取るか否かをアプリケーションの設計時に設計者があらかじめ解析しておくこととする。
第1のOSが、(4)アクセス頻度が第1閾値よりも大きいと判断し、かつ依存関係がない(×印)と判断した場合、第1のCPUへ供給されるクロックの位相と第2のCPUへ供給されるクロックの位相とが逆相となるようにクロック生成回路の設定を変更する。第1のOSが、(4)共有資源へ供給されるクロックの周波数を第1のCPUへ供給されるクロックの周波数の2倍になるようにクロック生成回路の設定を変更する。
たとえば、第1のCPUと第2のCPUと共有資源とがクロックの立ち上がりエッジで処理が行われるとすると、第1のCPUと第2のCPUとの共有資源へのアクセスが衝突しない。
(マルチコアプロセッサシステム)
図2は、マルチコアプロセッサシステムの一例を示すブロック図である。マルチコアプロセッサシステム200は、CPU201-1~201-N(ここでは、N=4を例に挙げている。)と、スヌープ回路202と、2次キャッシュ203と、クロック生成回路204と、を有している。さらに、マルチコアプロセッサシステム200は、ディスプレイ205と、キーボード206と、I/F212(InterFace)と、メモリコントローラ207と、共有メモリ208と、を有している。
図2は、マルチコアプロセッサシステムの一例を示すブロック図である。マルチコアプロセッサシステム200は、CPU201-1~201-N(ここでは、N=4を例に挙げている。)と、スヌープ回路202と、2次キャッシュ203と、クロック生成回路204と、を有している。さらに、マルチコアプロセッサシステム200は、ディスプレイ205と、キーボード206と、I/F212(InterFace)と、メモリコントローラ207と、共有メモリ208と、を有している。
2次キャッシュ203と、クロック生成回路204と、ディスプレイ205と、キーボード206と、I/F212と、メモリコントローラ207とは、バス213を介して接続されている。CPU201-1~201-4は、2次キャッシュ203を介して各部に接続されている。共有メモリ208は、メモリコントローラ207を介して各部に接続されている。
ここで、CPU201-1~201-4は、それぞれレジスタとコアと1次キャッシュ221-1~221-4を有している。コアは、演算機能を有している。各CPU内のレジスタは、PC(Program Counter)やリセットレジスタを有している。
CPU201-1はマスタCPUであり、マルチコアプロセッサシステム200の全体の制御を司り、OS231-1を実行する。OS231-1はマスタOSであり、CPU201-1に割り当てられたスレッドを実行する。OS231-1はスケジューラを有し、スケジューラは起動指示を受け付けたアプリケーションをマルチコアプロセッサのうちのいずれのCPU201に割り当てるかを制御する機能を有している。スケジューラはCPU201-1に割り当てられたアプリケーションの実行順序を制御する機能を有する。
CPU201-2~201-4はスレーブCPUであり、それぞれOS231-2~231-4を実行する。OS231-2~231-4はスレーブOSであり、それぞれCPU201-2~201-4に割り当てられたスレッドを実行する。OS231-2~231-4はそれぞれスケジューラを有し、各スケジューラはそれぞれCPU201-2~201-4に割り当てられたアプリケーションの実行順序を制御する機能を有する。
ここで、OS231-1~231-4はそれぞれランキュー241-1~241-4を有し、ランキュー241-1~241-4にはCPU201-1~201-4のそれぞれに割り当てられたアプリケーションのコンテキスト情報のポインタが積まれる。コンテキスト情報とは、たとえば、ロードされたアプリケーションの実行状態や該アプリケーション内の変数などが含まれる情報である。OS231-1~231-4はそれぞれランキュー241-1~241-4内のコンテキスト情報のポインタを取得し、アプリケーションのコンテキスト情報にアクセスすることで、アプリケーションを直ぐに実行することができる。
1次キャッシュ221-1~221-4は、それぞれキャッシュメモリとキャッシュコントローラとを有している。1次キャッシュ221-1~221-4はそれぞれOS231-1~231-4が実行するスレッドから共有メモリ208への書込処理を一時的に記憶する。また、1次キャッシュ221-1~221-4は、共有メモリ208から読み出されたデータを一時的に記憶する。
スヌープ回路202は、1次キャッシュ221-1~221-4で共有するデータがいずれかの1次キャッシュ221で更新された場合、該更新を検出し、他の1次キャッシュ221も更新する。
2次キャッシュ203は、キャッシュメモリとキャッシュコントローラとを有している。2次キャッシュ203では、1次キャッシュ221-1~221-4から追い出されたデータを記憶する。2次キャッシュ203では、OS231-1~OS231-4で共有するデータを記憶する。2次キャッシュ203は、1次キャッシュ221-1~221-4よりも、記憶容量が大きくかつCPU201-1~201-4からのアクセス速度が遅い。2次キャッシュ203は共有メモリ208より、記憶容量が小さくかつCPU201-1~201-4からのアクセス速度が速い。
ディスプレイ205は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。ディスプレイ205は、たとえば、TFT液晶ディスプレイなどを採用することができる。キーボード206は、数字、各種指示などの入力のためのキーを有し、データの入力を行う。また、キーボード206は、タッチパネル式の入力パッドやテンキーなどであってもよい。
I/F212は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワークに接続され、ネットワークを介して他の装置に接続される。そして、I/F212は、ネットワークと内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F212には、たとえばモデムやLANアダプタなどを採用することができる。
メモリコントローラ207は、共有メモリ208へのアクセスを制御する。共有メモリ208は、たとえば、RAM209(Random Access Memory)と、ROM210(Read Only Memory)と、フラッシュROM211を有している。ROM210は、ブートプログラムなどのプログラムを記憶している。RAM209は、各CPUのワークエリアとして使用される。フラッシュROM211は、OS231-1~231-4などのシステムソフトウェアやアプリケーションのプログラムを記憶している。RAM209はフラッシュROM211よりも各CPUからのアクセス速度が速い。各OSがアプリケーションのプログラムをフラッシュROM211からRAM209へロードすることにより、該アプリケーションのコンテキスト情報がRAM209内に展開される。
クロック生成回路204は、各部にクロックを供給する。クロックCLKが発振回路や外部から入力される基準クロックである。クロックCLK1~CLK4がそれぞれCPU201-1~201-4へ供給されるクロックである。クロックCLK-2CMが2次キャッシュ203へ供給されるクロックである。また、メモリコントローラ207、共有メモリ208、バス213、I/F212、ディスプレイ205やキーボード206などにもクロック生成回路204からクロックが共有されているが、図では配線を省略している。
たとえば、制御信号CPUCTRL1と、制御信号CPUCTRL2と、制御信号CPUCTRL3と、制御信号CPUCTRL4とに応じて、各CPUへ供給されるクロックの位相と2次キャッシュ203へ供給されるクロックの周波数が決定される。
図3は、クロック生成回路204の一例を示している。クロック生成回路204は、制御決定回路301と、選択回路302と、インバータ303と、120°遅延回路304と、90°遅延回路305と、選択回路306と、インバータ307と、120°遅延回路308と、を有している。クロック生成回路204は、90°遅延回路309と、選択回路310と、インバータ311と、90°遅延回路312と、逓倍回路313と、を有している。
インバータ303は、クロックCLKを反転して出力することにより、クロックCLKと逆相のクロックを出力する。インバータ307は、クロックCLKを反転して出力することにより、クロックCLKと逆相のクロックを出力する。インバータ311は、クロックCLKを反転して出力することにより、クロックCLKと逆相のクロックを出力する。
120°遅延回路304は、クロックCLKの位相を120°ずらす。120°遅延回路308は、120°遅延回路304から出力されるクロックの位相を120°ずらす。90°遅延回路305は、クロックCLKの位相を90°ずらす。90°遅延回路309は、90°遅延回路305から出力されるクロックの位相を90°ずらす。90°遅延回路312は、90°遅延回路309から出力されるクロックの位相を90°ずらす。
選択回路302は、制御信号CTRL2の値に応じてCPU201-2に供給するクロックを選択する。選択回路302では、制御信号CTRL2が「1」の場合、クロックCLKが選択される。選択回路302では、制御信号CTRL2が「2」の場合、クロックCLKの位相と逆位相のクロックが選択される。選択回路302では、制御信号CTRL2が「3」の場合、クロックCLKの位相が120°ずらされたクロックが選択される。選択回路302では、制御信号CTRL2が「4」の場合、クロックCLKの位相が90°ずらされたクロックが選択される。
選択回路306は、制御信号CTRL3の値に応じてCPU201-3に供給するクロックを選択する。選択回路306では、制御信号CTRL3が「1」の場合、クロックCLKが選択される。選択回路306では、制御信号CTRL3が「2」の場合、クロックCLKの位相と逆位相のクロックが選択される。選択回路306では、制御信号CTRL3が「3」の場合、クロックCLKの位相が120°ずらされたクロックが選択される。選択回路306では、制御信号CTRL3が「4」の場合、クロックCLKの位相が240°ずらされたクロックが選択される。選択回路306では、制御信号CTRL3が「5」の場合、クロックCLKの位相が180°ずらされたクロックが選択される。
選択回路310は、制御信号CTRL4の値に応じてCPU201-4に供給するクロックを選択する。選択回路310では、制御信号CTRL4が「1」の場合、クロックCLKが選択される。選択回路310では、制御信号CTRL4が「2」の場合、クロックCLKの位相と逆位相のクロックが選択される。選択回路310では、制御信号CTRL4が「3」の場合、クロックCLKの位相が120°ずらされたクロックが選択される。選択回路310では、制御信号CTRL4が「4」の場合、クロックCLKの位相が240°ずらされたクロックが選択される。選択回路310では、制御信号CTRL3が「5」の場合、クロックCLKの位相が270°ずらされたクロックが選択される。
逓倍回路313は、RATEに応じてクロックCLKを逓倍にする。逓倍回路313では、制御信号RATEの値が「1」の場合、クロックCLKがそのまま出力される。逓倍回路313では、制御信号RATEの値が「2」の場合、クロックCLKの周波数の2倍の周波数となるクロックが出力される。逓倍回路313では、制御信号RATEの値が「3」の場合、クロックCLKの周波数の3倍の周波数となるクロックが出力される。逓倍回路313では、制御信号RATEの値が「4」の場合、クロックCLKの周波数の4倍の周波数となるクロックが出力される。制御信号RATEの最大値は「4」である。
制御決定回路301は、制御信号CPUCTRL1から制御信号CPUCTRL4に応じて、各CPUへ供給されるクロックの位相と2次キャッシュ203へ供給されるクロックの周波数を決定する。たとえば、制御信号CPUCTRL1から制御信号CPUCTRL4のそれぞれのビット幅が12ビット(3[ビット]×4[制御信号])である。制御信号CPUCTRL1から制御信号CPUCTRL4はそれぞれ上位3ビットごとに順に制御信号CTRL2の値、制御信号CTRL3の値、制御信号CTRL4の値、制御信号RATEの値を示していることとする。
たとえば、OS231-1が、通常時には制御信号CPUCTRL1を「0000(10進表記)」に設定し、各CPUへ供給するクロックの位相や2次キャッシュ203へ供給するクロックの周波数を変更する際に変化させる。たとえば、制御信号CPUCTRL1の値が「1234(10進表記)」に変化させられると、制御決定回路301により、制御信号CTRL1の値が「1」となり、制御信号CTRL2の値が「2」となることとする。さらに、制御決定回路301により、制御信号CTRL3の値が「3」となり、制御信号RATEの値が「4」となることとする。また、制御決定回路301は、制御信号CPUCTRL1~CPUCTRL4の「0000」から変更値への変化は検出するが、変更値から「0000」への変化は検出しないこととする。
(アプリケーションテーブル)
図4は、アプリケーションテーブルの一例を示す説明図である。アプリケーションテーブル400は、アプリID、スレッドID、依存スレッドID、アクセス頻度、負荷量のフィールドを有している。
図4は、アプリケーションテーブルの一例を示す説明図である。アプリケーションテーブル400は、アプリID、スレッドID、依存スレッドID、アクセス頻度、負荷量のフィールドを有している。
アプリIDのフィールドには、各アプリケーションを識別するための識別情報が登録される。スレッドIDのフィールドには、各スレッドを識別するための識別情報が登録される。依存スレッドIDのフィールドには、同一レコードのスレッドIDのフィールドに識別情報が登録されたスレッドと依存関係のあるスレッドの識別情報が登録される。
アクセス頻度のフィールドには、同一レコードのスレッドIDのフィールドに識別情報が登録されたスレッドから2次キャッシュ203への単位時間あたりのアクセス回数が登録される。負荷量のフィールドには、同一レコードのスレッドIDのフィールドに識別情報が登録されたスレッドの単位時間当たりの実行時間の比率が登録される。アクセス頻度や負荷量は、各スレッドのコンパイル時の解析およびシミュレーション結果に基づいて登録される。
フィールドに情報が設定されることで、アプリ情報(たとえば、アプリ情報401-1~401-4)がレコードとして記憶されている。アプリケーションテーブル400は、RAM209、ROM210、フラッシュROM211などの記憶装置に記憶されている。さらに、2次キャッシュ203や1次キャッシュ221などに複製されたアプリケーションテーブル400が記憶されていてもよい。
図5は、割当テーブルの一例を示す説明図である。割当テーブル500は、アプリID、スレッドID、割当先CPUIDのフィールドを有している。アプリIDのフィールドには、各アプリケーションを識別するための識別情報が登録される。スレッドIDのフィールドには、各スレッドを識別するための識別情報が登録される。割当先CPUIDのフィールドには、同一レコードのスレッドIDのフィールドに識別情報が登録されたスレッドの割当先CPUの識別情報が登録される。
各フィールドに情報が設定されることで、割当情報(たとえば、割当情報501-1~501-5)がレコードとして記憶されている。割当テーブル500は、RAM209、ROM210、フラッシュROM211などの記憶装置に記憶されている。さらに、2次キャッシュ203や1次キャッシュ221などに複製されたアプリケーションテーブル400が記憶されていてもよい。
(OS231-i(i=1~4)の機能例)
図6は、OS231-iの機能例を示すブロック図である。OS231-iは、受付部601-iと、判断部602-iと、比較部603-iと、グループ化設定部604-iと、変更部605-iと、実行部606-iと、を有している。受付部601-iから変更部605-iを有するOS231-iがフラッシュROM211などのストレージに記憶されている。CPU201-iが該記憶装置にアクセスして該OS231-iを読み出し、該OS231-i内にコーディングされている処理を実行することにより、該受付部601-iから実行部606-iの処理が実行される。ここでは、i=1を例に挙げて説明する。
図6は、OS231-iの機能例を示すブロック図である。OS231-iは、受付部601-iと、判断部602-iと、比較部603-iと、グループ化設定部604-iと、変更部605-iと、実行部606-iと、を有している。受付部601-iから変更部605-iを有するOS231-iがフラッシュROM211などのストレージに記憶されている。CPU201-iが該記憶装置にアクセスして該OS231-iを読み出し、該OS231-i内にコーディングされている処理を実行することにより、該受付部601-iから実行部606-iの処理が実行される。ここでは、i=1を例に挙げて説明する。
受付部601-1は、イベントを受け付ける。マスタOSが受け付けるイベントとしては、スレッドの生成、スレッドのディスパッチ、スレッドの切り替えやスレッドの実行終了が挙げられる。スレーブOSが受け付けるイベントとしては、スレッドのディスパッチ、スレッドの切り替えやスレッドの実行終了が挙げられる。ここでは、イベントがスレッドの切り替えの場合を例に挙げて説明する。
受付部601-1は、スレッドの切り替えを受け付け、判断部602-1は、受付部601-1により切り替えが受け付けられたスレッド(第1のスレッド)と他のCPUで実行中のそれぞれのスレッドとに依存関係があるか否かを判断する。
たとえば、判断部602-1は、アプリケーションテーブル400から、第1のスレッドのIDをスレッドIDのフィールドに有するアプリ情報を検出する。たとえば、判断部602-1は、検出したアプリ情報の依存スレッドIDのフィールドに登録されているスレッドのIDを特定する。これにより、第1のスレッドと依存関係のあるスレッドのIDが特定される。
たとえば、判断部602-1は、プロセッサ間通信機能により他のOS231から、実行中のスレッドのIDを取得する。たとえば、判断部602-1は、特定したスレッドのIDと取得したスレッドのIDとを比較する。これにより、第1のスレッドと他のCPUで実行中のそれぞれのスレッドとに依存関係があるか否かが判断される。なお、判断結果は、RAM209、フラッシュROM211などの記憶装置に記憶される。
比較部603-1は、第1のスレッドがいずれのCPU201で実行中のスレッドとも依存関係がないと判断部602-1により判断された場合、第1のスレッドの2次キャッシュ203へのアクセス頻度を第1閾値と比較する。
たとえば、比較部603-1は、アプリケーションテーブル400から、第1のスレッドのIDをスレッドIDのフィールドに有するアプリ情報を検出する。たとえば、比較部603-1は、検出したアプリ情報のアクセス頻度のフィールドに登録されたアクセス頻度を特定する。たとえば、比較部603-1は、特定したアクセス頻度が第1閾値以上であるか否かを判断する。これにより、第1のスレッドの2次キャッシュ203へのアクセス頻度が第1閾値以上であるか否かが判断される。
比較部603-1は、第1のスレッドの2次キャッシュ203へのアクセス頻度が第1閾値以上であると判断した場合、第1のスレッドの負荷量を第2閾値と比較する。たとえば、比較部603-1は、検出したアプリ情報の負荷量のフィールドに登録された第1のスレッドの負荷量が、第2閾値以上であるか否かを判断する。
比較部603-1は、第1のスレッドの負荷量が第2閾値以上であると判断した場合、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大であるか否かを判断する。たとえば、比較部603-1は、制御信号RATEの値をクロック生成回路204から取得し、制御信号RATEの値が最大値であるか否かを判断する。上述最大値は4である。
判断部602-1は、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大でないと比較部603-1により判断された場合、CPU201-1を除く残余のCPUで実行中のスレッド間に依存関係があるか否かを判断する。たとえば、判断部602-1は、CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドとに依存関係があるか否かを判断する。たとえば、判断部602-1は、CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドとに依存関係があるか否かを判断する。たとえば、判断部602-1は、CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドとに依存関係があるか否かを判断する。具体的な判断方法については、CPU201-1で実行中のスレッドと、CPU201-2~201-4のそれぞれで実行中のスレッドとの依存関係の有無を判断した処理と同一処理であるため、詳細な説明は省略する。なお、判断結果は、RAM209、フラッシュROM211などの記憶装置に記憶される。
(例1)
図7は、例1を示す説明図である。図7では、丸印の中に符号が付されているものが、各符号に即したCPU201で実行中のスレッドを示している。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。そのため、図7では、CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドとを結ぶ矢印間に×印が付されている。
図7は、例1を示す説明図である。図7では、丸印の中に符号が付されているものが、各符号に即したCPU201で実行中のスレッドを示している。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。そのため、図7では、CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドとを結ぶ矢印間に×印が付されている。
図7では、CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドは依存関係がなく、CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドは依存関係がない。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドは依存関係がない。
グループ化設定部604-1は、依存関係に応じてCPUをグループ化する。ここで、1グループは、1CPU以上であり、直接的または間接的に依存関係があるスレッドを実行中のCPUを1グループとする。たとえば、グループ化設定部604-1が、各CPUを異なるグループに設定する。CPU201-1はグループG1に属し、CPU201-2はグループG2に属し、CPU201-3はグループG3に属し、CPU201-4はグループG4に属する。CPUグループ数GCは4である。なお、グループ化の設定結果は、RAM209、フラッシュROM211などの記憶装置に記憶される。
変更部605-1は、グループ化の設定結果に応じて各CPUへ供給するクロックの位相を変更し、CPUグループ数GCに応じて2次キャッシュ203へ供給するクロックの周波数を変更する。たとえば、変更部605-1は、制御信号CPUCTRL1の値を0から「4554」に変更する。クロック生成回路204は、制御信号CPUCTRL1の変化を検出する。クロック生成回路204は、制御信号CPUCTRL1の値に基づいて、制御信号CTRL2の値を「4」にし、制御信号CTRL3の値を「5」にし、制御信号CTRL4の値を「5」にし、制御信号RATEの値を「4」にする。
これにより、CPU201-1へ供給されるクロックの位相よりも90°(=360°/G)ずらされた位相のクロックがCPU201-2へ供給される。CPU201-2へ供給されるクロックの位相よりも90°ずらされた位相のクロックがCPU201-3へ供給される。CPU201-3へ供給されるクロックの位相よりも90°ずらされた位相のクロックがCPU201-4へ供給される。クロックCLK-2CMの周波数がクロックCLKの周波数の4倍となる。そして、実行部606-1は、変更部605-1による変更が終了後、第1のスレッドを実行する。すなわち、グループ間で供給されるクロックが非同期となり、クロックCLK-2CMの周波数がいずれのグループとも同期する周波数となる。
(例2)
図8は、例2を示す説明図である。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドは依存関係がない。CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドは依存関係がない。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドは直接的に依存関係がある。×印の矢印間は、依存関係がないことを示し、○印の矢印間は、依存関係があることを示している。
図8は、例2を示す説明図である。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドは依存関係がない。CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドは依存関係がない。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドは直接的に依存関係がある。×印の矢印間は、依存関係がないことを示し、○印の矢印間は、依存関係があることを示している。
グループ化設定部604-1は、CPU201-1をグループG1にし、CPU201-2をグループG2にし、CPU201-3とCPU201-4をグループG3にする。CPUグループ数GCは3である。なお、グループ化の設定結果は、RAM209、フラッシュROM211などの記憶装置に記憶される。
変更部605-1は、CPUグループ数GCに応じて各CPUへ供給するクロックの位相を変更し、グループ数に応じて2次キャッシュ203へ供給するクロックの周波数を変更する。たとえば、変更部605-1は、制御信号CPUCTRL1の値を0から「3443」に変更する。クロック生成回路204は、制御信号CPUCTRL1の変化を検出する。クロック生成回路204は、制御信号CPUCTRL1の値に基づいて、制御信号CTRL2の値を「3」にし、制御信号CTRL3の値を「4」にし、制御信号CTRL4の値を「4」にし、制御信号RATEの値を「3」にする。
これにより、CPU201-1へ供給されるクロックの位相よりも120°(=360°/CPUグループ数GC=360°/3)ずらされた位相のクロックがCPU201-2へ供給される。CPU201-2へ供給されるクロックの位相よりも120°ずらされた位相のクロックがCPU201-3へ供給される。CPU201-2へ供給されるクロックの位相よりも120°ずらされた位相のクロックがCPU201-4へ供給される。クロックCLK-2CMの周波数がクロックCLKの周波数の3倍となる。そして、実行部606-1は、変更部605-1による変更が終了後、第1のスレッドを実行する。
(例3)
図9は、例3を示す説明図である。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。図9では、CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドには依存関係がある。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドには依存関係がある。CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドには直接的に依存関係がないが、CPU201-3を介して間接的に依存関係がある。
図9は、例3を示す説明図である。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2~201-4のそれぞれで実行中のスレッドには依存関係がない。図9では、CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドには依存関係がある。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドには依存関係がある。CPU201-2で実行中のスレッドとCPU201-4で実行中のスレッドには直接的に依存関係がないが、CPU201-3を介して間接的に依存関係がある。
グループ化設定部604-1は、CPU201-1をグループG1にし、CPU201-2とCPU201-3とCPU201-4をグループG2にする。CPUグループ数GCは2である。
変更部605-1は、CPUグループ数GCに応じて各CPUへ供給するクロックの位相を変更し、グループ数に応じて2次キャッシュ203へ供給するクロックの周波数を変更する。たとえば、変更部605-1は、制御信号CPUCTRL1の値を0から「2222」に変更する。クロック生成回路204は、制御信号CPUCTRL1の変化を検出する。クロック生成回路204は、制御信号CPUCTRL1の値に基づいて、制御信号CTRL2の値を「2」にし、制御信号CTRL3の値を「2」にし、制御信号CTRL4の値を「2」にし、制御信号RATEの値を「2」にする。
これにより、CPU201-1へ供給されるクロックの位相よりも180°(=360°/G)ずらされた位相(逆相)のクロックがCPU201-2へ供給される。CPU201-2へ供給されるクロックの位相と逆相のクロックがCPU201-3へ供給される。CPU201-2へ供給されるクロックの位相と逆相のクロックがCPU201-4へ供給される。クロックCLK-2CMの周波数がクロックCLKの周波数の2倍となる。そして、実行部606-1は、変更部605-1による変更が終了後、第1のスレッドを実行する。
(例4)
また、判断部602-1は、受付部601-1により切り替えが受け付けられた第1のスレッドと他のCPUで実行中のそれぞれのスレッドとに依存関係があると判断した場合、すべてのCPUで実行中のスレッド間に依存関係があるか否かを判断する。
また、判断部602-1は、受付部601-1により切り替えが受け付けられた第1のスレッドと他のCPUで実行中のそれぞれのスレッドとに依存関係があると判断した場合、すべてのCPUで実行中のスレッド間に依存関係があるか否かを判断する。
図10は、例4を示す説明図である。CPU201-1で切り替えが発生した第1のスレッドとCPU201-2で実行中のスレッドは直接的に依存関係がある。CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドは直接的に依存関係がある。CPU201-3で実行中のスレッドとCPU201-4で実行中のスレッドは直接的に依存関係がある。
CPU201-1で切り替えが発生した第1のスレッドとCPU201-3で実行中のスレッドは、直接的に依存関係がないが、CPU201-2で実行中のスレッドを介して間接的に依存関係がある。CPU201-1で切り替えが発生した第1のスレッドとCPU201-4で実行中のスレッドは、直接的に依存関係がないが、CPU201-2で実行中のスレッドとCPU201-3で実行中のスレッドを介して間接的に依存関係がある。
たとえば、グループ化設定部604-1は、CPU201-1~201-4をグループG1にする。CPUグループ数GCは1である。なお、グループ化の設定結果は、RAM209、フラッシュROM211などの記憶装置に記憶される。
変更部605-1は、CPUグループ数GCに応じて各CPUへ供給するクロックの位相を変更し、CPUグループ数GCに応じて2次キャッシュ203へ供給するクロックの周波数を変更する。たとえば、変更部605-1は、制御信号CPUCTRL1の値を0から「1111」に変更する。クロック生成回路204は、制御信号CPUCTRL1の変化を検出する。クロック生成回路204は、制御信号CPUCTRL1の値に基づいて、制御信号CTRL2の値を「1」にし、制御信号CTRL3の値を「1」にし、制御信号CTRL4の値を「1」にし、制御信号RATEの値を「1」にする。
これにより、クロックCLKと同相のクロックが各CPUへ供給される。クロックCLK-2CMの周波数がクロックCLKの周波数と同一となる。そして、実行部606-1は、変更部605-1による変更が終了後、第1のスレッドを実行する。
(OS231-iによるスレッド処理手順)
図11および図12は、OS231-iによるスレッド処理手順の一例を示すフローチャートである。OS231-iは、受付部601-iにより、イベントの発生を受け付けたか否かを判断する(ステップS1101)。OS231-iは、イベントの発生を受け付けていないと判断した場合(ステップS1101:No)、ステップS1101へ戻る。OS231-iは、ディスパッチを受け付けると(ステップS1101:ディスパッチ)、ステップS1123へ移行する。
図11および図12は、OS231-iによるスレッド処理手順の一例を示すフローチャートである。OS231-iは、受付部601-iにより、イベントの発生を受け付けたか否かを判断する(ステップS1101)。OS231-iは、イベントの発生を受け付けていないと判断した場合(ステップS1101:No)、ステップS1101へ戻る。OS231-iは、ディスパッチを受け付けると(ステップS1101:ディスパッチ)、ステップS1123へ移行する。
OS231-iは、スレッドの実行終了を受け付けたと判断した場合(ステップS1101:実行終了)、実行待ちのスレッドがあるか否かを判断する(ステップS1102)。実行待ちのスレッドがあるか否かについては、ランキュー241-iにコンテキスト情報のポインタが登録されているか否かによって判断される。OS231-iは、実行待ちのスレッドがないと判断した場合(ステップS1102:No)、ステップS1116へ移行する。OS231-iは、実行待ちのスレッドがあると判断した場合(ステップS1102:Yes)、ステップS1103へ移行する。
ステップS1101において、OS231-iは、スレッドのスイッチを受け付けたと判断した場合(ステップS1101:スイッチ)、ステップS1103へ移行する。ステップS1101のスイッチ、またはステップS1102のYesのつぎに、OS231-iが、判断部602-iにより、つぎに実行するスレッド(第1のスレッド)と他のCPUで実行中のスレッドとに依存関係があるか否かを判断する(ステップS1103)。つぎに実行するスレッドとは、スレッドのスイッチの場合にはスイッチ後のスレッドであり、スレッドの実行終了の場合にはランキュー241-iの先頭にコンテキスト情報のポインタが登録されているスレッドである。
OS231-iは、第1のスレッドと他のCPUで実行中のスレッドとに依存関係があると判断した場合(ステップS1103:Yes)、他のCPUで実行中のスレッド間の依存関係を確認する(ステップS1104)。OS231-iは、すべてのCPUで直接的または間接的に依存関係があるか否かを判断する(ステップS1105)。OS231-iは、すべてのCPUで依存関係があると判断した場合(ステップS1105:Yes)、すべてのCPUに供給するクロックの位相を同一位相に変更する(ステップS1106)。OS231-iは、2次キャッシュ203に供給するクロックの周波数をデフォルトに変更し(ステップS1107)、ステップS1123へ移行する。
ステップS1105において、OS231-iは、すべてのCPUで依存関係があると判断しなかった場合(ステップS1105:No)、ステップS1112へ移行する。ステップS1103において、OS231-iは、第1のスレッドと他のCPUで実行中のスレッドとに依存関係がないと判断した場合(ステップS1103:No)、第1のスレッドのメモリアクセス頻度>所定頻度であるか否かを判断する(ステップS1108)。所定頻度は第1閾値である。OS231-iは、第1のスレッドのメモリアクセス頻度>所定頻度でないと判断した場合(ステップS1108:No)、ステップS1116へ移行する。OS231-iは、第1のスレッドのメモリアクセス頻度>所定頻度であると判断した場合(ステップS1108:Yes)、第1のスレッドの負荷量>所定負荷量であるか否かを判断する(ステップS1109)。所定負荷量は第2閾値である。
OS231-iは、第1のスレッドの負荷量>所定負荷量でないと判断した場合(ステップS1109:No)、ステップS1116へ移行する。OS231-iは、第1のスレッドの負荷量>所定負荷量であると判断した場合(ステップS1109:Yes)、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大であるか否かを判断する(ステップS1110)。OS231-iは、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大であると判断した場合(ステップS1110:Yes)、ステップS1123へ移行する。OS231-iは、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大でないと判断した場合(ステップS1110:No)、判断部602-iにより、他のCPUで実行中のスレッド間の依存関係を確認する(ステップS1111)。
OS231-iは、直接的または間接的に依存関係のあるCPUごとにグループ化し(ステップS1112)、CPUグループ数GCを決定する(ステップS1113)。OS231-iは、グループ化したCPUごとに該CPUへ供給するクロックの位相を変更し(ステップS1114)、CPUグループ数GCに基づいて、2次キャッシュ203に供給するクロックの周波数を変更し(ステップS1115)、ステップS1123へ移行する。
ステップS1102のNo、ステップS1108のNo、またはステップS1109のNoのつぎに、OS231-iは、比較部603-iにより、スイッチ前に実行していたスレッドまたは実行終了したスレッドのメモリアクセス頻度>所定頻度であるかを判断する(ステップS1116)。OS231-iは、スイッチ前に実行していたスレッドまたは実行終了したスレッドのメモリアクセス頻度>所定頻度でないと判断した場合(ステップS1116:No)、ステップS1123へ移行する。OS231-iは、スイッチ前に実行していたスレッドまたは実行終了したスレッドのメモリアクセス頻度>所定頻度であると判断した場合(ステップS1116:Yes)、ステップS1117へ移行する。
OS231-iは、スイッチ前に実行していたスレッドまたは実行終了したスレッドの負荷量>所定負荷量であるか否かを判断する(ステップS1117)。OS231-iは、スイッチ前に実行していたスレッドまたは実行終了したスレッドの負荷量>所定負荷量でないと判断した場合(ステップS1117:No)、ステップS1123へ移行する。
OS231-iは、スイッチ前に実行していたスレッドまたは実行終了したスレッドの負荷量>所定負荷量であると判断した場合(ステップS1117:Yes)、CPUグループ数GCをデクリメントする(ステップS1118)。OS231-iは、他のCPUで実行中のスレッド間の依存関係を確認し(ステップS1119)、減らしたCPUグループ数GCと依存関係に沿ってCPU201をグループ化する(ステップS1120)。たとえば、依存関係に沿ってCPU数が均等になるようにCPUグループ数GC分のグループを作成することとしてもよい。
OS231-iは、グループ化したCPUごとに該CPUへ供給するクロックの位相を変更する(ステップS1121)。OS231-iは、CPUグループ数GCに基づいて、2次キャッシュ203に供給するクロックの周波数を変更し(ステップS1122)、ステップS1123へ移行する。OS231-iは、実行部606-iにより、第1のスレッドを実行し(ステップS1123)、ステップS1101へ戻る。ステップS1123は、ステップS1101のディスパッチ、ステップS1107、ステップS1110のYes、ステップS1115、ステップS1116のNo、ステップS1117のNo、またはステップS1122のつぎに実行される。
(OS231-1によるスレッド処理手順)
図13および図14は、OS231-1によるスレッド処理手順の一例を示すフローチャートである。OS231-1が、受付部601-iにより、スレッドの生成を受け付けたか否かを判断する(ステップS1301)。OS231-1が、スレッドの生成を受け付けていないと判断した場合(ステップS1301:No)、ステップS1301へ戻る。
図13および図14は、OS231-1によるスレッド処理手順の一例を示すフローチャートである。OS231-1が、受付部601-iにより、スレッドの生成を受け付けたか否かを判断する(ステップS1301)。OS231-1が、スレッドの生成を受け付けていないと判断した場合(ステップS1301:No)、ステップS1301へ戻る。
OS231-1が、スレッドの生成を受け付けたと判断した場合(ステップS1301:Yes)、生成されたスレッドが他のCPUで実行中のスレッドと依存関係があるか否かを判断する(ステップS1302)。OS231-1が、生成されたスレッドが他のCPUで実行中のスレッドと依存関係があると判断した場合(ステップS1302:Yes)、他のCPUで実行中のスレッド間の依存関係を確認する(ステップS1303)。OS231-1が、すべてのCPUで直接的または間接的に依存関係があるか否かを判断する(ステップS1304)。OS231-1が、すべてのCPUで直接的または間接的に依存関係がないと判断した場合(ステップS1304:No)、ステップS1313へ移行する。
OS231-1が、すべてのCPUで直接的または間接的に依存関係があると判断した場合(ステップS1304:Yes)、すべてのCPUに供給するクロックの位相を同一位相に変更する(ステップS1305)。OS231-1が、2次キャッシュ203に供給するクロックの周波数をデフォルトに変更し(ステップS1306)、負荷が最小のCPUに生成されたスレッドを割り当て(ステップS1307)、ステップS1301へ戻る。負荷が最小のCPUについては、まず、OS231-1が、割当テーブル500を用いて各CPUに割り当てられているスレッドを特定する。OS231-1が、アプリケーションテーブル400を参照し、特定したスレッドの負荷量を検索する。OS231-1が、CPUごとに割当済のスレッドの検索した負荷量の合計値を算出し、合計値が最小のCPUを負荷が最小のCPUとして特定する。
OS231-1が、生成されたスレッドが他のCPUで実行中のスレッドと依存関係がないと判断した場合(ステップS1302:No)、生成されたスレッドのメモリアクセス頻度>所定頻度であるか否かを判断する(ステップS1308)。OS231-1が、生成されたスレッドのメモリアクセス頻度>所定頻度でないと判断した場合(ステップS1308:No)、ステップS1311へ移行する。
OS231-1が、生成されたスレッドのメモリアクセス頻度>所定頻度であると判断した場合(ステップS1308:Yes)、生成されたスレッドの負荷量>所定負荷量であるか否かを判断する(ステップS1309)。OS231-1が、生成されたスレッドの負荷量>所定負荷量でないと判断した場合(ステップS1309:No)、ステップS1311へ移行する。
OS231-1が、生成されたスレッドの負荷量>所定負荷量であると判断した場合(ステップS1309:Yes)、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大であるか否かを判断する(ステップS1310)。OS231-1が、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大であると判断した場合(ステップS1310:Yes)、ステップS1311へ移行する。ステップS1308のNo、ステップS1309のNo、またはステップS1310のYesのつぎに、OS231-1が、負荷が最小のCPUに生成されたスレッドを割り当て(ステップS1311)、ステップS1301へ戻る。
ステップS1310において、OS231-1が、2次キャッシュ203へ供給するクロックの周波数の逓倍率が最大でないと判断した場合(ステップS1310:No)、他のCPUで実行中のスレッド間の依存関係を確認する(ステップS1312)。OS231-1が、直接的または間接的に依存関係のあるCPUごとにグループ化し(ステップS1313)、CPUグループ数GCとグループ化されたCPUに基づいて、各CPUへ供給するクロックの位相を変更する(ステップS1314)。OS231-1が、CPUグループ数GCに基づいて、2次キャッシュ203に供給するクロックの周波数を変更し(ステップS1315)、ステップS1301へ戻る。
(クロック生成回路204による変更処理手順)
図15は、クロック生成回路204による変更処理手順の一例を示すフローチャートである。まず、クロック生成回路204が、各CPUからの制御命令を受け付けたか否かを判断する(ステップS1501)。制御命令とは、たとえば、制御信号CPUCTRL1からCPUCTRL4のいずれかの「0000」から変更値への変化である。
図15は、クロック生成回路204による変更処理手順の一例を示すフローチャートである。まず、クロック生成回路204が、各CPUからの制御命令を受け付けたか否かを判断する(ステップS1501)。制御命令とは、たとえば、制御信号CPUCTRL1からCPUCTRL4のいずれかの「0000」から変更値への変化である。
クロック生成回路204が、各CPUからの制御命令を受け付けたと判断した場合(ステップS1501:Yes)、制御信号を変更し(ステップS1502)、ステップS1501へ戻る。ここで、制御信号とは、たとえば、制御信号CTRL1からCTRL4や制御信号RATEである。クロック生成回路204が、各CPUからの制御命令を受け付けていないと判断した場合(ステップS1501:No)、ステップS1501へ戻る。
以上説明したように、スレッド処理方法、およびスレッド処理システムによれば、第1のCPUで実行される第1のスレッドと第2のCPUで実行される第2のスレッドに依存関係がないかを判断する。第1のスレッドと第2のスレッドとに依存関係がなく、かつ第1のスレッドの共有資源へのアクセス頻度が所定頻度以上であれば、第1のCPUへ供給するクロックの位相を第2のCPUへ供給するクロックの位相と異なる位相に変更する。
第1のスレッドのアクセス頻度が多いほど、第1のスレッドから共有資源へのアクセスが第2のスレッドから共有資源へのアクセスと衝突する可能性が高い。そのため、各CPUへ供給されるクロックの位相が異なることで、複数のCPUから共有資源へのアクセスが衝突することを減少させることができる。また、CPUへ供給されるクロックの位相が異なることで、ピーク電流を減少させることができる。
また、第1のCPUへ供給されるクロックの位相と第2のCPUに供給されるクロックの位相とが逆相となるように変更することにより、複数のCPUから共有資源へのアクセスが衝突することを減少させることができる。
また、第1のCPUへ供給されるクロックの位相を変更するとともに、複数のCPUへ供給するクロックの周波数を上げるのではなく、共有資源へのクロックの周波数を上げる。これにより、消費電力を抑制しつつ、複数のCPUから共有資源へのアクセスが衝突することを減少させることができ、マルチコアプロセッサシステムの性能を向上させることができる。
また、共有資源に供給されるクロックの周波数を第1のCPUへ供給されるクロックの周波数の2倍に変更する。複数のCPUから共有資源へのアクセスが衝突することを減少させることができ、複数のCPUから共有資源へのアクセスの集中により発生する待ち時間を削減することができる。
また、第1のスレッドを実行するときの負荷量を第2閾値と比較し、負荷量が第2閾値よりも大きいときに、依存関係を判断する。第1のスレッドの負荷量が大きいほど、第1のスレッドから共有資源へのアクセスが第2のスレッドから共有資源へのアクセスと衝突する可能性が高い。そのため、各CPUへ供給されるクロックの位相が異なることで、複数のCPUから共有資源へのアクセスが衝突することを減少させることができ、最小限に消費電力を抑制することができる。
また、第1のスレッドと第2のスレッドとに依存関係があるときは、第1のCPUへ供給されるクロックの位相を変更しない。これにより、第1のスレッドと第2のスレッドとで共有しているデータや排他制御に影響が生じるのを防止することができる。
また、依存関係がないとき、第1動作クロックの第1位相から第2位相への変更がされている場合、第1動作クロックの位相を第2位相から第1位相に変更する。これにより、複数のCPUから共有資源へのアクセスが衝突することを減少させることができる。
また、依存関係は、共有メモリまたは第1プロセッサのメモリに登録される。これにより、第1のスレッドと第2のスレッドとの依存関係を容易に判断することができ、処理時間を短縮化することができる。
また、依存関係があるスレッドを実行中のCPU群ごとにグループ化する。グループ化したCPU群が複数ある場合、CPU群ごとに該CPU群へ供給されるクロックの位相を異なるCPU群間で非同期となる位相に設定する。共有資源へ供給するクロックの周波数をいずれのCPU群とも同期する周波数に設定する。これにより、マルチコアプロセッサのCPU数が増加しても、アクセスの衝突を減少させることができ、マルチコアプロセッサの性能を向上させることができる。
なお、本実施の形態で説明したスレッド処理方法は、あらかじめ用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本スレッド処理プログラムは、ハードディスク、フレキシブルディスク、CD-ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本スレッド処理プログラムは、インターネット等のネットワークを介して配布してもよい。
200 マルチコアプロセッサシステム
201-1~201-4 CPU
203 2次キャッシュ
204 クロック生成回路
208 共有メモリ
400 アプリケーションテーブル
201-1~201-4 CPU
203 2次キャッシュ
204 クロック生成回路
208 共有メモリ
400 アプリケーションテーブル
Claims (15)
- 第1スレッドの実行命令を第1プロセッサに供給し、
前記第1スレッドと第2プロセッサで実行される第2スレッドとの依存関係を判断し、
前記第1スレッドの共有メモリまたは共有キャッシュメモリへのアクセス頻度を第1閾値と比較し、
前記アクセス頻度が第1閾値よりも大きいとき、かつ前記依存関係がないと判断されるときは、前記第1プロセッサの第1動作クロックの位相を変更すること、
を特徴とするスレッド処理方法。 - 前記第1動作クロックの位相を前記第2プロセッサの第2動作クロックと逆相になるように変更すること、
を特徴とする請求項1に記載のスレッド処理方法。 - 前記第1動作クロックの位相を変更するとき、前記共有メモリまたは共有キャッシュメモリに供給される動作クロックの周波数を変更すること、
を特徴とする請求項1または請求項2に記載のスレッド処理方法。 - 前記動作クロックの周波数を2倍に変更すること、
を特徴とする請求項3に記載のスレッド処理方法。 - 前記第1スレッドを実行するときの第1負荷を第2閾値と比較し、
前記第1負荷が前記第2閾値よりも大きく、前記アクセス頻度が第1閾値よりも大きく、かつ前記依存関係がないと判断されるときは、前記第1プロセッサの第1動作クロックの位相を変更すること、
を特徴とする請求項1乃至請求項4の何れか一に記載のスレッド処理方法。 - 前記依存関係があるときは、前記第1動作クロックの位相を変更しないこと、
を特徴とする請求項1乃至請求項5の何れか一に記載のスレッド処理方法。 - 前記依存関係がないとき、前記第1動作クロックの第1位相から第2位相へ変更されていた場合には、前記第1動作クロックの位相を前記第2位相から前記第1位相に変更すること、
を特徴とする請求項1乃至請求項6の何れか一に記載のスレッド処理方法。 - 前記依存関係は、前記共有メモリまたは前記第1プロセッサのメモリに登録されること、
を特徴とする請求項1乃至請求項7の何れか一に記載のスレッド処理方法。 - 依存関係があるスレッド間を関連付けるテーブルへアクセス可能な複数のコアのうちの一のコアが、
前記複数のコアの各コアで実行中のスレッド間に直接的または間接的に依存関係があるか否かを、前記テーブルを参照することで判断し、
判断結果に基づいて、前記複数のコアを直接的または間接的に依存関係があるスレッドを実行するコア群ごとにグループ化し、
前記グループ化したコア群が複数ある場合、前記コア群ごとに前記コア群へ供給するクロックの位相を前記コア群間で非同期となる位相に設定し、
前記複数のコアで共有する共有資源へ供給するクロックの周波数をいずれのコア群とも同期する周波数に設定すること、
を特徴とするスレッド処理方法。 - 第1プロセッサと、
前記第1プロセッサと第2プロセッサとがアクセス可能な共有メモリまたは共有キャッシュメモリと、
前記第1プロセッサまたは前記共有メモリに供給される動作クロックを制御するクロック制御ユニットと、
を含み、
前記クロック制御ユニットは、
前記第1プロセッサで実行される第1スレッドの前記共有メモリまたは前記共有キャッシュメモリへのアクセス頻度と第1閾値との比較結果と前記第1スレッドと前記第2プロセッサが実行する第2スレッドとの依存関係とに基づいて、前記第1プロセッサの第1動作クロックの位相を変更すること、
を特徴とするスレッド処理システム。 - 前記クロック制御ユニットは、前記比較結果が前記アクセス頻度が前記第1閾値よりも大きいことを示すとともに前記依存関係があるときに、前記第1動作クロックの位相を変更すること、
を特徴とする請求項10に記載のスレッド処理システム。 - 前記クロック制御ユニットは、前記第1プロセッサが前記第1スレッドを実行するときの第1負荷と第2閾値との比較結果に基づいて、前記第1プロセッサの第1動作クロックの位相を変更すること、
を特徴とする請求項10または請求項11に記載のスレッド処理システム。 - 前記クロック制御ユニットは、前記第1動作クロックの位相を前記第2プロセッサの第2動作クロックと逆相になるように変更すること、
を特徴とする請求項10乃至請求項12の何れか一に記載のスレッド処理システム。 - 前記クロック制御ユニットは、前記第1動作クロックの位相を変更するとき、前記共有メモリまたは共有キャッシュメモリに供給される動作クロックの周波数を変更すること、
を特徴とする請求項10乃至請求項12の何れか一に記載のスレッド処理システム。 - 前記クロック制御ユニットは、前記動作クロックの周波数を2倍に変更すること、
を特徴とする請求項14に記載のスレッド処理システム。
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP11864094.5A EP2701073B1 (en) | 2011-04-18 | 2011-04-18 | Thread processing method and thread processing system |
| PCT/JP2011/059570 WO2012144011A1 (ja) | 2011-04-18 | 2011-04-18 | スレッド処理方法、およびスレッド処理システム |
| JP2013510762A JP5679047B2 (ja) | 2011-04-18 | 2011-04-18 | スレッド処理方法、およびスレッド処理システム |
| US14/057,281 US9507645B2 (en) | 2011-04-18 | 2013-10-18 | Thread processing method for using a multi-core processor and systems therefor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2011/059570 WO2012144011A1 (ja) | 2011-04-18 | 2011-04-18 | スレッド処理方法、およびスレッド処理システム |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US14/057,281 Continuation US9507645B2 (en) | 2011-04-18 | 2013-10-18 | Thread processing method for using a multi-core processor and systems therefor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012144011A1 true WO2012144011A1 (ja) | 2012-10-26 |
Family
ID=47041161
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2011/059570 Ceased WO2012144011A1 (ja) | 2011-04-18 | 2011-04-18 | スレッド処理方法、およびスレッド処理システム |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US9507645B2 (ja) |
| EP (1) | EP2701073B1 (ja) |
| JP (1) | JP5679047B2 (ja) |
| WO (1) | WO2012144011A1 (ja) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103412848A (zh) * | 2013-05-11 | 2013-11-27 | 中国科学技术大学 | 一种四核处理器系统共享单一程序存储器的方法 |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US10101786B2 (en) | 2014-12-22 | 2018-10-16 | Intel Corporation | Holistic global performance and power management |
| US9477533B2 (en) * | 2014-12-26 | 2016-10-25 | Intel Corporation | Progress meters in parallel computing |
| CN105912405B (zh) * | 2016-04-28 | 2019-01-29 | 浪潮(北京)电子信息产业有限公司 | 一种任务部署方法及装置 |
| CN116057494A (zh) * | 2020-09-04 | 2023-05-02 | 哲库科技有限公司 | 用于提高微控制器性能的配对的处理单元架构 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63307529A (ja) * | 1987-06-09 | 1988-12-15 | Nec Corp | 演算処理ユニット間の通信制御方式 |
| JPH01142940A (ja) * | 1987-11-30 | 1989-06-05 | Toshiba Corp | マイクロプログラム制御装置 |
| JP2003108389A (ja) * | 2001-09-27 | 2003-04-11 | Fujitsu Ltd | スレッドスケジューリング方式 |
| JP2007328415A (ja) * | 2006-06-06 | 2007-12-20 | Univ Waseda | ヘテロジニアス・マルチプロセッサシステムの制御方法及びマルチグレイン並列化コンパイラ |
| JP2008518311A (ja) | 2004-10-25 | 2008-05-29 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | マルチプロセッサシステムにおいてクロックを切り替えるクロック切り替え方法、クロックを切り替えるユニットおよびクロックを切り替えるユニットを有するシステム |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5787488A (en) * | 1993-04-22 | 1998-07-28 | Analog Devices, Inc. | Multi-phase multi-access pipeline memory system |
| US7496918B1 (en) * | 2004-06-01 | 2009-02-24 | Sun Microsystems, Inc. | System and methods for deadlock detection |
| JP2007328461A (ja) * | 2006-06-06 | 2007-12-20 | Matsushita Electric Ind Co Ltd | 非対称マルチプロセッサ |
| JP5079342B2 (ja) * | 2007-01-22 | 2012-11-21 | ルネサスエレクトロニクス株式会社 | マルチプロセッサ装置 |
| US8069446B2 (en) * | 2009-04-03 | 2011-11-29 | Microsoft Corporation | Parallel programming and execution systems and techniques |
-
2011
- 2011-04-18 WO PCT/JP2011/059570 patent/WO2012144011A1/ja not_active Ceased
- 2011-04-18 EP EP11864094.5A patent/EP2701073B1/en not_active Not-in-force
- 2011-04-18 JP JP2013510762A patent/JP5679047B2/ja not_active Expired - Fee Related
-
2013
- 2013-10-18 US US14/057,281 patent/US9507645B2/en not_active Expired - Fee Related
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS63307529A (ja) * | 1987-06-09 | 1988-12-15 | Nec Corp | 演算処理ユニット間の通信制御方式 |
| JPH01142940A (ja) * | 1987-11-30 | 1989-06-05 | Toshiba Corp | マイクロプログラム制御装置 |
| JP2003108389A (ja) * | 2001-09-27 | 2003-04-11 | Fujitsu Ltd | スレッドスケジューリング方式 |
| JP2008518311A (ja) | 2004-10-25 | 2008-05-29 | ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング | マルチプロセッサシステムにおいてクロックを切り替えるクロック切り替え方法、クロックを切り替えるユニットおよびクロックを切り替えるユニットを有するシステム |
| JP2007328415A (ja) * | 2006-06-06 | 2007-12-20 | Univ Waseda | ヘテロジニアス・マルチプロセッサシステムの制御方法及びマルチグレイン並列化コンパイラ |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP2701073A4 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103412848A (zh) * | 2013-05-11 | 2013-11-27 | 中国科学技术大学 | 一种四核处理器系统共享单一程序存储器的方法 |
| CN103412848B (zh) * | 2013-05-11 | 2016-05-25 | 中国科学技术大学 | 一种四核处理器系统共享单一程序存储器的方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP2701073B1 (en) | 2018-01-24 |
| US9507645B2 (en) | 2016-11-29 |
| JPWO2012144011A1 (ja) | 2014-07-28 |
| US20140053163A1 (en) | 2014-02-20 |
| JP5679047B2 (ja) | 2015-03-04 |
| EP2701073A4 (en) | 2014-12-24 |
| EP2701073A1 (en) | 2014-02-26 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3724582B2 (ja) | 命令実行ユニットのためのレジスタ・リネーミング回路 | |
| US8996761B2 (en) | Virtual queue processing circuit and task processor | |
| KR100403658B1 (ko) | 컴퓨터 프로세서 및 컴퓨터 처리 시스템 | |
| JP5679047B2 (ja) | スレッド処理方法、およびスレッド処理システム | |
| JP2014525632A (ja) | スクリプト・コードを有するマークアップ・コンテンツの高速プレゼンテーション | |
| JP5534002B2 (ja) | マルチコアプロセッサシステム、制御プログラム、および制御方法 | |
| GB2451845A (en) | Executing multiple threads using a shared register | |
| US20030135716A1 (en) | Method of creating a high performance virtual multiprocessor by adding a new dimension to a processor's pipeline | |
| JP4667206B2 (ja) | マルチコアモデルシミュレーションプログラム、該プログラムを記録した記録媒体、マルチコアモデルシミュレータ、およびマルチコアモデルシミュレーション方法 | |
| US20160179429A1 (en) | Controlling memory access conflict of threads on multi-core processor with set of highest priority processor cores based on a threshold value of issued-instruction efficiency | |
| TW201314463A (zh) | 以複數個引擎作資源與互連結構的分散式分配以支援指令序列的執行 | |
| US9626220B2 (en) | Computer system using partially functional processor core | |
| JP2008226236A (ja) | 構成可能なマイクロプロセッサ | |
| JP5321748B2 (ja) | マルチコアプロセッサシステム、スレッド制御方法、およびスレッド制御プログラム | |
| JP2024505440A (ja) | トリガ条件に依存する命令実行のための回路及び方法 | |
| JP4482275B2 (ja) | オペレーティングシステムサポートのために一定の時間基準を用いるマルチモード電力管理システムのハードウェアアーキテクチャ | |
| WO2006120367A1 (en) | A data processing apparatus and method employing multiple register sets | |
| TW201314462A (zh) | 以複數個引擎支援指令序列的執行之互連結構 | |
| CN102253708B (zh) | 一种微处理器硬件多线程动态变频控制装置及其应用方法 | |
| JPH0461390B2 (ja) | ||
| WO2012098684A1 (ja) | スケジューリング方法およびスケジューリングシステム | |
| JP6774147B2 (ja) | 制御装置 | |
| JP5811211B2 (ja) | マルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラム | |
| Korpan | RingBOOM: An Implementation of a Novel High-Performance Banked Microarchitecture | |
| JP5713091B2 (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: 11864094 Country of ref document: EP Kind code of ref document: A1 |
|
| ENP | Entry into the national phase |
Ref document number: 2013510762 Country of ref document: JP Kind code of ref document: A |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2011864094 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |