JPH0682337B2 - File exclusion method - Google Patents
File exclusion methodInfo
- Publication number
- JPH0682337B2 JPH0682337B2 JP62028592A JP2859287A JPH0682337B2 JP H0682337 B2 JPH0682337 B2 JP H0682337B2 JP 62028592 A JP62028592 A JP 62028592A JP 2859287 A JP2859287 A JP 2859287A JP H0682337 B2 JPH0682337 B2 JP H0682337B2
- Authority
- JP
- Japan
- Prior art keywords
- exclusion
- exclusive
- storage unit
- database
- storage
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータベースファイル等のファイルを格納単位
ごとに排他するファイル排他方式の改良に関し、特に検
索した格納単位をプログラムで任意の期間だけ排他でき
るファイル排他方式に関する。The present invention relates to an improvement of a file exclusion method that excludes a file such as a database file for each storage unit, and in particular, a searched storage unit can be excluded by a program for an arbitrary period. Regarding the file exclusion method.
データをデータレコードとして記憶するための外部記憶
媒体であるデータベースファイルを備え、データベース
ファイルを格納単位と呼ぶ複数の部分に分割し、データ
ベースファイルに対する検索および更新を複数のプログ
ラムから同時に行なうことが可能であり、同時に複数の
プログラムから更新した場合の矛盾を発生させないため
に、その分割単位である格納単位ごとに排他制御を行な
うシステムが従来より知られている。A database file, which is an external storage medium for storing data as data records, is provided, and the database file can be divided into a plurality of parts called a storage unit, and the search and update of the database file can be performed simultaneously from multiple programs. In order to prevent a contradiction when updating from a plurality of programs at the same time, a system that performs exclusive control for each storage unit, which is the division unit, has been conventionally known.
第8図は従来のファイル排他方式を実施するシステムの
構成図であり、1はデータベースファイル、2はデータ
ベース排他手段、3はデータベース利用手段、4a〜4nは
アプリケーションプログラム(AP;以下単にプログラム
と称す)である。FIG. 8 is a block diagram of a system that implements a conventional file exclusion system. 1 is a database file, 2 is a database exclusion means, 3 is a database utilization means, and 4a to 4n are application programs (AP; hereinafter simply referred to as programs). ).
プログラム4a〜4nは、データベース利用手段3を介して
データベースファイル1内のデータレコードの検索,更
新を行なうものであり、データベース利用手段3はその
検索,更新時に次のような二種類の排他モードの排他制
御を実行する。The programs 4a to 4n are for searching and updating the data records in the database file 1 via the database using means 3, and the database using means 3 has the following two types of exclusive mode at the time of searching and updating. Execute exclusive control.
(1)第1の排他モード プログラム4a〜4が格納単位を更新するときに行ない、
更新した格納単位をそのプログラムが終了するまで排他
させる排他制御。つまり、例えばプログラム4aから格納
単位Aについての更新が要求されると、データベース排
他手段2に対し格納単位Aの排他を行なわせ、プログラ
ム4aの終了時にデータベース排他手段2に対し格納単位
Aの排他の解除を行なわせる。(1) First exclusive mode This is performed when the programs 4a to 4 update the storage unit,
Exclusive control that keeps the updated storage units locked until the program ends. That is, for example, when the program 4a requests the storage unit A to be updated, the database exclusion unit 2 is made to exclude the storage unit A, and at the end of the program 4a, the database exclusion unit 2 is made to exclude the storage unit A. Make it cancel.
(2)第2の排他モード プログラム4a〜4nが格納単位を検索するときに行ない、
検索した格納単位を、そのプログラムが別の格納単位を
検索するまで保持し、別の格納単位を検索すると、もと
の格納単位の排他を解除する排他制御。つまり、例えば
プログラム4aから格納単位Bについての検索が要求され
ると、データベース排他手段2に対し格納単位Bの排他
を行なわせ、プログラム4aが別の格納単位Cの検索を要
求すると、データベース排他手段3に対しもとの格納単
位Bの排他の解除を行なわせる。(2) Second exclusive mode This is performed when the programs 4a to 4n search storage units,
Exclusive control that holds the searched storage unit until the program searches for another storage unit, and releases the exclusion of the original storage unit when searching for another storage unit. That is, for example, when the program 4a requests a search for the storage unit B, the database exclusion unit 2 is made to exclude the storage unit B, and when the program 4a requests a search for another storage unit C, the database exclusion unit 3 is made to release the exclusion of the original storage unit B.
しかし上述した従来のファイル排他方式は、更新した格
納単位はプログラムが終了するまで排他されるが、検索
した格納単位は、別の格納単位を検索するとその排他が
解除されるため、そのプログラムが再びもとの格納単位
を検索するような場合、もとの格納単位が他のプログラ
ムで更新されていると、排他エラーになるという欠点が
ある。However, in the conventional file exclusion method described above, the updated storage unit is excluded until the program ends, but the searched storage unit is released when another storage unit is searched, so the program is re-executed. In the case of searching the original storage unit, if the original storage unit is updated by another program, an exclusive error will occur.
また、検索した格納単位は別の格納単位を検索すると排
他が解除されるため、そのプログラムがもとの格納単位
のデータの内容を使って何等かの更新を行なう場合、も
との格納単位が他のプログラムでデータ更新されている
と、格納単位のデータの内容を使った更新の内容が保証
されなくなるという欠点がある。In addition, the searched storage unit is released from the exclusion when another storage unit is searched, so if the program updates something using the contents of the data in the original storage unit, the original storage unit is If the data is updated by another program, there is a drawback that the content of the update using the content of the data of the storage unit cannot be guaranteed.
上述したような欠点が生じるのは、従来のファイル排他
方式が、前述した第1,第2の排他モードを実現する手段
以外に他の排他を実現する手段を有しなかった為であ
り、そこで本発明の目的は、検索した格納単位をプログ
ラムで任意の期間だけ排他できるような手段を追加する
ことにより、従来の上述した欠点を解消することにあ
る。The above-mentioned drawbacks occur because the conventional file exclusion system has no means for realizing other exclusion except means for realizing the above-mentioned first and second exclusion modes. An object of the present invention is to eliminate the above-mentioned drawbacks of the related art by adding a means by which a searched storage unit can be excluded by a program for an arbitrary period.
本発明は上記目的を達成するために、データをデータレ
コードとして記憶するための外部記憶媒体であるファイ
ルを備え、該ファイルを複数の部分に分割し、該ファイ
ルに対する検索および更新をデータベース利用手段を介
して複数のプログラムから同時に行なうことが可能であ
り、且つ、前記データベース利用手段は、更新される格
納単位はそのプログラム終了まで排他し、検索した格納
単位は別の格納単位をそのプログラムが検索するまで排
他する排他処理をデータベース排他手段を使用して行な
うシステムにおいて、 排他すべき格納単位をそれぞれ複数登録し得る複数の排
他記憶領域と、 前記プログラムからの指示に応答し、排他すべき格納単
位を指定された前記排他記憶領域に登録すると共に、該
登録した格納単位を排他するよう前記データベース排他
手段に通知する排他登録手段と、 前記プログラムからの前記排他記憶領域を指定した指示
に応答し、該指定された排他記録領域に登録されている
全ての格納単位についてその排他を解除するよう前記デ
ータベース排他手段に通知すると共に、前記排他記憶領
域の登録を抹消する排他解除手段とを備え、 前記データベース排他手段は、前記データベース利用手
段から排他を解除すべき通知があっても、前記排他登録
手段から排他すべき通知がある格納単位については排他
を残す構成を有する。In order to achieve the above object, the present invention comprises a file which is an external storage medium for storing data as a data record, divides the file into a plurality of parts, and uses database utilization means for searching and updating the file. Can be simultaneously performed from a plurality of programs via the program, and the database utilization means excludes the storage unit to be updated until the end of the program, and the program searches another storage unit for the searched storage unit. In a system in which exclusive processing for exclusive use is performed using a database exclusive means, a plurality of exclusive storage areas each capable of registering a plurality of storage units to be excluded, and a storage unit to be excluded in response to an instruction from the program Register in the specified exclusive storage area and exclude the registered storage unit. An exclusive registration means for notifying the database exclusive means, and an exclusive cancellation for all storage units registered in the specified exclusive recording area in response to an instruction from the program specifying the exclusive storage area The database exclusion unit, and the database exclusion unit cancels the registration of the exclusive storage area. The storage unit has a configuration in which exclusion is left for a storage unit for which there is a notification of exclusion from the registration means.
プログラムが、ある格納単位Aを検索し、別の格納単位
Bを検索した後のある時点までその検索単位Aの排他を
確保したい場合、使用する排他記憶領域および排他する
格納単位Aを指定して排他登録手段を起動すれば、排他
登録手段によって、格納単位Aが指定された排他記憶領
域に登録されると共にデータベース排他手段に格納単位
Aを排他すべき通知がなされる。When the program wants to secure exclusive access to a search unit A until a certain time after searching a certain storage unit A and searching another storage unit B, specify the exclusive storage area to be used and the storage unit A to be excluded. When the exclusive registration means is activated, the exclusive registration means registers the storage unit A in the specified exclusive storage area and also notifies the database exclusion means to exclude the storage unit A.
上記プログラムが別の格納単位Bを検索したとき、デー
タベース利用手段はもとの格納単位Aの排他を解除する
ようデータベース排他手段に通知するが、格納単位Aは
排他登録手段から排他するよう指示を受けているので、
格納単位の排他はなおも残され、上記プログラムが格納
単位Aの登録された排他記憶領域を指定して排他解除手
段を起動した時点で、排他解除手段によりデータベース
排他手段に格納単位Aの排他の解除が指示され、その排
他が解除される。When the above program searches another storage unit B, the database utilization means notifies the database exclusion means to release the exclusion of the original storage unit A, but the storage unit A instructs the exclusion registration means to perform exclusion. I have received it,
The exclusion of the storage unit still remains, and at the time when the above program activates the exclusion release means by designating the exclusive storage area in which the storage unit A is registered, the exclusion release means causes the database exclusion means to exclude the storage unit A. Release is instructed and the exclusion is released.
次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.
第1図は本発明のファイル排他方式を実施するシステム
の一例を示すブロック図である。このシステムは、デー
タをデータレコードとして記憶するための外部記憶媒体
であるデータベースファイル1と、複数のプログラム4a
〜4nと、データベースファイル1を検索および更新する
ためのデータベース利用手段3と、同時に複数のプログ
ラムから更新等をした場合の矛盾を発生させないために
格納単位を排他するデータベース排他手段2と、格納単
位へのポインタ等を記憶する複数の排他記憶領域8a〜8m
と、各排他記憶領域8a〜8mの名前,コードおよびそれへ
のポインタを記憶する排他記憶領域管理領域7と、プロ
グラムからの指示に応答して、そのプログラムが現在処
理中の格納単位へのポインタ等を指定された排他記憶領
域に登録し且つこの登録した格納単位の排他が残るよう
データベース排他手段2を働かせる排他登録手段5と、
プログラムからの指示に応答して指定された排他記憶領
域に登録されている格納単位の排他を解除するようデー
タベース排他手段2を働かせ、且つその排他記憶領域の
登録を抹消する排他解除手段6とを有している。FIG. 1 is a block diagram showing an example of a system for implementing the file exclusion system of the present invention. This system includes a database file 1 which is an external storage medium for storing data as data records, and a plurality of programs 4a.
4n, database utilization means 3 for searching and updating the database file 1, database exclusion means 2 for exclusive use of storage units so as not to cause inconsistency when updating etc. from a plurality of programs at the same time, and storage units Multiple exclusive storage areas 8a to 8m that store pointers to
And an exclusive storage area management area 7 for storing the names, codes, and pointers to the exclusive storage areas 8a to 8m, and a pointer to the storage unit currently being processed by the program in response to an instruction from the program. An exclusive registration means 5 for registering the like in a designated exclusive storage area and operating the database exclusion means 2 so that the registered storage unit remains exclusive.
An exclusion release means 6 for operating the database exclusion means 2 to release the exclusion of the storage unit registered in the specified exclusive storage area in response to the instruction from the program, and for canceling the registration of the exclusive storage area. Have
第2図はデータベースファイル1の構造例を示し、同図
に示すようにデータベースファイル1は複数のデータ格
納領域10,11……,から構成され、一つのデータ格納領
域例えばデータ格納領域10は複数の格納単位101,102,10
3から構成される。また一つの格納単位は、格納単位101
に例示するように、格納単位制御レコード101a,複数の
データレコード101b,101cを含んでいる。FIG. 2 shows an example of the structure of the database file 1. As shown in FIG. 2, the database file 1 is composed of a plurality of data storage areas 10, 11, ..., One data storage area, for example, a plurality of data storage areas 10. Storage unit 101,102,10
Composed of three. One storage unit is the storage unit 101
The storage unit control record 101a and the plurality of data records 101b and 101c are included as illustrated in FIG.
第3図は排他記憶領域8a〜8mの構造例を示し、各排他記
憶領域は排他記憶領域8aで例示するように、その排他記
憶領域8a中に登録してある格納単位の数やその排他記憶
領域のコード等を持つ排他記憶領域制御情報80と、格納
単位(排他単位でもある)へのポインタ811,821,その格
納単位811,821の排他モード(第1の排他モード或いは
第2の排他モード)を格納するフィールドから構成され
る。なお、排他モードを格納するフィールドは省略する
ことも可能である。FIG. 3 shows an example of the structure of the exclusive storage areas 8a to 8m. As shown in the exclusive storage area 8a, each exclusive storage area has the number of storage units registered in the exclusive storage area 8a and the exclusive storage area. Stores exclusive storage area control information 80 having area codes and the like, pointers 811 and 821 to storage units (which are also exclusion units), and exclusion modes (first exclusion mode or second exclusion mode) of the storage units 811 and 821. It consists of fields. The field for storing the exclusive mode can be omitted.
第4図は排他記憶領域管理領域7の構造例を示し、排他
記憶領域管理領域7中にある排他記憶領域の数を持つ排
他記憶領域管理領域制御情報70と、排他記憶領域8a〜8m
の名前710,720,コード711,721および排他記憶領域への
ポインタ712,722を格納するフィールドから構成され
る。FIG. 4 shows an example of the structure of the exclusive storage area management area 7. The exclusive storage area management area control information 70 has the number of exclusive storage areas in the exclusive storage area management area 7, and the exclusive storage areas 8a to 8m.
Fields 710, 720, codes 711, 721, and pointers 712, 722 to exclusive storage areas.
第1図において、プログラム例えばプログラム4aがデー
タベースファイル1の格納単位101を検索する場合であ
って、従来と同様に、別の格納単位を検索することによ
って格納単位101の排他が解除されても良い場合、プロ
グラム4a従来と同様に第2の排他モードでもって格納単
位101の検索に必要な指示をデータベース利用手段3に
対し行ない、排他登録手段5は使用しない。このとき、
データベース利用手段3は格納単位101の排他をデータ
ベース排他手段2に対し指示して排他を行なわせ、プロ
グラム4aが別の格納単位の検索を指示した段階でデータ
ベース利用手段3に対し格納単位101の排他の解除を指
示することにより、格納単位101の排他を解除させる。In FIG. 1, when a program, for example, the program 4a, searches the storage unit 101 of the database file 1, the exclusion of the storage unit 101 may be released by searching another storage unit as in the conventional case. In this case, as in the conventional program 4a, in the second exclusive mode, the instruction necessary for searching the storage unit 101 is given to the database utilization means 3 and the exclusive registration means 5 is not used. At this time,
The database utilization means 3 instructs the database exclusion means 2 to perform exclusion of the storage unit 101, and when the program 4a instructs the retrieval of another storage unit, the database utilization means 3 excludes the storage unit 101. The exclusion of the storage unit 101 is released by instructing the release of the storage unit 101.
他方、プログラム4aが格納単位101を検索する場合であ
って、後のある時点までその排他を確保したい場合は、
排他登録手段5を利用して排他が確保されるようにす
る。以下、この点について説明する。On the other hand, in the case where the program 4a searches the storage unit 101 and wants to secure the exclusion until a certain point later,
The exclusion registration means 5 is used to ensure exclusion. Hereinafter, this point will be described.
プログラム4aは、排他登録手段5による排他を行ないた
い場合、予め利用する排他記憶領域を定義する。以下、
説明の便宜上、プログラム4aは排他記憶領域8aと8bとを
利用するものとする。The program 4a defines an exclusive storage area to be used in advance when it is desired to perform exclusion by the exclusion registration means 5. Less than,
For convenience of explanation, it is assumed that the program 4a uses the exclusive storage areas 8a and 8b.
プログラム4aが、格納単位101を検索する場合であっ
て、別の格納単位の検索以後のある時点までその排他を
確保したい場合は、第5図に示すように従来と同様に第
2の排他モードでもって格納単位101の検索に必要な指
示をデータベース利用手段3に対し行なうと共に(S
1)、排他記憶領域8a,格納単位101を指定して(具体的
には名前を指定して)排他登録手段5を起動する(S
2)。When the program 4a searches the storage unit 101 and wants to ensure the exclusion until a certain time point after the search of another storage unit, as shown in FIG. Therefore, the instruction necessary for searching the storage unit 101 is given to the database utilization means 3 and (S
1) Specify the exclusive storage area 8a and the storage unit 101 (specifically, specify the name) and activate the exclusive registration means 5 (S
2).
プログラム4aのステップS1の処理に応答してデータベー
ス利用手段3は、データベース排他手段2に対し格納単
位101の排他を指示し、検索して得られた格納単位101は
データベース利用手段3を通じてプログラム4aに通知さ
れる。In response to the processing of step S1 of the program 4a, the database use means 3 instructs the database exclusion means 2 to exclude the storage unit 101, and the storage unit 101 obtained by the search is transferred to the program 4a through the database use means 3. Be notified.
他方、プログラム4aのステップS2の処理に応答して排他
登録手段5は、たとえば第6図に示すように、指示され
た名前から排他記憶領域8aへのポインタを排他記憶領域
管理領域7より取得し(S11)、そのポインタに従った
排他記憶領域8a中から指示された格納単位101をサーチ
する(S12)。なお、上記の場合、指示された名前から
排他記憶領域のコードも取得し、上記ポインタで特定さ
れる排他記憶領域8aの排他記憶領域制御情報80中のコー
ドと一致するか否かのチエックが行なわれる。そして、
既に格納単位101に関する情報が排他記憶領域8aに登録
されているときは、何もせずに動作を終えるが、ステッ
プS13で未登録と判別されたときは、排他記憶領域8aに
第3図に示した格納単位101に関する情報を登録し(S1
4)、データベース排他手段2に対して格納単位101を排
他するよう通知を出す。これに応答し、データベース排
他手段2は格納単位101の排他を行なうが、この格納単
位101は既にデータベース利用手段3からの通知で排他
しているので、重ねて排他通知が為されたことを記憶
し、後述するようにデータベース利用手段3から格納単
位101の排他の解除が指示されたときその排他が残るよ
うにする。On the other hand, in response to the processing of step S2 of the program 4a, the exclusive registration means 5 acquires a pointer from the designated name to the exclusive storage area 8a from the exclusive storage area management area 7 as shown in FIG. 6, for example. (S11), the designated storage unit 101 is searched from the exclusive storage area 8a according to the pointer (S12). In the above case, the code of the exclusive storage area is also obtained from the instructed name, and a check is made to see if it matches the code in the exclusive storage area control information 80 of the exclusive storage area 8a specified by the pointer. Be done. And
When the information about the storage unit 101 is already registered in the exclusive storage area 8a, the operation ends without doing anything, but when it is determined that the information is not registered in step S13, it is shown in the exclusive storage area 8a in FIG. Register the information about the storage unit 101 (S1
4), Notify the database exclusion unit 2 to exclude the storage unit 101. In response to this, the database exclusion unit 2 performs exclusion of the storage unit 101, but since this storage unit 101 has already been excluded by the notification from the database utilization unit 3, it is remembered that multiple exclusion notifications have been made. However, as will be described later, when the database utilization means 3 gives an instruction to release the exclusion of the storage unit 101, the exclusion remains.
その後、プログラム4aが第5図のステップS3に示すよう
に格納単位102の検索を第2の排他モードでデータベー
ス利用手段3に指示したとすると(この格納単位102に
ついては排他登録手段5を使用しないものとする)、デ
ータベース利用手段3はもとの格納単位101の排他を解
除するようデータベース利用手段3に通知したのち、格
納単位102の排他をデータベース利用手段3に通知す
る。このとき、前述したように格納単位101は排他登録
手段5から排他が重ねて指示されているものであるか
ら、格納単位101は排他が解除されることなく、その後
も排他が継続される。Then, if the program 4a instructs the database utilization means 3 to search the storage unit 102 in the second exclusive mode as shown in step S3 of FIG. 5 (the exclusive registration means 5 is not used for this storage unit 102). The database using means 3 notifies the database using means 3 to release the exclusion of the original storage unit 101, and then notifies the database using means 3 of the exclusion of the storage unit 102. At this time, as described above, since the storage unit 101 is instructed to be mutually exclusive by the exclusion registration means 5, the storage unit 101 is not released from exclusion, and exclusion is continued thereafter.
次に第5図のステップS4に示すようにプログラム4aが格
納単位103の検索を第2の排他モードでもってデータベ
ース利用手段3に指示し、且つこの格納単位103を、別
の格納単位の検索以後であって格納単位101とは別の時
期まで排他を確保しておく必要がある為に、別の排他記
憶領域8bと格納単位103を指示して排他登録手段5を起
動したとすると、プログラム4aのステップS4の処理に応
答してデータベース利用手段3はデータベース排他手段
2に対し格納単位102の排他の解除を通知し、データベ
ース排他手段2は格納単位102については排他登録手段
5からの排他指示がないことからその排他を解除する。
またその後データベース利用手段3は格納単位103につ
いての排他をデータベース利用手段3に通知し、これに
応答してデータベース利用手段3は格納単位103の排他
を行なう。他方、プログラム4aのステップS5の処理に応
答し、排他登録手段5は第6図に示した処理と同様の処
理を行なうことにより、排他記憶領域8bに格納単位103
に関する情報を登録し、データベース排他手段2に対し
格納単位103を排他するよう通知する。Next, as shown in step S4 of FIG. 5, the program 4a instructs the database utilization means 3 to search the storage unit 103 in the second exclusive mode, and this storage unit 103 is searched after searching another storage unit. Since it is necessary to secure the exclusion until a time different from the storage unit 101, if the exclusive registration area 5 is activated by instructing another exclusive storage area 8b and the storage unit 103, the program 4a In response to the processing of step S4, the database use means 3 notifies the database exclusion means 2 of the release of the exclusion of the storage unit 102, and the database exclusion means 2 receives the exclusion instruction from the exclusion registration means 5 for the storage unit 102. Remove the exclusion from the absence.
After that, the database utilization means 3 notifies the database utilization means 3 of exclusion of the storage unit 103, and in response to this, the database utilization means 3 performs exclusion of the storage unit 103. On the other hand, in response to the processing of step S5 of the program 4a, the exclusive registration means 5 performs the same processing as the processing shown in FIG. 6 to store the storage unit 103 in the exclusive storage area 8b.
The information on the storage unit 103 is registered and the database exclusion unit 2 is notified to exclude the storage unit 103.
さて、プログラム4aは排他記憶領域8aに登録した格納単
位についての排他を必要としなくった時点で、第5図の
ステップS6を実行する。即ち、排他記憶領域8aの名前を
指示して排他解除手段6を起動する。Now, the program 4a executes step S6 in FIG. 5 at the time when the exclusion of the storage unit registered in the exclusive storage area 8a is no longer required. That is, the exclusion release means 6 is activated by designating the name of the exclusive storage area 8a.
排他解除手段6はこれに応答し、例えば第7図に示すよ
うに指定された排他記憶領域8aへのポインタを排他記憶
領域管理領域7より取得し(S21)、それに従った排他
記憶領域8a中より、登録された格納単位(排他単位)の
ポインタを一つ取得し(S22)、この取出した格納単位
のポインタを指定してデータベース排他手段2に対しそ
の格納単位の排他の解除を通知する(S23)。データベ
ース排他手段2はこれに応じ、その格納単位の排他を解
除する。従って、通知された格納単位が格納単位101で
ある場合、格納単位はその時点で排他が解除されること
になる。排他解除手段6は一つの格納単位の排他の解除
をデータベース排他手段2に対し通知すると、その格納
単位に関する情報を排他記憶領域8aより抹消する(S2
4)。そして、指定された排他記憶領域8aに登録されて
いる格納単位が残っているか否か即ち登録内容を全て抹
消したか否かを判別し(S25)、残っていればそれにつ
いて上述した動作を繰返すことにより、排他記憶領域8a
に登録されている全ての格納単位の排他の解除の登録の
抹消を行なう。In response to this, the exclusion release means 6 obtains, for example, a pointer to the specified exclusive storage area 8a from the exclusive storage area management area 7 as shown in FIG. 7 (S21), and in the exclusive storage area 8a according to it. Accordingly, one pointer of the registered storage unit (exclusive unit) is acquired (S22), the pointer of the extracted storage unit is designated, and the database exclusion means 2 is notified of the cancellation of the exclusion of the storage unit (S22). S23). The database exclusion means 2 accordingly releases the exclusion of the storage unit. Therefore, when the notified storage unit is the storage unit 101, the exclusion of the storage unit is released at that time. When the exclusion release unit 6 notifies the database exclusion unit 2 of the release of the exclusion of one storage unit, the information about the storage unit is deleted from the exclusive storage area 8a (S2
Four). Then, it is determined whether or not the storage unit registered in the designated exclusive storage area 8a remains, that is, whether or not all the registered contents have been deleted (S25), and if it remains, the above-mentioned operation is repeated. By doing so, the exclusive storage area 8a
Delete the registration for releasing the exclusion of all storage units registered in.
前述した動作から分かるように、本実施例では、排他解
除手段6による排他解除の制御は排他記憶領域単位で行
なわれる。この為、プログラム4aは同一時期で排他を解
除したい格納単位については同一の排他記憶領域に登録
するよう指示することにより、排他解除手段6に対する
一回の解除の指示だけで複数の格納単位の排他の解除を
行なわせることが可能となる。なお、その時期に解除し
たくない格納単位については、格納単位101を登録する
排他記憶領域8aとは別の排他記憶領域8bに格納単位103
を登録させた如く、別の排他記憶領域を使用すれば良
い。As can be seen from the above-described operation, in the present embodiment, the exclusion release control by the exclusion release means 6 is performed in units of exclusive storage areas. Therefore, the program 4a instructs the exclusion unit 6 to register the storage units for which exclusion is to be released in the same exclusion storage area at the same time, so that a single release instruction to the exclusion release means 6 allows exclusion of a plurality of storage units. Can be canceled. As for the storage unit that is not desired to be released at that time, the storage unit 103 is stored in an exclusive storage area 8b different from the exclusive storage area 8a in which the storage unit 101 is registered.
, Another exclusive storage area may be used.
以上説明したように、本発明は、データベース利用手段
からデータベース排他手段に対する格納単位の排他通知
とは別に、プログラムによって起動できる排他登録手段
を経由して所望の格納単位を排他できるようにし、また
排他登録手段で排他記憶領域に登録された排他中の格納
単位を、排他解除手段に排他記憶領域を指定することに
よりその排他の解除ができるようにしたので、プログラ
ムは検索した格納単位を任意の期間排他できるものとな
り、従来生じた排他エラーを防止でき、また更新の内容
が保証されなくなることを防止できる効果がある。更
に、排他すべき格納単位をそれぞれ複数登録し得る複数
の排他記憶領域を備え、或る排他記憶領域に登録された
全ての格納単位をその排他記憶領域を指定するだけで一
括して排他解除できるようにしたので、1つのプログラ
ム中で複数の排他記憶領域を使い分けることにより幾つ
かの格納単位からなるグループ毎に任意の排他区間を設
定できると共に、格納単位ごとに排他解除指示を出す方
式に比べ、解除時のプログラムの負荷を軽減することが
できる効果もある。As described above, the present invention enables exclusion of a desired storage unit via an exclusion registration unit that can be activated by a program, in addition to the exclusion notification of the storage unit from the database utilization unit to the database exclusion unit. The exclusive storage unit registered in the exclusive storage area by the registration means can be released by specifying the exclusive storage area in the exclusion release means. This has the effect of enabling exclusion, preventing the exclusion error that has occurred in the past, and preventing the contents of the update from being guaranteed. Further, it is provided with a plurality of exclusive storage areas each capable of registering a plurality of storage units to be excluded, and all storage units registered in a certain exclusive storage area can be collectively released by simply specifying the exclusive storage area. By doing so, it is possible to set an arbitrary exclusion section for each group consisting of several storage units by selectively using multiple exclusive storage areas in one program, and to compare the method of issuing an exclusion release instruction for each storage unit. There is also an effect that the load of the program at the time of cancellation can be reduced.
第1図は本発明のファイル排他方式を実施するシステム
の一例を示すブロック図、 第2図はデータベースファイルの構造例を示す図、 第3図は排他記憶領域の構造例を示す図、 第4図は排他記憶領域管理領域の構造例を示す図、 第5図はプログラム4aの処理例の流れ図、 第6図は排他登録手段の処理例の流れ図、 第7図は排他解除手段の処理例の流れ図および、 第8図は従来方式の説明図である。 図において、1……データベースファイル、2……デー
タベース排他手段、3……データベース利用手段、4a〜
4n……データベースファイル1を利用するプログラム、
5……排他登録手段、6……排他解除手段、7……排他
記憶領域管理領域、8a〜8m……排他記憶領域。FIG. 1 is a block diagram showing an example of a system for implementing the file exclusion system of the present invention, FIG. 2 is a diagram showing an example structure of a database file, FIG. 3 is a diagram showing an example structure of an exclusive storage area, and FIG. FIG. 5 is a diagram showing an example of the structure of the exclusive storage area management area, FIG. 5 is a flow chart of a processing example of the program 4a, FIG. 6 is a flow chart of a processing example of the exclusive registration means, and FIG. 7 is a processing example of the exclusion releasing means. The flow chart and FIG. 8 are explanatory views of the conventional method. In the figure, 1 ... database file, 2 ... database exclusion means, 3 ... database usage means, 4a ...
4n …… A program that uses database file 1,
5 ... Exclusive registration means, 6 ... Exclusive release means, 7 ... Exclusive storage area management area, 8a-8m ... Exclusive storage area.
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭59−2159(JP,A) 特公 昭59−47341(JP,B2) 「ACOSソフトウェアACOS−4 /MVPXEADBS運用手引書DFC74 −6」6版(1985−6)日本電気PP.64 −69 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP-A-59-2159 (JP, A) JP-B-59-47341 (JP, B2) “ACOS software ACOS-4 / MVPXEADBS Operation Manual DFC74-6” 6 Edition (1985-6) NEC PP. 64-69
Claims (1)
めの外部記憶媒体であるファイルを備え、該ファイルを
複数の部分に分割し、該ファイルに対する検索および更
新をデータベース利用手段を介して複数のプログラムか
ら同時に行なうことが可能であり、且つ、前記データベ
ース利用手段は、更新される格納単位はそのプログラム
終了まで排他し、検索した格納単位は別の格納単位をそ
のプログラムが検索するまで排他する排他処理をデータ
ベース排他手段を使用して行なうシステムにおいて、 排他すべき格納単位をそれぞれ複数登録し得る複数の排
他記憶領域と、 前記プログラムからの指示に応答し、排他すべき格納単
位を指定された前記排他記憶領域に登録すると共に、該
登録した格納単位を排他するよう前記データベース排他
手段に通知する排他登録手段と、 前記プログラムからの前記排他記憶領域を指定した指示
に応答し、該指定された排他記憶領域に登録されている
全ての格納単位についてその排他を解除するよう前記デ
ータベース排他手段に通知すると共に、前記排他記憶領
域の登録を抹消する排他解除手段とを備え、 前記データベース排他手段は、前記データベース利用手
段から排他を解除すべき通知があっても、前記排他登録
手段から排他すべき通知がある格納単位については排他
を残すことを特徴とするファイル排他方式。1. A file which is an external storage medium for storing data as a data record is provided, the file is divided into a plurality of parts, and retrieval and update of the file are performed from a plurality of programs via database utilization means. The database use means can perform an exclusive process in which the storage unit to be updated is exclusive until the end of the program and the searched storage unit is exclusive until another program is searched for by the program. In a system using database exclusion means, a plurality of exclusive storage areas each capable of registering a plurality of storage units to be excluded, and the exclusive storage in which a storage unit to be excluded is designated in response to an instruction from the program When registering in the area, the database exclusion procedure is set so as to exclude the registered storage unit. And an exclusive registration means for notifying the exclusive exclusion area of the database in response to an instruction from the program that specifies the exclusive storage area, and cancels the exclusion for all storage units registered in the specified exclusive storage area. Means for canceling the registration of the exclusive storage area, and the database exclusion means, even if there is a notification to release the exclusion from the database utilization means, the exclusion registration means excludes the exclusion. File exclusion method characterized by leaving exclusion for storage units that have notifications to be made.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62028592A JPH0682337B2 (en) | 1987-02-10 | 1987-02-10 | File exclusion method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62028592A JPH0682337B2 (en) | 1987-02-10 | 1987-02-10 | File exclusion method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS63196956A JPS63196956A (en) | 1988-08-15 |
JPH0682337B2 true JPH0682337B2 (en) | 1994-10-19 |
Family
ID=12252864
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62028592A Expired - Lifetime JPH0682337B2 (en) | 1987-02-10 | 1987-02-10 | File exclusion method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0682337B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2740238B2 (en) * | 1989-02-27 | 1998-04-15 | 日本電気株式会社 | File exclusive control unit |
EP0394173A3 (en) * | 1989-04-17 | 1993-10-27 | International Business Machines Corporation | High concurrency manager of open files |
DE19581619T1 (en) * | 1995-03-17 | 1997-05-22 | Ntt Data Tsushin Kk | Processing system for distributing telegraphic messages |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS592159A (en) * | 1982-06-28 | 1984-01-07 | Fujitsu Ltd | Data controlling system |
JPS5947341A (en) * | 1982-09-08 | 1984-03-17 | Alps Electric Co Ltd | Abrasion-resistant magnetic material |
-
1987
- 1987-02-10 JP JP62028592A patent/JPH0682337B2/en not_active Expired - Lifetime
Non-Patent Citations (1)
Title |
---|
「ACOSソフトウェアACOS−4/MVPXEADBS運用手引書DFC74−6」6版(1985−6)日本電気PP.64−69 |
Also Published As
Publication number | Publication date |
---|---|
JPS63196956A (en) | 1988-08-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0682337B2 (en) | File exclusion method | |
JP2972548B2 (en) | File management method | |
JPH05307478A (en) | Constituting method for data base management system | |
JP2002259414A (en) | Document management system, document management method and recording medium with document management procedure recorded thereon | |
JP2704028B2 (en) | File area management method | |
JP3330006B2 (en) | Network system including information storage system, input system of the system, and | |
JP2980610B2 (en) | Transaction management device | |
JPS63159949A (en) | File access method | |
JPH09293055A (en) | System and method for exclusive control over shared file in loosely coupled multiple computer system, and medium for storing exclusive control program | |
JP2740238B2 (en) | File exclusive control unit | |
JPS6380325A (en) | Information retrieval method and index used therefor | |
JP2000148548A (en) | Unnecessary record deleting device | |
JP2610972B2 (en) | Database data integrity method | |
JP3022574B2 (en) | Data operation instruction blocking method | |
JPH0262670A (en) | Object data access method | |
JP3085260B2 (en) | Exclusive control unit | |
JPH0535564A (en) | Data control system | |
JPS628819B2 (en) | ||
JPH1040158A (en) | Permanent object managing method | |
JPH0773086A (en) | Time sequential data holding system | |
JPH04131946A (en) | Member control system for queued connection compiling file | |
JPH05216728A (en) | Database management system | |
JPH06259298A (en) | Data base managing system | |
JPH0324646A (en) | Information processor | |
JP2000259475A (en) | Database system, database access control method and recording medium stored with database access control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
EXPY | Cancellation because of completion of term |