WO2007017932A1 - スケジュール制御プログラム及びスケジュール制御方法 - Google Patents

スケジュール制御プログラム及びスケジュール制御方法 Download PDF

Info

Publication number
WO2007017932A1
WO2007017932A1 PCT/JP2005/014590 JP2005014590W WO2007017932A1 WO 2007017932 A1 WO2007017932 A1 WO 2007017932A1 JP 2005014590 W JP2005014590 W JP 2005014590W WO 2007017932 A1 WO2007017932 A1 WO 2007017932A1
Authority
WO
WIPO (PCT)
Prior art keywords
thread
time
cache
cpu
executed
Prior art date
Application number
PCT/JP2005/014590
Other languages
English (en)
French (fr)
Inventor
Kazuhiro Nakamura
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2005/014590 priority Critical patent/WO2007017932A1/ja
Priority to JP2007529429A priority patent/JP4651671B2/ja
Priority to CNB200580051287XA priority patent/CN100573458C/zh
Priority to KR1020087002269A priority patent/KR100942740B1/ko
Priority to EP05770421A priority patent/EP1914632B1/en
Publication of WO2007017932A1 publication Critical patent/WO2007017932A1/ja
Priority to US12/006,028 priority patent/US8479205B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5033Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering data affinity
    • 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/0811Multiuser, multiprocessor or multiprocessing cache systems with multilevel cache hierarchies
    • 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

Definitions

  • the present invention relates to a schedule control program and a schedule control method, and in particular, a schedule control program for causing a computer to function to assign a thread to be executed to a plurality of processor devices, and a thread to be executed by a plurality of processor devices.
  • the present invention relates to a schedule control method to be assigned.
  • OS operating system
  • CPUs Central Processing Units
  • Is assigned to each CPU by the OS scheduler.
  • a single program is processed in parallel by multiple CPUs, saving program processing time and distributing the load on the CPU.
  • the scheduler selects the thread with the highest priority from the queue (hereinafter referred to as the run queue) to which the thread to be executed is connected, and executes it on the CPU corresponding to the selected run queue. Let Also, the execution start time was recorded for each thread.
  • Fig. 7 is a diagram schematically showing how threads are allocated by a conventional scheduler.
  • A shows the data in the cache memory during execution of a thread
  • B shows the passage of a fixed time. It is a figure which shows the mode of the data of the cache memory at the time of reallocating the thread later.
  • the primary cache memory (hereinafter referred to as the primary cache) 501a, 501b, 501c, and 501d is connected to each of the CPUs 500a, 500b, 500c, and 500d.
  • the secondary cache memory (hereinafter referred to as the secondary cache) 502a is shared, and the CPU 500c and 500d share the secondary cache 502b!
  • the hatched portion indicates data.
  • FIG. 11500 & is executing thread 510.
  • the data power used by the thread 510 for example, is read from a main memory (not shown) and stored.
  • the threads 511, 512, and 513 are connected to the run queue and are waiting to be executed.
  • a thread is not always executed by the same CPU, for example, it is interrupted at a certain time, and the CPU is caused to execute another thread. Multitasking is realized. Then, for example, when the suspended thread 510 is resumed, the scheduler selects a CPU having a run queue that connects the thread 510 as shown in FIG.
  • Patent Document 1 JP-A-8-30562 (paragraph numbers [0020] to [0039], FIGS. 1 to 5)
  • Patent Document 2 JP-A-10-143382
  • the present invention has been made in view of these points, and an object thereof is to provide a schedule control program that assigns threads to a CPU so that a cache can be used efficiently.
  • Another object of the present invention is to provide a schedule control method for assigning threads to CPUs so that a cache can be used efficiently.
  • a schedule control program for causing a computer to perform a process of assigning a thread to be executed to a plurality of processor devices, as shown in FIG.
  • Thread information storage means 1 for storing the execution start time and the identification information (CPU number) of the processor device to be executed (for example, CPUlOa in FIG.
  • the elapsed time calculation means 2 that calculates the elapsed time t from the execution start time, the cache memory used by the processor unit (CPU10a, 10b, 10c, 10d) (1 Next cache l la, l ib, l lc, l ld, secondary cache 12a, 12b, tertiary cache 13)
  • the elapsed time t is less than the time parameter set in the cache memory of the ⁇ th order ( ⁇ is a natural number of 2 or more), and ( ⁇ -1) is greater than or equal to the time parameter set in the next cache memory.
  • the thread allocation that assigns thread 20 to the processor device with the least load hand 3 the schedule control program for causing to function as is provided.
  • the thread information storage unit 1 stores the execution start time and the identification information (CPU number) of the processor device to be executed (for example, CPU10a in FIG. 1) when the thread 20 is executed.
  • the time calculation means 2 calculates the elapsed time t from the execution start time when assigning the suspended thread 20 to the processor device (CPU 10a, 10b, 10c, 10d) to be executed next, and the thread assignment means 3
  • the cache memory primary cache l la, l ib, l lc, l ld, secondary cache 12a, 12b, tertiary cache 13
  • the time parameter set for the next cache memory In the
  • the present invention stores the execution start time and the identification information of the processor device to be executed at the time of executing the thread, and assigns the elapsed time from the execution start time when assigning the suspended thread to the processor device to be executed next.
  • the higher the order the larger the time parameter is set for the cache used by the processor unit, and the elapsed time is less than the time parameter set for the nth order cache (where n is a natural number of 2 or more). , (N—1) to the next cache If it is greater than the set time meter, a thread is allocated to the processor device with the least load among the processor devices executed last time and the processor devices sharing the n-th cache with the processor device executed last time.
  • a processor device that uses a cache that is highly likely to retain the data stored during the previous execution is selected as the allocation target for the suspended thread. This increases the cache hit rate and allows the cache to be used efficiently.
  • the load distribution process can be performed simultaneously with the allocation of the suspended thread. As a result, it is possible to prevent the cache hit rate from being lowered due to the eviction of the thread data stored in the cache due to the load distribution processing being performed after thread allocation.
  • FIG. 1 is a diagram for explaining an outline of schedule control for assigning threads to be executed by a plurality of CPUs.
  • FIG. 2 is a hardware configuration diagram of an example of a computer that executes schedule control according to the present embodiment.
  • FIG. 3 is a diagram showing hardware configuration information.
  • FIG. 4 is a diagram schematically showing OS functions related to schedule control according to the present embodiment.
  • FIG. 5 is a flowchart for explaining the flow of processing during thread execution.
  • FIG. 6 is a diagram illustrating a process flow for connecting a suspended thread to a run queue of any CPU.
  • FIG. 7 A diagram schematically showing how threads are allocated by a conventional scheduler.
  • A shows the data in the cache memory during execution of a thread
  • B shows the thread after a certain period of time.
  • FIG. 6 is a diagram showing the state of data in a cache memory when reassigning
  • FIG. 1 is a diagram for explaining an outline of schedule control for assigning threads to be executed by a plurality of CPUs.
  • the primary cache 1 la, l ib, l lc, and l id force S are connected to each of the plurality of CPUs 10a, 10b, 10c, and 10d, and the secondary cache 12a is connected to the CPUs 10a and 10b.
  • a description will be given by taking an example of schedule control in a computer sharing the secondary cache 12b with the CPUs 10c and 10d and sharing the tertiary cache 13 with the CPUs 10a to 10d.
  • threads 20, 21, 22, 23, 24, 25, and 26 executed by the CPUs 10a to 10d are schematically shown.
  • the schedule control for assigning threads to be executed by the plurality of CPUs 10a to 10d is performed by the thread information storage means 1, the elapsed time calculation means 2, and the thread assignment means 3.
  • the function of each processing means will be described.
  • the thread information storage means 1 stores the execution start time and the CPUlOa-: LOd identification information (hereinafter referred to as the CPU number) to be executed when each of the threads 20-26 is executed.
  • the elapsed time calculation means 2 calculates the elapsed time t from the execution start time stored in the thread information storage means 1 when allocating the suspended thread (for example, thread 20) to CPUlOa to LOd to be executed next. To do.
  • the thread assignment means 3 assigns the threads 20 to 26 to the CPUs 10a to 10d.
  • the time parameter Tl increases as the degree increases with respect to the cache memory used by the CPUs 10a to 10d (primary caches l la, l ib, 11c, l ld, secondary caches 12a, 12b, tertiary cache 13).
  • Set ⁇ 2 and ⁇ 3 ( ⁇ 1 ⁇ 2 ⁇ 3).
  • This time parameter is set based on the time that the data used by the suspended thread during the previous execution may remain in the cache of each order. Since the higher-order cache has a larger capacity, there is a high possibility that data will remain even if the elapsed time t is long. Therefore, the higher the order, the larger the time parameter is set. Specifically, the time parameter is determined by the cache capacity and benchmark.
  • thread allocation means 3 sets the elapsed time t of the suspended thread to the n-th order cache (n is a natural number of 2 or more). (N—1) If the time parameter set for the next cache is greater than or equal to the time parameter set in the next cache, the CPU that was executed last time and the CPU that shares the nth time cache with the CPU that was executed last time It is characterized by assigning suspended threads to those with the least load.
  • the elapsed time calculation means 2 refers to the execution start time at the previous execution of the thread 20 stored in the thread information storage means 1. Thus, the elapsed time t until the current time is calculated. Based on the calculated elapsed time t, the thread allocation unit 3 allocates the thread 20 as follows.
  • the thread 20 is assigned to the CPU 10a, 10b, 10c, lOd with the least load, as in the conventional case.
  • CPU 10c is selected and thread 20 is assigned.
  • CPUs 10a to 10d that use a cache that has a high possibility of remaining data stored at the time of previous execution depending on the elapsed time are selected as allocation targets of the suspended thread 20.
  • the cache hit rate is increased and the cache is efficiently Can be used.
  • the load distribution process can be performed simultaneously with the allocation of the thread 20. As a result, it is possible to prevent the cache hit rate from being lowered due to the eviction of the thread data stored in the cache due to the load distribution processing being performed after thread allocation.
  • FIG. 2 is a hardware configuration diagram of an example of a computer that executes schedule control according to the present embodiment.
  • the computer 30 shown here is, for example, a UNIX (registered trademark) server computer.
  • Computer 30 has 8 CPUs 31a, 31b, 3 lc, 31d, 31e, 31f, 31g, 31h each with built-in primary cache, and secondary caches 32a, 32b, 32c, 32d, tertiary cache 33a, 33b, tertiary caches 33a, 33b, memory 35 connected to the system bus 34, and IZ036 are also configured.
  • the secondary cache 32a is shared by the CPUs 31a and 31b
  • the secondary cache 32b is shared by the CPUs 31c and 31d
  • the secondary cache 32c is shared by the CPUs 31e and 31f
  • the secondary cache 32d is the CPU 31g. , Shared on 31h.
  • the tertiary cache 33a is shared by the CPUs 31a, 31b, 31c and 31d
  • the tertiary cache 33b is shared by the CPUs 31e, 31f, 31g and 31h.
  • FIG. 3 is a diagram illustrating hardware configuration information.
  • identification information “id: ⁇ ” is described, and further, identification information of a cache used by the CPU is described for each order of the cache.
  • the configuration information includes a description indicating a configuration such as a memory 35 (not shown) and 1/036, etc. Such hardware configuration information is passed to the OS.
  • FIG. 4 is a diagram schematically showing functions of the OS related to schedule control according to the present embodiment.
  • CPU management structures 40-1, 40-2, 40-3,..., 40-8 which indicate the information of CPUs 31a to 31h in FIG.
  • the thread 41 is represented by a thread management structure, and the execution start time “disp—time” of the thread 41 and the CPU number “cpu” that executed the thread 41 are stored.
  • the thread 41 is assigned to one of the CPUs 31a to 31h by the scheduler 42.
  • the OS scheduler 42 refers to the thread management structure and selects a CPU to which a suspended thread is allocated according to the elapsed time. As described above, the time parameters Tl, ⁇ 2, and ⁇ 3 are set according to the order of the cache.
  • each means shown in FIG. 1 is realized on a hardware computer 30 as shown in FIG.
  • FIG. 5 is a flowchart for explaining the flow of processing during thread execution.
  • the scheduler 42 confirms the rank of each of the CPUs 31a to 31h and confirms the existence of the waiting thread 41. If there is a thread 41, the process proceeds to step S2. If there is no thread 41, the process of step S1 is repeated until the thread 41 appears in the run queue (step S1).
  • the scheduler 42 removes the thread 41 from the run queue and sets the execution state.
  • the CPU management structure 40-2 The thread 41a connected to the run queue of the CPU 31b represented by As shown by the arrow A in Fig. 4! /, As shown in the CPU management structure 40-2, the CPU 3 lb rank shown in FIG. 4 Thread 41a is pulled out, and thread 41a gets the execution right by CPU 31b (step S2) .
  • Such a thread 41a has a power that disappears when processing is completed. While waiting for a response from an external device via IZ036, waiting for an exclusive resource acquired by another thread, or processing of thread 41a has exceeded a certain time. Sometimes it is interrupted before finishing the process (arrow B in Fig. 4). In that case, the scheduler 42 puts the thread 41a in a suspended state and gives execution rights to another thread in the run queue of the CPU 31b. When there is a response from an external device via IZ036, or when an exclusive resource that another thread has acquired is released, the processing of other thread 41a is executed over a certain period of time and to another thread. When the execution of the thread 41a is resumed, for example, after the right is transferred, the thread 41a is again assigned to one of the CPUs 31a to 31h.
  • FIG. 6 is a diagram for explaining the flow of processing for connecting a suspended thread to the run queue of one of the CPUs.
  • the scheduler 42 calculates the elapsed time t from the difference between the execution start time "disp-time" recorded in the thread management structure of the suspended thread 41a and the current time (step S5). ).
  • step S6 If the elapsed time t is t ⁇ Tl, the same CPU 31b as the previous time is selected (step S6).
  • the CPU 31b that shares the secondary cache 32a with the CPU 31b that operated last time, and the CPU with the least load of 3 lb are selected.
  • the number of threads 41 connected to the CPU3 la run queue represented by the CPU management structure 40-1 CPU3 lb is selected because the load is larger than the number of threads 41 connected to the CPU3 lb run queue represented by the CPU management structure 40-2 (step S7).
  • the CPU 31a, 31b, 31c, 3Id that shares the tertiary cache 33a with the CPU 31b that has been operated last time is selected as the CPU with the least load.
  • the CPU 31c represented by the CPU management structure 40-3 is selected (step S8).
  • the scheduler 42 connects the thread 41a to the run queue of the selected CPU (step S10).
  • a CPU that uses a cache that has a high possibility that data stored at the time of the previous execution remains high depending on the elapsed time. Since it is selected as an allocation target, the cache hit rate increases and the cache can be used efficiently.
  • the load distribution process can be performed simultaneously with the allocation of the suspended thread. As a result, it is possible to prevent the cache hit rate from being lowered due to the removal of the thread data stored in the cache due to the load distribution processing being performed after the thread allocation.
  • the above processing content can be realized by a computer.
  • a program describing the processing contents of the functions that the computer should have is provided.
  • the program describing the processing contents can be recorded on a computer-readable recording medium.
  • the computer-readable recording medium include a magnetic recording device, an optical disk, a magneto-optical recording medium, and a semiconductor memory.
  • Magnetic recording devices include hard disk drives (HDD), flexible disks (FD), and magnetic tape.
  • Optical discs include DVD (Digital Versatile Disc), DVD—RAM, CD -ROM, CD— R (Recordable) ZRW (ReWritable) etc.
  • Magneto-optical recording media include MO (Magneto-Optical disk).
  • the computer that executes the program stores, for example, a program recorded on a portable recording medium or a server computer-powered program in its own storage device. Then, the computer reads its own storage device power program and executes processing according to the program. The computer can also read the program directly from the portable recording medium and execute processing according to the program. The computer can also execute processing according to the received program sequentially each time the program is transferred to the server computer.

Landscapes

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

Abstract

 効率的にキャッシュを使用可能なようにスレッドをCPUに割り当てる。  スレッド(20)の実行時に実行開始時刻及び実行するCPU(10a)のCPU番号を記憶し、中断中のスレッド(20)を次に実行させるCPU(10a)~(10d)へ割り当てる際に、実行開始時刻からの経過時間tを算出し、CPU(10a)~(10d)で使用するキャッシュに対して次数が高いほど大きな時間パラメータ(T1)、(T2)、(T3)(T1<T2<T3)を設定し、経過時間tがn次(nは2以上の自然数)のキャッシュに設定された時間パラメータ未満であり、(n-1)次のキャッシュに設定された時間パラメータ以上の場合には、前回実行したCPU(10a)と共にn次のキャッシュを共有するCPU(10a)~(10d)の中で、負荷の最も少ないCPUにスレッド(20)を割り当てる。                                                                               

Description

明 細 書
スケジュール制御プログラム及びスケジュール制御方法
技術分野
[0001] 本発明はスケジュール制御プログラム及びスケジュール制御方法に関し、特に、複 数のプロセッサ装置に、実行させるスレッドを割り当てる処理をコンピュータに機能さ せるスケジュール制御プログラム及び複数のプロセッサ装置に、実行させるスレッドを 割り当てるスケジュール制御方法に関する。
背景技術
[0002] 複数の CPU (Central Processing Unit)を用 、てプログラムを実行するマルチプロセ ッサシステム対応の OS (Operating System)では、実行するプログラムを複数の実行 単位(以下スレッドという。)に分割し、スレッドを OSのスケジューラにより各 CPUに割 り当てることによってプログラムを実行している。このように、 1つのプログラムを複数の CPUにより並列処理することで、プログラムの処理時間の節約と、 CPUにかかる負荷 の分散を実現している。
[0003] スケジューラは、 CPUごとに、これから実行させるスレッドが繋がった待ち行列(以 下ランキューと呼ぶ。)から最も優先度の高いスレッドを選び出し、そのスレッドを選び 出したランキューに対応する CPUで実行させる。また、実行開始時刻をスレッドごと に記録していた。
[0004] 図 7は、従来のスケジューラによるスレッドの割り当ての様子を模式的に示した図で あり、(A)はあるスレッドの実行時のキャッシュメモリのデータを示し、(B)は一定時間 経過後にそのスレッドを再び割り当てる際のキャッシュメモリのデータの様子を示す図 である。
[0005] ここでは、 CPU500a、 500b, 500c, 500dのそれぞれに対し 1次のキャッシュメモ リ(以下 1次キャッシュという。) 501a、 501b, 501c, 501d力接続されており、 CPU5 00a、 500bとで 2次のキャッシュメモリ(以下 2次キャッシュという。) 502aを共有し、 C PU500c、 500dとで 2次キャッシュ 502bを共有して!/、るコンピュータの一部の構成を 示している。なお、斜線部はデータを示している。 [0006] 図 7 (A)において、じ?11500&はスレッド510を実行してぃる。このとき、 1次キヤッシ ュ 501a及び 2次キャッシュ 502aでは、スレッド 510で用いるデータ力 例えば図示し ないメインメモリから読み出されて記憶される。なお、スレッド 511、 512、 513はラン キューに接続されており、実行待ちの状態となっている。
[0007] ところで、シングルプロセッサシステムの場合と異なり、マルチプロセッサシステムで は、スレッドは常に同一の CPUで実行されるのではなぐ例えば一定時間で中断さ れ、その CPUに別のスレッドを実行させることでマルチタスクを実現している。そして 、例えば、中断したスレッド 510を再開するときには、図 7 (B)のようにスケジューラは そのスレッド 510を繋げるランキューを有する CPUを以下のように選択していた。
[0008] (1)スレッド 510が前回に実行権を得た時刻(実行開始時刻)力も今回ランキューに 繋げる時刻までの経過時間力 ある一定時間以内であれば、前回、スレッド 510を実 行した CPU500aを選択する。
[0009] (2)ある一定時間外であれば、全ての CPU500a〜500dの中力も最も負荷が少な い CPUを選択する。
これは、ある一定時間内であれば、前回スレッド 510を実行したじ?11500&が使用 したキャッシュに、図 7 (B)に示すように、スレッド 510が前回使用したデータがまだ残 つていることが期待できるためである。この制御により、キャッシュヒット率を向上させ、 性能向上を実現していた。なお、各 CPUの負荷は、ランキューに繋がっているスレツ ド 514、 515、 516の数やその優先度力も決定する。
[0010] また、マルチプロセッサシステムにおけるキャッシュのミスヒットを少なくするための技 術として、各スレッド(タスク)が各プロセッサのキャッシュ中に確保しているブロック数 を計数して、この計数結果を複数のプロセッサで共有して 、るメモリに記憶しておき、 スレッドの再開時、この計数結果を元に、キャッシュに、より多くのブロック数を有する プロセッサに、そのスレッドを実行させる手法が知られている(例えば、特許文献 1参 照。)。
[0011] また、 2次キャッシュのミスヒットを少なくするための技術として、 2次キャッシュを共有 して!/、る CPUのグループが複数接続されたマルチプロセッサシステムにお!/、て、プ ロセスが、常に特定の CPUのグループで実行されるようにした技術もあった (例えば 、特許文献 2参照。)。
特許文献 1:特開平 8 - 30562号公報 (段落番号〔0020〕〜〔0039〕 ,第 1〜第 5図) 特許文献 2 :特開平 10— 143382号公報
発明の開示
発明が解決しょうとする課題
[0012] しかし、中断していたスレッドの CPUへの割り当てを、前回の実行開始時刻力もの 一定の経過時間を基準として行う従来のスケジュール制御方法では、以下のような問 題があった。
[0013] 図 7 (B)のように、経過時間によっては 1次キャッシュ 501aにはスレッド 510の前回 実行時に記憶したデータは残っていないが、 2次キャッシュ 502aにそのデータが残 つている場合がある。また、 2次キャッシュ 502aにはデータが残っていないが、図示し な 、3次キャッシュにデータが残って 、る場合もある。すなわち次数の大き 、キヤッシ ュほど、経過時間が長くてもデータが残っている可能性が高い。しかし、従来のスケ ジュール制御では、このことを考慮せず、経過時間がある一定時間外の場合には、 全ての CPUの中力 最も負荷の少ない CPUを選ぶので、キャッシュに残っているデ ータを無駄にすることがあり、効率的なキャッシュの使用が行われていないという問題 かあつた。
[0014] 本発明はこのような点に鑑みてなされたものであり、効率的にキャッシュを使用可能 なようにスレッドを CPUに割り当てるスケジュール制御プログラムを提供することを目 的とする。
[0015] また、本発明の他の目的は、効率的にキャッシュを使用可能なようにスレッドを CP Uに割り当てるスケジュール制御方法を提供することである。
課題を解決するための手段
[0016] 本発明では上記問題を解決するために、複数のプロセッサ装置に、実行させるスレ ッドを割り当てる処理をコンピュータに機能させるスケジュール制御プログラムにお ヽ て、図 1に示すように、コンピュータを、スレッド 20の実行時に実行開始時刻及び実 行するプロセッサ装置(図 1では例えば CPUlOa)の識別情報 (CPU番号)を記憶す るスレッド情報記憶手段 1、中断中のスレッド 20を次に実行させるプロセッサ装置 (C PU10a、 10b、 10c、 lOd)へ割り当てる際に、実行開始時刻からの経過時間 tを算 出する経過時間算出手段 2、プロセッサ装置 (CPU10a、 10b、 10c、 10d)で使用す るキャッシュメモリ(1次キャッシュ l la、 l ib, l lc、 l ld、 2次キャッシュ 12a、 12b、 3 次キャッシュ 13)に対して次数が高いほど大きな時間パラメータ Tl、 Τ2、 Τ3 (Τ1 <Τ 2<Τ3)を設定し、経過時間 tが η次 (ηは 2以上の自然数)のキャッシュメモリに設定さ れた時間パラメータ未満であり、(η— 1)次のキャッシュメモリに設定された時間パラメ ータ以上の場合には、前回実行したプロセッサ装置 (CPUlOa)及び前回実行した プロセッサ装置(CPUlOa)と共に n次のキャッシュメモリを共有するプロセッサ装置の 中で、負荷の最も少な 、プロセッサ装置にスレッド 20を割り当てるスレッド割り当て手 段 3、として機能させることを特徴とするスケジュール制御プログラムが提供される。
[0017] 上記の構成によれば、スレッド情報記憶手段 1は、スレッド 20の実行時に実行開始 時刻及び実行するプロセッサ装置(図 1では例えば CPUlOa)の識別情報 (CPU番 号)を記憶し、経過時間算出手段 2は、中断中のスレッド 20を次に実行させるプロセ ッサ装置 (CPU10a、 10b、 10c、 10d)へ割り当てる際に、実行開始時刻からの経過 時間 tを算出し、スレッド割り当て手段 3は、プロセッサ装置(CPU10a、 10b、 10c、 1 Od)で使用するキャッシュメモリ(1次キャッシュ l la、 l ib, l lc、 l ld、 2次キャッシュ 12a、 12b、 3次キャッシュ 13)に対して次数が高いほど大きな時間パラメータ (T1く T2<T3)を設定し、経過時間 tが η次 (ηは 2以上の自然数)のキャッシュメモリに設定 された時間パラメータ未満であり、(η— 1)次のキャッシュメモリに設定された時間パラ メータ以上の場合には、前回実行したプロセッサ装置 (CPUlOa)及び、前回実行し たプロセッサ装置(CPUlOa)と共に n次のキャッシュメモリを共有するプロセッサ装置 の中で、負荷の最も少な 、プロセッサ装置にスレッド 20を割り当てる。
発明の効果
[0018] 本発明は、スレッドの実行時に実行開始時刻及び実行するプロセッサ装置の識別 情報を記憶し、中断中のスレッドを次に実行させるプロセッサ装置へ割り当てる際に 、実行開始時刻からの経過時間を算出し、プロセッサ装置で使用するキャッシュに対 して次数が高いほど大きな時間パラメータを設定し、経過時間が n次 (nは 2以上の自 然数)のキャッシュに設定された時間パラメータ未満であり、(n— 1)次のキャッシュに 設定された時間ノ メータ以上の場合には、前回実行したプロセッサ装置及び、前 回実行したプロセッサ装置と共に n次のキャッシュを共有するプロセッサ装置の中で、 負荷の最も少ないプロセッサ装置にスレッドを割り当てるので、経過時間に応じて、 前回実行時に記憶したデータが残っている可能性が高いキャッシュを使用するプロ セッサ装置が、中断中のスレッドの割り当て対象として選択される。これにより、キヤッ シュのヒット率が上がり、キャッシュを効率的に使用することができる。
[0019] また、キャッシュを共有するプロセッサ装置の中で最も少な 、負荷のプロセッサ装置 に割り当てる処理を行うので、中断中のスレッドの割り当てと同時に負荷分散処理が 行えることになる。これにより、スレッド割り当て後に負荷分散処理を行うことに起因し て、キャッシュに記憶されていたスレッドのデータが追い出されてキャッシュヒット率が 下がることを防止できる。
[0020] 本発明の上記および他の目的、特徴および利点は本発明の例として好ま U、実施 の形態を表す添付の図面と関連した以下の説明により明らかになるであろう。
図面の簡単な説明
[0021] [図 1]複数の CPUに実行させるスレッドを割り当てるためのスケジュール制御の概略 を説明する図である。
[図 2]本実施の形態のスケジュール制御を実行するコンピュータの一例のハードゥエ ァ構成図である。
[図 3]ハードウェアの構成情報を示す図である。
[図 4]本実施の形態のスケジュール制御に係る OSの機能を模式的に示す図である。
[図 5]スレッド実行時の処理の流れを説明するフローチャートである。
[図 6]中断中のスレッドをいずれかの CPUのランキューに繋げる処理の流れを説明す る図である。
[図 7]従来のスケジューラによるスレッドの割り当ての様子を模式的に示した図であり、 (A)はあるスレッドの実行時のキャッシュメモリのデータを示し、 (B)は一定時間経過 後にそのスレッドを再び割り当てる際のキャッシュメモリのデータの様子を示す図であ る。
発明を実施するための最良の形態 [0022] 以下、本発明の実施の形態を図面を参照して詳細に説明する。
まず、本発明の実施の形態の概略を説明する。
図 1は、複数の CPUに実行させるスレッドを割り当てるためのスケジュール制御の 概略を説明する図である。
[0023] なお、ここでは複数の CPU10a、 10b、 10c、 10dのそれぞれに対し 1次キャッシュ 1 la、 l ib, l lc、 l id力 S接続されており、 CPU10a、 10bとで 2次キャッシュ 12aを共 有し、 CPU10c、 10dとで 2次キャッシュ 12bを共有しており、 CPU10a〜10dとで 3 次キャッシュ 13を共有しているコンピュータにおけるスケジュール制御を例にして説 明する。また、各 CPU10a〜10dで実行されるスレッド 20、 21、 22、 23、 24、 25、 2 6を模式的に示している。
[0024] 複数の CPU10a〜10dに実行させるスレッドを割り当てるスケジュール制御は、スレ ッド情報記憶手段 1、経過時間算出手段 2、スレッド割り当て手段 3にて行われる。 以下、各処理手段の機能を説明する。
[0025] スレッド情報記憶手段 1は、スレッド 20〜26のそれぞれの実行時に実行開始時刻 及び、実行する CPUlOa〜: LOdの識別情報(以下 CPU番号)を記憶する。
経過時間算出手段 2は、中断中のスレッド (例えばスレッド 20)を、次に実行させる CPUlOa〜: LOdに割り当てる際に、スレッド情報記憶手段 1に記憶した実行開始時 刻からの経過時間 tを算出する。
[0026] スレッド割り当て手段 3は、 CPU10a〜10dへのスレッド 20〜26の割り当てを行う。
このとき、 CPU10a〜10dが使用するキャッシュメモリ(1次キャッシュ l la、 l ib, 11c 、 l ld、 2次キャッシュ 12a、 12b、 3次キャッシュ 13)に対して次数が高いほど大きな 時間パラメータ Tl、 Τ2、 Τ3 (Τ1 <Τ2<Τ3)を設定する。この時間パラメータは、そ れぞれの次数のキャッシュに、中断中のスレッドが前回実行時に使用したデータが残 つている可能性がある時間を目安に設定される。次数の高いキャッシュほど容量が大 きいため、経過時間 tが長くてもデータが残っている可能性が高い。そのため、次数 が高いほど大きな時間パラメータが設定される。具体的には、時間パラメータは、キヤ ッシュの容量や、ベンチマークなどによって決定する。そして、スレッド割り当て手段 3 は、中断中のスレッドの経過時間 tが n次(nは 2以上の自然数)のキャッシュに設定さ れた時間パラメータ未満であり、(n— 1)次のキャッシュに設定された時間パラメータ 以上の場合には、前回実行した CPU及び、前回実行した CPUと共に n次のキヤッシ ュを共有する CPUの中で、負荷の最も少ないものに中断中のスレッドを割り当てるこ とを特徴としている。
[0027] 以下、中断中のスレッド 20を、再び CPU10a〜10dのいずれかに割り当てる場合 を例にして、本実施の形態のスケジュール制御方法の概略を説明する。
中断中のスレッド 20を、 CPU10a〜10dのいずれかに割り当てる際、経過時間算 出手段 2は、スレッド情報記憶手段 1で記憶された、スレッド 20の前回の実行時の実 行開始時刻を参照して、現時刻までの経過時間 tを算出する。スレッド割り当て手段 3 は、算出された経過時間 tを基に、以下のようなスレッド 20の割り当てを行う。
[0028] まず、経過時間 tが t<Tlの場合には、スレッド情報記憶手段 1で記憶した CPU番 号を参照して、スレッド 20を前回実行した CPUlOaを選択して、再度スレッド 20を割 り当てる(CPUlOaのランキューに繋げる)。
[0029] Tl≤t<T2の場合には、前回実行した CPUlOa及び、 CPUlOaと共に 2次キヤッ シュ 12aを共有する CPUlObの中で、負荷の少ないほうにスレッド 20を割り当てる。 図 1の場合、 CPUlOaのランキューには、 3つのスレッド 21、 22、 23が存在する。一 方、 CPUlObのランキューには、 2つのスレッド 24、 25力ある。そのため、スレッド割り 当て手段 3は、負荷の少ない CPUlObのランキューにスレッド 20を繋げる。
[0030] T2≤t<T3の場合には、前回実行した CPUlOa及び、 CPUlOaと共に 3次キヤッ シュ 13を共有する CPU10b、 10c、 lOdの中で、負荷の最も少ないものにスレッド 20 を割り当てる。図 1の場合、 CPUlOcにはスレッドは存在せず、 CPUlOdには 1つの スレッド 26が存在するため、スレッド 20は、 CPUlOcに割り当てられる。
[0031] なお、 t≥T3の場合には、従来と同様に、全ての CPU10a、 10b、 10c、 lOdの中 で最も負荷の少ないものに、スレッド 20が割り当てられる。図 1の場合では、 CPU10 cが選択され、スレッド 20が割り当てられる。
[0032] このようにすることで、経過時間に応じて前回実行時に記憶したデータが残ってい る可能性が高いキャッシュを使用する CPU10a〜10dが、中断中のスレッド 20の割り 当て対象として選択されるので、キャッシュのヒット率が上がり、キャッシュを効率的に 使用することができる。
[0033] また、キャッシュを共有する CPU10a〜10dの中で最も少ない負荷の CPUに割り 当てる処理を行うので、スレッド 20の割り当てと同時に負荷分散処理が行えることに なる。これにより、スレッド割り当て後に負荷分散処理を行うことに起因して、キヤッシ ュに記憶されていたスレッドのデータが追い出されてキャッシュヒット率が下がることを 防止できる。
[0034] 次に、実施の形態の詳細を説明する。
図 2は、本実施の形態のスケジュール制御を実行するコンピュータの一例のハード ウエア構成図である。
[0035] ここで示すコンピュータ 30は、例えば、 UNIX (登録商標)のサーバコンピュータで ある。
コンピュータ 30は、それぞれ 1次キャッシュを内蔵している 8つの CPU31a、 31b、 3 lc、 31d、 31e、 31f、 31g、 31hと、 2次キャッシュ 32a、 32b、 32c、 32d、 3次キヤッ シュ 33a、 33b、 3次キャッシュ 33a、 33bとシステムバス 34を介して接続されるメモリ 3 5、 IZ036など力も構成されている。
[0036] また、 2次キャッシュ 32aは CPU31a、 31bで共有され、 2次キャッシュ 32bは、 CPU 31c、 31dで共有され、 2次キャッシュ 32cは CPU31e、 31fで共有され、 2次キヤッシ ュ 32dは CPU31g、 31hで共有されている。さらに、 3次キャッシュ 33aは、 CPU31a 、 31b、 31c、 31dで共有され、 3次キャッシュ 33bは、 CPU31e、 31f、 31g、 31hで 共有されている。
[0037] このような、ハードウェアの構成情報は以下のようなファームウェアで記述されている 図 3は、ハードウェアの構成情報を示す図である。
[0038] 例えば、 CPU (cpu node)については、それぞれの識別情報" id:〜"が記述され 、さらに、その CPUが用いるキャッシュの識別情報がキャッシュの次数ごとに記述さ れている。例えば、図 2の CPU31aは、識別情報が" id=0"で記述され、 CPU31aに 内蔵された 1次キャッシュは" level 1 cache id : 0"で、 CPU31aで用いる 2次キヤ ッシュ 32aは" level 2 cache id: 0,,で、 3次キャッシュ 33aは" level 3 cache id : 0"でそれぞれ記述されている。また、例えば、 CPU31hは、識別情報が" id= 7"で 記述され、 CPU31hに内蔵された 1次キャッシュの識別情報は" level 1 cache id : 7"で、 CPU31hで用いる 2次キャッシュ 32dの識別情報は" level 2 cache id: 3 "で、 3次キャッシュ 33bの識別情報は" level 3 cache id: 1"でそれぞれ記述され ている。また、ハードウェアの構成情報には、図示を省略したカ モリ 35や、 1/036 などの構成を示す記述も含まれる。このようなハードウェアの構成情報は、 OSに渡さ れる。
[0039] 図 4は、本実施の形態のスケジュール制御に係る OSの機能を模式的に示す図で ある。
ファームウェアからのハードウェア構成情報により、図 2の CPU31a〜31hの情報を 示す CPU管理構造体 40— 1、 40— 2、 40— 3、…ゝ 40— 8力生成される。スレッド 41 はスレッド管理構造体で表され、そのスレッド 41の実行開始時刻" disp— time"と、そ のスレッド 41を実行した CPU番号" cpu"が記憶される。スレッド 41は、スケジューラ 4 2によって、 CPU31a〜31hのいずれかに割り当てられる。
[0040] OSのスケジューラ 42は、スレッド管理構造体を参照して、経過時間に応じて中断 中のスレッドを割り当てる CPUを選択する。また、前述したようにキャッシュの次数に 応じて時間パラメータ Tl、 Τ2、 Τ3を設定する。
[0041] このような機能を有する OSにより、図 1で示した各手段力 図 2で示すようなハード ウェアのコンピュータ 30上で実現される。
以下、図 2、図 3、図 4を用いて本実施の形態のスケジュール制御方法を説明する。
[0042] まず、スレッド実行時の処理を説明する。
図 5は、スレッド実行時の処理の流れを説明するフローチャートである。 スレッド実行処理が開始すると、スケジューラ 42は、各 CPU31a〜31hのランキュ 一を確認し、待機中のスレッド 41の存在を確認する。スレッド 41がある場合にはステ ップ S2の処理に進み、スレッド 41がない場合には、スレッド 41がランキューに出現す るまでステップ S 1の処理を繰り返す (ステップ S 1)。
[0043] スケジューラ 42は、スレッド 41がランキューに存在した場合には、ランキューからス レッド 41を抜き、実行状態とする。以下、図 4で示すように、 CPU管理構造体 40— 2 で表される CPU31bのランキューに繋がったスレッド 41aを例にして説明する。図 4の 矢印 Aで示して!/、るように、 CPU管理構造体 40 - 2で示される CPU3 lbのランキュ 一力 スレッド 41aが抜かれ、スレッド 41aは CPU31bによる実行権を得る(ステップ S 2)。
[0044] さら〖こ、実行権を得たスレッド 41aのスレッド管理構造体に、実行開始時刻" disp— t ime"となる現時刻と、実行する CPU31bの CPU番号 (例えば、 CPU31bの識別情 報である" id= 1")を記憶する(ステップ S3)。
[0045] その後、 CPU31b〖こより、実行権を得たスレッド 41aが実行される (ステップ S4)。
このようなスレッド 41aは、処理が終われば消滅する力 IZ036を介した外部機器 からの応答待ちや、別スレッドが獲得中の排他資源待ちの場合や、スレッド 41aの処 理が一定時間を越えたときなど、処理を終える前に中断されることがある(図 4の矢印 B)。その場合、スケジューラ 42は、スレッド 41aをー且中断状態にし、 CPU31bのラ ンキューにある別のスレッドに実行権を与える。 IZ036を介した外部機器力もの応 答があつたときや、別スレッドが獲得中だった排他資源が解放されたとき、その他スレ ッド 41aの処理が一定時間を越えてー且別スレッドに実行権を譲渡した後など、スレ ッド 41aの実行を再開させる場合、スレッド 41aを再びいずれかの CPU31a〜31hに 割り当てる処理を行う。
[0046] 図 6は、中断中のスレッドをいずれかの CPUのランキューに繋げる処理の流れを説 明する図である。
なお、以下でも図 4で示したスレッド 41aを用いて説明する。
[0047] まず、スケジューラ 42は、中断中のスレッド 41aのスレッド管理構造体に記録されて いる、実行開始時刻 "disp— time"と現時刻との差より経過時間 tを算出する (ステツ プ S5)。
[0048] そして経過時間 tが、 t<Tlの場合、前回と同じ CPU31bを選択する(ステップ S6)
Tl≤t<T2の場合には、前回動作した CPU31bと 2次キャッシュ 32aを共有する C PU31a、 3 lbの中力も最も負荷の少ない CPUを選択する。図 4の例では、 CPU管 理構造体 40— 1で表される CPU3 laのランキューに繋がっているスレッド 41の数力 CPU管理構造体 40 - 2で表される CPU3 lbのランキューに繋がって!/、るスレッド 41 の数よりも多ぐ負荷が大きいので CPU3 lbが選択される (ステップ S7)。
[0049] T2≤t<T3の場合には、前回動作した CPU31bと 3次キャッシュ 33aを共有する C PU31a、 31b、 31c、 3 Idの中力も最も負荷の少ない CPUを選択する。図 4の例で は、 CPU管理構造体 40— 3で表される CPU31cが選択された場合を示している(ス テツプ S8)。
[0050] t≥T3の場合には、全 CPU31a〜31hの中力も最も負荷の少ない CPUを選択す る。図 4の例は、 CPU管理構造体 40— 8で表される CPU31hが選択された場合を示 している(ステップ S 9)。
[0051] そして最後に、スケジューラ 42は、選択された CPUのランキューにスレッド 41aを繋 げる (ステップ S 10)。
以上のように、本実施の形態のスケジュール制御方法によれば、経過時間に応じて 、前回実行時に記憶したデータが残っている可能性が高いキャッシュを使用する CP Uが、中断中のスレッドの割り当て対象として選択されるので、キャッシュのヒット率が 上がり、キャッシュを効率的に使用することができる。
[0052] また、キャッシュを共有する CPUの中で最も少ない負荷の CPUに割り当てる処理 を行うので、中断中のスレッドの割り当てと同時に負荷分散処理が行えることになる。 これにより、スレッド割り当て後に負荷分散処理を行うことに起因して、キャッシュに記 憶されていたスレッドのデータが追い出されてキャッシュヒット率が下がることを防止で きる。
[0053] なお、前述したように、上記の処理内容は、コンピュータによって実現することがで きる。その場合、コンピュータが有すべき機能の処理内容を記述したプログラムが提 供される。そのプログラムをコンピュータで実行することにより、上記処理機能がコンビ ユータ上で実現される。処理内容を記述したプログラムは、コンピュータで読み取り可 能な記録媒体に記録しておくことができる。コンピュータで読み取り可能な記録媒体 としては、磁気記録装置、光ディスク、光磁気記録媒体、半導体メモリなどがある。磁 気記録装置には、ハードディスク装置 (HDD)、フレキシブルディスク (FD)、磁気テ ープなどがある。光ディスクには、 DVD (Digital Versatile Disc)、 DVD— RAM、 CD -ROM, CD— R (Recordable) ZRW(ReWritable)などがある。光磁気記録媒体に は、 MO (Magneto-Optical disk)などがある。
[0054] プログラムを流通させる場合には、たとえば、そのプログラムが記録された DVD、 C D— ROMなどの可搬型記録媒体が販売される。また、プログラムをサーバコンビユー タの記憶装置に格納しておき、ネットワークを介して、サーバコンピュータから他のコ ンピュータにそのプログラムを転送することもできる。
[0055] プログラムを実行するコンピュータは、たとえば、可搬型記録媒体に記録されたプロ グラムもしくはサーバコンピュータ力 転送されたプログラムを、 自己の記憶装置に格 納する。そして、コンピュータは、自己の記憶装置力 プログラムを読み取り、プロダラ ムに従った処理を実行する。なお、コンピュータは、可搬型記録媒体から直接プログ ラムを読み取り、そのプログラムに従った処理を実行することもできる。また、コンビュ ータは、サーバコンピュータ力もプログラムが転送される毎に、逐次、受け取ったプロ グラムに従った処理を実行することもできる。
[0056] 以上、本発明を実施例に基づいて説明したが、本発明は上記に限定されるもので はなぐ特許請求の範囲に記載の範囲内で様々な変形が可能である。例えば、上記 では 3次キャッシュまでのコンピュータを例にして説明した力 3次以上のキャッシュが あるコンピュータについても同様に適用できる。
[0057] 上記については単に本発明の原理を示すものである。さらに、多数の変形、変更が 当業者にとって可能であり、本発明は上記に示し、説明した正確な構成および応用 例に限定されるものではなぐ対応するすべての変形例および均等物は、添付の請 求項およびその均等物による本発明の範囲とみなされる。
符号の説明
[0058] 1 スレッド情報記憶手段
2 経過時間算出手段
3 スレッド割り当て手段
10a、 10b、 10c、 10d CPU
l la、 l ib, l lc、 l id 1次キャッシュ
12aゝ 12b 2次キャッシュ 13 3次キャッシュ
20、 21、 22、 23、 24、 25、 26 スレッド T1、T2、T3 時間パラメータ t 経過時間

Claims

請求の範囲
[1] 複数のプロセッサ装置に、実行させるスレッドを割り当てる処理をコンピュータに機 能させるスケジュール制御プログラムにおいて、
コンピュータを、
スレッドの実行時に実行開始時刻及び実行するプロセッサ装置の識別情報を記憶 するスレッド情報記憶手段、
中断中の前記スレッドを次に実行させるプロセッサ装置へ割り当てる際に、前記実 行開始時刻からの経過時間を算出する経過時間算出手段、
前記プロセッサ装置で使用するキャッシュメモリに対して次数が高いほど大きな時 間パラメータを設定し、前記経過時間が n次 (nは 2以上の自然数)のキャッシュメモリ に設定された前記時間パラメータ未満であり、(n— 1)次のキャッシュメモリに設定さ れた前記時間パラメータ以上の場合には、前回実行したプロセッサ装置及び、前記 前回実行したプロセッサ装置と共に前記 n次のキャッシュメモリを共有するプロセッサ 装置の中で、負荷の最も少な!/ヽプロセッサ装置に前記スレッドを割り当てるスレッド割 り当て手段、
として機能させることを特徴とするスケジュール制御プログラム。
[2] 前記時間パラメータは、前記キャッシュメモリの容量に応じて設定されることを特徴と する請求の範囲第 1項記載のスケジュール制御プログラム。
[3] 複数のプロセッサ装置に、実行させるスレッドを割り当てるスケジュール制御方法に おいて、
スレッド情報記憶手段に、スレッドの実行時に実行開始時刻及び実行するプロセッ サ装置の識別情報を記憶するステップと、
経過時間算出手段で、中断中の前記スレッドを次に実行させるプロセッサ装置へ 割り当てる際に、前記実行開始時刻力もの経過時間を算出するステップと、
スレッド割り当て手段により、前記プロセッサ装置で使用するキャッシュメモリに対し て次数が高いほど大きな時間パラメータを設定し、前記経過時間が n次 (nは 2以上 の自然数)のキャッシュメモリに設定された前記時間パラメータ未満であり、(n— 1)次 のキャッシュメモリに設定された前記時間パラメータ以上の場合には、前回実行した プロセッサ装置及び、前記前回実行したプロセッサ装置と共に前記 n次のキャッシュ メモリを共有するプロセッサ装置の中で、負荷の最も少ないプロセッサ装置に前記ス レッドを害 |Jり当てるステップと、
を有することを特徴とするスケジュール制御方法。
前記時間パラメータは、前記キャッシュメモリの容量に応じて設定されることを特徴と する請求の範囲第 3項記載のスケジュール制御方法。
PCT/JP2005/014590 2005-08-09 2005-08-09 スケジュール制御プログラム及びスケジュール制御方法 WO2007017932A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
PCT/JP2005/014590 WO2007017932A1 (ja) 2005-08-09 2005-08-09 スケジュール制御プログラム及びスケジュール制御方法
JP2007529429A JP4651671B2 (ja) 2005-08-09 2005-08-09 スケジュール制御プログラム及びスケジュール制御方法
CNB200580051287XA CN100573458C (zh) 2005-08-09 2005-08-09 进程控制装置以及进程控制方法
KR1020087002269A KR100942740B1 (ko) 2005-08-09 2005-08-09 스케줄 제어 프로그램을 기록한 컴퓨터 판독 가능한 기록 매체 및 스케줄 제어 방법
EP05770421A EP1914632B1 (en) 2005-08-09 2005-08-09 Schedule control program and schedule control method
US12/006,028 US8479205B2 (en) 2005-08-09 2007-12-28 Schedule control program and schedule control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2005/014590 WO2007017932A1 (ja) 2005-08-09 2005-08-09 スケジュール制御プログラム及びスケジュール制御方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/006,028 Continuation US8479205B2 (en) 2005-08-09 2007-12-28 Schedule control program and schedule control method

Publications (1)

Publication Number Publication Date
WO2007017932A1 true WO2007017932A1 (ja) 2007-02-15

Family

ID=37727128

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2005/014590 WO2007017932A1 (ja) 2005-08-09 2005-08-09 スケジュール制御プログラム及びスケジュール制御方法

Country Status (6)

Country Link
US (1) US8479205B2 (ja)
EP (1) EP1914632B1 (ja)
JP (1) JP4651671B2 (ja)
KR (1) KR100942740B1 (ja)
CN (1) CN100573458C (ja)
WO (1) WO2007017932A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008310555A (ja) * 2007-06-14 2008-12-25 Asyst Technologies Japan Inc プロセス状態監視装置
WO2012095982A1 (ja) * 2011-01-13 2012-07-19 富士通株式会社 マルチコアプロセッサシステム、およびスケジューリング方法
WO2013021441A1 (ja) * 2011-08-05 2013-02-14 富士通株式会社 データ処理システム、およびデータ処理方法
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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8356284B2 (en) * 2006-12-28 2013-01-15 International Business Machines Corporation Threading model analysis system and method
US8453146B2 (en) * 2009-12-23 2013-05-28 Intel Corporation Apportioning a counted value to a task executed on a multi-core processor
US8756585B2 (en) * 2009-12-29 2014-06-17 International Business Machines Corporation Efficient monitoring in a software system
JP5737298B2 (ja) * 2011-01-21 2015-06-17 富士通株式会社 スケジューリング方法およびスケジューリングシステム
CN102402220B (zh) * 2011-01-21 2013-10-23 南京航空航天大学 基于负荷分担式的容错飞行控制系统的故障检测方法
US20120267423A1 (en) * 2011-04-19 2012-10-25 Taiwan Semiconductor Manufacturing Company, Ltd. Methods and Apparatus for Thin Die Processing
US9274854B2 (en) * 2012-07-27 2016-03-01 International Business Machines Corporation Contamination based workload management
US9571329B2 (en) * 2013-03-11 2017-02-14 International Business Machines Corporation Collective operation management in a parallel computer
US10140210B2 (en) * 2013-09-24 2018-11-27 Intel Corporation Method and apparatus for cache occupancy determination and instruction scheduling
CN106484537B (zh) * 2016-09-30 2019-07-19 网易(杭州)网络有限公司 一种cpu核资源的分配方法和设备
CN116521351B (zh) * 2023-07-03 2023-09-05 建信金融科技有限责任公司 多线程任务调度方法、装置、存储介质及处理器

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04283849A (ja) * 1991-03-13 1992-10-08 Toshiba Corp マルチプロセッサシステム
GB2258933A (en) 1991-08-19 1993-02-24 Sequent Computer Systems Inc Cache affinity scheduler
JPH05151064A (ja) * 1991-11-29 1993-06-18 Yokogawa Electric Corp 密結合マルチプロセツサシステム
JPH0830562A (ja) 1994-07-19 1996-02-02 Nec Corp マルチプロセッサシステム
JPH10143382A (ja) 1996-11-08 1998-05-29 Hitachi Ltd 共有メモリ型マルチプロセッサシステムの資源管理方法
JP2815095B2 (ja) * 1989-07-12 1998-10-27 日本電信電話株式会社 マルチプロセッサにおけるタスク割り当て制御方法
JPH11259318A (ja) * 1998-03-13 1999-09-24 Hitachi Ltd ディスパッチ方式
US5974438A (en) 1996-12-31 1999-10-26 Compaq Computer Corporation Scoreboard for cached multi-thread processes

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5287508A (en) * 1992-04-07 1994-02-15 Sun Microsystems, Inc. Method and apparatus for efficient scheduling in a multiprocessor system
US5784614A (en) * 1995-07-27 1998-07-21 Ncr Corporation Cache affinity scheduling method for multi-processor nodes in a split transaction bus architecture
US5872972A (en) * 1996-07-05 1999-02-16 Ncr Corporation Method for load balancing a per processor affinity scheduler wherein processes are strictly affinitized to processors and the migration of a process from an affinitized processor to another available processor is limited
US5875469A (en) * 1996-08-26 1999-02-23 International Business Machines Corporation Apparatus and method of snooping processors and look-aside caches
US6665699B1 (en) * 1999-09-23 2003-12-16 Bull Hn Information Systems Inc. Method and data processing system providing processor affinity dispatching
JP3535795B2 (ja) * 2000-02-21 2004-06-07 博 和泉 コンピュータ、並びに、コンピュータ読み取り可能な記録媒体

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2815095B2 (ja) * 1989-07-12 1998-10-27 日本電信電話株式会社 マルチプロセッサにおけるタスク割り当て制御方法
JPH04283849A (ja) * 1991-03-13 1992-10-08 Toshiba Corp マルチプロセッサシステム
GB2258933A (en) 1991-08-19 1993-02-24 Sequent Computer Systems Inc Cache affinity scheduler
JPH05151064A (ja) * 1991-11-29 1993-06-18 Yokogawa Electric Corp 密結合マルチプロセツサシステム
JPH0830562A (ja) 1994-07-19 1996-02-02 Nec Corp マルチプロセッサシステム
JPH10143382A (ja) 1996-11-08 1998-05-29 Hitachi Ltd 共有メモリ型マルチプロセッサシステムの資源管理方法
US5974438A (en) 1996-12-31 1999-10-26 Compaq Computer Corporation Scoreboard for cached multi-thread processes
JPH11259318A (ja) * 1998-03-13 1999-09-24 Hitachi Ltd ディスパッチ方式

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP1914632A4 *
STANLEY L. ET AL: "Two-Level Cache Performancefor Multiprocessors", SIMULATION, vol. 60, no. 4, April 1993 (1993-04-01), pages 222 - 231, XP002993365 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008310555A (ja) * 2007-06-14 2008-12-25 Asyst Technologies Japan Inc プロセス状態監視装置
WO2012095982A1 (ja) * 2011-01-13 2012-07-19 富士通株式会社 マルチコアプロセッサシステム、およびスケジューリング方法
WO2013021441A1 (ja) * 2011-08-05 2013-02-14 富士通株式会社 データ処理システム、およびデータ処理方法
JPWO2013021441A1 (ja) * 2011-08-05 2015-03-05 富士通株式会社 データ処理システム、およびデータ処理方法
US9405470B2 (en) 2011-08-05 2016-08-02 Fujitsu Limited Data processing system and data processing method
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
KR100942740B1 (ko) 2010-02-17
CN101238442A (zh) 2008-08-06
EP1914632B1 (en) 2012-06-27
EP1914632A4 (en) 2009-07-29
US20080109817A1 (en) 2008-05-08
KR20080023358A (ko) 2008-03-13
CN100573458C (zh) 2009-12-23
JPWO2007017932A1 (ja) 2009-02-19
JP4651671B2 (ja) 2011-03-16
US8479205B2 (en) 2013-07-02
EP1914632A1 (en) 2008-04-23

Similar Documents

Publication Publication Date Title
WO2007017932A1 (ja) スケジュール制御プログラム及びスケジュール制御方法
JP5831324B2 (ja) 制御装置,制御方法,プログラム及び分散処理システム
US8893145B2 (en) Method to reduce queue synchronization of multiple work items in a system with high memory latency between processing nodes
JP5615361B2 (ja) スレッドシフト:コアへのスレッド割振り
KR101640848B1 (ko) 멀티코어 시스템 상에서 단위 작업을 할당하는 방법 및 그 장치
JP2008084009A (ja) マルチプロセッサシステム
JP5584422B2 (ja) 情報処理装置,スケジュール管理装置,スケジュール管理方法およびスケジュール管理プログラム
TWI503750B (zh) 運算任務狀態的封裝
JP2008090546A (ja) マルチプロセッサシステム
US20160371082A1 (en) Instruction context switching
JP6885193B2 (ja) 並列処理装置、ジョブ管理方法、およびジョブ管理プログラム
US20200285510A1 (en) High precision load distribution among processors
KR102493859B1 (ko) 듀얼 모드 로컬 데이터 저장
JPWO2008126202A1 (ja) ストレージシステムの負荷分散プログラム、ストレージシステムの負荷分散方法、及びストレージ管理装置
US7631125B2 (en) Dynamically migrating channels
TW201435576A (zh) 陷阱處理期間的協作執行緒陣列粒化內文切換
US10698813B2 (en) Memory allocation system for multi-tier memory
JP2021022282A (ja) 情報処理装置,ストレージシステム及びスケジューリングプログラム
JP7011156B2 (ja) ストレージ制御装置およびプログラム
US8930680B2 (en) Sync-ID for multiple concurrent sync dependencies in an out-of-order store queue
JP6135392B2 (ja) キャッシュメモリ制御プログラム,キャッシュメモリを内蔵するプロセッサ及びキャッシュメモリ制御方法
JP2015191604A (ja) 制御装置、制御プログラム、および制御方法
CN101847128A (zh) 管理tlb的方法和装置
JP6900687B2 (ja) ディスク制御装置、ディスク制御方法、および、ディスク制御プログラム
CN116057513A (zh) 指令分派路由

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2007529429

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 12006028

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 1020087002269

Country of ref document: KR

WWE Wipo information: entry into national phase

Ref document number: 2005770421

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 200580051287.X

Country of ref document: CN

NENP Non-entry into the national phase

Ref country code: DE

WWP Wipo information: published in national office

Ref document number: 2005770421

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 12006028

Country of ref document: US