JPH10161985A - Processor allocating method, and multiprocessor computer system - Google Patents

Processor allocating method, and multiprocessor computer system

Info

Publication number
JPH10161985A
JPH10161985A JP8317496A JP31749696A JPH10161985A JP H10161985 A JPH10161985 A JP H10161985A JP 8317496 A JP8317496 A JP 8317496A JP 31749696 A JP31749696 A JP 31749696A JP H10161985 A JPH10161985 A JP H10161985A
Authority
JP
Japan
Prior art keywords
processor
lock
instruction
data
mutual exclusion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8317496A
Other languages
Japanese (ja)
Inventor
Masahiko Yamauchi
雅彦 山内
Hiroshi Yashiro
寛 屋代
Hideki Murayama
秀樹 村山
Kazuo Horikawa
和雄 堀川
Takehisa Hayashi
林  剛久
Kimitoshi Yamada
公稔 山田
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 JP8317496A priority Critical patent/JPH10161985A/en
Publication of JPH10161985A publication Critical patent/JPH10161985A/en
Pending legal-status Critical Current

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate useless data transfer between caches and to improve the execution efficiency of a computer system as a whole. SOLUTION: An instruction string 505 for accessing shared data is sandwiched by a lock acquiring procedure 404 and a lock releasing procedure 406 and any processor is designated by a 2nd argument flag of the lock acquiring procedure 404. A multiprocessor computer system allocates a process for executing the instruction string 505 sandwiched by the lock acquiring procedure 404 and the lock releasing procedure 406 to the processor designated by the 2nd argument flag of the lock acquiring procedure 404. Since the plural processes for accessing the shared data are allocated to the same processor, there is no useless data transfer between caches and the execution efficiency of the entire system can be improved.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、プロセッサ割付方
法およびマルチプロセッサ計算機システムに関し、更に
詳しくは、キャッシュ間のデータ転送回数を減らし、シ
ステム全体の実行効率を向上させることができるプロセ
ッサ割付方法およびマルチプロセッサ計算機システムに
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processor allocation method and a multiprocessor computer system, and more particularly, to a processor allocation method and a multiprocessor computer system capable of reducing the number of data transfers between caches and improving the execution efficiency of the entire system. The present invention relates to a processor computer system.

【0002】[0002]

【従来の技術】複数のプロセッサとそれらプロセッサに
それぞれ対応するキャッシュとを有するマルチプロセッ
サ計算機システムにおいて、異なるプロセッサに割り付
けられた複数のプロセスが共有データにアクセスすると
き、共有データの一貫性を保つため、前記異なるプロセ
ッサのキャッシュ間で共有データを移動させる制御が行
われている。かかる制御の詳細は「UNIXカーネル内
部解析 キャッシュとマルチプロセッサの管理、C.Sc
himmel著、前川守監訳、岩本信一訳、ソフトバンク株式
会社、293〜327頁」に記載されている。
2. Description of the Related Art In a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, when a plurality of processes allocated to different processors access the shared data, the shared data must be kept consistent. The control for moving the shared data between the caches of the different processors is performed. For details of such control, see "UNIX Kernel Internal Analysis Cache and Multiprocessor Management, C. Sc
himmel, translated by Maekawa Mamoru, translated by Iwamoto Shinichi, Softbank Corp., pp. 293-327. "

【0003】[0003]

【発明が解決しようとする課題】異なるプロセッサのキ
ャッシュ間で共有データを移動させる制御を行う場合、
例えば、異なるプロセッサに割り付けられた各プロセス
が交互に共有データに書き込み動作を行なうと、キャッ
シュ間のデータ転送回数が増え、計算機システム全体の
実行効率が下がる問題点がある。そこで、本発明の目的
は、キャッシュ間のデータ転送回数を減らし、システム
全体の実行効率を向上させることができるプロセッサ割
付方法およびマルチプロセッサ計算機システムを提供す
ることにある。
In the case of performing control for moving shared data between caches of different processors,
For example, if the processes assigned to different processors alternately write data to the shared data, the number of data transfers between caches increases and the execution efficiency of the entire computer system decreases. Therefore, an object of the present invention is to provide a processor allocation method and a multiprocessor computer system capable of reducing the number of data transfers between caches and improving the execution efficiency of the entire system.

【0004】[0004]

【課題を解決するための手段】第1の観点では、本発明
は、複数のプロセッサとそれらプロセッサにそれぞれ対
応するキャッシュとを有するマルチプロセッサ計算機シ
ステムにおけるプロセッサ割付方法であって、複数のプ
ロセスが共有データにアクセスするとき、それらプロセ
スを同一のプロセッサに割り付けることを特徴とするプ
ロセッサ割付方法を提供する。上記プロセッサ割付方法
では、共有データにアクセスする複数のプロセスを同一
のプロセッサに割り付けるため、キャッシュ間の無駄な
データ転送がなくなり、システム全体の実行効率を向上
させることができる。また、複数の共有データがある場
合には、各共有データごとに別々のプロセッサを対応さ
せれば、負荷を分散することができる。
According to a first aspect, the present invention is a processor allocation method in a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, wherein the plurality of processes are shared. When accessing data, a processor allocation method is characterized in that these processes are allocated to the same processor. In the above processor allocation method, since a plurality of processes accessing the shared data are allocated to the same processor, useless data transfer between caches is eliminated, and the execution efficiency of the entire system can be improved. When there are a plurality of shared data, a load can be distributed by associating a different processor with each shared data.

【0005】第2の観点では、本発明は、複数のプロセ
ッサとそれらプロセッサにそれぞれ対応するキャッシュ
とを有するマルチプロセッサ計算機システムにおけるプ
ロセッサ割付方法であって、ある命令列の前に、プロセ
ッサを指定しうる相互排除開始命令を配置し、前記命令
列の後に、プロセッサの指定を解除しうる相互排除終了
命令を配置し、前記相互排除開始命令でプロセッサが指
定されている場合、その指定されたプロセッサにより前
記相互排除開始命令と前記相互排除終了命令で挟まれた
前記命令列を実行し、前記相互排除開始命令でプロセッ
サが指定されていない場合、任意のプロセッサにより前
記相互排除開始命令と前記相互排除終了命令で挟まれた
前記命令列を実行することを特徴とするプロセッサ割付
方法を提供する。上記プロセッサ割付方法では、共有デ
ータにアクセスする命令列を相互排除開始命令と相互排
除終了命令とで挟むと共に相互排除開始命令でプロセッ
サを指定することにより、共有データにアクセスするプ
ロセスを同一のプロセッサに割り付けることが出来る。
このため、キャッシュ間の無駄なデータ転送がなくな
り、システム全体の実行効率を向上させることができ
る。また、共有データにアクセスする命令列が複数ある
場合には、各命令列ごとに別々のプロセッサを指定すれ
ば、負荷を分散することができる。なお、上記構成にお
いて、プロセッサの指定は、プロセッサ番号を明示して
行ってもよいし、マルチプロセッサ計算機システムに一
つのプロセッサを選択させることにより行ってもよい。
後者の場合、マルチプロセッサ計算機システムは、例え
ば、相互排除開始命令を実行したプロセッサの番号に基
づいてプロセッサを選択したり、共有データが現時点で
存在しているキャッシュに対応するプロセッサを選択す
る。
According to a second aspect, the present invention is a processor allocation method in a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, wherein a processor is designated before an instruction sequence. A mutual exclusion start instruction is arranged, and after the instruction sequence, a mutual exclusion end instruction capable of canceling the designation of the processor is arranged. If a processor is specified by the mutual exclusion start instruction, the specified processor The instruction sequence sandwiched between the mutual exclusion start instruction and the mutual exclusion end instruction is executed, and if a processor is not specified by the mutual exclusion start instruction, the processor starts the mutual exclusion start instruction and the mutual exclusion end by any processor. A method for allocating a processor, comprising executing the instruction sequence sandwiched by instructions, is provided. In the above processor allocation method, the instruction sequence for accessing the shared data is sandwiched between the mutual exclusion start instruction and the mutual exclusion end instruction, and the processor is specified by the mutual exclusion start instruction. Can be assigned.
Therefore, useless data transfer between caches is eliminated, and the execution efficiency of the entire system can be improved. When there are a plurality of instruction sequences for accessing the shared data, the load can be distributed by specifying a different processor for each instruction sequence. In the above configuration, the processor may be specified by specifying the processor number or by causing the multiprocessor computer system to select one processor.
In the latter case, for example, the multiprocessor computer system selects a processor based on the number of the processor that has executed the mutual exclusion start instruction, or selects a processor corresponding to the cache in which the shared data currently exists.

【0006】第3の観点では、本発明は、複数のプロセ
ッサとそれらプロセッサにそれぞれ対応するキャッシュ
とを有するマルチプロセッサ計算機システムにおいて、
相互排除開始命令によりプロセッサが指定されている場
合は、その指定されたプロセッサにより、前記相互排除
開始命令から後の命令を実行させ、相互排除終了命令を
実行すると、任意のプロセッサにより、前記相互排除終
了命令から後の命令を実行させるプロセッサ割付制御手
段を具備することを特徴とするマルチプロセッサ計算機
システムを提供する。上記マルチプロセッサ計算機シス
テムでは、プログラムにおいて共有データにアクセスす
る命令列を相互排除開始命令と相互排除終了命令とで挟
むと共に相互排除開始命令でプロセッサを指定すること
により、共有データにアクセスするプロセスを同一のプ
ロセッサに割り付けることが出来る。このため、キャッ
シュ間の無駄なデータ転送がなくなり、システム全体の
実行効率を向上させることができる。また、共有データ
にアクセスする命令列が複数ある場合には、各命令列ご
とに別々のプロセッサを指定すれば、負荷を分散するこ
とができる。なお、上記構成において、プロセッサの指
定は、プロセッサ番号を明示して行ってもよいし、マル
チプロセッサ計算機システムに一つのプロセッサを選択
させることにより行ってもよい。後者の場合、プロセッ
サ割付制御手段は、例えば、相互排除開始命令を実行し
たプロセッサの番号に基づいてプロセッサを選択した
り、共有データが現時点で存在しているキャッシュに対
応するプロセッサを選択する。
According to a third aspect, the present invention provides a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors.
When the processor is specified by the mutual exclusion start instruction, the instruction following the mutual exclusion start instruction is executed by the specified processor, and when the mutual exclusion end instruction is executed, the arbitrary exclusion is performed by any processor. There is provided a multiprocessor computer system comprising a processor assignment control means for executing an instruction following an end instruction. In the above-mentioned multiprocessor computer system, the instruction sequence for accessing the shared data in the program is sandwiched between the mutual exclusion start instruction and the mutual exclusion end instruction, and the processor is designated by the mutual exclusion start instruction, so that the process of accessing the shared data is the same Of processors. Therefore, useless data transfer between caches is eliminated, and the execution efficiency of the entire system can be improved. When there are a plurality of instruction sequences for accessing the shared data, the load can be distributed by specifying a different processor for each instruction sequence. In the above configuration, the processor may be specified by specifying the processor number or by causing the multiprocessor computer system to select one processor. In the latter case, the processor allocation control means selects a processor based on, for example, the number of the processor that has executed the mutual exclusion start instruction, or selects a processor corresponding to the cache in which the shared data currently exists.

【0007】[0007]

【発明の実施の形態】図1は、本発明の一実施形態にか
かるマルチプロセッサ計算機システム101のブロック
図である。このマルチプロセッサ計算機システム101
は、複数のプロセッサ102(1)〜102(N)と、各プ
ロセッサごとのキャッシュメモリ103(1)〜103
(N)と、命令列やデータを格納するための磁気ディスク
等の2次記憶装置104と、メインメモリ106と、シ
ステム・バス105とを具備して構成されている。
FIG. 1 is a block diagram of a multiprocessor computer system 101 according to one embodiment of the present invention. This multiprocessor computer system 101
Indicates a plurality of processors 102 (1) to 102 (N) and cache memories 103 (1) to 103 (103) for each processor.
(N), a secondary storage device 104 such as a magnetic disk for storing instruction sequences and data, a main memory 106, and a system bus 105.

【0008】前記メインメモリ106には、プロセッサ
102が実行するプログラム格納領域120(1)〜(L)
と、プロセスを管理するためのプロセス管理表117
と、プロセッサ102(1)〜102(N)で実行中のプロ
セスを管理するための実行中プロセス管理表116と、
プロセッサ102(1)〜102(N)には未だ割り付けら
れていないが実行可能な状態にあるプロセスをリスト構
造で管理する実行可能プロセスリスト118と、プロセ
ッサ102(1)〜102(N)に割り付けるプロセスを切
り替える手続を格納するプロセス切り替え手続き格納領
域119と、複数のプロセスで共有するデータの一貫性
を保つために他のプロセスが当該共有データを読み書き
することを禁止する相互排除の際に使用する情報を格納
するためのロック用データ格納領域110(1)〜(M)
と、それらロック用データ格納領域110(1)〜(M)を
初期化する手続を格納するロック初期化手続き格納領域
107と、共有データにアクセスする命令列の前で相互
排除を指示する手続を格納するロック獲得手続き格納領
域108と、共有データにアクセスする命令列の後で相
互排除の解除を指示する手続を格納するロック解放手続
き格納領域109とがある。
In the main memory 106, program storage areas 120 (1) to 120 (L) to be executed by the processor 102 are stored.
And a process management table 117 for managing the process
A running process management table 116 for managing processes running on the processors 102 (1) to 102 (N);
An executable process list 118 that manages, in a list structure, processes that are not yet allocated to the processors 102 (1) to 102 (N) but are in an executable state, and are allocated to the processors 102 (1) to 102 (N). A process switching procedure storage area 119 for storing a procedure for switching processes, and a mutual exclusion for preventing other processes from reading and writing the shared data in order to maintain consistency of data shared by a plurality of processes. Lock data storage area 110 (1) to (M) for storing information
A lock initialization procedure storage area 107 for storing procedures for initializing the lock data storage areas 110 (1) to 110 (M), and a procedure for instructing mutual exclusion in front of an instruction sequence for accessing shared data. There is a lock acquisition procedure storage area 108 for storing the lock release procedure storage area 109 for storing a procedure for instructing cancellation of mutual exclusion after an instruction sequence for accessing shared data.

【0009】前記ロック用データ格納領域110(1)〜
(M)には、対応するデータが相互排除中か否かを示すロ
ック用変数格納領域111と、対応するデータにアクセ
ス中のプロセスがあるか否かを示すロック獲得フラグ格
納領域112と、対応するデータにアクセスするプロセ
スが割り付けられたプロセッサの番号を格納する割付プ
ロセッサ番号格納領域113と、対応するデータにアク
セスできる時を待っているプロセスをリストで管理して
いる待機プロセスリスト114とがある。
The lock data storage area 110 (1)-
(M) includes a lock variable storage area 111 indicating whether the corresponding data is being mutually excluded, a lock acquisition flag storage area 112 indicating whether there is a process accessing the corresponding data, There is an allocated processor number storage area 113 for storing the number of the processor to which the process accessing the data to be allocated is allocated, and a standby process list 114 for managing a list of processes waiting for when the corresponding data can be accessed. .

【0010】図2は、前記プロセス管理表117の構成
図である。プロセス管理表117の各行は、それぞれ一
つのプロセスに対応している。各行は、行番号を格納す
るインデックス201と、当該行に対応するプロセスの
番号を格納するプロセス番号202と、当該行に対応す
るプロセスの状態を格納する実行状態203と、当該行
に対応するプロセスの実行を中断した時にプログラムカ
ウンタ等のレジスタ情報を退避した記憶領域を格納する
レジスタ退避領域204と、実行可能プロセスリスト1
18のようなリスト構造を作るために使用するリンク先
プロセスの行番号(またはリスト構造の末尾を示す識別
子END)を格納する次プロセスインデックス205
と、当該行に対応するプロセスを割り付けるプロセッサ
が決まっている場合にその番号を格納する割付プロセッ
サ番号206とから構成される。
FIG. 2 is a configuration diagram of the process management table 117. Each row of the process management table 117 corresponds to one process. Each row has an index 201 for storing a row number, a process number 202 for storing a process number corresponding to the row, an execution state 203 for storing a state of a process corresponding to the row, and a process corresponding to the row. Save area 204 for storing a storage area in which register information such as a program counter is saved when execution of the process is interrupted, and executable process list 1
A next process index 205 storing the line number (or the identifier END indicating the end of the list structure) of the link destination process used to create a list structure such as 18
And an assigned processor number 206 for storing the number of the processor to which the process corresponding to the row is assigned when the number is determined.

【0011】図3は、前記実行中プロセス管理表116
の構成図である。実行中プロセス管理表116の各行
は、それぞれプロセッサ102(1)〜102(N)に対応
している。各行は、当該行に対応するプロセッサ102
(1)〜102(N)の番号(1〜N)を格納するプロセッ
サ番号301と、当該行に対応するプロセッサ102が
実行しているプロセスの番号を格納するプロセス番号3
02とから構成される。
FIG. 3 shows the running process management table 116.
FIG. Each row of the running process management table 116 corresponds to each of the processors 102 (1) to 102 (N). Each row corresponds to the processor 102 corresponding to the row.
A processor number 301 for storing numbers (1 to N) of (1) to 102 (N) and a process number 3 for storing the number of a process executed by the processor 102 corresponding to the row
02.

【0012】図4は、相互排除を実行するためにオペレ
ーティング・システムが呼び出す手続きであるロック初
期化402と、ロック獲得404と、ロック解放406
の説明図である。
FIG. 4 shows lock initialization 402, lock acquisition 404, and lock release 406, which are procedures called by the operating system to perform mutual exclusion.
FIG.

【0013】ロック初期化(手続き名init_lock)40
2は、ロック用データ識別子idを返すための変数格納
領域のアドレスidpを引数とする。そして、ロック用
データ格納領域110を初期化し、その初期化したロッ
ク用データ格納領域110に与えたロック用データ識別
子idを前記アドレスidpが指す変数格納領域に格納
する機能を有する。
Lock initialization (procedure name init_lock) 40
2 takes the address idp of the variable storage area for returning the lock data identifier id as an argument. Then, it has a function of initializing the lock data storage area 110 and storing the lock data identifier id given to the initialized lock data storage area 110 in the variable storage area indicated by the address idp.

【0014】ロック獲得(手続き名lock)404は、前
記ロック初期化402で得たロック用データ識別子id
を第1引数とし、機能の種類を指定する識別子flagを第
2引数とする。そして、ロック用データ識別子idに対
応するデータに以後アクセスするプロセスを、第2引数
の識別子flagの値がプロセッサ番号(1〜N)なら当該
プロセッサ番号(1〜N)に割り付け、識別子flagの値
が−1ならシステム側で選択した一つのプロセッサに割
り付け、さらに、識別子flagの値が−2なら従来技術で
提供されているセマフォと同様な相互排除とプロセスス
ケジューリング(プロセッサに割り付けるプロセスを選
択する処理)を提供するように制御する機能を有する。
なお、セマフォは、P命令とV命令とを使って相互排除
を実現する。P命令とV命令の詳細は「オペレーティン
グ・システムの機能と構成、高橋他、岩波書店、198
3、147〜150頁」や「UNIXカーネルの設計、
Maurice 著/坂本他訳、共立出版、1990、334〜
341頁」に記載されている。また、プロセススケジュ
ーリングの詳細は「UNIXカーネルの設計、Maurice
著、坂本他訳、共立出版、1990、211〜219
頁」に記載されている。
The lock acquisition (procedure name lock) 404 is the lock data identifier id obtained in the lock initialization 402.
As a first argument, and an identifier flag for specifying the type of function as a second argument. If the value of the identifier flag of the second argument is a processor number (1 to N), the process that accesses the data corresponding to the lock data identifier id is assigned to the processor number (1 to N). If -1 is assigned to one processor selected on the system side, and if the value of the identifier flag is -2, mutual exclusion and process scheduling similar to the semaphore provided in the prior art (process for selecting a process assigned to a processor) ) Is provided.
The semaphore implements mutual exclusion using a P instruction and a V instruction. For details of P and V instructions, see "Functions and Configuration of Operating System, Takahashi et al., Iwanami Shoten, 198
3, pp. 147-150 ”and“ UNIX Kernel Design,
Maurice / Sakamoto et al., Kyoritsu Shuppan, 1990, 334-
341 ". For details of process scheduling, see "Designing UNIX Kernel, Maurice
Author, Sakamoto et al., Kyoritsu Shuppan, 1990, 211-219
Page ".

【0015】ロック解放(手続き名unlock)406は、
前記ロック初期化402で得たロック用データ識別子i
dを引数とする。そして、ロック用データ識別子idに
対応するデータに以後アクセスするプロセスを任意のプ
ロセッサに割り付けることを可能にする機能を有する。
The lock release (procedure name unlock) 406 is
The lock data identifier i obtained in the lock initialization 402
Let d be an argument. Then, it has a function of assigning a process that subsequently accesses data corresponding to the lock data identifier id to an arbitrary processor.

【0016】図5は、ロック初期化402、ロック獲得
404、ロック解放406の各手続きを含むプログラム
命令列の例示図である。共有データにアクセスする複数
のプロセス間で相互排除を行うべき命令列505の前に
ロック獲得404を置き、後にロック解放406を置
く。そして、ロック獲得404より前にロック初期化4
02を置く。なお、ロック獲得404とロック解放40
6に挟まれた命令列505を危険領域という。
FIG. 5 is a view showing an example of a program instruction sequence including procedures of lock initialization 402, lock acquisition 404, and lock release 406. A lock acquisition 404 is placed before an instruction sequence 505 to be mutually excluded between a plurality of processes accessing the shared data, and a lock release 406 is placed after. And lock initialization 4 before lock acquisition 404
Put 02. Note that lock acquisition 404 and lock release 40
The instruction sequence 505 sandwiched between 6 is called a dangerous area.

【0017】図6は、ロック初期化402の処理を示す
PAD図である。ステップ601では、ロック用データ
格納領域110を確保し、これを構造体lock_dataとす
る。ロック用データ格納領域110のロック用変数格納
領域111、ロック獲得フラグ格納領域112、割付プ
ロセッサ番号格納領域113および待機プロセスリスト
114は、それぞれ構造体lock_dataのメンバlock、an
ybody、processor、listとなる。ステップ602では、
構造体lock_dataのメンバlock、anybody、processor、
listに初期値を設定する。メンバlockの初期値FALSE
は、対応するデータが相互排除されていないことを意味
する。メンバanybody の初期値NO_PROCESSは、対応する
データにアクセス中のプロセスがないことを意味する。
メンバprocessor の初期値−1は、対応するデータにア
クセスするプロセスがプロセッサに割り付けられていな
いことを意味する。メンバlistの初期値は、空(待機プ
ロセスがない)を意味する識別子とする。ステップ60
3では、ロック用データ構造体lock_dataにロック用デ
ータ識別子idを与える。ステップ604では、引数の
アドレスidpが指す変数格納領域にロック用データ識
別子idを格納する。ステップ605では、ロック初期
化402の呼び出し元に戻る。
FIG. 6 is a PAD diagram showing the processing of lock initialization 402. In step 601, a lock data storage area 110 is secured, and this is defined as a structure lock_data. The lock variable storage area 111, the lock acquisition flag storage area 112, the assigned processor number storage area 113, and the standby process list 114 of the lock data storage area 110 are members of the lock_data structure lock_data, respectively.
ybody, processor, and list. In step 602,
The members lock, anybody, processor, of the structure lock_data,
Set the initial value in list. Initial value of member lock FALSE
Means that the corresponding data is not mutually exclusive. The initial value NO_PROCESS of the member anybody means that no process is accessing the corresponding data.
The initial value -1 of the member "processor" means that the process for accessing the corresponding data is not assigned to the processor. The initial value of the member list is an identifier meaning empty (there is no standby process). Step 60
In 3, the lock data structure lock_data is given a lock data identifier id. In step 604, the lock data identifier id is stored in the variable storage area indicated by the argument address idp. In step 605, the process returns to the caller of the lock initialization 402.

【0018】図7は、ロック獲得404の処理を示すP
AD図である。ステップ701では、第1引数のロック
用データ識別子idに対応するロック用データ構造体lo
ck_dataを得る。ステップ702では、第2引数のフラ
グflagの値を判定し、値が1〜N(プロセッサ番号)か
又は−1(プロセスを一定のプロセッサに割り付ける識
別子)ならステップ703へ進み、値が−2ならステッ
プ704へ進む。ステップ703では、新規ロック獲得
703の手続きを実行する。この新規ロック獲得703
の詳細な内容は図8を参照して後述する。
FIG. 7 shows the process of lock acquisition 404.
It is an AD diagram. In step 701, a lock data structure lo corresponding to the lock data identifier id of the first argument
Get ck_data. In step 702, the value of the flag flag of the second argument is determined. If the value is 1 to N (processor number) or -1 (identifier for assigning a process to a certain processor), the process proceeds to step 703; Proceed to step 704. In step 703, a procedure for acquiring a new lock 703 is executed. This new lock acquisition 703
Will be described later with reference to FIG.

【0019】ステップ704,705では、一命令でメ
モリに対する読み書きを不可分に実行できるTS(Test
and Set)命令を使用して、ロック用データ構造体lock
_dataのメンバlockの値をtrueにする。なお、ステップ
705は、他プロセッサが危険領域の命令列を実行して
いる場合には、その危険領域の実行が終了するまで待つ
処理である。TS命令の詳細は「オペレーティング・シ
ステムの機能と構成、高橋他、岩波書店、1983、1
47頁」に記載されている。TS命令により、ステップ
706からステップ707の処理2またはステップ70
9の処理2までの処理は、ただ一つのプロセッサで実行
されることが保証される。
In steps 704 and 705, a TS (Test) which can read / write the memory indivisiblely by one instruction.
and Set) instructions to use the lock data structure lock
Set the value of the member lock of _data to true. Step 705 is processing to wait until the execution of the dangerous area is completed when another processor is executing the instruction sequence of the dangerous area. For details of the TS instruction, see "Functions and Configuration of Operating System, Takahashi et al., Iwanami Shoten, 1983, 1.
47 ". According to the TS instruction, the processing 2 of step 706 to step 707 or step 70
It is guaranteed that the processing up to the processing 2 of 9 is executed by only one processor.

【0020】ステップ706では、ロック用データ構造
体lock_dataのメンバanybody の値がNO_PROCESSか否か
を判定し、値がNO_PROCESSなら(すなわち、危険領域の
命令列5を他プロセスが実行していないなら)ステップ
707へ進み、値がNO_PROCESSでないなら(すなわち、
危険領域の命令列を他プロセスが実行しているなら)ス
テップ709へ進む。
In step 706, it is determined whether or not the value of the member anybody of the lock data structure lock_data is NO_PROCESS. If the value is NO_PROCESS (that is, if another process is not executing the instruction string 5 in the dangerous area) Proceed to step 707 and if the value is not NO_PROCESS (ie,
The process proceeds to step 709 (if another process is executing the instruction string in the dangerous area).

【0021】ステップ707では、処理1で、ロック用
データ構造体lock_dataのメンバanybody の値をEXIST
_PROCESSにする。また、処理2で、ロック用データ構
造体lock_dataのメンバlockの値をFALSE にする。ステ
ップ708では、ロック獲得404の呼び出し元に戻
る。
In step 707, in process 1, the value of member “anybody” of the lock data structure lock_data is set to EXIST
_PROCESS. In the process 2, the value of the member lock of the lock data structure lock_data is set to FALSE. In step 708, the process returns to the caller of the lock acquisition 404.

【0022】ステップ709では、処理1で、ロック用
データ構造体lock_dataのメンバlistに自プロセスを登
録し、他プロセスの実行終了を待つ。処理2で、ロック
用データ構造体lock_dataのメンバlockの値をFALSE に
する。ステップ710では、処理1で、プロセス管理表
117の自プロセスの実行状態203を“中断”にす
る。処理2で、自プロセスを実行していたプロセッサの
レジスタの内容を退避し、その退避した領域のアドレス
をプロセス管理表117のレジスタ退避領域204に格
納する。処理3で、実行中プロセス管理表116から自
プロセスのプロセス番号を削除する。ステップ711で
は、自プロセスを実行していたプロセッサに他の“実行
可能”状態にあるプロセスを割り付けるために、プロセ
ス切り替え711の手続きを実行する。このプロセス切
り替え711の詳細な内容は図11を参照して後述す
る。ステップ712では、ロック獲得404の呼び出し
元に戻る。
In step 709, in process 1, the own process is registered in the member list of the lock data structure lock_data, and the execution of the other process is waited. In process 2, the value of the member lock of the lock data structure lock_data is set to FALSE. In step 710, in process 1, the execution state 203 of the own process in the process management table 117 is set to “interrupted”. In process 2, the contents of the register of the processor executing the own process are saved, and the address of the saved area is stored in the register save area 204 of the process management table 117. In process 3, the process number of the own process is deleted from the running process management table 116. In step 711, the procedure of the process switching 711 is executed in order to allocate another process in the “executable” state to the processor that has executed the own process. The details of the process switching 711 will be described later with reference to FIG. In step 712, the process returns to the caller of the lock acquisition 404.

【0023】図8は、新規ロック獲得703の処理を示
すPAD図である。ステップ801,802では、一命
令でメモリに対する読み書きを不可分に実行できるTS
命令を使用して、ロック用データ構造体lock_dataのメ
ンバlockの値をtrueにする。なお、ステップ802は、
他プロセッサが危険領域の命令列を実行している場合に
は、その危険領域の実行が終了するまで待つ処理であ
る。TS命令により、ステップ801からステップ80
8の処理3またはステップ812の処理3までの処理
は、ただ一つのプロセッサで実行されることが保証され
る。
FIG. 8 is a PAD diagram showing the process of acquiring a new lock 703. In steps 801 and 802, a TS which can execute reading and writing to the memory indivisiblely by one instruction
An instruction is used to set the value of the member lock of the lock data structure lock_data to true. Step 802 is
If the other processor is executing the instruction sequence in the dangerous area, the process waits until the execution of the dangerous area is completed. According to the TS instruction, steps 801 to 80
The processing up to the processing 3 of step 8 or the processing 3 of step 812 is guaranteed to be executed by only one processor.

【0024】ステップ803では、第1引数で指定され
たロック用データ構造体lock_dataのメンバprocessor
の値が−1か否かを判定し、−1(プロセスがプロセッ
サに割り付けられていない)ならステップ804に進
み、−1でないならステップ807へ進む。ステップ8
04では、第2引数のフラグflagの値がプロセッサ番号
(1〜N)か否かを判定し、プロセッサ番号(1〜N)
ならステップ805へ進み、フラグflagの値がプロセッ
サ番号でない(−1)ならステップ806へ進む。ステ
ップ805では、フラグflagの値であるプロセッサ番号
(1〜N)をロック用データ構造体lock_dataのメンバ
processor の値に設定する。そして、ステップ807へ
進む。
At step 803, the member processor of the lock data structure lock_data specified by the first argument
Is determined to be -1 or not, and if -1 (the process is not assigned to a processor), the process proceeds to step 804; otherwise, the process proceeds to step 807. Step 8
At 04, it is determined whether or not the value of the flag flag of the second argument is a processor number (1 to N), and the processor number (1 to N) is determined.
If the value of the flag is not a processor number (−1), the process proceeds to step 806. At step 805, the processor number (1 to N), which is the value of the flag, is set to a member of the lock data structure lock_data.
Set to the value of processor. Then, the process proceeds to step 807.

【0025】ステップ806では、自プロセスが割り付
けられているプロセッサ番号を実行中プロセス管理表1
16から調べて、そのプロセッサ番号をロック用データ
構造体lock_dataのメンバprocessor の値に設定する。
なお、共有データが現時点で存在しているキャッシュに
対応するプロセッサの番号を調べて、そのプロセッサ番
号をロック用データ構造体lock_dataのメンバprocesso
r の値に設定してもよい。そして、ステップ807へ進
む。
In step 806, the processor number to which the own process is assigned is stored in the running process management table 1
The processor number is checked, and the processor number is set to the value of the member processor of the lock data structure lock_data.
The number of the processor corresponding to the cache in which the shared data currently exists is checked, and the processor number is determined by the member processo of the lock data structure lock_data.
May be set to the value of r. Then, the process proceeds to step 807.

【0026】ステップ807では、ロック用データ構造
体lock_dataのメンバanybody の値がNO_PROCESSか否か
を判定し、値がNO_PROCESSなら(すなわち、危険領域の
命令列を他プロセスが実行していないなら)ステップ8
08へ進み、値がNO_PROCESSでないなら(すなわち、危
険領域の命令列を他プロセスが実行しているなら)ステ
ップ812へ進む。
In step 807, it is determined whether or not the value of the member anybody of the lock data structure lock_data is NO_PROCESS. If the value is NO_PROCESS (that is, if another process is not executing the instruction sequence of the dangerous area) 8
08, if the value is not NO_PROCESS (that is, if another process is executing the instruction sequence in the dangerous area), the process proceeds to step 812.

【0027】ステップ808では、処理1で、ロック用
データ構造体lock_dataのメンバanybody の値をEXIST
_PROCESSにする。また、処理2で、ロック用データ構
造体lock_dataのメンバprocessor の値をプロセス管理
表117の割付プロセッサ番号206に設定する。ま
た、処理3で、ロック用データ構造体lock_dataのメン
バlockの値をFALSE にする。ステップ809では、ロッ
ク用データ構造体lock_dataのメンバprocessor の値と
自プロセスが割り付けられているプロセッサ番号とが不
一致か否かを判定し、不一致ならステップ810へ進
み、一致ならステップ811へ進む。ステップ810で
は、処理1で、プロセス管理表117の自プロセスの実
行状態203を“実行可能”にする。処理2で、自プロ
セスを実行していたプロセッサのレジスタの内容を退避
し、その退避した領域のアドレスをプロセス管理表11
7のレジスタ退避領域204に格納する。処理3で、実
行可能プロセスリスト118に自プロセスのプロセス番
号を登録する。処理4で、実行中プロセス管理表116
から自プロセスのプロセス番号を削除する。ステップ7
11では、自プロセスを実行していたプロセッサに他の
“実行可能”状態にあるプロセスを割り付けるために、
プロセス切り替え711の手続きを実行する。このプロ
セス切り替え711の詳細な内容は図11を参照して後
述する。そして、ステップ811へ進む。ステップ81
1では、新規ロック獲得703の呼び出し元に戻る。
In step 808, in process 1, the value of the member anybody of the lock data structure lock_data is set to EXIST
_PROCESS. In process 2, the value of the member processor of the lock data structure lock_data is set to the assigned processor number 206 of the process management table 117. In process 3, the value of the member lock of the lock data structure lock_data is set to FALSE. In step 809, it is determined whether or not the value of the member processor of the lock data structure lock_data and the processor number to which the own process is assigned do not match. If the values do not match, the process proceeds to step 810; In step 810, in process 1, the execution state 203 of the own process in the process management table 117 is set to “executable”. In process 2, the contents of the register of the processor executing the own process are saved, and the address of the saved area is stored in the process management table 11.
7 in the register save area 204. In process 3, the process number of the own process is registered in the executable process list 118. In process 4, the running process management table 116
From the process number of the own process. Step 7
In step 11, in order to allocate another “executable” process to the processor that was executing the process,
The procedure of the process switching 711 is executed. The details of the process switching 711 will be described later with reference to FIG. Then, the process proceeds to step 811. Step 81
At 1, the process returns to the caller of the new lock acquisition 703.

【0028】ステップ812では、処理1で、ロック用
データ構造体lock_dataのメンバlistに自プロセスを登
録し、他プロセスの実行終了を待つ。処理2で、ロック
用データ構造体lock_dataのメンバprocessor の値をプ
ロセス管理表117の割付プロセッサ番号206に設定
する。処理3で、ロック用データ構造体lock_dataのメ
ンバlockの値をFALSE にする。ステップ813では、処
理1で、プロセス管理表117の自プロセスの実行状態
203を“中断”にする。処理2で、自プロセスを実行
していたプロセッサのレジスタの内容を退避し、その退
避した領域のアドレスをプロセス管理表117のレジス
タ退避領域204に格納する。処理3で、実行中プロセ
ス管理表116から自プロセスのプロセス番号を削除す
る。ステップ711では、自プロセスを実行していたプ
ロセッサに他の“実行可能”状態にあるプロセスを割り
付けるために、プロセス切り替え711の手続きを実行
する。このプロセス切り替え711の詳細な内容は図1
1を参照して後述する。ステップ814では、新規ロッ
ク獲得703の呼び出し元に戻る。
In step 812, in process 1, the own process is registered in the member list of the lock data structure lock_data, and the execution of another process is waited for. In process 2, the value of the member processor of the lock data structure lock_data is set to the assigned processor number 206 of the process management table 117. In process 3, the value of the member lock of the lock data structure lock_data is set to FALSE. In step 813, in process 1, the execution state 203 of the own process in the process management table 117 is set to “interrupted”. In process 2, the contents of the register of the processor executing the own process are saved, and the address of the saved area is stored in the register save area 204 of the process management table 117. In process 3, the process number of the own process is deleted from the running process management table 116. In step 711, the procedure of the process switching 711 is executed in order to allocate another process in the “executable” state to the processor that has executed the own process. The detailed contents of this process switching 711 are shown in FIG.
1 will be described later. In step 814, the process returns to the caller of the new lock acquisition 703.

【0029】図9は、ロック解放406の処理を示すP
AD図である。ステップ901では、新規ロック解放9
01の手続きを実行する。この新規ロック解放911の
詳細な内容は図10を参照して後述する。ステップ90
2では、引数のロック用データ識別子idに対応するロ
ック用データ構造体lock_dataを得る。ステップ90
3,904では、一命令でメモリに対する読み書きを不
可分に実行できるTS命令を使用して、ロック用データ
構造体lock_dataのメンバlockの値をtrueにする。な
お、ステップ904は、危険領域の命令列を実行してい
る場合には、その危険領域の実行が終了するまで待つ処
理である。TS命令により、ステップ905からステッ
プ906の処理2またはステップ908の処理2までの
処理は、ただ一つのプロセッサで実行されることが保証
される。
FIG. 9 is a flowchart showing the process of lock release 406.
It is an AD diagram. In step 901, new lock release 9
Execute procedure 01. The details of the new lock release 911 will be described later with reference to FIG. Step 90
In step 2, a lock data structure lock_data corresponding to the lock data identifier id of the argument is obtained. Step 90
In 3,904, the value of the member lock of the lock data structure lock_data is set to true by using a TS instruction that can execute reading and writing to and from the memory inseparably with one instruction. Step 904 is processing to wait for the execution of the dangerous area when the instruction sequence of the dangerous area is being executed. The TS instruction guarantees that the processes from step 905 to step 906 or step 908 to step 2 are executed by only one processor.

【0030】ステップ905では、ロック用データ構造
体lock_dataのメンバlistが空か否かを判定し、空なら
(すなわち、他プロセスが待機していないなら)ステッ
プ906へ進み、空でないなら(すなわち、他プロセス
が待機しているなら)ステップ908へ進む。
In step 905, it is determined whether or not the member list of the lock data structure lock_data is empty. If the member list is empty (that is, if no other process is waiting), the process proceeds to step 906. If not, the process proceeds to step 906. Go to step 908 (if another process is waiting).

【0031】ステップ906では、処理1で、ロック用
データ構造体lock_dataのメンバflagの値にNO_PROCESS
を設定する。処理2で、ロック用データ構造体lock_da
taのメンバlockの値をFALSE にする。ステップ907で
は、ロック解放406の呼び出し元に戻る。
In step 906, in process 1, NO_PROCESS is added to the value of the member flag of the lock data structure lock_data.
Set. In processing 2, the lock data structure lock_da
Set the value of the member lock of ta to FALSE. In step 907, the process returns to the caller of the lock release 406.

【0032】ステップ908では、処理1で、ロック用
データ構造体lock_dataのメンバlistから待機している
プロセスを一つ取り出す。処理2で、ロック用データ構
造体lock_dataのメンバlockの値をFALSE にする。ステ
ップ909では、処理1で、プロセス管理表117の前
記取り出したプロセスの実行状態203を“中断”から
“実行可能”に変更する。処理2で、実行可能プロセス
リスト118に前記取り出したプロセスのプロセス番号
を登録する。処理3で、ロック解放406の呼び出し元
に戻る。
In step 908, in process 1, one waiting process is extracted from the member list of the lock data structure lock_data. In process 2, the value of the member lock of the lock data structure lock_data is set to FALSE. In step 909, in process 1, the execution state 203 of the extracted process in the process management table 117 is changed from "interrupted" to "executable". In process 2, the process number of the extracted process is registered in the executable process list 118. In process 3, the process returns to the caller of the lock release 406.

【0033】図10は、新規ロック解放901の処理を
示すPAD図である。ステップ901aでは、ロック獲
得404のステップ808の処理2またはステップ81
2の処理2で設定したプロセス管理表117の割付プロ
セッサ番号206の値をクリアする。割付プロセッサ番
号206の値がクリアされると、対応するプロセスを任
意のプロセッサに割り付け可能となる。ステップ901
bでは、新規ロック解放901の呼び出し元に戻る。
FIG. 10 is a PAD diagram showing processing of the new lock release 901. In step 901a, the processing 2 of step 808 of the lock acquisition 404 or step 81
The value of the assigned processor number 206 in the process management table 117 set in the process 2 of the step 2 is cleared. When the value of the assigned processor number 206 is cleared, the corresponding process can be assigned to an arbitrary processor. Step 901
At b, the process returns to the caller of the new lock release 901.

【0034】図11は、プロセス切り替え711の処理
を示すPAD図である。ステップ1003では、実行可
能プロセスリスト118からプロセスを一つ選択する。
このとき、実行可能プロセスリストの先頭のプロセスを
選択してもよいし、優先度を導入してその優先度の一番
高いプロセスを選択してもよい。なお、ステップ100
7から戻ってきてステップ1003を再実行したとき
は、先に選択したプロセス以外のプロセスを選択する。
FIG. 11 is a PAD diagram showing the process switching process 711. In step 1003, one process is selected from the executable process list 118.
At this time, the process at the head of the executable process list may be selected, or the process with the highest priority may be selected by introducing a priority. Step 100
7, when step 1003 is executed again, a process other than the previously selected process is selected.

【0035】ステップ1004では、選択したプロセス
のプロセス管理表117の割付プロセッサ番号206が
設定されているか否かを判定し、設定されている場合は
ステップ1005へ進み、設定されていない場合はステ
ップ1009へ進む。ステップ1005では、設定され
ている割付プロセッサ番号206と自プロセッサ(プロ
セス切り替え711を実行しているプロセッサ)の番号
が一致するか否かを判定し、一致した場合にはステップ
1009へ進み、一致しない場合にはステップ1007
へ進む。ステップ1007では、前記ステップ1003
に戻り、先に選択したプロセス以外のプロセスを選択す
る。
In step 1004, it is determined whether or not the assigned processor number 206 in the process management table 117 of the selected process is set. If it is set, the process proceeds to step 1005. If not, step 1009 is performed. Proceed to. In step 1005, it is determined whether or not the assigned processor number 206 and the number of its own processor (the processor executing the process switching 711) match. If they match, the process proceeds to step 1009, and does not match. Step 1007 in case
Proceed to. In Step 1007, Step 1003
Return to and select a process other than the previously selected process.

【0036】ステップ1009では、処理1で、前記選
択したプロセスを実行可能プロセスリスト118から削
除する。処理2で、プロセス管理表117の前記選択し
たプロセスの実行状態203を“実行可能”から“実行
中”に変更する。処理3で、プロセス管理表117の前
記選択したプロセスのレジスタ退避領域204により自
プロセッサのレジスタに内容を復帰する。処理4で、前
記選択したプロセスの番号を実行中プロセス管理表11
6に登録する。処理5で、プロセス切り替え711の呼
び出し元に戻る。
In step 1009, in the process 1, the selected process is deleted from the executable process list 118. In process 2, the execution state 203 of the selected process in the process management table 117 is changed from "executable" to "executing". In process 3, the contents are restored to the register of the own processor by the register save area 204 of the selected process in the process management table 117. In process 4, the number of the selected process is stored in the running process management table 11
Register in 6. In process 5, the process returns to the call source of the process switching 711.

【0037】なお、上記プロセス切り替え711は、タ
イマー割り込み等が発生した時も呼び出される。その
時、タイマー割り込み発生を受け取ったプロセッサは、
実行中であったプロセスのレジスタ内容を退避し、その
プロセスの実行状態を“実行中”から“実行可能”に変
更し、そのプロセスを実行可能プロセスリストに登録し
た後、プロセス切り替え711を呼び出す。
The process switching 711 is also called when a timer interrupt or the like occurs. At that time, the processor receiving the timer interrupt generation
The contents of the register of the process being executed are saved, the execution state of the process is changed from "in execution" to "executable", and the process is registered in the executable process list, and then the process switch 711 is called.

【0038】以上のマルチプロセッサ計算機システム1
01によれば、共有データにアクセスする命令列505
をロック獲得404とロック解放406とで挟むと共に
ロック獲得404の第2引数でプロセッサ102(1)〜
102(N)を指定することにより、共有データにアクセ
スするプロセスを指定したプロセッサに割り付けること
が出来る。このため、キャッシュ103(1)〜103
(N)間での無駄なデータ転送がなくなり、システム全体
の実行効率を向上させることができる。
The above multiprocessor computer system 1
According to the instruction sequence 505 for accessing the shared data,
Are interposed between the lock acquisition 404 and the lock release 406, and the processor 102 (1)-
By designating 102 (N), a process for accessing the shared data can be allocated to the designated processor. Therefore, the caches 103 (1) to 103 (103)
Useless data transfer between (N) is eliminated, and the execution efficiency of the entire system can be improved.

【0039】[0039]

【発明の効果】本発明のプロセッサ割付方法およびマル
チプロセッサ計算機システムによれば、共有データにア
クセスする複数のプロセスを同一のプロセッサに割り付
けるため、キャッシュ間の無駄なデータ転送がなくな
り、システム全体の実行効率を向上させることができ
る。
According to the processor allocating method and the multiprocessor computer system of the present invention, a plurality of processes accessing shared data are allocated to the same processor, so that unnecessary data transfer between caches is eliminated and the entire system is executed. Efficiency can be improved.

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

【図1】本発明の一実施形態にかかるマルチプロセッサ
計算機システムのブロック図である。
FIG. 1 is a block diagram of a multiprocessor computer system according to an embodiment of the present invention.

【図2】図1のマルチプロセッサ計算機システムのプロ
セス管理表の構成図である。
FIG. 2 is a configuration diagram of a process management table of the multiprocessor computer system of FIG. 1;

【図3】図1のマルチプロセッサ計算機システムの実行
中プロセス管理表の構成図である。
FIG. 3 is a configuration diagram of a process management table during execution of the multiprocessor computer system of FIG. 1;

【図4】ロック初期化、ロック獲得、ロック解放の各手
続きの説明図である。
FIG. 4 is an explanatory diagram of each procedure of lock initialization, lock acquisition, and lock release.

【図5】ロック初期化、ロック獲得、ロック解放の各手
続きを含むプログラム命令列の例示図である。
FIG. 5 is an exemplary diagram of a program instruction sequence including lock initialization, lock acquisition, and lock release procedures.

【図6】ロック初期化手続きの処理を示すPAD図であ
る。
FIG. 6 is a PAD diagram showing a process of a lock initialization procedure.

【図7】ロック獲得手続きの処理を示すPAD図であ
る。
FIG. 7 is a PAD showing a lock acquisition procedure.

【図8】新規ロック獲得手続きの処理を示すPAD図で
ある。
FIG. 8 is a PAD diagram showing a process of a new lock acquisition procedure.

【図9】ロック解放手続きの処理を示すPAD図であ
る。
FIG. 9 is a PAD diagram showing processing of a lock release procedure.

【図10】新規ロック解放手続きの処理を示すPAD図
である。
FIG. 10 is a PAD diagram showing processing of a new lock release procedure.

【図11】プロセス切り替え手続きの処理を示すPAD
図である。
FIG. 11 is a PAD showing processing of a process switching procedure;
FIG.

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

101:マルチプロセッサ計算機システム、102:プ
ロセッサ、103:キャッシュ、104:2次記憶装
置、105:システム・バス、106:メインメモリ、
107:ロック初期化手続き格納領域、108:ロック
獲得手続き格納領域、109:ロック解放手続き格納領
域、110:ロック用データ格納領域、111:ロック
用変数格納領域、112:ロック獲得フラグ格納領域、
113:割付プロセッサ番号格納領域、114:待機プ
ロセスリスト、116:実行中プロセス管理表、11
7:プロセス管理表、118:実行可能プロセスリス
ト、119:プロセス切り替え手続き格納領域、40
2:ロック初期化手続き(命令)、404:ロック獲得
手続き(命令)、406:ロック解放手続き(命令)。
101: multiprocessor computer system, 102: processor, 103: cache, 104: secondary storage device, 105: system bus, 106: main memory,
107: lock initialization procedure storage area, 108: lock acquisition procedure storage area, 109: lock release procedure storage area, 110: lock data storage area, 111: lock variable storage area, 112: lock acquisition flag storage area,
113: assigned processor number storage area, 114: standby process list, 116: running process management table, 11
7: process management table, 118: executable process list, 119: process switching procedure storage area, 40
2: Lock initialization procedure (command), 404: Lock acquisition procedure (command), 406: Lock release procedure (command).

───────────────────────────────────────────────────── フロントページの続き (72)発明者 堀川 和雄 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所情報・通信開発本部内 (72)発明者 林 剛久 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所情報・通信開発本部内 (72)発明者 山田 公稔 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウエア開発本部 ──────────────────────────────────────────────────続 き Continuing from the front page (72) Kazuo Horikawa 890 Kashimada, Saiwai-ku, Kawasaki-shi, Kanagawa Prefecture 12 Information and Communication Development Division, Hitachi, Ltd. Address No. 12 Hitachi, Ltd.Information and Communication Development Headquarters

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 複数のプロセッサとそれらプロセッサに
それぞれ対応するキャッシュとを有するマルチプロセッ
サ計算機システムにおけるプロセッサ割付方法であっ
て、 複数のプロセスが共有データにアクセスするとき、それ
らプロセスを同一のプロセッサに割り付けることを特徴
とするプロセッサ割付方法。
A processor allocation method in a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, wherein when a plurality of processes access shared data, the processes are allocated to the same processor. A processor allocation method characterized by the above-mentioned.
【請求項2】 複数のプロセッサとそれらプロセッサに
それぞれ対応するキャッシュとを有するマルチプロセッ
サ計算機システムにおけるプロセッサ割付方法であっ
て、 ある命令列の前に、プロセッサを指定しうる相互排除開
始命令を配置し、前記命令列の後に、プロセッサの指定
を解除しうる相互排除終了命令を配置し、前記相互排除
開始命令でプロセッサが指定されている場合、その指定
されたプロセッサにより前記相互排除開始命令と前記相
互排除終了命令で挟まれた前記命令列を実行し、前記相
互排除開始命令でプロセッサが指定されていない場合、
任意のプロセッサにより前記相互排除開始命令と前記相
互排除終了命令で挟まれた前記命令列を実行することを
特徴とするプロセッサ割付方法。
2. A processor allocation method in a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, wherein a mutual exclusion start instruction capable of designating a processor is arranged before a certain instruction sequence. After the instruction sequence, a mutual exclusion end instruction capable of canceling the designation of a processor is arranged, and when a processor is specified by the mutual exclusion start instruction, the mutual exclusion start instruction and the mutual exclusion instruction are designated by the specified processor. When the instruction sequence sandwiched between the exclusion end instructions is executed, and the processor is not specified in the mutual exclusion start instruction,
A processor allocation method, wherein the instruction sequence sandwiched between the mutual exclusion start instruction and the mutual exclusion end instruction is executed by an arbitrary processor.
【請求項3】 複数のプロセッサとそれらプロセッサに
それぞれ対応するキャッシュとを有するマルチプロセッ
サ計算機システムにおいて、 相互排除開始命令によりプロセッサが指定されている場
合は、その指定されたプロセッサにより、前記相互排除
開始命令から後の命令を実行させ、相互排除終了命令を
実行すると、任意のプロセッサにより、前記相互排除終
了命令から後の命令を実行させるプロセッサ割付制御手
段を具備することを特徴とするマルチプロセッサ計算機
システム。
3. In a multiprocessor computer system having a plurality of processors and caches respectively corresponding to the processors, when a processor is specified by a mutual exclusion start instruction, the specified processor starts the mutual exclusion. A multiprocessor computer system comprising: a processor assignment control unit for executing an instruction subsequent to the instruction and executing the mutual exclusion end instruction, and executing an instruction subsequent to the mutual exclusion end instruction by an arbitrary processor. .
JP8317496A 1996-11-28 1996-11-28 Processor allocating method, and multiprocessor computer system Pending JPH10161985A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8317496A JPH10161985A (en) 1996-11-28 1996-11-28 Processor allocating method, and multiprocessor computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8317496A JPH10161985A (en) 1996-11-28 1996-11-28 Processor allocating method, and multiprocessor computer system

Publications (1)

Publication Number Publication Date
JPH10161985A true JPH10161985A (en) 1998-06-19

Family

ID=18088886

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8317496A Pending JPH10161985A (en) 1996-11-28 1996-11-28 Processor allocating method, and multiprocessor computer system

Country Status (1)

Country Link
JP (1) JPH10161985A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7500036B2 (en) 2000-12-28 2009-03-03 International Business Machines Corporation Quad aware locking primitive
WO2010137233A1 (en) * 2009-05-28 2010-12-02 パナソニック株式会社 Power saving control device for multiprocessor system, and mobile terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7500036B2 (en) 2000-12-28 2009-03-03 International Business Machines Corporation Quad aware locking primitive
US7979617B2 (en) 2000-12-28 2011-07-12 International Business Machines Corporation Quad aware locking primitive
WO2010137233A1 (en) * 2009-05-28 2010-12-02 パナソニック株式会社 Power saving control device for multiprocessor system, and mobile terminal

Similar Documents

Publication Publication Date Title
US5845129A (en) Protection domains in a single address space
US4914570A (en) Process distribution and sharing system for multiple processor computer system
JP2633488B2 (en) Method and system for performing parallel processing
US5502840A (en) Method and apparatus for advising a requesting process of a contention scheme to employ to access a shared resource
JPH11505653A (en) Operating system for use with protection domains in a single address space
JPH01188965A (en) Data processing
JPH05210637A (en) Method of simultaneously controlling access
JPH05127995A (en) Method for securing consistency between pages which are in common with local cache
JP2004326753A (en) Management of lock in virtual computer environment
US5317749A (en) Method and apparatus for controlling access by a plurality of processors to a shared resource
JPH076115A (en) Control method of hardware data movement function by software user of data- processing system, synchronization method of operation between processors and method for giving of plurality of device control blocks
JP2002268933A (en) Cluster system
JPH09311839A (en) Data sharing system
EP0319148A2 (en) Method of operating a multi-processor system for the transfer of data between processor units
JP2829115B2 (en) File sharing method
JPH10161985A (en) Processor allocating method, and multiprocessor computer system
US20130014123A1 (en) Determination of running status of logical processor
WO2007088582A1 (en) Asynchronous remote procedure calling method in shared-memory multiprocessor, asynchronous remote procedure calling program, and recording medium
JPH05224956A (en) Inter-process message communication method
JPH0519179B2 (en)
JP2588175B2 (en) Hash table entry exclusive processing device
JP2787107B2 (en) Buffer control system and device
JPH03116261A (en) Multiprocessor control system
JP2535584B2 (en) Real memory fixed processing computer
JP3585956B2 (en) Information processing apparatus and method