JP2769367B2 - Multiprocessor scheduling method - Google Patents

Multiprocessor scheduling method

Info

Publication number
JP2769367B2
JP2769367B2 JP1250532A JP25053289A JP2769367B2 JP 2769367 B2 JP2769367 B2 JP 2769367B2 JP 1250532 A JP1250532 A JP 1250532A JP 25053289 A JP25053289 A JP 25053289A JP 2769367 B2 JP2769367 B2 JP 2769367B2
Authority
JP
Japan
Prior art keywords
processor
group
management table
executed
scheduling method
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.)
Expired - Fee Related
Application number
JP1250532A
Other languages
Japanese (ja)
Other versions
JPH03113563A (en
Inventor
正 上脇
伸一朗 山口
雅彦 齊藤
小林  芳樹
智明 中村
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP1250532A priority Critical patent/JP2769367B2/en
Publication of JPH03113563A publication Critical patent/JPH03113563A/en
Application granted granted Critical
Publication of JP2769367B2 publication Critical patent/JP2769367B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 複数のプロセッサから成るマルチプロセッサシステム
で複数のプロセスを並行に動作させるマルチプロセッサ
用オペレーティングシステムにおいて、特に、高速シス
テムを構築する場合、あるいはシングルプロセッサ用に
作成されたプログラムをマルチプロセッサシステムで、
なんら変更なく動作させる場合に好適なプロセススケジ
ューリング方法に関する。
Description: BACKGROUND OF THE INVENTION [Industrial Application Field] In a multiprocessor operating system in which a plurality of processes are operated in parallel by a multiprocessor system including a plurality of processors, particularly when a high-speed system is constructed or a single processor Program created for a multi-processor system,
The present invention relates to a process scheduling method suitable for operating without any change.

[従来の技術] 複数のマイクロプロセッサを使用したマルチマイクロ
プロセッサの開発が盛んである。特開昭56−127261号、
マルチプロセッサシステムはこの一例であり、複数のプ
ロセッサがバスにより結合されたシステム構成を示して
いる。マルチプロセッサ用オペレーティングシステムに
ついても盛んに開発が行なわれている。マルチプロセッ
サ用オペレーティングシステムにおいてはシングルプロ
セッサシステムとは異なり、複数のプロセスが異なるプ
ロセッサ上で同時に実行できるようにする必要があり、
このために、プロセスをどのプロセッサに割り当てるか
を決定する方策を持つ必要がある。この場合、最も一般
的に行なわれているのはプロセッサの利用効率を最大限
にするために、負荷の最も少ないプロセッサに割り当て
るという方策である。この方策は一般的に実現が容易で
あるため、広く採用されている。というのも、個々のプ
ロセッサ上で動作するオペレーティングシステムのプロ
セススケジューラがそれぞれシングルプロセッサシステ
ムの場合と同様に次に実行すべきプロセスをプロセスの
優先順位に従って選択すればよいからである。負荷の重
いプロセッサではプロセスの実行時間が長く、プロセス
スケジューラが起動される頻度は低い。逆に負荷の軽い
プロセッサでは処理すべきプロセスを持たないアイドル
状態になるタイミングが多く、したがってアイドル状態
に移行すべきかどうかを判定するプロセススケジューラ
の起動タイミングも多い。このため、負荷の軽いプロセ
ッサにはより多くのプロセススケジューリングの機会が
与えられ、プロセッサ間での負荷は自動的に均等になる
ように推移するのである。以上の方策は機能が同じ均質
なマルチプロセッサシステムにおいては合理性のあるプ
ロセスの割り当て方策である。
[Related Art] A multi-microprocessor using a plurality of microprocessors has been actively developed. JP-A-56-127261,
A multiprocessor system is one example of this, and shows a system configuration in which a plurality of processors are connected by a bus. A multiprocessor operating system is also being actively developed. Unlike multiprocessor operating systems, unlike single processor systems, multiple processes need to be able to run on different processors simultaneously,
For this, it is necessary to have a strategy for deciding which processor to assign a process to. In this case, the most commonly used method is to allocate the processor to the least loaded processor in order to maximize the utilization efficiency of the processor. This strategy has been widely adopted because it is generally easy to implement. This is because the process scheduler of the operating system operating on each processor may select the next process to be executed in accordance with the priority of the process as in the case of the single processor system. A processor with a heavy load has a long process execution time, and the process scheduler is activated less frequently. Conversely, a processor with a light load has many timings when it enters an idle state having no process to be processed, and therefore, there are also many activation timings of a process scheduler for determining whether to shift to the idle state. For this reason, a processor with a light load is given more opportunities for process scheduling, and the load among the processors automatically changes so as to be even. The above method is a rational process allocation method in a homogeneous multiprocessor system having the same function.

また、プロセスをグループとして管理して、スケジュ
ーリングする方法について、「エクスペアリンス・ユー
ズィング・マルチ−プロセッサ・システムズ−Aスティ
タス・レポート」(“Experience Using Multi−proc
essor Systems−A Status Report")(ACM Comput
ing Surveys,12巻2号p121〜165,1980)にグループス
ケジューリング(group scheduling)として記されてい
る。これは、並列処理可能なプロセスをグループとし
て、スケジューリングするときにはこれらのプロセスを
できるかぎり同時に異なるプロセッサで実行するように
する。
Also, regarding a method of managing and scheduling processes as a group, see “Experience Using Multi-Processor Systems-A Status Report” (“Experience Using Multi-proc
essor Systems-A Status Report ") (ACM Comput
ing Surveys, Vol. 12, No. 2, p. 121 to 165, 1980) is described as group scheduling. This means that, when scheduling processes that can be processed in parallel as a group, these processes are executed on different processors as simultaneously as possible.

[発明が解決しようとする課題] 複数のプロセスをグループとし、同一グループに属す
るプロセスをできるがきり同一のプロセッサで実行する
機能を有するプロセススケジューラが好ましい。
[Problem to be Solved by the Invention] A process scheduler having a function of grouping a plurality of processes and executing processes belonging to the same group as much as possible with the same processor is preferable.

ここでプロセスをグループ化するのは以下のようなユ
ーザ要求およびハードウェアならびにオペレーティング
システム構築上の要求があるためである(尚、このグル
ープとは同じデータを扱うプロセスの集まりである)。
The processes are grouped here because of the following user requirements and hardware and operating system construction requirements (note that this group is a group of processes that handle the same data).

共有バス、共有メモリを使ったマルチプロセッサで
は、バスの負荷を軽くするため、各プロセッサがキャッ
シュメモリを持つ。この様なシステムでは、キャッシュ
間でデータの一貫性を保証するために一つのプロセッサ
がキャッシュ上のデータを更新すると、それと同じデー
タを持っているキャッシュに更新した結果を転送する。
お互いに多くのデータを共有しているプロセスを異なる
プロセッサで実行するとキャッシュ間のデータ転送の回
数が増大し、キャッシュの性能が発揮されず、バスの負
荷が高くなってしまう。従来のマルチプロセッサシステ
ムでは、必ずしもこの問題点に関して十分な配慮がなさ
れていなかった。
In a multiprocessor using a shared bus and a shared memory, each processor has a cache memory to reduce the load on the bus. In such a system, when one processor updates data in the cache in order to guarantee data consistency between caches, the updated result is transferred to a cache having the same data.
If processes that share a large amount of data with each other are executed by different processors, the number of data transfers between caches increases, the cache performance is not exhibited, and the bus load increases. In conventional multiprocessor systems, sufficient consideration has not always been given to this problem.

また、シングルプロセッサ用に開発された既存のソフ
トウェアは、マルチプロセッサシステム上においても何
等変更を加えずに実行させることが望ましい。マルチプ
ログラミング環境では、周知のように、複数のプロセス
の競合が発生しうる。この問題を解決するため、通常、
共有データにアクセスする際にセマフォアメカニズム等
により排他制御を行なう必要があるが、セマフォアメカ
ニズムの処理オーバヘッドが問題となり、プロセスのプ
ライオリティを同一にしたり、セマフォアメカニズムよ
りも処理時間の短いプロセッサ割り込みマスクを上げて
割り込み禁止にする等の手段を講じる場合が多い。これ
らの手段は、プロセッサ1台上でミクロに見ればプロセ
ッサ上の処理は必ず逐次的に行なわれるという事実を利
用している。現実には、共有データに対する排他制御を
性能上の理由により行なっていないソフトウェアも多
い。このため既存のソフトウェアをその侭マルチプロセ
ッサシステムで実行された場合、必ずしも正常な動作は
補償されないという問題があった。
It is desirable that existing software developed for a single processor be executed on a multiprocessor system without any change. In a multi-programming environment, as is well known, contention for multiple processes can occur. To solve this problem,
When accessing shared data, it is necessary to perform exclusive control using a semaphore mechanism, etc., but the processing overhead of the semaphore mechanism becomes a problem, so that the priority of the process is the same, or a processor interrupt that has a shorter processing time than the semaphore mechanism In many cases, measures such as raising the mask to disable interrupts are taken. These means make use of the fact that, when viewed microscopically on a single processor, the processing on the processor is always performed sequentially. In reality, there are many software programs that do not perform exclusive control on shared data for performance reasons. For this reason, when existing software is executed as it is in a multiprocessor system, there is a problem that normal operation is not necessarily compensated.

従来のgroup schedulingは、グループとなっているプ
ロセッサを異なるプロセッサで動作させているため、並
列処理には適しているが、上記のような問題に対応でき
なかった。
The conventional group scheduling is suitable for parallel processing because the processors in the group are operated by different processors, but cannot cope with the above problem.

尚、本願に関係する先願は、同一出願人になる特開平
1−60092号「マルチプロセッサ用オペレーティングシ
ステム」がある。この先願はプロセス管理テーブルを持
ち、このテーブルにプロセス占有プロセッサ名を記録し
ておき、他プロセッサ支配下のプロセスを一定条件のも
とに横取りして自己の管理において処理を行なわせるこ
ととしている。この先願には、前回使用プロセッサの記
録やグループ毎のプロセス管理の記載はない。
A prior application related to the present application is Japanese Patent Application Laid-Open No. 1-60092, entitled "Operating System for Multiprocessor," which is the same applicant. This prior application has a process management table, in which a process occupied processor name is recorded, and a process under the control of another processor is intercepted under certain conditions to perform processing in its own management. This prior application does not include the record of the processor used last time or the description of the process management for each group.

本発明の目的は、マルチプロセッサシステムにおい
て、プロセスをグループ化して管理し、同一グループ内
のプロセスを同一プロセッサで実行することにより、キ
ャッシュメモリの性能を向上させ、バスの負荷を低減で
きるプロセススケジューリング方法を提供することにあ
る。
SUMMARY OF THE INVENTION An object of the present invention is to provide a process scheduling method capable of improving the performance of a cache memory and reducing the load on a bus by grouping and managing processes and executing processes in the same group on the same processor in a multiprocessor system. Is to provide.

本発明の別の目的は、既存の単一プロセッサシステム
用のソフトウェアを、なんら変更させずそのまま利用で
きるプロセススケジューリング方法を提供することにあ
る。
It is another object of the present invention to provide a process scheduling method that can use existing software for a single processor system without any change.

本発明の更に別の目的は、グループとなったプロセス
を同一プロセッサで実行する際にも、プロセッサ間で仕
事の負荷を均等に保つことができるプロセススケジュー
リング方法を提供することにある。
Still another object of the present invention is to provide a process scheduling method capable of maintaining a uniform work load between processors even when executing a group of processes on the same processor.

[課題を解決するための手段] 上記目的を達成するために、本発明によるプロセスス
ケジューリング方法は、複数のプロセッサを具備し、上
記複数のプロセッサが、単一のオペレーティングシステ
ムによって制御されるマルチプロセッサシステムにおい
て、プロセスを管理するプロセス管理テーブルに従い、
上記オペレーティングシステムのプロセススケジューラ
が、プロセスに何れかのプロセッサを割り当てるプロセ
ススケジューリング方式であって、上記プロセス管理テ
ーブルに重複を許すグループ識別子を記述し、該グルー
プ識別子が同一な該プロセスの情報を記憶するグループ
管理テーブルを設け、該グループ管理テーブルにグルー
プ内のプロセスを実行するプロセッサを指示するプロセ
ッサ割り当て情報を記述し、上記プロセススケジューラ
は、次に実行すべく選択したプロセスについて、上記プ
ロセス管理テーブルを参照して、当該プロセスのグルー
プを判別し、該グループのグループ管理テーブルのプロ
セッサ割り当て情報により指定されたプロセッサ状で該
プロセスを動作させることにより、同一のグループに属
するプロセスは、同一のプロセッサで実行するようにし
たものである。
Means for Solving the Problems To achieve the above object, a process scheduling method according to the present invention comprises a plurality of processors, wherein the plurality of processors are controlled by a single operating system. In, according to the process management table that manages the process,
A process scheduling method in which the process scheduler of the operating system assigns any one of the processors to a process. The process management table describes a group identifier that allows duplication in the process management table, and stores information of the process having the same group identifier. A group management table is provided, and processor assignment information indicating a processor that executes a process in the group is described in the group management table. The process scheduler refers to the process management table for a process selected to be executed next. Then, by determining the group of the process, and by operating the process in the state of the processor specified by the processor assignment information of the group management table of the group, the process belonging to the same group, It is obtained so as to run on one processor.

上記プロセス管理テーブルに該プロセスの実行待ち時
間を記憶して、上記プロセススケジューラが、次に実行
すべく選択したプロセスについて、上記プロセス管理テ
ーブルを参照して、実行待ち時間がある値以上の時に
は、任意のプロセッサで動作させ、該実行待ち時間があ
る値以下の時には、該プロセス管理テーブルを参照し
て、当該プロセスのグループを判別し、該グループのグ
ループ管理テーブルのプロセッサ割り当て情報により指
定されたプロセッサ上で該プロセスを動作させるように
してもよい。
When the execution wait time of the process is stored in the process management table, the process scheduler refers to the process management table for the process selected to be executed next. When the processor is operated by an arbitrary processor and the execution waiting time is equal to or less than a certain value, the processor refers to the process management table to determine a group of the process, and specifies a processor designated by the processor assignment information in the group management table of the group. The above process may be operated.

さらに上記グループ管理テーブルに該グループの何れ
のプロセスも実行されていない時間、即ちグループ実行
待ち時間を記憶し、上記プロセススケジューラが、次に
実行すべく選択したプロセスについて、上記プロセス管
理テーブルを参照して、当該プロセスのグループを判別
し、該グループのグループ管理テーブルのグループ実行
待ち時間がある値以上の時には、該グループ管理テーブ
ルのプロセッサ割り当て情報を変更できるようにしても
よい。
Further, a time during which no process of the group is executed, that is, a group execution waiting time, is stored in the group management table, and the process scheduler refers to the process management table for a process selected to be executed next. Then, the group of the process may be determined, and when the group execution waiting time of the group management table of the group is equal to or longer than a certain value, the processor allocation information of the group management table may be changed.

さらに、上記プロセス管理テーブルに該プロセスの実
行待ち時間と該プロセスが前回実行されたプロセッサの
識別子を記憶し、上記プロセススケジューラが、次に実
行すべく選択したプロセスについて、上記プロセス管理
テーブルを参照して、該待ち時間がある値以下の時に
は、該プロセスを前回実行したプロセッサか、グループ
管理テーブルのプロセッサ割り当て情報が指示するプロ
セッサ実行し、ある値以上の時には、上記以外のプロセ
ッサで動作できるようにしてもよい。
Further, the process management table stores the execution waiting time of the process and the identifier of the processor that executed the process last time, and the process scheduler refers to the process management table for the process selected to be executed next. When the waiting time is less than a certain value, the processor which executed the process last time or the processor indicated by the processor assignment information in the group management table is executed, and when the waiting time is more than a certain value, the processor can be operated by other processors. You may.

さらに、上記プロセスの実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いてもよい。
Further, the number of times the assignment of the process to the processor is rejected may be used instead of the execution waiting time of the process.

さらに、上記グループの何れのプロセスも実行されて
いない時間、即ちグループ実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いた。
In addition, the number of times the process was not re-assigned to the processor was used instead of the time during which no process in the group was running, ie, the group execution wait time.

本発明の他のプロセススケジューリング方法として、
複数のプロセッサを具備し、該複数のプロセッサが、単
一のオペレーティングシステムによって制御されるマル
チプロセッサシステムにおいて、実行しているプロセス
を切り替える必要が生じたプロセッサが、プロセスを管
理するプロセス管理テーブルに従い、上記オペレーティ
ングシステムのプロセススケジューラを実行し、該プロ
セッサが次に実行するプロセスを決定するプロセススケ
ージューリング方式であって、上記プロセス管理テーブ
ルに重複を許すグループ識別子を記述し、該グループ識
別子が同一な該プロセスの情報を記憶するグループ管理
テーブルを設け、該グループ管理テーブルにグループ内
のプロセスを実行するプロセッサを指示するプロセッサ
割り当て情報を記述し、上記プロセススケジューラは、
実行可能プロセスの中から、上記プロセス管理テーブル
のグループ識別子が指示する、該グループ管理テーブル
のプロセッサ割り当て情報が該プロセススケジューラを
実行しているプロセッサを指示しているプロセスを次に
実行するようにしてもよい。
As another process scheduling method of the present invention,
In a multiprocessor system comprising a plurality of processors, wherein the plurality of processors are controlled by a single operating system, a processor that needs to switch a running process is executed according to a process management table that manages the process. A process scheduling method for executing a process scheduler of the operating system and determining a process to be executed next by the processor, wherein a group identifier that allows duplication is described in the process management table, and the group identifier is the same. A group management table for storing information of the process is provided, and processor allocation information indicating a processor that executes a process in the group is described in the group management table.
From among the executable processes, the process specified by the group identifier of the process management table and the processor allocation information of the group management table indicating the processor that is executing the process scheduler is executed next. Is also good.

上記プロセス管理テーブルに該プロセスの実行待ち時
間を記憶し、上記プロセススケジューラが、次に実行す
るプロセスを選択する際に上記プロセス管理テーブルを
参照して、実行待ち時間がある値以上の時には、該プロ
セスを実行可能ととしてもよい。
The process management table stores the execution wait time of the process in the process management table, and the process scheduler refers to the process management table when selecting the next process to be executed. The process may be executable.

さらに、上記グループ管理テーブルに該グループの何
れのプロセスも実行されていない時間、即ちグループ実
行待ち時間を記憶し、上記プロセススケジューラが、次
に実行するプロセスを選択する際に、上記プロセス管理
テーブルを参照して、当該プロセスのグループを判別
し、該グループのグループ管理テーブルのグループ実行
待ち時間がある値以上の時には、該グループ管理テーブ
ルのプロセッサ割り当て情報を変更して、該プロセスを
実行可能としてもよい。
Further, the time when no process of the group is executed, that is, the group execution waiting time is stored in the group management table, and the process scheduler selects the process to be executed next when the process scheduler selects the next process to execute. The group of the process is referred to, and when the group execution waiting time of the group management table of the group is equal to or longer than a certain value, the processor allocation information of the group management table is changed so that the process can be executed. Good.

さらに、上記プロセス管理テーブルに該プロセスの実
行待ち時間と該プロセスが前回実行されたプロセッサの
識別子を記憶し、上記プロセススケジューラが、次に実
行するプロセスを選択する際に、上記プロセス管理テー
ブルを参照して、該待ち時間がある値以下の時には、該
プロセスを前回実行したプロセッサか、グループ管理テ
ーブルのプロセッサ割り当て情報が指示するプロセッサ
が該プロセススケジューラを実行しているプロセッサと
同一である場合にのみ実行可能とし、該待ち時間がある
値以上の時には、実行可能としてもよい。
Further, the process management table stores the execution waiting time of the process and the identifier of the processor that executed the process last time, and refers to the process management table when the process scheduler selects the process to be executed next. When the waiting time is equal to or less than a certain value, only when the processor which executed the process last time or the processor indicated by the processor assignment information in the group management table is the same as the processor which is executing the process scheduler, Executable, and when the waiting time is equal to or longer than a certain value, it may be executable.

さらに、上記プロセスの実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いてもよい。
Further, the number of times the assignment of the process to the processor is rejected may be used instead of the execution waiting time of the process.

さらに、上記グループの何れのプロセスも実行されて
いない時間、即ちグルプ実行待ち時間の代わりに該プロ
セスのプロセッサへの割り当てが拒絶された回数を用い
た。
Further, the number of times that the process was not re-assigned to the processor was used instead of the time during which no process in the group was running, ie, the group execution wait time.

本発明の他のプロセススケジューリング方式として、
複数のプロセッサを具備し、該複数のプロセッサが、単
一のオペレーティングシステムによって制御されるマル
チプロセッサシステムにおいて、プロセスを管理するプ
ロセス管理テーブルに従い、上記オペレーティングシス
テムのプロセススケジューラが、プロセスに何れかのプ
ロセッサを割り当てるプロセススケジューリング方式で
あって、上記プロセス管理テーブルに上記複数のプロセ
ッサ各々に対する優先度と重複を許すグループ識別子を
記述し、該グループ識別子が同一な該プロセスの情報を
記憶するグループ管理テーブルを設け、該グループ管理
テーブルにグループ内のプロセスを実行するプロセッサ
を指示するプロセッサ割り当て情報を設け、上記プロセ
ス管理テーブルのグループ識別子が示すグループ管理テ
ーブル中のプロセッサ割り当て情報が指示するプロセッ
サに対応する該優先度を高く設定するようにしてもよ
い。
As another process scheduling method of the present invention,
In a multiprocessor system comprising a plurality of processors, wherein the plurality of processors are controlled by a single operating system, a process scheduler of the operating system may assign a process to one of the processors according to a process management table for managing the process. A process management table that describes a priority of each of the plurality of processors and a group identifier that allows duplication in the process management table, and stores information of the process having the same group identifier. , Processor assignment information for designating a processor that executes a process in a group is provided in the group management table, and a processor in the group management table indicated by the group identifier of the process management table is provided. It may be set higher the priority degree service allocation information corresponding to the processor to instruct.

[作用] 本発明のプロセススケジューリング方法は、複数のプ
ロセッサからなるマルチプロセッサシステムにおいて、
複数のプロセッサのいずれでも実行可能なプロセスにつ
いて、あえてそのプロセスをグループ化しそのグループ
を実行させるプロセッサを特定のプロセッサに限定しよ
うとするものである。
[Operation] The process scheduling method of the present invention provides a multi-processor system including a plurality of processors.
In a process that can be executed by any of a plurality of processors, the process is intentionally grouped, and the processor that executes the group is limited to a specific processor.

共有データを多く持つプロセスが異なるプロセッサで
実行されると、キャッシュ一致化のための通信が頻繁に
発生しキャッシュ性能を低下させる。本発明では、その
ようなプロセスをグループ化し、同一のプロセッサで実
行できるので、キャッシュ一致化のための通信が不要と
なり、性能を向上させることができる。さらに、グルー
プを特定のプロセッサに実行させることによりプロセッ
サ間の負荷が片寄ることがないように、一定時間以上実
行されずに放置されているプロセスについては、いずれ
のプロセッサでも実行できるようにしており、負荷分散
が可能となっている。ただし、この機能はプロセス固定
フラグを立てることにより禁止することもできる。
If a process having a large amount of shared data is executed by different processors, communication for cache coherence frequently occurs, and the cache performance is reduced. According to the present invention, such processes can be grouped and executed by the same processor, so that communication for cache matching is not required, and performance can be improved. Furthermore, in order to prevent the load between processors from shifting by executing a group by a specific processor, a process that has been left unexecuted for a certain period of time can be executed by any processor. Load balancing is possible. However, this function can be prohibited by setting a process fixing flag.

また、本発明によって、排他制御を必要とするプロセ
ス群を同一のプロセッサで動作させることが可能にな
り、共有メモリに対する排他制御を考慮していない従来
の単一プロセッサ用の既存のプロセスを修正することな
く使用しても正常な動作を保証することができる。この
事は、他のプロセッサの不使用を意味するものではな
く、前記プロセス群以外のプロセスについては、このよ
うな制約を設けずに、任意のプロセッサで実行可能とし
てマルチプロセッサの機能を有効に利用することができ
る。
Further, according to the present invention, a process group requiring exclusive control can be operated by the same processor, and an existing process for a conventional single processor that does not consider exclusive control on a shared memory is modified. Normal operation can be guaranteed even if used without any problem. This does not mean that other processors are not used. Processes other than the above-mentioned process group can be executed by any processor without such restrictions, and the functions of the multiprocessor are effectively used. can do.

[実施例] 以下、本発明の一実施例を第1図を用いて説明する。
第1図において、13−1〜13−2はプロセッサ、12−1
〜12−8はプロセス、15−1〜15−3はグループであ
る。
Embodiment An embodiment of the present invention will be described below with reference to FIG.
In FIG. 1, 13-1 to 13-2 are processors, 12-1
12-8 are processes, and 15-1 to 15-3 are groups.

プロセッサ13−1〜13−3は、プロセス12−1〜12−
8を切り替えながら実行する。プロセス12−1〜12−3
はグループ15−1として、プロセス12−4と12−5はグ
ループ15−2として、プロセス12−6〜12−8はグルー
プ15−3として、まとめられている。プロセスをグルー
プにする方法の指示は、ユーザによってなされるが、コ
ンパイラやオペレーティングシステムが自動的に行なっ
ても良い。
Processors 13-1 to 13-3 are processes 12-1 to 12-
Execute while switching 8. Process 12-1 to 12-3
Are grouped as a group 15-1, processes 12-4 and 12-5 are grouped as a group 15-2, and processes 12-6 to 12-8 are grouped as a group 15-3. The instruction on how to group the processes is given by the user, but may be automatically given by the compiler or the operating system.

プロセスを実行するプロセッサはグループ毎に決まっ
ており、同一のグループに属するプロセスは、同一のプ
ロセッサで実行するようにする。第1図ではグループの
数とプロセッサの数が等しくなっているが、これらの数
は、特に一致している必要はなく、どちらが多くても少
なくても良い。
Processors that execute processes are determined for each group, and processes belonging to the same group are executed by the same processor. In FIG. 1, the number of groups and the number of processors are equal, but these numbers do not need to be particularly the same, and either number may be larger or smaller.

本発明によるシステム構成を第2図に示す。第2図に
おいて、13−1〜13−3はプロセッサ、11−1〜11−3
はプロセッサ番号、12−1〜12−6はプロセス、14−1
はタイマー、4は接続バス、5は共有メモリ、31はOSプ
ログラム、311はスケジューラ、32−1〜32−4はプロ
セス管理テーブル、321−1〜321−4はプロセッサ識別
子、322−1〜322−4は優先度、323−1〜323−4は実
行待ち時間、324−1〜324−4はカウンタ、325−1〜3
25−4はプロセス固定フラグ、236−1〜326−4はグル
ープ識別子、33−1〜33−2はグループ管理テーブル、
331−1〜331−2はプロセッサ識別子、332−1〜332−
2は実行待ち時間、333−1〜333−2はカウンタ、334
−1〜334−2はグループ固定フラグである。
FIG. 2 shows a system configuration according to the present invention. In FIG. 2, 13-1 to 13-3 are processors, 11-1 to 11-3.
Is a processor number, 12-1 to 12-6 are processes, 14-1
Is a timer, 4 is a connection bus, 5 is a shared memory, 31 is an OS program, 311 is a scheduler, 32-1 to 32-4 are process management tables, 321-1 to 321-4 are processor identifiers, 322-1 to 322 -4, priority; 323-1 to 323-4, execution waiting time; 324-1 to 324-4, counters;
25-4 is a process fixed flag, 236-1 to 326-4 are group identifiers, 33-1 to 33-2 are group management tables,
331-1 to 331-2 are processor identifiers, 332-1 to 332-
2 is an execution waiting time, 333-1 to 333-2 are counters, 334
-1 to 334-2 are group fixed flags.

プロセッサ13−1〜13−3は、接続バス4により相互
に、ならびに共有メモリ5に接続されている。各プロセ
ッサはプロセッサ番号11−1〜11−3をそれぞれ持って
いる。本実施例では、プロセッサ13−1〜13−3はそれ
ぞれプロセッサ番号“1",“2",“3"を有している。この
プロセッサ番号の設定は、本実施例ではハードウェアス
イッチにより行なっているが、他の方法として、ハード
のROMにあらかじめ記憶しておく、立ち上げ時にプログ
ラムにより設定する等の方法も考えられる。
The processors 13-1 to 13-3 are connected to each other by the connection bus 4 and to the shared memory 5. Each processor has processor numbers 11-1 to 11-3, respectively. In this embodiment, the processors 13-1 to 13-3 have processor numbers "1", "2", and "3", respectively. In this embodiment, the setting of the processor number is performed by a hardware switch. However, as another method, a method of storing the number in a hardware ROM in advance, or a method of setting a program at the time of startup can be considered.

プロセッサ13−1〜13−3のうち、一つのプロセッサ
にはタイマー14−1があり、一定の時間おきにタイマー
割り込みがそのプロセッサに入る。
One of the processors 13-1 to 13-3 has a timer 14-1, and a timer interrupt enters the processor at regular intervals.

各プロセスはプロセッサ上で実行される。共有メモリ
5には、オペレーティングシステムのプログラム31、こ
のプログラム31の一部であるプロセススケジューラ31
1、このオペレーティングシステムが管理するテーブル
の一部であるプロセス管理テーブル32(32−1〜32−
3)、グループ管理テーブル33(33−1〜33−2)が存
在する。
Each process runs on a processor. The shared memory 5 includes an operating system program 31 and a process scheduler 31 which is a part of the program 31.
1. A process management table 32 (32-1 to 32-) which is a part of a table managed by this operating system.
3) There is a group management table 33 (33-1 to 33-2).

プロセス管理テーブル32には、以下のような情報が置
かれる。第1にそのプロセスを実行すべきプロセッサの
プロセッサ番号を示すプロセッサ識別子21(321−1〜3
21−4)である。実施例ではプロセス管理テーブル32−
1のプロセッサ識別子は“1"となっており、このプロセ
ス管理テーブルに対応するプロセス0(12−1)は、プ
ロセッサ番号11−1に“1"を持つ、プロセッサ13−1で
実行すべきことを示している。プロセスを実行するプロ
セッサが未定のときは、このプロセッサ識別子を0とし
ておく、また、実行するプロセッサを特に決めず、どの
プロセッサでもそのプロセスを実行できるようにしたい
場合には、プロセッサ識別子を負の値にしておく。
The following information is stored in the process management table 32. First, the processor identifier 21 (321-1 to 31-2) indicating the processor number of the processor to execute the process
21-4). In the embodiment, the process management table 32-
The processor identifier of “1” is “1”, and the process 0 (12-1) corresponding to this process management table has “1” in the processor number 11-1 and must be executed by the processor 13-1. Is shown. If the processor that executes the process is undecided, set this processor identifier to 0. If you do not want to determine the processor to execute and any processor can execute the process, set the processor identifier to a negative value. Keep it.

第2に、プロセスの実行順を決定する優先度322(322
−1〜322−4)である。この優先度の数値が小さいほ
ど、プロセスの優先度が高くなり、他のプロセスに優先
して実行されなければならないことを示す。
Second, the priority 322 (322) for determining the execution order of the process
-1 to 322-4). The smaller the numerical value of this priority is, the higher the priority of the process is, which indicates that the process must be executed in preference to other processes.

第3は、実行待ち時間323(323−1〜323−4)であ
る。この実行待ち時間は、そのプロセスが実行待ち状態
になっている時間を示す。プロセスが実行されるとこの
実行待ち時間は0に戻される。
Third is the execution waiting time 323 (323-1 to 323-4). The execution waiting time indicates a time during which the process is in an execution waiting state. When the process is executed, the execution waiting time is returned to zero.

第4は、カウンタ324(324−1〜324−4)である。
このカウンタはプロセスの実行が拒絶された回数を数え
るカウンタである。
The fourth is a counter 324 (324-1 to 324-4).
This counter is a counter that counts the number of times the execution of the process has been rejected.

第5は、プロセス固定フラグ325(325−1〜325−
4)である。ここには、プロセスをプロセッサに固定す
るかどうかの情報が入る。固定としておくとそのプロセ
スは、プロセッサ識別子321に記されたプロセッサ以外
では実行されない。
Fifth, the process fixing flag 325 (325-1 to 325-
4). This contains information on whether to fix the process to the processor. If the process is fixed, the process is not executed by a processor other than the processor indicated by the processor identifier 321.

第6は、グループ識別子326(326−1〜326−4)で
ある。ここには、そのプロセスがどのグループに属して
いるかを示す情報が入る。グループの識別子とグループ
管理テーブルは1対1に対応する。
Sixth is a group identifier 326 (326-1 to 326-4). Here, information indicating which group the process belongs to is entered. The group identifier and the group management table have a one-to-one correspondence.

グループ管理テーブルには、以下の情報が記されてい
る。まず、第1にプロセッサ識別子である。これは、そ
のグループに属するプロセスを実行するプロセッサ番号
が記されている。
The following information is described in the group management table. First, the processor identifier. This indicates the processor number that executes the process belonging to the group.

第2は、実行待ち時間322(322−1〜322−2)であ
る。この実行待ち時間は、グループに属するプロセスの
いずれもがプロセッサで実行されておらず、いずれかが
実行待ち状態となっている時間である。グループのプロ
セスが1つでも実行されるとこの実行待ち時間は0に戻
される。
The second is the execution waiting time 322 (322-1 to 322-2). The execution waiting time is a time during which none of the processes belonging to the group is being executed by the processor and any of the processes is in the execution waiting state. If any process in the group is executed, the execution waiting time is returned to zero.

第3は、カウンタである。このカウンタはグループに
属するプロセスの実行が拒絶された回数を数えている。
グループ内のプロセスが実行された時には0にクリアさ
れる。
Third is a counter. This counter counts the number of times that execution of a process belonging to the group was rejected.
It is cleared to 0 when a process in the group is executed.

第4は、グループ固定フラグであり、このフラグが立
っているときには、そのグループを実行するプロセッサ
は固定となる。
Fourth is a group fixing flag. When this flag is set, the processor that executes the group is fixed.

第3図は、オペレーティングシステムのプログラム31
の一部であるプロセススケジューラ311のアルゴリズム
を示している。
FIG. 3 shows the operating system program 31.
3 shows an algorithm of the process scheduler 311 which is a part of the process scheduler 311.

まず、実行待ち状態となっているプロセスの中から、
優先順位に従い、次に実行するプロセスを選択する(31
1−1)。選択したプロセスのプロセス管理テーブルよ
り、グループ識別子326を読みだす。このグループ識別
子よりグループ管理テーブルを検索する(311−2)。
First, from the processes waiting to be executed,
Select the process to be executed next according to the priority (31
1-1). The group identifier 326 is read from the process management table of the selected process. The group management table is searched based on the group identifier (311-2).

このグループ管理テーブル中のプロセッサ識別子331
を読みだし、この値により以下の処理を行なう(311−
3)。
Processor identifier 331 in this group management table
Is read, and the following processing is performed according to this value (311−
3).

その値が正の値だったならば、スケジューラプログラ
ム311を実行しているプロセッサは、自分のプロセッサ
番号を11(11−1〜11−3)から読みだし、その正のプ
ロセッサ識別子331の値と比較する(311−5)。一致し
ていないときには、次に優先順位が高いプロセスを選択
し(311−1)、一致しているときには選択したプロセ
スを自分のプロセッサに割り当てる(311−6)。
If the value is a positive value, the processor executing the scheduler program 311 reads its own processor number from 11 (11-1 to 11-3), and reads the value of the positive processor identifier 331 and Compare (311-5). If they do not match, the process with the next highest priority is selected (311-1). If they match, the selected process is assigned to its own processor (311-6).

グループ管理テーブルのプロセッサ識別子が0だった
ときには、そのプロセッサ識別子の値を自分のプロセッ
サ番号(11)の値に変更して(311−4)、選択したプ
ロセスを自分のプロセッサに割り当てる(311−6)。
When the processor identifier in the group management table is 0, the value of the processor identifier is changed to the value of its own processor number (11) (311-4), and the selected process is assigned to its own processor (311-6). ).

プロセッサ識別子が負の値だったときには、無条件に
選択したプロセスを自分のプロセッサに割り当てる(31
1−6)。
When the processor identifier is a negative value, the selected process is unconditionally assigned to its own processor (31
1-6).

第4図は、オペレーティングシステムのプログラム31
の一部であるプロセススケジューラ311のアルゴリズム
の別の実施例を示している。
FIG. 4 shows a program 31 of the operating system.
15 shows another embodiment of the algorithm of the process scheduler 311 which is a part of the embodiment.

まず、実行待ち状態となっているプロセスの中から、
優先順位に従い、次に実行するプロセスを選択する(31
1−1)。選択したプロセスのプロセス管理テーブル32
により、プロセッサ識別子321を読みだし、自分のプロ
セッサ番号11と比較する(311−7)。その値が等しか
ったときには、選択したプロセスを自プロセッサに割り
当てる(311−6)。
First, from the processes waiting to be executed,
Select the process to be executed next according to the priority (31
1-1). Process management table 32 of the selected process
Reads the processor identifier 321 and compares it with its own processor number 11 (311-7). If the values are equal, the selected process is assigned to its own processor (311-6).

等しくないときには、プロセス固定フラグ325が立っ
ているかどうか判定する(311−8)。立っていた場合
には、次に優先順位が高いプロセスを選択し直す(311
−1)。
If not equal, it is determined whether or not the process fixing flag 325 is set (311-8). If so, re-select the process with the next highest priority (311
-1).

立っていないときには、プロセス管理テーブル32の実
行待ち時間323がしきい値を超えていないか調べる(311
−9)。
If not, check whether the execution waiting time 323 of the process management table 32 has exceeded the threshold value (311
-9).

超えている場合には、プロセス管理テーブル32のプロ
セッサ識別子321を自プロセッサ番号に設定して(311−
14)、選択したプロセスを自分に割り付ける(311−
6)。
If it exceeds, the processor identifier 321 of the process management table 32 is set to its own processor number (311−
14) Assign the selected process to yourself (311−
6).

超えていない場合には、プロセス管理テーブル32中の
グループ識別子326よりグループ管理テーブルを検索
し、その中のプロセッサ識別子が自分のプロセッサ番号
と等しいか調べる(311−10)。等しい場合には、やは
り、311−14を実行する。
If it does not exceed, the group management table is searched from the group identifier 326 in the process management table 32, and it is checked whether the processor identifier in the table is equal to its own processor number (311-10). If they are the same, execute 311-14 again.

等しくない場合には、グループ管理テーブル33中のグ
ループ固定フラグ334を調べる(311−11)。
If they are not equal, the group fixing flag 334 in the group management table 33 is checked (311-11).

フラグが立っているときには、次に優先度の高いプロ
セスを調べる(311−1)。
When the flag is set, the process with the next highest priority is checked (311-1).

フラグが立っていないときには、グループ管理テーブ
ル33の実行待ち時間332がしきい値を超えていないか調
べる。超えていない場合には、次に優先度の高いプロセ
スを調べる(311−1)。
When the flag is not set, it is checked whether the execution waiting time 332 of the group management table 33 has exceeded the threshold value. If not, the process with the next highest priority is checked (311-1).

超えていた場合には、グループ管理テーブル33のプロ
セッサ識別子331とプロセッサ管理テーブル32のプロセ
ッサ識別子321を自分のプロセッサ番号11に設定して(3
11−13,311−14)、選択したプロセスを実行する(311
−6)。
If it exceeds, the processor identifier 331 of the group management table 33 and the processor identifier 321 of the processor management table 32 are set to their own processor number 11 (3
11-13, 311-14) and execute the selected process (311
-6).

第5図は、オペレーティングシステムのプログラム31
の一部であるプロセススケジューラ311のアルゴリズム
の別の実施例を示している。
FIG. 5 shows a program 31 of the operating system.
15 shows another embodiment of the algorithm of the process scheduler 311 which is a part of the embodiment.

まず、実行待ち状態となっているプロセスの中から、
優先順位に従い、次に実行するプロセスを選択する(31
1−1)。選択したプロセスのプロセス管理テーブル32
より、プロセッサ識別子321を読み出し、自分のプロセ
ッサ番号11と比較する(311−7)。その値が等しかっ
たときには、選択したプロセスを自プロセッサに割り当
てる(311−6)。
First, from the processes waiting to be executed,
Select the process to be executed next according to the priority (31
1-1). Process management table 32 of the selected process
Then, the processor identifier 321 is read and compared with its own processor number 11 (311-7). If the values are equal, the selected process is assigned to its own processor (311-6).

等しくないときには、プロセス固定フラグ325が立っ
ているかどうか判定する(311−8)。立っていた場合
には、プロセス管理テーブル32のカウンタ324とグルー
プ管理テーブル33のカウンタ333をインクリメントして
(311−17,311−18)、次に優先順位が高いプロセスを
選択し直す(311−1)。
If not equal, it is determined whether or not the process fixing flag 325 is set (311-8). When standing, the counter 324 of the process management table 32 and the counter 333 of the group management table 33 are incremented (311-17, 311-18), and the process with the next highest priority is selected again (311-1). .

プロセス固定フラグが、立っていないときには、プロ
セス管理テーブル32のカウンタ325がしきい値を超えて
いないか調べる(311−15)。
When the process fixing flag is not set, it is checked whether the counter 325 of the process management table 32 has exceeded the threshold value (311-15).

超えている場合には、プロセス管理テーブル32のプロ
セッサ識別子321を自プロセッサ番号に設定して(311−
14)、選択したプロセスを自分に割り付ける(311−
6)。
If it exceeds, the processor identifier 321 of the process management table 32 is set to its own processor number (311−
14) Assign the selected process to yourself (311−
6).

超えていない場合には、プロセス管理テーブル32中の
グループ識別子326よりブループ管理テーブルを検索
し、その中のプロセッサ識別子が自分のプロセッサ番号
と等しいか調べる(311−10)。等しい場合には、やは
り、311−14を実行する。
If not exceeded, the group management table is searched from the group identifier 326 in the process management table 32, and it is checked whether the processor identifier in the group management table is equal to its own processor number (311-10). If they are the same, execute 311-14 again.

等しくない場合には、グループ管理テーブル33中のグ
ループ固定フラグ334を調べる(311−11)。フラグが立
っているときには、311−17を実行する。
If they are not equal, the group fixing flag 334 in the group management table 33 is checked (311-11). If the flag is set, execute 311-17.

フラグが立っていないときには、グループ管理テーブ
ル33のカウンタ333がしきい値を超えていないか調べ
る。超えていない場合には、311−17を実行する。
When the flag is not set, it is checked whether the counter 333 of the group management table 33 has exceeded the threshold value. If not, execute 311-17.

超えていた場合には、グループ管理テーブル33のプロ
セッサ識別子331とプロセッサ管理テーブル32のプロセ
ッサ識別子321を自分のプロセッサ番号11に設定して(3
11−13,311−14)、選択したプロセスを実行する(311
−6)。
If it exceeds, the processor identifier 331 of the group management table 33 and the processor identifier 321 of the processor management table 32 are set to their own processor number 11 (3
11-13, 311-14) and execute the selected process (311
-6).

第6図は、第3図、第4図、第5図の311−6の選択
したプロセスを自プロセッサに割り当てる方法を詳細に
記したものである。
FIG. 6 describes in detail the method of assigning the selected process of 311-6 in FIGS. 3, 4 and 5 to its own processor.

まず、今まで実行していたプロセスのレジスタを退避
する(312−1)。これは、後にそのプロセスに実行の
順番が再び廻ってきたときに、中断したところから再開
できるようにするためである。
First, the register of the process that has been executed is saved (312-1). This is so that the process can be resumed from the point where it was interrupted when the order of execution is returned to the process later.

次に選択したプロセスのプロセス管理テーブル32の実
行待ち時間323を0にする(312−2)。
Next, the execution wait time 323 of the process management table 32 of the selected process is set to 0 (312-2).

同様に選択したプロセスが属しているグループのグル
ープ管理テーブル33の実行待ち時間332、プロセス管理
テーブル32のカウンタ324、グループ管理テーブルのカ
ウンタ333も0にする(それぞれ、312−3,312−4,312−
5)。
Similarly, the execution waiting time 332 of the group management table 33 of the group to which the selected process belongs, the counter 324 of the process management table 32, and the counter 333 of the group management table are also set to 0 (respectively, 312-3, 312-4, 312-
5).

プロセスは、それぞれ独立なユーザ空間を持っている
ため、ユーザの空間を選択したプロセスのものに切り替
える(312−6)。
Since each process has an independent user space, the user space is switched to that of the selected process (312-6).

最後に、プロセスを前回中断したときに退避しておい
たレジスタの値を回復する(312−7)。退避するレジ
スタにはプログラムカウンタも含まれるため、前回中断
した場所から処理が再開される。
Finally, the value of the register saved when the process was interrupted last time is restored (312-7). Since the register to be saved also includes the program counter, the processing is restarted from the place where it was interrupted last time.

第7図の313は、第1図14−1のタイマーがプロセッ
サに送る割り込みの処理ルーチンを示している。タイマ
ー割り込みは10ms間隔で起こる。
Reference numeral 313 in FIG. 7 shows an interrupt processing routine sent by the timer of FIG. 14-1 to the processor. Timer interrupts occur at 10 ms intervals.

タイマー割り込みが入るとプロセッサは、まず、プロ
セス管理テーブル32を全部調べていき、実行待ち状態と
なっているプロセスについては、その実行待ち時間323
をインクリメントする(313−1)。
When a timer interrupt occurs, the processor first checks the entire process management table 32, and for a process that is in an execution waiting state, the execution waiting time 323
Is incremented (313-1).

次にグループ管理テーブル33を全部調べていき、実行
中のプロセスを含まず、実行待ちのプロセスを含むグル
ープの待ち時間333をインクリメントする(313−2)。
Next, the entire group management table 33 is checked, and the waiting time 333 of the group that does not include the running process but includes the process waiting to be executed is incremented (313-2).

第2図の本発明のシステム構成図の別の実施例を第8
図に示す。第8図において、13−1〜13−3はプロセッ
サ、11−1〜11−3はプロセッサ番号、12−1〜12−6
はプロセス、14−2はタイマー、4は接続バス、5は共
有メモリ、31はOSプログラム、311はスケジューラ、32
−1〜32−4はプロセス管理テーブル、321−1〜321−
4はプロセッサ識別子、325−1〜325−4はプロセス固
定フラグ、326−1〜326−4はグループ識別子、327−
1〜327−4はCPU時間、328−1〜328−4,329−1〜329
−4,330−1〜330−4は優先度、33−1〜33−2はグル
ープ管理テーブル、331−1〜331−2はプロセッサ識別
子、334−1〜334−4はグループ固定フラグである。
Another embodiment of the system configuration diagram of the present invention shown in FIG.
Shown in the figure. In FIG. 8, 13-1 to 13-3 are processors, 11-1 to 11-3 are processor numbers, and 12-1 to 12-6.
Is a process, 14-2 is a timer, 4 is a connection bus, 5 is a shared memory, 31 is an OS program, 311 is a scheduler, 32
-1 to 32-4 are process management tables, 321-1 to 321-
4 is a processor identifier, 325-1 to 325-4 are process fixing flags, 326-1 to 326-4 are group identifiers, and 327-
1 to 327-4 are CPU time, 328-1 to 328-4,329-1 to 329
-4,330-1 to 330-4 are priorities, 33-1 to 33-2 are group management tables, 331-1 to 331-2 are processor identifiers, and 334-1 to 334-4 are group fixed flags.

プロセッサ13−1〜13−3は、接続バス4により相互
に、ならび共有メモリ5に接続されている。各プロセッ
サはプロセッサ番号11−1〜11−3をそれぞれ持ってい
る。本実施例では、プロセッサ13−1〜13−3はそれぞ
れプロセッサ番号“1",“2",“3"を有している。
The processors 13-1 to 13-3 are connected to each other and to the shared memory 5 by a connection bus 4. Each processor has processor numbers 11-1 to 11-3, respectively. In this embodiment, the processors 13-1 to 13-3 have processor numbers "1", "2", and "3", respectively.

プロセッサ13−1〜13−3のうち、一つのプロセッサ
にはタイマー14−2があり、一定の時間おきにタイマー
割り込みがそのプロセッサに入る。実施例では10msおき
と1sおきの2種類の割り込みが入る。
One of the processors 13-1 to 13-3 has a timer 14-2, and a timer interrupt enters the processor at regular intervals. In the embodiment, two types of interrupts are provided every 10 ms and every 1 s.

各プロセスはプロセッサ上で実行される。共有メモリ
5には、オペレーティングシステムのプログラム31、こ
のプログラム31の一部であるプロセススケジューラ31
4、このオペレーティングシステムが管理するテーブル
の一部であるプロセス管理テーブル32(32−1〜32−
3)、グループ管理テーブル33(33−1〜33−2)が存
在する。
Each process runs on a processor. The shared memory 5 includes an operating system program 31 and a process scheduler 31 which is a part of the program 31.
4. Process management table 32 (32-1 to 32-) which is a part of the table managed by this operating system
3) There is a group management table 33 (33-1 to 33-2).

プロセス管理テーブル32には、以下のような情報が置
かれる。第1にそのプロセスを実行すべきプロセッサの
プロセッサ番号を示すプロセッサ識別子21(321−1〜3
21−4)である。実施例ではプロセス管理テーブル32−
1のプロセッサ識別子は“1"となっており、このプロセ
ス管理テーブルに対応するプロセス0(12−1)は、プ
ロセッサ番号11−1に“1"を持つ、プロセッサ13−1で
実行すべきことを示している。プロセスを実行するプロ
セッサが未定のときは、このプロセッサ識別子を0とし
ておく。また、実行するプロセッサを特に決めず、どの
プロセッサでもそのプロセスを実行できるようにしたい
場合には、プロセッサ識別子を負の値にしておく。
The following information is stored in the process management table 32. First, the processor identifier 21 (321-1 to 31-2) indicating the processor number of the processor to execute the process
21-4). In the embodiment, the process management table 32-
The processor identifier of “1” is “1”, and the process 0 (12-1) corresponding to this process management table has “1” in the processor number 11-1 and must be executed by the processor 13-1. Is shown. If the processor that executes the process is undecided, the processor identifier is set to 0. If the processor to be executed is not particularly determined and any processor can execute the process, the processor identifier is set to a negative value.

第2は、プロセス固定フラグ325(325−1〜325−
4)である。ここには、プロセスをプロセッサに固定す
るかどうかの情報が入る。固定としておくとそのプロセ
スは、プロセッサ識別子321に記される。
Second, the process fixing flag 325 (325-1 to 325-
4). This contains information on whether to fix the process to the processor. If the process is fixed, the process is described in the processor identifier 321.

第3は、グループ識別子326(326−1〜326−4)で
ある。ここには、そのプロセスがどのグループに属して
いるかを示す情報が入る。グループの識別子とグループ
管理テーブルは1対1に対応する。
Third is a group identifier 326 (326-1 to 326-4). Here, information indicating which group the process belongs to is entered. The group identifier and the group management table have a one-to-one correspondence.

第4は、CPU時間である。これは、プロセスが使用し
たCPU時間であり、優先度の計算に使用する。ただし、
このCPU時間は1秒毎に1/4にしているので正確なCPU時
間ではない。
Fourth is CPU time. This is the CPU time used by the process and is used to calculate the priority. However,
Since this CPU time is reduced to 1/4 every second, it is not an accurate CPU time.

第5に、プロセスの実行順を決定する優先度328〜330
である。優先度が各プロセスに複数あるのは、プロセッ
サ毎に優先度を持っているためである。この優先度の数
値が小さいほど、プロセスの優先度は高くなり、他の優
先度の数値が大きいプロセスに優先して実行されなけれ
ばならないことを示す。
Fifth, priorities 328 to 330 for determining the execution order of the process
It is. Each process has a plurality of priorities because each processor has a priority. The smaller the numerical value of this priority is, the higher the priority of the process is, which indicates that the process must be executed in preference to other processes having a higher numerical value of priority.

グループ管理テーブルには、プロセッサ識別子331(3
31−1〜331−2)がある、これは、そのグループに属
するプロセスを実行するプロセッサ番号が記されてい
る。
In the group management table, the processor identifier 331 (3
31-1 to 331-2), in which the number of a processor that executes a process belonging to the group is described.

第9図は、第8図におけるスケジューラプログラム31
4のアルゴリズムを示している。スケジューラプログラ
ムを実行しているプロセッサは、プロセス管理テーブル
の優先度のうち自分に対応するものを順番に調べて行
く。そして、優先度が最大(優先度の数字は最小)のプ
ロセスを選択する(314−1)。ただし、このときプロ
セス管理テーブル32のプロセス固定フラグ325が立って
おり、プロセス識別子321が自分のプロセッサ番号でな
いプロセスは除く。
FIG. 9 shows the scheduler program 31 in FIG.
4 shows an algorithm. The processor executing the scheduler program sequentially checks the priority of the process management table corresponding to itself. Then, the process with the highest priority (the numerical value of the priority is the smallest) is selected (314-1). However, at this time, a process in which the process fixing flag 325 of the process management table 32 is set and the process identifier 321 is not its own processor number is excluded.

次に選択したプロセスを自分のプロセッサに割り当て
る(314−2)。
Next, the selected process is assigned to its own processor (314-2).

第10図の315はタイマー14−2が発生させる10ms毎の
割り込みの処理ルーチンである。ここでは、各プロセッ
サが実行中のプロセスのプロセス管理テーブル32のCPU
時間327をインクリメントしている。
Reference numeral 315 in FIG. 10 denotes a processing routine for an interrupt generated every 10 ms by the timer 14-2. Here, the CPU of the process management table 32 of the process executed by each processor is described.
Time 327 is incremented.

第11図の316はタイマー14−2が発生させる1sごとの
割り込みの処理ルーチンである。ここでは、各プロセス
管理テーブル32の優先度328〜330を再計算している。31
6−1で各プロセスについて処理を行なっており、316−
3で各プロセッサについて処理を行なっている。316−
2では、CPU時間327が大きくなり過ぎないように1秒毎
に1/4にしている。
Reference numeral 316 in FIG. 11 denotes a processing routine for an interruption every 1 s generated by the timer 14-2. Here, the priorities 328 to 330 of each process management table 32 are recalculated. 31
Processing is performed for each process in 6-1.
In step 3, the processing is performed for each processor. 316−
In 2, the CPU time 327 is reduced to 1/4 every second so as not to become too large.

316−4〜316−7で優先度を計算している。優先度
は、基本的にはそのプロセスのCPU時間に等しいが、プ
ロセス管理テーブル32のプロセッサ識別子321に記され
ていないプロセッサの優先度には、20を加える。また、
グループ管理テーブル33のプロセッサ識別子に書かれて
いないプロセッサの優先度にはやはり20を加える。
The priority is calculated in 316-4 to 316-7. The priority is basically equal to the CPU time of the process, but 20 is added to the priority of the processor not described in the processor identifier 321 of the process management table 32. Also,
Also, 20 is added to the priority of the processor not described in the processor identifier of the group management table 33.

これにより、プロセス管理テーブルやグループ管理テ
ーブルのプロセッサ識別子に書かれているプロセッサに
対してはそのプロセスの優先度が高くなり、実行されや
すくなる。
As a result, the priority of the processor described in the processor identifier of the process management table or the group management table is increased, and the process is easily executed.

第12図は、シングルプロセッサ用に開発したプログラ
ムを従来のスケジューリング方式のマルチプロセッサで
実行した場合を示している。第12図において、12−1〜
12−2はプロセス、41−1〜41−2は割り込み禁止処
理、42−1〜42−2は資源使用処理、43−1〜43−2は
割り込み許可処理である。
FIG. 12 shows a case where a program developed for a single processor is executed by a multiprocessor of a conventional scheduling method. In FIG. 12, 12-1 to 12-1
12-2 is a process, 41-1 and 41-2 are interrupt prohibition processes, 42-1 and 42-2 are resource use processes, and 43-1 and 43-2 are interrupt permission processes.

シングルプロセッサは、一瞬一瞬を見ると実行してい
るプロセスは一つである。よって、シングルプロセッサ
で実行することを前提としたプログラムは、共有資源を
使用する場合にも、単に割り込みを禁止するだけで使用
しているものが多い。これは、資源をロックして使用す
るより処理が高速なためである。シングルプロセッサで
は割り込みさえ禁止しておけば、瞬間的には実行されて
いるプロセスは一つなので資源を同時に複数のプロセス
が使用するようなことはない。
The single processor executes one process at a time. Therefore, many programs that are supposed to be executed by a single processor are used by simply prohibiting interrupts even when using shared resources. This is because the processing is faster than using locked resources. As long as interrupts are disabled in a single processor, only one process is instantaneously executed, so that multiple processes do not use resources at the same time.

しかし、マルチプロセッサでは第12図に示すように、
41−1,41−2で割り込みを禁止しても、42−1と42−2
のように同時に複数のプロセスが資源を使用することが
ある。
However, in a multiprocessor, as shown in FIG.
Even if interrupts are disabled in 41-1 and 41-2, 42-1 and 42-2
, Multiple processes may use resources at the same time.

第13図は、本発明のスケジューリング方法を用いてい
るマルチプロセッサでシングルプロセッサ用のプログラ
ムを実行した場合を示す、同じ資源を使用するプロセス
12−1と12−2を同一グループにして、プロセッサ0で
実行するようにすれば、42−1と42−2の資源の使用が
必ず直列に実行され、資源使用が競合することがない。
FIG. 13 shows a process using the same resources, showing a case where a program for a single processor is executed by a multiprocessor using the scheduling method of the present invention.
If 12-1 and 12-2 are put into the same group and executed by the processor 0, the use of the resources of 42-1 and 42-2 is always executed in series, and there is no conflict between resource use.

尚、近年、個々にプログラムとデータを持つ従来のプ
ロセスに代わって、いくつか毎にプログラムやデータを
共有するスレッド(thread)やライト・ウエイト・プロ
セス(light weight process)が注目されている。
In recent years, instead of a conventional process that individually has a program and data, a thread and a light weight process that share a program and data with each other have attracted attention.

プログラムやデータを共有するスレッドでは共有デー
タ量が多いため、グループ化したときのキャッシュ性能
の向上が一段と大きくなる。
Since threads that share programs and data have a large amount of shared data, the improvement in cache performance when grouping is further enhanced.

またプログラム,データを共有するスレッドをグルー
プ化して、1つのプロセッサで実行すると、プログラ
ム,データの切り替えがいらないことが多くなり、OSの
処理時間を短くすることができる。
Also, when threads that share programs and data are grouped and executed by one processor, switching between programs and data is often unnecessary, and the processing time of the OS can be shortened.

従って、本発明は、かかるスレッドやライト・ウエイ
ト・プロセスに対して適用しても効果大である。
Therefore, the present invention is effective even when applied to such a thread or a light weight process.

[発明の効果] 本発明のプロセススケジューリング方法は、複数のプ
ロセッサからなるマルチプロセッサシステムにおいて、
複数のプロセッサのいずれでも実行可能なプロセスにつ
いて、あえてそのプロセスをグループ化してそのグルー
プを実行させるプロセッサを特定のプロセッサに限定し
ようとするものである。
[Effects of the Invention] The process scheduling method according to the present invention provides a multi-processor system including a plurality of processors.
In a process that can be executed by any of a plurality of processors, the processes are intentionally grouped, and the processor that executes the group is limited to a specific processor.

共有データを多く持つプロセスが異なるプロセッサで
実行されると、キャッシュ一致化のための通信が頻繁に
発生しキャッシュ性能を低下させる。本発明では、その
ようなプロセスをグループ化し、同一のプロセッサで実
行できるので、キャッシュ一致化のための通信が不要と
なり、性能を向上させることができる。さらに、グルー
プを特定のプロセッサに実行させることによりプロセッ
サ間の負荷が片寄ることがないように、一定時間以上実
行されずに位置されているプロセスについては、いずれ
のプロセッサでも実行できるようにしており、負荷分散
が可能となっている。ただし、この機能はプロセス固定
フラグを立てることにより禁止することもできる。
If a process having a large amount of shared data is executed by different processors, communication for cache coherence frequently occurs, and the cache performance is reduced. According to the present invention, such processes can be grouped and executed by the same processor, so that communication for cache matching is not required, and performance can be improved. Furthermore, in order to prevent the load between the processors from shifting due to the execution of the group by a specific processor, for a process located without being executed for a certain period of time, it is possible to execute on any processor, Load balancing is possible. However, this function can be prohibited by setting a process fixing flag.

また、本発明によって、排他制御を必要とするプロセ
ス群を同一のプロセッサで動作させることが可能とな
り、共有メモリに対する排他制御を考慮していない従来
の単一プロセッサ用の既存のプロセスを修正することな
く使用しても正常な動作を保証することができる。この
事は、他のプロセッサの不使用を意味するものではな
く、前記プロセス群以外のプロセスについては、このよ
うな制約を設けずに、任意のプロセッサで実行可能とし
てマルチプロセッサの機能を有効に利用することができ
る。
Further, according to the present invention, a process group that requires exclusive control can be operated by the same processor, and the existing process for a conventional single processor that does not consider the exclusive control for the shared memory can be modified. Normal operation can be guaranteed even if used without. This does not mean that other processors are not used. Processes other than the above-mentioned process group can be executed by any processor without such restrictions, and the functions of the multiprocessor are effectively used. can do.

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

第1図は本発明の一実施例のプロセススケジューリング
の概要図、第2図はシステム構成図、第3図はスケジュ
ーラのアルゴリズム図、第4図はスケジューラアルゴリ
ズムの別の実施例図、第5図もスケジューラのアルゴリ
ズムの別の実施例図、第6図は選択したプロセスを自分
のプロセッサに割り当てるアルゴリズム図、第7図はタ
イマー割り込みの処理ルーチン図、第8図はシステム構
成の別の実施例図、第9図はスケジューラのアルゴリズ
ム図、第10図は10ms毎のタイマー割り込みの処理ルーチ
ン図、第11図は1秒毎のタイマー割り込みの処理ルーチ
ン図、第12図は従来のスケジューリング方式でシングル
プロセッサ用のプログラムを実行した場合の説明図、第
13図は本発明のスケジューリング方法でシングルプロセ
ッサ用のプログラムを実行した場合の説明図である。 4……接続バス、5……共有メモリ、11……プロセッサ
番号、12……プロセス、13……プロセッサ、14……タイ
マー、15……グループ、31……OSプログラム、32……プ
ロセス管理テーブル、33……グループ管理テーブル、31
1……スケジューラ、321……プロセッサ識別子、322…
…優先度、323……実行待ち時間、324……カウンタ、32
5……プロセッサ固定フラグ、326……グループ識別子、
327……CPU時間、328〜330……優先度、331……プロセ
ッサ識別子、332……実行待ち時間、333……カウンタ、
334……グループ固定フラグ、41……割り込み禁止処
理、42……資源使用処理、43……割り込み許可処理。
1 is a schematic diagram of process scheduling according to an embodiment of the present invention, FIG. 2 is a system configuration diagram, FIG. 3 is an algorithm diagram of a scheduler, FIG. 4 is another embodiment of a scheduler algorithm, FIG. FIG. 6 is another embodiment of the algorithm of the scheduler, FIG. 6 is an algorithm diagram for allocating the selected process to its own processor, FIG. 7 is a diagram of a timer interrupt processing routine, and FIG. 8 is another embodiment of the system configuration. , FIG. 9 is an algorithm diagram of the scheduler, FIG. 10 is a processing routine of a timer interrupt every 10 ms, FIG. 11 is a processing routine of a timer interrupt every 1 second, and FIG. Diagram when executing a program for
FIG. 13 is an explanatory diagram when a program for a single processor is executed by the scheduling method of the present invention. 4 connection bus, 5 shared memory, 11 processor number, 12 process, 13 processor, 14 timer, 15 group, 31 OS program, 32 process management table , 33 ... Group management table, 31
1 ... scheduler, 321 ... processor identifier, 322 ...
… Priority, 323 …… Execution waiting time, 324 …… Counter, 32
5: Processor fixed flag, 326: Group identifier,
327: CPU time, 328 to 330: priority, 331: processor identifier, 332: execution wait time, 333: counter,
334: Group fixed flag, 41: Interrupt prohibition processing, 42: Resource use processing, 43: Interrupt permission processing

───────────────────────────────────────────────────── フロントページの続き (72)発明者 小林 芳樹 茨城県日立市久慈町4026番地 株式会社 日立製作所日立研究所内 (72)発明者 中村 智明 茨城県日立市大みか町5丁目2番1号 株式会社日立製作所大みか工場内 (56)参考文献 特開 昭62−75739(JP,A) 特開 昭55−83951(JP,A) 特開 昭62−187958(JP,A) 特開 平2−122365(JP,A) 特開 平2−242434(JP,A) 特開 平2−238556(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06F 15/163──────────────────────────────────────────────────続 き Continuing from the front page (72) Inventor Yoshiki Kobayashi 4026 Kuji-cho, Hitachi City, Ibaraki Prefecture Inside Hitachi, Ltd. Hitachi Research Laboratory Co., Ltd. (72) Inventor Tomoaki Nakamura 5-2-1 Omika-cho, Hitachi City, Ibaraki Prefecture Co., Ltd. (56) References JP-A-62-75739 (JP, A) JP-A-55-83951 (JP, A) JP-A-62-187958 (JP, A) JP-A-2-122365 ( JP, A) JP-A-2-242434 (JP, A) JP-A-2-238556 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 15/163

Claims (16)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数のプロセッサを具備し、該複数のプロ
セッサが、単一のオペレーティングシステムによって制
御されるマルチプロセッサシステムにおいて、プロセス
を管理するプロセス管理テーブルに従い、上記オペレー
ティングシステムのプロセススケジューラが、プロセス
に何れかのプロセッサを割り当てるプロセススケジュー
リング方式であって、上記プロセス管理テーブルに重複
を許すグループ識別子を記述し、該グループ識別子が同
一な該プロセスの情報を記憶するグループ管理テーブル
を設け、該グループ管理テーブルにグループ内のプロセ
スを実行するプロセッサを指示するプロセッサ割り当て
情報を記述し、上記プロセススケジューラは、次に実行
すべく選択したプロセスについて、上記プロセス管理テ
ーブルを参照して、当該プロセスのグループを判別し、
該グループのグループ管理テーブルのプロセッサ割り当
て情報により指定されたプロセッサ状で該プロセスを動
作させることにより、同一のグループに属するプロセス
は、同一のプロセッサで実行することを特徴とするマル
チプロセッサスケジューリング方法。
In a multiprocessor system comprising a plurality of processors, wherein the plurality of processors are controlled by a single operating system, a process scheduler of the operating system operates according to a process management table for managing processes. A process scheduling method for assigning any one of the processors to the group management server, wherein a group identifier allowing duplication is described in the process management table, and a group management table storing information of the process having the same group identifier is provided. The table describes processor allocation information indicating the processors that execute the processes in the group. The process scheduler refers to the process management table for the process selected to be executed next. Determine the group of the process,
A multiprocessor scheduling method, characterized in that processes belonging to the same group are executed by the same processor by operating the process in a processor designated by the processor assignment information of the group management table of the group.
【請求項2】上記プロセス管理テーブルに該プロセスの
実行待ち時間を記憶し、上記プロセススケジューラが次
に実行すべく選択したプロセスについて、上記プロセス
管理テーブルを参照して、実行待ち時間がある値以上の
時には、任意のプロセッサで動作させ、該実行待ち時間
がある値以下の時には、該プロセス管理テーブルを参照
して、当該プロセスのグループを判別し、該グループの
グループ管理テーブルのプロセッサ割り当て情報により
指定されたプロセッサ上で該プロセスを動作させること
を特徴とする請求項1のマルチプロセッサスケジューリ
ング方法。
2. The process management table stores an execution waiting time of the process, and for the process selected by the process scheduler to be executed next, the execution waiting time is equal to or more than a certain value with reference to the process management table. When the execution wait time is less than a certain value, the process management table is referred to to determine the group of the process, and the process is specified by the processor allocation information in the group management table of the group. 2. The multiprocessor scheduling method according to claim 1, wherein the process is operated on the selected processor.
【請求項3】上記グループ管理テーブルに該グループの
何れのプロセスも実行されていない時間、即ちグループ
実行待ち時間を記憶し、上記プロセススケジューラが、
次に実行すべく選択したプロセスについて、上記プロセ
ス管理テーブルを参照して、当該プロセスのグループを
判別し、該グループのグループ管理テーブルのグループ
実行待ち時間がある値以上の時には、該グループ管理テ
ーブルのプロセッサ割り当て情報を変更できるようにし
たことを特徴とするマルチプロセッサスケジューリング
方法。
3. The group management table stores a time during which no process of the group is being executed, that is, a group execution waiting time, and the process scheduler stores
For the process selected to be executed next, the group of the process is determined by referring to the process management table. When the group execution waiting time in the group management table of the group is equal to or greater than a certain value, the group management table of the group management table is determined. A multiprocessor scheduling method characterized in that processor assignment information can be changed.
【請求項4】上記プロセス管理テーブルに該プロセスの
実行待ち時間と該プロセス前回実行されたプロセッサの
識別子を記憶し、上記プロセススケジューラが、次に実
行すべく選択したプロセスについて、上記プロセス管理
テーブルを参照して、該待ち時間がある値以下の時に
は、該プロセスを前回実行したプロセッサか、グループ
管理テーブルのプロセッサ割り当て情報が指示するプロ
セッサで実行し、ある値以上の時には、上記以外のプロ
セッサで動作できるようにしたことを特徴とする請求項
1又は2のマルチプロセッサスケジューリング方法。
4. The process management table stores an execution waiting time of the process and an identifier of a processor executed last time, and the process scheduler stores the process management table for a process selected to be executed next. For reference, when the waiting time is equal to or less than a certain value, the process is executed by the processor which executed the previous process or the processor indicated by the processor assignment information in the group management table. 3. The multiprocessor scheduling method according to claim 1, wherein the method is enabled.
【請求項5】該プロセスの実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いたことを特徴とする請求項2又は3又は4のマルチプ
ロセッサスケジューリング方法。
5. The multiprocessor scheduling method according to claim 2, wherein the number of times the assignment of the process to the processor is rejected is used instead of the execution waiting time of the process.
【請求項6】該グループの何れのプロセスも実行されて
いない時間、即ちグループ実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いたことを特徴する請求項3又は5のマルチプロセッサ
スケジューリング方法。
6. The method according to claim 3, wherein a time during which no process in the group is executed, that is, the number of times the assignment of the process to the processor is rejected is used in place of the group execution waiting time. Multiprocessor scheduling method.
【請求項7】複数のプロセッサを具備し、該複数のプロ
セッサが、単一のオペレーティングシステムによって制
御されるマルチプロセッサシステムにおいて、実行して
いるプロセスを切り替える必要が生じたプロセッサが、
プロセスを管理するプロセス管理テーブルに従い、上記
オペレーティングシステムのプロセススケジューラを実
行し、該プロセッサが次に実行するプロセスを決定する
プロセススケージューリング方式であって、上記プロセ
ス管理テーブルに重複を許すグループ識別子を記述し、
該グループ識別子が同一な該プロセスの情報を記録する
グループ管理テーブルを設け、該グループ管理テーブル
にグループ内のプロセスを実行するプロセッサを指示す
るプロセッサ割り当て情報を記述し、上記プロセススケ
ジューラは、実行可能プロセスの中から、上記プロセス
管理テーブルのグループ識別子が指示する、該グループ
管理テーブルのプロセッサ割り当て情報が該プロセスス
ケジューラを実行しているプロセッサを指示しているプ
ロセスを次に実行することを特徴とするマルチプロセッ
サスケジューリング方法。
7. A multi-processor system comprising a plurality of processors, wherein the plurality of processors are controlled by a single operating system, the processor which needs to switch a running process is provided.
A process scheduling method for executing a process scheduler of the operating system according to a process management table for managing a process and determining a process to be executed next by the processor, wherein a group identifier that allows duplication is stored in the process management table. Write,
A group management table for recording information of the process having the same group identifier; providing processor assignment information for instructing a processor to execute a process in the group in the group management table; And executing a process next designated by the group identifier of the process management table, wherein the processor assignment information of the group management table indicates the processor executing the process scheduler. Processor scheduling method.
【請求項8】上記プロセス管理テーブルに該プロセスの
実行待ち時間を記憶し、上記プロセススケジューラが、
次に実行するプロセスを選択する際に上記プロセス管理
テーブルを参照して、実行待ち時間がある値以上の時に
は、該プロセスを実行可能とすることを特徴とする請求
項7のマルチプロセッサスケジューリング方法。
8. The process management table stores the execution waiting time of the process, and the process scheduler
8. The multiprocessor scheduling method according to claim 7, wherein when the process to be executed next is selected, the process management table is referred to, and when the execution waiting time is equal to or more than a certain value, the process is executable.
【請求項9】上記グループ管理テーブルに該グループの
何れのプロセスも実行されていない時間、即ちグループ
実行待ち時間を記憶し、上記プロセススケジューラが、
次に実行するプロセスを選択する際に、上記プロセス管
理テーブルを参照して、当該プロセスのグループを判別
し、該グループのグループ管理テーブルのグループ実行
待ち時間がある値以上の時には、該グループ管理テーブ
ルのプロセッサ割り当て情報を変更して、該プロセスを
実行可能とすることを特徴とする請求項7又は8のマル
チプロセッサスケジューリング方法。
9. The group management table stores a time during which no process of the group is being executed, that is, a group execution waiting time, and the process scheduler stores
When selecting the next process to be executed, the group of the process is determined by referring to the process management table. When the group execution waiting time of the group management table of the group is equal to or longer than a certain value, the group management table 9. The multiprocessor scheduling method according to claim 7, wherein the processor allocation information is changed so that the process can be executed.
【請求項10】上記プロセス管理テーブルに該プロセス
の実行待ち時間と該プロセスが前回実行されたプロセッ
サの識別子を記憶し、上記プロセススケジューラが、次
に実行するプロセスを選択する際に、上記プロセス管理
テーブルを参照して、該待ち時間がある値以下の時に
は、該プロセスを前回実行したプロセッサか、グループ
管理テーブルのプロセッサ割り当て情報が指示するプロ
セッサが該プロセススケジューラを実行しているプロセ
ッサと同一である場合にのみ実行可能とし、該待ち時間
がある値以上の時には、実行可能とすることを特徴とす
る請求項7のマルチプロセッサスケジューリング方法。
10. The process management table stores, in the process management table, an execution waiting time of the process and an identifier of a processor in which the process has been executed last, and when the process scheduler selects a process to be executed next, the process management is performed. Referring to the table, when the waiting time is equal to or less than a certain value, the processor that executed the process last time or the processor indicated by the processor assignment information in the group management table is the same as the processor that is executing the process scheduler. 8. The multiprocessor scheduling method according to claim 7, wherein the method is executable only when the waiting time is longer than a certain value.
【請求項11】該プロセスの実行待ち時間の代わりに該
プロセスのプロセッサへの割り当てが拒絶された回数を
用いたことを特徴とする請求項8又は9又は10のマルチ
プロセッサスケジューリング方法。
11. The multiprocessor scheduling method according to claim 8, wherein the number of times the assignment of the process to the processor is rejected is used instead of the execution waiting time of the process.
【請求項12】該グループの何れのプロセスも実行され
ていない時間、即ちグルプ実行待ち時間の代わりに該プ
ロセスのプロセッサへの割り当てが拒絶された回数を用
いたことを特徴とする請求項3又は6のマルチプロセッ
サスケジューリング方法。
12. The method according to claim 3, wherein the time when no process in the group is executed is used, that is, the number of times the process is rejected to be assigned to the processor is used instead of the group execution waiting time. 6. The multiprocessor scheduling method of 6.
【請求項13】複数のプロセッサを具備し、該複数のプ
ロセッサが、単一のオペレーティングシステムによって
制御されるマルチプロセッサシステムにおいて、プロセ
スを管理するプロセス管理テーブルに従い、上記オペレ
ーティングシステムのプロセススケジューラが、プロセ
スに何れかのプロセッサを割り当てるプロセススケジュ
ーリング方式であって、上記プロセス管理テーブルに上
記複数のプロセッサ各々に対する優先度と重複を許すグ
ループ識別子を記述し、該グループ識別子が同一な該プ
ロセスの情報を記憶するグループ管理テーブルを設け、
該グループ管理テーブルにグループ内のプロセスを実行
するプロセッサを指示するプロセッサ割り当て情報を設
け、上記プロセス管理テーブルのグループ識別子が示す
グループ管理テーブル中のプロセッサ割り当て情報が指
示するプロセッサに対応する該優先度を高く設定するこ
とを特徴とするマルチプロセッサスケジューリング方
法。
13. A multi-processor system comprising a plurality of processors, wherein the plurality of processors are controlled by a single operating system. In the process scheduling method, any one of the processors is assigned a priority, a priority of each of the plurality of processors and a group identifier that permits duplication are described in the process management table, and information of the process having the same group identifier is stored. Set up a group management table,
The group management table is provided with processor assignment information indicating processors executing processes in the group, and the priority corresponding to the processor indicated by the processor assignment information in the group management table indicated by the group identifier of the process management table is set. A multiprocessor scheduling method characterized by setting a high value.
【請求項14】プロセス割り当て情報のコードの一つと
して、該プロセスが何れのプロセッサでも実行可能であ
ることを示すコードを設けたことを特徴とする請求項1
〜13のいずれか1つに記載のマルチプロセッサスケジュ
ーリング方法。
14. A method according to claim 1, wherein a code indicating that the process can be executed by any processor is provided as one of the codes of the process assignment information.
14. The multiprocessor scheduling method according to any one of items 13 to 13.
【請求項15】プロセス管理テーブル、グループ管理テ
ーブルの何れか、または、両方に該プロセスが特定のプ
ロセッサでのみ実行可能であることを示すフラグを設け
たことを特徴とする請求項1〜14のいずれか1つに記載
のマルチプロセッサスケジューリング方法。
15. A method according to claim 1, wherein a flag indicating that the process can be executed only by a specific processor is provided in one or both of the process management table and the group management table. A multiprocessor scheduling method according to any one of the preceding claims.
【請求項16】資源を共有するプロセスに対して、同一
のグループ識別子を持たせることにより、該資源の排他
制御を簡単化したことを特徴とする請求項1〜15のいず
れか1つに記載のマルチプロセッサスケジューリング方
法。
16. The process according to claim 1, wherein exclusive control of the resources is simplified by giving the same group identifier to processes sharing the resources. Multiprocessor scheduling method.
JP1250532A 1989-09-28 1989-09-28 Multiprocessor scheduling method Expired - Fee Related JP2769367B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1250532A JP2769367B2 (en) 1989-09-28 1989-09-28 Multiprocessor scheduling method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1250532A JP2769367B2 (en) 1989-09-28 1989-09-28 Multiprocessor scheduling method

Publications (2)

Publication Number Publication Date
JPH03113563A JPH03113563A (en) 1991-05-14
JP2769367B2 true JP2769367B2 (en) 1998-06-25

Family

ID=17209299

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1250532A Expired - Fee Related JP2769367B2 (en) 1989-09-28 1989-09-28 Multiprocessor scheduling method

Country Status (1)

Country Link
JP (1) JP2769367B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002055966A (en) * 2000-08-04 2002-02-20 Internatl Business Mach Corp <Ibm> Multiprocessor system, processor module used for multiprocessor system, and method for allocating task in multiprocessing
JP2002063148A (en) * 2000-07-13 2002-02-28 Internatl Business Mach Corp <Ibm> Multiple processor system
JP2004220608A (en) * 2003-01-16 2004-08-05 Internatl Business Mach Corp <Ibm> Dynamic allocation of computer resource based on thread type

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3610681B2 (en) * 1996-06-28 2005-01-19 株式会社日立製作所 Production planning method and production planning system
US7418703B2 (en) 2002-03-20 2008-08-26 Nec Corporation Parallel processing system by OS for single processor
JP4051703B2 (en) 2003-03-31 2008-02-27 日本電気株式会社 Parallel processing system and parallel processing program by OS for single processor
JP4196333B2 (en) 2003-05-27 2008-12-17 日本電気株式会社 Parallel processing system and parallel processing program
JP4062441B2 (en) 2003-07-18 2008-03-19 日本電気株式会社 Parallel processing system and parallel processing program
JP4171910B2 (en) 2004-03-17 2008-10-29 日本電気株式会社 Parallel processing system and parallel processing program
JP4723465B2 (en) * 2006-11-29 2011-07-13 富士通株式会社 Job allocation program and job allocation method
JP2009020692A (en) * 2007-07-11 2009-01-29 Toshiba Corp Task management device, task management method, and task management program
WO2010001736A1 (en) * 2008-07-04 2010-01-07 日本電気株式会社 Multiprocessor system, multithread processing method, and program
JP5347451B2 (en) * 2008-11-26 2013-11-20 富士通株式会社 Multiprocessor system, conflict avoidance program, and conflict avoidance method
JP4691153B2 (en) * 2008-12-10 2011-06-01 富士通株式会社 Multi-core processor, control method, and information processing apparatus
JP5365201B2 (en) * 2009-01-07 2013-12-11 日本電気株式会社 Process execution control system, process execution control method, and process execution control program
JP5614699B2 (en) * 2009-04-07 2014-10-29 日本電気株式会社 Task assignment related method for multi-core system, apparatus thereof, system thereof, and program thereof
JP5655403B2 (en) * 2010-07-13 2015-01-21 富士通株式会社 Multi-core processor system, schedule management program, and computer-readable recording medium recording the program
JP2012164050A (en) * 2011-02-04 2012-08-30 Canon Inc Information processing device, task management method and program
JP6309216B2 (en) * 2013-07-19 2018-04-11 サイプレス セミコンダクター コーポレーション Processor system and semiconductor integrated circuit
JP6445876B2 (en) * 2015-01-26 2018-12-26 日本電信電話株式会社 Resource allocation device, resource allocation system, and resource allocation method
JP7188472B2 (en) * 2021-02-03 2022-12-13 日本電気株式会社 Computer, scheduling method and program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002063148A (en) * 2000-07-13 2002-02-28 Internatl Business Mach Corp <Ibm> Multiple processor system
JP2002055966A (en) * 2000-08-04 2002-02-20 Internatl Business Mach Corp <Ibm> Multiprocessor system, processor module used for multiprocessor system, and method for allocating task in multiprocessing
JP2004220608A (en) * 2003-01-16 2004-08-05 Internatl Business Mach Corp <Ibm> Dynamic allocation of computer resource based on thread type

Also Published As

Publication number Publication date
JPH03113563A (en) 1991-05-14

Similar Documents

Publication Publication Date Title
JP2769367B2 (en) Multiprocessor scheduling method
US8209690B2 (en) System and method for thread handling in multithreaded parallel computing of nested threads
US7281075B2 (en) Virtualization of a global interrupt queue
US7143412B2 (en) Method and apparatus for optimizing performance in a multi-processing system
US5333319A (en) Virtual storage data processor with enhanced dispatching priority allocation of CPU resources
US7290261B2 (en) Method and logical apparatus for rename register reallocation in a simultaneous multi-threaded (SMT) processor
CA2522096C (en) Concurrent access of shared resources
US6587938B1 (en) Method, system and program products for managing central processing unit resources of a computing environment
US9201689B2 (en) Software emulation of massive hardware threading for tolerating remote memory references
RU2569805C2 (en) Virtual non-uniform memory architecture for virtual machines
US6519660B1 (en) Method, system and program products for determining I/O configuration entropy
US8239524B2 (en) Techniques for dynamically assigning jobs to processors in a cluster based on processor workload
US20070204268A1 (en) Methods and systems for scheduling processes in a multi-core processor environment
US20110010503A1 (en) Cache memory
US20140059554A1 (en) Process grouping for improved cache and memory affinity
US8112750B2 (en) Computer system
US20050210472A1 (en) Method and data processing system for per-chip thread queuing in a multi-processor system
EP1963963A2 (en) Methods and apparatus for multi-core processing with dedicated thread management
KR20090080753A (en) Method and apparatus for migrating task in multi-processor system
JP2015504541A (en) Method, program, and computing system for dynamically optimizing memory access in a multiprocessor computing system
JP2004234123A (en) Multithread computer
Chiang et al. Kernel mechanisms with dynamic task-aware scheduling to reduce resource contention in NUMA multi-core systems
JPH06243112A (en) Multiprocessor device
CA2170468A1 (en) Multi-processor system with virtually addressable communication registers and controlling method thereof
JP3019317B2 (en) Process scheduling method

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080410

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090410

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees