JP2002007148A - Exclusive control system for shared resource and resource lock method and recording medium - Google Patents

Exclusive control system for shared resource and resource lock method and recording medium

Info

Publication number
JP2002007148A
JP2002007148A JP2000186592A JP2000186592A JP2002007148A JP 2002007148 A JP2002007148 A JP 2002007148A JP 2000186592 A JP2000186592 A JP 2000186592A JP 2000186592 A JP2000186592 A JP 2000186592A JP 2002007148 A JP2002007148 A JP 2002007148A
Authority
JP
Japan
Prior art keywords
program
shared resources
exclusive control
file
shared
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
JP2000186592A
Other languages
Japanese (ja)
Inventor
Yoshitomo Asano
義智 浅野
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2000186592A priority Critical patent/JP2002007148A/en
Publication of JP2002007148A publication Critical patent/JP2002007148A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve the problem that when plural programs are simultaneously executed, dead lock that the execution of those programs is stopped occurs since a waiting state for the release of the lock of mutually locked shared resources is continued unless the program design is performed under the consideration of the order of the lock of the shared resources. SOLUTION: This system is provided with plural shared resources, an exclusive control managing table in which the priority order of exclusive control set for those respective shared resources is stored, a program executing means for independently executing the plural programs using the plural shared resources, and a program controlling means for exclusively locking the corresponding shared resources successively in the priority order stored in the exclusive control managing table when the program executing means independently executes the plural programs using the plural shared resources.

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は複数の共有資源を
用いる複数のプログラムをそれぞれ独立に実行するコン
ピュータシステムに係り、特に複数の共有資源のそれぞ
れに設定した排他制御の優先順位を格納する排他制御管
理テーブルに従って順次対応する共有資源を排他的にロ
ックすることで、独立して実行される複数のプログラム
が共有資源を互いに占有してデッドロック状態に陥るこ
とを防ぐことができる共有資源の排他制御システム及び
資源ロック方法並びに記録媒体に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer system which independently executes a plurality of programs using a plurality of shared resources, and more particularly to an exclusive control for storing the priority of the exclusive control set for each of the plurality of shared resources. Exclusive control of shared resources that can prevent a plurality of independently executed programs from occupying each other and falling into a deadlock state by exclusively locking the corresponding shared resources sequentially according to the management table The present invention relates to a system, a resource locking method, and a recording medium.

【0002】[0002]

【従来の技術】近年のハードウェア/ソフトウェア技術
の進展により、複数のプログラムを独立に実行する計算
モデルを現実化するコンピュータシステムが出現し、今
後、これらの重要性が高まっている。
2. Description of the Related Art With the recent development of hardware / software technology, computer systems for realizing calculation models for independently executing a plurality of programs have appeared, and their importance has been increasing in the future.

【0003】図11は上述したような複数のプログラム
を独立して実行することができる従来のコンピュータシ
ステムの構成を概念的に示す図である。図において、
1,2はコンピュータシステム30A内の演算制御装置
10Aがプログラム100,200を実行する際に、デ
ータの書き込み・読み出しが行われる共有資源であるフ
ァイルである。また、演算制御装置10Aがプログラム
100,200を独立して実行する際、同時にファイル
1,2にデータの書き込み・読み出しを行わないように
ファイルロックされる。10Aはコンピュータシステム
30A内の演算制御装置で、CPUや高速で動作する主
記憶装置などから構成され、不図示の上記主記憶装置に
プログラム100,200を格納し、プログラム10
0,200を構成する命令を適宜読み出して解読して演
算処理を行ったり、ファイル1,2にアクセスして演算
処理に要するデータや処理結果のデータの読み出しや書
き込みなどの制御処理も行う。20Aはファイル1,2
を格納する補助記憶装置であるハードディスク、30A
は上記構成を含むコンピュータシステムで、通常のコン
ピュータシステムが有する上記以外の構成を備えている
ものとする。100,200は演算制御装置10Aの不
図示の上記主記憶装置に格納されたプログラムで、プロ
グラム100,200を構成する命令シーケンスに従っ
て逐次読み出されて解読されて実行される。
FIG. 11 is a diagram conceptually showing a configuration of a conventional computer system capable of independently executing a plurality of programs as described above. In the figure,
Reference numerals 1 and 2 denote files which are shared resources in which data is written and read when the arithmetic and control unit 10A in the computer system 30A executes the programs 100 and 200. Further, when the arithmetic and control unit 10A independently executes the programs 100 and 200, the files are locked so as not to write and read data to and from the files 1 and 2 at the same time. 10A is an arithmetic and control unit in the computer system 30A, which is composed of a CPU, a high-speed main storage device, etc., stores programs 100 and 200 in the main storage device (not shown),
It performs arithmetic processing by reading and decoding the instructions constituting 0 and 200 as appropriate, and also performs control processing such as reading and writing of data required for the arithmetic processing and data of processing results by accessing the files 1 and 2. 20A is file 1, 2
Hard disk as an auxiliary storage device for storing
Is a computer system including the above configuration, which has a configuration other than the above that a normal computer system has. 100 and 200 are programs stored in the main storage device (not shown) of the arithmetic and control unit 10A, which are sequentially read, decoded, and executed according to an instruction sequence constituting the programs 100 and 200.

【0004】次に動作について説明する。本願発明はコ
ンピュータシステムにおける共有資源の排他制御に係る
ものであるから、ここでは、共有資源の排他制御動作に
ついて説明する。図12は図11のコンピュータシステ
ムにおける共有資源を使用した処理動作を示すフロー図
である。先ず、プログラム100の実行フローについて
説明すると、演算制御装置10Aが不図示の主記憶装置
からプログラム100を構成する命令を読み出し、プロ
グラム100の実行を開始する(ステップST11−
1)。演算制御装置10Aによってプログラム100の
所定の処理が実行される(ステップST11−2)。こ
こでは、例えば処理結果として生成したデータをファイ
ル1,2に書き込む処理が行われるものとする。
Next, the operation will be described. Since the present invention relates to exclusive control of shared resources in a computer system, the exclusive control operation of shared resources will be described here. FIG. 12 is a flowchart showing a processing operation using a shared resource in the computer system of FIG. First, the execution flow of the program 100 will be described. The arithmetic and control unit 10A reads an instruction constituting the program 100 from a main storage device (not shown) and starts executing the program 100 (step ST11-).
1). The predetermined process of the program 100 is executed by the arithmetic and control unit 10A (step ST11-2). Here, it is assumed that, for example, a process of writing data generated as a processing result to the files 1 and 2 is performed.

【0005】ファイル1にステップST11−2におい
て生成したデータを書き込むために、演算制御装置10
Aがファイル1を排他的にロックする(ステップST1
1−3)。これにより、プログラム100によるプロセ
スがファイル1を使用する処理を行うことができ、他の
プロセスはこのプログラム100によるプロセスがファ
イル1のロックを解除するまでファイル1を使用するこ
とができない。つまり、この間にファイル1を使用しよ
うとするプロセスが発生した場合は、プログラム100
によるプロセスがファイル1のロックを解除するまで待
ち状態となる。
[0005] In order to write the data generated in step ST11-2 to the file 1, the arithmetic and control unit 10
A locks file 1 exclusively (step ST1)
1-3). As a result, the process by the program 100 can perform processing using the file 1, and other processes cannot use the file 1 until the process by the program 100 releases the lock on the file 1. That is, if a process that attempts to use file 1 occurs during this time, the program 100
Is in a waiting state until the process of the file 1 releases the lock of the file 1.

【0006】演算制御装置10Aはファイル1のロック
が完了すると、ステップST11−2において生成した
データの一部を書き込む(ステップST11−4)。こ
のデータは不図示のデータバスなどを介してハードディ
スク20A内のファイル1に書き込まれる。次に、演算
制御装置10Aはファイル2を排他的にロック(ステッ
プST11−5)し、ステップST11−2において生
成したデータの残りを書き込む(ステップST11−
6)。この書き込み動作は上記ステップST11−4に
おけるものと同様である。以上の書き込み動作が完了す
ると、演算制御装置10Aはプログラム100の実行を
終了し、上述したファイル1,2に対するロックを解除
する(ステップST11−7)。
When the locking of file 1 is completed, arithmetic and control unit 10A writes a part of the data generated in step ST11-2 (step ST11-4). This data is written to file 1 in hard disk 20A via a data bus (not shown) or the like. Next, the arithmetic and control unit 10A exclusively locks the file 2 (step ST11-5), and writes the rest of the data generated in step ST11-2 (step ST11-).
6). This write operation is the same as that in step ST11-4. When the above write operation is completed, the arithmetic and control unit 10A terminates the execution of the program 100 and releases the lock on the files 1 and 2 (step ST11-7).

【0007】このように、プログラム100と同様にフ
ァイル1の次にファイル2にアクセスするプログラムで
あれば、演算制御装置10Aによってプログラム100
と同時に実行された場合に、そのいずれかがファイル
1,2を排他的にロックしてからアクセスするために同
一のファイルを2つのプログラムが競合することがな
く、排他的に処理を行うことができる。
As described above, if the program accesses the file 2 after the file 1 in the same manner as the program 100, the program 100
If the two programs are executed at the same time, one of them can exclusively lock files 1 and 2 and then access them. it can.

【0008】次にプログラム200の実行フローについ
て説明する。演算制御装置10Aが不図示の主記憶装置
からプログラム200を構成する命令を読み出し、プロ
グラム200の実行を開始する(ステップST11−1
a)。演算制御装置10Aによってプログラム200の
所定の処理が実行される(ステップST11−2a)。
ここでは、プログラム100と同様に、処理結果として
生成したデータをファイル1,2に書き込む処理が行わ
れるものとする。
Next, the execution flow of the program 200 will be described. Arithmetic controller 10A reads an instruction constituting program 200 from a main storage device (not shown) and starts execution of program 200 (step ST11-1).
a). The predetermined process of the program 200 is executed by the arithmetic and control unit 10A (step ST11-2a).
Here, as in the case of the program 100, a process of writing data generated as a processing result to the files 1 and 2 is performed.

【0009】演算制御装置10Aがファイル2を排他的
にロック(ステップST11−3a)し、ステップST
11−2aにおいて生成したデータの一部を書き込む
(ステップST11−4a)。次に、演算制御装置10
Aはファイル1を排他的にロック(ステップST11−
5a)し、ステップST11−2aにおいて生成したデ
ータの残りを書き込む(ステップST11−6a)。以
上の書き込み動作が完了すると、演算制御装置10Aは
プログラム200の実行を終了し、上述したファイル
1,2に対するロックを解除する(ステップST11−
7a)。
[0009] The arithmetic and control unit 10A exclusively locks the file 2 (step ST11-3a).
A part of the data generated in 11-2a is written (step ST11-4a). Next, the arithmetic and control unit 10
A locks file 1 exclusively (step ST11-
5a), and write the rest of the data generated in step ST11-2a (step ST11-6a). When the above write operation is completed, the arithmetic and control unit 10A terminates the execution of the program 200 and releases the lock on the files 1 and 2 (step ST11-).
7a).

【0010】このように、プログラム200と同様にフ
ァイル2の次にファイル1にアクセスするプログラムで
あれば、演算制御装置10Aによってプログラム200
と同時に実行された場合に、そのいずれかがファイル
1,2を排他的にロックしてからアクセスするために同
一のファイルを2つのプログラムが競合することがな
く、排他的に処理を行うことができる。
As described above, if the program accesses the file 1 after the file 2 like the program 200, the program 200
If the two programs are executed at the same time, one of them can exclusively lock files 1 and 2 and then access them. it can.

【0011】以上のように、従来のコンピュータシステ
ムは、ファイル1,2のような共有資源を用いる複数の
プログラムを独立して実行する場合に共有資源を排他的
にロックすることで、複数のプログラムが競合すること
がなく、排他的に処理を行うことができる共有資源の排
他制御システムとして機能する。
As described above, the conventional computer system locks the shared resources exclusively when independently executing a plurality of programs using the shared resources, such as the files 1 and 2, thereby providing a plurality of programs. Function as a shared resource exclusive control system that can perform processing exclusively without conflict.

【0012】[0012]

【発明が解決しようとする課題】従来の共有資源の排他
制御システムは以上のように構成されているので、共有
資源をロックする順序を考慮しながらプログラム設計を
行わないと、複数のプログラムが同時に実行された場合
に互いにロックした共有資源のロック解除を待ち続け
て、プログラムの実行が停止してしまうデッドロックが
起こるという課題があった。
Since the conventional shared resource exclusive control system is configured as described above, unless a program is designed while taking into account the order in which the shared resources are locked, a plurality of programs can be simultaneously executed. When executed, there is a problem that a deadlock occurs in which the execution of the program is stopped while waiting for the unlocking of the mutually locked shared resources.

【0013】上記課題を具体的に説明すると、例えば演
算制御装置10Aがプログラム100,200を同時に
実行開始した場合を考えると、プログラム100を実行
する際に、プログラム200ではステップST11−3
aにおいてファイル2をロックすることから、このファ
イル2に対するロックが解除されるまで、ステップST
11−5においてファイル2をロックすることができず
にプログラム100の実行が待ち状態となる(ステップ
ST11−8)。一方、プログラム200を実行する際
に、プログラム100ではステップST11−3におい
てファイル1をロックすることから、このファイル1に
対するロックが解除されるまで、ステップST11−5
aにおいてファイル1をロックすることができずにプロ
グラム200の実行が待ち状態となる(ステップST1
1−9)。
To describe the above problem in detail, for example, considering that the arithmetic and control unit 10A starts executing the programs 100 and 200 at the same time, when the program 100 is executed, the program 200 executes step ST11-3.
a, the file 2 is locked until the lock on the file 2 is released.
Since the file 2 cannot be locked in 11-5, the execution of the program 100 is put into a wait state (step ST11-8). On the other hand, when the program 200 is executed, the program 100 locks the file 1 in step ST11-3, and the program 100 locks the file 1 until the lock on the file 1 is released in step ST11-5.
a, the file 1 cannot be locked, and the execution of the program 200 waits (step ST1).
1-9).

【0014】このように、プログラム100,200が
互いにロックしたファイル1,2のロック解除を待つこ
ととなり、プログラム100,200の実行が停止した
状態(デッドロック)に陥ってしまう。このデッドロッ
クを回避するためには、プログラム設計者がプログラム
100,200によるファイルロックの順序を考慮して
設計を行い、ファイルロックの順序の整合性をとる必要
がある(例えば、プログラム200でもファイルのロッ
クは、ファイル1の次にファイル2をロックする順序に
変更する)。
As described above, the programs 100 and 200 wait for the unlocking of the files 1 and 2 locked to each other, and the execution of the programs 100 and 200 is stopped (deadlock). In order to avoid this deadlock, it is necessary for a program designer to perform design in consideration of the order of file locking by the programs 100 and 200 and to ensure consistency of the order of file locking (for example, the Changes the order in which file 2 is locked after file 1).

【0015】しかしながら、実際のコンピュータシステ
ムにおけるプログラム及びこれに用いられるファイルは
膨大な数に及ぶ上、プログラム内でのファイル使用順序
もプログラムの処理目的に依存することから、実際にフ
ァイルロックの整合性をとる作業は非常に煩雑なものと
なっていた。
However, the number of programs and files used in the actual computer system is enormous, and the order of file use in the program depends on the processing purpose of the program. Was very complicated.

【0016】この発明は上記のような課題を解決するた
めになされたもので、複数の共有資源のそれぞれに設定
した排他制御の優先順位を格納する排他制御管理テーブ
ルに従って順次対応する共有資源を排他的にロックする
ことで、独立して実行される複数のプログラムが共有資
源を互いに占有してデッドロック状態に陥ることを防ぐ
ことができる共有資源の排他制御システムを得ることを
目的とする。
The present invention has been made to solve the above-described problems, and sequentially excludes corresponding shared resources according to an exclusive control management table that stores the priority of exclusive control set for each of a plurality of shared resources. It is an object of the present invention to obtain a shared resource exclusive control system that can prevent a plurality of independently executed programs from occupying the shared resource and causing a deadlock state by locking the shared resources.

【0017】また、この発明は複数の共有資源のそれぞ
れに設定した排他制御の優先順位を格納する排他制御管
理テーブルに従って順次対応する共有資源を排他的にロ
ックすることで、独立して実行される複数のプログラム
が共有資源を互いに占有してデッドロック状態に陥るこ
とを防ぐことができる資源ロック方法を得ることを目的
とする。
Further, the present invention is independently executed by exclusively locking the corresponding shared resources sequentially according to the exclusive control management table storing the priority of the exclusive control set for each of the plurality of shared resources. It is an object of the present invention to provide a resource locking method capable of preventing a plurality of programs from occupying a shared resource and causing a deadlock state.

【0018】さらに、この発明は複数の共有資源のそれ
ぞれに設定した排他制御の優先順位を格納する排他制御
管理テーブルに従って順次対応する共有資源を排他的に
ロックすることで、独立して実行される複数のプログラ
ムが共有資源を互いに占有してデッドロック状態に陥る
ことを防ぐことができる共有資源の排他制御プログラム
を記憶したコンピュータ読み取り可能な記録媒体を得る
ことを目的とする。
Further, the present invention is independently executed by sequentially locking the corresponding shared resources exclusively in accordance with the exclusive control management table storing the priority of the exclusive control set for each of the plurality of shared resources. An object of the present invention is to provide a computer-readable recording medium storing an exclusive control program for a shared resource that can prevent a plurality of programs from occupying the shared resource and causing a deadlock state.

【0019】[0019]

【課題を解決するための手段】この発明に係る共有資源
の排他制御システムは、複数の共有資源と、複数の共有
資源のそれぞれに設定した排他制御の優先順位を格納す
る排他制御管理テーブルと、複数の共有資源を用いる複
数のプログラムをそれぞれ独立に実行するプログラム実
行手段と、このプログラム実行手段が複数の共有資源を
用いる複数のプログラムをそれぞれ独立に実行するにあ
たり、排他制御管理テーブルに格納された優先順位に従
って順次対応する共有資源を排他的にロックするプログ
ラム制御手段とを備えるものである。
An exclusive control system for a shared resource according to the present invention comprises: an exclusive control management table for storing a plurality of shared resources; and an exclusive control priority set for each of the plurality of shared resources. A program execution means for independently executing a plurality of programs using a plurality of shared resources, and a program execution means for executing a plurality of programs using a plurality of shared resources independently of each other. Program control means for exclusively locking the corresponding shared resources in sequence according to the priority.

【0020】この発明に係る共有資源の排他制御システ
ムは、プログラム実行手段が、プログラムロジックを変
更及び/又は追加して、共有資源を使用する順序が変更
されたプログラムを含む複数のプログラムをプログラム
実行手段が実行するものである。
In the exclusive resource control system for shared resources according to the present invention, the program executing means changes and / or adds program logic to execute a plurality of programs including programs whose order of using the shared resources has been changed. It is what the means do.

【0021】この発明に係る共有資源の排他制御システ
ムは、排他制御管理テーブルが、共有資源に変更がある
と、変更された共有資源に変更前の優先順位を設定する
ものである。
[0021] In the shared resource exclusive control system according to the present invention, when the shared resource is changed in the exclusive control management table, the changed shared resource is set to the priority before the change.

【0022】この発明に係る共有資源の排他制御システ
ムは、共有資源が新たに追加されると、排他制御管理テ
ーブルに追加された共有資源に対応する優先順位を付加
的に設定するものである。
In the shared resource exclusive control system according to the present invention, when a shared resource is newly added, a priority order corresponding to the added shared resource is set in the exclusive control management table.

【0023】この発明に係る資源ロック方法は、複数の
共有資源と、複数の共有資源のそれぞれに設定した排他
制御の優先順位を格納する排他制御管理テーブルと、複
数の共有資源を用いる複数のプログラムをそれぞれ独立
に実行するプログラム実行手段とを備えた共有資源の排
他制御システムの資源ロック方法において、プログラム
実行手段が複数の共有資源を用いる複数のプログラムを
それぞれ独立に実行するにあたり、排他制御管理テーブ
ルに格納された優先順位に従って順次対応する共有資源
を排他的にロックするものである。
According to the resource locking method of the present invention, there are provided an exclusive control management table for storing a plurality of shared resources, an exclusive control priority set for each of the plurality of shared resources, and a plurality of programs using the plurality of shared resources. A shared resource exclusion control system comprising a program execution means for independently executing a plurality of programs, each of which independently executes a plurality of programs using a plurality of shared resources. The exclusive resources are sequentially locked in accordance with the priority stored in the shared resources.

【0024】この発明に係る共有資源の排他制御プログ
ラムを記録したコンピュータ読み取り可能な記録媒体
は、複数の共有資源と、複数の共有資源のそれぞれに設
定した排他制御の優先順位を格納する排他制御管理テー
ブルとを含んでおり、複数の共有資源を用いる複数のプ
ログラムをそれぞれ独立に実行するにあたり、排他制御
管理テーブルに格納された優先順位に従って順次対応す
る共有資源を排他的にロックするものである。
[0024] A computer-readable recording medium storing an exclusive control program for shared resources according to the present invention is an exclusive control management system for storing a plurality of shared resources and a priority order of exclusive control set for each of the plurality of shared resources. When executing a plurality of programs using a plurality of shared resources independently of each other, the corresponding shared resources are exclusively locked sequentially according to the priority stored in the exclusive control management table.

【0025】[0025]

【発明の実施の形態】以下、この発明の実施の一形態を
説明する。 実施の形態1.図1はこの発明の実施の形態1による共
有資源の排他制御システムの構成を概略的に示す図であ
る。図において、1,2は実施の形態1による共有資源
の排他制御システムを構成するコンピュータシステム3
0内の演算制御装置10がプログラム100,200を
実行する際に、データの書き込み・読み出しが行われる
共有資源であるファイル(共有資源)である。また、演
算制御装置10がプログラム100,200を独立して
実行する際、同時にファイル1,2にデータの書き込み
・読み出しを行わないようにファイルロックされる。3
はプログラム100,200を実行する際に、ファイル
1,2のそれぞれに設定した排他的にロックする優先順
位を格納したファイルロック管理テーブル(排他制御管
理テーブル)で、演算制御装置10内の不図示の主記憶
装置に記憶される。また、このファイルロック管理テー
ブル3に格納された上記優先順位は、演算制御装置10
が実行するプログラムの命令シーケンスに従って逐次読
み出されて解読され、後述する排他制御に使用される。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below. Embodiment 1 FIG. FIG. 1 is a diagram schematically showing a configuration of an exclusive control system for shared resources according to Embodiment 1 of the present invention. In the figure, reference numerals 1 and 2 denote computer systems 3 constituting an exclusive control system for shared resources according to the first embodiment.
0 is a file (shared resource) that is a shared resource in which data is written and read when the arithmetic and control unit 10 in 0 executes the programs 100 and 200. Further, when the arithmetic and control unit 10 executes the programs 100 and 200 independently, the files are locked so as not to write and read data to and from the files 1 and 2 at the same time. 3
Is a file lock management table (exclusive control management table) storing the exclusive lock priority set for each of the files 1 and 2 when the programs 100 and 200 are executed. Is stored in the main storage device. The priority stored in the file lock management table 3 is determined by the arithmetic and control unit 10.
Are sequentially read out and decoded according to the instruction sequence of the program executed by the CPU, and are used for exclusive control described later.

【0026】10はコンピュータシステム30内の演算
制御装置(プログラム実行手段、プログラム制御手段)
で、CPUや高速で動作する主記憶装置などから構成さ
れ、不図示の上記主記憶装置にプログラム100,20
0を格納し、プログラム100,200を構成する命令
を適宜読み出して解読して演算処理を行ったり、ファイ
ル1,2にアクセスして演算処理に要するデータや処理
結果のデータの読み出しや書き込みなどの制御処理も行
う。20はファイル1,2を格納する補助記憶装置であ
るハードディスク、30は上記構成を含む共有資源の排
他制御システムを構成するコンピュータシステムで、通
常のコンピュータシステムが有する上記以外の構成を備
えているものとする。100,200は演算制御装置1
0の不図示の上記主記憶装置に格納されたプログラム
で、プログラム100,200を構成する命令シーケン
スに従って逐次読み出されて解読されて実行される。
Reference numeral 10 denotes an arithmetic and control unit in the computer system 30 (program execution means, program control means)
The program 100, 20 comprises a CPU, a main storage device operating at a high speed, and the like.
0, and read and decode instructions constituting the programs 100 and 200 as appropriate to perform arithmetic processing, or access the files 1 and 2 to read and write data required for arithmetic processing and data of processing results. Control processing is also performed. Reference numeral 20 denotes a hard disk which is an auxiliary storage device for storing the files 1 and 2, and 30 denotes a computer system which constitutes an exclusive control system for shared resources including the above-mentioned configuration, which has a configuration other than the above which a general computer system has. And 100 and 200 are arithmetic and control units 1
The program stored in the main storage device (not shown) is sequentially read, decoded, and executed in accordance with an instruction sequence constituting the programs 100 and 200.

【0027】次に動作について説明する。本願発明はコ
ンピュータシステムにおける共有資源の排他制御に係る
ものであるから、ここでは、共有資源の排他制御動作に
ついて説明する。図2は図1の共有資源の排他制御シス
テムにおける共有資源を使用した処理動作を示すフロー
図である。先ず、プログラム100が実行されると、演
算制御装置10が不図示の主記憶装置からプログラム1
00を構成する命令を読み出し、プログラム100の実
行を開始する(ステップST2−1)。図示の例ではプ
ログラム100を構成する命令シーケンスの冒頭部分で
ファイルロック管理テーブル3に格納された優先順位が
逐次読み出されて解読され、この優先順位に従って、優
先順位1が設定されたファイル1を排他的にロックし、
次に優先順位2が設定されたファイル2が排他的にロッ
クされる(ステップST2−2)。これにより、プログ
ラム100によるプロセスがファイル1,2を使用する
処理を行うことができ、他のプロセスはこのプログラム
100によるプロセスがファイル1,2のロックを解除
するまでファイル1,2を使用することができない。つ
まり、この間にファイル1を使用しようとするプロセス
が発生した場合は、プログラム100によるプロセスが
ファイル1,2のロックを解除するまで待ち状態とな
る。
Next, the operation will be described. Since the present invention relates to exclusive control of shared resources in a computer system, the exclusive control operation of shared resources will be described here. FIG. 2 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. First, when the program 100 is executed, the arithmetic and control unit 10 stores the program 1 in a main storage device (not shown).
The instructions that make up 00 are read, and the execution of the program 100 is started (step ST2-1). In the example shown in the figure, the priority stored in the file lock management table 3 is sequentially read and decoded at the beginning of the instruction sequence constituting the program 100, and the file 1 in which the priority 1 is set is determined according to the priority. Lock exclusively,
Next, the file 2 to which the priority order 2 is set is exclusively locked (step ST2-2). As a result, the process by the program 100 can perform processing using the files 1 and 2, and other processes can use the files 1 and 2 until the process by the program 100 releases the lock on the files 1 and 2. Can not. That is, if a process that attempts to use the file 1 occurs during this time, the program 100 waits until the process by the program 100 releases the lock on the files 1 and 2.

【0028】演算制御装置10によってプログラム10
0の所定の処理が実行(ステップST2−3)され、こ
の処理で生成したデータの一部をファイル1に書き込み
(ステップST2−4)、さらに残りのデータをファイ
ル2に書き込む(ステップST2−5)。これらデータ
の書き込みは、演算制御装置10とハードディスク20
とを接続する不図示のデータバスなどを介して行われ
る。ファイル1,2に対するデータの書き込み動作が完
了すると、演算制御装置10はプログラム100の実行
を終了し、上述したファイル1,2に対するロックを解
除する(ステップST2−6)。
The program 10 is executed by the arithmetic and control unit 10.
0 is performed (step ST2-3), a part of the data generated by this processing is written to file 1 (step ST2-4), and the remaining data is further written to file 2 (step ST2-5). ). The writing of these data is performed by the arithmetic and control unit 10 and the hard disk 20.
This is performed via a data bus (not shown) that connects When the data write operation on the files 1 and 2 is completed, the arithmetic and control unit 10 terminates the execution of the program 100 and releases the lock on the files 1 and 2 (step ST2-6).

【0029】ここで、プログラム100が終了する前
に、プログラム200が実行された場合を考える。先
ず、演算制御装置10が不図示の主記憶装置からプログ
ラム200を構成する命令を読み出し、プログラム20
0の実行を開始する(ステップST2−1a)。次に、
プログラム200を構成する命令シーケンスの冒頭部分
でファイルロック管理テーブル3に格納された優先順位
が逐次読み出されて解読され、この優先順位に従ってフ
ァイル1,2を排他的にロックしようとするが、この時
点ではプログラム100が実行中であり、ファイル1,
2がプログラム100によるプロセスに排他的にロック
されているので、プログラム100が終了してファイル
1,2に対するロックが解除されるまで待ち状態に入る
(ステップST2−7)。
Here, it is assumed that the program 200 is executed before the program 100 ends. First, the arithmetic and control unit 10 reads an instruction constituting the program 200 from a main storage device (not shown),
0 is started (step ST2-1a). next,
At the beginning of the instruction sequence constituting the program 200, the priorities stored in the file lock management table 3 are sequentially read and decoded, and the files 1 and 2 are exclusively locked according to the priorities. At this point, the program 100 is running, and the file 1,
2 is exclusively locked to the process by the program 100, the program 100 ends and enters a wait state until the lock on the files 1 and 2 is released (step ST2-7).

【0030】プログラム100が終了してファイル1,
2に対するロックが解除される(ステップST2−6)
と、ファイルロック管理テーブル3に格納された優先順
位に従って優先順位1が設定されたファイル1を排他的
にロックし、次に優先順位2が設定されたファイル2が
排他的にロックされる(ステップST2−2a)。これ
により、プログラム200によるプロセスがファイル
1,2を使用する処理を行うことができ、他のプロセス
はこのプログラム200によるプロセスがファイル1,
2のロックを解除するまでファイル1,2を使用するこ
とができない。つまり、この間にファイル1を使用しよ
うとするプロセスが発生した場合は、プログラム200
によるプロセスがファイル1,2のロックを解除するま
で待ち状態となる。
When the program 100 ends, the file 1,
2 is released (step ST2-6).
In accordance with the priority stored in the file lock management table 3, the file 1 with priority 1 is exclusively locked, and the file 2 with priority 2 is locked exclusively (step ST2-2a). As a result, a process using the program 200 can perform processing using the files 1 and 2, and other processes can execute processes using the files 1 and 2.
Files 1 and 2 cannot be used until lock 2 is released. That is, if a process that attempts to use file 1 occurs during this time, the program 200
Is in a wait state until the process releases the lock on the files 1 and 2.

【0031】次に、演算制御装置10によってプログラ
ム200の所定の処理が実行される(ステップST2−
3a)。ここでは、プログラム100と同様に、処理結
果として生成したデータをファイル1,2に書き込む処
理が行われるものとする。
Next, a predetermined process of the program 200 is executed by the arithmetic and control unit 10 (step ST2-).
3a). Here, as in the case of the program 100, a process of writing data generated as a processing result to the files 1 and 2 is performed.

【0032】ステップST2−3aで生成したデータの
一部をファイル2に書き込み(ステップST2−4
a)、さらに残りのデータをファイル1に書き込む(ス
テップST2−5a)。これらデータの書き込みは、演
算制御装置10とハードディスク20とを接続する不図
示のデータバスなどを介して行われる。ファイル1,2
に対するデータの書き込み動作が完了すると、演算制御
装置10はプログラム200の実行を終了し、上述した
ファイル1,2に対するロックを解除する(ステップS
T2−6a)。
A part of the data generated in step ST2-3a is written in file 2 (step ST2-4).
a) Then, the remaining data is written to file 1 (step ST2-5a). The writing of these data is performed via a data bus (not shown) connecting the arithmetic and control unit 10 and the hard disk 20. File 1,2
Is completed, the arithmetic and control unit 10 terminates the execution of the program 200 and releases the lock on the files 1 and 2 (step S).
T2-6a).

【0033】このように、プログラム200ではファイ
ル2にデータ書き込みを行った後に、ファイル1にデー
タを書き込む処理であるにもかかわらず、ファイルロッ
ク管理テーブル3に格納された優先順位に従って、プロ
グラム100と同一の順序でファイル1,2を排他的に
ロックするので、プログラム100,200が如何なる
タイミングで実行されようとも、相互のプログラム10
0,200がファイル1,2を競合するデッドロック状
態に陥ることはない。
As described above, although the program 200 writes data to the file 2 and then writes data to the file 1, the program 200 and the program 100 are written according to the priority stored in the file lock management table 3. Since the files 1 and 2 are exclusively locked in the same order, no matter what timing the programs 100 and 200 are executed, the mutual program 10
0, 200 does not fall into a deadlock state in which files 0, 200 compete with files 1, 2.

【0034】また、プログラム設計者はファイルロック
管理テーブル3に格納された優先順位に従ってファイル
を排他的にロックするように設計するだけでよく、ファ
イルロックの整合性をとる作業を省略することができ、
プログラム設計を容易に迅速に行えるようになることか
ら、ひいてはソフトウェアの生産性を向上させることが
できる。
Further, the program designer need only design the file to be exclusively locked in accordance with the priority order stored in the file lock management table 3, and can omit the work of ensuring consistency of the file lock. ,
Since program design can be performed easily and quickly, the productivity of software can be improved.

【0035】以上のように、この実施の形態1によれ
ば、ファイル1,2と、ファイル1,2のそれぞれに設
定した排他制御の優先順位を格納するファイルロック管
理テーブル3と、ファイル1,2を用いるプログラム1
00,200をそれぞれ独立に実行し、プログラム10
0,200を実行するにあたり、ファイルロック管理テ
ーブル3に格納された優先順位に従って順次対応するフ
ァイル1,2を排他的にロックする演算制御装置10と
を備えるので、プログラム100,200が如何なるタ
イミングで実行されようとも、演算制御装置10が相互
のプログラム100,200がファイル1,2を競合す
るデッドロック状態を引き起こすことを防ぐことができ
る。また、プログラム設計を容易に迅速に行えるように
なり、ひいてはソフトウェアの生産性を向上させること
ができる。
As described above, according to the first embodiment, the files 1 and 2, the file lock management table 3 for storing the priorities of the exclusive control set for each of the files 1 and 2, Program 1 using 2
00 and 200 are executed independently, and the program 10 is executed.
In executing 0, 200, the arithmetic and control unit 10 that exclusively locks the corresponding files 1 and 2 sequentially according to the priority stored in the file lock management table 3 is provided. Even if it is executed, the arithmetic and control unit 10 can prevent the mutual programs 100 and 200 from causing a deadlock condition in which the files 100 and 200 compete with each other. In addition, it is possible to easily and quickly design a program, thereby improving the productivity of software.

【0036】なお、上記実施の形態1ではプログラム1
00,200の命令シーケンスの冒頭部分でファイルロ
ック管理テーブル3に格納された優先順位に従ってファ
イル1,2を排他的にロックする例について示したが、
他方のプログラムの待ち状態となる時間が短縮化される
ように、ファイル1,2を排他的にロックするタイミン
グを変更してもよい。
In the first embodiment, the program 1
At the beginning of the instruction sequence of 00 and 200, an example has been shown in which the files 1 and 2 are exclusively locked according to the priority stored in the file lock management table 3.
The timing for exclusively locking the files 1 and 2 may be changed so that the time during which the other program waits is reduced.

【0037】実施の形態2.この実施の形態2はプログ
ラムロジックを変更及び/又は追加して共有資源を使用
する順序が変更されたプログラムを含む複数のプログラ
ムをプログラム実行手段が実行するものである。
Embodiment 2 In the second embodiment, the program execution means executes a plurality of programs including programs in which the order of using shared resources is changed by changing and / or adding program logic.

【0038】図3はこの発明の実施の形態2による共有
資源の排他制御システムの構成を概略的に示す図であ
る。図において、100aは演算制御装置10の不図示
の上記主記憶装置に格納されたプログラムで、プログラ
ム100のプログラムロジックを変更してファイル1,
2を使用する順序が変更されている。また、プログラム
100と同様にプログラム100aを構成する命令シー
ケンスに従って逐次読み出されて解読されて実行され
る。なお、図1と同一構成要素には同一符号を付して重
複する説明を省略する。
FIG. 3 is a diagram schematically showing a configuration of an exclusive control system for shared resources according to the second embodiment of the present invention. In the figure, reference numeral 100a denotes a program stored in the main storage device (not shown) of the arithmetic and control unit 10, which changes the program logic of the program 100 to a file 1,
The order of using 2 has been changed. Also, similarly to the program 100, it is sequentially read, decoded, and executed according to an instruction sequence constituting the program 100a. The same components as those in FIG. 1 are denoted by the same reference numerals, and duplicate description will be omitted.

【0039】次に動作について説明する。本願発明はコ
ンピュータシステムにおける共有資源の排他制御に係る
ものであるから、ここでは、共有資源の排他制御動作に
ついて説明する。図4は図3の共有資源の排他制御シス
テムにおける共有資源を使用した処理動作を示すフロー
図である。プログラム100の処理動作は上記実施の形
態1と同様である。ここでは、プログラム100のプロ
グラムロジックが変更されて、プログラム100aが実
行された場合について説明する。先ず、演算制御装置1
0が不図示の主記憶装置からプログラム100aを構成
する命令を読み出し、プログラム100aの実行を開始
する(ステップST4−1)。
Next, the operation will be described. Since the present invention relates to exclusive control of shared resources in a computer system, the exclusive control operation of shared resources will be described here. FIG. 4 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. The processing operation of the program 100 is the same as in the first embodiment. Here, the case where the program logic of the program 100 is changed and the program 100a is executed will be described. First, the arithmetic and control unit 1
0 reads an instruction constituting the program 100a from a main storage device (not shown) and starts execution of the program 100a (step ST4-1).

【0040】次にプログラム100aを構成する命令シ
ーケンスの冒頭部分でファイルロック管理テーブル3に
格納された優先順位が逐次読み出されて解読され、この
優先順位に従ってファイル1,2を排他的にロックする
(ステップST4−2)。プログラム100の命令シー
ケンスではファイル1へのデータ書き込みの後にファイ
ル2へデータを書き込むものであったが、プログラムロ
ジックが変更されたプログラム100aの命令シーケン
スではファイル2へのデータ書き込みの後にファイル1
にデータを書き込む順序に変更されている。しかしなが
ら、プログラム100aもファイルロック管理テーブル
3に格納された優先順位に従ってファイル1,2を排他
的にロックすることで、プログラム100a以外にファ
イル1,2を排他的にロックしようとするプログラムが
存在してもデッドロックに陥ることはない。
Next, at the beginning of the instruction sequence constituting the program 100a, the priorities stored in the file lock management table 3 are sequentially read and decoded, and the files 1 and 2 are exclusively locked according to the priorities. (Step ST4-2). In the instruction sequence of the program 100, data is written to the file 2 after writing the data to the file 1. However, in the instruction sequence of the program 100a in which the program logic is changed, the data of the file 1 is written after the data is written to the file 2.
The order in which data is written to has been changed. However, the program 100a also exclusively locks the files 1 and 2 in accordance with the priority order stored in the file lock management table 3, so that there are programs other than the program 100a that attempt to exclusively lock the files 1 and 2. No deadlock.

【0041】次に、演算制御装置10によってプログラ
ム100aの所定の処理が実行される(ステップST4
−3)。ステップST4−3で生成したデータの一部を
ファイル2に書き込み(ステップST4−4)、さらに
残りのデータをファイル1に書き込む(ステップST4
−5)。これらデータの書き込みは、演算制御装置10
とハードディスク20とを接続する不図示のデータバス
などを介して行われる。ファイル1,2に対するデータ
の書き込み動作が完了すると、演算制御装置10はプロ
グラム100aの実行を終了し、上述したファイル1,
2に対するロックを解除する(ステップST4−6)。
Next, predetermined processing of the program 100a is executed by the arithmetic and control unit 10 (step ST4).
-3). Part of the data generated in step ST4-3 is written to file 2 (step ST4-4), and the remaining data is written to file 1 (step ST4).
-5). Writing of these data is performed by the arithmetic and control unit 10.
This is performed via a data bus or the like (not shown) connecting the hard disk 20 and the hard disk 20. When the operation of writing data to the files 1 and 2 is completed, the arithmetic and control unit 10 terminates the execution of the program 100a, and
2 is released (step ST4-6).

【0042】このように、プログラムロジックに変更が
あり、当初の設計時からファイルの利用タイミングが変
更された場合においても、ファイルロック管理テーブル
3に格納された優先順位に従ってファイルを排他的にロ
ックするように設計しておくだけで、ファイルロックの
整合性をとる作業を省略することができ、プログラム設
計を容易に迅速に行えるようになることから、ひいては
ソフトウェアの生産性を向上させることができる。
As described above, even when the program logic is changed and the use timing of the file is changed from the initial design, the file is exclusively locked according to the priority stored in the file lock management table 3. With such a design, it is possible to omit the work of maintaining the consistency of the file lock, and it is possible to easily and quickly design a program, thereby improving the productivity of software.

【0043】図5は実施の形態2による共有資源の排他
制御システムにおける他の構成を概略的に示す図であ
る。図において、3aはプログラム100,100bを
実行する際に、ファイル1,2,4のそれぞれに設定し
た排他的にロックする優先順位を格納したファイルロッ
ク管理テーブル(排他制御管理テーブル)で、演算制御
装置10内の不図示の主記憶装置に記憶される。また、
このファイルロック管理テーブル3aに格納された上記
優先順位は、演算制御装置10が実行するプログラムの
命令シーケンスに従って逐次読み出されて解読され、後
述する排他制御に使用される。さらに、プログラムロジ
ックの追加によって新たなファイル4を使用する処理が
追加されても、このファイル4に対応する優先順位を付
加的にファイルロック管理テーブル3aに設定する。4
は実施の形態2による共有資源の排他制御システムを構
成するコンピュータシステム30内の演算制御装置10
がプログラム100,100bを実行する際に、データ
の書き込み・読み出しが行われる共有資源であるファイ
ル(共有資源)である。また、演算制御装置10がプロ
グラム100,100bを独立して実行する際、同時に
ファイル1,2にデータの書き込み・読み出しを行わな
いようにファイルロックされる。100bは演算制御装
置10の不図示の上記主記憶装置に格納されたプログラ
ムで、プログラム100にプログラムロジックを追加し
てファイル4を使用する処理が追加されている。また、
プログラム100と同様にプログラム100bを構成す
る命令シーケンスに従って逐次読み出されて解読されて
実行される。なお、図1と同一構成要素には同一符号を
付して重複する説明を省略する。
FIG. 5 is a diagram schematically showing another configuration of the shared resource exclusive control system according to the second embodiment. In FIG. 3, reference numeral 3a denotes a file lock management table (exclusive control management table) that stores the exclusive lock priority set for each of the files 1, 2, and 4 when executing the programs 100 and 100b. It is stored in a main storage device (not shown) in the device 10. Also,
The priorities stored in the file lock management table 3a are sequentially read and decoded according to the instruction sequence of the program executed by the arithmetic and control unit 10, and are used for exclusive control described later. Further, even if a process using a new file 4 is added due to the addition of the program logic, the priority order corresponding to the file 4 is additionally set in the file lock management table 3a. 4
Is an arithmetic and control unit 10 in the computer system 30 which constitutes the shared resource exclusive control system according to the second embodiment.
Is a file (shared resource) that is a shared resource in which data is written and read when the programs 100 and 100b are executed. Further, when the arithmetic and control unit 10 executes the programs 100 and 100b independently, the file is locked so that data is not written to or read from the files 1 and 2 at the same time. Reference numeral 100b denotes a program stored in the main storage device (not shown) of the arithmetic and control unit 10, and a process of adding a program logic to the program 100 and using the file 4 is added. Also,
Like the program 100, it is sequentially read, decoded, and executed according to an instruction sequence constituting the program 100b. The same components as those in FIG. 1 are denoted by the same reference numerals, and duplicate description will be omitted.

【0044】次に動作について説明する。本願発明はコ
ンピュータシステムにおける共有資源の排他制御に係る
ものであるから、ここでは、共有資源の排他制御動作に
ついて説明する。図6は図5の共有資源の排他制御シス
テムにおける共有資源を使用した処理動作を示すフロー
図である。プログラム100の処理動作は、プログラム
100を構成する命令シーケンスの冒頭部分でファイル
ロック管理テーブル3aに格納された優先順位が逐次読
み出されて解読され、この優先順位に従ってファイル
1,2,4を排他的にロックする以外は上記実施の形態
1と同様である。また、プログラム100の処理動作で
は排他的にロックしたファイル4に対して何も処理を行
わない。
Next, the operation will be described. Since the present invention relates to exclusive control of shared resources in a computer system, the exclusive control operation of shared resources will be described here. FIG. 6 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. In the processing operation of the program 100, the priorities stored in the file lock management table 3a are sequentially read and decoded at the beginning of the instruction sequence constituting the program 100, and the files 1, 2, and 4 are excluded according to the priorities. It is the same as the first embodiment, except that it is locked. In the processing operation of the program 100, no processing is performed on the file 4 exclusively locked.

【0045】次に、プログラム100にプログラムロジ
ックを追加したプログラム100bが実行された場合に
ついて説明する。先ず、演算制御装置10が不図示の主
記憶装置からプログラム100bを構成する命令を読み
出し、プログラム100bの実行を開始する(ステップ
ST6−1)。プログラム100bを構成する命令シー
ケンスの冒頭部分でファイルロック管理テーブル3aに
格納された優先順位が逐次読み出されて解読され、この
優先順位に従ってファイル1,2,4を排他的にロック
する(ステップST6−2)。
Next, the case where the program 100b in which the program logic is added to the program 100 is executed will be described. First, the arithmetic and control unit 10 reads an instruction making up the program 100b from a main storage device (not shown) and starts executing the program 100b (step ST6-1). At the beginning of the instruction sequence constituting the program 100b, the priorities stored in the file lock management table 3a are sequentially read and decoded, and the files 1, 2, and 4 are exclusively locked according to the priorities (step ST6). -2).

【0046】次に、演算制御装置10によってプログラ
ム100bの所定の処理が実行される(ステップST6
−3)。ステップST6−3で生成したデータの一部を
ファイル1に書き込み(ステップST6−4)、さらに
データをファイル2に書き込み(ステップST6−
5)、最後にデータをファイル4に書き込む(ステップ
ST6−6)。これらデータの書き込みは、演算制御装
置10とハードディスク20とを接続する不図示のデー
タバスなどを介して行われる。ファイル1,2,4に対
するデータの書き込み動作が完了すると、演算制御装置
10はプログラム100bの実行を終了し、上述したフ
ァイル1,2,4に対するロックを解除する(ステップ
ST6−7)。
Next, predetermined processing of program 100b is executed by arithmetic and control unit 10 (step ST6).
-3). Part of the data generated in step ST6-3 is written to file 1 (step ST6-4), and further data is written to file 2 (step ST6-).
5) Finally, the data is written to file 4 (step ST6-6). The writing of these data is performed via a data bus (not shown) connecting the arithmetic and control unit 10 and the hard disk 20. When the data write operation on the files 1, 2, and 4 is completed, the arithmetic and control unit 10 terminates the execution of the program 100b and releases the lock on the files 1, 2, and 4 (step ST6-7).

【0047】このように、プログラムロジックに追加が
あり、当初の設計時から新規のファイルの利用が追加さ
れた場合においても、追加されたファイルに対する優先
順位をファイルロック管理テーブル3aに付加的に設定
するだけで、ファイルロックの整合性をとる作業を省略
することができ、プログラム設計を容易に迅速に行える
ようになることから、ひいてはソフトウェアの生産性を
向上させることができる。
As described above, even when the program logic is added and the use of a new file is added from the initial design, the priority of the added file is additionally set in the file lock management table 3a. By doing so, the task of ensuring the consistency of the file lock can be omitted, and the program design can be performed easily and quickly, thereby improving the productivity of the software.

【0048】また、プログラムロジックの追加によって
新たなファイル4を使用する処理が追加された場合に、
このファイル4に対応する優先順位を付加的にファイル
ロック管理テーブル3aに設定する操作は、演算制御装
置10が処理するプログラムによって自動的に行っても
よく、コンピュータシステム30のユーザが不図示の入
力部を用いて適宜設定できるようにしてもよい。
When a process using a new file 4 is added by adding program logic,
The operation of additionally setting the priority order corresponding to the file 4 in the file lock management table 3a may be automatically performed by a program processed by the arithmetic and control unit 10, and the user of the computer system 30 may input the data (not shown). The setting may be made appropriately using a unit.

【0049】以上のように、この実施の形態2によれ
ば、プログラムロジックを変更及び/又は追加してファ
イル1,2,4を使用する順序が変更されたプログラム
を含む複数のプログラムを演算制御装置10が実行する
ので、プログラムロジックに変更があった場合でも、変
更前と同様にファイルロック管理テーブル3に設定され
た優先順位でファイル1,2をロックし、又は、追加さ
れたファイル4に対する優先順位をファイルロック管理
テーブル3aに付加的に設定するだけで、ファイルロッ
クの整合性をとる作業を省略することができ、プログラ
ム設計を容易に迅速に行えるようになることから、ひい
てはソフトウェアの生産性を向上させることができる。
As described above, according to the second embodiment, a plurality of programs including a program in which the order in which the files 1, 2, and 4 are used are changed by changing and / or adding the program logic to execute arithmetic control. Since the program is executed by the apparatus 10, even when the program logic is changed, the files 1 and 2 are locked with the priority set in the file lock management table 3 as before, or the added file 4 is locked. By simply setting the priority order in the file lock management table 3a, it is possible to omit the work of maintaining the consistency of the file lock, and it is possible to easily and quickly design a program, and thus to produce software. Performance can be improved.

【0050】実施の形態3.この実施の形態3は、共有
資源に変更があると、変更された共有資源に変更前の優
先順位を排他制御管理テーブルに設定するものである。
Embodiment 3 In the third embodiment, when there is a change in the shared resources, the priorities of the changed shared resources before the change are set in the exclusive control management table.

【0051】図7はこの発明の実施の形態3による共有
資源の排他制御システムの構成を概略的に示す図であ
る。図において、100cは演算制御装置10の不図示
の上記主記憶装置に格納されたプログラムで、ファイル
1,2,4の設計が変更されてファイル1,2を使用す
るプログラムロジックからファイル1,4を使用するプ
ログラムロジックに変更されている。また、プログラム
100と同様にプログラム100cを構成する命令シー
ケンスに従って逐次読み出されて解読されて実行され
る。なお、図1及び図5と同一構成要素には同一符号を
付して重複する説明を省略する。
FIG. 7 is a diagram schematically showing a configuration of an exclusive control system for shared resources according to Embodiment 3 of the present invention. In the figure, reference numeral 100c denotes a program stored in the main storage device (not shown) of the arithmetic and control unit 10; The use of program logic has been changed. Also, similarly to the program 100, they are sequentially read, decoded, and executed according to an instruction sequence constituting the program 100c. The same components as those in FIGS. 1 and 5 are denoted by the same reference numerals, and redundant description will be omitted.

【0052】次に動作について説明する。本願発明はコ
ンピュータシステムにおける共有資源の排他制御に係る
ものであるから、ここでは、共有資源の排他制御動作に
ついて説明する。図8は図7の共有資源の排他制御シス
テムにおける共有資源を使用した処理動作を示すフロー
図である。プログラム100の処理動作は、プログラム
100を構成する命令シーケンスの冒頭部分でファイル
ロック管理テーブル3aに格納された優先順位が逐次読
み出されて解読され、この優先順位に従ってファイル
1,2,4を排他的にロックする以外は上記実施の形態
1と同様である。ここでは、ファイル設計が変更され
て、プログラム100cが実行された場合について説明
する。先ず、演算制御装置10が不図示の主記憶装置か
らプログラム100cを構成する命令を読み出し、プロ
グラム100cの実行を開始する(ステップST7−
1)。
Next, the operation will be described. Since the present invention relates to exclusive control of shared resources in a computer system, the exclusive control operation of shared resources will be described here. FIG. 8 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. In the processing operation of the program 100, the priorities stored in the file lock management table 3a are sequentially read and decoded at the beginning of the instruction sequence constituting the program 100, and the files 1, 2, and 4 are excluded according to the priorities. It is the same as the first embodiment, except that it is locked. Here, a case where the file design is changed and the program 100c is executed will be described. First, the arithmetic and control unit 10 reads an instruction constituting the program 100c from a main storage device (not shown) and starts executing the program 100c (step ST7-).
1).

【0053】次に、プログラム100cを構成する命令
シーケンスの冒頭部分でファイルロック管理テーブル3
aに格納された優先順位が逐次読み出されて解読され、
この優先順位に従ってファイル1,2,4を排他的にロ
ックする(ステップST7−2)。プログラム100の
命令シーケンスではファイル1へのデータ書き込みの後
にファイル2へデータを書き込むものであったが、ファ
イル設計が変更されて、これに対応してプログラムロジ
ックが変更されたプログラム100cの命令シーケンス
ではファイル1へのデータ書き込みの後にファイル4に
データを書き込む順序に変更されている。しかしなが
ら、プログラム100cもファイルロック管理テーブル
3aに格納された優先順位に従ってファイル1,2,4
を排他的にロックすることで、プログラム100c以外
にファイル1,2,4を排他的にロックしようとするプ
ログラムが存在してもデッドロックに陥ることはない。
Next, at the beginning of the instruction sequence constituting the program 100c, the file lock management table 3
a is sequentially read out and decoded,
The files 1, 2, and 4 are exclusively locked according to the priority (step ST7-2). In the instruction sequence of the program 100, the data is written to the file 2 after the data is written to the file 1. However, the instruction sequence of the program 100c in which the file design is changed and the program logic is changed correspondingly is changed. The order has been changed to write data to file 4 after writing data to file 1. However, the program 100c also divides the files 1, 2, 4 according to the priority stored in the file lock management table 3a.
Is exclusively locked, there is no deadlock even if there is a program that exclusively locks the files 1, 2, 4 other than the program 100c.

【0054】次に、演算制御装置10によってプログラ
ム100cの所定の処理が実行される(ステップST7
−3)。ステップST7−3で生成したデータの一部を
ファイル1に書き込み(ステップST7−4)、さらに
残りのデータをファイル4に書き込む(ステップST7
−5)。これらデータの書き込みは、演算制御装置10
とハードディスク20とを接続する不図示のデータバス
などを介して行われる。ファイル1,4に対するデータ
の書き込み動作が完了すると、演算制御装置10はプロ
グラム100cの実行を終了し、上述したファイル1,
2,4に対するロックを解除する(ステップST7−
6)。
Next, a predetermined process of the program 100c is executed by the arithmetic and control unit 10 (step ST7).
-3). Part of the data generated in step ST7-3 is written to file 1 (step ST7-4), and the remaining data is written to file 4 (step ST7).
-5). Writing of these data is performed by the arithmetic and control unit 10.
This is performed via a data bus or the like (not shown) connecting the hard disk 20 and the hard disk 20. When the data write operation to the files 1 and 4 is completed, the arithmetic and control unit 10 terminates the execution of the program 100c, and
Release the locks on 2, 4 (step ST7-
6).

【0055】以上のように、この実施の形態3によれ
ば、ファイル1,2,4に変更があると、プログラム1
00が利用するファイル2から変更されて、プログラム
100cが利用するファイル4になっても、変更前のフ
ァイル2の優先順位をファイルロック管理テーブル3a
に設定するので、ファイルロック管理テーブル3aに格
納された優先順位に従ってファイルを排他的にロックす
るように設計しておくだけで、デッドロックを引き起こ
すことなく変更のあったファイルを利用することができ
る。
As described above, according to the third embodiment, when the files 1, 2, 4 are changed, the program 1
00 is changed from the file 2 used by the program 100c to the file 4 used by the program 100c, the priority order of the file 2 before the change is changed to the file lock management table 3a.
, The file that has been changed can be used without causing a deadlock only by designing so that the file is exclusively locked according to the priority stored in the file lock management table 3a. .

【0056】実施の形態4.この実施の形態4は、共有
資源が新たに追加されると、追加された共有資源に対応
する優先順位を排他制御管理テーブルに付加的に設定す
るものである。
Embodiment 4 In the fourth embodiment, when a shared resource is newly added, a priority order corresponding to the added shared resource is additionally set in the exclusive control management table.

【0057】図9はこの発明の実施の形態4による共有
資源の排他制御システムの構成を概略的に示す図であ
る。図において、3bはプログラム100を実行する際
に、ファイル1,2及び新たに追加されたファイル4の
それぞれに設定した排他的にロックする優先順位を格納
したファイルロック管理テーブル(排他制御管理テーブ
ル)で、演算制御装置10内の不図示の主記憶装置に記
憶される。また、このファイルロック管理テーブル3b
に格納された上記優先順位は、演算制御装置10が実行
するプログラムの命令シーケンスに従って逐次読み出さ
れて解読され、後述する排他制御に使用される。さら
に、新たにファイル4が追加されても、このファイル4
に対応する優先順位を付加的にファイルロック管理テー
ブル3bに設定する。なお、図1及び図5と同一構成要
素には同一符号を付して重複する説明を省略する。
FIG. 9 is a diagram schematically showing the configuration of a shared resource exclusive control system according to the fourth embodiment of the present invention. In FIG. 3, reference numeral 3b denotes a file lock management table (exclusive control management table) that stores the exclusive lock priority set for each of the files 1 and 2 and the newly added file 4 when the program 100 is executed. Then, it is stored in a main storage device (not shown) in the arithmetic and control unit 10. The file lock management table 3b
Are sequentially read out and decoded according to the instruction sequence of the program executed by the arithmetic and control unit 10, and are used for exclusive control described later. Further, even if a new file 4 is added,
Are additionally set in the file lock management table 3b. The same components as those in FIGS. 1 and 5 are denoted by the same reference numerals, and redundant description will be omitted.

【0058】図10は実施の形態4による共有資源の排
他制御システムのファイルロック管理テーブルを示す図
である。図の左側がファイル4の追加前のファイルロッ
ク管理テーブル3を示し、図の右側がファイル4の追加
後のファイルロック管理テーブル3bを示す。新規追加
のファイル4に対応する優先順位は付加的に設定されて
ファイルロック管理テーブル3bが構成されている。
FIG. 10 is a diagram showing a file lock management table of the shared resource exclusive control system according to the fourth embodiment. The left side of the figure shows the file lock management table 3 before the addition of the file 4, and the right side of the figure shows the file lock management table 3b after the addition of the file 4. The priority order corresponding to the newly added file 4 is additionally set to configure the file lock management table 3b.

【0059】次に概要について説明する。先ず、図10
の左側のファイルロック管理テーブル3に示されるよう
に、ファイル1をロックした後にファイル2をロックす
るようにファイルロック管理テーブル3にファイルロッ
クを実行する優先順位が設定されている。システム30
上で動作する各プログラムは、各プログラム内で使用す
るファイルをファイルロック管理テーブル3に設定され
た優先順位でファイルロックすることによりデッドロッ
クの発生を防止している。
Next, the outline will be described. First, FIG.
As shown in the file lock management table 3 on the left side of FIG. 5, the file lock management table 3 has a priority set to execute file locking so that the file 1 is locked and then the file 2 is locked. System 30
Each of the programs operating above prevents the occurrence of deadlock by locking the files used in each program according to the priority set in the file lock management table 3.

【0060】ここで、ファイル4を新たに追加すること
になった場合に、図10の右側のファイルロック管理テ
ーブル3bに示されるように、ファイル4の優先順位を
付加的に設定している。システム30上で動作する各プ
ログラムは、各プログラム内で使用するファイルをファ
イルロック管理テーブル3bに設定された優先順位でフ
ァイルロックすることにより、新たに追加されたファイ
ル4を使用するプログラムは他のプログラムとデッドロ
ックを起こすことがなく、ファイル4を排他的にロック
して使用することができる。
Here, when the file 4 is newly added, the priority of the file 4 is additionally set as shown in the file lock management table 3b on the right side of FIG. Each program operating on the system 30 locks files used in each program according to the priority set in the file lock management table 3b, so that programs using the newly added file 4 can be used by other programs. The file 4 can be exclusively locked and used without causing a deadlock with the program.

【0061】また、新たにファイル4が追加された場合
に、このファイル4に対応する優先順位を付加的にファ
イルロック管理テーブル3bに設定する操作は、演算制
御装置10が処理するプログラムによって自動的に行っ
てもよく、コンピュータシステム30のユーザが不図示
の入力部を用いて適宜設定できるようにしてもよい。
When a file 4 is newly added, the operation of additionally setting the priority corresponding to the file 4 in the file lock management table 3b is automatically performed by a program processed by the arithmetic and control unit 10. May be performed by the user of the computer system 30 using an input unit (not shown).

【0062】以上のように、この実施の形態4によれ
ば、ファイル1,2の他にファイル4が新たに追加され
ると、追加されたファイル4に対応する優先順位をファ
イルロック管理テーブル3bに付加的に設定するので、
ファイル4が追加された場合においても、追加されたフ
ァイル4に対応する優先順位をファイルロック管理テー
ブル3bに付加的に設定するだけで、特別に各プログラ
ム間でのファイルロック順序の整合性を考慮することな
く、デッドロックの発生を防いで新規に追加されたファ
イル4を利用することができる。
As described above, according to the fourth embodiment, when a file 4 is newly added in addition to the files 1 and 2, the priority corresponding to the added file 4 is set to the file lock management table 3b. Is set additionally to
Even when the file 4 is added, the priority order corresponding to the added file 4 is simply set additionally in the file lock management table 3b, and the consistency of the file lock order among the programs is specially considered. Thus, the newly added file 4 can be used while preventing a deadlock from occurring.

【0063】また、上記実施の形態による共有資源の排
他制御システムの機能をコンピュータに実行させる共有
資源の排他制御プログラムをコンピュータ読み取り可能
な記録媒体に記録して、この記録媒体をコンピュータに
読み取らせて、その記憶手段に格納することで、上記実
施の形態による共有資源の排他制御システムにおける効
果を奏するコンピュータシステムを構築することがで
き、上記実施の形態による共有資源の排他制御システム
の汎用性を向上させることができる。
Further, the exclusive resource control program for causing the computer to execute the functions of the shared resource exclusive control system according to the above embodiment is recorded on a computer-readable recording medium, and the recording medium is read by the computer. By storing the information in the storage means, it is possible to construct a computer system exhibiting the effects of the shared resource exclusive control system according to the above embodiment, and to improve the versatility of the shared resource exclusive control system according to the above embodiment. Can be done.

【0064】なお、上記実施の形態では共有資源として
ファイル1,2を示したが、本願発明はこれに限らず、
コンピュータシステム30の演算制御装置10が実行す
るプロセスが使用する資源であればソフトウェア、ハー
ドウェアを問わず適用することができる。
In the above embodiment, the files 1 and 2 are shown as shared resources. However, the present invention is not limited to this.
As long as the resources are used by the processes executed by the arithmetic and control unit 10 of the computer system 30, the software and hardware can be applied.

【0065】[0065]

【発明の効果】以上のように、この発明の共有資源の排
他制御システムによれば、複数の共有資源と、複数の共
有資源のそれぞれに設定した排他制御の優先順位を格納
する排他制御管理テーブルと、複数の共有資源を用いる
複数のプログラムをそれぞれ独立に実行するプログラム
実行手段と、このプログラム実行手段が複数の共有資源
を用いる複数のプログラムをそれぞれ独立に実行するに
あたり、排他制御管理テーブルに格納された優先順位に
従って順次対応する共有資源を排他的にロックするプロ
グラム制御手段とを備えるので、複数のプログラムが如
何なるタイミングで実行されようとも、プログラム実行
手段がデッドロック状態を引き起こすことを防ぐことが
できるという効果がある。
As described above, according to the shared resource exclusive control system of the present invention, an exclusive control management table for storing a plurality of shared resources and the priority of exclusive control set for each of the plurality of shared resources. And a program execution means for independently executing a plurality of programs using a plurality of shared resources, and storing the information in an exclusive control management table when the program execution means independently executes a plurality of programs using a plurality of shared resources. And program control means for exclusively locking the shared resources sequentially corresponding to the given priorities, so that no matter what timing a plurality of programs are executed, it is possible to prevent the program execution means from causing a deadlock condition. There is an effect that can be.

【0066】また、プログラム設計者が排他制御管理テ
ーブルに格納された優先順位に従って共有資源を排他的
にロックするように設計するだけでよく、ロックの整合
性をとる作業を省略することができ、プログラム設計を
容易に迅速に行えるようになることから、ひいてはソフ
トウェアの生産性を向上させることができるという効果
がある。
Further, it is only necessary for the program designer to design such that the shared resources are exclusively locked in accordance with the priorities stored in the exclusive control management table, and the work of securing lock consistency can be omitted. Since program design can be performed easily and quickly, there is an effect that the productivity of software can be improved.

【0067】この発明の共有資源の排他制御システムに
よれば、プログラム実行手段が、プログラムロジックを
変更及び/又は追加して共有資源を使用する順序が変更
されたプログラムを含む複数のプログラムを実行するの
で、プログラムロジックに変更があった場合でも、変更
前と同様に排他制御管理テーブルに格納された優先順位
で共有資源をロックし、又は、追加された共有資源に対
する優先順位を排他制御管理テーブルに付加的に設定す
るだけで、ロックの整合性をとる作業を省略することが
でき、プログラム設計を容易に迅速に行えるようになる
ことから、ひいてはソフトウェアの生産性を向上させる
ことができるという効果がある。
According to the shared resource exclusion control system of the present invention, the program execution means executes a plurality of programs including a program in which the order of using the shared resource is changed by changing and / or adding the program logic. Therefore, even when there is a change in the program logic, the shared resources are locked with the priority stored in the exclusive control management table as before, or the priority for the added shared resource is stored in the exclusive control management table. By simply making an additional setting, it is possible to omit the task of locking consistency, and it is possible to easily and quickly design a program, thereby improving the productivity of software. is there.

【0068】この発明の共有資源の排他制御システムに
よれば、排他制御管理テーブルが、共有資源に変更があ
ると、変更された共有資源に変更前の優先順位を設定す
るので、共有資源が変更されても、排他制御管理テーブ
ルに格納された優先順位に従って共有資源を排他的にロ
ックするように設計しておくだけで、デッドロックを引
き起こすことなく変更された共有資源を利用することが
できるという効果がある。
According to the shared resource exclusive control system of the present invention, when the shared resource is changed, the exclusive control management table sets the priorities of the changed shared resources before the change. Even if the shared resources are changed, it is possible to use the changed shared resources without causing deadlock simply by designing the shared resources exclusively according to the priority stored in the exclusive control management table. effective.

【0069】この発明の共有資源の排他制御システムに
よれば、共有資源が新たに追加されると、排他制御管理
テーブルが、追加された共有資源に対応する優先順位を
付加的に設定するので、追加された共有資源に対応する
優先順位を排他制御管理テーブルに付加的に設定するだ
けで、特別に各プログラム間でのロック順序の整合性を
考慮することなく、デッドロックの発生を防いで新規に
追加された共有資源を利用することができるという効果
がある。
According to the shared resource exclusive control system of the present invention, when a shared resource is newly added, the exclusive control management table additionally sets a priority order corresponding to the added shared resource. By simply setting the priority corresponding to the added shared resource in the exclusive control management table additionally, it is possible to prevent deadlock from occurring without special consideration of lock order consistency between programs. There is an effect that the shared resources added to the file can be used.

【0070】この発明の資源ロック方法によれば、複数
の共有資源と、複数の共有資源のそれぞれに設定した排
他制御の優先順位を格納する排他制御管理テーブルと、
複数の共有資源を用いる複数のプログラムをそれぞれ独
立に実行するプログラム実行手段とを備えた共有資源の
排他制御システムの資源ロック方法において、プログラ
ム実行手段が複数の共有資源を用いる複数のプログラム
をそれぞれ独立に実行するにあたり、排他制御管理テー
ブルに格納された優先順位に従って順次対応する共有資
源を排他的にロックするので、複数のプログラムが如何
なるタイミングで実行されようとも、各プログラムが共
有資源を競合するデッドロック状態に陥ることを防ぐこ
とができるという効果がある。
According to the resource locking method of the present invention, an exclusive control management table for storing a plurality of shared resources and an exclusive control priority set for each of the plurality of shared resources,
A resource locking method for a shared resource exclusive control system, comprising: a program execution unit that independently executes a plurality of programs using a plurality of shared resources, wherein the program execution unit independently executes a plurality of programs using a plurality of shared resources. When executing multiple programs, the corresponding shared resources are exclusively locked in order according to the priority order stored in the exclusive control management table. There is an effect that the lock state can be prevented.

【0071】この発明の共有資源の排他制御プログラム
を記録したコンピュータ読み取り可能な記録媒体によれ
ば、複数の共有資源と、複数の共有資源のそれぞれに設
定した排他制御の優先順位を格納する排他制御管理テー
ブルとを含んでおり、複数の共有資源を用いる複数のプ
ログラムをそれぞれ独立に実行するにあたり、排他制御
管理テーブルに格納された優先順位に従って順次対応す
る共有資源を排他的にロックするので、段落0066及
び段落0067の効果を奏する共有資源の排他制御シス
テムの汎用性を向上させることができるという効果があ
る。
According to the computer-readable recording medium for recording the shared resource exclusive control program of the present invention, the exclusive control for storing the plurality of shared resources and the priority order of the exclusive control set for each of the plurality of shared resources. A management table is included, and when executing a plurality of programs using a plurality of shared resources independently of each other, the corresponding shared resources are exclusively locked sequentially according to the priority stored in the exclusive control management table. There is an effect that the versatility of the exclusive control system for the shared resources that has the effects of the paragraphs 0066 and 0067 can be improved.

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

【図1】 この発明の実施の形態1による共有資源の排
他制御システムの構成を概略的に示す図である。
FIG. 1 is a diagram schematically showing a configuration of a shared resource exclusive control system according to a first embodiment of the present invention;

【図2】 図1の共有資源の排他制御システムにおける
共有資源を使用した処理動作を示すフロー図である。
FIG. 2 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. 1;

【図3】 この発明の実施の形態2による共有資源の排
他制御システムの構成を概略的に示す図である。
FIG. 3 is a diagram schematically showing a configuration of a shared resource exclusive control system according to a second embodiment of the present invention;

【図4】 図3の共有資源の排他制御システムにおける
共有資源を使用した処理動作を示すフロー図である。
FIG. 4 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. 3;

【図5】 この発明の実施の形態2による共有資源の排
他制御システムにおける他の構成を概略的に示す図であ
る。
FIG. 5 is a diagram schematically showing another configuration in the shared resource exclusive control system according to the second embodiment of the present invention;

【図6】 図5の共有資源の排他制御システムにおける
共有資源を使用した処理動作を示すフロー図である。
6 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. 5;

【図7】 この発明の実施の形態3による共有資源の排
他制御システムの構成を概略的に示す図である。
FIG. 7 is a diagram schematically showing a configuration of a shared resource exclusive control system according to a third embodiment of the present invention;

【図8】 図7の共有資源の排他制御システムにおける
共有資源を使用した処理動作を示すフロー図である。
8 is a flowchart showing a processing operation using a shared resource in the shared resource exclusive control system of FIG. 7;

【図9】 この発明の実施の形態4による共有資源の排
他制御システムの構成を概略的に示す図である。
FIG. 9 is a diagram schematically showing a configuration of a shared resource exclusive control system according to a fourth embodiment of the present invention;

【図10】 実施の形態4による共有資源の排他制御シ
ステムのファイルロック管理テーブルを示す図である。
FIG. 10 is a diagram illustrating a file lock management table of the shared resource exclusive control system according to the fourth embodiment.

【図11】 従来のコンピュータシステムの構成を概念
的に示す図である。
FIG. 11 is a diagram conceptually showing the configuration of a conventional computer system.

【図12】 図10のコンピュータシステムにおける共
有資源を使用した処理動作を示すフロー図である。
FIG. 12 is a flowchart showing a processing operation using a shared resource in the computer system of FIG. 10;

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

1,2,4 ファイル(共有資源)、3,3a,3b
ファイルロック管理テーブル(排他制御管理テーブ
ル)、10 演算制御装置(プログラム実行手段、プロ
グラム制御手段)、20 ハードディスク、30 コン
ピュータシステム(共有資源の排他制御システム)、1
00,100a,100b,100c,200 プログ
ラム。
1,2,4 files (shared resources), 3,3a, 3b
File lock management table (exclusive control management table), 10 arithmetic and control unit (program execution means, program control means), 20 hard disk, 30 computer system (exclusive control system for shared resources), 1
00, 100a, 100b, 100c, 200 Program.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 複数の共有資源と、 上記複数の共有資源のそれぞれに設定した排他制御の優
先順位を格納する排他制御管理テーブルと、 上記複数の共有資源を用いる複数のプログラムをそれぞ
れ独立に実行するプログラム実行手段と、 このプログラム実行手段が上記複数の共有資源を用いる
複数のプログラムをそれぞれ独立に実行するにあたり、
上記排他制御管理テーブルに格納された上記優先順位に
従って順次対応する共有資源を排他的にロックするプロ
グラム制御手段とを備えた共有資源の排他制御システ
ム。
1. An exclusive control management table for storing a plurality of shared resources, an exclusive control priority set for each of the plurality of shared resources, and a plurality of programs using the plurality of shared resources, respectively. A program execution unit that executes the plurality of programs using the plurality of shared resources independently of each other.
A shared resource exclusive control system comprising: a program control means for exclusively locking the shared resources sequentially corresponding to the priorities stored in the exclusive control management table.
【請求項2】 プログラム実行手段は、プログラムロジ
ックを変更及び/又は追加して共有資源を使用する順序
が変更されたプログラムを含む複数のプログラムを実行
することを特徴とする請求項1記載の共有資源の排他制
御システム。
2. The shared program according to claim 1, wherein the program executing means executes a plurality of programs including a program whose order of using shared resources is changed by changing and / or adding program logic. Exclusive resource control system.
【請求項3】 排他制御管理テーブルは、共有資源に変
更があると、上記変更された共有資源に変更前の優先順
位を設定することを特徴とする請求項1記載の共有資源
の排他制御システム。
3. The exclusive control system for shared resources according to claim 1, wherein the exclusive control management table sets the priorities of the changed shared resources before the change when the shared resources are changed. .
【請求項4】 排他制御管理テーブルは、共有資源が新
たに追加されると、上記追加された共有資源に対応する
優先順位を付加的に設定することを特徴とする請求項1
記載の共有資源の排他制御システム。
4. The exclusive control management table according to claim 1, wherein when a shared resource is newly added, a priority order corresponding to the added shared resource is additionally set.
Exclusive control system for the shared resources described.
【請求項5】 複数の共有資源と、上記複数の共有資源
のそれぞれに設定した排他制御の優先順位を格納する排
他制御管理テーブルと、上記複数の共有資源を用いる複
数のプログラムをそれぞれ独立に実行するプログラム実
行手段とを備えた共有資源の排他制御システムの資源ロ
ック方法において、 上記プログラム実行手段が上記複数の共有資源を用いる
複数のプログラムをそれぞれ独立に実行するにあたり、
上記排他制御管理テーブルに格納された上記優先順位に
従って順次対応する共有資源を排他的にロックすること
を特徴とする資源ロック方法。
5. An exclusive control management table for storing a plurality of shared resources, an exclusive control priority set for each of the plurality of shared resources, and a plurality of programs using the plurality of shared resources, respectively. A resource locking method for a shared resource exclusive control system comprising: a program execution unit that executes a plurality of programs using the plurality of shared resources independently of each other.
A resource locking method characterized by exclusively locking shared resources sequentially corresponding to the priorities stored in the exclusive control management table.
【請求項6】 複数の共有資源と、上記複数の共有資源
のそれぞれに設定した排他制御の優先順位を格納する排
他制御管理テーブルとを含んでおり、 上記複数の共有資源を用いる複数のプログラムをそれぞ
れ独立に実行するにあたり、上記排他制御管理テーブル
に格納された上記優先順位に従って順次対応する共有資
源を排他的にロックする共有資源の排他制御プログラム
を記録したコンピュータ読み取り可能な記録媒体。
6. An exclusive control management table for storing a plurality of shared resources and an exclusive control priority set for each of the plurality of shared resources, wherein a plurality of programs using the plurality of shared resources are stored. A computer-readable recording medium recording a shared resource exclusive control program for exclusively locking a corresponding shared resource according to the priority order stored in the exclusive control management table in order to independently execute the shared resources.
JP2000186592A 2000-06-21 2000-06-21 Exclusive control system for shared resource and resource lock method and recording medium Pending JP2002007148A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000186592A JP2002007148A (en) 2000-06-21 2000-06-21 Exclusive control system for shared resource and resource lock method and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000186592A JP2002007148A (en) 2000-06-21 2000-06-21 Exclusive control system for shared resource and resource lock method and recording medium

Publications (1)

Publication Number Publication Date
JP2002007148A true JP2002007148A (en) 2002-01-11

Family

ID=18686725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000186592A Pending JP2002007148A (en) 2000-06-21 2000-06-21 Exclusive control system for shared resource and resource lock method and recording medium

Country Status (1)

Country Link
JP (1) JP2002007148A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011052467A1 (en) 2009-10-30 2011-05-05 株式会社エヌ・ティ・ティ・データ Data access device, data access method and data access program
DE102012221037A1 (en) 2011-12-02 2013-06-06 International Business Machines Corporation Unit and method for realizing a resource lock
JP2017526084A (en) * 2014-09-04 2017-09-07 エディファイアー・エルエルシーEdifire LLC Distributed data synchronization and conflict resolution

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011052467A1 (en) 2009-10-30 2011-05-05 株式会社エヌ・ティ・ティ・データ Data access device, data access method and data access program
US8666959B2 (en) 2009-10-30 2014-03-04 Ntt Data Corporation Data access device, data access method and data access program
DE102012221037A1 (en) 2011-12-02 2013-06-06 International Business Machines Corporation Unit and method for realizing a resource lock
US8898127B2 (en) 2011-12-02 2014-11-25 International Business Machines Corporation Device and method for acquiring resource lock
US9189512B2 (en) 2011-12-02 2015-11-17 International Business Machines Corporation Device and method for acquiring resource lock
JP2017526084A (en) * 2014-09-04 2017-09-07 エディファイアー・エルエルシーEdifire LLC Distributed data synchronization and conflict resolution

Similar Documents

Publication Publication Date Title
US9189487B2 (en) Method for recording transaction log, and database engine
US8316370B2 (en) Method and apparatus for accessing a shared data structure in parallel by multiple threads
TWI424313B (en) Method and computer readable medium for software transaction commit order and conflict management
JPH04229355A (en) Data access method and data processing system
JP4963018B2 (en) Scheduling method and scheduling apparatus
JPH09325905A (en) Memory control unit
CN110597640A (en) Inter-process data transmission method and device, terminal and computer storage medium
Ahmadinia et al. Task scheduling for heterogeneous reconfigurable computers
JP2016517102A (en) Method and apparatus for processing replay data in a database
US10095542B2 (en) Cooperative thread array granularity context switch during trap handling
US20120191958A1 (en) System and method for context migration across cpu threads
CN111459691A (en) Read-write method and device for shared memory
CN114168271A (en) Task scheduling method, electronic device and storage medium
CN108733585B (en) Cache system and related method
EP3933639B1 (en) Transaction processing method, apparatus, and electronic device for blockchain
US20010014932A1 (en) Multi-processor system
JP2002007148A (en) Exclusive control system for shared resource and resource lock method and recording medium
US20060288049A1 (en) Method, System and computer Program for Concurrent File Update
JP4734348B2 (en) Asynchronous remote procedure call method, asynchronous remote procedure call program and recording medium in shared memory multiprocessor
CN106557477B (en) Method and apparatus for locking files in memory
CN113961364A (en) Large-scale lock system implementation method and device, storage medium and server
WO2020107352A1 (en) Log sequence number generation method and apparatus and readable storage medium
CN107145337B (en) Table entry access method and device of data stream processing chip
CN110764880B (en) Three-state control method based on atomic operation
CN115934377A (en) Shared memory communication method and system based on atomic operation

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20040312