JPH03113563A - Multiprocessor scheduling method - Google Patents

Multiprocessor scheduling method

Info

Publication number
JPH03113563A
JPH03113563A JP1250532A JP25053289A JPH03113563A JP H03113563 A JPH03113563 A JP H03113563A JP 1250532 A JP1250532 A JP 1250532A JP 25053289 A JP25053289 A JP 25053289A JP H03113563 A JPH03113563 A JP H03113563A
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.)
Granted
Application number
JP1250532A
Other languages
Japanese (ja)
Other versions
JP2769367B2 (en
Inventor
Tadashi Kamiwaki
正 上脇
Shinichiro Yamaguchi
伸一朗 山口
Masahiko Saito
雅彦 齊藤
Yoshiki Kobayashi
芳樹 小林
Tomoaki Nakamura
智明 中村
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)

Abstract

PURPOSE:To improve the performance of cache memory and to reduce the load of a bus by controlling the processes turned into groups and carrying out the processes in the same group via the same processor. CONSTITUTION:When the processes having a large quantity of shared data are carried out by different processors 13-1 - 13-3, the communication is frequently produced to secure the coincidence of caches. As a result, the cache performance is deteriorated. In this respect, such processes 12-1 - 12-8 are turned into the groups 15-1 - 15-3 and carried out by the same processors 13-1 - 13-3. Thus no communication is required for coincidence of caches. Then the groups are carried out by a specific one of processors 13-1 - 13-3 and therefore the processes which are left unexecuted for a fixed time or longer can be carried out by any of processors 13-1 - 13-3 so that the load is not biased among the processors 13-1 - 13-3. As a result, the performance of a cache memory is improved and the load can be scattered.

Description

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

[従来の技術] 複数のマイクロプロセッサを使用したマルチマーδ− イクロプロセッサの開発が盛んである。特開昭56−1
27261号、マルチプロセッサシステムはこの一例で
あり、複数のプロセッサがパスにより結合されたシステ
ム構成を示している。マルチプロセッサ用オペレーティ
ングシステムについても盛んに開発が行なわれている。
[Prior Art] Multimer δ-microprocessors using multiple microprocessors are being actively developed. Japanese Patent Publication No. 56-1
No. 27261, a multiprocessor system, is an example of this, and shows a system configuration in which a plurality of processors are connected by paths. Operating systems for multiprocessors are also being actively developed.

マルチプロセッサ用オペレーティングシステムにおいて
はシングルプロセッサシステムとは異なり、複数のプロ
セスが異なるプロセッサ上で同時に実行できるようにす
る必要があり、このために、プロセスをどのプロセッサ
に割り当てるかを決定する方策を持つ必要がある。この
場合、最も一般的に行なわれているのはプロセッサの利
用効率を最大限にするために、負荷の最も少ないプロセ
ッサに割り当てるという方策である。この方策は一般的
に実現が容易であるため、広く採用されている。という
のも、個々のプロセッサ上で動作するオペレーティング
システムのプロセススケジューラがそれぞれシングルプ
ロセッサシステムの場合と同様に次に実行すべきプロセ
スをプロセスの優先順位に従って選択すればよいからで
ある。負荷の重いプロセッサではプロセスの実行時間が
長く、プロセススケジューラが起動される頻度は低い。
Unlike single-processor systems, multiprocessor operating systems need to be able to run multiple processes on different processors at the same time, and therefore need to have a way to decide which processor to assign a process to. There is. In this case, the most common strategy is to allocate the processor to the processor with the least load in order to maximize processor utilization efficiency. This strategy is generally easy to implement and is therefore widely adopted. This is because the process scheduler of the operating system running on each processor can select the next process to be executed in accordance with the priority of the process, as in the case of a single processor system. On a heavily loaded processor, the process takes a long time to execute, and the process scheduler is activated less frequently.

逆に負荷の軽いプロセッサでは処理すべきプロセスを持
たないアイドル状態になるタイミングが多く、したがっ
てアイドル状態に移行すべきかどうかを判定するプロセ
ススケジューラの起動タイミングも多い。このため、負
荷の軽いプロセッサにはより多くのプロセススケジュー
リングの機会が与えられ、プロセッサ間での負荷は自動
的に均等になるように推移するのである。以上の方策は
機能が同じ均質なマルチプロセッサシステムにおいては
合理性のあるプロセスの割り当て方策である。
Conversely, a processor with a light load often enters an idle state with no processes to process, and therefore there are many times when the process scheduler is activated to determine whether to transition to an idle state. Therefore, processors with light loads are given more opportunities for process scheduling, and the loads among the processors are automatically balanced. The above strategy is a reasonable process allocation strategy in a homogeneous multiprocessor system with the same functions.

また、プロセスをグループとして管理して、スケジュー
リングする方法について、[エクスペアリンス・ユーズ
イング・マルチ−プロセッサ・システムズームスティタ
ス・レポートJ  (” E xper−ience 
 Using  Multi−processor  
Systems −A  5tatus  Repor
t”) (ACM  ComputingSurvey
sy 12巻2号p 121〜165.1980)にグ
ルー11〜 プスケジューリング(group schedulin
g)として記されている。これは、並列処理可能なプロ
セスをグループとして、スケジューリングするときには
これらのプロセスをできるかぎり同時に異なるプロセッ
サで実行するようにする。
Also, for information on how to manage and schedule processes as a group, see the Experimental Using Multiprocessor Systems Zoom Status Report J.
Using Multi-processor
Systems-A 5tatus Report
(ACM Computing Survey
sy Vol. 12, No. 2, p. 121-165.1980)
g). This allows processes that can be processed in parallel to be grouped and scheduled to be executed simultaneously on different processors as much as possible.

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

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

共有バス、共有メモリを使ったマルチプロセッサでは、
バスの負荷を軽くするため、各プロセッサがキャッシュ
メモリを持つ。この様なシステムでは、キャッシュ間で
データの一貫性を保証するために一つのプロセッサがキ
ャッシュ上のデータを更新すると、それと同じデータを
持っているキャッシュに更新した結果を転送する。お互
いに多くのデータを共有しているプロセスを異なるプロ
セッサで実行するとキャッシュ間のデータ転送の回数が
増大し、キャッシュの性能が発揮されず。
In a multiprocessor using a shared bus and shared memory,
Each processor has a cache memory to reduce the load on the bus. In such a system, in order to ensure data consistency between caches, when one processor updates data on the cache, the updated result is transferred to the cache that has the same data. If processes that share a lot of data are executed on different processors, the number of data transfers between caches will increase, and the performance of the cache will not be maximized.

バスの負荷が高くなってしまう:従来のマルチプロセッ
サシステムでは、必ずしもこの問題点に関して十分な配
慮がなされていなかった。
Increased bus load: In conventional multiprocessor systems, sufficient consideration has not always been given to this problem.

また、シングルプロセッサ用に開発された既存のソフト
ウェアは、マルチプロセッサシステム上においても何等
変更を加えずに実行させることが望ましい。マルチプロ
グラミング環境では、周知のように、複数のプロセスの
競合が発生しうる。
Furthermore, it is desirable that existing software developed for a single processor be executed on a multiprocessor system without any changes. In a multiprogramming environment, contention among multiple processes can occur, as is well known.

この問題を解決するため1通常、共有データにアクセス
する際にセマフォアメカニズム等により排他制御を行な
う必要があるが、セマフォアメカニズムの処理オーバヘ
ッドが問題となり、プロセスのプライオリティを同一に
したり、セマフォアメカニズムよりも処理時間の短いプ
ロセッサ割り込みマスクを上げて割り込み禁止にする等
の手段を講じる場合が多い。これらの手段は、プロセッ
サ1台上でミクロに見ればプロセッサ上の処理は必ず逐
次的に行なわれるという事実を利用している。
To solve this problem, 1. Normally, 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 it is necessary to In many cases, measures are taken to disable interrupts by raising the processor interrupt mask, which has a shorter processing time than the above mechanism. These means utilize the fact that when viewed microscopically on a single processor, processing on the processor is always performed sequentially.

現実には、共有データに対する排他制御を性能上の理由
により行なっていないソフトウェアも多い。
In reality, there are many software programs that do not perform exclusive control over shared data for performance reasons.

このため既存のソフトウェアをその侭マルチプロセッサ
システムで実行させた場合、必ずしも正常な動作は補償
されないという問題があった。
For this reason, there is a problem in that when existing software is executed on a multiprocessor system, normal operation is not necessarily guaranteed.

従来のgroup schedulingは、グループ
となってルするプロセッサを異なるプロセッサで動作さ
せているため、並列処理には適しているが、上記のよう
な問題には対応できなかった。
Conventional group scheduling is suitable for parallel processing because it operates a group of processors on different processors, but it cannot deal with the problems described above.

尚、本願に関係する先願は、同一出願人になる特願平1
〜60092号「マルチプロセッサ用オペレーティング
システム」がある。この先願はプロセス管理テーブルを
持ち、このテーブルにプロセス占有プロセッサ割を記録
しておき、他プロセツサ支配下のプロセスを一定条件の
もとに横取りして自己の管理において処理を行なわせる
こととしている。この先願には、前回使用プロセッサの
記録やグループ毎のプロセス管理の記載はない。
The earlier application related to this application is a patent application filed by the same applicant.
~60092 "Operating System for Multiprocessors". This prior application has a process management table in which the processor share occupied by a process is recorded, and processes under the control of other processors are intercepted under certain conditions and made to perform processing under its own management. In this prior application, there is no record of the last used processor or description of process management for each group.

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

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

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

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

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

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

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

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

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

本発明の他のプロセススケジューリング方法として、複
数のプロセッサを具備し、該複数のプロセッサが、単一
のオペレーティングシステムによって制御されるマルチ
プロセッサシステムにおいて、実行しているプロセスを
切り替える必要が生じたプロセッサが、プロセスを管理
するプロセス管理テーブルに従い、上記オペレーティン
グシステムのプロセススケジューラを実行し、該プロセ
ッサが次に実行するプロセスを決定するプロセススケ−
ジューリング方式であって、上記プロセス管理テーブル
に重複を許すグループ識別子を記述し、該グループ識別
子が同一な該プロセスの情報を記憶するグループ管理テ
ーブルを設け、該グループ管理テーブルにグループ内の
プロセスを実行するプロセッサを指示するプロセッサ割
り当て情報を記述し、上記プロセススケジューラは、実
行可能プロセスの中から、上記プロセス管理テーブルの
グループ識別子が指示する、該グループ管理テーブルの
プロセッサ割り当て情報が該プロセススケジューラを実
行しているプロセッサを指示しているプロセスを次に実
行するようにしてもよい。
As another process scheduling method of the present invention, in a multiprocessor system that includes a plurality of processors and is controlled by a single operating system, a processor that needs to switch the process being executed , a process scheduler that executes the process scheduler of the operating system according to a process management table that manages processes, and determines the process that the processor will execute next.
The scheduling method describes group identifiers that allow duplication in the process management table, provides a group management table that stores information on processes with the same group identifier, and stores processes within the group in the group management table. Processor allocation information instructing a processor to execute is written, and the process scheduler executes the process according to the processor allocation information in the group management table, which is specified by the group identifier in the process management table, from among executable processes. The process indicated by the currently running processor may be executed next.

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

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

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

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

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

本発明の他のプロセススケジューリング方式として、複
数のプロセッサを具備し、該複数のプロセッサが、単一
のオペレーティングシステムによって制御されるマルチ
プロセッサシステムにおいて、プロセスを管理するプロ
セス管理テーブルに従い、上記オペレーティングシステ
ムのプロセススケジューラが、プロセスに何れかのプロ
セッサzO− を割り当てるプロセススケジューリング方式であって、
上記プロセス管理テーブルに上記複数のプロセッサ各々
に対する優先度と重複を許すグループ識別子を記述し、
該グループ識別子が同一な該プロセスの情報を記憶する
グループ管理テーブルを設け、該グループ管理テーブル
にグループ内のプロセスを実行するプロセッサを指示す
るプロセッサ割り当て情報を設け、上記プロセス管理テ
ーブルのグループ識別子が示すグループ管理テーブル中
のプロセッサ割り当て情報が指示するプロセッサに対応
する該優先度を高く設定するようにしてもよい。
As another process scheduling method of the present invention, in a multi-processor system including a plurality of processors, the plurality of processors are controlled by a single operating system. A process scheduling method in which a process scheduler assigns any processor zO- to a process,
Describe the priority and group identifiers that allow duplication for each of the plurality of processors in the process management table,
A group management table is provided for storing information on the processes having the same group identifier, and processor allocation information for instructing a processor to execute a process in the group is provided in the group management table, and the group identifier of the process management table indicates The priority level corresponding to the processor indicated by the processor allocation information in the group management table may be set high.

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

共有データを多く持つプロセスが異なるプロセッサで実
行されると、キャッシュ一致化のための通信が頻繁に発
生しキャッシュ性能を低下させる。
When processes that have a lot of shared data are executed by different processors, communication for cache matching occurs frequently, reducing cache performance.

本発明では、そのようなプロセスをグループ化し、同一
のプロセッサで実行できるので、キャッシュ一致化のた
めの通信が不要となり、性能を向上させることができる
。さらに、グループを特定のプロセッサに実行させるこ
とによりプロセッサ間の負荷が片寄ることがないように
、一定時間以上実行されずに放置されているプロセスに
ついては、いずれのプロセッサでも実行できるようにし
ており、負荷分散が可能となっている。ただし、この機
能はプロセス固定フラグを立てることにより禁止するこ
ともできる。
In the present invention, such processes can be grouped and executed by the same processor, thereby eliminating the need for communication for cache matching and improving performance. Furthermore, in order to prevent the load from becoming unbalanced among processors by having a group executed by a specific processor, processes that have not been executed for a certain period of time can be executed by any processor. Load balancing is possible. However, this feature can also be disabled by setting a process fixation flag.

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

[実施例] 以下、本発明の一実施例を第1図を用いて説明する。第
1図において、13−1〜13−2はプロセッサ、12
−1〜12−8はプロセス、15−1〜15−3はグル
ープである。
[Example] An example of the present invention will be described below with reference to FIG. In FIG. 1, 13-1 to 13-2 are processors, 12
-1 to 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 process processes 12-1 to 13-3.
Execute while switching 12-8. Process 12-1
~12-3 is the process 12-3 as the group 15-1.
4 and 12-5 as group 15-2, process 12
-6 to 12-8 are grouped together as group 15-3. Instructions on how to group processes are provided by the user, but may also be provided automatically by the compiler or operating system.

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

本発明によるシステム構成を第2図に示す。第2図にお
いて、13−1〜13−3はプロセッサ、11〜1〜1
1〜3はプロセッサ番号、12−1〜12−6はプロセ
ス、14−1はタイマー、4は接続バス、5は共有メモ
リ、31はOSプログラム、311はスケジューラ、3
2−1〜32−4はプロセス管理テーブル、321〜1
〜321〜4はプロセッサ識別子、322−1〜322
−4は優先度、323−1〜323−4は実行待ち時間
、324−1〜324−4はカウンタ。
FIG. 2 shows a system configuration according to the present invention. In FIG. 2, 13-1 to 13-3 are processors, 11-1 to 1
1 to 3 are processor numbers, 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, 3
2-1 to 32-4 are process management tables, 321 to 1
~321~4 are processor identifiers, 322-1~322
-4 is the priority, 323-1 to 323-4 are execution waiting times, and 324-1 to 324-4 are counters.

325−1〜325−4はプロセス固定フラグ、326
−1〜326−4はグループ識別子、33−1〜33−
2はグループ管理テーブル、331〜1〜331〜2は
プロセッサ識別子、332−1〜332−2は実行待ち
時間、333−1〜333−2はカウンタ、334−1
〜334−2はグループ固定フラグである。
325-1 to 325-4 are process fixed flags, 326
-1 to 326-4 are group identifiers, 33-1 to 33-
2 is a group management table, 331-1 to 331-2 are processor identifiers, 332-1 to 332-2 are execution waiting times, 333-1 to 333-2 are counters, 334-1
~334-2 is a group fixed flag.

プロセッサ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 and to the shared memory 5 by a connection bus 4. Each processor has a processor number 11-1-11-3, respectively. In this embodiment, processors 13-1 to 13
-3 have processor numbers "1", "2", and "3", respectively. In this embodiment, the processor number is set using a hardware switch, but other methods include storing it in advance in a hardware ROM, or setting it using a program at startup.

プロセッサ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 that processor at regular intervals.

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

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

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

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

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

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

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

グループ管理テーブルには、以下の情報が記されている
。まず、第1にプロセッサ識別子である。
The group management table contains the following information. First, there is the processor identifier.

これは、そのグループに属するプロセスを実行す−Z’
/ − るプロセッサ番号が記されている。
This runs processes belonging to that group -Z'
/ - The processor number is written.

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

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

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

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

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

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

その値が正の値だったならば、スケジューラプログラム
311を実行しているプロセッサは、自分のプロセッサ
番号を11 (11〜1〜1l−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 to 1 to 1l-3) and combines it with the value of the positive processor identifier 331. Compare (311
~5), if they do not match, select the process with the next highest priority (311-1); if they match, assign the selected process to your processor (311-1);
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 the own processor number (11) (311-4), and the selected process is assigned to the own processor (311-6).
).

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

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

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

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

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

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

超えていない場合には、プロセス管理テーブル32中の
グループ識別子326よりグループ管理亨−ブルを検索
し、その中のプロセッサ識別子が自分のプロセッサ番号
と等しいか調べる(311〜10)。
If the number has not been exceeded, a group management variable is searched from the group identifier 326 in the process management table 32, and a check is made to see if the processor identifier therein is equal to the own processor number (311-10).

等しい場合には、やはり、311〜14を実行する。If they are equal, steps 311 to 14 are executed again.

等しくない場合には、グループ管理テーブル33中のグ
ループ固定フラグ334を調べる(311〜11)。
If they are not equal, the group fixed 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 exceeds a threshold value. If the priority has not been exceeded, the process with the next highest priority is checked (311-1).

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

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

まず、実行待ち状態となっているプロセスの中から、優
先順位に従い、次に実行するプロセスを選択する(31
1〜1)。選択したプロセスのプロセス管理テーブル3
2より、プロセッサ識別子321を読みだし、自分のプ
ロセッサ番号11と比較する(311〜7)、その値が
等しかったときには、選択したプロセスを自プロセッサ
に割り当てる(311〜6)。
First, from among the processes waiting to be executed, the process to be executed next is selected according to the priority order (31
1-1). Process management table 3 of selected process
2, the processor identifier 321 is read out 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 they are not equal, it is determined whether the process fixed flag 325 is set (311-8). If it is, 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 reselected (311-18). 1).

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

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

超えていない場合には、プロセス管理テーブル32中の
グループ識別子326よりプループ管理テーブルを検索
し、その中のプロセッサ識別子が自分のプロセッサ番号
と等しいか調べる(311〜10)。
If the number has not been exceeded, the group identifier 326 in the process management table 32 is searched for in the proof management table, and a check is made to see if the processor identifier therein is equal to the own processor number (311-10).

等しい場合には、やはり、311〜14を実行する。If they are equal, steps 311 to 14 are executed again.

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

フラグが立っているときには、311〜17を実行する
When the flag is set, steps 311 to 17 are executed.

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

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

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

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

次に選択したプロセスのプロセス管理テーブル32の実
行待ち時間323をOにする(312−2)。
Next, the execution waiting time 323 of the process management table 32 of the selected process is set to O (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. The counter 333 of the group management table is 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 values of the registers saved when the process was interrupted last time are restored (312-7). Since the saved registers include the program counter, the process is restarted from the place where it was interrupted last time.

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

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

次にグループ管理テーブル33を全部調べていき、実行
中のプロセスを含まず、実行待ちのプロセスを含むグル
ープの待ち時間333をインクリメントする(313−
2)。
Next, the entire group management table 33 is examined, and the waiting time 333 of the group that does not include any running processes but includes processes 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〜32
7−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. 2 is shown in FIG. In FIG. 8, 13-1 to 13-3 are processors, 11-1 to 11-3 are processor numbers, and 12-1
~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 are processor identifiers,
325-1 to 325-4 are process fixed flags, 326
-1 to 326-4 are group identifiers, 327-1 to 32
7-4 is 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~331'-2 are processor identifiers, 334-1~
334-4 is a group fixed flag.

プロセッサ13−1〜13−3は、接続バス4により相
互に、ならびに共有メモリ5に接続されている。各プロ
セッサはプロセッサ番号11〜1〜11〜3をそれぞれ
持っている。本実施例では、プロセラf13−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 a processor number 11-1-11-3, respectively. In this example, Procera f13-1 to 13
-3 have processor numbers "1", "2", and "3", respectively.

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

実施例では10m5おきと18おきの2種類の割り込み
が入る。
In the embodiment, two types of interrupts are generated: every 10 m5 and every 18 m.

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

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

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

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

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

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

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

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

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

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

第11図の316はタイマー14−2が発生させるls
ごとの割り込みの処理ルーチンである。ここでは、各プ
ロセス管理テーブル32の優先度328〜330を再計
算している。316−1で各プロセスについて処理を行
なっており、316−3で各プロセッサについて処理を
行なっている。316−2では、CPU時間327が大
きくなり過ぎないように1秒毎に1/4にしている。
316 in FIG. 11 is the ls generated by the timer 14-2.
This is the interrupt processing routine for each. Here, the priorities 328 to 330 of each process management table 32 are recalculated. 316-1 processes each process, and 316-3 processes each processor. In 316-2, the CPU time 327 is set to 1/4 every second to prevent it from becoming 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 the priority is the processor identifier 321 of the process management table 32.
Add 20 to the priorities of processors not listed in . Also, the priority of the processor that is not written in the processor identifier of the group management table 33 is still 20.
Add.

これにより、プロセス管理テーブルやグループ40− 管理テーブルのプロセッサ識別子に書かれているプロセ
ッサに対してはそのプロセスの優先度が高くなり、実行
されやすくなる。
As a result, the priority of the process becomes higher for the processor written in the processor identifier of the process management table or the group 40-management table, and the process is more likely to be 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 on a multiprocessor using a conventional scheduling method. In FIG. 12, 12-
1 to 12-2 are processes, 41 to 1 to 41 to 2 are interrupt disabling processes, 42-1 to 42-2 are resource usage processes, 43
-1 to 43-2 are interrupt permission processing.

シングルプロセッサは、−瞬一瞬を見ると実行している
プロセスは一つである。よって、シングルプロセッサで
実行することを前提としたプログラムは、共有資源を使
用する場合にも、単に割り込みを禁止するだけで使用し
ているものが多い。
A single processor has only one process running at any moment. Therefore, many programs that are intended to be executed on a single processor simply disable interrupts even when using shared resources.

これは、資源をロックして使用するより処理が高速なた
めである。シングルプロセッサでは割り込みさえ禁止し
ておけば、瞬間的には実行されているプロセスは一つな
ので資源を同時に複数のプロセスが使用するようなこと
はない。
This is because processing is faster than locking and using resources. With a single processor, if you disable interrupts, only one process is running at the moment, so resources are not used by multiple processes at the same time.

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

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

尚、近年、個々にプログラムとデータを持つ従来のプロ
セスに代わって、いくつか毎にプログラムやデータを共
有するスレッド(thread)やライト・ウェイト・
プロセス(light weight process
)が注目されている。
In addition, in recent years, instead of the traditional process that has individual programs and data, threads and lightweight processes that share programs and data have been introduced.
light weight process
) is attracting attention.

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

またプログラム、データを共有するスレッドを43− グループ化して、1つのプロセッサで実行すると、プロ
グラム、データの切り替えがいらないことが多くなり、
O8の処理時間を短くすることができる。
Furthermore, if threads that share programs and data are grouped together and executed on a single processor, there is often no need to switch between programs and data.
The O8 processing time can be shortened.

従って、本発明は、かかるスレッドやライト・ウェイト
・プロセスに対して適用しても効果大である。
Therefore, the present invention is highly effective even when applied to such threads and lightweight processes.

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

共有データを多く持つプロセスが異なるプロセッサで実
行されると、キャッシュ−数比のための通信が頻繁に発
生しキャッシュ性能を低下させる。
When processes with a large amount of shared data are executed by different processors, communication for cache number ratio occurs frequently, reducing cache performance.

本発明では、そのようなプロセスをグループ化し、同一
のプロセッサで実行できるので、キャッシュ44− 一致化のための通信が不要となり、性能を向上させるこ
とができる。さらに、グループを特定のプロセッサに実
行させることによりプロセッサ間の負荷が片寄ることが
ないように、一定時間以上実行されずに放置されている
プロセスについては、いずれのプロセッサでも実行でき
るようにしており、負荷分散が可能となっている。ただ
し、この機能はプロセス固定フラグを立てることにより
禁止することもできる。
In the present invention, since such processes can be grouped and executed by the same processor, communication for cache 44-coherence is not necessary, and performance can be improved. Furthermore, in order to prevent the load from becoming unbalanced among processors by having a group executed by a specific processor, processes that have not been executed for a certain period of time can be executed by any processor. Load balancing is possible. However, this feature can also be disabled by setting a process fixation flag.

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

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

第1図は本発明の一実施例のプロセススケジューリング
の概要図、第2図はシステム構成図、第3図はスケジュ
ーラのアルゴリズム図、第4図はスケジューラアルゴリ
ズムの別の実施例図、第5図もスケジューラのアルゴリ
ズムの別の実施例図、第6図は選択したプロセスを自分
のプロセッサに割り当てるアルゴリズム図、第7図はタ
イマー割り込みの処理ルーチン図、第8図はシステム構
成の別の実施例図、第9図はスケジューラのアルゴリズ
ム図、第10図は10醜S毎のタイマー割り込みの処理
ルーチン図、第11図は1秒毎のタイマー割り込みの処
理ルーチン図、第12図は従来のスケジューリング方式
でシングルプロセッサ用のプログラムを実行した場合の
説明図、第13図は本発明のスケジューリング方法でシ
ングルプロセッサ用のプログラムを実行した場合の説明
図である。 4・・・接続ハス、5・・・共有メモリ、11・・・プ
ロセッサ番号、12・・・プロセス、13・・・プロセ
ッサ、14・・・タイマー、15・・・グループ、31
・・・OSプログラム、32・・・プロセス管理テーブ
ル、33・・・グループ管理テーブル、311・・・ス
ケジューラ、321・・・プロセッサ識別子、322・
・・優先度、323・・・実行待ち時間、324・・・
カウンタ、325・・・プロセッサ固定フラグ、326
・・・グループ識別子、327・・・CPU時間、32
8〜330・・・優先度、331・・・プロセッサ識別
子、332・・・実行待ち時間。 333・・・カウンタ、334・・・グループ固定フラ
グ、41・・・割り込み禁止処理、42・・・資源使用
処理、43・・・割り込み許可処理。
Fig. 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 a diagram of the scheduler algorithm, Fig. 4 is a diagram of another embodiment of the scheduler algorithm, and Fig. 5 Figure 6 is a diagram of an algorithm for assigning a selected process to its own processor; Figure 7 is a diagram of a timer interrupt processing routine; Figure 8 is a diagram of another embodiment of the system configuration. , Figure 9 is an algorithm diagram of the scheduler, Figure 10 is a diagram of a processing routine for timer interrupts every 10 seconds, Figure 11 is a diagram of a processing routine for timer interrupts every second, and Figure 12 is a diagram of the conventional scheduling method. FIG. 13 is an explanatory diagram when a program for a single processor is executed using the scheduling method of the present invention. 4... Connection lot, 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, 311... Scheduler, 321... Processor identifier, 322...
...Priority, 323...Execution waiting time, 324...
Counter, 325... Processor fixed flag, 326
... Group identifier, 327 ... CPU time, 32
8-330...Priority, 331...Processor identifier, 332...Execution waiting time. 333...Counter, 334...Group fixed flag, 41...Interrupt prohibition processing, 42...Resource use processing, 43...Interrupt enable processing.

Claims (1)

【特許請求の範囲】 1、複数のプロセッサを具備し、該複数のプロセッサが
、単一のオペレーティングシステムによって制御される
マルチプロセッサシステムにおいて、プロセスを管理す
るプロセス管理テーブルに従い、上記オペレーティング
システムのプロセススケジューラが、プロセスに何れか
のプロセッサを割り当てるプロセススケジユーリング方
式であって、上記プロセス管理テーブルに重複を許すグ
ループ識別子を記述し、該グループ識別子が同一な該プ
ロセスの情報を記憶するグループ管理テーブルを設け、
該グループ管理テーブルにグループ内のプロセスを実行
するプロセッサを指示するプロセッサ割り当て情報を記
述し、上記プロセススケジューラは、次に実行すべく選
択したプロセスについて、上記プロセス管理テーブルを
参照して、当該プロセスのグループを判別し、該グルー
プのグループ管理テーブルのプロセッサ割り当て情報に
より指定されたプロセッサ上で該プロセスを動作させる
ことにより、同一のグループに属するプロセスは、同一
のプロセッサで実行することを特徴とするマルチプロセ
ッサスケジューリング方法。 2、上記プロセス管理テーブルに該プロセスの実行待ち
時間を記憶し、上記プロセススケジューラが次に実行す
べく選択したプロセスについて、上記プロセス管理テー
ブルを参照して、実行待ち時間がある値以上の時には、
任意のプロセッサで動作させ、該実行待ち時間がある値
以下の時には、該プロセス管理テーブルを参照して、当
該プロセスのグループを判別し、該グループのグループ
管理テーブルのプロセッサ割り当て情報により指定され
たプロセッサ上で該プロセスを動作させることを特徴と
する請求項1のマルチプロセッサスケジューリング方法
。 3、上記グループ管理テーブルに該グループの何れのプ
ロセスも実行されていない時間、即ちグループ実行待ち
時間を記憶し、上記プロセススケジューラが、次に実行
すべく選択したプロセスについて、上記プロセス管理テ
ーブルを参照して、当該プロセスのグループを判別し、
該グループのグループ管理テーブルのグループ実行待ち
時間がある値以上の時には、該グループ管理テーブルの
プロセッサ割り当て情報を変更できるようにしたことを
特徴とするマルチプロセッサスケジューリング方法。 4、上記プロセス管理テーブルに該プロセスの実行待ち
時間と該プロセスが前回実行されたプロセッサの識別子
を記憶し、上記プロセススケジューラが、次に実行すべ
く選択したプロセスについて、上記プロセス管理テーブ
ルを参照して、該待ち時間がある値以下の時には、該プ
ロセスを前回実行したプロセッサか、グループ管理テー
ブルのプロセッサ割り当て情報が指示するプロセッサで
実行し、ある値以上の時には、上記以外のプロセッサで
動作できるようにしたことを特徴とする請求項1又は2
のマルチプロセッサスケジューリング方法。 5、該プロセスの実行待ち時間の代わりに該プロセスの
プロセッサへの割り当てが拒絶された同数を用いたこと
を特徴とする請求項2又は3又は4のマルチプロセッサ
スケジューリング方法。 6、該グループの何れのプロセスも実行されていない時
間、即ちグループ実行待ち時間の代わりに該プロセスの
プロセッサへの割り当てが拒絶された回数を用いたこと
を特徴する請求項3又は5のマルチプロセッサスケジュ
ーリング方法。 7、複数のプロセッサを具備し、該複数のプロセッサが
、単一のオペレーティングシステムによって制御される
マルチプロセッサシステムにおいて、実行しているプロ
セスを切り替える必要が生じたプロセッサが、プロセス
を管理するプロセス管理テーブルに従い、上記オペレー
ティングシステムのプロセススケジューラを実行し、該
プロセッサが次に実行するプロセスを決定するプロセス
スケージューリング方式であって、上記プロセス管理テ
ーブルに重複を許すグループ識別子を記述し、該グルー
プ識別子が同一な該プロセスの情報を記憶するグループ
管理テーブルを設け、該グループ管理テーブルにグルー
プ内のプロセスを実行するプロセッサを指示するプロセ
ッサ割り当て情報を記述し、上記プロセススケジューラ
は、実行可能プロセスの中から、上記プロセス管理テー
ブルのグループ識別子が指示する、該グループ管理テー
ブルのプロセッサ割り当て情報が該プロセススケジュー
ラを実行しているプロセッサを指示しているプロセスを
次に実行することを特徴とするマルチプロセッサスケジ
ューリング方法。 8、上記プロセス管理テーブルに該プロセスの実行待ち
時間を記憶し、上記プロセススケジューラが、次に実行
するプロセスを選択する際に上記プロセス管理テーブル
を参照して、実行待ち時間がある値以上の時には、該プ
ロセスを実行可能とすることを特徴とする請求項7のマ
ルチプロセッサスケジューリング方法。 9、上記グループ管理テーブルに該グループの何れのプ
ロセスも実行されていない時間、即ちグループ実行待ち
時間を記憶し、上記プロセススケジューラが、次に実行
するプロセスを選択する際に、上記プロセス管理テーブ
ルを参照して、当該プロセスのグループを判別し、該グ
ループのグループ管理テーブルのグループ実行待ち時間
がある値以上の時には、該グループ管理テーブルのプロ
セッサ割り当て情報を変更して、該プロセスを実行可能
とすることを特徴とする請求項7又は8のマルチプロセ
ッサスケジューリング方法。 10、上記プロセス管理テーブルに該プロセスの実行待
ち時間と該プロセスが前回実行されたプロセッサの識別
子を記憶し、上記プロセススケジューラが、次に実行す
るプロセスを選択する際に、上記プロセス管理テーブル
を参照して、該待ち時間がある値以下の時には、該プロ
セスを前回実行したプロセッサか、グループ管理テーブ
ルのプロセッサ割り当て情報が指示するプロセッサが該
プロセススケジューラを実行しているプロセッサと同一
である場合にのみ実行可能とし、該待ち時間がある値以
上の時には、実行可能とすることを特徴とする請求項7
のマルチプロセッサスケジューリング方法。 11、該プロセスの実行待ち時間の代わりに該プロセス
のプロセッサへの割り当てが拒絶された回数を用いたこ
とを特徴とする請求項8又は9又は10のマルチプロセ
ッサスケジューリング方法。 12、該グループの何れのプロセスも実行されていない
時間、即ちグルプ実行待ち時間の代わりに該プロセスの
プロセッサへの割り当てが拒絶された回数を用いたこと
を特徴とする請求項3又は6のマルチプロセッサスケジ
ューリング方法。 13、複数のプロセッサを具備し、該複数のプロセッサ
が、単一のオペレーティングシステムによって制御され
るマルチプロセッサシステムにおいて、プロセスを管理
するプロセス管理テーブルに従い、上記オペレーティン
グシステムのプロセススケジューラが、プロセスに何れ
かのプロセッサを割り当てるプロセススケジューリング
方式であって、上記プロセス管理テーブルに上記複数の
プロセッサ各々に対する優先度と重複を許すグループ識
別子を記述し、該グループ識別子が同一な該プロセスの
情報を記憶するグループ管理テーブルを設け、該グルー
プ管理テーブルにグループ内のプロセスを実行するプロ
セッサを指示するプロセッサ割り当て情報を設け、上記
プロセス管理テーブルのグループ識別子が示すグループ
管理テーブル中のプロセッサ割り当て情報が指示するプ
ロセッサに対応する該優先度を高く設定することを特徴
とするマルチプロセッサスケジューリング方法。 14、プロセス割り当て情報のコードの一つとして、該
プロセスが何れのプロセッサでも実行可能であることを
示すコードを設けたことを特徴とする請求項1〜13の
いずれか1つに記載のマルチプロセッサスケジューリン
グ方法。 15、プロセス管理テーブル、グループ管理テーブルの
何れか、または、両方に該プロセスが特定のプロセッサ
でのみ実行可能であることを示すフラグを設けたことを
特徴とする請求項1〜14のいずれか1つに記載のマル
チプロセッサスケジューリング方法。 16、資源を共有するプロセスに対して、同一のグルー
プ識別子を持たせることにより、該資源の排他制御を簡
単化したことを特徴とする請求項1〜15のいずれか1
つに記載のマルチプロセッサスケジューリング方法。
[Scope of Claims] 1. In a multiprocessor system comprising a plurality of processors, the plurality of processors being controlled by a single operating system, a process scheduler of the operating system according to a process management table for managing processes; is a process scheduling method that allocates a processor to a process, in which group identifiers that allow duplication are written in the process management table, and a group management table is created that stores information on processes that have the same group identifier. established,
Processor allocation information that instructs a processor to execute a process in the group is written in the group management table, and the process scheduler refers to the process management table to determine the process for the process selected to be executed next. By determining the group and running the process on the processor specified by the processor allocation information in the group management table of the group, processes belonging to the same group are executed on the same processor. Processor scheduling method. 2. Store the execution waiting time of the process in the process management table, refer to the process management table for the process selected by the process scheduler to execute next, and when the execution waiting time is equal to or greater than a certain value,
When the execution wait time is less than or equal to a certain value when the process is run on an arbitrary processor, the process management table is referred to, the group of the process is determined, and the processor specified by the processor allocation information in the group management table of the group is executed. 2. The multiprocessor scheduling method according to claim 1, further comprising operating said process on a computer. 3. The time during which no process in the group is being executed, that is, the group execution waiting time, is stored in the group management table, and the process scheduler refers to the process management table for the process selected to be executed next. to determine the group of the process,
A multiprocessor scheduling method characterized in that processor allocation information in the group management table can be changed when the group execution waiting time in the group management table for the group is greater than or equal to a certain value. 4. Store the execution waiting time of the process and the identifier of the processor on which the process was last executed in the process management table, 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 process is executed on the processor that executed it last time or on the processor specified by the processor allocation information in the group management table, and when it is more than a certain value, the process is executed on a processor other than the above. Claim 1 or 2 characterized in that
multiprocessor scheduling method. 5. The multiprocessor scheduling method according to claim 2, 3, or 4, characterized in that the same number of times the process is refused to be allocated to a processor is used instead of the execution waiting time of the process. 6. The multiprocessor according to claim 3 or 5, wherein the number of times assignment of the process to a processor is rejected is used instead of the time during which no process in the group is being executed, that is, the group execution waiting time. Scheduling method. 7. A process management table for managing a process when a processor needs to switch the process being executed in a multiprocessor system including a plurality of processors and the plurality of processors are controlled by a single operating system. According to the process scheduling method, a process scheduler of the operating system is executed to determine the next process to be executed by the processor, a group identifier that allows duplication is written in the process management table, and the group identifier is A group management table for storing information on the same processes is provided, processor allocation information for instructing processors to execute processes in the group is written in the group management table, and the process scheduler selects, from among the executable processes, A multiprocessor scheduling method, characterized in that a process indicated by a group identifier in the process management table and for which processor allocation information in the group management table indicates a processor executing the process scheduler is executed next. 8. Store the execution waiting 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, and when the execution waiting time exceeds a certain value, 8. The multiprocessor scheduling method according to claim 7, wherein the process is made executable. 9. The time during which no process in the group is being executed, that is, the group execution waiting time, is stored in the group management table, and the process scheduler uses the process management table when selecting the next process to be executed. The group of the process is determined by referring to it, and when the group execution wait time in the group management table of the group is equal to or greater than a certain value, the processor allocation information of the group management table is changed to enable the process to be executed. The multiprocessor scheduling method according to claim 7 or 8, characterized in that: 10. Store the execution waiting time of the process and the identifier of the processor on which the process was last executed in the process management table, and the process scheduler refers to the process management table when selecting the process to be executed next. Then, when the waiting time is less than a certain value, only if the processor that executed the process last time or the processor indicated by the processor allocation information in the group management table is the same as the processor that is executing the process scheduler. Claim 7: The process is made executable, and when the waiting time exceeds a certain value, the process is made executable.
multiprocessor scheduling method. 11. The multiprocessor scheduling method according to claim 8, 9 or 10, characterized in that the number of times the process has been refused to be assigned to a processor is used instead of the execution waiting time of the process. 12. The multiprocessor according to claim 3 or 6, characterized in that the number of times the process was refused to be assigned to a processor is used instead of the time during which no process in the group is being executed, that is, the group execution waiting time. Processor scheduling method. 13. In a multiprocessor system that includes a plurality of processors and the plurality of processors are controlled by a single operating system, the process scheduler of the operating system determines which process to use according to a process management table that manages processes. A process scheduling method for allocating processors, wherein the process management table describes priorities for each of the plurality of processors and group identifiers that allow duplication, and stores information on processes having the same group identifier. is provided, processor allocation information indicating a processor to execute a process in the group is provided in the group management table, and processor allocation information in the group management table indicated by the group identifier of the process management table corresponds to the processor specified. A multiprocessor scheduling method characterized by setting high priorities. 14. The multiprocessor according to claim 1, further comprising a code indicating that the process can be executed by any processor as one of the codes of the process allocation information. Scheduling method. 15. Any one of claims 1 to 14, wherein either or both of the process management table and the group management table is provided with a flag indicating that the process can be executed only on a specific processor. The multiprocessor scheduling method described in . 16. Any one of claims 1 to 15, characterized in that exclusive control of the resource is simplified by giving the same group identifier to processes that share the resource.
The multiprocessor scheduling method described in .
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 true JPH03113563A (en) 1991-05-14
JP2769367B2 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 (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1015785A (en) * 1996-06-28 1998-01-20 Hitachi Ltd Production planning method and production planning system
US7222343B2 (en) 2003-01-16 2007-05-22 International Business Machines Corporation Dynamic allocation of computer resources based on thread type
US7325148B2 (en) 2003-05-27 2008-01-29 Nec Corporation Power supply management system in parallel processing system by OS for single processors and power supply management program therefor
JP2008139907A (en) * 2006-11-29 2008-06-19 Fujitsu Ltd Job allocation program and job allocation method
US7418703B2 (en) 2002-03-20 2008-08-26 Nec Corporation Parallel processing system by OS for single processor
JP2009020692A (en) * 2007-07-11 2009-01-29 Toshiba Corp Task management device, task management method, and task management program
US7516323B2 (en) 2003-07-18 2009-04-07 Nec Corporation Security management system in parallel processing system by OS for single processors
US7526673B2 (en) 2003-03-31 2009-04-28 Nec Corporation Parallel processing system by OS for single processors and parallel processing program
WO2010001736A1 (en) * 2008-07-04 2010-01-07 日本電気株式会社 Multiprocessor system, multithread processing method, and program
JP2010128664A (en) * 2008-11-26 2010-06-10 Fujitsu Ltd Multiprocessor system, contention avoidance program and contention avoidance method
JP2010140146A (en) * 2008-12-10 2010-06-24 Fujitsu Ltd Multi-core processor, control method thereof, and information processing device
JP2010160597A (en) * 2009-01-07 2010-07-22 Nec Corp System, method and program for controlling process execution
JP2010244332A (en) * 2009-04-07 2010-10-28 Nec Corp Means of task assignment for multi-core system, method of the same, and program of the same
JP2012022451A (en) * 2010-07-13 2012-02-02 Fujitsu Ltd Multi-core processor system, schedule management program and computer-readable storage medium storing the same
JP2012164050A (en) * 2011-02-04 2012-08-30 Canon Inc Information processing device, task management method and program
US8443377B2 (en) 2004-03-17 2013-05-14 Nec Corporation Parallel processing system running an OS for single processors and method thereof
JP2015022556A (en) * 2013-07-19 2015-02-02 スパンション エルエルシー Processor system and semiconductor integrated circuit
JP2016139171A (en) * 2015-01-26 2016-08-04 日本電信電話株式会社 Resource allocation device, resource allocation system and resource allocation method
JP2022118736A (en) * 2021-02-03 2022-08-16 日本電気株式会社 Scheduler, scheduling method, and program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6735769B1 (en) * 2000-07-13 2004-05-11 International Business Machines Corporation Apparatus and method for initial load balancing in a multiple run queue 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

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1015785A (en) * 1996-06-28 1998-01-20 Hitachi Ltd 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
US7222343B2 (en) 2003-01-16 2007-05-22 International Business Machines Corporation Dynamic allocation of computer resources based on thread type
US7526673B2 (en) 2003-03-31 2009-04-28 Nec Corporation Parallel processing system by OS for single processors and parallel processing program
US7325148B2 (en) 2003-05-27 2008-01-29 Nec Corporation Power supply management system in parallel processing system by OS for single processors and power supply management program therefor
US7516323B2 (en) 2003-07-18 2009-04-07 Nec Corporation Security management system in parallel processing system by OS for single processors
US8443377B2 (en) 2004-03-17 2013-05-14 Nec Corporation Parallel processing system running an OS for single processors and method thereof
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
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
JP5510322B2 (en) * 2008-07-04 2014-06-04 日本電気株式会社 Multiprocessor system, multithread processing method, and program
US8615762B2 (en) 2008-07-04 2013-12-24 Nec Corporation Multiprocessor system, multiple threads processing method and program
JP2010128664A (en) * 2008-11-26 2010-06-10 Fujitsu Ltd Multiprocessor system, contention avoidance program and contention avoidance method
JP2010140146A (en) * 2008-12-10 2010-06-24 Fujitsu Ltd Multi-core processor, control method thereof, and information processing device
JP4691153B2 (en) * 2008-12-10 2011-06-01 富士通株式会社 Multi-core processor, control method, and information processing apparatus
JP2010160597A (en) * 2009-01-07 2010-07-22 Nec Corp System, method and program for controlling process execution
JP2010244332A (en) * 2009-04-07 2010-10-28 Nec Corp Means of task assignment for multi-core system, method of the same, and program of the same
JP2012022451A (en) * 2010-07-13 2012-02-02 Fujitsu Ltd Multi-core processor system, schedule management program and computer-readable storage medium storing the same
JP2012164050A (en) * 2011-02-04 2012-08-30 Canon Inc Information processing device, task management method and program
JP2015022556A (en) * 2013-07-19 2015-02-02 スパンション エルエルシー Processor system and semiconductor integrated circuit
JP2016139171A (en) * 2015-01-26 2016-08-04 日本電信電話株式会社 Resource allocation device, resource allocation system and resource allocation method
JP2022118736A (en) * 2021-02-03 2022-08-16 日本電気株式会社 Scheduler, scheduling method, and program

Also Published As

Publication number Publication date
JP2769367B2 (en) 1998-06-25

Similar Documents

Publication Publication Date Title
JPH03113563A (en) Multiprocessor scheduling method
US9086925B2 (en) Methods of processing core selection for applications on manycore processors
US9201689B2 (en) Software emulation of massive hardware threading for tolerating remote memory references
US8316365B2 (en) Computer system
AU701540B2 (en) Operating system for a non-uniform memory access multiprocessor system
US8209690B2 (en) System and method for thread handling in multithreaded parallel computing of nested threads
US8156495B2 (en) Scheduling threads on processors
US6587938B1 (en) Method, system and program products for managing central processing unit resources of a computing environment
US7143412B2 (en) Method and apparatus for optimizing performance in a multi-processing system
US6519660B1 (en) Method, system and program products for determining I/O configuration entropy
US20110010503A1 (en) Cache memory
US20090077550A1 (en) Virtual machine schedular with memory access control
US20070150895A1 (en) Methods and apparatus for multi-core processing with dedicated thread management
JPH0696039A (en) Scheduling device and method
Zhou et al. Processor-pool-based scheduling for large-scale numa multiprocessors
Zhao et al. Classification-driven search for effective sm partitioning in multitasking gpus
US7568052B1 (en) Method, system and program products for managing I/O configurations of a computing environment
KR100400165B1 (en) Processing system scheduling
CN1928811A (en) Processing operations management systems and methods
Yu et al. Colab: a collaborative multi-factor scheduler for asymmetric multicore processors
Chiang et al. Kernel mechanisms with dynamic task-aware scheduling to reduce resource contention in NUMA multi-core systems
Falt et al. Towards Efficient Locality Aware Parallel Data Stream Processing.
JP3019317B2 (en) Process scheduling method
CN116841751B (en) Policy configuration method, device and storage medium for multi-task thread pool
Gracioli et al. CAP: Color-aware task partitioning for multicore real-time applications

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