JPH05233562A - Process control system for multiprocessor - Google Patents
Process control system for multiprocessorInfo
- Publication number
- JPH05233562A JPH05233562A JP3493592A JP3493592A JPH05233562A JP H05233562 A JPH05233562 A JP H05233562A JP 3493592 A JP3493592 A JP 3493592A JP 3493592 A JP3493592 A JP 3493592A JP H05233562 A JPH05233562 A JP H05233562A
- Authority
- JP
- Japan
- Prior art keywords
- run queue
- processor
- local
- global
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Multi Processors (AREA)
Abstract
(57)【要約】
【目的】本発明は、共有メモリ上に、ローカルランキュ
ー間を移動するプロセスを一時的に貯える全プロセッサ
からアクセス可能なグローバルランキューを設けて、同
キューを介し各プロセッサがプロセス量を制御すること
を特徴とする。
【構成】共有メモリ13上に、各プロセッサ11-0,1
1-1,…が移動対象プロセスMPを一時的に置くための
グローバルランキューGRと、上記各プロセッサごとに
自プロセッサが実行するプロセスをつないでおくローカ
ルランキューLR0 ,LR1 ,…とを設け、上記各プロ
セッサ11-0,11-1,…に、移動対象プロセスMPを
グローバルランキューGRにロック操作を伴いながら一
時的にリンクする手段、及び上記移動対象プロセスMP
を上記グローバルランキューGRよりロック操作を伴い
ながらアンリンクし自己のローカルランキューにリンク
する手段を有してなることを特徴とする。
(57) [Summary] [Object] The present invention provides a global run queue on a shared memory that can be accessed by all processors that temporarily store processes that move between local run queues. It is characterized by controlling the amount. [Configuration] Each processor 11-0, 1 on the shared memory 13
1-1, ... Provide a global run queue GR for temporarily placing the process MP to be moved, and local run queues LR0, LR1 ,. Means for temporarily linking the migration target process MP to the global run queue GR with the lock operation to the processors 11-0, 11-1, ..., And the migration target process MP.
Means for unlinking from the global run queue GR with a lock operation and linking to the local run queue of its own.
Description
【0001】[0001]
【産業上の利用分野】本発明は、共有メモリ型マルチプ
ロセッサシステムに適用されるプロセス管理方式に係
り、特にプロセッサ間に於ける処理対象プロセスの移動
処理制御機構に特徴をもつ、マルチプロセッサに於ける
プロセス管理方式に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a process management system applied to a shared memory type multiprocessor system, and more particularly to a multiprocessor characterized by a movement processing control mechanism of a process to be processed between processors. Process management method.
【0002】[0002]
【従来の技術】従来、共有メモリ型マルチプロセッサシ
ステムに於いて、プロセス(タスク、ジョブ、スレッド
等)のディスパッチを行なう場合、各プロセッサのスケ
ジューラ(ディスパッチャ)は、全プロセッサからアク
セス可能なランキュー(グローバルランキュー)より実
行可能なプロセスを取り出していた。2. Description of the Related Art Conventionally, in a shared memory multiprocessor system, when a process (task, job, thread, etc.) is dispatched, a scheduler (dispatcher) of each processor has a run queue (global) accessible by all processors. The runnable process was taken out from the run queue.
【0003】マルチプロセッサシステムに於いて、スケ
ジューラはランキューを操作する際にロックをかける必
要があるため、あるプロセッサがランキュー操作を行な
っている場合、他のプロセッサはランキュー操作を行な
うことができない。このため、複数のプロセッサが同時
にランキューを操作しようとした場合、ロックが衝突す
るため、スループットが上がらないという問題があっ
た。In a multiprocessor system, the scheduler needs to lock the run queue when it operates, so that when one processor is performing the run queue operation, the other processor cannot perform the run queue operation. Therefore, when a plurality of processors try to operate the run queue at the same time, there is a problem that the throughput does not increase because the locks collide.
【0004】この問題を解決するために、[Thomas E.
Anderson、Edward D. Lazowska、Henry M. Levy 著「Th
e Performance Implication of Thread Management Alt
ernatives for Shared-Memory Multiprocessors 」、IE
EE Transactions on Computers Vol.38 ]では、全プロ
セッサからアクセス可能なランキュー(グローバルラン
キュー)の代わりにプロセッサ毎のランキュー(ローカ
ルランキュー(レディキューともいう))を設定し、各
プロセッサのスケジューラが実行可能なプロセスを取り
出す際に、ロックをかけずにランキューの操作を行なう
ことでスループットを向上させることを提案している。To solve this problem, [Thomas E.
Anderson, Edward D. Lazowska, Henry M. Levy "Th
e Performance Implication of Thread Management Alt
ernatives for Shared-Memory Multiprocessors ", IE
EE Transactions on Computers Vol.38], a run queue (local run queue (also called ready queue)) for each processor is set instead of the run queue (global run queue) accessible from all processors, and the scheduler of each processor can execute. It proposes to improve the throughput by operating the run queue without locking when fetching a process.
【0005】しかし、この場合には、各ローカルランキ
ューにリンクされている実行可能なプロセスの数が均等
にならず、プロセッサ間の負荷バランスがとれなくな
り、このためプロセス間のレスポンスにバラツキが発生
したり、アイドルプロセッサが存在するにも拘らず実行
待ち状態のプロセスが発生するという問題が生ずる。However, in this case, the number of runnable processes linked to each local run queue is not uniform, and the load balance between the processors cannot be balanced, which causes variations in the response between processes. In addition, there is a problem that a process in a waiting state occurs despite the existence of an idle processor.
【0006】[0006]
【発明が解決しようとする課題】このように、従来の共
有メモリ型マルチプロセッサシステムに於いては、複数
のプロセッサが同時にグローバルランキューを操作しよ
うとした場合、ロックが衝突するため、スループットが
上がらないという問題があった。As described above, in the conventional shared memory type multiprocessor system, when a plurality of processors try to operate the global run queue at the same time, the lock does not collide, so that the throughput does not increase. There was a problem.
【0007】この問題を解決するために、グローバルラ
ンキューの代わりにプロセッサ毎にローカルランキュー
を設け、プロセッサが自ローカルランキューのみを操作
することにより、スループットを向上させることが提案
されているが、この場合、プロセッサ間の負荷バランス
がとれなくなるという問題があった。In order to solve this problem, it has been proposed that a local run queue is provided for each processor instead of the global run queue and the processor operates only its own local run queue to improve the throughput. There was a problem that the load balance between the processors could not be balanced.
【0008】本発明は上記実情に鑑みなされたもので、
上記した従来技術の欠点を除去するため、ローカルラン
キュー間を移動するプロセスを一時的に格納するグロー
バルランキューを設けて、負荷の高いプロセッサのロー
カルランキューにリンクされているプロセスを、上記グ
ローバルランキューを介して、負荷の低いプロセッサの
ローカルランキューに移動することにより、プロセッサ
間の負荷バランスをとり、これによりプロセス間でのレ
スポンスのバラツキが発生したり、アイドルプロセッサ
が存在するにも拘らず実行待ち状態のプロセスが発生す
る等の問題を解決したプロセス移動方式を提供すること
を目的とする。The present invention has been made in view of the above circumstances,
In order to eliminate the above-mentioned drawbacks of the prior art, a global run queue that temporarily stores processes that move between local run queues is provided, and a process linked to the local run queue of a processor with a high load is processed through the global run queue. By moving to the local run queue of the processor with a low load, the load is balanced among the processors, which causes variations in the response between processes, and even when there is an idle processor, it is waiting for execution. It is an object of the present invention to provide a process transfer method that solves problems such as process generation.
【0009】[0009]
【課題を解決するための手段】上記目的を達成するため
に、本発明に於いては、プロセッサ毎に実行可能なプロ
セスをリンクしたローカルランキューを有する共有メモ
リ型マルチプロセッサシステムに於いて、ローカルラン
キュー間を移動するプロセスを一時的に格納する全プロ
セッサからアクセス可能なグローバルランキューを設
け、移動対象プロセスを、前記移動対象プロセスの移動
元ローカルランキューを有したプロセッサが前記移動元
ローカルランキューよりアンリンクし、前記グローバル
ランキューに一時的にロック操作を伴いながらリンクす
る手段と、移動先ローカルランキューを有したプロセッ
サが、前記移動対象プロセスを前記グローバルランキュ
ーよりロック操作を伴いながらアンリンクし、前記移動
先ローカルランキューにリンクする手段とを有すること
を特徴とする。To achieve the above object, in the present invention, a local run queue is provided in a shared memory type multiprocessor system having a local run queue in which executable processes are linked for each processor. A global run queue accessible by all processors that temporarily stores processes that move between them is provided, and a processor having a migration source local run queue of the migration target process unlinks the migration target process from the migration source local run queue. A processor having a means for temporarily linking to the global run queue with a lock operation and a destination local run queue unlinks the migration target process from the global run queue with a lock operation, Lankyu And having a means for linking to.
【0010】[0010]
【作用】このように構成された共有メモリ型マルチプロ
セッサシステムに於いては、負荷の高いプロセッサでプ
ロセスのディスパッチが行なわれたとき、負荷の高いプ
ロセッサは自ローカルランキューにあるプロセスをアン
リンクした後、ロック操作を伴いながらグローバルラン
キューにリンクする。又、負荷の低いプロセッサでディ
スパッチが行なわれたとき、負荷の低いプロセッサは、
上記グローバルランキューを調べ、グローバルランキュ
ーにプロセスが存在した場合は、ロック操作を伴いなが
らグローバルランキューよりプロセスをアンリンクし、
自ローカルランキューにリンクすることでプロセスを移
動する。In the shared memory type multiprocessor system configured as above, when a processor with a high load dispatches a process, the processor with a heavy load unlinks the process in its own local run queue. , Link to Global Run Queue with lock operation. Also, when dispatching is performed on a processor with a low load,
Examine the above global run queue, and if there is a process in the global run queue, unlink the process from the global run queue with the lock operation,
Move the process by linking to its own local run queue.
【0011】このようなプロセス移動処理によって、プ
ロセスが負荷の高いプロセッサから負荷の低いプロセッ
サへ移動するため、プロセッサ毎の負荷バランスがと
れ、プロセッサ間のレスポンスのバラツキが小さくな
り、かつスループットの高い並列処理が可能になる。By such process migration processing, a process is migrated from a processor with a heavy load to a processor with a light load, so that the load is balanced among the processors, the variation in the response between the processors is reduced, and the parallel processing with high throughput is achieved. Processing becomes possible.
【0012】[0012]
【実施例】以下図面を参照して本発明の一実施例を説明
する。図1は本発明の概要を示すブロック図である。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an outline of the present invention.
【0013】図に於いて、11-0,11-1,…,11-n
はそれぞれ実行可能なプロセスがリンクされる固有のロ
ーカルランキューLR0 ,LR1 ,…,LRn を有して
なるプロセッサであり、ここでは、ローカルランキュー
LRn をもつプロセッサ11-nを移動対象プロセス(M
P)の移動元プロセッサ、ローカルランキューLR1を
もつプロセッサ11-1を移動先プロセッサとして示して
いる。12は上記各プロセッサ11-0,11-1,…,1
1-n、及び共有メモリ(CM)13を含むシステム構成
要素の間を相互に接続するバス(BUS)である。In the figure, 11-0, 11-1, ..., 11-n
Is a processor having its own local run queues LR0, LR1, ..., LRn to which executable processes are respectively linked. Here, the processor 11-n having the local run queue LRn is set as a target process (M).
The processor 11-1 having the local run queue LR1 in P) is shown as the destination processor. 12 is each processor 11-0, 11-1, ...
The bus (BUS) interconnects system components including 1-n and a shared memory (CM) 13.
【0014】13は上記各プロセッサ11-0,11-1,
…,11-nが共有する共有メモリ(CM)である。この
共有メモリ(CM)13上には、各プロセッサ11-0,
11-1,…,11-nが移動対象プロセス(MP)を一時
的に置くためのグローバルランキューGRと、上記各プ
ロセッサごとに自プロセッサが実行するプロセスをつな
いでおくローカルランキューLR0 ,LR1 ,…,LR
n とが設けられる。ここではローカルランキューLRn
が移動元ローカルランキューとなり、ローカルランキュ
ーLR1 が移動先ローカルランキューとなる。Reference numeral 13 is each of the processors 11-0, 11-1,
..., 11-n is a shared memory (CM) shared. On this shared memory (CM) 13, each processor 11-0,
11-1, ..., 11-n connect the global run queue GR for temporarily placing the migration target process (MP) and the local run queues LR0, LR1 ,. , LR
n and are provided. Here, the local run queue LRn
Becomes the source local run queue, and the local run queue LR1 becomes the destination local run queue.
【0015】図1に於いて、上記各プロセッサ11-0,
11-1,…,11-nは、それぞれプロセス移動のための
処理を実行する。この処理に於いて、プロセッサ11-n
のスケジューラは、自ローカルランキューLRn を含め
た各ローカルランキューLR0 ,LR1 ,…につながれ
ているプロセス数を調べ、自ローカルランキューLRn
につながれているプロセス数がある条件に従う範囲内の
プロセス数より多いとき、各プロセッサ11-0,11-
1,…,11-nに対する処理負荷がある範囲の中で均等
化されるよう、他のプロセッサで処理可能なプロセス
(移動対象プロセス)MPを自ローカルランキューLR
n よりアンリンクし、グローバルランキューGRにロッ
ク操作を伴いながらリンクする(図中の符号a参照)。In FIG. 1, each processor 11-0,
11-1, ..., 11-n respectively execute processing for process migration. In this process, processor 11-n
Scheduler checks the number of processes connected to each local run queue LR0, LR1, ... Including its own local run queue LRn, and checks its own local run queue LRn.
When the number of processes connected to is larger than the number of processes within a range that complies with a certain condition, each processor 11-0, 11-
Processes that can be processed by other processors (movement target processes) MP are self-local run queue LR so that the processing load on 1, ..., 11-n is equalized within a certain range.
It is unlinked from n and linked to the global run queue GR with a lock operation (see the symbol a in the figure).
【0016】一方、プロセッサ11-1のスケジューラ
は、自ローカルランキューLR1 を含めた各ローカルラ
ンキューLR0 ,LR2 ,…,LRn につながれている
プロセス数を調べ、自ローカルランキューLR1 につな
がれているプロセス数がある条件に従う範囲内のプロセ
ス数より少なく、グローバルランキューGRに移動対象
プロセス(MP)がつながれているとき、その移動対象
プロセス(MP)をグローバルランキューGRよりロッ
ク操作を伴いながらアンリンクし、自ローカルランキュ
ーLR1 にリンクする(図中の符号b参照)。On the other hand, the scheduler of the processor 11-1 checks the number of processes connected to each of the local run queues LR0, LR2, ... When the number of processes to be moved (MP) is less than the number of processes within the range according to a certain condition and the process to be moved (MP) is connected to the global run queue GR, the process to be moved (MP) is unlinked from the global run queue GR with a lock operation, and the local process is executed. It is linked to the run queue LR1 (see symbol b in the figure).
【0017】このように、負荷の高いプロセッサでプロ
セスのディスパッチが行なわれたときは、同プロセッサ
が自ローカルランキューにあるプロセスをアンリンクし
た後、ロック操作を伴いながらグローバルランキューに
リンクし、負荷の低いプロセッサでディスパッチが行な
われたときは、同プロセッサがグローバルランキューを
調べ、グローバルランキューにプロセスが存在すると
き、ロック操作を伴いながらグローバルランキューより
プロセスをアンリンクし、自ローカルランキューにリン
クすることでプロセスを移動する。As described above, when a processor with a high load dispatches a process, the processor unlinks the process in its own local run queue and then links it to the global run queue while performing a lock operation. When a dispatch is performed by a low processor, the processor examines the global run queue, and when there is a process in the global run queue, the process is unlinked from the global run queue with a lock operation and linked to the local run queue. Move process.
【0018】上記したようなプロセス移動処理によっ
て、各プロセッサ11-0,11-1,…,11-nに対する
処理負荷が、ある範囲の中で均等化されるように、移動
対象プロセス(MP)がローカルランキュー(LR)間
で移動し、共有メモリ型マルチプロセッサシステムに於
いて並列処理が効率良く実行される。図2は本発明によ
る第1の実施例の構成を示すブロック図である。By the process migration processing as described above, the migration target process (MP) is so arranged that the processing loads on the processors 11-0, 11-1, ..., 11-n are equalized within a certain range. Move between local run queues (LR), and parallel processing is efficiently executed in a shared memory type multiprocessor system. FIG. 2 is a block diagram showing the configuration of the first embodiment according to the present invention.
【0019】この図2に示す実施例の共有メモリ型マル
チプロセッサシステムは、3つのプロセッサ11-0,1
1-1,11-2と、同プロセッサ11-0,11-1,11-2
にバス12を介して接続される、上記各プロセッサ11
-0,11-1,11-2が共有する共有メモリ(CM)13
とで構成される。The shared memory type multiprocessor system of the embodiment shown in FIG. 2 has three processors 11-0, 1
1-1, 11-2 and the same processor 11-0, 11-1, 11-2
Each processor 11 connected to the
-Shared memory (CM) 13 shared by 0, 11-1, 11-2
Composed of and.
【0020】共有メモリ(CM)13上には、各プロセ
ッサ11-0,11-1,11-2が移動対象プロセス(M
P)を一時的に格納するためのグローバルランキューG
Rと、各プロセッサ11-0,11-1,11-2毎に自プロ
セッサが実行するプロセスをつないでおくローカルラン
キューLR0 ,LR1 ,LR2 と、この各ローカルラン
キューLR0 ,LR1 ,LR2 につながれているプロセ
スの数をそれぞれ格納するローカルランキューカウンタ
LRC0 ,LRC1 ,LRC2 とをもっており、プロセ
ッサ11-0には、ローカルランキューLR0 とローカル
ランキューカウンタLRC0 が、又、プロセッサ11-1
には、ローカルランキューLR1 とローカルランキュー
カウンタLRC1 が、又、プロセッサ11-2には、ロー
カルランキューLR2 とローカルランキューカウンタL
RC2 がそれぞれ対応している。On the shared memory (CM) 13, each of the processors 11-0, 11-1, 11-2 is a process to be moved (M
Global run queue G for temporarily storing P)
R, the local run queues LR0, LR1, and LR2 that connect the processes executed by the respective processors to each of the processors 11-0, 11-1, and 11-2, and the local run queues LR0, LR1, and LR2. The processor 11-0 has local run queue counters LRC0, LRC1, and LRC2 for storing the number of processes, respectively. The processor 11-0 has a local run queue LR0 and a local run queue counter LRC0.
The local run queue LR1 and the local run queue counter LRC1 are provided in the processor 11-2, and the local run queue LR2 and the local run queue counter L are provided in the processor 11-2.
RC2 corresponds to each.
【0021】尚、上記各ローカルランキューカウンタL
RC0 ,LRC1 ,LRC2 は、プロセスの生成、消
滅、プロッセッサ間移動等、各自のローカルランキュー
を操作したときに値を変更する。The above local run queue counters L
RC0, LRC1, and LRC2 change their values when their own local run queues are manipulated, such as process creation, process deletion, and movement between processors.
【0022】例えば、図2に於いて、ローカルランキュ
ーLR0 にプロセス(P)が5つ、ローカルランキュー
LR1 にプロセス(P)が8つ、ローカルランキューL
R2にプロセス(P)が2つ、それぞれつながっていた
とする。For example, in FIG. 2, there are five processes (P) in the local run queue LR0, eight processes (P) in the local run queue LR1, and a local run queue L.
It is assumed that two processes (P) are connected to R2.
【0023】各プロセッサ11-0,11-1,11-2のス
ケジューラは、プロセス移動を行なうための処理を、例
えば1秒毎に行ない、更に、例えば5秒に一回はプロセ
ス移動を行なう処理を行なった後、グローバルランキュ
ーGRにプロセスがつながれているか否かを調べること
により、グローバルランキューGRに飢餓状態のプロセ
スが発生していないかチェックし、発生している場合に
はそれをロックを伴いながらグローバルランキューGR
よりアンリンクし、自ローカルランキューにリンクす
る。また、各プロセッサが生成したプロセスは、自ロー
カルランキューにリンクすることにする。ここで図3を
参照して上記図2に示す実施例の動作を説明する。The schedulers of the processors 11-0, 11-1, and 11-2 perform processing for moving the process, for example, every 1 second, and further, for example, once every 5 seconds, the processing moves. After executing, check whether there is a starvation process in the global run queue GR by checking whether the process is connected to the global run queue GR, and if so, lock it. While Global Rankue GR
Unlink more and link to your local run queue. The process created by each processor is linked to its own local run queue. The operation of the embodiment shown in FIG. 2 will be described with reference to FIG.
【0024】今、例えばプロセッサ11-1がプロセス移
動のための処理を開始した場合、プロセッサ11-1のス
ケジューラは、各プロセッサ11-0,11-1,11-2の
ローカルランキューカウンタLRC0 ,LRC1 ,LR
C2 の値を読み出し、現在各ローカルランキューLR0
,LR1 ,LR2 につながれているプロセス数を調べ
る(図3ステップ301)。Now, for example, when the processor 11-1 starts processing for process migration, the scheduler of the processor 11-1 causes the local run queue counters LRC0, LRC1 of the processors 11-0, 11-1, 11-2 to be executed. , LR
The value of C2 is read and each local run queue LR0 is currently read.
, LR1, LR2, the number of processes connected is checked (step 301 in FIG. 3).
【0025】スケジューラは、プロセスをグローバルラ
ンキューGRに移動する、もしくはグローバルランキュ
ーGRよりプロセスを取り出す条件を導き出すために、
ここの例では、他のローカルランキューLR0 ,LR2
につながれているプロセスの数から自ローカルランキュ
ーLR1 につながれているプロセスの数を減算し、計算
結果の最小値と最大値を求める(図3ステップ30
2)。The scheduler moves a process to the global run queue GR, or derives a condition to take out a process from the global run queue GR.
In this example, the other local run queues LR0, LR2
The number of processes connected to its own local run queue LR1 is subtracted from the number of processes connected to each other to obtain the minimum and maximum values of the calculation results (step 30 in FIG. 3).
2).
【0026】ここで、最大値がある一定値より大きい場
合は、グローバルランキューGRを調べ、プロセスがあ
れば、そのプロセスを自ローカルランキューLR1 にリ
ンクする(図3ステップ303,304,306,30
7,308)。If the maximum value is larger than a certain value, the global run queue GR is checked, and if there is a process, the process is linked to its own local run queue LR1 (steps 303, 304, 306, 30 in FIG. 3).
7, 308).
【0027】また、上記最小値が正の値のとき、このプ
ロセッサ11-1は、全プロセッサ11-0,11-1,11
-2の中で一番プロセスの数が少ないので、最大値がある
一定値より大きい場合と同様、グローバルランキューG
Rを調べ、プロセスがあればそのプロセスを自ローカル
ランキューLR1 にリンクする。When the minimum value is a positive value, this processor 11-1 is all processors 11-0, 11-1, 11
-The number of processes is the smallest among -2, so the global run queue G is the same as when the maximum value is larger than a certain value.
R is checked, and if there is a process, the process is linked to its own local run queue LR1.
【0028】又、上記最小値が負の値で、かつ最小値の
絶対値がある一定値より大きいときは、自ローカルラン
キューLR1 につながれているプロセスの中から移動対
象プロセス(MP)を選択し、その移動対象プロセス
(MP)をグローバルランキューGRに移動する(図3
ステップ305,309,310)。When the minimum value is a negative value and the absolute value of the minimum value is larger than a certain value, the process to be moved (MP) is selected from among the processes connected to the local run queue LR1. , The migration target process (MP) is migrated to the global run queue GR (FIG. 3).
Steps 305, 309, 310).
【0029】但し、上記2条件の両方を満たした場合、
つまり最小値が負の値で、かつ最小値の絶対値がある一
定値より大きく、かつ、最大値がある一定値より大きい
場合、このプロセッサ11-1は、ディスパッチの度に、
プロセスをローカルランキューLR1 とグローバルラン
キューGRの間で交互に移動させてしまうので、このよ
うな現象を避けるために何も行わずにプロセス移動の処
理を終了する(図3ステップ303)。又、上記条件を
満たさないときは、何も行なわずにプロセス移動の処理
を終了する。However, when both of the above two conditions are satisfied,
That is, when the minimum value is a negative value, and the absolute value of the minimum value is larger than a certain fixed value and the maximum value is larger than a certain fixed value, this processor 11-1 sends
Since the process is moved alternately between the local run queue LR1 and the global run queue GR, in order to avoid such a phenomenon, the process moving process is terminated without doing anything (step 303 in FIG. 3). If the above conditions are not satisfied, nothing is done and the process movement process ends.
【0030】上記したプロセス移動制御により、例え
ば、しきい値(ある一定のプロセス数)を「4」とした
場合、プロセッサ11-1が読み出した各ローカルランキ
ューLR0 ,LR1 ,LR2 の値をもとにプロセス移動
条件を計算すると、ローカルランキューカウンタLRC
0 の値は「5」、ローカルランキューカウンタLRC1
の値は「8」、ローカルランキューカウンタLRC2 の
値は「2」であるので、 LRC0 −LRC1 =−3 LRC2 −LRC1 =−6 よって、最小値は「−6」、最大値は「−3」となる
(図3ステップ302)。By the process migration control described above, for example, when the threshold value (a certain number of processes) is set to "4", the values of the local run queues LR0, LR1 and LR2 read by the processor 11-1 are used as the basis. When the process migration condition is calculated, the local run queue counter LRC
The value of 0 is "5", the local run queue counter LRC1
Is 8 and the value of the local run queue counter LRC2 is 2, so LRC0-LRC1 = -3 LRC2-LRC1 = -6 Therefore, the minimum value is "-6" and the maximum value is "-3". (Step 302 in FIG. 3).
【0031】これにより、プロセッサ11-1のスケジュ
ーラは、ローカルランキューLR1につながれているプ
ロセスの1つを移動対象プロセス(MP)としてキュー
よりアンリンクし、ローカルランキューカウンタLRC
1 の値を「7」に変更した後、ロック操作を伴いながら
移動対象プロセス(MP)をグローバルランキューGR
にリンクし、一連の処理を終える(図3ステップ30
3,304,305,309,310)。As a result, the scheduler of the processor 11-1 unlinks one of the processes connected to the local run queue LR1 from the queue as the process to be moved (MP), and the local run queue counter LRC
After changing the value of 1 to "7", move the process (MP) to be moved to the global run queue GR while performing the lock operation.
To end the series of processing (step 30 in FIG. 3).
3, 304, 305, 309, 310).
【0032】次に、プロセッサ11-0でプロセス移動の
ための処理が始まった場合、プロセッサ11-0のスケジ
ューラは、各プロセッサ11-0,11-1,11-2のロー
カルランキューカウンタLRC0 ,LRC1 ,LRC2
の値を読み出した後、他プロセッサ11-1,11-2のロ
ーカルランキューカウンタLRC1 ,LRC2 と自ロー
カルランキューカウンタLRC0 との差を計算し、最小
値、最大値を計算する(図3ステップ301,30
2)。この結果、最小値は「−3」、最大値は「2」と
なるので、何も行なわずに処理を終了する。Next, when the process for moving the process starts in the processor 11-0, the scheduler of the processor 11-0 causes the local run queue counters LRC0, LRC1 of the processors 11-0, 11-1, 11-2 to operate. , LRC2
After reading the value of, the difference between the local run queue counters LRC1 and LRC2 of the other processors 11-1 and 11-2 and the local run queue counter LRC0 is calculated, and the minimum value and the maximum value are calculated (step 301 in FIG. 3, FIG. 3). Thirty
2). As a result, the minimum value is "-3" and the maximum value is "2", so that the process is terminated without doing anything.
【0033】次に、プロセッサ11-2でプロセス移動の
ための処理が始まった場合、プロセッサ11-2のスケジ
ューラは、各プロセッサ11-0,11-1,11-2のロー
カルランキューカウンタLRC0 ,LRC1 ,LRC2
の値を読み出した後、他プロセッサ11-0,11-1のロ
ーカルランキューカウンタLRC0 ,LRC1 と、自ロ
ーカルランキューカウンタLRC2 との差を計算し、最
小値、最大値を計算する(図3ステップ301,30
2)。Next, when the processor 11-2 starts the process for process migration, the scheduler of the processor 11-2 causes the local run queue counters LRC0, LRC1 of the processors 11-0, 11-1, 11-2 to be executed. , LRC2
After the value of is read out, the difference between the local run queue counters LRC0 and LRC1 of the other processors 11-0 and 11-1 and the local run queue counter LRC2 is calculated, and the minimum value and the maximum value are calculated (step 301 in FIG. 3). , 30
2).
【0034】この結果、最小値は「3」、最大値は
「5」であるので、プロセッサ11-2のスケジューラ
は、グローバルランキューGRにプロセスが存在するか
否かを調べる(図3ステップ304,306)。As a result, since the minimum value is "3" and the maximum value is "5", the scheduler of the processor 11-2 checks whether or not there is a process in the global run queue GR (step 304 in FIG. 3, FIG. 3). 306).
【0035】この場合、移動対象プロセス(MP)が存
在するので、プロセッサ11-2のスケジューラは、グロ
ーバルランキューGRに対してロック操作を伴いながら
移動対象プロセス(MP)をキューよりアンリンクした
後、自ローカルランキューLR2 にリンクし、自ローカ
ルランキューカウンタLRC2 の値を「3」に変更する
(図3ステップ307,308)。In this case, since the process to be moved (MP) exists, the scheduler of the processor 11-2 unlinks the process to be moved (MP) from the queue while performing a lock operation on the global run queue GR, It links to the local run queue LR2 and changes the value of the local run queue counter LRC2 to "3" (steps 307 and 308 in FIG. 3).
【0036】これらの操作により、負荷の高いプロセッ
サにあるプロセスをローカルランキューに対するロック
操作を伴うことなく負荷の低いプロセッサに移動するこ
とができる。また、この例では、1つのプロセスを移動
するようになっているが、複数のプロセスを同時に移動
することも可能である。By these operations, it is possible to move a process in a high-load processor to a low-load processor without a lock operation for the local run queue. Further, in this example, one process is moved, but it is also possible to move a plurality of processes at the same time.
【0037】上記実施例では、プロセスをグローバルラ
ンキューGRに移動する、もしくはグローバルランキュ
ーGRよりプロセスを取り出す条件を導き出すために、
他のローカルランキューにつながれているプロセスの数
と自ローカルランキューのプロセス数との差を計算し、
計算結果の最小値と最大値を求めることにより、プロセ
ッサ間でどの程度プロセスの数にバラツキがあるかを調
べているが、これに限らず、このほかに、例えば、各ロ
ーカルランキューカウンタの値の平均値を計算し、自ロ
ーカルランキューにあるプロセスの数が(平均値)+
(ある一定のプロセス数)と等しい、もしくは大きい場
合、自ローカルランキューにあるプロセスをグローバル
ランキューGRにつなぐ操作を行ない、自ローカルラン
キューにあるプロセスの数が(平均値)−(ある一定の
プロセス数)と等しい、もしくは小さい場合は、グロー
バルランキューGRよりプロセスを獲得する操作をする
ことでプロセス移動を行なうことができる。In the above embodiment, in order to move the process to the global run queue GR or to derive the condition for taking out the process from the global run queue GR,
Calculate the difference between the number of processes connected to other local run queues and the number of processes in your local run queue,
By calculating the minimum and maximum values of the calculation results, we are investigating how much the number of processes varies among processors. However, this is not the only option, and in addition to this, for example, the value of each local run queue counter Calculate the average value, and the number of processes in the local run queue is (average value) +
If it is equal to or larger than (a certain fixed number of processes), the process of connecting the process in the local local run queue to the global run queue GR is performed, and the number of processes in the local local run queue is (average value)-(a certain fixed number of processes). If it is equal to or smaller than), the process can be moved by operating to acquire the process from the global run queue GR.
【0038】例えば、プロセス移動の条件の一部であ
る、しきい値(ある一定のプロセス数)を「3」、平均
値の小数点以下を切り上げとし、図2に於いてプロセッ
サ11-1がプロセス移動のための処理を開始した場合、
プロセッサ11-1のスケジューラは各プロセッサ11-
0,11-1,11-2のローカルランキューカウンタLR
C0 ,LRC1 ,LRC2 の値を読み出した後、平均値
を計算する。For example, the threshold value (a certain number of processes) which is a part of the process movement conditions is set to "3", and the decimal point of the average value is rounded up, and the processor 11-1 in FIG. If you start the process for moving,
The scheduler of the processor 11-1 is the processor 11-
Local run queue counters LR for 0, 11-1, 11-2
After reading the values of C0, LRC1 and LRC2, the average value is calculated.
【0039】このときの平均値は(5+8+2)÷3=
5となるので、プロセスをグローバルランキューGRに
渡す条件値は「8」、グローバルランキューGRよりプ
ロセスを受け取る条件は「2」となる。これらの値と自
ローカルランキューLR1 の値「8」とを比較すると、
プロセスをグローバルランキューGRに渡す条件が満た
されるので、プロセッサ11-1は自ローカルランキュー
LR1 につながれているプロセス(P)のどれかを移動
対象プロセス(MP)としてキューよりアンリンクした
後、ローカルランキューカウンタLRC1 を「7」に更
新し、グローバルランキュー(GR)にロック操作を伴
いながらリンクする。The average value at this time is (5 + 8 + 2) / 3 =
Therefore, the condition value for passing the process to the global run queue GR is “8”, and the condition for receiving the process from the global run queue GR is “2”. Comparing these values with the value "8" of the local run queue LR1,
Since the condition for passing the process to the global run queue GR is satisfied, the processor 11-1 unlinks one of the processes (P) connected to its own local run queue LR1 from the queue as the process to be moved (MP), and then the local run queue The counter LRC1 is updated to "7" and linked to the global run queue (GR) with a lock operation.
【0040】次に、プロセッサ11-0でプロセス移動の
ための処理が始まった場合、プロセッサ11-0のスケジ
ューラは、各プロセッサ11-0,11-1,11-2のロー
カルランキューカウンタLRC0 、LRC1 、LRC2
の値を読み出した後、平均値を計算し、プロセス移動条
件を求める。Next, when the process for moving the process starts in the processor 11-0, the scheduler of the processor 11-0 causes the local run queue counters LRC0, LRC1 of the processors 11-0, 11-1, 11-2 to operate. , LRC2
After reading the value of, the average value is calculated and the process movement condition is obtained.
【0041】この場合、平均値は(5+7+2)÷3=
4.67となるので、切り上げて「5」とすると、プロ
セスをグローバルランキューGRに渡す条件値は
「8」、グローバルランキューGRよりプロセスを受け
取る条件は「2」となる。自ローカルランキューカウン
タLRC0 の値は「5」であるので、何も行なわずに処
理を終える。In this case, the average value is (5 + 7 + 2) / 3 =
Since it is 4.67, if it is rounded up to "5", the condition value for passing the process to the global run queue GR is "8", and the condition for receiving the process from the global run queue GR is "2". Since the value of the local run queue counter LRC0 is "5", the process is ended without performing anything.
【0042】次に、プロセッサ11-2でプロセス移動の
ための処理が始まった場合、プロセッサ11-2のスケジ
ューラは、各プロセッサ11-0,11-1,11-2のロー
カルランキューカウンタLRC0 ,LRC1 ,LRC2
の値を読み出した後、平均値を計算し、プロセス移動条
件を求める。Next, when the processor 11-2 starts processing for process migration, the scheduler of the processor 11-2 causes the local run queue counters LRC0 and LRC1 of the processors 11-0, 11-1, and 11-2 to be executed. , LRC2
After reading the value of, the average value is calculated and the process movement condition is obtained.
【0043】この場合、平均値は(5+7+2)÷3=
4.67となるので、切り上げて「5」とすると、プロ
セスをグローバルランキューGRに渡す条件値は
「8」、グローバルランキューGRよりプロセスを受け
取る条件は「2」となる。これらの値と自ローカルラン
キューカウンタLRC2 の値「2」と比較すると、グロ
ーバルランキューGRよりプロセスを受け取る条件を満
たしているので、プロセッサ11-2はグローバルランキ
ューGRよりロック操作を伴いながら移動対象プロセス
(MP)をアンリンクした後、自ローカルランキューL
R2 にリンクし、自ローカルランキューカウンタLRC
2 の値を「3」に更新する。よって、上記した例と同様
に、負荷の高いプロセスから負荷の低いプロセスにプロ
セスを移動することが可能になる。In this case, the average value is (5 + 7 + 2) / 3 =
Since it is 4.67, if it is rounded up to "5", the condition value for passing the process to the global run queue GR is "8", and the condition for receiving the process from the global run queue GR is "2". Comparing these values with the value "2" of the local run queue counter LRC2, the condition for receiving the process from the global run queue GR is satisfied, so the processor 11-2 moves from the global run queue GR with the lock operation from the process to be moved ( MP), and then local run queue L
Linked to R2, own local run queue counter LRC
Update the value of 2 to "3". Therefore, as in the above-described example, it is possible to move a process from a process with a high load to a process with a low load.
【0044】又、上記実施例では、あるプロセッサ(1
1-i)がプロセス(P)を生成した場合、そのプロセス
(P)を自ローカルランキュー(LRi )にリンクして
いたが、生成したプロセス(P)を移動対象プロセス
(MP)と見做し、自ローカルランキュー(LRi )に
リンクする前に、プロセス移動の処理を行ない、自プロ
セッサ(11-i)の負荷が低い場合は、自ローカルラン
キュー(LRi )に生成したプロセスをリンクし、自プ
ロッセッサ(11-i)の負荷が高い場合は、グローバル
ランキューGRに生成したプロセスをリンクすることに
より、負荷の高いプロセッサに新たに生成されたプロセ
スをリンクすることによるプロセッサの負荷を増大を防
ぎ、負荷の低いプロセッサにプロセスを移動することに
より負荷の均等化を図ることができる。In the above embodiment, a processor (1
1-i) created the process (P), the process (P) was linked to its own local run queue (LRi), but the created process (P) is regarded as the migration target process (MP). , Process migration is performed before linking to the local local run queue (LRi), and if the load on the local processor (11-i) is low, the process created in the local local run queue (LRi) is linked to the local processor. When the load of (11-i) is high, the process created in the global run queue GR is linked to prevent an increase in the load of the processor due to the linking of the newly created process to the processor having a high load. The load can be equalized by moving the process to a processor with lower load.
【0045】例えば、図2の実施例に於いて図3のプロ
セス移動手順を使用した場合で、プロセッサ11-1がプ
ロセスを生成したとき、プロセッサ11-1はプロセス移
動の処理を実行し、プロセス移動の条件を満たしている
か否かを調べる。For example, in the case of using the process migration procedure of FIG. 3 in the embodiment of FIG. 2, when the processor 11-1 creates a process, the processor 11-1 executes the process migration process, Check whether the conditions for movement are met.
【0046】この場合、最小値が「−6」、最大値が
「−2」となるので、プロセッサ11-1は生成したプロ
セスをロック操作を伴いながらグローバルランキューG
Rにリンクする。In this case, since the minimum value is "-6" and the maximum value is "-2", the processor 11-1 performs the global run queue G while locking the generated process.
Link to R.
【0047】その後、負荷の低いプロセッサ11-2でプ
ロセス移動の処理が実行された場合に、グローバルラン
キューGRにリンクされているプロセスが自ローカルラ
ンキューLR2 にリンクされることになるので、負荷の
高いプロセッサの負荷を増大させずに、負荷の低いプロ
セッサにプロセスを移動することが可能となる。After that, when the process migration process is executed by the processor 11-2 having a low load, the process linked to the global run queue GR is linked to the local run queue LR2, so that the load is high. It is possible to move a process to a lightly loaded processor without increasing the processor load.
【0048】上記実施例では、グローバルランキューG
Rにつながれた移動対象プロセスは、プロセッサがプロ
セス移動の処理を行なってグローバルランキューGRか
らプロセスを獲得する条件を満たした場合、及びある一
定間隔でグローバルランキューGRを調べた際に、移動
対象プロセスが存在した場合にプロセッサのローカルラ
ンキューに移動されていた。このため、グローバルラン
キューGRにつながれているプロセスの実行が長い間、
待たされたり、負荷の高いプロセッサにプロセスが移動
したりする場合がある。In the above embodiment, the global run queue G
The migration target process connected to R is the migration target process when the processor performs the process migration process and satisfies the condition for acquiring the process from the global run queue GR, and when the global run queue GR is checked at a certain interval. It was moved to the processor's local run queue if it existed. For this reason, the processes connected to the global run queue GR are executed for a long time.
The process may be delayed or moved to a heavily loaded processor.
【0049】そこで、プロセスをグローバルランキュー
GRに移動したプロセッサが、移動対象プロセスを渡し
たいプロセッサに対して割り込みを発生し、割り込みを
受けたプロセッサがグローバルランキューGRにある移
動対象プロセスを自ローカルランキューに移動すること
により、グローバルランキューGRにあるプロセスの実
行が長い間、待たされることなく、各プロセッサの負荷
を均等化することが可能となる。図4に本発明の第2の
実施例を示す。Therefore, the processor that has moved the process to the global run queue GR issues an interrupt to the processor to which the process to be transferred is to be transferred, and the processor that has received the interrupt transfers the process to be moved in the global run queue GR to its own local run queue. By moving, it becomes possible to equalize the load on each processor without waiting for the execution of the process in the global run queue GR for a long time. FIG. 4 shows a second embodiment of the present invention.
【0050】図4は図2に於いて、各プロセス(P)の
プライオリティの総和を格納するプライオリティカウン
タPC0 ,PC1 ,PC2 を新たに共有メモリ(CM)
上に設け、プロセス移動する条件を各プロセッサ11-
0,11-1,11-2のローカルランキューにつながれて
いるプロセスのプライオリティの平均値によりプロセス
の移動条件を導く場合を示す。In FIG. 4, priority counters PC0, PC1 and PC2 for storing the total sum of priorities of the respective processes (P) in FIG. 2 are newly added to the shared memory (CM).
Each processor 11-provides a condition for moving a process provided above.
The case where the migration condition of the process is derived from the average value of the priorities of the processes connected to the local run queues 0, 11-1, 11-2 is shown.
【0051】例えば、プライオリティが1番高いプロセ
スのプライオリティ値を「1」、プライオリティが1番
低いプロセスのプライオリティ値を「10」とし、移動
対象プロセスを、プライオリティの平均値が小さいプロ
セッサにある高プライオリティのプロセスをプライオリ
ティの平均値の大きいプロセスに移動すると仮定し、ロ
ーカルランキューLR0 にプロセス(P)が3つ、ロー
カルランキューLR1にプロセス(P)が5つ、ローカ
ルランキューLR2 にプロセス(P)が4つ、つながっ
ていたとする。For example, the priority value of the process with the highest priority is "1", the priority value of the process with the lowest priority is "10", and the process to be moved has a high priority in a processor with a small average priority value. It is assumed that the process of (3) is moved to a process having a high average priority value, and the local run queue LR0 has three processes (P), the local run queue LR1 has five processes (P), and the local run queue LR2 has four processes (P). Suppose that they were connected.
【0052】尚、プロセス(P)内の数字は、プライオ
リティ値を示しており、プライオリティカウンタPC0
には(8+10+9)=27が、プライオリティカウン
タPC1 には(2+1+4+1+2)=10が、プライ
オリティカウンタPC2 には(3+7+4+6)=20
がそれぞれ格納されている。The number in the process (P) indicates the priority value, and the priority counter PC0
Is (8 + 10 + 9) = 27, the priority counter PC1 is (2 + 1 + 4 + 1 + 2) = 10, and the priority counter PC2 is (3 + 7 + 4 + 6) = 20.
Are stored respectively.
【0053】いま、プロセッサ11-1でプロセス移動の
処理を開始した場合、プロセッサ11-1のスケジューラ
は、各プロセッサ11-0,11-1,11-2にあるローカ
ルランキューカウンタLRC0 ,LRC1 ,LRC2
と、プライオリティカウンタPC0 ,PC1 ,PC2 の
値を読み込んだ後、プロセッサ毎のプライオリティの平
均値を計算し、平均値の最小値、最大値を求める。Now, when the process migration processing is started in the processor 11-1, the scheduler of the processor 11-1 has the local run queue counters LRC0, LRC1, LRC2 in the processors 11-0, 11-1, 11-2.
After reading the values of the priority counters PC0, PC1 and PC2, the average value of the priority for each processor is calculated, and the minimum and maximum values of the average value are obtained.
【0054】この例では、プロセッサ11-0のプライオ
リティの平均値が27÷3=9、プロセッサ11-1のプ
ライオリティの平均値が10÷5=2、プロセッサ11
-2のプライオリティの平均値が20÷4=5となり、よ
って最小値は「2」、最大値は「9」となる。In this example, the average priority value of the processor 11-0 is 27/3 = 9, the average priority value of the processor 11-1 is 10/5 = 2,
The average value of the priority of -2 is 20/4 = 5, so the minimum value is "2" and the maximum value is "9".
【0055】この結果と自プロセッサ11-1のプライオ
リティの平均値「2」と比較すると、最小値と一致する
ので、自プロセッサ11-1のスケジューラは自ローカル
ランキューLR1 にあるプロセス(P)の中からプライ
オリティの1番高いプロセス(ここではプライオリティ
1のプロセス)を移動対象プロセス(MP)としてキュ
ーよりアンリンクした後、ローカルランキューカウンタ
LRC1 の値を「4」に、プライオリティカウンタPC
1 の値を「9」に更新し、グローバルランキューGRに
ロック操作を伴いながらリンクして処理を終了する。When this result is compared with the average value "2" of the priorities of the own processor 11-1, it is the minimum value. Therefore, the scheduler of the own processor 11-1 is in the process (P) in the own local run queue LR1. After unlinking the process with the highest priority (here, the process with priority 1) from the queue as the process to be moved (MP), the value of the local run queue counter LRC1 is set to "4" and the priority counter PC
The value of 1 is updated to "9", the global run queue GR is linked with the lock operation, and the processing ends.
【0056】次に、プロセッサ11-2でプロセス移動の
処理を開始した場合、プロセッサ11-2のスケジューラ
は、各プロセッサ11-0,11-1,11-2にあるローカ
ルランキューカウンタLRC0 ,LRC1 ,LRC2
と、プライオリティカウンタPC0 ,PC1 ,PC2 の
値を読み込んだ後、プロセッサ毎のプライオリティの平
均値を計算し、平均値の最小値、最大値を求める。Next, when the process migration process is started by the processor 11-2, the scheduler of the processor 11-2 causes the local run queue counters LRC0, LRC1, respectively in the processors 11-0, 11-1, 11-2. LRC2
After reading the values of the priority counters PC0, PC1 and PC2, the average value of the priority for each processor is calculated, and the minimum and maximum values of the average value are obtained.
【0057】プロセッサ11-0のプライオリティの平均
値は27÷3=9、プロセッサ11-1のプライオリティ
の平均値は9÷4=2.25、プロセッサ11-2のプラ
イオリティの平均値は20÷4=5、よって最小値は
「2.25」、最大値は「7」となる。この結果と自プ
ロセッサ11-2のプライオリティの平均値「5」と比較
すると、どちらも該当しないので何も行なわずに終了す
る。The average priority value of the processor 11-0 is 27 ÷ 3 = 9, the average priority value of the processor 11-1 is 9 ÷ 4 = 2.25, and the average priority value of the processor 11-2 is 20 ÷ 4. = 5, so the minimum value is "2.25" and the maximum value is "7". When this result is compared with the average value "5" of the priorities of the own processor 11-2, since neither of them corresponds, the process ends without performing anything.
【0058】次に、プロセッサ11-0でプロセス移動の
処理を開始した場合、プロセッサ11-0のスケジューラ
は各プロセッサ11-0,11-1,11-2のローカルラン
キューカウンタLRC0 ,LRC1 ,LRC2 とプライ
オリティカウンタPC0 ,PC1 ,PC2 の値を読み込
んだ後、プロセッサごとのプライオリティの平均値を計
算し、平均値の最小値、最大値を求める。Next, when the process migration is started by the processor 11-0, the scheduler of the processor 11-0 sets the local run queue counters LRC0, LRC1, LRC2 of the processors 11-0, 11-1, 11-2 to the local run queue counters LRC0, LRC1, LRC2. After reading the values of the priority counters PC0, PC1 and PC2, the average value of the priority for each processor is calculated, and the minimum value and the maximum value of the average value are obtained.
【0059】プロセッサ11-0のプライオリティの平均
値は27÷3=9、プロセッサ11-1のプライオリティ
の平均値は9÷4=2.25、プロセッサ11-2のプラ
イオリティの平均値は20÷4=5、よって最小値は
「2.25」、最大値は「9」となる。The average priority value of the processor 11-0 is 27 ÷ 3 = 9, the average priority value of the processor 11-1 is 9 ÷ 4 = 2.25, and the average priority value of the processor 11-2 is 20 ÷ 4. = 5, so the minimum value is "2.25" and the maximum value is "9".
【0060】この結果と自プロセッサ11-0のプライオ
リティの平均値「9」と比較すると、最大値と一致する
ので、自プロセッサ11-0のスケジューラはグローバル
ランキューGRよりロック操作を伴いながら移動対象プ
ロセス(MP)をアンリンクした後、自ローカルランキ
ューLR0 にリンクし、自ローカルランキューカウンタ
LRC0 の値を「4」に、自プライオリティカウンタP
C0 の値を「28」に更新し、処理を終了する。When this result is compared with the average value "9" of the priorities of the own processor 11-0, the result matches the maximum value, so the scheduler of the own processor 11-0 causes the global run queue GR to perform a lock operation from the process to be moved. After unlinking (MP), it is linked to its own local run queue LR0, the value of its own local run queue counter LRC0 is set to "4", and its own priority counter P
The value of C0 is updated to "28", and the process ends.
【0061】よって、プライオリティの高いプロセスが
多いプロセッサから、プライオリティの低いプロセスが
多いプロセッサに、プライオリティの高いプロセスが移
動することにより、プロセッサ間の負荷バランスをと
り、プロセッサ間のレスポンスのバラツキを小さくする
ことが可能になる。図5に本発明の第3の実施例を示
す。Therefore, by moving a high-priority process from a processor having many high-priority processes to a processor having many low-priority processes, the load balance among the processors is balanced and the variation in the response between the processors is reduced. It will be possible. FIG. 5 shows a third embodiment of the present invention.
【0062】図2に示すような共有メモリ型マルチプロ
セッサシステムにおいて、プロセッサ数が増えた場合、
各プロセッサ間のばらつきが大きくなるとグローバルラ
ンキューに対するアクセスが頻繁になるため、各プロセ
ッサからのグローバルランキューに対するロック要求が
衝突し、システム全体の処理能力が低下する可能性があ
る。In a shared memory type multiprocessor system as shown in FIG. 2, when the number of processors increases,
When the variation among the processors becomes large, the global run queue is frequently accessed, so that the lock requests from the respective processors to the global run queue collide with each other, which may reduce the processing capability of the entire system.
【0063】これを解決するために、図5の実施例で
は、8つのプロセッサ(11-0,11-1,…,11-7)
に対して2つのグローバルランキューGR0 ,GR1 を
設け、プロセッサ11-0,11-1,11-2,11-3には
グローバルランキューGR0 を、プロセッサ11-4,1
1-5,11-6,11-7にはグローバルランキューGR1
をそれぞれ割り当て、グローバルランキューに対するア
クセスを分散することにより、グローバルランキューに
対するアクセスがボトルネックになり難くなり、システ
ム全体の処理能力の低下を防ぐことができる。In order to solve this, in the embodiment of FIG. 5, eight processors (11-0, 11-1, ..., 11-7) are used.
, Two global run queues GR0 and GR1 are provided for the processors 11-0, 11-1, 11-2 and 11-3.
Global run queue GR1 for 1-5, 11-6, 11-7
By allocating each of them to distribute access to the global run queue, it becomes difficult for the access to the global run queue to become a bottleneck, and it is possible to prevent a decrease in the processing capacity of the entire system.
【0064】従って、上記各実施例を組み合わせ、負荷
の高いプロセッサから負荷の低いプロセッサにプロセス
を移動することにより、プロセッサ毎の負荷のバランス
がとれ、プロセッサ間のレスポンスのバラツキが小さく
スループットの高い並列処理が実現できる。Therefore, by combining the above embodiments and moving the process from the processor with a high load to the processor with a low load, the load of each processor can be balanced, the variation of the response between the processors is small, and the parallel processing with high throughput is achieved. Processing can be realized.
【0065】[0065]
【発明の効果】以上詳述したように、本発明によれば、
プロセッサ毎に実行可能なプロセスをリンクしたローカ
ルランキューを有する共有メモリ型マルチプロセッサシ
ステムに於いて、ローカルランキュー間を移動するプロ
セスを一時的に格納する全プロセッサからアクセス可能
なグローバルランキューを設け、プロセスを負荷の高い
プロセッサから負荷の低いプロセッサに上記グローバル
ランキューを介して移動することにより、プロセッサ毎
の負荷バランスがとれ、プロセッサ間のレスポンスのバ
ラツキが小さくスループットの高い並列処理が実現でき
る。As described in detail above, according to the present invention,
In a shared memory type multi-processor system having a local run queue in which processes that can be executed for each processor are linked, a global run queue that temporarily stores processes that move between local run queues and that can be accessed by all processors is provided. By moving from a processor with a high load to a processor with a low load via the global run queue, the load of each processor can be balanced, and the variation in the response between the processors is small, and parallel processing with high throughput can be realized.
【図1】本発明の概要を説明するためのシステム構成を
示すブロック図。FIG. 1 is a block diagram showing a system configuration for explaining an outline of the present invention.
【図2】本発明の第1実施例の構成を示すブロック図。FIG. 2 is a block diagram showing the configuration of the first embodiment of the present invention.
【図3】本発明の実施例に於けるプロセス移動処理手順
を示すフローチャート。FIG. 3 is a flowchart showing a process movement processing procedure in the embodiment of the present invention.
【図4】本発明の第2実施例の構成を示すブロック図。FIG. 4 is a block diagram showing the configuration of a second embodiment of the present invention.
【図5】本発明の第3実施例の構成を示すブロック図。FIG. 5 is a block diagram showing the configuration of a third embodiment of the present invention.
11(11-0,11-1,…)…プロセッサ、12…バス
(BUS)、13…共有メモリ(CM)、LR(LR0
,LR1 ,…)…ローカルランキュー、GR(GR0
,GR1 )…グローバルランキュー、LRC(LRC0
,LRC1 ,…)…ローカルランキューカウンタ、P
C(PC0 ,PC1 ,…)…プライオリティカウンタ、
P…プロセス、MP…移動対象プロセス。11 (11-0, 11-1, ...) ... Processor, 12 ... Bus (BUS), 13 ... Shared memory (CM), LR (LR0
, LR1, ...) ... Local run queue, GR (GR0
, GR1) ... Global run queue, LRC (LRC0
, LRC1, ...) ... Local run queue counter, P
C (PC0, PC1, ...) ... Priority counter,
P ... Process, MP ... Process to be moved.
Claims (1)
ンクしたローカルランキューを有する共有メモリ型マル
チプロセッサシステムに於いて、 ローカルランキュー間を移動するプロセスを一時的に格
納する全プロセッサからアクセス可能なグローバルラン
キューと、 自ローカルランキューより移動対象プロセスをアンリン
クし、ロック操作を伴いながら上記グローバルランキュ
ーに一時的にリンクするプロセッサの処理手段と、 上記グローバルランキューよりロック操作を伴いながら
移動対象プロセスをアンリンクし、自ローカルランキュ
ーにリンクするプロセッサの処理手段とを具備してなる
ことを特徴とするマルチプロセッサに於けるプロセス管
理方式。1. In a shared memory multiprocessor system having a local run queue in which processes executable for each processor are linked, a global run queue accessible from all processors for temporarily storing a process moving between local run queues. Unlink the process to be moved from its own local run queue and temporarily link it to the global run queue while performing a lock operation, and unlink the process to be moved from the global run queue while performing a lock operation. , A process management system in a multiprocessor, comprising: a processing means of a processor linked to its own local run queue.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3493592A JPH05233562A (en) | 1992-02-21 | 1992-02-21 | Process control system for multiprocessor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3493592A JPH05233562A (en) | 1992-02-21 | 1992-02-21 | Process control system for multiprocessor |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05233562A true JPH05233562A (en) | 1993-09-10 |
Family
ID=12428049
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3493592A Pending JPH05233562A (en) | 1992-02-21 | 1992-02-21 | Process control system for multiprocessor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05233562A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7251815B2 (en) | 2003-04-29 | 2007-07-31 | International Business Machines Corporation | Multiple virtual machines sharing processor and work queue in memory having program/dispatch functions for assigning and accessing work items while the virtual machine was not idle |
| JP2009217384A (en) * | 2008-03-07 | 2009-09-24 | Nec Corp | Queue management device, control program, job processing system and control method |
| JP2015164052A (en) * | 2015-04-15 | 2015-09-10 | イーソル株式会社 | Control program for multi-core processor, electronic apparatus, and control method |
-
1992
- 1992-02-21 JP JP3493592A patent/JPH05233562A/en active Pending
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7251815B2 (en) | 2003-04-29 | 2007-07-31 | International Business Machines Corporation | Multiple virtual machines sharing processor and work queue in memory having program/dispatch functions for assigning and accessing work items while the virtual machine was not idle |
| JP2009217384A (en) * | 2008-03-07 | 2009-09-24 | Nec Corp | Queue management device, control program, job processing system and control method |
| JP2015164052A (en) * | 2015-04-15 | 2015-09-10 | イーソル株式会社 | Control program for multi-core processor, electronic apparatus, and control method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6078944A (en) | Process management method and system | |
| US5867704A (en) | Multiprocessor system shaving processor based idle state detection and method of executing tasks in such a multiprocessor system | |
| US6993762B1 (en) | Process for improving the performance of a multiprocessor system comprising a job queue and system architecture for implementing the process | |
| US7251815B2 (en) | Multiple virtual machines sharing processor and work queue in memory having program/dispatch functions for assigning and accessing work items while the virtual machine was not idle | |
| US5099418A (en) | Distributed data driven process | |
| US7137116B2 (en) | Method and system for performing a task on a computer | |
| US5745778A (en) | Apparatus and method for improved CPU affinity in a multiprocessor system | |
| JP2866241B2 (en) | Computer system and scheduling method | |
| US6519660B1 (en) | Method, system and program products for determining I/O configuration entropy | |
| US20140208072A1 (en) | User-level manager to handle multi-processing on many-core coprocessor-based systems | |
| US8239873B2 (en) | Speedy event processing | |
| CN107977271B (en) | Load balancing method for data center integrated management system | |
| Paudel et al. | On the merits of distributed work-stealing on selective locality-aware tasks | |
| EP3422183B1 (en) | Managing parallel processing | |
| JPH05233562A (en) | Process control system for multiprocessor | |
| CN116841751B (en) | Policy configuration method, device and storage medium for multi-task thread pool | |
| US20230418667A1 (en) | Computing device for handling tasks in a multi-core processor, and method for operating computing device | |
| JP2580525B2 (en) | Load balancing method for parallel computers | |
| Xia et al. | Hierarchical scheduling of DAG structured computations on manycore processors with dynamic thread grouping | |
| Chhabra et al. | Qualitative Parametric Comparison of Load Balancing Algorithms in Distributed Computing Environment | |
| US11789773B2 (en) | Computing device for handling tasks in a multi-core processor, and method for operating computing device | |
| Al-Mouhamed | Analysis of macro-dataflow dynamic scheduling on nonuniform memory access architectures | |
| Rajguru et al. | A performance analysis of task scheduling algorithms using qualitative parameters | |
| JPH05233572A (en) | Process dispatch system for multiprocessor | |
| US11809219B2 (en) | System implementing multi-threaded applications |