JPH10187469A - Process dispatch method for multiprocessor - Google Patents

Process dispatch method for multiprocessor

Info

Publication number
JPH10187469A
JPH10187469A JP34859696A JP34859696A JPH10187469A JP H10187469 A JPH10187469 A JP H10187469A JP 34859696 A JP34859696 A JP 34859696A JP 34859696 A JP34859696 A JP 34859696A JP H10187469 A JPH10187469 A JP H10187469A
Authority
JP
Japan
Prior art keywords
processor
time
queue
management information
average
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.)
Granted
Application number
JP34859696A
Other languages
Japanese (ja)
Other versions
JP2954056B2 (en
Inventor
Hiroshi Uchikune
寛 内久根
Masahiko Hayashi
正彦 林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
NEC Solution Innovators Ltd
Original Assignee
NEC Corp
NEC Solution Innovators Ltd
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 NEC Corp, NEC Solution Innovators Ltd filed Critical NEC Corp
Priority to JP34859696A priority Critical patent/JP2954056B2/en
Publication of JPH10187469A publication Critical patent/JPH10187469A/en
Application granted granted Critical
Publication of JP2954056B2 publication Critical patent/JP2954056B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform the process dispatch of multiprocessor with which high- speed processor allocation is enabled and inter-processor load distribution is enabled as well. SOLUTION: A processor queue registering means 4 finds process execution waiting time for each processor by calculating the product of processor allocation waiting process number 21 stored by a processor allocation queue measuring means 21 and average processor occupation time 31 stored by an average processor occupation time measuring means 3. When the difference of this waiting time is settled within a fixed range, it is registered on a processor allocation queue 5 of processor shown by processor allocation information 111 but in the other case, the processor of minimum process execution waiting time in this predicted process execution waiting time for each processor is selected and registered on the processor allocation queue 5 of this processor so as to be executed by this processor.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プロセスディスパ
ッチ方法に関し、特に、複数のプロセッサが単一のオペ
レーティングシステムにより制御されるマルチプロセッ
サのプロセスディスパッチ方法に関する。
The present invention relates to a process dispatching method, and more particularly, to a process dispatching method for a multiprocessor in which a plurality of processors are controlled by a single operating system.

【0002】[0002]

【従来の技術】従来のプロセスディスパッチ方法、たと
えば、「特開平3−113563号公報」は、複数のプ
ロセッサからなるマルチプロセッサシステムにおいて、
複数のプロセッサのいずれでも実行可能なプロセスにつ
いて、あえてそのプロセスをグループ化しそのグループ
を実行させるプロセッサを特定のプロセッサに限定しよ
うとする際、プロセッサ間の負荷が特定のプロセッサに
片寄ることのないように、一定時間以上実行されずに放
置されているプロセスについては、いずれのプロセッサ
でも実行できるようにすることで、プロセッサの負荷を
分散しつつ、キャッシュ性能を向上させる技術である。
2. Description of the Related Art A conventional process dispatching method, for example, Japanese Patent Application Laid-Open No. 3-113563 discloses a multi-processor system comprising a plurality of processors.
When trying to group processes that can be executed by any of multiple processors and limit the processors that execute the group to a specific processor, the load between processors should not be biased toward a specific processor. This is a technique for improving the cache performance while distributing the processor load by allowing any processor to execute a process that has not been executed for a certain period of time.

【0003】この技術の特徴は、マルチプロセッサシス
テムにおいて、プロセスを特定のプロセッサに割り当て
て、キャッシュ性能を向上させる際に生じる、プロセッ
サ間の負荷の偏りを、プロセッサにプロセスを割り当て
るプロセススケジュール時に、一定時間以上実行されず
に放置されているプロセスについては、いずれのプロセ
ッサでも実行できるようにすることで防止するものであ
る。
The feature of this technique is that, in a multiprocessor system, a load imbalance between processors, which occurs when a process is allocated to a specific processor and cache performance is improved, is fixed when a process is allocated to a processor. Processes that have been left unexecuted for longer than a certain time are prevented by allowing any processor to execute them.

【0004】[0004]

【発明が解決しようとする課題】上述した従来の技術の
問題点は、実際に待たされていた時間を計測し、これが
一定時間以上であるならば、つまり長時間実行待ち状態
になっているならば、いずれのプロセッサでも実行でき
るようにすることでプロセッサ間の負荷を分散して、結
果的に負荷を均等に保つものであるが、ここでは、プロ
セッサ間の負荷の分散はおこなわれるものの、プロセス
の実行待ち時間は、プロセッサ待ち行列中で該プロセス
より前部に位置するプロセスのプロセッサ利用状況の影
響を受け、場合によっては、長時間待たされた末、他の
プロセッサで実行されることになることである。
The problem of the prior art described above is that the time actually waited is measured, and if this time is longer than a predetermined time, that is, if the apparatus has been in the state of waiting for a long time of execution. For example, by distributing the load among processors by enabling execution on any processor, the load can be kept even as a result. Is affected by the processor usage of a process located in front of the process in the processor queue, and in some cases, the process is executed by another processor after a long wait. That is.

【0005】これは、応答性能を要求されるオンライン
トランザクション処理において、プロセッサを要求して
もなかなかプロセッサの割り当てが行われず、結果とし
てターンアラウンドタイムの悪化などの問題を発生す
る。理由は、プロセッサにプロセスを割り当てるプロセ
ススケジュール時に、一定時間以上実行されずに放置さ
れているプロセスについては、いずれのプロセッサでも
実行できるようにする際、実行されずに放置されている
実行待ち時間を、プロセスがプロセッサ待ち行列に登録
されてから該プロセスにプロセッサが割り当てられるま
での時間を計測することで求めているからである。
[0005] In online transaction processing requiring response performance, even if a processor is requested, it is difficult for the processor to be allocated, and as a result, a problem such as deterioration of turnaround time occurs. The reason is that when a process is assigned to a processor and a process is left unexecuted for a certain period of time, the execution wait time that has been left unexecuted is set to allow execution by any processor. Is determined by measuring the time from when a process is registered in a processor queue to when a processor is assigned to the process.

【0006】たとえば、プロセッサ待ち行列中の最後尾
に位置するプロセスがプロセッサを割り当てられるまで
の実行待ち時間は、プロセッサ待ち行列中で該プロセス
より前部に位置するプロセスのプロセッサ利用時間の総
和となり、プロセッサ待ち行列中で該プロセスより前部
に位置するプロセスのプロセッサ利用状況により変化す
る。そして、この実行待ち時間は、該プロセスへのプロ
セッサ割り当てが行われる時点になってはじめて明らか
になり、ここでようやく、他のプロセッサへの割り当て
が許される。
For example, the execution wait time until the last process in the processor queue is assigned a processor is the sum of the processor utilization times of processes located in front of the process in the processor queue. It changes depending on the processor usage of the process located in front of the process in the processor queue. The execution waiting time becomes apparent only when the processor is assigned to the process, and the assignment to another processor is finally permitted.

【0007】したがって、実行待ち時間を短く保ちつ
つ、つまり、プロセッサを必要とするプロセスへのすば
やいプロセッサ割り当てを可能とすると当時に、プロセ
ッサ間の負荷分散を可能にする必要がある。
[0007] Therefore, it is necessary to distribute the load among the processors while keeping the execution waiting time short, that is, when the processor can be quickly allocated to the process requiring the processor.

【0008】本発明の目的は、複数のプロセッサが、単
一のオペレーティングシステムにより制御されるマルチ
プロセッサシステムにおいて、プロセスを管理するプロ
セス管理情報に従って、プロセスにプロセッサを割り当
てるプロセスディスパッチ方法において、上述の欠点を
除去し、プロセッサを必要とするプロセスを長時間待た
せることなく、すばやいプロセッサ割り当てを可能に
し、かつ、プロセッサ間の負荷分散も可能にするマルチ
プロセッサにおけるプロセスディスパッチ方法を提供す
ることである。
An object of the present invention is to provide a process dispatching method for assigning a processor to a process according to process management information for managing the process in a multiprocessor system in which a plurality of processors are controlled by a single operating system. The present invention provides a process dispatching method in a multiprocessor that enables quick processor allocation without causing a process requiring a processor to wait for a long time, and also enables load distribution between processors.

【0009】[0009]

【課題を解決するための手段】本発明の第1のマルチプ
ロセッサのプロセスディスパッチ方法は、プロセスディ
スパッチ手段が、次に実行すべきプロセスを選択する
際、前記プロセスディスパッチ手段自信が実行されてい
る前記プロセッサと同一の前記プロセッサ上で実行され
るべき前記プロセスを、前記プロセス管理情報内の前記
プロセッサ割り当て情報から判別・選択し、指定された
前記プロセッサ上で前記プロセスを実行することで、前
記プロセスを特定の前記プロセッサで実行することが可
能なマルチプロセッサのプロセスディスパッチ方法であ
って、前記プロセッサごとにプロセッサの待ち行列上の
前記プロセスの個数を計測するプロセッサ割り当て待ち
行列計測手段により計測されたプロセッサの割り当て待
ち行列の個数と、前記プロセッサごとにそのプロセッサ
で実行された前記プロセスの平均プロセッサ占有時間を
計測する平均プロセッサ占有時間計測手段により計測さ
れた平均プロセッサ占有時間とから、前記プロセッサの
待ち行列への登録時に、前記プロセッサごとのプロセス
実行待ち時間を予測し、これらの前記プロセス実行待ち
時間の差が一定の範囲内にある場合には、前記プロセス
管理情報内の前記プロセスに割り当てるプロセッサ情報
が示す前記プロセッサの前記プロセッサの割り当て待ち
行列に前記プロセスを登録し、前記プロセス実行待ち時
間の差が一定の範囲内にない場合には、予測した前記プ
ロセッサごとの前記プロセス実行待ち時間の中で最も小
さい前記プロセス実行待ち時間の前記プロセッサを選択
して、このプロセッサの前記プロセッサの割り当て待ち
行列に登録することで、前記プロセッサの負荷が特定の
前記プロセッサに偏ることなく均等に与えられるように
割り当てられるべき前記プロセッサを選択しつつ、前記
プロセスを特定の前記プロセッサで実行する。
According to the first multiprocessor process dispatch method of the present invention, when the process dispatcher selects a process to be executed next, the process dispatcher itself is executed. By determining and selecting the process to be executed on the same processor as the processor from the processor allocation information in the process management information, and executing the process on the specified processor, the process is executed. A multiprocessor process dispatching method capable of being executed by the specific processor, wherein the processor allocation queue measuring unit measures the number of the processes on a processor queue for each processor. Number of quota queues and previous From the average processor occupancy time measured by the average processor occupancy time measuring means for measuring the average processor occupancy time of the process executed by the processor for each processor, when registering the processor in the queue, The process execution waiting time is predicted, and when the difference between the process execution waiting times is within a certain range, the processor assignment waiting time of the processor indicated by the processor information assigned to the process in the process management information. When the process is registered in a queue, and the difference between the process execution waiting times is not within a certain range, the processor having the smallest process execution waiting time among the predicted process execution waiting times for the respective processors. Select the processor for this processor By registering the allocation queue, load of the processor while selecting the processor to be allocated as given evenly without being biased to a particular said processor to perform the process in particular the processor.

【0010】本発明の第2のマルチプロセッサのプロセ
スディスパッチ方法は、前記第1のマルチプロセッサの
プロセスディスパッチ方法であって、(a)前記プロセ
ッサを必要とする前記プロセスの前記プロセス管理情報
内の前記プロセッサ割り当て情報を参照して、前記プロ
セスに割り当てる前記プロセッサを求め、このプロセッ
サに対応するプロセッサ管理情報内の前記平均プロセッ
サ占有時間と割り当て待ちのプロセス個数とを積算しプ
ロセス実行待ち時間を求める第1のステップと、(b)
前記プロセス実行待ち時間とあらかじめ設定されている
しきい値とを比較する第2のステップと、(c)前記第
2のステップにおいて、前記プロセス実行待ち時間が前
記しきい値より小さいと判定された場合、前記プロセス
の前記プロセス管理情報の前記プロセッサ割り当て情報
に示される前記プロセッサを選択する第3のステップ
と、(d)前記第2のステップにおいて、前記プロセス
実行待ち時間が前記しきい値より大きいと判定された場
合、全ての前記プロセッサについて前記プロセッサ管理
情報内の前記平均プロセッサ占有時間と前記割り当て待
ちプロセス個数を積算し前記プロセス実行待ち時間を求
める第4のステップと、(e)前記第4のステップで求
められた前記プロセス実行待ち時間の中で最も小さい待
ち時間となった前記プロセッサを選択する第5のステッ
プと、(f)前記プロセッサを要求した前記プロセスの
前記プロセス管理情報内の前記プロセスの優先度を獲得
する第6のステップと、(g)前記第4のステップで選
択された前記プロセッサのプロセッサ管理情報内の待ち
行列リスト先頭ポインタに基づいて前記プロセス管理情
報の繋がりであるプロセッサの待ち行列をたどり、前記
第6のステップで獲得された前記優先度に従って前記プ
ロセスの前記プロセス管理情報を前記プロセッサの待ち
行列に登録する第7のステップとを含む。
[0010] The second multiprocessor process dispatching method according to the present invention is the first multiprocessor process dispatching method, wherein (a) the process management information of the process requiring the processor is included in the process management information. A processor to be assigned to the process with reference to the processor assignment information, and a first process for obtaining a process execution waiting time by integrating the average processor occupation time and the number of processes waiting to be assigned in the processor management information corresponding to the processor; And (b)
A second step of comparing the process execution waiting time with a preset threshold value; and (c) determining that the process execution waiting time is smaller than the threshold value in the second step. A third step of selecting the processor indicated in the processor allocation information of the process management information of the process; and (d) in the second step, the process execution waiting time is longer than the threshold value. A fourth step of calculating the process execution waiting time by integrating the average processor occupation time in the processor management information and the number of processes waiting to be assigned, for all of the processors; The smallest wait time among the process execution wait times determined in the step A fifth step of selecting a processor; (f) a sixth step of obtaining a priority of the process in the process management information of the process which has requested the processor; and (g) a fourth step. Following the queue of the processor, which is a connection of the process management information, based on the queue list head pointer in the processor management information of the selected processor, the process of the process is performed in accordance with the priority obtained in the sixth step. Registering the process management information in a queue of the processor.

【0011】本発明の第3のマルチプロセッサのプロセ
スディスパッチ方法は、前記第1のマルチプロセッサの
プロセスディスパッチ方法であって、前記平均プロセッ
サ占有時間計測手段により、前記プロセスが前記プロセ
ッサを明け渡す際に、前記プロセスに前記プロセッサを
割り当ててから前記プロセスがプロセッサを明け渡すま
での時間を計測して、前記プロセッサに対応する前記プ
ロセッサ占有累計時間として累計し、また、プロセスデ
ィスパッチの回数を1加算して、一定間隔ごとに、プロ
セッサ占有累計時間をプロセスディスパッチの回数で除
算して前記プロセスの前記平均プロセッサ占有時間を求
める。
A third multiprocessor process dispatching method according to the present invention is the first multiprocessor process dispatching method, wherein the average processor occupation time measuring means includes a step of: Measure the time from assigning the processor to the process until the process surrenders the processor, accumulate it as the processor occupied cumulative time corresponding to the processor, and add 1 to the number of process dispatches, and At each interval, the cumulative processor occupancy time is divided by the number of process dispatches to determine the average processor occupancy time of the process.

【0012】[0012]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を用いて詳細に説明する。図1は、本発明の実施
の形態のブロック図である。図1を参照すると、本発明
のマルチプロセッサのプロセスディスパッチシステム
は、プロセス管理情報11と、プロセッサ割り当て情報
111と、プロセッサ割り当て待ち行列計測手段2と、
プロセッサの割り当て待ちプロセス個数21と、平均プ
ロセッサ占有時間計測手段3と、プロセッサ平均プロセ
ッサ占有時間31と、プロセッサ占有累積時間32と、
ディスパッチ回数33と、プロセッサ待ち行列登録手段
4と、プロセッサの待ち行列5と、プロセスディスパッ
チ手段6と、プロセッサ71〜74とから構成される。
また、プロセス管理情報11は、プロセッサ割り当て情
報111を含んでいる。
Next, an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a block diagram of an embodiment of the present invention. Referring to FIG. 1, a process dispatch system for a multiprocessor according to the present invention includes a process management information 11, a processor allocation information 111, a processor allocation queue measuring unit 2,
A processor allocation waiting process number 21, an average processor occupation time measuring means 3, a processor average processor occupation time 31, a processor occupation accumulated time 32,
It comprises a dispatch count 33, a processor queue registration means 4, a processor queue 5, a process dispatch means 6, and processors 71 to 74.
Further, the process management information 11 includes processor allocation information 111.

【0013】次に、本発明の実施の形態の動作について
図1を参照して説明する。プロセス管理情報群1のプロ
セッサの待ち行列5には、プロセスにどのプロセッサを
割り当てるかを示すプロセッサ割り当て情報111がプ
ロセスごとに設定されている。プロセッサ割り当て待ち
行列計測手段2は、プロセッサ待ち行列登録手段4がプ
ロセッサの待ち行列5へプロセスを登録する時に呼び出
され、プロセッサ割り当て待ち行列計測手段2自身が動
作するプロセッサのプロセッサ待ち行列5上に存在する
プロセッサの割り当てを待っているプロセスの数を数え
プロセッサの割り当て待ちプロセス個数21に格納す
る。
Next, the operation of the embodiment of the present invention will be described with reference to FIG. In the queue 5 of the processors of the process management information group 1, processor allocation information 111 indicating which processor is allocated to a process is set for each process. The processor assignment queue measuring means 2 is called when the processor queue registering means 4 registers a process in the processor queue 5, and is present on the processor queue 5 of the processor on which the processor assignment queue measuring means 2 itself operates. The number of processes waiting for processor assignment to be processed is counted and stored in the number of processes waiting for processor assignment 21.

【0014】平均プロセッサ占有時間計測手段3は、プ
ロセスがプロセッサを明け渡す際に、プロセスにプロセ
ッサを割り当ててからプロセスがプロセッサを明け渡す
までの時間を計測して、自身が動作するプロセッサに対
応するプロセッサ占有累計時間32に累計し、また、プ
ロセスディスパッチ回数33を1加算して、一定間隔ご
とに、プロセッサ占有累計時間32をプロセスディスパ
ッチ回数33で除算してプロセスの平均プロセッサ占有
時間を求め平均プロセッサ占有時間31に格納し、格納
した際には、プロセッサ占有累計時間32並びにプロセ
スディスパッチ回数33をゼロクリアする。
The average processor occupation time measuring means 3 measures the time from when a process is allocated to a process to when the process surrenders when the process surrenders the processor, and determines the processor occupancy corresponding to the processor on which the process operates. The total time 32 is added to the total time 32, and the process dispatch number 33 is added by 1. At regular intervals, the processor total time 32 is divided by the process dispatch number 33 to obtain the average processor occupation time of the process. At the time of storing, the accumulated processor occupation time 32 and the process dispatch count 33 are cleared to zero.

【0015】そして、プロセスへのプロセッサ割り当て
要求が発生すると、プロセッサ待ち行列登録手段4は、
プロセッサごとに、プロセッサ割り当て待ち行列計測手
段2により格納されたプロセッサ割り当て待ちプロセス
個数21と、平均プロセッサ占有時間計測手段3により
格納された平均プロセッサ占有時間31の積を計算し、
プロセッサごとのプロセス実行待ち時間を求め、この待
ち時間の差が一定の範囲内にある場合には、プロセス管
理情報11内の該プロセスに割り当てるプロセッサ割り
当て情報111が示すプロセッサのプロセッサ割り当て
待ち行列5に登録し、待ち時間の差が一定の範囲内にな
い場合には、前記の予測したプロセッサごとのプロセス
実行待ち時間の中でもっとも小さいプロセス実行待ち時
間のプロセッサを選択してこのプロセッサにて実行すべ
く、このプロセッサのプロセッサの割り当て待ち行列5
に登録する。
When a processor allocation request to a process occurs, the processor queue registering means 4
For each processor, calculate the product of the processor allocation waiting process number 21 stored by the processor allocation queue measuring means 2 and the average processor occupation time 31 stored by the average processor occupation time measuring means 3;
A process execution waiting time for each processor is obtained. If the difference between the waiting times is within a certain range, the process execution waiting time is stored in the processor assignment queue 5 of the processor indicated by the processor assignment information 111 assigned to the process in the process management information 11. If the difference between the waiting times is not within a certain range, the processor having the smallest process execution waiting time among the predicted process execution waiting times for each processor is selected and executed by this processor. The processor's allocation queue 5 for this processor
Register with.

【0016】プロセスディスパッチ手段6は、プロセス
ディスパッチ手段6自身が動作するプロセッサ(プロセ
ッサ71〜74のいずれか)に割り当てられたプロセッ
サ待ち行列の先頭のプロセスを選び、自身が動作するプ
ロセッサ(プロセッサ71〜74のいずれか)にディス
パッチする。
The process dispatching means 6 selects the first process in the processor queue assigned to the processor (any one of the processors 71 to 74) on which the process dispatching means 6 itself operates, and selects the processor on which it operates (the processors 71 to 74). 74).

【0017】次に、本発明の実施例について図面を参照
して説明する。図2は、本発明のマルチプロセッサのプ
ロセスディスパッチ方法が適用される情報処理システム
のブロック図である。図2を参照するとこの情報処理シ
ステムはプロセッサ71、72と、共有メモリ8と、シ
ステムバス9とから構成される。共有メモリ8には、プ
ロセス管理情報群1と、プロセッサ割り当て待ち行列計
測手段2と、平均プロセッサ占有時間計測手段3と、プ
ロセッサ待ち行列登録手段4と、プロセスディスパッチ
手段6と、プロセッサ管理情報12と、プロセッサ占有
累積時間32と、ディスパッチ回数33とが格納され
る。プロセッサ管理情報12は、割り当て待ちプロセス
個数21と、平均プロセッサ占有時間31と、待ち行列
リスト先頭ポインタ121とを含む。プロセス管理情報
群1は、プロセス管理情報11の集合である。プロセッ
サの待ち行列5は、複数のプロセス管理情報11の繋が
りとして定義される。プロセス管理情報11は、プロセ
ッサ割り当て情報111と、優先度112と、待ち行列
リストポインタ113とを含む。
Next, an embodiment of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram of an information processing system to which the process dispatching method of the multiprocessor of the present invention is applied. Referring to FIG. 2, the information processing system includes processors 71 and 72, a shared memory 8, and a system bus 9. In the shared memory 8, the process management information group 1, the processor allocation queue measurement unit 2, the average processor occupation time measurement unit 3, the processor queue registration unit 4, the process dispatch unit 6, the processor management information 12, , The accumulated processor occupation time 32 and the number of dispatches 33 are stored. The processor management information 12 includes an allocation waiting process number 21, an average processor occupation time 31, and a queue list top pointer 121. The process management information group 1 is a set of process management information 11. The queue 5 of the processor is defined as a connection of a plurality of pieces of process management information 11. The process management information 11 includes processor allocation information 111, priority 112, and queue list pointer 113.

【0018】次に、本発明の実施例の動作について図2
を参照して説明する。本実施例では、プロセッサ1とプ
ロセッサ2の2台のプロセッサ71、72がシステムバ
ス9に接続され、各プロセッサはシステムバス9を通じ
て共有メモリ8をアクセスする。
Next, the operation of the embodiment of the present invention will be described with reference to FIG.
This will be described with reference to FIG. In the present embodiment, two processors 71 and 72 of a processor 1 and a processor 2 are connected to a system bus 9, and each processor accesses the shared memory 8 through the system bus 9.

【0019】共有メモリ8には、平均プロセッサ占有時
間31と、割り当て待ちプロセス個数21と、待ち行列
リスト先頭ポインタ121を記録するプロセッサ管理情
報12、平均プロセッサ占有時間計測手段3、平均プロ
セッサ占有時間計測手段3により利用されるプロセッサ
占有累計時間32とディスパッチ回数33、プロセスご
とにどのプロセッサで実行するかを示すプロセッサ割り
当て情報111と優先度112と待ち行列リストポイン
タ113を記録するプロセス管理情報11、および各々
のプロセスのプロセス管理情報11の集合であるプロセ
ス管理情報群1、プロセッサ待ち行列登録手段4、プロ
セッサ待ち行列登録手段4が待ち行列登録時に呼び出し
待ち行列個数を計測しプロセッサ管理情報12内の割り
当て待ちプロセス個数21に格納するプロセッサ割り当
て待ち行列計測手段2、プロセスディスパッチ手段6が
存在する。
In the shared memory 8, the average processor occupation time 31, the number of processes waiting to be allocated 21, the processor management information 12 for recording the queue list head pointer 121, the average processor occupation time measuring means 3, the average processor occupation time measurement Process management information 11 for recording the processor occupied total time 32 and the dispatch count 33 used by the means 3, processor allocation information 111 indicating which processor is to be executed for each process, priority 112, and queue list pointer 113; The process management information group 1, which is a set of process management information 11 of each process, the processor queue registration unit 4, and the processor queue registration unit 4 measure the number of call queues at the time of queue registration, and assign the number in the processor management information 12. Waiting process Processor allocation queue measuring means 2 for storing the number 21, process dispatch unit 6 is present.

【0020】プロセッサ管理情報12内の平均プロセッ
サ占有時間31は、平均プロセッサ占有時間計測手段3
がプロセスがプロセッサを明け渡した際に、プロセスに
プロセッサを割り当ててからプロセスがプロセッサを明
け渡すまでの時間を計測して、自身が動作するプロセッ
サに対応するプロセッサ占有累計時間32に累計し、ま
た、プロセスディスパッチ回数33を+1して、一定間
隔ごとに、プロセッサ占有累計時間32をプロセスディ
スパッチ回数33で除算してプロセスの平均プロセッサ
占有時間を求めて格納する。そして、登録した際には、
プロセッサ占有累計時間32並びにプロセスディスパッ
チ回数33をゼロクリアする。プロセッサ管理情報12
内の割り当て待ちプロセス個数21は、プロセッサ待ち
行列登録手段4がプロセッサ割り当て待ち行列計測手段
2を用いて、待ち行列に登録時に+1し、プロセスにプ
ロセッサ割り当て時に−1することで、現在、該プロセ
ッサを待っているプロセスの個数を保持する。
The average processor occupation time 31 in the processor management information 12 is calculated by the average processor occupation time measuring means 3.
Measures the time from the assignment of a processor to a process when the process surrenders the processor until the process surrenders the processor, accumulates the time in the processor occupation accumulated time 32 corresponding to the processor on which the process operates, and The number of dispatches 33 is incremented by 1, and at regular intervals, the total processor occupation time 32 is divided by the number of process dispatches 33 to obtain and store the average processor occupation time of the process. And when you register,
The processor occupation cumulative time 32 and the process dispatch count 33 are cleared to zero. Processor management information 12
The processor queue registration unit 4 uses the processor allocation queue measurement unit 2 to increase the number of processes waiting to be assigned to +1 when registering the queue and -1 when assigning the processor to the process. Holds the number of processes waiting for.

【0021】プロセッサ管理情報12内の待ち行列リス
ト先頭ポインタ121は、プロセッサ待ち行列登録手段
4が、プロセッサ待ち行列5に初めてプロセスを登録す
るときに該プロセスのプロセス管理情報11へのポイン
タを格納し、さらに、既に待ち行列が存在する場合に、
新たに待ち行列に登録するプロセスの優先度112が、
プロセッサ管理情報12内の待ち行列リスト先頭ポイン
タ121が示すプロセス管理情報11内の優先度112
より大きい場合すなわち、現在プロセッサを待っている
プロセス群の優先度より該プロセスの優先度が高い場合
に、該プロセスのプロセス管理情報11へのポインタで
更新する。
The queue list top pointer 121 in the processor management information 12 stores a pointer to the process management information 11 of the process when the processor queue registration unit 4 registers the process in the processor queue 5 for the first time. , And if a queue already exists,
The priority 112 of the process for newly enqueuing is
Priority 112 in process management information 11 indicated by queue list top pointer 121 in processor management information 12
If it is larger, that is, if the priority of the process is higher than the priority of the group of processes currently waiting for the processor, the process is updated with the pointer to the process management information 11 of the process.

【0022】プロセス管理情報群1内のプロセス管理情
報11内のプロセッサ割り当て情報111は、あらかじ
め、個々のプロセスに割り当てられるべきプロセッサの
プロセッサ番号が格納される。プロセス管理情報群1内
のプロセス管理情報11内の優先度112は、あらかじ
め、個々のプロセスの実行優先度が格納される。プロセ
ス管理情報群1内のプロセス管理情報11内の待ち行列
リストポインタ113は、プロセッサ待ち行列登録手段
4が、プロセッサ待ち行列にプロセスを登録するときに
更新する。
The processor assignment information 111 in the process management information 11 in the process management information group 1 stores in advance the processor number of the processor to be assigned to each process. As the priority 112 in the process management information 11 in the process management information group 1, the execution priority of each process is stored in advance. The queue list pointer 113 in the process management information 11 in the process management information group 1 is updated when the processor queue registration unit 4 registers a process in the processor queue.

【0023】次に、プロセッサ待ち行列登録手段4の詳
細な動作について説明する。
Next, the detailed operation of the processor queue registration means 4 will be described.

【0024】図3は、プロセッサ待ち行列登録手段4の
アルゴリズムを示すフローチャートである。まず、プロ
セスがプロセッサを要求すると、オペレーティングシス
テムの一部であるプロセッサ待ち行列登録手段4に制御
が渡る(図3ステップ1)。プロセッサ待ち行列登録手
段4は、プロセッサを必要とするプロセスのプロセス管
理情報11内のプロセッサ割り当て情報111を参照し
て、該プロセスに割り当てるプロセッサを求め、これに
対応するプロセッサ管理情報12内の平均プロセッサ占
有時間31と割り当て待ちプロセス個数21を積算しプ
ロセス実行待ち時間を求める(図3ステップ2)。次
に、求めた割り当て待ち時間とあらかじめ設定されてい
るしきい値を比較する(図3ステップ3)。比較の結
果、プロセス実行待ち時間がしきい値より小さいときに
は、該プロセスのプロセス管理情報11内のプロセッサ
割り当て情報111に示されるプロセッサを選択し(図
3ステップ5)、プロセス実行待ち時間がしきい値より
大きいときには、全てのプロセッサについてプロセッサ
管理情報12内の平均プロセッサ占有時間31と割り当
て待ちプロセス個数21を積算しプロセス実行待ち時間
を求め(図3ステップ4)、求めたプロセス実行待ち時
間の中で最も小さい待ち時間となったプロセッサを選択
する(図3ステップ6)。次に、プロセッサを要求した
プロセスのプロセス管理情報11内の該プロセスの優先
度112を入手する(図3ステップ7)。そして、選択
されたプロセッサのプロセッサ管理情報12内の待ち行
列リスト先頭ポインタ121を入手して、待ち行列5を
辿り、先に入手した優先度に従って該プロセスのプロセ
ス管理情報11を待ち行列リストに登録する(図3ステ
ップ8)。
FIG. 3 is a flowchart showing the algorithm of the processor queue registration means 4. First, when a process requests a processor, control is transferred to a processor queue registration unit 4 which is a part of the operating system (Step 1 in FIG. 3). The processor queue registration means 4 refers to the processor assignment information 111 in the process management information 11 of the process requiring the processor, finds a processor to be assigned to the process, and obtains an average processor in the corresponding processor management information 12. The occupation time 31 and the number of processes waiting to be allocated 21 are integrated to obtain a process execution waiting time (step 2 in FIG. 3). Next, the obtained assignment waiting time is compared with a preset threshold value (step 3 in FIG. 3). As a result of the comparison, when the process execution waiting time is smaller than the threshold value, the processor indicated by the processor assignment information 111 in the process management information 11 of the process is selected (Step 5 in FIG. 3), and the process execution waiting time is set to the threshold. When the value is larger than the value, the average processor occupation time 31 and the number of processes waiting to be allocated 21 in the processor management information 12 for all processors are integrated to obtain a process execution waiting time (step 4 in FIG. 3). The processor having the shortest waiting time is selected (step 6 in FIG. 3). Next, the priority 112 of the process in the process management information 11 of the process which requested the processor is obtained (Step 7 in FIG. 3). Then, a queue list top pointer 121 in the processor management information 12 of the selected processor is obtained, the queue 5 is traced, and the process management information 11 of the process is registered in the queue list according to the priority obtained earlier. (Step 8 in FIG. 3).

【0025】[0025]

【発明の効果】以上説明したように、本発明のプロセス
ディスパッチ方法は、複数のプロセッサが、単一のオペ
レーティングシステムにより制御されるマルチプロセッ
サシステムでの、プロセスを管理するプロセス管理情報
に従って、プロセスにプロセッサを割り当てるプロセス
ディスパッチ方法において、プロセスのプロセッサ要求
時、すなわち、プロセッサ待ち行列に登録時に、プロセ
ッサごとのプロセッサ割り当て待ち行列上のプロセスの
個数と平均プロセッサ占有時間から、プロセッサごとの
プロセス実行待ち時間を予測し、これらの待ち時間の差
が一定の範囲内にある場合には、前記プロセス管理情報
内の該プロセスに割り当てるプロセッサ情報が示すプロ
セッサのプロセッサ割り当て待ち行列に登録し、待ち時
間の差が一定の範囲内にない場合には、前記の予測した
プロセッサごとのプロセス実行待ち時間の中でもっとも
小さいプロセス実行待ち時間のプロセッサを選択して、
このプロセッサのプロセッサ割り当て待ち行列に登録す
ることで、プロセッサを必要とするプロセスを長時間待
たせることなく、すばやいプロセッサ割り当てを可能に
した上で、プロセッサの負荷が特定のプロセッサに偏る
ことなく均等に与えられるようにし、かつ、プロセッサ
間の負荷分散をも可能にすることができ、応答性能を要
求されるオンライントランザクション処理において、プ
ロセッサ待ち時間が増加することなく、ターンアラウン
ドタイムを確保することができるという効果を持つ。
As described above, according to the process dispatching method of the present invention, a plurality of processors execute processes in a multiprocessor system controlled by a single operating system in accordance with process management information for managing processes. In the process dispatch method for allocating a processor, when a processor requests a process, that is, when the process is registered in a processor queue, the process execution waiting time for each processor is calculated based on the number of processes in the processor allocation queue for each processor and the average processor occupation time. If the difference between the waiting times is within a certain range, the difference is registered in the processor assignment queue of the processor indicated by the processor information assigned to the process in the process management information, and the difference between the waiting times is constant. Range of If not within, select the processor with the lowest process execution latency in the process execution latency for each of the predicted processor of
By registering in the processor assignment queue of this processor, it is possible to quickly assign a processor without waiting for a process requiring the processor for a long time, and to evenly distribute the processor load to a specific processor. And the load distribution between the processors can be made possible. In the online transaction processing that requires the response performance, the turnaround time can be secured without increasing the processor waiting time. It has the effect.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の実施の形態のブロック図である。FIG. 1 is a block diagram of an embodiment of the present invention.

【図2】本発明の実施例のブロック図である。FIG. 2 is a block diagram of an embodiment of the present invention.

【図3】プロセッサ待ち行列登録手段のアルゴリズムを
示すフローチャートである。
FIG. 3 is a flowchart showing an algorithm of a processor queue registration unit.

【符号の説明】[Explanation of symbols]

1 プロセス管理情報群 2 プロセッサ割り当て待ち行列計測手段 3 平均プロセッサ占有時間計測手段 4 プロセッサ待ち行列登録手段 5 プロセッサの待ち行列 6 プロセスディスパッチ手段 8 共有メモリ 9 システムバス 11 プロセス管理情報 12 プロセッサ管理情報 21 割り当て待ちプロセス個数 31 平均プロセッサ占有時間 32 プロセッサ占有累計時間 33 ディスパッチ回数 71〜74 プロセッサ 111 プロセッサ割り当て情報 112 優先度 113 待ち行列リストポインタ 121 待ち行列リスト先頭ポインタ DESCRIPTION OF SYMBOLS 1 Process management information group 2 Processor allocation queue measuring means 3 Average processor occupation time measuring means 4 Processor queue registration means 5 Processor queue 6 Process dispatch means 8 Shared memory 9 System bus 11 Process management information 12 Processor management information 21 Allocation Number of waiting processes 31 Average processor occupation time 32 Cumulative processor occupation time 33 Number of dispatches 71 to 74 Processor 111 Processor allocation information 112 Priority 113 Queue list pointer 121 Queue list top pointer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 プロセスディスパッチ手段が、次に実行
すべきプロセスを選択する際、前記プロセスディスパッ
チ手段自信が実行されているプロセッサと同一の前記プ
ロセッサ上で実行されるべき前記プロセスを、前記プロ
セス管理情報内の前記プロセッサ割り当て情報から判別
・選択し、指定された前記プロセッサ上で前記プロセス
を実行することで、前記プロセスを特定の前記プロセッ
サで実行することが可能なマルチプロセッサのプロセス
ディスパッチ方法において、前記プロセッサごとにプロ
セッサの待ち行列上の前記プロセスの個数を計測するプ
ロセッサ割り当て待ち行列計測手段により計測されたプ
ロセッサの割り当て待ち行列の個数と、前記プロセッサ
ごとにそのプロセッサで実行された前記プロセスの平均
プロセッサ占有時間を計測する平均プロセッサ占有時間
計測手段により計測された平均プロセッサ占有時間とか
ら、前記プロセッサの待ち行列への登録時に、前記プロ
セッサごとのプロセス実行待ち時間を予測し、これらの
前記プロセス実行待ち時間の差が一定の範囲内にある場
合には、前記プロセス管理情報内の前記プロセスに割り
当てるプロセッサ情報が示す前記プロセッサの前記プロ
セッサの割り当て待ち行列に前記プロセスを登録し、前
記プロセス実行待ち時間の差が一定の範囲内にない場合
には、予測した前記プロセッサごとの前記プロセス実行
待ち時間の中で最も小さい前記プロセス実行待ち時間の
前記プロセッサを選択して、このプロセッサの前記プロ
セッサの割り当て待ち行列に登録することで、前記プロ
セッサの負荷が特定の前記プロセッサに偏ることなく均
等に与えられるように割り当てられるべき前記プロセッ
サを選択しつつ、前記プロセスを特定の前記プロセッサ
で実行することを特徴とするマルチプロセッサのプロセ
スディスパッチ方法。
When the process dispatcher selects a process to be executed next, the process dispatcher manages the process to be executed on the same processor as the processor on which the process dispatcher itself is executed. In the process dispatching method of a multiprocessor capable of executing and executing the process on the specified processor by determining and selecting from the processor allocation information in the information and executing the process on the specified processor, The number of processor allocation queues measured by the processor allocation queue measuring unit that measures the number of processes on the processor queue for each processor, and the average of the processes executed by the processor for each processor. Processor occupancy time From the average processor occupation time measured by the average processor occupation time measuring means, the process execution waiting time for each of the processors is predicted at the time of registration in the queue of the processor. If the difference is within a certain range, the process is registered in the processor assignment queue of the processor indicated by the processor information assigned to the process in the process management information, and the difference in the process execution waiting time is reduced. If it is not within a certain range, the processor having the smallest process execution wait time among the predicted process execution wait times for each processor is selected and registered in the processor assignment queue of this processor. By doing so, the load of the processor While selecting the processor to be allocated as given evenly without being biased, process dispatch method in a multiprocessor, characterized by performing said process in particular the processor.
【請求項2】(a)前記プロセッサを必要とする前記プ
ロセスの前記プロセス管理情報内の前記プロセッサ割り
当て情報を参照して、前記プロセスに割り当てる前記プ
ロセッサを求め、このプロセッサに対応するプロセッサ
管理情報内の前記平均プロセッサ占有時間と割り当て待
ちのプロセス個数とを積算しプロセス実行待ち時間を求
める第1のステップと、(b)前記プロセス実行待ち時
間とあらかじめ設定されているしきい値とを比較する第
2のステップと、(c)前記第2のステップにおいて、
前記プロセス実行待ち時間が前記しきい値より小さいと
判定された場合、前記プロセスの前記プロセス管理情報
の前記プロセッサ割り当て情報に示される前記プロセッ
サを選択する第3のステップと、(d)前記第2のステ
ップにおいて、前記プロセス実行待ち時間が前記しきい
値より大きいと判定された場合、全ての前記プロセッサ
について前記プロセッサ管理情報内の前記平均プロセッ
サ占有時間と前記割り当て待ちプロセス個数を積算し前
記プロセス実行待ち時間を求める第4のステップと、
(e)前記第4のステップで求められた前記プロセス実
行待ち時間の中で最も小さい待ち時間となった前記プロ
セッサを選択する第5のステップと、(f)前記プロセ
ッサを要求した前記プロセスの前記プロセス管理情報内
の前記プロセスの優先度を獲得する第6のステップと、
(g)前記第4のステップで選択された前記プロセッサ
のプロセッサ管理情報内の待ち行列リスト先頭ポインタ
に基づいて前記プロセス管理情報の繋がりであるプロセ
ッサの待ち行列をたどり、前記第6のステップで獲得さ
れた前記優先度に従って前記プロセスの前記プロセス管
理情報を前記プロセッサの待ち行列に登録する第7のス
テップと、を含むことを特徴とする請求項1記載のマル
チプロセッサのプロセスディスパッチ方法。
And (a) determining the processor to be assigned to the process by referring to the processor assignment information in the process management information of the process that requires the processor. A first step of calculating the process execution waiting time by integrating the average processor occupation time and the number of processes waiting to be allocated, and (b) comparing the process execution waiting time with a preset threshold value. 2) and (c) in the second step,
A third step of selecting the processor indicated in the processor allocation information of the process management information of the process when it is determined that the process execution waiting time is smaller than the threshold value; In the step, when it is determined that the process execution waiting time is larger than the threshold value, the average processor occupation time in the processor management information and the number of allocation waiting processes are integrated for all the processors, and the process execution time is calculated. A fourth step for determining the waiting time;
(E) a fifth step of selecting the processor having the shortest wait time among the process execution wait times obtained in the fourth step, and (f) the process of the process requesting the processor. A sixth step of obtaining the priority of the process in process management information;
(G) tracing a processor queue which is a connection of the process management information based on a queue list head pointer in the processor management information of the processor selected in the fourth step, and acquiring the queue in the sixth step 7. The method according to claim 1, further comprising: registering the process management information of the process in a queue of the processor according to the determined priority.
【請求項3】 前記平均プロセッサ占有時間計測手段に
より、前記プロセスが前記プロセッサを明け渡す際に、
前記プロセスに前記プロセッサを割り当ててから前記プ
ロセスがプロセッサを明け渡すまでの時間を計測して、
前記プロセッサに対応する前記プロセッサ占有累計時間
として累計し、また、プロセスディスパッチの回数を1
加算して、一定間隔ごとに、プロセッサ占有累計時間を
プロセスディスパッチの回数で除算して前記プロセスの
前記平均プロセッサ占有時間を求めることを特徴とする
請求項1記載のマルチプロセッサのプロセスディスパッ
チ方法。
3. The method according to claim 2, wherein the average processor occupation time measuring means determines whether or not the process yields the processor.
Measuring the time from assigning the processor to the process until the process surrenders the processor,
Accumulate as the processor occupied cumulative time corresponding to the processor, and count the number of process dispatches as 1
2. The process dispatching method according to claim 1, wherein the average processor occupation time of the process is obtained by adding and dividing the total processor occupation time by the number of process dispatches at regular intervals.
JP34859696A 1996-12-26 1996-12-26 Multiprocessor process dispatching method Expired - Fee Related JP2954056B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34859696A JP2954056B2 (en) 1996-12-26 1996-12-26 Multiprocessor process dispatching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34859696A JP2954056B2 (en) 1996-12-26 1996-12-26 Multiprocessor process dispatching method

Publications (2)

Publication Number Publication Date
JPH10187469A true JPH10187469A (en) 1998-07-21
JP2954056B2 JP2954056B2 (en) 1999-09-27

Family

ID=18398075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34859696A Expired - Fee Related JP2954056B2 (en) 1996-12-26 1996-12-26 Multiprocessor process dispatching method

Country Status (1)

Country Link
JP (1) JP2954056B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7062768B2 (en) 2001-03-21 2006-06-13 Nec Corporation Dynamic load-distributed computer system using estimated expansion ratios and load-distributing method therefor
JP2008139907A (en) * 2006-11-29 2008-06-19 Fujitsu Ltd Job allocation program and job allocation method
JP2009288838A (en) * 2008-05-27 2009-12-10 Marimo & Jvis:Kk Process management unit
US8108661B2 (en) 2008-12-05 2012-01-31 Samsung Electronics Co., Ltd. Data processing apparatus and method of controlling the data processing apparatus

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7487504B2 (en) * 2002-02-06 2009-02-03 International Business Machines Corporation Thread dispatch for multiprocessor computer systems

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7062768B2 (en) 2001-03-21 2006-06-13 Nec Corporation Dynamic load-distributed computer system using estimated expansion ratios and load-distributing method therefor
JP2008139907A (en) * 2006-11-29 2008-06-19 Fujitsu Ltd Job allocation program and job allocation method
JP4723465B2 (en) * 2006-11-29 2011-07-13 富士通株式会社 Job allocation program and job allocation method
JP2009288838A (en) * 2008-05-27 2009-12-10 Marimo & Jvis:Kk Process management unit
US8108661B2 (en) 2008-12-05 2012-01-31 Samsung Electronics Co., Ltd. Data processing apparatus and method of controlling the data processing apparatus

Also Published As

Publication number Publication date
JP2954056B2 (en) 1999-09-27

Similar Documents

Publication Publication Date Title
US5784698A (en) Dynamic memory allocation that enalbes efficient use of buffer pool memory segments
US7941805B2 (en) Affinity dispatching load balancer with precise CPU consumption data
US8397236B2 (en) Credit based performance managment of computer systems
JP2940450B2 (en) Job scheduling method and apparatus for cluster type computer
KR101651871B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
WO2009101563A1 (en) Multiprocessing implementing a plurality of virtual processors
KR101553650B1 (en) Apparatus and method for load balancing in multi-core system
EP2562644B1 (en) Systems and methods for bounding processing times on multiple processing units
US5905898A (en) Apparatus and method for storing interrupt source information in an interrupt controller based upon interrupt priority
JPH02193248A (en) Actual storage management system
JP2012512472A (en) Resolving contention between data bursts
US5850555A (en) System and method for validating interrupts before presentation to a CPU
US9189279B2 (en) Assignment method and multi-core processor system
JP2954056B2 (en) Multiprocessor process dispatching method
US5850558A (en) System and method for referencing interrupt request information in a programmable interrupt controller
JP6201591B2 (en) Information processing apparatus and information processing apparatus control method
US5894578A (en) System and method for using random access memory in a programmable interrupt controller
KR101639947B1 (en) Hadoop preemptive deadline constraint scheduling method, execution program thereof method and recorded medium of the program
US10180858B2 (en) Parallel computing device, parallel computing system, and job control method
JPH0612395A (en) Task allocating method in multiprocessor system
JPS62175832A (en) Resources control system for electronic computer
JPH09311795A (en) Scheduling method
JPH05257718A (en) Process controller
JPS59117642A (en) System for allocating processing to computer
JP2022088762A (en) Information processing device and job scheduling method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19990629

LAPS Cancellation because of no payment of annual fees