JPH07319825A - Lock control system for shared table - Google Patents

Lock control system for shared table

Info

Publication number
JPH07319825A
JPH07319825A JP13832894A JP13832894A JPH07319825A JP H07319825 A JPH07319825 A JP H07319825A JP 13832894 A JP13832894 A JP 13832894A JP 13832894 A JP13832894 A JP 13832894A JP H07319825 A JPH07319825 A JP H07319825A
Authority
JP
Japan
Prior art keywords
lock
shared
save
unlock
restoration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP13832894A
Other languages
Japanese (ja)
Other versions
JP2605623B2 (en
Inventor
Kenichi Kubota
健一 久保田
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 JP13832894A priority Critical patent/JP2605623B2/en
Publication of JPH07319825A publication Critical patent/JPH07319825A/en
Application granted granted Critical
Publication of JP2605623B2 publication Critical patent/JP2605623B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To unlock a shared table by automatically restoring the shared table to an original state when an program interruption is generated during the locking of the shared table. CONSTITUTION:When a lock request to a table 111 is outputted from a process 4, a locking mechanism 6 locks the table 111 and then accesses a table retreating/restoring mechanism 10 to retreat the table 111 to a table retreating area 2. The process 4 executes processing for referring and updating the table 111, but if a program interruption is generated before the end of the processing, control is transferred to an exception handler 5. The handler 5 outputs an unlock request specifying a restoration request to an unlocking mechanism 7, which restores the table 111 retreated to the retreating area 2 to a table group 1 and then unlocks the table 111.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、マルチプロセッサシス
テムにおける共有テーブルのロック制御方式に関し、特
に、共有テーブルのロック中にプログラム割り込みが発
生した場合に、自動的に共有テーブルを元の状態に復元
してロックを解除するようにした共有テーブルのロック
制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a lock control method for a shared table in a multiprocessor system, and more particularly, it automatically restores the shared table to its original state when a program interrupt occurs while the shared table is locked. The present invention relates to a lock control method for a shared table that is configured to release a lock.

【0002】[0002]

【従来の技術】マルチプロセッサシステムにおいては、
各プロセッサ毎に別々のプロセス(タスクとも言う)が
同時に実行される処理形態となるため、プロセス間で共
通に使用する主記憶上のテーブルを排他使用し、一時的
には唯一のプロセスのみが該当するテーブルを参照,更
新し得るようにロック制御する必要がある。ここで、プ
ロセス間で共通に使用する主記憶上のテーブルとして
は、資源の割り当て処理などで参照,更新される、各資
源対応の管理テーブル(その資源の利用状態などを管理
するテーブル)などがある。
2. Description of the Related Art In a multiprocessor system,
Since different processes (also called tasks) are executed simultaneously for each processor, the table on the main memory that is shared by the processes is exclusively used, and only one process is temporarily applicable. It is necessary to lock the table so that it can be referenced and updated. Here, as a table on the main memory that is commonly used among processes, there is a management table (a table that manages the usage status of the resource, etc.) corresponding to each resource that is referred to and updated in resource allocation processing and the like. is there.

【0003】ところで、共有テーブルのロック制御を行
うマルチプロセッサシステムにおいては、或る共有テー
ブルをロックしたプロセスの実行中にプログラム割り込
みが発生して処理中断した場合に、そのロックを如何に
するかが問題となる。
By the way, in a multiprocessor system for controlling the lock of a shared table, if a program interrupt occurs during the execution of a process that locks a certain shared table and the processing is interrupted, how to lock the shared table is decided. It becomes a problem.

【0004】例えば、特開平1−261771号公報で
は、或る共有テーブルをロックしたプロセスが割り込み
により処理中断した場合、その共有テーブルをロックし
たままにしているが、若し、割り込み処理において同テ
ーブルを参照,更新する必要があってロックを試みる
と、既にロック済みなのでデッドロック状態が発生して
しまうという問題がある。
For example, in Japanese Patent Laid-Open No. 1-261771, when a process that locks a certain shared table interrupts the process due to an interrupt, the shared table is kept locked. There is a problem that if you try to lock because it is necessary to refer to and update, a deadlock state occurs because it has already been locked.

【0005】このような問題は、上記プロセスの処理中
断時に強制的に共有テーブルをアンロックすることで一
見解消されるように考えられるが、上記プロセスが処理
中断前に共有テーブルを完全に更新し終えていないと、
共有テーブルの内容が不完全なままアンロックされるこ
とになり、その後に共有テーブルを参照,更新する動作
において誤動作を招来することになる。
This kind of problem seems to be solved by forcibly unlocking the shared table when the above process is interrupted, but the above process completely updates the shared table before interrupting the process. If not finished
The content of the shared table will be unlocked while it is incomplete, which will cause a malfunction in the operation of referring to and updating the shared table.

【0006】そこで、従来は、共有テーブルのロックを
行った際に主記憶上の定められた位置にロック表示を設
定し、そのロックを必要とする処理が正常に終了してア
ンロックを行う際にその表示をクリアするようにしてお
き、プログラム割り込みが発生した場合、例外ハンドラ
がロック表示を参照し、若し表示が設定されている場合
にはシステムを強制的に停止させるという方法を採用し
ている。
Therefore, conventionally, when the shared table is locked, the lock display is set at a predetermined position on the main memory, and the process requiring the lock is normally completed and unlocked. The exception handler refers to the lock display when a program interrupt occurs and the system is forcibly stopped if the display is set. ing.

【0007】[0007]

【発明が解決しようとする課題】上述したように従来
は、共有テーブルのロック中にプログラム割り込みが発
生した場合、システムを直ちに停止させていたため、プ
ログラム割り込みの発生が即システム停止につながり、
システムのスループットが大幅に低下するという問題が
あった。
As described above, in the prior art, when a program interrupt occurred while the shared table was locked, the system was immediately stopped. Therefore, the occurrence of the program interrupt leads to an immediate system stop.
There was a problem that the throughput of the system was significantly reduced.

【0008】プログラム割り込みのうちには、システム
の続行が本来不可能となるもの以外に、例えば異常の発
生した処理がマクロ処理であってその異常が指定誤りな
どの利用者に起因し、従ってシステムを停止させずに利
用者に指定誤りなどを通知すれば良いものもあり、この
後者のようなプログラム割り込みの場合についてまで、
共有テーブルのロックに関する問題でシステムを停止さ
せることは本来望ましいことではない。
Among the program interrupts, in addition to the ones that essentially make it impossible for the system to continue, for example, the processing in which an abnormality has occurred is macro processing, and the abnormality is caused by the user, such as a designation error. There are some things that can be notified to the user of a specification error etc. without stopping, and even in the case of this latter program interruption,
Stopping the system due to problems with shared table locking is not really desirable.

【0009】システムの続行が本来可能な種別のプログ
ラム割り込みの発生時に、システムを停止させずに継続
させるためには、プログラム割り込みによって処理中断
したプロセスによってロックされていた共有テーブルの
状態を矛盾の無い状態に復元した後にアンロックする必
要があり、このような処理を可能とする技術が要望され
る。
In order to continue the system without stopping it when a program interrupt of a type that can originally continue the system occurs, the state of the shared table locked by the process interrupted by the program interrupt is consistent. It is necessary to unlock after restoring the state, and a technique that enables such processing is desired.

【0010】本発明はこのような事情に鑑みて提案され
たものであり、その目的は、共有テーブルのロック中に
プログラム割り込みが発生した場合に、自動的に共有テ
ーブルを元の状態に復元してロックを解除することがで
きる共有テーブルのロック制御方式を提供することにあ
る。
The present invention has been proposed in view of the above circumstances, and an object thereof is to automatically restore the shared table to the original state when a program interrupt occurs while the shared table is locked. The purpose of the present invention is to provide a lock control method for a shared table that can be unlocked by a lock.

【0011】[0011]

【課題を解決するための手段】本発明の共有テーブルの
ロック制御方式は、主記憶上の共有テーブルをテーブル
退避域へ退避する処理とテーブル退避域に退避された共
有テーブルを主記憶の元の場所へ復元する処理とを行う
テーブル退避復元機構と、ロック要求に応答して、主記
憶上の共有テーブルをロックすると共に、前記テーブル
退避復元機構を呼び出して、前記ロックした共有テーブ
ルをテーブル退避域へ退避させるロック機構と、テーブ
ルの復元要を指定するアンロック要求に応答して、前記
テーブル退避復元機構を呼び出して、前記テーブル退避
域に退避されている共有テーブルを主記憶上の元の場所
へ復元させた後、その共有テーブルのロックを解除し、
また、テーブルの復元不要を指定するアンロック要求に
応答して、共有テーブルのロックを解除すると共に該解
除した共有テーブルを前記テーブル退避域から削除する
アンロック機構と、プログラム割り込み発生時に、テー
ブルの復元要を指定したアンロック要求を前記アンロッ
ク機構に送出する例外ハンドラとを備えている。
According to the lock control method of a shared table of the present invention, a process of saving a shared table in the main memory to a table save area and a shared table saved in the table save area to the original memory of the main memory In response to a lock request, the shared table on the main memory is locked, and the shared table on the main memory is called to return the locked shared table to the table save area. In response to an unlock request that specifies the lock mechanism for saving to the table and the need to restore the table, the table save / restore mechanism is called to restore the shared table saved in the table save area to the original location in main memory. And then unlock the shared table,
In addition, in response to an unlock request that specifies that the table need not be restored, an unlock mechanism that unlocks the shared table and deletes the unlocked shared table from the table save area, and a table interruption when a program interrupt occurs An exception handler for sending an unlock request designating restoration required to the unlock mechanism is provided.

【0012】[0012]

【作用】本発明の共有テーブルのロック制御方式におい
ては、何れかのプロセッサ上で実行されるプロセスから
或る共有テーブルのロックが要求されると、ロック機構
が、そのロック要求に応答して主記憶上の該当する共有
テーブルをロックすると共にテーブル退避復元機構を呼
び出してそのロックした共有テーブルをテーブル退避域
へ退避(複写)させる。共有テーブルのロックに成功し
たプロセスは主記憶上の該当する共有テーブルを参照,
更新して所定の処理を実行する。このプロセスが共有テ
ーブルのロックを必要とする処理を正常終了してテーブ
ル復元不要を指定したアンロック要求を出すと、アンロ
ック機構が、そのアンロック要求に応答して該当する共
有テーブルのロックを解除すると共にテーブル退避域に
退避されている同テーブルを削除する。他方、上記プロ
セスで共有テーブルのロックを必要とする処理が実行さ
れているときにプログラム割り込みが発生すると、制御
が例外ハンドラに渡り、例外ハンドラが、テーブルの復
元要を指定したアンロック要求をアンロック機構に出
し、アンロック機構が、そのアンロック要求に応答し
て、テーブル退避復元機構を呼び出してテーブル退避域
に退避されている共有テーブルを主記憶上の元の場所へ
復元させた後、その共有テーブルのロックを解除し、後
の処理において同共有テーブルを矛盾無く参照,更新し
得るようにする。
According to the lock control method for the shared table of the present invention, when a process executed on any of the processors requests a lock of a certain shared table, the lock mechanism responds to the lock request by the main unit. The corresponding shared table on the memory is locked, and the table save / restore mechanism is called to save (copy) the locked shared table to the table save area. A process that successfully locks a shared table refers to the corresponding shared table in main memory,
Update and execute predetermined processing. When this process terminates the processing that requires locking of the shared table normally and issues an unlock request specifying that table restoration is not required, the unlock mechanism responds to the unlock request and locks the corresponding shared table. At the same time as releasing it, the table saved in the table save area is deleted. On the other hand, if a program interrupt occurs while processing that requires the lock of the shared table is being executed in the above process, control passes to the exception handler, and the exception handler unlocks the unlock request specifying that the table needs to be restored. In response to the unlock request, the unlock mechanism calls the table save / restore mechanism to restore the shared table saved in the table save area to the original location on the main memory. The shared table is unlocked so that the shared table can be referred to and updated without conflict in subsequent processing.

【0013】[0013]

【実施例】次に本発明の実施例について図面を参照して
詳細に説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0014】図1は本発明の共有テーブルのロック制御
方式を適用したマルチプロセッサシステムの要部構成図
である。この例のマルチプロセッサシステムは、2台の
プロセッサCPU1,CPU2と、両プロセッサ間で共
有される主記憶MEMとを含んでおり、主記憶MEM中
に、排他制御の対象となる種々のテーブルを含むテーブ
ル群1,このテーブル群1の退避域となるテーブル退避
域2が存在する。また、利用者プログラムやOS等にか
かるプロセス3,4と、例外ハンドラ5と、ロック機構
6と、アンロック機構7と、退避テーブル要素返却機構
8と、復元テーブル要素返却機構9と、テーブル退避復
元機構10と、復元可否登録機構11と、パターン情報
設定機構12とが、プロセッサCPU1,CPU2の何
れでも実行可能な機能部として主記憶MEMに存在して
いる。なお、13はパターン情報テーブル、14は復元
可否表示である。
FIG. 1 is a block diagram of a main part of a multiprocessor system to which a lock control method for a shared table according to the present invention is applied. The multiprocessor system of this example includes two processors CPU1 and CPU2 and a main memory MEM shared between the two processors, and the main memory MEM includes various tables to be subjected to exclusive control. There is a table group 1 and a table save area 2 which is a save area for the table group 1. Further, processes 3 and 4 related to the user program and OS, an exception handler 5, a lock mechanism 6, an unlock mechanism 7, a save table element return mechanism 8, a restore table element return mechanism 9, and a table save. The restoration mechanism 10, the restoration permission / inhibition registration mechanism 11, and the pattern information setting mechanism 12 are present in the main memory MEM as functional units that can be executed by either of the processors CPU1 and CPU2. Incidentally, 13 is a pattern information table, and 14 is a restoration availability display.

【0015】テーブル群1は、それぞれが排他単位とな
る複数のテーブル111と、各テーブル111に対応す
るロックテーブルを含むロックテーブル群112とを含
んでいる。個々のテーブル111は、本実施例の場合、
下記(1),(2)の何れかに示すような構成を持って
いる。
The table group 1 includes a plurality of tables 111 each serving as an exclusive unit, and a lock table group 112 including a lock table corresponding to each table 111. In the case of this embodiment, each table 111 is
It has a configuration as shown in either (1) or (2) below.

【0016】(1)図2に示すように、キューターミナ
ル211から、実際に参照,更新されるデータを保持す
る複数のテーブル要素212〜214がチェインされる
構成。ここで、各テーブル要素212〜214のサイズ
は全てXXXで同じであり、各テーブル要素の先頭から
長さaの箇所に次のテーブル要素を指示するポインタを
格納し、チェインの最後のテーブル要素214のポイン
タはNULLになっている。このような構成のテーブル
に対して本実施例ではパターン識別子Aを付与してい
る。
(1) As shown in FIG. 2, a structure in which a plurality of table elements 212 to 214 holding data to be actually referred to and updated are chained from the queue terminal 211. Here, all of the table elements 212 to 214 have the same size in XXX, a pointer for pointing to the next table element is stored at a position of length a from the beginning of each table element, and the last table element 214 in the chain is stored. Has a NULL pointer. In this embodiment, the pattern identifier A is given to the table having such a configuration.

【0017】(2)図3に示すように、メインテーブル
311から、実際に参照,更新されるデータを保持する
複数のテーブル要素312〜316がポイントされる構
成。ここで、メインテーブル311はその先頭から長さ
b毎の領域にテーブル要素を指示するポインタを格納し
ており、各テーブル要素312〜316のサイズは全て
YYYで同じになっている。このような構成のテーブル
に対して本実施例ではパターン識別子Bを付与してい
る。
(2) As shown in FIG. 3, from the main table 311, a plurality of table elements 312 to 316 holding data to be actually referred to and updated are pointed. Here, the main table 311 stores pointers pointing to the table elements in the area of each length b from the head thereof, and all the table elements 312 to 316 have the same size of YYY. In this embodiment, the pattern identifier B is given to the table having such a configuration.

【0018】ロックテーブル群112に含まれるロック
テーブルは、各テーブル111と1対1に対応してお
り、図2および図3のロックテーブル215,317に
示す如き構成を有している。各ロックテーブルは、テー
ブル名を設定するエリアE1,ロックフィールドE2,
ロックプロセス名を設定するエリアE3,パターン識別
子を設定するエリアE4,対応するテーブルへのポイン
タを設定するエリアE5から構成されている。ここで、
エリアE1へのテーブル名の設定と、エリアE4へのパ
ターン識別子の設定と、エリアE5へのポインタの設定
とは、プロセス3から起動されるパターン情報設定機構
12によって事前に行われる。また、このときエリアE
2のロックフィールドは非ロック中にリセットされ、エ
リアE3のロックプロセス名はNULLにされる。
The lock tables included in the lock table group 112 have a one-to-one correspondence with the respective tables 111, and have a structure as shown in the lock tables 215 and 317 of FIGS. 2 and 3. Each lock table has an area E1 for setting a table name, a lock field E2,
An area E5 for setting a lock process name, an area E5 for setting a pattern identifier, and an area E5 for setting a pointer to a corresponding table. here,
The setting of the table name in the area E1, the setting of the pattern identifier in the area E4, and the setting of the pointer in the area E5 are performed in advance by the pattern information setting mechanism 12 started from the process 3. Also, at this time, area E
The lock field of 2 is reset to unlocked, and the lock process name of the area E3 is set to NULL.

【0019】パターン情報テーブル13は、各パターン
識別子A,B毎に、そのようなパターン識別子を持つテ
ーブルがどのような構成のものであるかを示すパターン
情報を保持するテーブルであり、その一例を図4に示
す。図4において、サイズXXXとポインタ位置aとが
パターン識別子Aに関するパターン情報であって、図2
に示したような構成のテーブルを特徴付ける情報とし
て、テーブル要素212〜214のサイズがXXXであ
り、そのポインタが各テーブル要素の先頭から長さaの
箇所に設定されていることを示している。また、図4に
おいて、サイズYYYとポインタ位置Δbとはパターン
識別子Bに関するパターン情報であって、図3に示した
ような構成のテーブルを特徴付ける情報として、テーブ
ル要素312〜316のサイズがYYYであり、そのポ
インタがメインテーブル311のΔb毎の領域に設定さ
れていることを示している。このようなパターン情報テ
ーブル13は、プロセス3から起動されるパターン情報
設定機構12によって事前に作成される。
The pattern information table 13 is a table for holding pattern information indicating, for each pattern identifier A and B, the structure of the table having such a pattern identifier, and an example thereof is shown. As shown in FIG. In FIG. 4, the size XXX and the pointer position a are pattern information related to the pattern identifier A, and
As the information that characterizes the table having the configuration as shown in FIG. 3, the size of the table elements 212 to 214 is XXX, and the pointer is set to the position of the length a from the head of each table element. Further, in FIG. 4, the size YYY and the pointer position Δb are pattern information regarding the pattern identifier B, and the size of the table elements 312 to 316 is YYY as the information that characterizes the table having the configuration shown in FIG. , Indicates that the pointer is set in the area of each Δb of the main table 311. Such a pattern information table 13 is created in advance by the pattern information setting mechanism 12 started from the process 3.

【0020】テーブル退避域2は、ロック中のテーブル
111のテーブル要素を退避する場所である。テーブル
退避域2に、テーブル111のテーブル要素が退避され
たときの様子を図5に示す。図5において、退避エント
リ501はそれぞれ1つのテーブル要素の退避域であ
り、ヘッダ部502とテーブル内容退避域503とで構
成され、ヘッダ部502には、退避されたテーブル要素
のテーブル群1における元のアドレス504とそのテー
ブル要素のサイズ505と当該テーブル要素を含むテー
ブル111のテーブル名506とが含まれ、テーブル内
容退避域503には、退避されたテーブル要素の内容そ
のものが格納される。
The table save area 2 is a place for saving the table elements of the locked table 111. FIG. 5 shows how the table elements of the table 111 are saved in the table save area 2. In FIG. 5, each save entry 501 is a save area for one table element, and is composed of a header section 502 and a table content save area 503. In the header section 502, the saved table elements of the table group 1 are saved. Address 504, the size 505 of the table element thereof, and the table name 506 of the table 111 including the table element, and the table content save area 503 stores the content itself of the saved table element.

【0021】プロセス4は、テーブル群1中のテーブル
111を参照,更新するプロセスである。テーブル群1
中のテーブル111を参照,更新する場合、先ず、テー
ブル名を指定したロック要求をロック機構6に出し、ロ
ック成功の通知を受けてから、実際にテーブル群1中の
そのテーブル111を参照,更新し、プログラム割り込
み等の異常を生じることなく必要な処理を正常に終了す
ると、そのテーブル名と復元不要とを指定したアンロッ
ク要求をアンロック機構7に出す。このようなプロセス
4は図1では1つしか示されていないが、通常は複数存
在し、互いに排他的にテーブル群1中の個々のテーブル
111を参照,更新する。
Process 4 is a process of referring to and updating the table 111 in the table group 1. Table group 1
When referring to or updating the table 111 in the table group 1, first, a lock request designating the table name is issued to the lock mechanism 6, and after receiving the notification of the lock success, the table 111 in the table group 1 is actually referred to or updated. Then, when the necessary processing is normally completed without causing an abnormality such as a program interruption, an unlock request specifying the table name and restoration unnecessary is issued to the unlock mechanism 7. Although only one such process 4 is shown in FIG. 1, a plurality of processes 4 normally exist and mutually refer to and update individual tables 111 in the table group 1 mutually.

【0022】プロセス3は、パターン情報設定機構12
を起動することより、パターン情報テーブル13の作成
と、テーブル群1中のロックテーブル群112への前述
したパターン識別子等の設定とを遂行するプロセスであ
る。
Process 3 is the pattern information setting mechanism 12
Is a process of creating the pattern information table 13 and setting the above-mentioned pattern identifier and the like in the lock table group 112 in the table group 1 by activating.

【0023】ロック機構6は、プロセス4からのロック
要求に応答して、テーブル群1の該当するテーブル11
1に対してロック処理を実行すると共に、退避テーブル
要素返却機構8を起動して得た当該ロック対象テーブル
のテーブル要素のアドレスとサイズとをテーブル退避復
元機構10に通知することにより、ロックしたテーブル
111のロック直前の内容をテーブル退避域2へ退避さ
せる処理を行うもので、その処理例を図6に示す。
The lock mechanism 6 responds to the lock request from the process 4 by applying the corresponding table 11 in the table group 1.
The lock table is returned to the table save and restore mechanism 10 by notifying the table save address and size of the table element of the lock target table obtained by activating the save table element return mechanism 8 A process of saving the contents of 111 immediately before the lock to the table save area 2 is performed, and an example of the process is shown in FIG.

【0024】退避テーブル要素返却機構8は、該当ロッ
ク対象テーブルのパターン識別子に対応するパターン情
報をパターン情報テーブル13から参照してテーブルの
構成を認識し、その認識結果に従って、テーブル群1中
の退避すべきテーブル要素のアドレスとサイズとを順次
にロック機構6に通知する機構であり、その処理例を図
7に示す。
The save table element returning mechanism 8 refers to the pattern information corresponding to the pattern identifier of the lock target table from the pattern information table 13 to recognize the configuration of the table, and saves the table group 1 according to the recognition result. This is a mechanism for sequentially notifying the lock mechanism 6 of the address and size of the table element to be processed, and an example of the processing is shown in FIG.

【0025】アンロック機構7は、プロセス4または例
外ハンドラ5からのアンロック要求を処理する機構であ
る。アンロック要求には、テーブルの復元要を指定する
アンロック要求と、テーブルの復元不要を指定するアン
ロック要求との2種類があり、前者の要求に対して、ア
ンロック機構7は、復元可否表示14が復元可を示すこ
とを条件に、復元テーブル要素返却機構9を起動して得
た退避エントリのアドレスをテーブル退避復元機構10
に通知してテーブル退避域2に退避されているテーブル
要素をテーブル群1に復元させた後、アンロック処理と
テーブル退避域2のクリア処理とを実行する。また、後
者のテーブルの復元不要を指定するアンロック要求に対
しては、アンロック処理とテーブル退避域2のクリア処
理とを実行する。図8はアンロック機構7の処理例を示
している。
The unlock mechanism 7 is a mechanism for processing an unlock request from the process 4 or the exception handler 5. There are two types of unlock requests, an unlock request that specifies that the table needs to be restored and an unlock request that specifies that the table does not need to be restored. For the former request, the unlock mechanism 7 determines whether or not the table can be restored. On condition that the display 14 indicates that restoration is possible, the address of the save entry obtained by activating the restore table element return mechanism 9 is set to the table save / restore mechanism 10.
Is notified to restore the table element saved in the table save area 2 to the table group 1, and then the unlock processing and the clear processing of the table save area 2 are executed. In addition, in the latter case, in response to an unlock request that specifies that table restoration is unnecessary, unlock processing and table save area 2 clear processing are executed. FIG. 8 shows a processing example of the unlock mechanism 7.

【0026】復元テーブル要素返却機構9は、復元対象
となるテーブルのテーブル要素が退避されている退避エ
ントリのアドレスをテーブル退避域2を検索して取得
し、順次にアンロック機構7に通知する機構であり、そ
の処理の一例を図9に示す。
The restoration table element return mechanism 9 retrieves the address of the save entry in which the table element of the table to be restored is saved by searching the table save area 2 and sequentially notifies the unlock mechanism 7. FIG. 9 shows an example of the processing.

【0027】テーブル退避復元機構10は、テーブル群
1中のテーブル要素のテーブル退避域2へ退避と、テー
ブル退避域2に退避されたテーブル要素のテーブル群1
への復元とを実行する機構である。図10はテーブル退
避復元機構10の処理例を示す。
The table save / restore mechanism 10 saves the table elements in the table group 1 to the table save area 2 and the table group 1 of the table elements saved in the table save area 2.
Is a mechanism for executing restoration and restoration. FIG. 10 shows a processing example of the table save / restore mechanism 10.

【0028】例外ハンドラ5は、プログラム割り込み発
生時に、その発生したプログラム割り込みを解析してシ
ステム続行可能な場合には、テーブルの復元要を指定し
たアンロック要求をアンロック機構7に送出し、また、
システム続行不可能な場合には復元可否登録機構11を
起動して復元可否表示14を復元不可に設定した後、テ
ーブルの復元要を指定したアンロック要求をアンロック
機構7に送出する。例外ハンドラ5のこのような処理の
一例が、プログラム割り込みを起こしたプロセス4の処
理例と共に図11に示されている。
When a program interrupt is generated, the exception handler 5 analyzes the generated program interrupt and, if the system can be continued, sends an unlock request designating table restoration to the unlock mechanism 7, and ,
If the system cannot be continued, the restoration permission / prohibition registration mechanism 11 is activated to set the restoration permission / prohibition display 14 to be non-restorable, and then an unlock request designating restoration of the table is sent to the unlock mechanism 7. An example of such processing of the exception handler 5 is shown in FIG. 11 together with a processing example of the process 4 which caused the program interrupt.

【0029】復元可否登録機構11は、例外ハンドラ5
から復元可否表示14を復元不可に設定する要求がある
ことにより、復元可否表示14を復元不可に変更する機
構である。なお、復元可否表示14は通常の状態では復
元可になっている。
The restoration propriety registration mechanism 11 uses the exception handler 5
This is a mechanism for changing the restoration propriety display 14 to non-restorable when there is a request from the user to set the restoration propriety display 14 to non-restorable. It should be noted that the restoration permission / prohibition display 14 is restoration possible in a normal state.

【0030】以下、上述のように構成された本実施例の
動作を説明する。
The operation of this embodiment having the above-mentioned structure will be described below.

【0031】今、図1において、プロセッサCPU1,
CPU2の何れか一方で実行されているプロセス4か
ら、或るテーブル名を指定したロック要求がロック機構
6に出されると、ロック機構6が図6に示す処理を開始
する。
Now, referring to FIG. 1, the processor CPU1,
When a lock request designating a certain table name is issued to the lock mechanism 6 from the process 4 executed by one of the CPUs 2, the lock mechanism 6 starts the processing shown in FIG.

【0032】先ず、ロック機構6は、ロック要求された
テーブル名を持つ図2の215,図3の317の如きロ
ックテーブルをテーブル群1のロックテーブル群112
から検索して、そのロックテーブル中のロックフィール
ドが未ロック状態か否かを調べる(S1)。そして、若
し、未ロック状態でなくロック状態であれば、別プロセ
スが当該テーブルを参照,更新しているので、プロセス
4にロック失敗を通知する(S2)。
First, the lock mechanism 6 uses the lock table group 112 of the table group 1 such as the lock table 215 of FIG. 2 and the lock table 317 of FIG.
To check whether or not the lock field in the lock table is in the unlocked state (S1). If it is not in the unlocked state but in the locked state, another process refers to and updates the table, and therefore the process 4 is notified of the lock failure (S2).

【0033】他方、未ロック状態であれば、ロック機構
6は、ロック処理S3を行う。このロック処理S3で
は、ロックテーブル中のロックフィールドを未ロック状
態からロック状態に書き換え、要求元のプロセス4のプ
ロセス名をロックプロセス名としてロックテーブルに設
定する。
On the other hand, in the unlocked state, the lock mechanism 6 performs the lock process S3. In this lock processing S3, the lock field in the lock table is rewritten from the unlocked state to the locked state, and the process name of the requesting process 4 is set in the lock table as the lock process name.

【0034】次にロック機構6は、ロック要求されたテ
ーブル名を通知して退避テーブル要素返却機構8を起動
する。これにより、退避テーブル要素返却機構8は図7
に示す処理を開始する。
Next, the lock mechanism 6 notifies the lock-requested table name and activates the save table element return mechanism 8. As a result, the evacuation table element returning mechanism 8 is configured as shown in FIG.
The process shown in is started.

【0035】先ず、退避テーブル要素返却機構8は、通
知されたテーブル名のロックテーブルをテーブル群1の
ロックテーブル群112から検索して、それに設定され
ているパターン識別子を取得する(S11)。即ち、図
2のロックテーブル215の場合にはパターン識別子A
を取得し、図3のロックテーブル317の場合にはパタ
ーン識別子Bを取得する。
First, the save table element return mechanism 8 retrieves the lock table having the notified table name from the lock table group 112 of the table group 1 and acquires the pattern identifier set therein (S11). That is, in the case of the lock table 215 of FIG.
, And in the case of the lock table 317 of FIG. 3, the pattern identifier B is acquired.

【0036】次に、取得したパターン識別子に対応する
パターン情報をパターン情報テーブル13から取得する
(S12)。即ち、パターン識別子Aの場合には図4の
サイズXXXとポインタ位置aとからなるパターン情報
を、パターン識別Bの場合には図4のサイズYYYとポ
インタ位置Δbとからなるパターン情報を、取得する。
Next, the pattern information corresponding to the acquired pattern identifier is acquired from the pattern information table 13 (S12). That is, in the case of the pattern identifier A, the pattern information including the size XXX and the pointer position a in FIG. 4 is acquired, and in the case of the pattern identification B, the pattern information including the size YYY and the pointer position Δb in FIG. 4 is acquired. .

【0037】次に、取得したパターン情報からテーブル
の構成を認識して最初のテーブル要素のアドレスとサイ
ズをロック機構6に通知する(S13)。即ち、図2の
場合には、ロックテーブル215のエリアE5中のポイ
ンタが示すキューターミナル211に設定されているポ
インタとサイズXXXとをロック機構6に通知し、図3
の場合には、ロックテーブル317のエリアE5中のポ
インタが示すメインテーブル311の先頭のポインタと
サイズYYYとをロック機構6に通知する。そして、ロ
ック機構6から次の通知の指示があるのを待つ(S1
4)。
Next, the structure of the table is recognized from the acquired pattern information, and the address and size of the first table element are notified to the lock mechanism 6 (S13). That is, in the case of FIG. 2, the pointer set in the queue terminal 211 indicated by the pointer in the area E5 of the lock table 215 and the size XXX are notified to the lock mechanism 6, and FIG.
In this case, the lock mechanism 6 is notified of the head pointer of the main table 311 indicated by the pointer in the area E5 of the lock table 317 and the size YYY. Then, it waits for the next notification instruction from the lock mechanism 6 (S1).
4).

【0038】ロック機構6は、退避テーブル要素返却機
構8から最初のテーブル要素のアドレスとサイズとの通
知を受けると(図6のS5でYES)、これらとロック
要求のあったテーブル名とを指定して、テーブル退避の
モードでテーブル退避復元機構10を起動する(S
6)。これにより、テーブル退避復元機構10は図10
に示す処理を開始する。
When the lock mechanism 6 receives the notification of the address and size of the first table element from the save table element return mechanism 8 (YES in S5 of FIG. 6), these and the table name for which the lock request has been made are designated. Then, the table save / restore mechanism 10 is activated in the table save mode (S
6). As a result, the table saving / restoring mechanism 10 is configured as shown in FIG.
The process shown in is started.

【0039】即ち、テーブル退避による起動なので、テ
ーブル退避復元機構10は、図10の処理S41から処
理S42に分岐し、ロック機構6から指定されたテーブ
ル要素のアドレス,サイズおよびテーブル名を含むヘッ
ダ部を作成し、次いで処理S43において、指定された
アドレス,サイズのテーブル要素の内容をテーブル群1
から取得し、次いで処理S44において、上記作成した
ヘッダ部と前記取得したテーブル要素の内容とを含む1
つの退避エントリをテーブル退避域2に書き込む。従っ
て、テーブル退避域2に1つもテーブル要素が退避され
ていない状態で、例えば図2のテーブル要素212のア
ドレスとサイズXXXとテーブル名とが指定された場
合、テーブル退避復元機構10は、テーブル要素212
のアドレスを図5の元アドレス504として、サイズX
XXをサイズ505として、また指定されたテーブル名
をテーブル名506に設定したヘッダ部502とテーブ
ル要素212の内容を格納したテーブル内容退避域50
3とからなる1つの退避エントリ501を、テーブル退
避域2に書き込むことになる。なお、既に別の退避エン
トリ501が存在する場合には、図5に示したように、
その直後に新たな退避エントリを書き込む。
That is, since it is started by saving the table, the table saving / restoring mechanism 10 branches from the processing S41 of FIG. 10 to the processing S42, and the header portion including the address, size, and table name of the table element designated by the locking mechanism 6 is included. And then in step S43, the contents of the table element with the specified address and size are set in the table group 1
1 in step S44, including the header part created above and the contents of the acquired table element.
Write one save entry to table save area 2. Therefore, when no table element is saved in the table save area 2 and, for example, the address, size XXX, and table name of the table element 212 in FIG. 212
Size of the original address 504 in FIG.
A table content save area 50 storing the contents of the header part 502 and the table element 212 in which XX is the size 505 and the designated table name is set in the table name 506.
One save entry 501 consisting of 3 and 3 will be written to the table save area 2. If another save entry 501 already exists, as shown in FIG.
Immediately after that, a new save entry is written.

【0040】ロック機構6は、最初のテーブル要素の退
避が終了すると、退避テーブル要素返却機構8に次の通
知を出すよう指示し(図6のS7)、退避テーブル要素
返却機構8は、この通知を受けると(図7のS14)、
次のテーブル要素を検索し、見つけると(S15でYE
S)、そのテーブル要素のアドレスとサイズをロック機
構8に通知する(S16)。また、次のテーブル要素が
存在しなければ(S15でNO)、テーブル要素の終了
をロック機構6に通知する(S17)。ロック機構6
は、退避テーブル要素返却機構8からテーブル要素のア
ドレスとサイズとが通知される毎にテーブル退避復元機
構10を起動する処理を繰り返すことにより、今回ロッ
クしたテーブルの全てのテーブル要素をテーブル退避域
2に退避させ、退避テーブル要素返却機構8からテーブ
ル要素の終了が通知された時点で(S5でNO)、要求
元のプロセス4に対してロック完了を通知し(S8)、
処理を終える。従って、図2に示したようなテーブルの
場合、テーブル要素212,213,214がテーブル
退避域2に退避された後にロック完了がプロセス4に通
知される。また、図3に示したようなテーブルの場合、
テーブル要素312〜316がテーブル退避域2に退避
された後にロック完了がプロセス4に通知される。
When the evacuation of the first table element is completed, the lock mechanism 6 instructs the evacuation table element return mechanism 8 to issue the next notification (S7 in FIG. 6), and the evacuation table element return mechanism 8 notifies this notification. When receiving (S14 in FIG. 7),
If the next table element is searched and found (YE in S15)
S), and notifies the address and size of the table element to the lock mechanism 8 (S16). If the next table element does not exist (NO in S15), the lock mechanism 6 is notified of the end of the table element (S17). Lock mechanism 6
Repeats the process of activating the table save / restore mechanism 10 each time the save table element return mechanism 8 notifies the table element address and size, so that all table elements of the currently locked table are stored in the table save area 2 When the end of the table element is notified from the save table element return mechanism 8 (NO in S5), the lock completion is notified to the requesting process 4 (S8),
Finish the process. Therefore, in the case of the table as shown in FIG. 2, the lock completion is notified to the process 4 after the table elements 212, 213 and 214 are saved in the table save area 2. In the case of the table shown in FIG. 3,
After the table elements 312 to 316 are saved in the table save area 2, the lock completion is notified to the process 4.

【0041】さて、ロック完了の通知を受けたプロセス
4は、そのロックしたテーブルに対して参照,更新を行
う。そして、ロックを必要とした処理を正常に終了する
と、アンロックするテーブル名と復元不要とを指定した
アンロック要求をアンロック機構7に出す。また、プロ
セス4が、ロックを必要とした処理の途中でプログラム
割り込みを起こすと、制御が例外ハンドラ5に移る。以
下、前者の場合と後者の場合とにわけて動作を説明す
る。
Upon receipt of the lock completion notice, the process 4 refers to and updates the locked table. Then, when the process that requires the lock ends normally, the unlock mechanism 7 issues an unlock request specifying the table name to be unlocked and the restoration unnecessary. Further, when the process 4 causes a program interrupt in the middle of the process requiring the lock, the control is transferred to the exception handler 5. Hereinafter, the operation will be described separately for the former case and the latter case.

【0042】○プロセス4からアンロック要求が出され
た場合アンロック機構7は、プロセス4からアンロック
要求が出されると、図8に示す処理を開始する。先ず、
今回のアンロック要求に復元指定が含まれているか否か
を調べる(S21)。今の場合、含まれていないので、
アンロック要求されたテーブル名を持つ退避エントリを
テーブル退避域2から削除し(S28)、次いでアンロ
ック処理を行う(S29)。このアンロック処理では、
ロックテーブル中のロックフィールドをロック状態から
未ロック状態に書き換え、ロックプロセス名をNULL
に設定する。
When the unlock request is issued from the process 4, the unlock mechanism 7 starts the process shown in FIG. 8 when the unlock request is issued from the process 4. First,
It is checked whether or not this unlock request includes a restore designation (S21). In this case, it is not included, so
The save entry having the unlock-requested table name is deleted from the table save area 2 (S28), and then the unlock process is performed (S29). In this unlock process,
Rewrite the lock field in the lock table from the locked state to the unlocked state, and set the lock process name to NULL.
Set to.

【0043】○例外ハンドラ5に制御が渡った場合図1
1に示すように、プロセス4がロック要求し(S6
1)、テーブルの更新などの処理S62を実行中にプロ
グラム割り込みが発生すると、制御が例外ハンドラ5に
移り、例外ハンドラ5は、発生したプログラム割り込み
の原因や発生箇所を解析する(S51)。そして、この
解析結果からシステムを停止させる必要があるか否かを
判断し、システムを停止させる必要があると判断したと
きは(S52でYES)、修正可否登録機構11を起動
して復元可否表示14を復元可の状態から復元不可の状
態に変更した後(S53)、テーブル群1のロックテー
ブル群112中のロックテーブルを参照しして当該プロ
グラム割り込みを起こしたプロセス4がロックしている
テーブル名を取得して、それらのテーブル名と復元要と
を指定したアンロック要求をアンロック機構7に出す
(S54)。また、システムを停止させる必要がないと
判断したときは(S52でNO)、処理S53をスキッ
プして復元可否表示14を復元可のままにしておいて、
プロセス4がロックしているテーブル名と復元要とを指
定したアンロック要求をアンロック機構7に出す(S5
4)。
○ When control is passed to the exception handler 5
1, the process 4 requests the lock (S6
1) When a program interrupt occurs during execution of processing S62 such as table updating, control transfers to the exception handler 5, and the exception handler 5 analyzes the cause and location of the generated program interrupt (S51). Then, based on the analysis result, it is determined whether or not the system needs to be stopped, and when it is determined that the system needs to be stopped (YES in S52), the correction allowance registration mechanism 11 is activated to display the restoration allowance display. After changing 14 from the restoration-enabled state to the restoration-disabled state (S53), the lock table in the lock table group 112 of the table group 1 is referred to and the table locked by the process 4 that caused the program interruption The name is acquired, and an unlock request specifying the table name and the restoration requirement is issued to the unlock mechanism 7 (S54). When it is determined that it is not necessary to stop the system (NO in S52), the process S53 is skipped, and the restoration permission / inhibition display 14 is left as restorable.
An unlock request specifying the table name locked by the process 4 and the restoration requirement is issued to the unlock mechanism 7 (S5).
4).

【0044】このアンロック要求に応答してアンロック
機構7は図8に示す処理を開始し、復元要が指定されて
いるので処理S21から処理S22へ進み、復元可否表
示14が復元可を示しているか否かを調べる(S2
2)。そして、復元可否表示14が復元不可を示してい
るときは(S22でNO)、直ちにシステム停止を行
う。他方、復元可を示しているときは(S22でYE
S)、テーブル退避域2に退避されているテーブル要素
をテーブル群1に復元させるための処理を実行し(S2
3〜S27)、その後にテーブル退避域2のクリア処理
S28とアンロック処理S29を行う。
In response to this unlock request, the unlock mechanism 7 starts the processing shown in FIG. 8. Since restoration is required, the process proceeds from step S21 to step S22, and the restoration permission / inhibition display 14 indicates that restoration is possible. It is checked (S2
2). Then, when the restoration availability display 14 indicates that restoration is not possible (NO in S22), the system is immediately stopped. On the other hand, when it indicates that restoration is possible (YES in S22,
S), a process for restoring the table element saved in the table save area 2 to the table group 1 is executed (S2
3 to S27), and thereafter, the clearing process S28 and the unlocking process S29 of the table save area 2 are performed.

【0045】即ち、先ずアンロック機構7は、例外ハン
ドラ5から指定されたテーブル名を通知して復元テーブ
ル要素返却機構9を起動する(S23)。これにより復
元テーブル要素返却機構9は図9に示す処理を開始し、
指定されたテーブル名をヘッダ部に含む退避エントリを
テーブル退避域2の先頭から順に検索し(S31)、見
つけた退避エントリのアドレスをアンロック機構7に通
知する(S32)。アンロック機構7は、この通知され
たアドレスを指定してテーブル退避復元機構9をテーブ
ル復元モードで起動する(S26)。これによりテーブ
ル退避復元機構9は図10に示す処理を開始する。
That is, the unlocking mechanism 7 first notifies the table name specified by the exception handler 5 and activates the restoration table element returning mechanism 9 (S23). As a result, the restoration table element return mechanism 9 starts the processing shown in FIG.
The save entry including the specified table name in the header is searched in order from the beginning of the table save area 2 (S31), and the address of the found save entry is notified to the unlock mechanism 7 (S32). The unlock mechanism 7 specifies the notified address and activates the table save / restore mechanism 9 in the table restore mode (S26). As a result, the table save / restore mechanism 9 starts the process shown in FIG.

【0046】即ち、テーブル復元による起動なので、テ
ーブル退避復元機構10は、図10の処理S41から処
理S45に分岐し、ロック機構6から指定されたアドレ
スの退避エントリをテーブル退避域2から読み込み、次
いで処理S46において、読み込んだ退避エントリ中の
テーブル内容退避域503の内容を、その退避エントリ
中のヘッダ部502中の元アドレス504からサイズ5
05が示すテーブル群1中の領域に複写することによ
り、1つのテーブル要素を復元する。
That is, since the activation is performed by restoring the table, the table saving / restoring mechanism 10 branches from the processing S41 of FIG. 10 to the processing S45, reads the saving entry of the address designated by the lock mechanism 6 from the table saving area 2, and then In process S46, the contents of the table content save area 503 in the read save entry are read from the original address 504 in the header section 502 in the save entry to the size 5
One table element is restored by copying to the area in the table group 1 indicated by 05.

【0047】アンロック機構7は、最初のテーブル要素
の復元が終了すると、復元テーブル要素返却機構9に次
の通知を出すよう指示し(図8のS27)、復元テーブ
ル要素返却機構9は、この通知を受けると(図9のS3
3)、次の退避エントリを検索し、見つけると(S35
でYES)、その退避エントリのアドレスをアンロック
機構9に通知する(S36)。また、次の退避エントリ
が存在しなければ(S35でNO)、退避エントリの終
了をアンロック機構7に通知する(S37)。アンロッ
ク機構7は、復元テーブル要素返却機構9から退避エン
トリのアドレスが通知される毎にテーブル退避復元機構
10を起動する処理を繰り返すことにより、プログラム
割り込みを起こしたプロセス4がロックしていたテーブ
ルの全てのテーブル要素をテーブル群1に復元させ、復
元テーブル要素返却機構9から退避エントリの終了が通
知された時点で(S24でYES)、今回の復元に使用
した退避エントリをテーブル退避域2から削除するテー
ブル退避域のクリア処理を行い(S28)、次いでアン
ロック処理を行う(S29)。このアンロック処理で
は、ロックテーブル中のロックフィールドをロック状態
から未ロック状態に書き換え、ロックプロセス名をNU
LLに設定する。
When the restoration of the first table element is completed, the unlocking mechanism 7 instructs the restoration table element returning mechanism 9 to issue the next notification (S27 in FIG. 8), and the restoration table element returning mechanism 9 Upon receiving the notification (S3 in FIG. 9)
3) When the next save entry is searched and found (S35)
If YES, the address of the save entry is notified to the unlock mechanism 9 (S36). If the next save entry does not exist (NO in S35), the unlock mechanism 7 is notified of the end of the save entry (S37). The unlocking mechanism 7 repeats the process of starting the table saving / restoring mechanism 10 every time the address of the save entry is notified from the restore table element returning mechanism 9, so that the table locked by the process 4 causing the program interrupt is locked. All table elements in the table group 1 are restored, and at the time when the restoration table element return mechanism 9 notifies the end of the save entry (YES in S24), the save entry used for this restore is saved from the table save area 2. The table save area to be deleted is cleared (S28), and then unlocked (S29). In this unlock processing, the lock field in the lock table is rewritten from the locked state to the unlocked state, and the lock process name is changed to NU.
Set to LL.

【0048】以上のように、本実施例では、プロセス4
によってテーブル群1中のテーブル111がロックされ
ているときにプログラム割り込みが発生しても、そのプ
ログラム割り込みがシステム停止に至らないものであれ
ば、ロックされていたテーブル111の状態をロック直
前の状態に復元して、システムの動作を継続させること
ができる。
As described above, in this embodiment, the process 4
Even if a program interrupt occurs while the table 111 in the table group 1 is locked by the above, if the program interrupt does not cause the system to stop, the state of the locked table 111 is changed to the state immediately before the lock. You can restore the system to continue operation of the system.

【0049】[0049]

【発明の効果】以上説明したように本発明によれば、ロ
ック直前の共有テーブルをテーブル退避域に退避(複
写)しておき、プログラム割り込みが発生した場合に
は、テーブル退避域に退避された共有テーブルによって
主記憶上の元の場所の共有テーブルをロック直前の状態
に復元するようにしたので、システムの続行が本来可能
な種別のプログラム割り込みの発生時に、従来のように
一律にシステムを停止させる必要がなく、プログラム割
り込みによって処理中断したプロセスによりロックされ
た共有テーブルの状態を矛盾の無い状態に復元してシス
テムの動作を継続させることが可能となる。
As described above, according to the present invention, the shared table immediately before locking is saved (copied) in the table save area, and when a program interrupt occurs, it is saved in the table save area. The shared table in the original location on the main memory is restored to the state just before the lock by the shared table, so when the program interrupt of the type that can continue the system occurs, the system is uniformly stopped as before. There is no need to do so, and it becomes possible to restore the state of the shared table locked by the process interrupted by the program interrupt to a consistent state and continue the operation of the system.

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

【図1】本発明の一実施例を適用したマルチプロセッサ
システムの要部構成図である。
FIG. 1 is a configuration diagram of essential parts of a multiprocessor system to which an embodiment of the present invention is applied.

【図2】プロセス間で共有されるテーブルの構成例とそ
れに対応するロックテーブルの内容例を示す図である。
FIG. 2 is a diagram showing a configuration example of a table shared between processes and an example of contents of a lock table corresponding to the configuration example.

【図3】プロセス間で共有されるテーブルの別の構成例
とそれに対応するロックテーブルの内容例を示す図であ
る。
FIG. 3 is a diagram showing another configuration example of a table shared between processes and an example of contents of a lock table corresponding thereto.

【図4】パターン情報テーブルの内容例を示す図であ
る。
FIG. 4 is a diagram showing an example of contents of a pattern information table.

【図5】テーブル退避域の内容例を示す図である。FIG. 5 is a diagram showing an example of contents of a table save area.

【図6】ロック機構の処理例を示すフローチャートであ
る。
FIG. 6 is a flowchart showing a processing example of a lock mechanism.

【図7】退避テーブル要素返却機構の処理例を示すフロ
ーチャートである。
FIG. 7 is a flowchart showing a processing example of a save table element return mechanism.

【図8】アンロック機構の処理例を示すフローチャート
である。
FIG. 8 is a flowchart showing a processing example of an unlock mechanism.

【図9】復元テーブル要素返却機構の処理例を示すフロ
ーチャートである。
FIG. 9 is a flowchart showing a processing example of a restoration table element return mechanism.

【図10】テーブル退避復元機構の処理例を示すフロー
チャートである。
FIG. 10 is a flowchart showing a processing example of a table save / restore mechanism.

【図11】例外ハンドラの処理例を示すフローチャート
である。
FIG. 11 is a flowchart illustrating an example of processing of an exception handler.

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

1…テーブル群 111…複数のプロセスで共有されるテーブル 112…ロックテーブル群 2…テーブル退避域 3,4…プロセス 5…例外ハンドラ 6…ロック機構 7…アンロック機構 8…退避テーブル要素返却機構 9…復元テーブル要素返却機構 10…テーブル退避復元機構 11…復元可否登録機構 12…パターン情報設定機構 13…パターン情報テーブル 14…復元可否表示 MEM…主記憶 CPU1,CPU2…プロセッサ 1 ... Table group 111 ... Table shared by a plurality of processes 112 ... Lock table group 2 ... Table save area 3,4 ... Process 5 ... Exception handler 6 ... Lock mechanism 7 ... Unlock mechanism 8 ... Save table element return mechanism 9 ... restoration table element return mechanism 10 ... table evacuation restoration mechanism 11 ... restorability propriety registration mechanism 12 ... pattern information setting mechanism 13 ... pattern information table 14 ... restorability propriety display MEM ... main memory CPU1, CPU2 ... processor

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数のプロセッサより構成され、プロセ
ッサ間で主記憶上の共有テーブルを排他的に使用するマ
ルチプロセッサシステムにおける共有テーブルのロック
制御方式において、 主記憶上の共有テーブルをテーブル退避域へ退避する処
理とテーブル退避域に退避された共有テーブルを主記憶
の元の場所へ復元する処理とを行うテーブル退避復元機
構と、 ロック要求に応答して、主記憶上の共有テーブルをロッ
クすると共に、前記テーブル退避復元機構を呼び出し
て、前記ロックした共有テーブルをテーブル退避域へ退
避させるロック機構と、 テーブルの復元要を指定するアンロック要求に応答し
て、前記テーブル退避復元機構を呼び出して、前記テー
ブル退避域に退避されている共有テーブルを主記憶上の
元の場所へ復元させた後、その共有テーブルのロックを
解除し、また、テーブルの復元不要を指定するアンロッ
ク要求に応答して、共有テーブルのロックを解除すると
共に該解除した共有テーブルを前記テーブル退避域から
削除するアンロック機構と、 プログラム割り込み発生時に、テーブルの復元要を指定
したアンロック要求を前記アンロック機構に送出する例
外ハンドラとを備えることを特徴とする共有テーブルの
ロック制御方式。
1. A shared table lock control method in a multiprocessor system comprising a plurality of processors, wherein the shared table on the main memory is exclusively used by the processors, and the shared table on the main memory is transferred to a table save area. A table save / restore mechanism that performs the process of saving and the process of restoring the shared table saved in the table save area to the original location in main memory, and locks the shared table in main memory in response to a lock request. Calling the table save / restore mechanism to call the table save / restore mechanism in response to a lock mechanism that saves the locked shared table to the table save area and an unlock request that specifies the need to restore the table, After restoring the shared table saved in the table save area to the original location on the main memory, An unlock mechanism for releasing the lock of the shared table and releasing the lock of the shared table and deleting the released shared table from the table save area in response to an unlock request designating that the table need not be restored. And a lock control method for a shared table, comprising: an exception handler that sends an unlock request designating table restoration to the unlock mechanism when a program interrupt occurs.
【請求項2】 各共有テーブルの構成を認識して退避す
べきテーブル要素のアドレスとサイズとを前記ロック機
構に通知する退避テーブル要素返却機構を備え、前記ロ
ック機構は、前記退避テーブル要素返却機構から通知さ
れるアドレスとサイズと退避すべきテーブル名とを前記
テーブル退避復元機構に通知し、前記テーブル退避復元
機構は、通知されたアドレスとサイズとテーブル名とを
含むヘッダ部と、通知されたアドレスとサイズとで特定
されるテーブル要素の内容とを含む退避エントリを前記
テーブル退避域に格納することを特徴とする請求項1記
載の共有テーブルのロック制御方式。
2. A save table element return mechanism for recognizing the configuration of each shared table and notifying the address and size of the table element to be saved to the lock mechanism, wherein the lock mechanism is the save table element return mechanism. Notifies the table saving / restoring mechanism of the address, size, and table name to be saved, and the table saving / restoring mechanism notifies the header section including the notified address, size, and table name. 2. The lock control method for a shared table according to claim 1, wherein a save entry including a content of a table element specified by an address and a size is stored in the table save area.
【請求項3】 テーブル退避域に退避されている退避エ
ントリのアドレスを通知する復元テーブル要素返却機構
を備え、前記アンロック機構は、前記復元テーブル要素
返却機構から通知されるアドレスを前記テーブル退避復
元機構に通知し、前記テーブル退避復元機構は、通知さ
れたアドレスの退避エントリに基づき主記憶上の元の場
所のテーブル要素を復元することを特徴とする請求項2
記載の共有テーブルのロック制御方式。
3. A restore table element return mechanism for notifying an address of a save entry saved in a table save area, wherein the unlock mechanism restores the address notified from the restore table element return mechanism to the table save and restore. 3. A mechanism is notified, and the table saving / restoring mechanism restores the table element at the original location on the main memory based on the saving entry of the notified address.
Shared table lock control method described.
【請求項4】 前記アンロック機構により参照される復
元可否表示を設定する復元可否登録機構を備え、前記例
外ハンドラは、発生したプログラム割り込みを解析して
システム動作継続不可能と判断したときは前記復元可否
登録機構により前記復元可否表示を復元不可に設定した
後に前記アンロック機構にアンロック要求を出し、前記
アンロック機構は前記復元可否表示が復元不可を示すと
きは直ちにシステムを停止させることを特徴とする請求
項3記載の共有テーブルのロック制御方式。
4. A restoration propriety registration mechanism for setting a restoration propriety display referred to by the unlock mechanism, wherein the exception handler analyzes the generated program interrupt and determines that the system operation cannot be continued. After the restoration permission / inhibition registration mechanism sets the restoration permission / inhibition to non-restoration, an unlock request is issued to the unlock mechanism, and the unlock mechanism stops the system immediately when the restoration permission / inhibition display indicates restoration is impossible. The shared table lock control method according to claim 3, wherein
JP13832894A 1994-05-27 1994-05-27 Lock control method for shared table Expired - Fee Related JP2605623B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13832894A JP2605623B2 (en) 1994-05-27 1994-05-27 Lock control method for shared table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13832894A JP2605623B2 (en) 1994-05-27 1994-05-27 Lock control method for shared table

Publications (2)

Publication Number Publication Date
JPH07319825A true JPH07319825A (en) 1995-12-08
JP2605623B2 JP2605623B2 (en) 1997-04-30

Family

ID=15219340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13832894A Expired - Fee Related JP2605623B2 (en) 1994-05-27 1994-05-27 Lock control method for shared table

Country Status (1)

Country Link
JP (1) JP2605623B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100397344C (en) * 2004-07-29 2008-06-25 国际商业机器公司 Method to switch the lock-bits combination used to lock a page table entry upon receiving system reset exceptions

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100397344C (en) * 2004-07-29 2008-06-25 国际商业机器公司 Method to switch the lock-bits combination used to lock a page table entry upon receiving system reset exceptions

Also Published As

Publication number Publication date
JP2605623B2 (en) 1997-04-30

Similar Documents

Publication Publication Date Title
JPH0713813B2 (en) Data access method and data processing system
JPH0465414B2 (en)
JPH06284458A (en) Telephone switching system having system and method for accessing user-controlled data memory
JPH0157373B2 (en)
JPH11327931A (en) Method and device for performing semaphore operation
JP3113841B2 (en) Parallel transaction processing system
US20040205392A1 (en) Generic fault-tolerant locking mechanism for multiprocessor systems
JPH05158622A (en) Buffer device
JP2005063435A (en) Method and system for containing software fault
JP2605623B2 (en) Lock control method for shared table
JP2001290637A (en) Dynamic replacing device for component and computer- readable storage medium
JP2872008B2 (en) Computer system and method for implementing system reduced operation
JPS6250938A (en) Recovering system for main memory resident data base
JPH0588954A (en) Data base updating method
JPH03196222A (en) Program replacing system
JP2001265750A (en) Memory controller
JPH0540635A (en) Dynamic deactivating method and device for program exit
JPH04105159A (en) Work substitute system
JPH0962500A (en) Dynamic patching method and dynamic patching system
JP3277888B2 (en) Lock wait release device and machine-readable recording medium recording program
JPH05233412A (en) Recovery system for computer job
JPH04275648A (en) Data base system monitoring control system
JPH086805A (en) Multiprocessor system
JPH06161782A (en) Control system for multiprocessing
JPS6234251A (en) File restoration system

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees