WO2011155046A1 - マルチコアプロセッサシステム、制御プログラム、および制御方法 - Google Patents

マルチコアプロセッサシステム、制御プログラム、および制御方法 Download PDF

Info

Publication number
WO2011155046A1
WO2011155046A1 PCT/JP2010/059875 JP2010059875W WO2011155046A1 WO 2011155046 A1 WO2011155046 A1 WO 2011155046A1 JP 2010059875 W JP2010059875 W JP 2010059875W WO 2011155046 A1 WO2011155046 A1 WO 2011155046A1
Authority
WO
WIPO (PCT)
Prior art keywords
cache
core
cpu
program
task
Prior art date
Application number
PCT/JP2010/059875
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 CN2010800672719A priority Critical patent/CN102934095A/zh
Priority to PCT/JP2010/059875 priority patent/WO2011155046A1/ja
Priority to JP2012519177A priority patent/JP5516728B2/ja
Priority to EP10852885.2A priority patent/EP2581833A4/en
Publication of WO2011155046A1 publication Critical patent/WO2011155046A1/ja
Priority to US13/708,215 priority patent/US20130097382A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0875Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with dedicated cache, e.g. instruction or stack
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/12Replacement control
    • G06F12/121Replacement control using replacement algorithms
    • G06F12/126Replacement control using replacement algorithms with special data handling, e.g. priority of data or instructions, handling errors or pinning
    • 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]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • G06F9/5088Techniques for rebalancing the load in a distributed system involving task migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0815Cache consistency protocols
    • G06F12/0831Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/507Low-level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/45Caching of specific data in cache memory
    • G06F2212/452Instruction code

Definitions

  • the present invention relates to a multi-core processor system, a control program, and a control method for controlling task assignment.
  • a CPU Central Processing Unit
  • a cache for example, data that is referred to many times in the program being executed.
  • Data that is frequently used is, for example, data that is referred to many times in the program being executed.
  • a program with a high execution frequency is, for example, a program of several steps executed at fixed time intervals (hereinafter referred to as “periodic execution program”).
  • a technique for scheduling the task to the same CPU as the CPU that was executing before the interruption is known (for example, the following patent document) 2).
  • cache misses can be reduced.
  • a technique for determining which task is to be associated with which local memory based on the degree of effective utilization of the local memory is known (see, for example, Patent Document 3 below). . Thereby, an increase in overhead due to data transfer can be prevented.
  • JP 2004-192403 A Japanese Patent Laid-Open No. 08-30562 Japanese Unexamined Patent Publication No. 04-338837
  • the execution code can be prevented from being evicted from the cache.
  • another task assigned to the CPU that executes the cyclic execution program is a task with a large cache miss
  • the cache area that can be used by the other task is reduced, and the cache miss of the other task increases. To do. As a result, there is a problem that the performance of the CPU is lowered.
  • the present invention eliminates a specific program from the cache, and can reduce the influence on the execution of a task assigned to the same CPU as the cyclic execution program. It is an object to provide a system, a control program, and a control method.
  • another core having a cache miss hit rate lower than that of a single core storing a specific program in a cache is identified from a multi-core processor based on the information amount of a task assigned to each core.
  • Specifying means, moving means for moving the specific program from the cache of the one core to a cache of another core specified by the specifying means, and the specific program of the other core by the moving means There is provided a multi-core processor system comprising setting means for setting an area in which the specific program is stored in the cache of the other core after being moved to the cache as a write-inhibited area.
  • the specific program is not evicted from the cache, and the effect on the execution of the task assigned to the same CPU as the cyclic execution program can be reduced. Play.
  • FIG. 2 is a functional block diagram of a multi-core processor system 100.
  • FIG. It is explanatory drawing which shows the example in which the area
  • 5 is a flowchart (part 1) illustrating a control processing procedure of the OS 141.
  • 6 is a flowchart (part 2) illustrating a control processing procedure of the OS 141.
  • 5 is a flowchart showing movement processing by a snoop controller 105. It is a flowchart which shows the write prohibition setting process by the next designation
  • the periodic execution program is a program that is executed at regular intervals and is not a program that is activated by another event. In general tasks, the execution timing and execution time are not determined, but in the cyclic execution program, there is no change in the execution timing and execution time.
  • An example of the periodic execution program is a mobile phone communication standby program. The mobile phone communication standby program periodically inquires of the base station for communication and detects communication regardless of what task the mobile phone is processing.
  • the multi-core processor is a processor having a plurality of cores. 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. In the present embodiment, in order to simplify the explanation, a processor group in which single-core processors are arranged in parallel will be described as an example.
  • FIG. 1 is a block diagram showing hardware of a multi-core processor system.
  • the multi-core processor system 100 includes a master CPU 101, slave CPUs 102 to 104, a shared memory 107, and a snoop controller 105.
  • Each CPU and the shared memory 107 are connected to each other via a bus 106.
  • Each CPU and the snoop controller 105 are connected to each other via a bus different from the bus 106.
  • the master CPU 101 and the slave CPUs 102 to 104 have, for example, a core, a register, and a cache, respectively.
  • the master CPU 101 executes the OS and controls the entire multi-core processor system 100.
  • the OS 141 has a control program for controlling which CPU each software process is assigned to, and has a function for controlling switching of tasks assigned to the master CPU 101.
  • the slave CPU 102 to slave CPU 104 execute OS 142 to OS 144, respectively.
  • the OS 142 to OS 144 have a function of controlling switching of tasks assigned to each CPU.
  • Each CPU cache has two types of caches: an instruction cache and a data cache.
  • the instruction cache is a cache that holds a program
  • the data cache is a cache that holds data used during execution of the program.
  • the master CPU 101 has an instruction cache 111 and a data cache 121 as caches, and the slave CPU 102 has an instruction cache 112 and a data cache 122 as caches.
  • the slave CPU 103 has an instruction cache 113 and a data cache 123 as caches, and the slave CPU 104 has an instruction cache 114 and a data cache 124 as caches.
  • the cache of each CPU grasps and manages the update state, and by exchanging update state information with other caches, the cache of each CPU can grasp which cache has the latest data.
  • the snoop controller 105 performs this information exchange.
  • Each CPU has a register.
  • the master CPU 101 has a register 131, and the slave CPU 102 has a register 132.
  • the slave CPU 103 has a register 133, and the slave CPU 104 has a register 134.
  • the snoop controller 105 when the snoop controller 105 receives a movement instruction including information relating to the migration source cache, the migration destination cache, and the migration target, the snoop controller 105 duplicates the migration target from the migration source cache, and copies the copied migration target to the migration destination. Store in the cache. As a result, the snoop controller 105 moves the movement target from the movement source cache to the movement destination cache.
  • the cache area in which the execution code of the cyclic execution program is stored is the same address area regardless of the CPU cache. For example, the user may determine in advance that the execution code of the cyclic execution program is stored in the top area of the cache.
  • the shared memory 107 is, for example, a memory shared by the master CPU 101 and the slave CPUs 102 to 104.
  • the shared memory 107 stores, for example, a process management table 151, a size table 152, identification information 153, and a program such as a boot program for the OS 141 to OS 144.
  • the shared memory 107 includes, for example, a ROM (Read Only Memory), a RAM (Random Access Memory), a flash ROM, and the like.
  • the ROM or flash ROM stores the program and the like, and the RAM is used as a work area between the master CPU 101 and the slave CPUs 102 to 104.
  • the program stored in the shared memory 107 is loaded on each CPU, thereby causing each CPU to execute a coded process.
  • the process management table 151 is information indicating, for example, to which CPU each task is assigned and whether the assigned CPU is executing the task. Each CPU reads the process management table 151 and stores it in the cache of each CPU. When the OS 141 assigns a task to any one of the master CPU 101 and the slave CPUs 102 to 104, the OS 141 registers to which CPU the task is assigned in the process management table 151.
  • each CPU registers in the process management table 151 which task has been executed.
  • each CPU deletes the information of the completed task from the process management table 151.
  • FIG. 2 is an explanatory diagram showing an example of the size table 152.
  • the size table 152 is a table showing the instruction code size of each task.
  • the size table 152 has a task name item 201 and an instruction code size item 202.
  • the task name item 201 holds the task name
  • the instruction code size item 202 holds the task instruction code size.
  • the instruction code size is, for example, the number of task steps.
  • the value of the instruction code size item 202 is 300.
  • FIG. 3 is an explanatory diagram showing an example of the identification information 153.
  • the identification information 153 is information indicating which task is a task of the periodic execution program.
  • the identification information 153 has a task name item 301.
  • the task G is determined to be a task of the periodic execution program based on the identification information 153.
  • FIG. 4 is a functional block diagram of the multi-core processor system 100.
  • the multi-core processor system 100 includes, for example, a specifying unit 401, a moving unit 402, and setting units 403 to 406.
  • the specifying unit 401 and the setting unit 403 are included in the OS 141 executed by the master CPU 101.
  • the moving unit 402 is included in the snoop controller 105.
  • the setting unit 404 has an OS 142 executed by the slave CPU 102.
  • the setting unit 405 has an OS 143 executed by the slave CPU 103.
  • the setting unit 406 has an OS 144 executed by the slave CPU 104.
  • the identifying unit 401 identifies, from the multi-core processor, another CPU having a cache miss hit rate lower than that of the one CPU storing the specific program in the cache based on the information amount of the task assigned to each CPU.
  • the information amount of each task is referred to as an instruction code size, and the instruction code size is used as the number of task steps.
  • the present invention is not limited thereto, and may be, for example, a task data size. If the instruction code size or data size is small, the area using the instruction cache is small, so the cache miss hit rate is small.
  • the periodic execution program is cited as a specific program. However, the present invention is not limited to this, and the program selected by the user may be the specific program.
  • the moving unit 402 moves the specific program from the cache of the one core to the cache of another core specified by the specifying unit 401.
  • the setting unit included in the OS operating on the specified CPU moves an area where the specific program is stored in the cache of the other CPU after the moving unit 402 moves the specific program to the cache of the other CPU. Set to a write-protected area. Further, the setting unit at the movement source cancels the prohibition setting of the area of the specific program that has been set in the write-protected area after the specific program is moved.
  • one core is the current designated CPU, and the other core is the next designated CPU.
  • FIG. 5 is an explanatory diagram showing an example in which the area loaded with the execution code 502 of the periodic execution program is locked.
  • the OS 141 loads the execution code 502 of the periodic execution program into the instruction cache 111 of the master CPU 101. Then, the OS 141 locks the area loaded with the execution code 502 by register setting. Locking the loaded area indicates setting the loaded area as a write-protected area.
  • Each CPU register has a cache register, and a cache work area can be set in the cache register. Therefore, by removing the loaded area from the work area of the cache, the loaded area is locked. Further, the OS 141 sets the current designation destination CPU and the next designation destination CPU in the master CPU 101.
  • FIG. 6 is an explanatory diagram showing an example in which a periodic execution program is executed.
  • the OS 141 monitors the execution waiting queue 501.
  • the OS 141 takes out (1) task G.
  • the waiting queue 501 is a queue that the OS 141 that is the master OS 141 has. For example, a task for which an assignment instruction is generated by a user operation is placed in the execution queue 501, and the OS 141 takes out the task from the execution queue 501, and the OS 141 determines which CPU to allocate.
  • the OS 141 determines whether or not the task G is a periodic execution program based on the identification information 153. Since the task G is a cyclic execution program, the OS 141 assigns the task G to the current designated CPU, and the OS 141 executes (2) task G.
  • FIG. 7 is an explanatory diagram showing assignment of tasks that are not periodic execution programs.
  • task A is assigned to the master CPU 101
  • task B and task E are assigned to the slave CPU 102
  • task C is assigned to the slave CPU 103
  • task D is assigned to the slave CPU 104.
  • the OS 141 takes out (1) a task from the execution queue 501 and determines whether or not the taken out task is a periodic execution program based on the identification information 153.
  • the extracted task is task F
  • task F is not a cyclic execution program.
  • the OS 141 assigns the task F to an arbitrary CPU.
  • (2) task F is assigned to the master CPU 101.
  • FIG. 8 is an explanatory diagram showing an example of calculating the total value of the instruction code size.
  • the OS 141 calculates (3) the total instruction code size of each CPU based on the size table 152. Since the instruction code size of task A is 300 and the instruction code size of task F is 250, the total instruction code size of the master CPU 101 is 550. Since the instruction code size of task B is 300 and the instruction code size of task E is 150, the total instruction code size of slave CPU 102 is 450.
  • the total instruction code size of slave CPU 103 is 400. Since the instruction code size of task D is 450, the total instruction code size of slave CPU 104 is 450.
  • the OS 141 specifies a CPU whose total instruction code size is smaller than the current designated CPU. That is, the OS 141 can specify a CPU having a cache miss hit rate smaller than the current designated CPU.
  • slave CPU 102 to slave CPU 104 are specified.
  • the OS 141 selects the slave CPU 103 having the smallest total instruction code size. That is, the OS 141 can specify the slave CPU 103 with the smallest cache miss hit rate among the CPUs with the cache miss hit rate smaller than the current designated destination CPU. The OS 141 (4) sets the identified slave CPU 103 as the next designated destination CPU.
  • FIG. 9 is an explanatory diagram showing an example of movement of the execution code 502.
  • the OS 141 instructs (5) the slave CPU 103, which is the next designation destination CPU, to pause execution.
  • the OS 143 (the OS operating on the slave CPU 103 which is the next designation destination CPU) temporarily stops the execution of the task C.
  • the OS 141 (6) notifies the snoop controller 105 of a movement instruction to move the execution code 502 of the cyclic execution program from the instruction cache of the current designated destination CPU to the instruction cache of the next designated destination CPU.
  • the movement source is the instruction cache of the current designation destination CPU
  • the movement destination is the instruction cache of the next designation destination CPU
  • the movement target is the execution code 502.
  • the snoop controller 105 receives the movement instruction, the snoop controller 105 (7) moves the execution code 502 of the periodic execution program from the instruction cache of the current designated destination CPU to the instruction cache of the next designated destination CPU.
  • the snoop controller 105 notifies the OS 141 of the completion of movement.
  • FIG. 10 is an explanatory diagram showing an example of locking an area in which the execution code 502 is stored.
  • the OS 141 (9) notifies the next designation destination CPU of a lock instruction to lock the area in which the execution code 502 is stored in the instruction cache area of the next designation destination CPU.
  • the OS 143 locks the execution object by (10) register setting, and the OS 143 notifies the OS 141 of (11) lock completion.
  • the OS 141 When the OS 141 receives the lock completion, (12) notifies the next designation destination CPU of a temporary stop release instruction. Then, the OS 143 cancels the suspension of the task C.
  • the OS 141 unlocks the instruction cache 111 of the master CPU 101 by (13) register setting.
  • the OS 141 sets (14) the current designated CPU as the slave CPU 103.
  • Control processing procedure of OS 141) 11 and 12 are flowcharts showing the control processing procedure of the OS 141.
  • the OS 141 acquires the size table 152 and the identification information 153 (step S1101), and sets the master CPU 101 in the current designated destination CPU and the next designated destination CPU (step S1102).
  • the OS 141 loads the execution code of the cyclic execution program into the instruction cache 111 of the master CPU 101 (step S1103), and locks the loaded execution code area (step S1104).
  • the OS 141 determines whether or not the master OS execution queue 501 is empty (step S1105). If the master OS execution queue 501 is empty (step S1105: Yes), the process returns to step S1105. The master OS is the OS 141. On the other hand, if the OS 141 determines that the master OS execution queue 501 is not empty (step S1105: No), the task is taken out from the master OS execution queue 501 (step S1106).
  • Step S1107 the OS 141 determines whether or not the extracted task is a periodic execution program.
  • step S1107: Yes the extracted task is assigned to the current designated CPU (step S1108), and the process proceeds to step S1105.
  • step S1107 determines that the extracted task is not a periodic execution program (step S1107: No)
  • the extracted task is assigned to an arbitrary CPU (step S1109).
  • the OS 141 calculates a total value of instruction code sizes of tasks assigned to each CPU (step S1110).
  • the OS 141 identifies a CPU whose calculation result is smaller than the current designated CPU (step S1111). That is, a CPU having a cache miss hit rate lower than the current designated CPU is specified. Then, the OS 141 determines whether or not the CPU whose calculation result is smaller than the current designated destination CPU is specified (step S1112), and if it is determined that the CPU is not specified (step S1112: No), the step The process returns to S1105.
  • the OS 141 determines that the small CPU has been identified (step S1112: Yes)
  • the identified CPU is set as the next designated CPU (step S1113). For example, when a plurality of CPUs are specified, the CPU with the smallest calculation result is designated as the next designation destination CPU. As a result, the cyclic execution program can be stored in the CPU with the smallest cache usage. Thereby, the influence on execution of other tasks can be minimized.
  • step S1114 the OS 141 notifies the next designation destination CPU of an execution suspension instruction.
  • step S1115 the OS 141 notifies the snoop controller 105 of an instruction to move the cyclic execution program from the instruction cache of the current designated CPU to the instruction cache of the next designated CPU (step S1115), and notifies the movement completion from the snoop controller 105. It is determined whether it has been accepted (step S1116).
  • step S1116 determines that the movement completion notification has not been received from the snoop controller 105 (step S1116: No)
  • the process returns to step S1116.
  • step S1116 determines that the movement completion notification has been received from the snoop controller 105 (step S1116: Yes)
  • step S1118 determines whether or not lock completion has been received from the next designated CPU (step S1118).
  • step S1118 No
  • step S1118 When the OS 141 determines that lock completion has been received from the next designated destination CPU (step S1118: Yes), it notifies the next designated destination CPU of a temporary stop release instruction (step S1119). Then, the OS 141 notifies the current designation destination CPU of a release instruction for releasing the lock of the instruction cache of the current designation destination CPU (step S1120).
  • step S1121 determines whether or not lock completion has been received from the next designated CPU.
  • step S1121: No the process returns to step S1121.
  • step S1121: Yes the current designated destination CPU is set as the next designated destination CPU (step S1122), and the process returns to step S1105.
  • FIG. 13 is a flowchart showing movement processing by the snoop controller 105.
  • the snoop controller 105 determines whether or not a movement instruction has been received (step S1301). If it is determined that a movement instruction has not been received (step S1301: No), the process returns to step S1301.
  • step S1301 determines that the movement instruction has been received (step S1301: Yes)
  • the execution code of the cyclic execution program is moved from the instruction cache of the current designated CPU to the instruction cache of the next designated CPU (step S1302).
  • step S1303 the snoop controller 105 notifies the master OS of the movement completion (step S1303), and returns to step S1301.
  • FIG. 14 is a flowchart showing a write prohibition setting process by the next designation destination CPU.
  • the next designation destination CPU determines whether or not a lock instruction has been accepted (step S1401).
  • step S1401: No the process returns to step S1401.
  • step S1401 when the next designation destination CPU determines that the lock instruction has been received (step S1401: Yes), the designated area is locked by setting a register relating to the cache (step S1402). Then, the next designation destination CPU notifies the master OS of the lock completion (step S1403).
  • the master OS is the OS 141.
  • FIG. 15 is a flowchart showing a pause process by the current designated CPU.
  • step S1501 it is determined whether or not the current designation destination CPU has received a lock release instruction. If the current designated CPU determines that the lock release instruction has not been accepted (step S1501: NO), the process returns to step S1501.
  • step S1501 when the current designated CPU determines that the lock release instruction has been received (step S1501: Yes), the designated area is unlocked by setting a register relating to the cache (step S1502). Then, the current designation destination CPU notifies the master OS of completion of cancellation (step S1503).
  • the cyclic execution program is moved to the cache of the CPU having a cache miss hit rate lower than that of the CPU storing the cyclic execution program. Further, the area storing the cyclic execution program in the low CPU cache is set as a write-protected area. This prevents the cyclic execution program from being reloaded because the cyclic execution program resides in the cache and is not evicted from the cache. Furthermore, even if the periodic execution program remains resident in the CPU cache, the influence on the execution of other tasks assigned to the CPU can be reduced. That is, it is possible to suppress the occurrence of a cache miss when executing another task different from the periodic execution program assigned to each CPU, and it is possible to prevent the performance of the CPU from deteriorating.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

 OS(141)は、マルチコアプロセッサから、各CPUに割り当てられたタスクの命令コードサイズの合計値を算出し、実行コード(502)が格納されているマスタCPU(101)よりも算出結果が小さいCPUを特定する。スレーブCPU(103)が特定される。スヌープコントローラ(105)は、スレーブCPU(103)の命令キャッシュ(111)からスレーブCPU(103)の命令キャッシュ(113)へ実行コード(502)を移動させる。OS(143)は、実行コード(502)がスレーブCPU(103)の命令キャッシュ(113)に移動させられた後、命令キャッシュ(113)のうち実行コードが格納された領域を書き込み禁止領域に設定することで、実行コード(502)を命令キャッシュ(113)に常駐させる。

Description

マルチコアプロセッサシステム、制御プログラム、および制御方法
 本発明は、タスクの割り当てを制御するマルチコアプロセッサシステム、制御プログラム、および制御方法に関する。
 従来からCPU(Central Processing Unit)はキャッシュを有しており、キャッシュには使用頻度の高いデータや実行頻度の高いプログラムの実行コードが格納されている(たとえば、下記特許文献1を参照。)。使用頻度の高いデータとは、たとえば、実行中のプログラム内で何度も参照されるデータである。実行頻度の高いプログラムとは、たとえば、一定時間ごとに実行される数ステップのプログラム(以下、「周期実行プログラム」と称する。)である。
 また、マルチコアプロセッサシステムにおいて、実行が中断されたタスクが再実行される場合、中断前に実行していたCPUと同一のCPUに該タスクをスケジューリングする技術が知られている(たとえば、下記特許文献2を参照。)。これにより、キャッシュミスを減らすことができる。さらに、ローカルメモリを有するマルチコアプロセッサシステムにおいて、ローカルメモリの有効活用度合いに基づいてどのローカルメモリにどのタスクを括り付けるかを決定する技術が知られている(たとえば、下記特許文献3を参照。)。これにより、データ転送によるオーバーヘッドの増加を防止することができる。
特開2004-192403号公報 特開平08-30562号公報 特開平04-338837号公報
 しかしながら、データロードが増加すると、キャッシュに格納されているデータやプログラムの実行コードの多くは追い出されてしまう。たとえば、ローカルメモリを有さないマルチコアプロセッサシステムにおいて、I/O(Input/Output)処理を多く行うタスクが一のCPUに割り当てられた場合、共有メモリからのデータロードが増加する。また、一のCPUが多くのタスクを実行すると、命令キャッシュに格納されている命令が頻繁に追い出される。
 命令コードサイズの大きいタスクが割り当てられたCPUや多くのタスクを実行するCPUと同一のCPUに周期実行プログラムが割り当てられた場合、周期実行プログラムの実行コードがキャッシュから追い出される確率が増加するという問題点があった。すなわち、CPUが周期実行プログラムの実行コードを共有メモリからキャッシュへ再ロードする回数が増加するという問題点があった。
 また、CPUが共有メモリから該実行コードを読み出す時間は該CPUがキャッシュから実行コードを読み出す時間よりも長いため、該CPUが該実行コードをキャッシュに再ロードせずに実行する場合、オーバーヘッドが増加してしまう問題点があった。
 そこで、たとえば、周期実行プログラムの実行コードが格納されているキャッシュの領域をロックすることにより、該実行コードがキャッシュから追い出されなくすることができる。しかしながら、該周期実行プログラムを実行するCPUに割り当てられた他のタスクがキャッシュミスの大きいタスクであると、該他のタスクで使用できるキャッシュの領域が減るため、該他のタスクのキャッシュミスが増大する。その結果、CPUの性能が低下するという問題点があった。
 本発明は、上述した従来技術による問題点を解消するため、特定のプログラムがキャッシュから追い出されず、周期実行プログラムと同一のCPUに割り当てられたタスクの実行に与える影響を小さくすることができるマルチコアプロセッサシステム、制御プログラム、および制御方法を提供することを目的とする。
 本発明の一観点によれば、マルチコアプロセッサから、特定のプログラムをキャッシュに格納する一のコアよりもキャッシュミスヒット率が低い他のコアを各コアに割り当てられたタスクの情報量に基づいて特定する特定手段と、前記特定のプログラムを前記一のコアのキャッシュから前記特定手段により特定された他のコアのキャッシュに移動させる移動手段と、前記移動手段により前記特定のプログラムが前記他のコアのキャッシュに移動させられた後、前記他のコアのキャッシュのうち前記特定のプログラムが格納された領域を書き込み禁止領域に設定する設定手段と、を備えるマルチコアプロセッサシステムが提供される。
 本マルチコアプロセッサシステム、制御プログラム、および制御方法によれば、特定のプログラムがキャッシュから追い出されず、周期実行プログラムと同一のCPUに割り当てられたタスクの実行に与える影響を小さくすることができるという効果を奏する。
マルチコアプロセッサシステムのハードウェアを示すブロック図である。 サイズテーブル152の一例を示す説明図である。 識別情報153の一例を示す説明図である。 マルチコアプロセッサシステム100の機能ブロック図である。 周期実行プログラムの実行コード502がロードされた領域がロックされる例を示す説明図である。 周期実行プログラムが実行される例を示す説明図である。 周期実行プログラムでないタスクの割り当てを示す説明図である。 命令コードサイズの合計値の算出例を示す説明図である。 実行コード502の移動例を示す説明図である。 実行コード502が格納されている領域をロックさせる例を示す説明図である。 OS141の制御処理手順を示すフローチャート(その1)である。 OS141の制御処理手順を示すフローチャート(その2)である。 スヌープコントローラ105による移動処理を示すフローチャートである。 次指定先CPUによる書き込み禁止設定処理を示すフローチャートである。 現指定先CPUによる一時停止処理を示すフローチャートである。
 以下に本マルチコアプロセッサシステム、制御プログラム、および制御方法の好適な実施の形態を詳細に説明する。
 まず、ここで、上述の周期実行プログラムについて説明する。周期実行プログラムは一定時間ごとに実行されるプログラムであり、かつ他のイベントにより起動されるプログラムではない。一般的なタスクでは実行のタイミングと実行時間とが決まっていないが、周期実行プログラムでは実行のタイミングと実行時間とに変化がない。周期実行プログラムとしては、たとえば、携帯電話の通信待ち受けプログラムが挙げられる。携帯電話の通信待ち受けプログラムは携帯電話がどのようなタスク処理中であっても定期的に基地局に通信を問い合わせて通信を検出する。
 また、本実施の形態のマルチコアプロセッサシステムにおいて、マルチコアプロセッサとは、コアが複数搭載されたプロセッサである。コアが複数搭載されていれば、複数のコアが搭載された単一のプロセッサでもよく、シングルコアのプロセッサが並列されているプロセッサ群でもよい。なお、本実施の形態では、説明を単純化するため、シングルコアのプロセッサが並列されているプロセッサ群を例に挙げて説明する。
(マルチコアプロセッサシステムのハードウェア)
 図1は、マルチコアプロセッサシステムのハードウェアを示すブロック図である。図1において、マルチコアプロセッサシステム100は、マスタCPU101と、スレーブCPU102~スレーブCPU104と、共有メモリ107と、スヌープコントローラ105と、を有している。また、各CPUと共有メモリ107とはバス106を介してそれぞれ接続されている。各CPUとスヌープコントローラ105とは、バス106とは異なるバスを介してそれぞれ接続されている。
 ここで、マスタCPU101とスレーブCPU102~スレーブCPU104では、たとえば、それぞれコアとレジスタとキャッシュとを有している。マスタCPU101はOSを実行し、マルチコアプロセッサシステム100の全体の制御を司る。OS141は、ソフトウェアの各プロセスをどのCPUに割り当てるかを制御する制御プログラムを有し、マスタCPU101に割り当てられたタスクの切り替えを制御する機能を有している。
 スレーブCPU102~スレーブCPU104は、それぞれOS142~OS144を実行する。OS142~OS144は各CPUに割り当てられたタスクの切り替えを制御する機能を有している。
 各CPUのキャッシュは、命令キャッシュとデータキャッシュの2種類のキャッシュを有している。命令キャッシュはプログラムを保持するキャッシュであり、データキャッシュはプログラムが実行中に用いられるデータを保持するキャッシュである。
 マスタCPU101はキャッシュとして命令キャッシュ111とデータキャッシュ121を有し、スレーブCPU102はキャッシュとして命令キャッシュ112とデータキャッシュ122を有している。スレーブCPU103はキャッシュとして命令キャッシュ113とデータキャッシュ123を有し、スレーブCPU104はキャッシュとして命令キャッシュ114とデータキャッシュ124を有している。
 各CPUのキャッシュは更新状態を把握および管理し、他のキャッシュと更新状態の情報を交換することにより、各CPUのキャッシュはどのキャッシュに最新のデータが存在するかを把握することができる。スヌープコントローラ105がこの情報交換を行う。
 また、各CPUはレジスタを有している。マスタCPU101はレジスタ131を有し、スレーブCPU102はレジスタ132を有している。スレーブCPU103はレジスタ133を有し、スレーブCPU104はレジスタ134を有している。
 また、スヌープコントローラ105は、たとえば、移動元のキャッシュと移動先のキャッシュと移動対象とに関する情報を含む移動指示を受け付けると、移動元のキャッシュから移動対象を複製し、複製した移動対象を移動先のキャッシュに格納する。これにより、スヌープコントローラ105は移動元のキャッシュから移動先のキャッシュへ移動対象を移動させる。
 また、本実施の形態では、周期実行プログラムの実行コードが格納されるキャッシュの領域はいずれのCPUのキャッシュであっても同一アドレスの領域とする。たとえば、周期実行プログラムの実行コードはキャッシュの先頭の領域に格納させると利用者があらかじめ決定しておいても良い。
 共有メモリ107は、たとえば、マスタCPU101とスレーブCPU102~スレーブCPU104とに共有されるメモリである。共有メモリ107は、たとえば、プロセス管理テーブル151と、サイズテーブル152と、識別情報153と、OS141~OS144のブートプログラムなどのプログラムと、を記憶している。共有メモリ107は、たとえば、ROM(Read Only Memory)と、RAM(Random Access Memory)と、フラッシュROMなどを有している。
 たとえば、ROMまたはフラッシュROMは該プログラムなどを記憶し、RAMはマスタCPU101とスレーブCPU102~スレーブCPU104とのワークエリアとして使用される。共有メモリ107に記憶されている該プログラムは、各CPUにロードされることで、コーディングされている処理を各CPUに実行させることとなる。
 プロセス管理テーブル151とは、たとえば、各タスクがどのCPUに割り当てられているか、割り当てられているCPUが該タスクを実行中であるか否かを示す情報である。各CPUは、プロセス管理テーブル151を読み出して各CPUのキャッシュに記憶しておく。OS141はマスタCPU101およびスレーブCPU102~スレーブCPU104のうちのいずれかのCPUにタスクを割り当てると、プロセス管理テーブル151に該タスクがどのCPUに割り当てられたかを登録する。
 さらに、タスクの切り替えが発生すると、各CPUはプロセス管理テーブル151にどのタスクが実行状態になったかを登録する。また、タスクの実行が完了すると、各CPUはプロセス管理テーブル151から該完了したタスクの情報を削除する。
 図2は、サイズテーブル152の一例を示す説明図である。サイズテーブル152は、各タスクの命令コードサイズを示すテーブルである。サイズテーブル152はタスク名の項目201と命令コードサイズの項目202とを有している。タスク名の項目201にはタスク名が保持されており、命令コードサイズの項目202には、タスクの命令コードサイズが保持されている。命令コードサイズとは、たとえば、タスクのステップ数である。
 たとえば、サイズテーブル152ではタスク名の項目201の値がタスクAの場合、命令コードサイズの項目202の値が300である。
 図3は、識別情報153の一例を示す説明図である。識別情報153はどのタスクが周期実行プログラムのタスクであるかを示す情報である。識別情報153はタスク名の項目301を有している。たとえば、識別情報153によりタスクGは周期実行プログラムのタスクであると判別される。
(マルチコアプロセッサシステム100の機能ブロック)
 図4は、マルチコアプロセッサシステム100の機能ブロック図である。マルチコアプロセッサシステム100は、たとえば、特定部401と移動部402と設定部403~設定部406とを有している。特定部401と設定部403とはマスタCPU101に実行されるOS141が有している。移動部402はスヌープコントローラ105が有している。設定部404はスレーブCPU102に実行されるOS142が有している。設定部405はスレーブCPU103に実行されるOS143が有している。設定部406はスレーブCPU104に実行されるOS144が有している。
 特定部401は、マルチコアプロセッサから、特定のプログラムをキャッシュに格納する一のCPUよりもキャッシュミスヒット率が低い他のCPUを各CPUに割り当てられたタスクの情報量に基づいて特定する。
 本実施の形態では、各タスクの情報量を命令コードサイズと称し、命令コードサイズをタスクのステップ数としているが、これに限らず、たとえば、タスクのデータサイズとしてもよい。命令コードサイズやデータサイズが小さいと命令キャッシュを使用する領域が少ないため、キャッシュミスヒット率が小さくなる。また、本実施の形態では、周期実行プログラムを特定のプログラムとして挙げているが、これに限らず、利用者が選択したプログラムを特定のプログラムとしてもよい。
 つぎに、移動部402は、特定のプログラムを前記一のコアのキャッシュから特定部401により特定された他のコアのキャッシュに移動させる。
 特定されたCPUで動作するOSが有する設定部は、移動部402により特定のプログラムが他のCPUのキャッシュに移動させられた後、他のCPUのキャッシュのうち特定のプログラムが格納された領域を書き込み禁止領域に設定する。さらに、移動元の設定部は、特定プログラムの移動後、書き込み禁止領域に設定していた特定プログラムの領域の禁止設定を解除する。
 以上を踏まえて図を用いて実施例を説明する。実施例では、一のコアを現指定先CPUとし、他のコアを次指定先CPUとする。
 図5は、周期実行プログラムの実行コード502がロードされた領域がロックされる例を示す説明図である。まず、OS141が、周期実行プログラムの実行コード502をマスタCPU101の命令キャッシュ111にロードする。そして、OS141が、該実行コード502がロードされた領域をレジスタ設定によりロックする。ロードされた領域をロックするとは、ロードされた領域を書き込み禁止領域に設定することを示す。
 各CPUのレジスタはキャッシュに関するレジスタを有しており、キャッシュに関するレジスタにはキャッシュのワーク領域を設定することができる。よって、該ロードされた領域をキャッシュのワーク領域から外すことにより、該ロードされた領域がロックされる。また、OS141は、現指定先CPUと次指定先CPUとをマスタCPU101に設定する。
 図6は、周期実行プログラムが実行される例を示す説明図である。周期実行プログラムの実行コード502がロックされると、OS141は実行待ちキュー501を監視し、実行待ちキュー501にタスクが積まれると、OS141は(1)タスクGを取り出す。
 ここで、実行待ちキュー501とは、マスタOS141であるOS141が有するキューである。たとえば、ユーザ操作により割り当て指示が発生したタスクは実行待ちキュー501に入れられ、OS141が実行待ちキュー501からタスクを取り出し、OS141がどのCPUに割り当てるかを決定する。
 そして、OS141はタスクGが周期実行プログラムであるか否かを識別情報153に基づいて判断する。タスクGは周期実行プログラムであるため、OS141は現指定先CPUへタスクGを割り当て、OS141が(2)タスクGを実行する。
 図7は、周期実行プログラムでないタスクの割り当てを示す説明図である。図7では、マスタCPU101にタスクAが割り当てられ、スレーブCPU102にタスクBとタスクEとが割り当てられ、スレーブCPU103にタスクCが割り当てられ、スレーブCPU104にタスクDが割り当てられる。
 そして、OS141が、(1)実行待ちキュー501からタスクを取り出し、取り出したタスクが周期実行プログラムであるか否かを識別情報153に基づいて判断する。ここで、取り出したタスクがタスクFであり、タスクFは周期実行プログラムではない。OS141がタスクFを任意のCPUに割り当てる。ここでは、(2)タスクFはマスタCPU101に割り当てられる。
 図8は、命令コードサイズの合計値の算出例を示す説明図である。つぎに、OS141が、(3)各CPUの合計命令コードサイズをサイズテーブル152に基づいて算出する。タスクAの命令コードサイズが300であり、タスクFの命令コードサイズが250であるため、マスタCPU101の合計命令コードサイズは550である。タスクBの命令コードサイズが300であり、タスクEの命令コードサイズが150であるため、スレーブCPU102の合計命令コードサイズは450である。
 タスクCの命令コードサイズが400であるため、スレーブCPU103の合計命令コードサイズは400である。タスクDの命令コードサイズが450であるため、スレーブCPU104の合計命令コードサイズは450である。
 つぎに、OS141は合計命令コードサイズが現指定先CPUよりも小さいCPUを特定する。すなわち、OS141はキャッシュミスヒット率が現指定先CPUよりも小さいCPUを特定することができる。ここでは、スレーブCPU102~スレーブCPU104が特定される。
 特定されたCPUが複数であるため、たとえば、OS141は合計命令コードサイズが最も低いスレーブCPU103を選択する。すなわち、OS141はキャッシュミスヒット率が現指定先CPUよりも小さいCPUのうち、最もキャッシュミスヒット率が小さいスレーブCPU103を特定することができる。OS141は(4)特定したスレーブCPU103を次指定先CPUに設定する。
 図9は、実行コード502の移動例を示す説明図である。つぎに、OS141が、(5)次指定先CPUであるスレーブCPU103に実行の一時停止を指示する。そして、OS143(次指定先CPUであるスレーブCPU103上で動作するOS)がタスクCの実行を一時停止する。
 OS141が、(6)現指定先CPUの命令キャッシュから次指定先CPUの命令キャッシュに周期実行プログラムの実行コード502を移動させる移動指示をスヌープコントローラ105へ通知する。該移動指示では、移動元が現指定先CPUの命令キャッシュであり、移動先が次指定先CPUの命令キャッシュであり、移動対象が実行コード502である。
 そして、スヌープコントローラ105が移動指示を受け付けると、スヌープコントローラ105は(7)周期実行プログラムの実行コード502を現指定先CPUの命令キャッシュから次指定先CPUの命令キャッシュに移動させる。スヌープコントローラ105は(8)OS141に移動完了を通知する。
 図10は、実行コード502が格納されている領域をロックさせる例を示す説明図である。つぎに、OS141が(9)次指定先CPUの命令キャッシュの領域のうち実行コード502が格納されている領域をロックさせるロック指示を次指定先CPUに通知する。OS143が(10)レジスタ設定により実行オブジェクトをロックし、OS143が(11)ロック完了をOS141に通知する。
 OS141が、ロック完了を受け付けると、(12)一時停止解除指示を次指定先CPUへ通知する。そして、OS143がタスクCの一時停止を解除する。OS141が(13)レジスタ設定によりマスタCPU101の命令キャッシュ111のロックを解除する。OS141が(14)現指定先CPUをスレーブCPU103に設定する。
(OS141の制御処理手順)
 図11および図12は、OS141の制御処理手順を示すフローチャートである。まず、OS141が、サイズテーブル152と識別情報153とを取得し(ステップS1101)、現指定先CPUおよび次指定先CPUにマスタCPU101を設定する(ステップS1102)。つぎに、OS141が、マスタCPU101の命令キャッシュ111に周期実行プログラムの実行コードをロードし(ステップS1103)、ロードした実行コードの領域をロックする(ステップS1104)。
 つぎに、OS141が、マスタOSの実行待ちキュー501が空か否かを判断し(ステップS1105)、マスタOSの実行待ちキュー501が空の場合(ステップS1105:Yes)、ステップS1105に戻る。なお、マスタOSはOS141である。一方、OS141が、マスタOSの実行待ちキュー501が空でないと判断した場合(ステップS1105:No)、マスタOSの実行待ちキュー501からタスクを取り出す(ステップS1106)。
 つぎに、OS141が、取り出したタスクが周期実行プログラムか否かを判断する。(ステップS1107)。OS141が、取り出したタスクが周期実行プログラムであると判断した場合(ステップS1107:Yes)、現指定先CPUへ取り出したタスクを割り当て(ステップS1108)、ステップS1105へ移行する。
 一方、OS141が、取り出したタスクが周期実行プログラムでないと判断した場合(ステップS1107:No)、取り出したタスクを任意のCPUへ割り当てる(ステップS1109)。そして、OS141が、CPUごとに割り当てられたタスクの命令コードサイズの合計値を算出する(ステップS1110)。
 OS141が、算出結果が現指定先CPUよりも小さいCPUを特定する(ステップS1111)。すなわち、キャッシュミスヒット率が現指定先CPUよりも低いCPUを特定する。そして、OS141が、算出結果が現指定先CPUよりも小さいCPUを特定したか否かを判断し(ステップS1112)、該小さいCPUを特定していないと判断した場合(ステップS1112:No)、ステップS1105へ戻る。
 一方、OS141が、該小さいCPUを特定したと判断した場合(ステップS1112:Yes)、特定したCPUを次指定先CPUに設定する(ステップS1113)。たとえば、複数のCPUを特定した場合、最も算出結果が小さいCPUを次指定先CPUに指定する。これにより、最もキャッシュ使用量が少ないCPUに周期実行プログラムを格納することができる。これにより、他のタスクの実行への影響を最小限にすることができる。
 そして、OS141が、次指定先CPUへ実行一時停止指示を通知する(ステップS1114)。つぎに、OS141が、現指定先CPUの命令キャッシュから次指定先CPUの命令キャッシュへの周期実行プログラムの移動指示をスヌープコントローラ105へ通知し(ステップS1115)、スヌープコントローラ105から移動完了の通知を受け付けたか否かを判断する(ステップS1116)。OS141が、スヌープコントローラ105から移動完了の通知を受け付けていないと判断した場合(ステップS1116:No)、ステップS1116に戻る。
 OS141が、スヌープコントローラ105から移動完了の通知を受け付けたと判断した場合(ステップS1116:Yes)、周期実行プログラムがロードされた領域をロックさせる指示を次指定先CPUへ通知する(ステップS1117)。そして、OS141が、次指定先CPUからロック完了を受け付けたか否かを判断する(ステップS1118)。OS141が、次指定先CPUからロック完了を受け付けていないと判断した場合(ステップS1118:No)、ステップS1118へ戻る。
 OS141が、次指定先CPUからロック完了を受け付けたと判断した場合(ステップS1118:Yes)、次指定先CPUへ一時停止解除指示を通知する(ステップS1119)。そして、OS141が、現指定先CPUの命令キャッシュのロックを解除させる解除指示を現指定先CPUへ通知する(ステップS1120)。
 つぎに、OS141が、次指定先CPUからロック完了を受け付けたか否かを判断する(ステップS1121)。OS141が、次指定先CPUからロック完了を受け付けていないと判断した場合(ステップS1121:No)、ステップS1121へ戻る。OS141が、次指定先CPUからロック完了を受け付けたと判断した場合(ステップS1121:Yes)、現指定先CPUを次指定先CPUに設定し(ステップS1122)、ステップS1105へ戻る。
(スヌープコントローラ105による移動処理)
 図13は、スヌープコントローラ105による移動処理を示すフローチャートである。まず、スヌープコントローラ105が、移動指示を受け付けたか否かを判断し(ステップS1301)、移動指示を受け付けていないと判断した場合(ステップS1301:No)、ステップS1301へ戻る。
 スヌープコントローラ105が、移動指示を受け付けたと判断した場合(ステップS1301:Yes)、現指定先CPUの命令キャッシュから次指定先CPUの命令キャッシュへ周期実行プログラムの実行コードを移動する(ステップS1302)。つぎに、スヌープコントローラ105が、移動完了をマスタOSへ通知し(ステップS1303)、ステップS1301へ戻る。
(次指定先CPUによる書き込み禁止設定処理)
 図14は、次指定先CPUによる書き込み禁止設定処理を示すフローチャートである。まず、次指定先CPUが、ロック指示を受け付けたか否かを判断する(ステップS1401)。次指定先CPUが、ロック指示を受け付けていないと判断した場合(ステップS1401:No)、ステップS1401へ戻る。
 一方、次指定先CPUが、ロック指示を受け付けたと判断した場合(ステップS1401:Yes)、キャッシュに関するレジスタを設定することにより指定領域をロックする(ステップS1402)。そして、次指定先CPUが、ロック完了をマスタOSへ通知する(ステップS1403)。なお、マスタOSはOS141である。
(現指定先CPUによる一時停止処理)
 図15は、現指定先CPUによる一時停止処理を示すフローチャートである。まず、現指定先CPUが、ロック解除指示を受け付けたか否かを判断する(ステップS1501)。現指定先CPUが、ロック解除指示を受け付けていないと判断した場合(ステップS1501:No)、ステップS1501へ戻る。
 一方、現指定先CPUが、ロック解除指示を受け付けたと判断した場合(ステップS1501:Yes)、キャッシュに関するレジスタを設定することにより指定領域のロックを解除する(ステップS1502)。そして、現指定先CPUが、解除完了をマスタOSへ通知する(ステップS1503)。
 以上説明したように、マルチコアプロセッサシステム、制御プログラム、および制御方法によれば、周期実行プログラムを格納しているCPUよりもキャッシュミスヒット率が低いCPUのキャッシュに周期実行プログラムを移動させる。さらに、該低いCPUのキャッシュのうち、周期実行プログラムを格納した領域を書き込み禁止領域に設定する。これにより、周期実行プログラムがキャッシュに常駐し、キャッシュから追い出されないため、周期実行プログラムが再ロードされるのを防止することができる。さらに、周期実行プログラムがCPUのキャッシュに常駐したままであっても、該CPUに割り当てられた他のタスクの実行に与える影響を小さくすることができる。すなわち、各CPUに割り当てられた周期実行プログラムと異なる他のタスクの実行時にキャッシュミスが発生するのを抑制することができ、CPUの性能が低下するのを防止することができる。
 100 マルチコアプロセッサシステム
 105 スヌープコントローラ
 111,112,113,114 命令キャッシュ

Claims (3)

  1.  マルチコアプロセッサから、特定のプログラムをキャッシュに格納する一のコアよりもキャッシュミスヒット率が低い他のコアを各コアに割り当てられたタスクの情報量に基づいて特定する特定手段と、
     前記特定のプログラムを前記一のコアのキャッシュから前記特定手段により特定された他のコアのキャッシュに移動させる移動手段と、
     前記移動手段により前記特定のプログラムが前記他のコアのキャッシュに移動させられた後、前記他のコアのキャッシュのうち前記特定のプログラムが格納された領域を書き込み禁止領域に設定する設定手段と、
     を備えることを特徴とするマルチコアプロセッサシステム。
  2.  移動先コアのキャッシュと移動元コアのキャッシュと移動対象プログラムとの移動通知を受け付けると、該移動先コアのキャッシュから該移動元コアのキャッシュへ前記移動対象プログラムを移動させる制御回路にアクセス可能なマルチコアプロセッサに、
     前記マルチコアプロセッサから、特定のプログラムをキャッシュに格納する一のコアよりもキャッシュミスヒット率が低い他のコアを各コアに割り当てられたタスクの情報量に基づいて特定する特定工程と、
     前記制御回路に、前記特定のプログラムを前記一のコアのキャッシュから前記特定工程により特定された他のコアのキャッシュに移動させる移動処理工程と、
     前記移動処理工程により前記特定のプログラムが前記他のコアのキャッシュに移動させられた後、前記他のコアのキャッシュのうち前記特定のプログラムが格納された領域を書き込み禁止領域に設定する設定工程と、
     を実行させることを特徴とする制御プログラム。
  3.  移動先コアのキャッシュと移動元コアのキャッシュと移動対象プログラムとの移動通知を受け付けると、該移動先コアのキャッシュから該移動元コアのキャッシュへ前記移動対象プログラムを移動させる制御回路にアクセス可能なマルチコアプロセッサが、
     前記マルチコアプロセッサから、特定のプログラムをキャッシュに格納する一のコアよりもキャッシュミスヒット率が低い他のコアを各コアに割り当てられたタスクの情報量に基づいて特定する特定工程と、
     前記制御回路に、前記特定のプログラムを前記一のコアのキャッシュから前記特定工程により特定された他のコアのキャッシュに移動させる移動処理工程と、
     前記移動処理工程により前記特定のプログラムが前記他のコアのキャッシュに移動させられた後、前記他のコアのキャッシュのうち前記特定のプログラムが格納された領域を書き込み禁止領域に設定する設定工程と、
     を実行することを特徴とする制御方法。
PCT/JP2010/059875 2010-06-10 2010-06-10 マルチコアプロセッサシステム、制御プログラム、および制御方法 WO2011155046A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN2010800672719A CN102934095A (zh) 2010-06-10 2010-06-10 多核处理器系统、控制程序以及控制方法
PCT/JP2010/059875 WO2011155046A1 (ja) 2010-06-10 2010-06-10 マルチコアプロセッサシステム、制御プログラム、および制御方法
JP2012519177A JP5516728B2 (ja) 2010-06-10 2010-06-10 マルチコアプロセッサシステム、制御プログラム、および制御方法
EP10852885.2A EP2581833A4 (en) 2010-06-10 2010-06-10 MULTIKERNPROCESSORSYSTEM, CONTROL PROGRAM AND CONTROL PROCEDURES
US13/708,215 US20130097382A1 (en) 2010-06-10 2012-12-07 Multi-core processor system, computer product, and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/059875 WO2011155046A1 (ja) 2010-06-10 2010-06-10 マルチコアプロセッサシステム、制御プログラム、および制御方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US13/708,215 Continuation US20130097382A1 (en) 2010-06-10 2012-12-07 Multi-core processor system, computer product, and control method

Publications (1)

Publication Number Publication Date
WO2011155046A1 true WO2011155046A1 (ja) 2011-12-15

Family

ID=45097676

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/059875 WO2011155046A1 (ja) 2010-06-10 2010-06-10 マルチコアプロセッサシステム、制御プログラム、および制御方法

Country Status (5)

Country Link
US (1) US20130097382A1 (ja)
EP (1) EP2581833A4 (ja)
JP (1) JP5516728B2 (ja)
CN (1) CN102934095A (ja)
WO (1) WO2011155046A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929723A (zh) * 2012-11-06 2013-02-13 无锡江南计算技术研究所 基于异构众核处理器的并行程序段划分方法
WO2014132619A1 (ja) * 2013-03-01 2014-09-04 日本電気株式会社 情報処理装置、情報処理方法及び記憶媒体
US10127045B2 (en) 2014-04-04 2018-11-13 Fanuc Corporation Machine tool controller including a multi-core processor for dividing a large-sized program into portions stored in different lockable instruction caches

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5591969B1 (ja) * 2013-03-27 2014-09-17 株式会社東芝 マルチコアプロセッサおよび制御方法
US9632958B2 (en) * 2014-07-06 2017-04-25 Freescale Semiconductor, Inc. System for migrating stash transactions
JP2016194831A (ja) * 2015-03-31 2016-11-17 オムロン株式会社 制御装置
JP2018101256A (ja) * 2016-12-20 2018-06-28 ルネサスエレクトロニクス株式会社 データ処理システム及びデータ処理方法
US20190087333A1 (en) * 2017-09-15 2019-03-21 Qualcomm Incorporated Converting a stale cache memory unique request to a read unique snoop response in a multiple (multi-) central processing unit (cpu) processor to reduce latency associated with reissuing the stale unique request
CN110187891B (zh) * 2019-03-18 2023-03-03 杭州电子科技大学 一种用于多核可编程控制器的程序开发方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207850A (ja) * 1997-01-23 1998-08-07 Nec Corp マルチプロセッサシステムにおけるディスパッチング方 式、ディスパッチング方法およびディスパッチングプログ ラムを記録した記録媒体
JP2002055966A (ja) * 2000-08-04 2002-02-20 Internatl Business Mach Corp <Ibm> マルチプロセッサ・システム、マルチプロセッサ・システムに用いるプロセッサ・モジュール及びマルチプロセッシングでのタスクの割り当て方法
JP2003248666A (ja) * 2002-02-25 2003-09-05 Nec Corp マルチプロセッサシステム
JP2007102332A (ja) * 2005-09-30 2007-04-19 Toshiba Corp 負荷分散システム及び負荷分散方法
JP2008191949A (ja) * 2007-02-05 2008-08-21 Nec Corp マルチコアシステムおよびマルチコアシステムの負荷分散方法

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5163141A (en) * 1988-08-01 1992-11-10 Stenograph Corporation RAM lock device and method for a text entry system
US5983310A (en) * 1997-02-13 1999-11-09 Novell, Inc. Pin management of accelerator for interpretive environments
JP2000276401A (ja) * 1999-03-24 2000-10-06 Nec Ibaraki Ltd キャッシュメモリ制御方法および装置
US6615316B1 (en) * 2000-11-16 2003-09-02 International Business Machines, Corporation Using hardware counters to estimate cache warmth for process/thread schedulers
US7082602B2 (en) * 2002-04-12 2006-07-25 Intel Corporation Function unit based finite state automata data structure, transitions and methods for making the same
US20060112226A1 (en) * 2004-11-19 2006-05-25 Hady Frank T Heterogeneous processors sharing a common cache
US8490101B1 (en) * 2004-11-29 2013-07-16 Oracle America, Inc. Thread scheduling in chip multithreading processors
US8812822B2 (en) * 2006-02-09 2014-08-19 International Business Machines Corporation Scheduling instructions in a cascaded delayed execution pipeline to minimize pipeline stalls caused by a cache miss
US8533395B2 (en) * 2006-02-24 2013-09-10 Micron Technology, Inc. Moveable locked lines in a multi-level cache
US7774549B2 (en) * 2006-10-11 2010-08-10 Mips Technologies, Inc. Horizontally-shared cache victims in multiple core processors
US20080263279A1 (en) * 2006-12-01 2008-10-23 Srinivasan Ramani Design structure for extending local caches in a multiprocessor system
US7996632B1 (en) * 2006-12-22 2011-08-09 Oracle America, Inc. Device for misaligned atomics for a highly-threaded x86 processor
US8161482B1 (en) * 2007-04-13 2012-04-17 Marvell International Ltd. Power optimization for multi-core devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207850A (ja) * 1997-01-23 1998-08-07 Nec Corp マルチプロセッサシステムにおけるディスパッチング方 式、ディスパッチング方法およびディスパッチングプログ ラムを記録した記録媒体
JP2002055966A (ja) * 2000-08-04 2002-02-20 Internatl Business Mach Corp <Ibm> マルチプロセッサ・システム、マルチプロセッサ・システムに用いるプロセッサ・モジュール及びマルチプロセッシングでのタスクの割り当て方法
JP2003248666A (ja) * 2002-02-25 2003-09-05 Nec Corp マルチプロセッサシステム
JP2007102332A (ja) * 2005-09-30 2007-04-19 Toshiba Corp 負荷分散システム及び負荷分散方法
JP2008191949A (ja) * 2007-02-05 2008-08-21 Nec Corp マルチコアシステムおよびマルチコアシステムの負荷分散方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102929723A (zh) * 2012-11-06 2013-02-13 无锡江南计算技术研究所 基于异构众核处理器的并行程序段划分方法
CN102929723B (zh) * 2012-11-06 2015-07-08 无锡江南计算技术研究所 基于异构众核处理器的并行程序段划分方法
WO2014132619A1 (ja) * 2013-03-01 2014-09-04 日本電気株式会社 情報処理装置、情報処理方法及び記憶媒体
JPWO2014132619A1 (ja) * 2013-03-01 2017-02-02 日本電気株式会社 情報処理装置、情報処理方法及びコンピュータプログラム
US10127045B2 (en) 2014-04-04 2018-11-13 Fanuc Corporation Machine tool controller including a multi-core processor for dividing a large-sized program into portions stored in different lockable instruction caches

Also Published As

Publication number Publication date
JPWO2011155046A1 (ja) 2013-08-01
US20130097382A1 (en) 2013-04-18
EP2581833A1 (en) 2013-04-17
CN102934095A (zh) 2013-02-13
JP5516728B2 (ja) 2014-06-11
EP2581833A4 (en) 2014-12-31

Similar Documents

Publication Publication Date Title
JP5516728B2 (ja) マルチコアプロセッサシステム、制御プログラム、および制御方法
US6016490A (en) Database management system
JP5516744B2 (ja) スケジューラ、マルチコアプロセッサシステムおよびスケジューリング方法
KR102571293B1 (ko) 충돌들의 존재시 효율적인 작업 스케줄링을 위한 방법
US9378069B2 (en) Lock spin wait operation for multi-threaded applications in a multi-core computing environment
US9542238B2 (en) Systems and methods for direct memory access coherency among multiple processing cores
US9535756B2 (en) Latency-hiding context management for concurrent distributed tasks in a distributed system
KR20090005921A (ko) 대칭적 다중 프로세서 시스템에서의 로드 밸런싱 방법 및장치
JP5347451B2 (ja) マルチプロセッサシステム、競合回避プログラム及び競合回避方法
JP2009059310A (ja) プログラム制御装置
JP7122299B2 (ja) 処理タスクを実行するための方法、装置、デバイス、および記憶媒体
JP5708861B2 (ja) マルチプロセッサシステム、制御方法、および制御プログラム
JP5397546B2 (ja) マルチコアプロセッサシステム、制御プログラム、および制御方法
US9372724B2 (en) System and method for conditional task switching during ordering scope transitions
JP5776813B2 (ja) マルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法および制御プログラム
JP2684993B2 (ja) プロセッサシステムとその制御方法
JP2008176804A (ja) タスクスケジューリングシステム、方法、およびプログラム
US9354935B2 (en) Work processing apparatus for scheduling work, control apparatus for scheduling activation, and work scheduling method in a symmetric multi-processing environment
JP2011018281A (ja) ジョブ実行管理システム、ジョブ実行管理方法、ジョブ実行管理プログラム
JP5300005B2 (ja) スレッド実行制御方法、およびシステム
JP2009080820A (ja) タスク切換装置、方法及びプログラム
US8566829B1 (en) Cooperative multi-level scheduler for virtual engines
JP2014038656A (ja) マルチプロセッサシステム、制御プログラム、および制御方法
JP5365201B2 (ja) プロセス実行制御システム、プロセス実行制御方法、及びプロセス実行制御プログラム
JP2023091314A (ja) 半導体装置、半導体装置の制御方法及びプログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080067271.9

Country of ref document: CN

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

Ref document number: 10852885

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012519177

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 2010852885

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE