JPH06231027A - Exclusive control method - Google Patents

Exclusive control method

Info

Publication number
JPH06231027A
JPH06231027A JP5014162A JP1416293A JPH06231027A JP H06231027 A JPH06231027 A JP H06231027A JP 5014162 A JP5014162 A JP 5014162A JP 1416293 A JP1416293 A JP 1416293A JP H06231027 A JPH06231027 A JP H06231027A
Authority
JP
Japan
Prior art keywords
data
file
access
area
concept
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
JP5014162A
Other languages
Japanese (ja)
Inventor
Masayuki Nakahara
正行 中原
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP5014162A priority Critical patent/JPH06231027A/en
Publication of JPH06231027A publication Critical patent/JPH06231027A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

(57)【要約】 【目的】本発明は、レコードの概念をもたないファイル
を複数のプログラムがアクセス可能なシステムに於い
て、ファイル内の範囲指定によるデータの排他制御機構
を実現して、レコードの概念のないファイルに対してデ
ータの整合性をとることを特徴とする。 【構成】プログラム(ファイルアクセス機構)11から
ファイル1内のデータをアクセスするとき、データ検索
部12により、指定されたデータ領域が別のプログラム
で使用されているか否かがチェックされ、未使用(未登
録)であるとき、データ登録部13により、ファイル1
内のアクセス対象となる指定データ領域(データの先頭
と終り)がデータ格納領域15に格納される構成とし
て、ファイル1内のアクセスするデータをファイル内の
相対位置で表わし、データの先頭と終りで管理すること
を特徴とする。
(57) [Summary] [Object] The present invention realizes a data exclusive control mechanism by specifying a range in a file in a system in which a plurality of programs can access a file having no concept of a record. It features data consistency for files without the concept of records. [Structure] When accessing data in a file 1 from a program (file access mechanism) 11, a data search unit 12 checks whether or not a designated data area is used by another program, and the unused ( If not registered), the data registration unit 13 causes the file 1
The specified data area (the beginning and the end of the data) to be accessed in is stored in the data storage area 15, and the data to be accessed in the file 1 is represented by the relative position in the file. It is characterized by managing.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、レコードの概念を持た
ないファイルを複数のプログラムが同時にアクセスする
ことを許すシステムに適用されるファイル内データの排
他制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an exclusive control method for data in a file applied to a system which allows a plurality of programs to access a file having no concept of record at the same time.

【0002】[0002]

【従来の技術】従来、ファイルのアクセスは、レコード
単位で、データの参照、更新等が行なわれる。複数のプ
ログラム(ファイルアクセス機構)が同一のファイルを
アクセス可能なシステムに於いては、データの整合性を
とるために、1レコード又は1ブロックを或るキーで表
わし、そのキー値を管理することによって、複数プログ
ラムからのファイルアクセスに対して排他制御を行なっ
ている。
2. Description of the Related Art Conventionally, in accessing a file, data is referred to or updated in record units. In a system where multiple programs (file access mechanism) can access the same file, one record or one block is represented by a certain key and the key value is managed in order to ensure data consistency. By this, exclusive control is performed for file access from multiple programs.

【0003】このように、レコードの概念をもつファイ
ルのアクセス制御に於いては、レコード単位でデータを
管理できるが、レコードの概念をもたないファイルに対
しては、複数のプログラムから同一データをアクセスす
る場合、データ単位に排他制御の管理ができない。
As described above, in access control of a file having the concept of a record, data can be managed on a record-by-record basis. However, for a file that does not have the concept of a record, a plurality of programs share the same data. When accessing, exclusive control cannot be managed for each data unit.

【0004】[0004]

【発明が解決しようとする課題】上記したように、従来
では、レコードの概念をもたないファイルに於いて、複
数のプログラムから同一データをアクセスする場合に、
データ単位に排他制御の管理ができないという問題があ
った。
As described above, in the past, when accessing the same data from a plurality of programs in a file that does not have the concept of a record,
There was a problem that exclusive control could not be managed for each data unit.

【0005】本発明は上記実情に鑑みなされたもので、
レコードの概念をもたないファイルに対して、アクセス
データ単位での排他制御を可能にした、範囲指定を可能
とするキーの排他制御方式を提供することを目的とす
る。
The present invention has been made in view of the above circumstances,
It is an object of the present invention to provide a key exclusive control method that enables range specification and enables exclusive control in access data units for files that do not have the concept of records.

【0006】[0006]

【課題を解決するための手段】本発明は、レコードの概
念をもたないファイルを複数のプログラムがアクセス可
能なシステムに於いて、或る処理を実行するプログラム
から入出力制御機構(ファイルアクセス機構)を介して
ファイルにアクセスするとき、ファイル内のアクセスす
るデータ領域をファイル1内の相対位置で先頭(先端)
と終り(終端))を表わし、ファイル1内のデータをア
クセスするとき、そのデータ領域がすでに他のプログラ
ムで使用されているか否かをチェックするデータ検索処
理手段と、指定領域に対してデータのアクセスが可能で
あるとき、アクセスするデータ領域(アクセスデータの
先頭と終り)をシステム内に格納するデータの登録処理
手段と、データへのアクセスが完了したとき、システム
内からそのアクセスデータ領域を解放するデータ削除処
理手段とを設けて、レコード概念のないファイルに対し
てアクセスデータ単位での排他制御を行ないデータの整
合性をとることを特徴とする。
SUMMARY OF THE INVENTION The present invention relates to an input / output control mechanism (file access mechanism) from a program executing a certain process in a system in which a plurality of programs can access a file having no concept of record. ), The data area to be accessed in the file starts at the relative position in file 1 (tip).
And the end (termination), and when accessing the data in the file 1, a data retrieval processing means for checking whether the data area is already used by another program, and a data retrieval processing means for the designated area. When access is possible, the data registration processing means for storing the data area to be accessed (head and end of access data) in the system, and releasing the access data area from the system when the access to the data is completed And a data deletion processing means for performing the exclusive control in units of access data with respect to a file having no record concept to ensure data consistency.

【0007】[0007]

【作用】レコードの概念のないファイルを複数のプログ
ラム(ファイルアクセス機構)がアクセス可能なシステ
ムに於いて、或る処理機能をもつプログラムが上記ファ
イルをアクセスするとき、そのアクセスデータをファイ
ル内の相対位置で表わし、範囲指定により排他制御を行
なう。
In a system in which a plurality of programs (file access mechanism) can access a file without the concept of a record, when a program having a certain processing function accesses the above file, the access data is stored in the file as a relative file. Expressed by position, exclusive control is performed by specifying the range.

【0008】アクセスデータを当該データの先頭位置と
終りの位置で範囲指定により管理することにより、図2
に示すように、データのチェックを大小関係の簡単な判
定で行なうことができる。このように範囲指定でのデー
タの排他制御を可能とすることにより、レコードの概念
のないファイルに対してデータの整合性をとることがで
きる。
By managing the access data by designating a range at the start position and the end position of the data,
As shown in, the data can be checked by a simple determination of the magnitude relation. By enabling exclusive control of data by specifying a range in this way, data consistency can be ensured for files without the concept of records.

【0009】[0009]

【実施例】以下図面を参照して本発明の一実施例を説明
する。図1は本発明の一実施例を示すブロック図であ
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of the present invention.

【0010】図1に於いて、1は複数のプログラム(フ
ァイルアクセス機構)からアクセス可能な、レコード概
念のないファイルである。2はそのファイル1内のアク
セスデータであり、このアクセスデータのデータ領域
(アクセスデータの先頭と終り)はファイル1内の相対
位置で表わされる。
In FIG. 1, reference numeral 1 denotes a file which is accessible from a plurality of programs (file access mechanism) and has no record concept. Reference numeral 2 is access data in the file 1, and the data area of the access data (the head and the end of the access data) is represented by the relative position in the file 1.

【0011】11はレコード概念のないファイル1に対
して任意領域のデータアクセスを行なうプログラムであ
り、ここでは所定の処理を実行するプログラムからの要
求に従いファイル1をアクセス制御するファイルアクセ
ス機構として示している。
Reference numeral 11 is a program for accessing data in an arbitrary area to the file 1 having no record concept. Here, it is shown as a file access mechanism for controlling access to the file 1 in accordance with a request from a program for executing a predetermined process. There is.

【0012】12はファイル1のアクセスしようとする
データ領域が既にアクセスされているか否かのチェック
を行なうデータ検索部であり、ここではデータ格納領域
15に格納された、ファイル1内の相対位置で表わされ
るアクセスデータ領域(アクセスデータの先頭(先端)
と終り(終端))を参照して、アクセスしようとするデ
ータ領域が現在アクセスされているデータ領域を含むか
否かのチェックを行なう。
Reference numeral 12 is a data retrieval unit for checking whether or not the data area to be accessed of the file 1 has already been accessed. Here, the relative position in the file 1 stored in the data storage area 15 is used. Represented access data area (start (top) of access data
And end (termination), it is checked whether or not the data area to be accessed includes the currently accessed data area.

【0013】13はファイル1のアクセス領域をシステ
ム内に格納するデータ登録部であり、ここではアクセス
データ領域(アクセスデータの先頭と終り)をファイル
1内の相対位置で表わし、データ格納領域15に格納
し、データ格納領域15上で登録・管理を行なう。14
はアクセス領域をシステム内から削除するデータ解放部
であり、データ格納領域15上で、アクセス終了したデ
ータ領域を解放する。
A data registration unit 13 stores the access area of the file 1 in the system. Here, the access data area (start and end of access data) is represented by a relative position in the file 1 and is stored in the data storage area 15. Store and register / manage on the data storage area 15. 14
Is a data release unit that deletes the access area from the system, and releases the accessed data area on the data storage area 15.

【0014】15はファイル1の相対位置で表わしたア
クセスデータ領域(アクセスデータの先頭と終り)が格
納されるデータ格納領域であり、データ検索部12によ
り参照され、データ登録部13によりアクセスデータ領
域が格納(登録)され、データ解放部14によりアクセ
スデータ領域が削除(解放)される。
Reference numeral 15 is a data storage area for storing an access data area (start and end of access data) represented by the relative position of the file 1, which is referred to by the data retrieval section 12 and accessed by the data registration section 13. Is stored (registered), and the data release unit 14 deletes (releases) the access data area.

【0015】図2は本発明の実施例の動作を説明するた
めの図であり、Aはデータ格納領域15に格納(登録)
されたファイル1内のアクセスデータ領域の先頭位置
(先端位置)、Bは同領域の終りの位置(終端位置)、
a1〜b1,a2〜b2,…はそれぞれ上記アクセスデータ領域
(A〜B)により排他制御の対象となるデータ領域を示
す。
FIG. 2 is a diagram for explaining the operation of the embodiment of the present invention, in which A is stored (registered) in the data storage area 15.
The start position (tip position) of the access data area in the created file 1, B is the end position (end position) of the same area,
a1 to b1, a2 to b2, ... Represent data areas subject to exclusive control by the access data areas (A to B).

【0016】図3及び図4はそれぞれ上記実施例の処理
手順を示すフローチャートであり、図3は上記実施例に
於けるアクセスデータ領域の格納処理手順を示すフロー
チャート、図4は上記実施例に於けるアクセスデータ領
域の削除処理手順を示すフローチャートである。
3 and 4 are flow charts showing the processing procedure of the above embodiment, FIG. 3 is a flow chart showing the processing procedure of storing the access data area in the above embodiment, and FIG. 4 is the above embodiment. 5 is a flowchart showing a procedure for deleting an access data area.

【0017】図3に示すアクセスデータ領域の格納処理
はデータ登録部13により行なわれる。図3に於いて、
S1 はアクセスデータを指定するステップであり、アク
セスデータ領域(アクセスデータの先頭と終り)をファ
イル1内の相対位置で表わし指定する。S2 はアクセス
データをチェックするステップであり、指定されたアク
セスデータ領域がシステム内で既にアクセスされている
か否かをチェックする。S4 はデータを格納するステッ
プであり、システム内のデータ格納領域15に新たなア
クセスデータ領域を登録する。
Storage processing of the access data area shown in FIG. 3 is performed by the data registration unit 13. In FIG.
S1 is a step of designating the access data, which designates and designates the access data area (start and end of the access data) by relative positions in the file 1. S2 is a step of checking the access data, and it is checked whether or not the designated access data area has already been accessed in the system. S4 is a step of storing data, and a new access data area is registered in the data storage area 15 in the system.

【0018】図4に示すアクセスデータ領域の削除処理
はデータ解放部14により行なわれる。図4に於いて、
S11は解放データを指定するステップであり、解放する
データ領域(解放データの先頭と終り)をファイル1内
の相対位置で表わし指定する。S13はデータを解放する
ステップであり、データ格納領域15に登録されたデー
タ領域のアクセスが終了したとき、そのデータ領域をデ
ータ格納領域15から削除する。ここで上記図1乃至図
4を参照して本発明の一実施例に於ける動作を説明す
る。
The process of deleting the access data area shown in FIG. 4 is performed by the data release unit 14. In FIG.
Step S11 is a step of designating release data, in which the data area to be released (the head and the end of the release data) is expressed and designated by the relative position in the file 1. S13 is a step of releasing the data, and when the access to the data area registered in the data storage area 15 is completed, the data area is deleted from the data storage area 15. The operation of the embodiment of the present invention will be described with reference to FIGS.

【0019】複数のプログラムによりファイル1を共有
して使用する場合、アクセス中のデータの整合性をとる
ためには、ファイル毎にアクセスデータを管理し、デー
タ単位での排他制御を行なう。
When the file 1 is shared and used by a plurality of programs, access data is managed for each file and exclusive control is performed in data units in order to maintain consistency of data being accessed.

【0020】ここで特徴となるのは、排他制御のための
データを識別する手段として、ここではファイル1内の
アクセスするデータをファイル内の相対位置で表わし、
データの先頭と終りで管理する。
The feature here is that the data to be accessed in the file 1 is represented by the relative position in the file, as means for identifying the data for exclusive control.
Manage at the beginning and end of data.

【0021】プログラム(ファイルアクセス機構)11
からファイル1内のデータをアクセスするときは、プロ
グラム(ファイルアクセス機構)11がファイル1のデ
ータ領域(相対位置)を指定する(図3ステップS1
)。
Program (file access mechanism) 11
When the data in the file 1 is accessed from the program 1, the program (file access mechanism) 11 specifies the data area (relative position) of the file 1 (step S1 in FIG. 3).
).

【0022】データ検索部12は、指定されたデータ領
域が別のプログラムで使用されているか否かをチェック
し(図3ステップS2 )、未使用(未登録)の場合は、
データ登録部13に制御が渡され、データ登録部13
が、ファイル1内のアクセス対象となる指定データ領域
(データの先頭と終り)をデータ格納領域15に格納す
る(図3ステップS4 )。
The data retrieval unit 12 checks whether or not the designated data area is used by another program (step S2 in FIG. 3). If it is unused (unregistered),
Control is passed to the data registration unit 13 and the data registration unit 13
Stores the designated data area (the beginning and the end of the data) to be accessed in the file 1 in the data storage area 15 (step S4 in FIG. 3).

【0023】ここで、データ格納領域15へのアクセス
データ領域(データの先頭と終り)の格納は、ファイル
1内の相対位置を格納するため、データを昇順に並べる
と、大小の判断ですべての登録データをチェックしなく
ても済む。
Here, since the access data area (the head and the end of the data) is stored in the data storage area 15 because the relative positions in the file 1 are stored, if the data are arranged in ascending order, all of them are judged by the size. You don't have to check the registration data.

【0024】図2のように、データ(A〜B)が既に登
録されているとき、データ(a1 〜b1 )の領域、デー
タ(a2 〜b2 )の領域、データ(a3 〜b3 )の領域
のいずれかを登録しようとすると、その登録しようとす
るデータ(a1 〜b1 ,a2〜b2 ,a3 〜b3 )の各
領域とも、既登録データ(A〜B)の一部又は全てを含
むため、エラー、又はウェイトとなる。これはAとan
、Bとbn の大小関係のチェックによってエラー判定
される。即ち、(A<bn <B),(A<bn <B)で
あるとき、エラー又はウェイトとなる。
As shown in FIG. 2, when the data (A to B) are already registered, the data (a1 to b1) area, the data (a2 to b2) area, and the data (a3 to b3) area are stored. If you try to register any of them, an error will occur because each area of the data (a1 to b1, a2 to b2, a3 to b3) to be registered contains part or all of the registered data (A to B). , Or weight. This is A and an
, B and bn are checked for error. That is, when (A <bn <B) and (A <bn <B), an error or a wait occurs.

【0025】ファイル1内データのアクセスが完了した
ならば、そのアクセスの完了したデータ領域をデータ格
納領域15より削除し、アクセスの完了したデータ領域
を未使用状態に戻し解放する。
When the access to the data in the file 1 is completed, the accessed data area is deleted from the data storage area 15, and the accessed data area is returned to the unused state and released.

【0026】上記したように、アクセスデータの領域
(データの先頭と終り)により、排他制御を行なうこと
によって、レコードの概念のないファイル1を複数プロ
グラムでアクセス可能にしても常にファイル1内データ
の整合性がとれる。
As described above, the exclusive control is performed by the access data area (the head and the end of the data), so that even if the file 1 without the concept of a record can be accessed by a plurality of programs, the data in the file 1 is always stored. Be consistent.

【0027】[0027]

【発明の効果】以上詳記したように本発明によれば、レ
コードの概念をもたないファイルを複数のプログラムが
アクセス可能なシステムに於いて、ファイル内の範囲指
定によるデータの排他制御機構を実現したことにより、
レコードの概念のないファイルに対してデータの整合性
をとることができる。
As described above in detail, according to the present invention, in a system in which a plurality of programs can access a file that does not have the concept of a record, an exclusive control mechanism for data by specifying a range in the file is provided. By realizing it,
Data consistency can be achieved for files without the concept of records.

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

【図1】本発明の一実施例による要部の構成を示すブロ
ック図。
FIG. 1 is a block diagram showing a configuration of a main part according to an embodiment of the present invention.

【図2】上記実施例の動作を説明するための図。FIG. 2 is a diagram for explaining the operation of the above embodiment.

【図3】上記実施例に於けるアクセスデータ領域の格納
処理手順を示すフローチャート。
FIG. 3 is a flowchart showing a storage processing procedure of an access data area in the above embodiment.

【図4】上記実施例に於けるアクセスデータ領域の削除
処理手順を示すフローチャート。
FIG. 4 is a flowchart showing a procedure for deleting an access data area in the above embodiment.

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

1…ファイル、2…ファイル1内のアクセスデータ、1
1…プログラム(ファイルアクセス機構)、12…デー
タ検索部、13…データ登録部、14…データ解放部、
15…データ格納領域。
1 ... file, 2 ... access data in file 1, 1
1 ... Program (file access mechanism), 12 ... Data search unit, 13 ... Data registration unit, 14 ... Data release unit,
15 ... Data storage area.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 レコードの概念をもたないファイルを複
数のプログラムが同時にアクセスすることを許すシステ
ムに於いて、上記ファイル内のデータをファイル内の相
対位置によりアクセスするファイルアクセス手段と、上
記ファイル内のアクセスデータ領域をアクセスデータの
始端位置及び終端位置で管理するデータ登録/解放手段
と、上記ファイルをアクセスするときに、上記データ登
録手段に登録されたアクセスデータ範囲を参照して排他
制御を行なう排他制御手段とを具備してなることを特徴
とするレコード概念のないファイルの排他制御方式。
1. A system for allowing a plurality of programs to access a file having no concept of a record at the same time, and a file access means for accessing data in the file by relative position in the file, and the file. Exclusive access control is performed by referring to the access data area registered in the data registration means when accessing the file, and the data registration / release means for managing the access data area in the access data at the start end position and the end position of the access data. An exclusive control method of a file without a record concept, characterized by comprising exclusive control means for performing.
JP5014162A 1993-01-29 1993-01-29 Exclusive control method Pending JPH06231027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5014162A JPH06231027A (en) 1993-01-29 1993-01-29 Exclusive control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5014162A JPH06231027A (en) 1993-01-29 1993-01-29 Exclusive control method

Publications (1)

Publication Number Publication Date
JPH06231027A true JPH06231027A (en) 1994-08-19

Family

ID=11853457

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5014162A Pending JPH06231027A (en) 1993-01-29 1993-01-29 Exclusive control method

Country Status (1)

Country Link
JP (1) JPH06231027A (en)

Similar Documents

Publication Publication Date Title
US5367671A (en) System for accessing extended object attribute (EA) data through file name or EA handle linkages in path tables
US7403960B2 (en) Method and system for creating snapshots by condition
JP2002268933A (en) Cluster system
CN120123305B (en) Method, product, device and storage medium for multi-host shared file system
EP0461046B1 (en) File access processing system
JPH06124239A (en) Resident data controller for cache memory
US5623639A (en) Memory management system for the time-wise management of memory
JP2924786B2 (en) Exclusive control system, exclusive control method, and medium for storing exclusive control program for shared file in loosely coupled multiple computer system
JPS62287359A (en) Control system for simultaneous file access in loosely coupled multi-processor system
JP2704028B2 (en) File area management method
JP4844319B2 (en) Virtual tape library device sharing method, virtual tape library device, and program
JPH09185540A (en) Multi-process system
JP2675088B2 (en) Information collection method
JPH05165702A (en) File management method
JPH04336340A (en) Disk cache access control system
JP3050194B2 (en) A system for dynamically adding a shared memory file between hosts, a method for dynamically adding a shared memory file between hosts, and a recording medium storing a program for dynamically adding a shared memory file between hosts
JPH07101396B2 (en) Work file management method in database system
JPH02242350A (en) Circulating file processing system for data processing system
JP3087274B2 (en) File exclusion control system
JPH04336341A (en) File access control system
JPH0337769A (en) Drawing name managing system
JP2743857B2 (en) Data area management system for area shared files
JPS6055854B2 (en) Data base storage area management control method
JPH08137933A (en) Drawing data management system and drawing data management method
JPH0675837A (en) Memory file access system