JP3012444B2 - Process dispatch method - Google Patents

Process dispatch method

Info

Publication number
JP3012444B2
JP3012444B2 JP5310659A JP31065993A JP3012444B2 JP 3012444 B2 JP3012444 B2 JP 3012444B2 JP 5310659 A JP5310659 A JP 5310659A JP 31065993 A JP31065993 A JP 31065993A JP 3012444 B2 JP3012444 B2 JP 3012444B2
Authority
JP
Japan
Prior art keywords
processor
priority
executed
cpu
dispatch
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
JP5310659A
Other languages
Japanese (ja)
Other versions
JPH06231100A (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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP5310659A priority Critical patent/JP3012444B2/en
Publication of JPH06231100A publication Critical patent/JPH06231100A/en
Application granted granted Critical
Publication of JP3012444B2 publication Critical patent/JP3012444B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プロセスディスパッチ
方法に関し、特に、複数のCPUの各々がキャッシュメ
モリを有するマルチプロセッサシステムにおけるプロセ
スディスパッチ方法に関する。
The present invention relates to a process dispatching method, and more particularly to a process dispatching method in a multiprocessor system in which each of a plurality of CPUs has a cache memory.

【0002】[0002]

【従来の技術】[Prior art]

〔用語の定義〕従来技術の説明の前に、本明細書で用い
られる用語を定義する。
[Definition of terms] Before describing the related art, terms used in the present specification are defined.

【0003】プロセス制御ブロック(PCB)とは、プ
ロセスの実行に必要な情報であり、主記憶装置に格納さ
れる。PCBに記憶される情報には、プロセスの優先度
が含まれる。PCBの詳細な構造は、後述される。
A process control block (PCB) is information necessary for executing a process, and is stored in a main storage device. The information stored in the PCB includes the priority of the process. The detailed structure of the PCB will be described later.

【0004】実行中状態とは、プロセスの1状態であ
り、プロセスがプロセッサ上で実行されている状態であ
る。
[0004] The running state is one state of a process, that is, a state in which the process is being executed on a processor.

【0005】実行可能状態とは、プロセスの1状態であ
り、プロセスが即座に実行できる状態である。実行可能
状態のプロセスは、実行待ち行列中で、プロセッサが空
くのを待つ。
[0005] The executable state is one state of the process, and is a state in which the process can be executed immediately. The ready process waits in the execution queue for a processor to be free.

【0006】実行待ち状態とは、プロセスの1状態であ
り、プロセスが何らかの事象の発生を待っている状態で
ある。
[0006] The execution waiting state is a state of the process, in which the process is waiting for the occurrence of some event.

【0007】再ディスパッチとは、実行中状態のプロセ
スを一旦実行待ち状態とした後、いずれかのプロセッサ
に再度ディスパッチすることである。
[0007] Re-dispatching means that a process in a running state is temporarily placed in an execution waiting state and then dispatched to any processor again.

【0008】プロセススワップとは、プロセッサで実行
中のプロセスを実行可能状態もしくは実行待ち状態に
し、このプロセッサに別のプロセスをディスパッチする
ことである。 〔従来技術〕次に、各々のプロセッサにキャッシュメモ
リを搭載したマルチプロセッサシステムの特性が説明さ
れる。マルチプロセッサシステムでは、各々のプロセッ
サに1つづつ、キャッシュメモリが設けられる。プロセ
ッサに近い位置にキャッシュメモリを設置すると、高速
にアクセスできるためである。しかしながら、キャッシ
ュメモリをこのように設置することによって、以下のよ
うな問題が生じる。
[0008] The process swap is a process in which a process being executed by a processor is put into an executable state or an execution waiting state, and another process is dispatched to this processor. [Prior Art] Next, characteristics of a multiprocessor system in which a cache memory is mounted on each processor will be described. In a multiprocessor system, one cache memory is provided for each processor. This is because if a cache memory is provided near the processor, high-speed access is possible. However, such a cache memory causes the following problems.

【0009】仮想的なマルチプロセッサシステムとその
処理過程とを参照して、上述の問題が説明される。この
仮想的なマルチプロセッサシステムは、プロセッサX〜
Zを有する。プロセッサX〜Zは、キャッシュメモリx
〜zをそれぞれ有する。処理過程の第1ステップにおい
て、プロセスAがプロセッサXで実行されている。第2
ステップにおいて、プロセスAが実行待ち状態にされ
る。第3ステップにおいて、プロセスXで、プロセスA
以外のプロセスが実行される。第4ステップにおいて、
プロセスAが、プロセッサZに再ディスパッチされる。
このとき、プロセッサXのキャッシュメモリxには、プ
ロセスAの処理で使用したデータaが残っている。
The above problem will be described with reference to a virtual multiprocessor system and its processing. This virtual multiprocessor system includes processors X to
Z. The processors X to Z include a cache memory x
To z. In the first step of the process, process A is being executed by processor X. Second
In the step, the process A is put into an execution waiting state. In the third step, in process X, process A
Other processes are executed. In the fourth step,
Process A is re-dispatched to processor Z.
At this time, the data a used in the process of the process A remains in the cache memory x of the processor X.

【0010】上述の処理過程には、以下のような2つの
問題がある。
[0010] The above process has the following two problems.

【0011】第1に、第4ステップにおいて、プロセス
Aの再ディスパッチ先がプロセッサZであるため、キャ
ッシュメモリx中のデータaが利用されない。第4ステ
ップでプロセスAを実行するプロセッサZは、必要なデ
ータをメインメモリから読み出す必要がある。このた
め、プロセスAの処理が低速になってしまう。以下で
は、この問題をヒット率の低下と呼ぶ。
First, in the fourth step, since the re-dispatch destination of the process A is the processor Z, the data a in the cache memory x is not used. The processor Z executing the process A in the fourth step needs to read necessary data from the main memory. For this reason, the processing of the process A becomes slow. Hereinafter, this problem is referred to as a decrease in the hit rate.

【0012】第2に、キャッシュキャンセルが生じる可
能性がある。第4ステップにおいて、プロセッサZがデ
ータaと同様のデータをメインメモリから読み出すと、
キャッシュメモリxとzには、同じデータが同時に存在
することになる。キャッシュメモリx内のデータaは、
プロセッサZがキャッシュメモリz内のデータaの内容
を変更したときにキャンセルされる。データ間の矛盾を
回避するためである。キャッシュキャンセルが生じる
と、システムの処理能力が低下する。
Second, cache cancellation may occur. In the fourth step, when the processor Z reads the same data as the data a from the main memory,
The same data exists in the cache memories x and z at the same time. The data a in the cache memory x is
Canceled when the processor Z changes the contents of the data a in the cache memory z. This is to avoid inconsistency between data. When cache cancellation occurs, the processing capacity of the system decreases.

【0013】上述の2つの問題は、プロセッサAの再デ
ィスパッチ先が、直前に実行されていたプロセッサであ
るプロセッサXであったならば、回避されていたもので
ある。このように、各々のプロセッサがキャッシュメモ
リを有するマルチプロセッサシステムでは、再ディスパ
ッチにおけるディスパッチ先の決定方法が、システムの
性能を左右する。
The above two problems have been avoided if the redispatch destination of the processor A is the processor X, which is the processor that was being executed immediately before. Thus, in a multiprocessor system in which each processor has a cache memory, the method of determining a dispatch destination in redispatching affects the performance of the system.

【0014】次に従来技術が説明される。上述のような
マルチプロセッサシステムの特性に基づいて、プロセス
のディスパッチを行うディスパッチ方法の一例が、U.
S.PAT.No.5,193,172号に記載されて
いる。同特許公報第2コラム第52行目〜第53行目を
参照すると、ディスパッチに伴うキャッシュキャンセル
の発生を少なくすることが、この従来技術の目的に含ま
れている。
Next, the prior art will be described. An example of a dispatch method for dispatching a process based on the characteristics of a multiprocessor system as described above is described in U.S. Pat.
S. PAT. No. No. 5,193,172. Referring to the same publication, column 2, lines 52 to 53, it is an object of the prior art to reduce the occurrence of cache cancellation due to dispatch.

【0015】この従来技術では、主記憶の実ページが複
数のグループに分割される。各々のグループには、プロ
セッサが1つづつ割り当てられる。1つのグループに割
り当てられたプロセッサは、このグループに属する実ペ
ージを優先的に使用する。各プロセッサには、このプロ
セッサで優先的に実行されるタスクが割り当てられる。
各タスクには、このタスクの処理中に利用される実ペー
ジが割り当てられる。
In this prior art, real pages in main memory are divided into a plurality of groups. Each group is assigned one processor at a time. Processors assigned to one group preferentially use real pages belonging to this group. Each processor is assigned a task that is preferentially executed by this processor.
Each task is assigned a real page used during the processing of this task.

【0016】同公報第8コラム第3行目〜第13行目を
参照すると、この従来技術における再ディスパッチは、
以下のような手順で行われる。ディスパッチされるタス
クに割り当てられている実ページの数が、前記グループ
ごとに計測される。計測の結果、最も多くの実ページが
割り当てられているグループが決定される。そして、こ
のグループに優先使用権を有するプロセッサに、このタ
スクがディスパッチされる。
Referring to column 8, lines 3 to 13 of the publication, redispatching in the prior art is as follows.
It is performed in the following procedure. The number of real pages assigned to the task to be dispatched is measured for each group. As a result of the measurement, the group to which the most real pages are assigned is determined. Then, this task is dispatched to the processor having the priority use right for this group.

【0017】上述のディスパッチ方法に従えば、各タス
クに割り当てられている実ページに変更がないときは、
このタスクは過去に実行されていたプロセッサに再ディ
スパッチされる。したがって、キャッシュキャンセルの
確率は減少する。
According to the above-described dispatch method, when there is no change in the actual page assigned to each task,
This task is re-dispatched to a previously running processor. Therefore, the probability of cache cancellation decreases.

【0018】[0018]

【発明が解決しようとする課題】しかしこの従来技術に
は以下のような問題がある。
However, this prior art has the following problems.

【0019】この問題とは、上述したグループを管理す
るために、多くの手順を実行する必要がある、というこ
とである。この従来技術では、処理中に上述のグループ
を変更していかなくてはならない。各プロセッサに適当
な数のメモリページを割り当てるためである。しかしな
がら、同公報第6コラム第20行〜第7コラム第35行
を参照すると、グループの変更には複雑かつ多量の手順
を実行しなくてはならない。さらに、この手順は繰り返
し実行される必要がある。
The problem is that many procedures need to be performed to manage the groups described above. In this prior art, the above-mentioned group must be changed during processing. This is to allocate an appropriate number of memory pages to each processor. However, referring to the publication, column 6, line 20 to column 7, line 35, a complicated and large number of procedures must be executed to change the group. In addition, this procedure needs to be performed repeatedly.

【0020】[0020]

【課題を解決するための手段】本発明の目的は、キャッ
シュメモリのヒット率の向上とキャッシュキャンセルの
発生率の低減とを、より少数の手順で実現するプロセス
ディスパッチ方法を提供することである。具体的には、
以下の3つの戦略を用いた、プロセスディスパッチ方法
が提供される。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a process dispatching method which can improve the hit rate of a cache memory and reduce the rate of occurrence of cache cancellation with fewer procedures. In particular,
A process dispatching method is provided using the following three strategies.

【0021】(第1の戦略)最も優先順位の低いプロセ
スを実行中のプロセッサが、ディスパッチ先である。
(First Strategy) The processor executing the process with the lowest priority is the dispatch destination.

【0022】(第2の戦略)最低優先順位のプロセスが
複数存在するときで、これらのプロセスを実行中のプロ
セッサの中に、ディスパッチされるべきプロセスが最後
に実行されたプロセッサが含まれるときは、このプロセ
ッサがディスパッチ先である。
(Second Strategy) When there are a plurality of processes with the lowest priority, and a processor executing these processes includes a processor in which a process to be dispatched is executed last. , This processor is the dispatch destination.

【0023】(第3の戦略)第2の戦略によってもディ
スパッチ先が定まらないときで、最低優先順位のプロセ
スを実行中のプロセッサの中にディスパッチ処理を実行
中のプロセッサが含まれるときは、このプロセッサがデ
ィスパッチ先である。
(Third Strategy) If the dispatch destination is not determined by the second strategy, and the processor executing the lowest priority process includes the processor executing the dispatch process, the third strategy The processor is the dispatch destination.

【0024】そして、本発明の好適な実例では、上述
の戦略を用いたディスパッチ方法が、第1のプロセスの
優先順位と前記第1のプロセスが直前に実行されたプロ
セッサの番号とを前記第1のプロセスのプロセス制御ブ
ロックから読み出す第1のステップと、実行中のプロセ
スのうち最低の優先順位を持つものを全て選択する第2
のステップと、前記第2のステップで選出されたプロセ
スの優先順位と前記第1のプロセスの優先順位とを比較
し、前記第2のステップで選出されたプロセスの優先順
位が前記第1のプロセスの優先順よりも高いときにディ
スパッチ処理を中止する第3のステップと、前記第2の
ステップで選出されたプロセスが1つだけのとき、この
プロセスを実行中のプロセッサに、前記第1のプロセス
をディスパッチする第4のステップと、前記第2のステ
ップで選出されたプロセスが複数あるときで、さらに前
記第2のステップで選出されたプロセスを実行している
プロセッサの中に前記第1のプロセスが直前に実行され
たプロセッサの番号と一致するものが存在するときに、
このプロセッサに前記第1のプロセスをディスパッチす
る第5のステップと、前記第4のステップおよび前記5
のステップで前記第1のプロセスが何れのプロセッサに
もディスパッチされなかったときで、さらに前記第2の
ステップで選出されたプロセッサの中にディスパッチ処
理を実行しているプロセッサが存在するときに、このプ
ロセッサに前記第1のプロセスをディスパッチする第6
のステップと、前記第4、5および6のステップで前記
第1のプロセスが何れのプロセッサにもディスパッチさ
れなかったときに、前記第1のプロセスを前記第2のス
テップで選出されたプロセスを実行中のプロセッサのい
ずれかにディスパッチする第7のステップと、いずれか
のプロセッサにおいて実行されている第2のプロセスが
実行可能状態もしくは実行待ち状態にされるときに、前
記第2のプロセスのプロセス制御ブロック内に格納され
た前記第2のプロセスが直前に実行されたプロセッサの
番号を、第2のプロセスが実行されているプロセッサの
番号に変更する第1のPCB更新処理ステップと、第3
のプロセスが新たに生成されたときに、前記第3のプロ
セスのプロセス制御ブロックに格納された前記第3のプ
ロセスが直前に実行されたプロセッサの番号に、ランダ
ムな値を設定する第2のPCB更新処理ステップとによ
って実現される。
[0024] In the preferred implementation of the present invention, the dispatch method using the strategy described above, the a number of processors the a priority of the first process the first process has been executed immediately before A first step of reading from the process control block of the first process, and a second step of selecting all of the running processes having the lowest priority.
And the priority of the process selected in the second step is compared with the priority of the first process, and the priority of the process selected in the second step is determined by the first process. A third step of interrupting the dispatch process when the priority is higher than the priority order of the first process, and when only one process is selected in the second step, the processor executing the process is provided with the first process. And when there are a plurality of processes selected in the second step, the first process is further included in a processor executing the process selected in the second step. If there is a match for the number of the previously executed processor,
A fifth step of dispatching said first process to said processor, said fourth step and said fifth step.
In the step, the first process is executed by any processor.
Was not dispatched, and the second
Dispatch processing among the processors selected in the step
This processor when there is a processor
A sixth dispatching said first process to a processor;
And the fourth, fifth and sixth steps
The first process is dispatched to any processor
If not, the first process is terminated by the second process.
The processor running the process selected in step
A seventh step of dispatching to any gap, and either
The second process running on the processor of
When the executable or waiting state is entered,
Stored in the process control block of the second process.
Of the processor in which the second process was executed immediately before
Number of the processor on which the second process is running
A first PCB update processing step of changing to a number,
When a new process is created, the third process
The third process stored in the process control block of the process.
The number of the processor on which the process was
And a second PCB update processing step of setting a suitable value .

【0025】[0025]

【実施例】【Example】

〔構成〕まず本実施例の構成が説明される。図1を参照
すると、本実施例のマルチプロセッサシステムは、CP
U#0〜CPU#3の4つのプロセッサが含まれる。C
PU#0〜CPU#3は、キャッシュメモリ6〜9が、
それぞれ含む。CPU#0〜CPU#3は、共通の主記
憶装置5にアクセスする。
[Configuration] First, the configuration of the present embodiment will be described. Referring to FIG. 1, the multiprocessor system of the present embodiment includes a CP
U # 0 to CPU # 3 are included. C
PU # 0-CPU # 3 are cache memories 6-9,
Include each. The CPUs # 0 to # 3 access the common main storage device 5.

【0026】主記憶装置5は、CPU実行状態管理表3
00、プロセス制御ブロック領域200およびキューヘ
ッダ20を含む。
The main storage device 5 has a CPU execution state management table 3
00, a process control block area 200 and a queue header 20.

【0027】プロセス制御ブロック領域200には、プ
ロセス制御ブロック(PCB)14〜15が格納されて
いる。
In the process control block area 200, process control blocks (PCBs) 14 to 15 are stored.

【0028】キューヘッダ20には、実行可能状態のプ
ロセス名31〜33がポインタでリンクされている。ポ
インタでリンクされたプロセス名31〜33は、実行待
ち行列を構成する。以下では、便宜上、プロセス名31
〜33を、プロセス31〜33とそれぞれ呼ぶ。プロセ
ス31〜33は、後述する優先順位にしたがって並んで
いる。実行待ち行列30の先頭であるプロセス31は、
行列中で最も優先順位の高いプロセスである。
Executable process names 31 to 33 are linked to the queue header 20 by pointers. The process names 31 to 33 linked by the pointer form an execution queue. In the following, for convenience, the process name 31
To 33 are referred to as processes 31 to 33, respectively. The processes 31 to 33 are arranged in accordance with the priority order described later. The process 31, which is the head of the execution queue 30,
This is the highest priority process in the queue.

【0029】図2を参照すると、PCB14は、プロセ
ス固有情報214、優先順位210および直前実行CP
U番号212を含む。プロセス固有情報214には、通
常のPCBに含まれる情報のうち、プロセスの優先順位
を除いたものが記憶される。例えば、プロセスの実行条
件は、プロセス固有情報214に含まれる。優先順位2
10は、プロセスの実行順番を定める優先順位である。
直前実行CPU番号212は、プロセスが直前に実行さ
れたCPUの番号である。プロセスが実行待ち状態また
は実行可能状態のとき、直前実行CPU番号212はプ
ロセスが最後に実行されたCPUの番号と一致する。直
前実行CPU番号212の更新手続きは後述される。
Referring to FIG. 2, the PCB 14 includes the process specific information 214, the priority order 210, and the immediately preceding execution CP.
U number 212 is included. The process specific information 214 stores information included in a normal PCB, excluding the process priority. For example, the execution condition of the process is included in the process specific information 214. Priority 2
Reference numeral 10 denotes a priority order for determining the execution order of the process.
The immediately preceding CPU number 212 is the number of the CPU that executed the process immediately before. When the process is in the execution waiting state or the executable state, the immediately preceding execution CPU number 212 matches the number of the CPU in which the process was executed last. The procedure for updating the immediately preceding execution CPU number 212 will be described later.

【0030】図3を参照すると、CPU実行状態管理表
300には、CPU#0〜CPU#3で実行中のプロセ
スのプロセス名および、それらの優先順位301〜30
4が格納されている。 次に、本実施例のプロセスディ
スパッチ方法が説明される。本実施例のディスパッチ方
法では、2種類のディスパッチ処理と2種類のPCB更
新処理とが実行される。これら2種類のPCB更新処理
では、直前実行CPU番号212が更新される。 〔第1のディスパッチ処理〕図4を参照すると、第1の
ディスパッチ処理61は、CPU#0〜CPU#3のい
ずれかでプロセスの実行が完了したときに実行される。
第1のディスパッチ処理において、プロセスの実行が完
了したCPUに、実行待ち行列30の先頭のプロセス3
1がディスパッチされる。第1のディスパッチ処理は、
通常行われているディスパッチ処理と同じなので、詳細
な説明は省略する。 〔第1のPCB更新処理〕図5および図6を参照する
と、第1のPCB更新処理62は、CPU#0〜CPU
#3のいずれかで、実行中のプロセスに事象待ちが発生
した場合に実行される。事象とは、入出力の完了、他の
プロセスとの同期等である。
Referring to FIG. 3, the CPU execution state management table 300 contains process names of processes being executed by CPUs # 0 to # 3 and their priorities 301 to 30.
4 is stored. Next, the process dispatch method of the present embodiment will be described. In the dispatch method of this embodiment, two types of dispatch processing and two types of PCB update processing are executed. In these two types of PCB update processing, the immediately preceding CPU number 212 is updated. [First Dispatch Process] Referring to FIG. 4, the first dispatch process 61 is executed when the execution of a process is completed in any of the CPUs # 0 to # 3.
In the first dispatching process, the CPU that has completed the execution of the process is given the process 3
1 is dispatched. The first dispatch process is
Since it is the same as the dispatch processing that is usually performed, detailed description is omitted. [First PCB Update Process] Referring to FIG. 5 and FIG. 6, the first PCB update process 62
This is executed when an event wait occurs in the running process in any of # 3. An event is the completion of input / output, synchronization with another process, or the like.

【0031】図6を参照すると、第1のPCB更新処理
62は、ステップ401およびステップ402で構成さ
れる。図6では、事象待ちが発生したプロセスを、プロ
セスAと呼んでいる。 ステップ401において、プロ
セスAを実行していたCPUの番号が、プロセスAのC
PU番号212として、プロセスAのPCBに設定され
る。
Referring to FIG. 6, the first PCB update process 62 includes steps 401 and 402. In FIG. 6, the process in which the event wait has occurred is called process A. In step 401, the number of the CPU executing the process A is
The PU number 212 is set in the PCB of the process A.

【0032】ステップ402において、プロセスAがウ
エイトキュー40にエンキューされる。図5を参照する
と、ウエイトキュー40には、実行待ち状態のプロセス
41〜43が整列している。ウエイトキュー40にエン
キューされることにより、プロセスAは実行待ち状態に
なる。ステップ402の完了によって、第1のPCB更
新処理が終了する。
In step 402, process A is enqueued in wait queue 40. Referring to FIG. 5, processes 41 to 43 waiting for execution are arranged in the wait queue 40. By being enqueued in the wait queue 40, the process A enters an execution waiting state. Upon completion of step 402, the first PCB update process ends.

【0033】第1のPCB更新処理が終了した後、ステ
ップ403において、プロセスAが待機していた事象が
完了する。これによって、プロセスAは、実行待ち行列
30にエンキューされる。前述したように、実行待ち行
列30内のプロセスは、優先順位に従って整列してい
る。プロセスAも、その優先順位に対応する場所に挿入
される。実行待ち行列30にエンキューされたことによ
り、プロセスAは実行可能状態になる。 〔第2のPCB更新処理〕図5および図7を参照する
と、第2のPCB更新処理63は、新規にプロセスが生
成されたときに実行される。図7を参照すると、第2の
PCB更新処理63は、ステップ405で構成される。
After the first PCB update process is completed, in step 403, the event that the process A has been waiting for is completed. As a result, the process A is enqueued in the execution queue 30. As mentioned above, the processes in the execution queue 30 are ordered according to priority. Process A is also inserted at a location corresponding to the priority. By being enqueued in the execution queue 30, the process A becomes executable. [Second PCB Update Process] Referring to FIGS. 5 and 7, the second PCB update process 63 is executed when a new process is created. Referring to FIG. 7, the second PCB update process 63 includes Step 405.

【0034】ステップ404において、新規にプロセス
が生成される。このプロセスを便宜上プロセスAと呼
ぶ。
In step 404, a new process is created. This process is called process A for convenience.

【0035】ステップ405において、プロセスAの直
前実行CPU番号212に乱数Rが設定される。乱数R
は、システムに含まれたCPUの番号のいずれかを示
す。本実施例のシステムでは、Rは0、1、2または3
のいずれかである。
In step 405, a random number R is set in the CPU number 212 immediately before the process A. Random number R
Indicates one of the numbers of CPUs included in the system. In the system of the present embodiment, R is 0, 1, 2, or 3.
Is one of

【0036】ステップ406において、プロセスAが実
行待ち行列30にエンキューされる。ステップ403と
同様、プロセスAは、その優先順位に対応する場所に挿
入される。 〔第2のディスパッチ処理〕図5および図8を参照する
と、第2のディスパッチ処理64は、いずれかのプロセ
スが実行待ち行列30にエンキューされたことにより実
行される。
At step 406, process A is enqueued into execution queue 30. As in step 403, process A is inserted at a location corresponding to its priority. [Second Dispatch Process] Referring to FIGS. 5 and 8, the second dispatch process 64 is executed when one of the processes is enqueued in the execution queue 30.

【0037】図8を参照すると、第2のディスパッチ処
理64は、ステップ407〜ステップ409で構成され
る。ここでは、実行待ち行列30にエンキューされたプ
ロセスを、プロセスAと呼ぶ。
Referring to FIG. 8, the second dispatch processing 64 includes steps 407 to 409. Here, the process enqueued in the execution queue 30 is called a process A.

【0038】ステップ407において、プロセスAが実
行待ち行列30の先頭にエンキューされたか否かが判定
される。プロセスAが、実行待ち行列30の先頭以外の
場所にエンキューされたときには、ステップ409が実
行される。ステップ409では、CPU#0〜CPU#
3で実行中のプロセスが継続して実行される。
In step 407, it is determined whether or not the process A has been enqueued at the head of the execution queue 30. When the process A is enqueued at a place other than the head of the execution queue 30, step 409 is executed. In step 409, CPU # 0 to CPU #
In step 3, the process being executed is continuously executed.

【0039】一方、プロセスAが実行待ち行列30の先
頭にエンキューされた場合は、ステップ408が実行さ
れる。実行待ち行列30の先頭にプロセスAがエンキュ
ーされたということは、プロセスAの優先順位が、実行
待ち行列30内の他のプロセスの優先順位よりも高いこ
とを示す。したがって、プロセスAの優先順位が、CP
U#0〜CPU#3で実行中のプロセスの優先順位より
も高い可能性がある。このため、CPU#0〜CPU#
3で実行中のプロセスの中でプロセスAよりも優先順位
の低いプロセスがあるときには、プロセスAを優先的に
CPUにディスパッチする必要がある。ステップ408
は、この処理を実行する。
On the other hand, if the process A is enqueued at the head of the execution queue 30, step 408 is executed. The fact that the process A is enqueued at the head of the execution queue 30 indicates that the priority of the process A is higher than the priority of other processes in the execution queue 30. Therefore, the priority of process A is CP
There is a possibility that the priority is higher than the priority of the process being executed by U # 0 to CPU # 3. Therefore, CPU # 0-CPU #
When there is a process having a lower priority than the process A among the processes running in the process 3, it is necessary to dispatch the process A to the CPU preferentially. Step 408
Performs this processing.

【0040】ステップ408において、プロセスAのデ
ィスパッチ先は、前述した第1〜第3の戦略に基づいて
定められる。第1〜第3の戦略に基づいたプロセスAの
ディスパッチは、原理的には、以下の5つのステップの
処理で実現される。
In step 408, the dispatch destination of the process A is determined based on the above-described first to third strategies. The dispatch of the process A based on the first to third strategies is realized in principle by the following five steps.

【0041】(ステップ1)実行中のプロセスのうち最
低の優先順位を持つものを全て選択するステップ。
(Step 1) A step of selecting all of the running processes having the lowest priority.

【0042】(ステップ2)ステップ1で選出されたプ
ロセスの優先順位とプロセスAの優先順位とを比較し、
ステップ1で選出されたプロセスの優先順位がプロセス
Aの優先順よりも高いときにディスパッチ処理を中止す
るステップ。
(Step 2) The priority of the process selected in step 1 is compared with the priority of process A,
A step of stopping dispatch processing when the priority of the process selected in step 1 is higher than the priority of process A.

【0043】(ステップ3)ステップ1で選出されたプ
ロセスが1つだけのとき、このプロセスを実行している
プロセッサに、プロセスAをディスパッチするステッ
プ。
(Step 3) The step of dispatching the process A to the processor executing the process when only one process is selected in the step 1.

【0044】(ステップ4)ステップ1で選出されたプ
ロセスが複数あるときで、さらにステップ1で選出され
たプロセスを実行しているプロセッサの中にプロセスA
直前実行CPU番号212と一致するものが存在すると
きに、このプロセッサにプロセスAをディスパッチする
ステップ。
(Step 4) When there are a plurality of processes selected in step 1, the process A is further included in the processor executing the process selected in step 1.
A step of dispatching the process A to the processor when there is a CPU that matches the immediately preceding execution CPU number 212;

【0045】(ステップ5)ステップ3およびステップ
4でプロセスAが何れのプロセッサにもディスパッチさ
れなかったときで、さらにステップ1で選出されたプロ
セッサの中にディスパッチ処理を実行しているプロセッ
サが存在するときに、このプロセッサにプロセスAをデ
ィスパッチするステップ。
(Step 5) When the process A is not dispatched to any of the processors in the steps 3 and 4, there is a processor executing the dispatch process among the processors selected in the step 1. Sometimes dispatching process A to this processor.

【0046】上述のステップのうち、ステップ3〜ステ
ップ5が、第1〜第3の戦略に対応する。
Of the above steps, steps 3 to 5 correspond to the first to third strategies.

【0047】しかしながら、本実施例のステップ408
では、ステップ3〜5に相当する処理が同時に実行され
る。 〔ステップ408〕以下の説明では、次の表記法が用い
られる。PAはプロセスAを示す。#iは、i番目のC
PUであるCPU#iで実行中のプロセスを示す。Cn
tは、ステップ408を実行しているプロセッサの番号
を示す。PCB(X)は、プロセスXのPCBを示す。
PRI(X)は、プロセスXの優先順位を示す。LCP
U#(X)は、プロセスXの直前実行CPU番号212
を示す。
However, in step 408 of the present embodiment,
Then, the processes corresponding to steps 3 to 5 are executed simultaneously. [Step 408] In the following description, the following notation is used. PA indicates process A. #I is the i-th C
This shows a process being executed by the CPU #i that is a PU. Cn
t indicates the number of the processor executing step 408. PCB (X) indicates the PCB of process X.
PRI (X) indicates the priority of the process X. LCP
U # (X) is the CPU number 212 immediately before the process X
Is shown.

【0048】次にステップ408で用いられる変数が説
明される。i,j,kは特別な意味を持たない変数であ
る。minpnは、最低の優先順位のプロセスを実行し
ているCPUの番号である。minpnは、前述した第
1の戦略〜第3の戦略を考慮して定められる。Mはプロ
セッサ番号の最大値である。本実施例の場合、3であ
る。
Next, the variables used in step 408 will be described. i, j, and k are variables having no special meaning. minpn is the number of the CPU executing the process with the lowest priority. minpn is determined in consideration of the above-described first to third strategies. M is the maximum value of the processor number. In the case of the present embodiment, it is 3.

【0049】図9および図10を参照すると、ステップ
408は、ステップ502〜ステップ528で構成され
ている。ステップ502は、大きく2つの部分に分割で
きる。第1の部分は、ステップ502〜ステップ526
で構成される。第1の部分では、minpnが定められ
る。第2の部分は、ステップ526およびステップ52
8で構成される。第2の部分では、ディスパッチが実行
される。
Referring to FIG. 9 and FIG. 10, step 408 includes steps 502 to 528. Step 502 can be roughly divided into two parts. The first part consists of steps 502 to 526
It consists of. In the first part, minpn is defined. The second part consists of steps 526 and 52
8. In the second part, dispatch is performed.

【0050】ステップ502において、変数i、j、k
に、0、1、2が、それぞれ代入される。
In step 502, variables i, j, k
And 0, 1, and 2 are respectively substituted for.

【0051】ステップ504において、PRI(PA)
とLCPU#(PA)とが、PCB(PA)から読出さ
れる。前述の表記法に従えば、PRI(PA)、LCP
U#(PA)およびPCB(PA)は、プロセスAの優
先順位、プロセスAの直前実行CPU番号およびプロセ
スAのPCBを、それぞれ示す。
In step 504, the PRI (PA)
And LCPU # (PA) are read from PCB (PA). According to the above notation, PRI (PA), LCP
U # (PA) and PCB (PA) indicate the priority of the process A, the CPU number immediately before the process A, and the PCB of the process A, respectively.

【0052】ステップ506において、PRI(#i)
と、PRI(#j)とが、CPU実行状態管理表300
から読出される。前述の表記法に従えば、PRI(#
i)およびPRI(#j)は、CPU#iで実行中のプ
ロセスの優先順位、およびCPU#jで実行中のプロセ
スの優先順位を、それぞれ示す。
In step 506, the PRI (#i)
And PRI (#j) are stored in the CPU execution state management table 300.
Is read from. According to the above notation, PRI (#
i) and PRI (#j) indicate the priority of the process running on the CPU #i and the priority of the process running on the CPU #j, respectively.

【0053】ステップ508は、前述の第1の戦略を実
現するステップである。ステップ508において、CP
U#iで実行中のプロセスの優先順位と、CPU#jで
実行中のプロセスの優先順位とが比較される。前述の表
記法を用いると、PRI(#i)とPRI(#j)の大
小関係が比較される。PRI(#i)<PRI(#j)
のとき、すなわち、CPU#iで実行中のプロセスの優
先順位が、CPU#jで実行中のプロセスの優先順位よ
りも低いとき、ステップ518が実行される。PRI
(#i)=PRI(#j)のとき、ステップ510が実
行される。PRI(#i)>PRI(#j)のとき、ス
テップ520が実行される。
Step 508 is a step for realizing the first strategy described above. In step 508, the CP
The priority of the process being executed by U # i is compared with the priority of the process being executed by CPU # j. Using the notation described above, the magnitude relationship between PRI (#i) and PRI (#j) is compared. PRI (#i) <PRI (#j)
, Ie, when the priority of the process being executed by the CPU #i is lower than the priority of the process being executed by the CPU #j, Step 518 is executed. PRI
When (#i) = PRI (#j), step 510 is executed. When PRI (#i)> PRI (#j), step 520 is executed.

【0054】ステップ510は、前述の第2の戦略を実
現するためのステップである。ステップ510におい
て、プロセスAが最後に実行されていたCPUの番号L
CPU#(PA)と、iとが一致するか否かが判定され
る。LCPU#(PA)=iのとき、すなわち、プロセ
スAが最後に実行されたCPUがCPU#iのとき、ス
テップ518が実行される。LCPU#(PA)とiが
等しくないとき、ステップ512が実行される。
Step 510 is a step for realizing the above-mentioned second strategy. In step 510, the number L of the CPU on which the process A was last executed
It is determined whether or not CPU # (PA) matches i. When LCPU # (PA) = i, that is, when the CPU that executed process A last is CPU # i, step 518 is executed. If LCPU # (PA) and i are not equal, step 512 is executed.

【0055】ステップ512は、前述の第2の戦略を実
現するためのステップである。ステップ512におい
て、プロセスAが最後に実行されていたCPUの番号L
CPU#(PA)と、jとが一致するか否かが判定され
る。LCPU#(PA)=iのとき、すなわち、プロセ
スAが最後に実行されたCPUがCPU#jのとき、ス
テップ520が実行される。LCPU#(PA)とjが
等しくないとき、ステップ514が実行される。
Step 512 is a step for realizing the above-mentioned second strategy. In step 512, the number L of the CPU on which the process A was last executed
It is determined whether or not CPU # (PA) matches j. When LCPU # (PA) = i, that is, when the CPU that executed process A last is CPU # j, step 520 is executed. When LCPU # (PA) and j are not equal, step 514 is executed.

【0056】ステップ514は、前述の第3の戦略を実
現するためのステップである。ステップ514におい
て、iとCntとが比較される。すなわち、CPU#i
がこの処理を実行しているCPU自身であるか否かが判
定される。i=Cntのとき、すなわち、CPU#iが
この処理を実行しているCPU自身であるとき、ステッ
プ518が実行される。iとCntとが等しくないと
き、ステップ520が実行される。
Step 514 is a step for realizing the third strategy described above. At step 514, i and Cnt are compared. That is, CPU #i
Is determined to be the CPU itself executing this process. When i = Cnt, that is, when CPU # i is the CPU executing this process, step 518 is executed. If i and Cnt are not equal, step 520 is executed.

【0057】ステップ518は、ステップ508におい
てPRI(#i)<PRI(#j)のとき、ステップ5
10においてLCPU#(PA)=iのとき、または、
ステップ514でi=Cntのときに実行される。ステ
ップ518において、minpnにiが、jにkが、そ
れぞれ代入される。ステップ518が終了すると、ステ
ップ522が実行される。
Step 518 is performed when PRI (#i) <PRI (#j) in step 508.
When LCPU # (PA) = i in 10, or
This is executed when i = Cnt in step 514. In step 518, i is substituted for minpn and k is substituted for j. When step 518 ends, step 522 is executed.

【0058】ステップ520は、ステップ508におい
てPRI(#i)>PRI(#j)のとき、ステップ5
10においてLCPU#(PA)=jのとき、または、
ステップ514においてiとCntが等しくないときに
実行される。ステップ520において、minpnにj
が、iにkが、それぞれ実行される。ステップ522が
終了すると、ステップ522が実行される。
Step 520 is performed when PRI (#i)> PRI (#j) in step 508.
10 when LCPU # (PA) = j, or
This is executed when i and Cnt are not equal in step 514. In step 520, minpn is set to j.
, And k for i. When step 522 ends, step 522 is executed.

【0059】ステップ522において、kがインクリメ
ントされる。
In step 522, k is incremented.

【0060】ステップ524において、k=M+1であ
るか否かが比較される。kとM+1が等しくないとき、
ステップ506以降のステップが再び実行される。K=
M+1のとき、ステップ526が実行される。ステップ
524終了時点で、変数minpnには、前述の第1の
戦略〜第3の戦略に基づいて決定された、プロセスAの
ディスパッチ先のCPU番号が代入されている。
In step 524, it is compared whether k = M + 1. When k and M + 1 are not equal,
Steps after step 506 are executed again. K =
If M + 1, step 526 is executed. At the end of step 524, the CPU number of the dispatch destination of the process A, which is determined based on the above-described first to third strategies, is substituted for the variable minpn.

【0061】ステップ526において、PRI(CPU
#minpn)とPRI(PA)の大小関係が判定され
る。すなわち、CPU#minpnで実行中のプロセス
の優先順位と、プロセスAの優先順位が比較される。P
RI(CPU#minpn)がPRI(PA)よりも大
きいか等しいときは、ステップ408が終了する。これ
は、各プロセッサで現在実行中のプロセスの最低優先順
位よりも、プロセスAの優先順位が低い場合である。し
たがって、プロセスAはディスパッチされない。PRI
(CPU#minpn)<PRI(PA)のとき、ステ
ップ528が実行される。
At step 526, the PRI (CPU
#Minpn) and PRI (PA) are determined. That is, the priority of the process being executed by the CPU #minpn is compared with the priority of the process A. P
If RI (CPU # minpn) is greater than or equal to PRI (PA), step 408 ends. This is a case where the priority of the process A is lower than the lowest priority of the process currently being executed by each processor. Therefore, process A is not dispatched. PRI
When (CPU # minpn) <PRI (PA), step 528 is executed.

【0062】ステップ528において、プロセスAがC
PU#minpnにディスパッチされる。ステップ52
8の完了によって、ステップ408が完了する。
At step 528, the process A
Dispatched to PU # minpn. Step 52
Upon completion of step 8, step 408 is completed.

【0063】ステップ408の完了によって、第2のデ
ィスパッチ処理が完了する。上述した第1のディスパッ
チ処理、第2のディスパッチ処理、第1のPCB更新処
理および第2のPCB更新処理は、各々独立の実行され
る。 〔効果〕上述のように本発明では、第2のディスパッチ
処理におけるディスパッチ先が、前述の第1〜第3の戦
略にしたがって決定される。
Upon completion of step 408, the second dispatch processing is completed. The first dispatch process, the second dispatch process, the first PCB update process, and the second PCB update process described above are each executed independently. [Effect] As described above, in the present invention, the dispatch destination in the second dispatch processing is determined according to the above-described first to third strategies.

【0064】ディスパッチ先の決定において第2の戦略
が考慮されるために、非常に高い確率で、プロセスは直
前に実行されていたCPUに再びディスパッチされる。
このため、キャッシュのヒット率が向上する。また、キ
ャッシュキャンセルの発生率も減少する。
Since the second strategy is taken into account in determining the dispatch destination, with very high probability, the process is dispatched again to the CPU that was executing immediately before.
Therefore, the cache hit rate is improved. Also, the rate of occurrence of cache cancellation is reduced.

【0065】ディスパッチ先の決定において第3の戦略
の考慮されるために、プロセスの実行速度が向上する。
これは、ディスパッチ処理を実行しているプロセッサは
プロセスAのPCB(PA)に既にアクセスしているた
め、他のプロセッサに比べて比較的早期にプロセスAの
処理を開始できるためである。
Since the third strategy is considered in determining the dispatch destination, the execution speed of the process is improved.
This is because the processor executing the dispatch process has already accessed the PCB (PA) of the process A, and thus can start the process of the process A relatively earlier than other processors.

【0066】また、新たなプロセスが生成されるときに
は、第2のPCB更新処理によって直前実行CPU番号
212がランダムに決定される。したがって、第2のデ
ィスパッチ処理において、新たに生成されたプロセスの
ディスパッチ先が、特定のプロセッサに集中することが
ない。
When a new process is created, the immediately preceding CPU number 212 is randomly determined by the second PCB update process. Therefore, in the second dispatch process, the dispatch destination of the newly created process does not concentrate on a specific processor.

【0067】以上説明したように、本発明によれば、キ
ャッシュのヒット率の向上とキャッシュキャンセルの発
生率の減少とが、同時に達成される。したがって、各々
のプロセッサがキャッシュメモリを有するマルチプロセ
ッサシステムの処理効率を改善することができる。さら
に、本発明によれば、メモリをグループ分割する必要
も、これらのグループを管理する必要もない。 〔他の実施態様〕本発明は、その精神またはその主要な
特徴から逸脱することなく、他の様々な態様で実施する
ことができる。
As described above, according to the present invention, an improvement in the cache hit rate and a reduction in the cache cancel rate are achieved at the same time. Therefore, the processing efficiency of a multiprocessor system in which each processor has a cache memory can be improved. Furthermore, according to the present invention, there is no need to divide the memory into groups nor to manage these groups. [Other Embodiments] The present invention can be implemented in various other embodiments without departing from the spirit or main features thereof.

【0068】例えば、上述の実施例では、CPUの個数
を4つとしたが、CPUの個数はいくつでも構わない。
ただし、CPUの個数を変更に応じて、変数Mの値も変
更する必要がある。
For example, in the above embodiment, the number of CPUs is four, but the number of CPUs may be any number.
However, it is necessary to change the value of the variable M according to the change in the number of CPUs.

【0069】また、第2のPCB変更処理は行われなく
てもよい。この場合、新たに生成されたプロセスに対し
ては、第2のディスパッチ処理の代わりに、従来のディ
スパッチ処理を行う必要がある。
The second PCB change processing need not be performed. In this case, it is necessary to perform a conventional dispatch process on the newly generated process instead of the second dispatch process.

【0070】上述のように、本実施例はあらゆる点で単
なる例示に過ぎず、限定的に解釈してはならない。本発
明の範囲は、特許請求の範囲によって示されるものであ
って、明細書本文には、なんら拘束されない。さらに、
特許請求の範囲の均等範囲に属する変形や変更は、全て
本発明の範囲内のものである。
As described above, this embodiment is merely an example in every aspect and should not be construed as limiting. The scope of the present invention is defined by the appended claims, and is not limited by the specification. further,
All modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.

【0071】[0071]

【発明の効果】以上説明したように、本発明によれば、
キャッシュのヒット率の向上とキャッシュキャンセルの
発生率の減少とが、同時に達成される。したがって、各
々のプロセッサがキャッシュメモリを有するマルチプロ
セッサシステムの処理効率を改善することができる。さ
らに、本発明によれば、メモリをグループ分割する必要
も、これらのグループを管理する必要もない。
As described above, according to the present invention,
The improvement of the cache hit rate and the reduction of the cache cancellation rate are achieved at the same time. Therefore, the processing efficiency of a multiprocessor system in which each processor has a cache memory can be improved. Furthermore, according to the present invention, there is no need to divide the memory into groups nor to manage these groups.

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

【図1】本発明の一実施例を示す図。FIG. 1 is a diagram showing one embodiment of the present invention.

【図2】PCB14に格納されるデータを示す図。FIG. 2 is a view showing data stored in a PCB 14;

【図3】CPU実行状態管理表300に格納されるデー
タを示す図。
FIG. 3 is a diagram showing data stored in a CPU execution state management table 300.

【図4】第1のディスパッチ処理61の動作を示す図。FIG. 4 is a diagram showing an operation of a first dispatch processing 61.

【図5】第1のPCB更新処理62、第2のPCB更新
処理63および第2のディスパッチ処理64の動作を示
す図。
FIG. 5 is a diagram showing operations of a first PCB update process 62, a second PCB update process 63, and a second dispatch process 64.

【図6】第1のPCB更新処理の動作を示すフローチャ
ート。
FIG. 6 is a flowchart showing an operation of a first PCB update process.

【図7】第2のPCB更新処理の動作を示すフローチャ
ート。
FIG. 7 is a flowchart showing an operation of a second PCB update process.

【図8】第2のディスパッチ処理の動作を示すフローチ
ャート。
FIG. 8 is a flowchart showing an operation of a second dispatch process.

【図9】ステップ408の詳細な動作を示すフローチャ
ート。
FIG. 9 is a flowchart showing the detailed operation of step 408.

【図10】ステップ408の詳細な動作を示すフローチ
ャート。
FIG. 10 is a flowchart showing the detailed operation of step 408.

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

CPU#0〜CPU#3 CPU 5 主記憶装置 6〜9 キャッシュメモリ6〜9 14〜15 プロセス制御ブロック(PCB) 20 キューヘッダ 214 プロセス固有情報 210 優先順位 212 直前実行CPU番号 30 実行待ち行列 31〜33 プロセス名 40 ウエイトキュー 61 第1のディスパッチ処理 62 第1のPCB更新処理 63 第2のPCB更新処理 64 第2のディスパッチ処理 200 プロセス制御ブロック領域 300 CPU実行状態管理表 CPU # 0 to CPU # 3 CPU 5 Main storage device 6 to 9 Cache memory 6 to 914 14 to 15 Process control block (PCB) 20 Queue header 214 Process specific information 210 Priority 212 Last execution CPU number 30 Execution queue 31 to 31 33 Process name 40 Wait queue 61 First dispatch process 62 First PCB update process 63 Second PCB update process 64 Second dispatch process 200 Process control block area 300 CPU execution state management table

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】各々のプロセッサにキャッシュメモリが搭
載されたマルチプロセッサシステムのプロセスディスパ
ッチ方法において、 第1のプロセスの優先順位と前記第1のプロセスが直前
に実行されたプロセッサの番号とを前記第1のプロセス
のプロセス制御ブロックから読み出す第1のステップ
と、 実行中のプロセスのうち最低の優先順位を持つものを全
て選択する第2のステップと、 前記第2のステップで選出されたプロセスの優先順位と
前記第1のプロセスの優先順位とを比較し、前記第2の
ステップで選出されたプロセスの優先順位が前記第1の
プロセスの優先順よりも高いときにディスパッチ処理を
中止する第3のステップと、 前記第2のステップで選出されたプロセスが1つだけの
とき、このプロセスを実行中のプロセッサに、前記第1
のプロセスをディスパッチする第4のステップと、 前記第2のステップで選出されたプロセスが複数あると
きで、さらに前記第2のステップで選出されたプロセス
を実行しているプロセッサの中に前記第1のプロセスが
直前に実行されたプロセッサの番号と一致するものが存
在するときに、このプロセッサに前記第1のプロセスを
ディスパッチする第5のステップと、前記第4のステップおよび前記5のステップで前記第1
のプロセスが何れのプロセッサにもディスパッチされな
かったときで、さらに前記第2のステップで選出された
プロセッサの中にディスパッチ処理を実行しているプロ
セッサが存在するときに、このプロセッサに前記第1の
プロセスをディスパッチする第6のステップと、 前記第4、5および6のステップで前記第1のプロセス
が何れのプロセッサにもディスパッチされなかったとき
に、前記第1のプロセスを前記第2のステップで選出さ
れたプロセスを実行中のプロセッサのいずれかにディス
パッチする第7のステップと、 いずれかのプロセッサにおいて実行されている第2のプ
ロセスが実行可能状態もしくは実行待ち状態にされると
きに、前記第2のプロセスのプロセス制御ブロック内に
格納された前記第2のプロセスが直前に実行されたプロ
セッサの番号を、第2のプロセスが実行されているプロ
セッサの番号に変更する第1のPCB更新処理ステップ
と、 第3のプロセスが新たに生成されたときに、前記第3の
プロセスのプロセス制御ブロックに格納された前記第3
のプロセスが直前に実行されたプロセッサの番号に、ラ
ンダムな値を設定する第2のPCB更新処理ステップと
を含むことを特徴とするプロセスディスパッチ方法。
1. A cache memory is provided in each processor.
Process disperser of the multiprocessor system
In the switching method, the priority of the first process and the first process
The number of the executed processor and the first process
First step of reading from the process control block of
And all running processes with the lowest priority
And the priority of the process selected in the second step.
Comparing the priority of the first process with the priority of the second process;
The priority of the process selected in the step is the first
Dispatch when higher than process priority
A third step to abort, and only one process selected in the second step
At this time, the processor executing this process is given the first
A fourth step of dispatching the process of the second step; and a plurality of processes selected in the second step.
And the process selected in the second step
Said first process in a processor executing
There is a match with the number of the previously executed processor.
When present, the processor has the first process
A fifth step of dispatching;In the fourth step and the fifth step, the first
Process is not dispatched to any processor
Was selected in the second step
Pro executing dispatch processing in the processor
When the processor is present, the first
A sixth step of dispatching the process; The first process in the fourth, fifth and sixth steps
Is not dispatched to any processor
The first process is selected in the second step
Process is running on one of the running processors.
A seventh step of patching; A second program running on any processor
When a process is placed in an executable or waiting state
In the process control block of the second process,
The stored second process is the process executed immediately before.
Assign the number of the processor to the process where the second process is running.
First PCB update processing step to change to Sessa number
And when the third process is newly created, the third process
The third stored in the process control block of the process
The number of the processor on which the process
A second PCB update processing step for setting random values;
A process dispatching method comprising:
JP5310659A 1992-12-10 1993-12-10 Process dispatch method Expired - Fee Related JP3012444B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5310659A JP3012444B2 (en) 1992-12-10 1993-12-10 Process dispatch method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP35223192 1992-12-10
JP4-352231 1992-12-10
JP5310659A JP3012444B2 (en) 1992-12-10 1993-12-10 Process dispatch method

Publications (2)

Publication Number Publication Date
JPH06231100A JPH06231100A (en) 1994-08-19
JP3012444B2 true JP3012444B2 (en) 2000-02-21

Family

ID=26566409

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5310659A Expired - Fee Related JP3012444B2 (en) 1992-12-10 1993-12-10 Process dispatch method

Country Status (1)

Country Link
JP (1) JP3012444B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08153079A (en) * 1994-11-28 1996-06-11 Kofu Nippon Denki Kk Composite central processing unit system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62115567A (en) * 1985-11-15 1987-05-27 Nec Corp Multiplex processor system
JPH0387935A (en) * 1989-08-31 1991-04-12 Toshiba Corp Task preemption controlling system

Also Published As

Publication number Publication date
JPH06231100A (en) 1994-08-19

Similar Documents

Publication Publication Date Title
US6553487B1 (en) Device and method for performing high-speed low overhead context switch
JP3155537B2 (en) Real memory management method
EP0145889A2 (en) Non-spinning task locking using compare and swap
JPH07113903B2 (en) Cache storage control method
EP0362880B1 (en) Process for partially swapping real storage areas used by a program between a real storage and an auxiliary storage
US6715059B2 (en) Methods and systems for a shared memory unit with extendable functions
JP2821345B2 (en) Asynchronous I / O control method
JP3012444B2 (en) Process dispatch method
US6349370B1 (en) Multiple bus shared memory parallel processor and processing method
US5446893A (en) Process dispatching method
US5684995A (en) Segment division management system
US5933856A (en) System and method for processing of memory data and communication system comprising such system
KR100294314B1 (en) Data processing system and method and communication system with such system
JPH04355818A (en) Data input/output controller
JPS6032220B2 (en) information processing equipment
JPH086829A (en) Simultaneous full data retrieving method for data base
JP3161422B2 (en) Microcomputer
JP2615046B2 (en) Record addition processing method
JP2532719B2 (en) Parallel processor
JP3319381B2 (en) Relative organization file and recording medium
JPH0248749A (en) Buffer storage control device
JP2000163309A (en) Method and device for managing memory and recording medium
JPS6380349A (en) High speed page input/output system
JP2607300B2 (en) Computer system
JPH0775017B2 (en) Memory access method

Legal Events

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

Free format text: PAYMENT UNTIL: 20071210

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081210

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091210

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees