JPS63311450A - Exclusive control system for file access - Google Patents

Exclusive control system for file access

Info

Publication number
JPS63311450A
JPS63311450A JP62147288A JP14728887A JPS63311450A JP S63311450 A JPS63311450 A JP S63311450A JP 62147288 A JP62147288 A JP 62147288A JP 14728887 A JP14728887 A JP 14728887A JP S63311450 A JPS63311450 A JP S63311450A
Authority
JP
Japan
Prior art keywords
access
processing
page
request
file
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
JP62147288A
Other languages
Japanese (ja)
Inventor
Osamu Akiba
秋葉 治
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP62147288A priority Critical patent/JPS63311450A/en
Publication of JPS63311450A publication Critical patent/JPS63311450A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve the processing efficiency of the titled system by suppressing the access for updating due to an access request given from another user and allowing the access for reference processing due to a request to a record except records subjected to updating. CONSTITUTION:A file control part 13 processes the access given to a file 5 which is executed by a processor and stored in an external memory 4 by an access request of a job program 2 and then manages a page under access via a management table 20. Then it is decided via the table 20 whether a page 6 receiving an access request is available on a buffer 7 or not. Based on this deciding result, the execution of an access request is rejected or necessary access processing is carried out. Thus a requested record 8 is delivered to the program 2. Then parallel accesses are attained as much as possible to the access requests given from different users to the same pages of plural records while necessary exclusive control is carried out.

Description

【発明の詳細な説明】 〔概 要〕 複数の利用者に共用されるファイルへのアクセスにおけ
る排他制御方式に関し、 複数レコードからなる同じページへの異なる利用者のア
クセス要求に対して、必要な排他制御を行いながら、で
きるだけ並行アクセスを可能にするための排他制御方式
を目的とし、 1以上のレコードからなるページを入出力単位とし、1
以上の該ページからなり、複数の利用者によって共用さ
れるファイルを有する計算機において、1利用者によっ
て該レコードの更新処理が行われる該ページに対する、
他の利用者によるアクセスの要求がある場合には、該要
求による更新処理のためのアクセスを抑止し、前記更新
処理の行われるレコード以外のレコードに対する該要求
による参照処理のためのアクセスを許容するように構成
される。
[Detailed Description of the Invention] [Summary] Regarding an exclusive control method for accessing a file shared by multiple users, the necessary exclusive control method for access requests from different users to the same page consisting of multiple records is The purpose of the exclusive control method is to enable parallel access as much as possible while performing control, and the input/output unit is a page consisting of one or more records.
In a computer that includes the above pages and has a file shared by multiple users, for the page where the record update process is performed by one user,
When there is an access request by another user, the access for update processing by the request is suppressed, and the access for reference processing by the request to records other than the record where the update processing is performed is allowed. It is configured as follows.

〔産業上の利用分野〕[Industrial application field]

本発明は、複数の利用者に共用されるファイルを有する
計算機の、ファイルアクセスの排他制御方式に関する。
The present invention relates to an exclusive control method for file access in a computer having files shared by multiple users.

〔従来の技術と発明が解決しようとする問題点〕第4図
は計算機の構成例を示すブロック図である。処理装置1
は業務プログラム2及びファイル管理部3のプログラム
等を実行して、業務プログラム2のアクセス要求により
、外部記憶装置4に格納されたファイル5の所要のデー
タへのアクセス処理を制御する。
[Prior art and problems to be solved by the invention] FIG. 4 is a block diagram showing an example of the configuration of a computer. Processing device 1
executes the business program 2 and the program of the file management section 3, and controls access processing to required data in the file 5 stored in the external storage device 4 based on the access request from the business program 2.

ファイル5は、レコードと呼ぶ処理上のデータ単位から
なるが、入出力処理の効率を考慮して、公知のように複
数のレコードでデータブロックを構成してページとし、
ファイル5は一般に複数のページ6で構成するようにし
、データの入出力はページ6を単位にして行う。
The file 5 consists of processing data units called records, but in consideration of the efficiency of input/output processing, data blocks are made up of multiple records as pages, as is known in the art.
The file 5 is generally made up of a plurality of pages 6, and data input/output is performed in units of pages 6.

ファイル管理部3は、業務プログラム2からあるレコー
ドに対するアクセス要求が出されると、そのレコードの
属するページ6を外部記憶装置4からバッファ7に読み
込み、要求されたレコード8をバッファ7から業務プロ
グラム2へ渡す。
When the business program 2 issues an access request to a certain record, the file management unit 3 reads the page 6 to which the record belongs from the external storage device 4 into the buffer 7, and transfers the requested record 8 from the buffer 7 to the business program 2. hand over.

業務プログラム2では、渡されたレコード9を参照して
所要の処理を実行し、又その結果要すればレコード9を
更新して、その内容をバッファ7の該当レコード8に転
送する。
The business program 2 refers to the passed record 9 and executes the necessary processing, updates the record 9 if necessary, and transfers the contents to the corresponding record 8 in the buffer 7.

このようにして一連の処理を完了すると、ファイル管理
部3はページ4が更新された場合には、更新後のバッフ
ァ7のページをファイル5の該当ページ6に書き出す。
After completing a series of processes in this way, the file management unit 3 writes the updated page of the buffer 7 to the corresponding page 6 of the file 5 if the page 4 has been updated.

このように・バッファ7に読み出す入出力単位のページ
の一部のレコードにアクセスする方式の場合に、同じフ
ァイル5を共用する他の業務プログラムがあり同じペー
ジ内のレコードにアクセスを要する場合には、バッファ
7上のレコードを共用できることが、処理効率や記憶容
量の点で望ましい。
In this way, in the case of the method of accessing some records of the page of the input/output unit read to the buffer 7, if there is another business program that shares the same file 5 and needs to access the records in the same page, , it is desirable to be able to share records on the buffer 7 in terms of processing efficiency and storage capacity.

しかし、同じバッファ上のデータについて・複数の業務
プログラムが更新を行うと、異なるレコードの処理であ
っても、一方の処理の完了によって、他方の処理につい
ては一部のレコードが更新され、他のレコードは未更新
であるような状態がファイルに書き込まれる可能性があ
る。
However, when data on the same buffer is updated by multiple business programs, even if they are processing different records, the completion of one process will update some records for the other process, and other A state may be written to the file such that the record has not been updated.

又、処理が何等かの異常発生で中断されるような場合に
、更新内容を復元する公知のいわゆるロールバック処理
において、1ページについてその異常発生のプログラム
以外に複数の他の業務プログラムの処理が関与してるこ
とを考慮しなければならないので、処理が複雑化する等
のために、従来は同一ページを並行してアクセスするこ
とを、無条件に禁止していた。
Furthermore, in the known so-called rollback process that restores the updated contents when processing is interrupted due to the occurrence of some kind of abnormality, processing of multiple other business programs is performed for one page in addition to the program that caused the abnormality. In the past, accessing the same page in parallel was unconditionally prohibited, as it would complicate processing and require consideration of the number of pages involved.

本発明は、複数レコードの同じページへの異なる利用者
のアクセス要求に対して、必要な排他制御を行いながら
、できるだけ並行アクセスを可能にするための排他制御
方式を目的とする。
An object of the present invention is to provide an exclusive control method for enabling parallel access as much as possible while performing necessary exclusive control for access requests from different users to the same page of multiple records.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は、本発明の構成を示すブロック図である。 FIG. 1 is a block diagram showing the configuration of the present invention.

図は計算機の構成を示し、11は処理装置、13は処理
装置11で実行され、業務プログラム2のアクセス要求
によって、外部記憶装置4に格納されたファイル5への
アクセスを処理するファイル管理部である。ファイル管
理部13は管理テーブル20によりアクセス中のページ
を管理し、アクセス要求の対象のページ6がバッファ7
上で利用可能かを管理テーブル20によって識別して、
その結果によりアクセス要求の実行を拒否するか、又は
所要のアクセス処理を実行して、要求のレコード8を業
務プログラム2に渡す。
The figure shows the configuration of a computer, where 11 is a processing device, and 13 is a file management unit that is executed by the processing device 11 and processes access to a file 5 stored in an external storage device 4 in response to an access request from a business program 2. be. The file management unit 13 manages the page being accessed using the management table 20, and the page 6 to which the access request is made is stored in the buffer 7.
The management table 20 identifies whether or not the above is available.
Depending on the result, execution of the access request is refused or the required access processing is executed and the record 8 of the request is passed to the business program 2.

〔作 用〕[For production]

ファイル管理部13は、ファイルへのアクセス処理で所
要のページ6を初めてバッファ7に読み込んだとき、管
理テーブル20に当該ページがバッファにあること、及
び要求のレコードのアクセスの目的の処理に更新処理が
あるか、参照処理のみかを記憶する。
When the file management unit 13 reads a required page 6 into the buffer 7 for the first time in file access processing, the file management unit 13 displays information in the management table 20 indicating that the page is in the buffer, and updates the requested record to the processing intended for access. It remembers whether there is a reference process or only reference processing.

その後他の業務プログラム2のアクセス要求で同−のペ
ージを要求した場合に、ファイル管理部13はそれを管
理テーブル20によって識別する。
If the same page is subsequently requested by another business program 2, the file management section 13 identifies it using the management table 20.

その場合に、後のアクセス要求が更新処理であって、管
理テーブル20に更新処理がある旨の記録がある場合に
は、後のアクセス要求の実行を拒否する。
In this case, if the subsequent access request is for an update process and there is a record in the management table 20 that there is an update process, execution of the subsequent access request is rejected.

その他の組合わせ、即ち少なくとも一方の処理が参照の
みであれば、同一レコードへのアクセス要求を除き、要
求のアクセスを実行し、又そのアクセスに従って管理テ
ーブル20の記録を更新しておく。
For other combinations, that is, when at least one of the processes is only for reference, the requested access is executed, excluding requests for access to the same record, and the records in the management table 20 are updated in accordance with the access.

以上の処理方式により、バッファに読み込んだページを
利用して並行アクセスが可能になり、処理効率が改善さ
れる。
The above processing method enables parallel access using pages read into the buffer, improving processing efficiency.

〔実施例〕〔Example〕

第1図において、第4図と同一の符号を付して示す部分
は、前記従来の説明と同一の機能を有し、ファイル管理
部13は以下に特に述べる他は前記従来のファイル管理
部3と同様にして業務プログラム2の要求するファイル
アクセスの処理を実行するものとする。
In FIG. 1, parts shown with the same reference numerals as in FIG. It is assumed that the file access processing requested by the business program 2 is executed in the same manner as above.

ファイル管理部13は、ファイルへのアクセス処理で所
要のページ6を初めてバッファ7に読み込んだとき、管
理テーブル20に当該ページがバッファにあること、及
び要求のレコードのアクセスの目的の処理に更新処理が
あるか、参照処理のみかを記憶する。
When the file management unit 13 reads a required page 6 into the buffer 7 for the first time in file access processing, the file management unit 13 displays information in the management table 20 indicating that the page is in the buffer, and updates the requested record to the processing intended for access. It remembers whether there is a reference process or only reference processing.

管理テーブル20は例えば第2図に示すように、各バッ
ファ7ごとに、ページ名、ページ状態、各レコードごと
の状態の欄を設け、ページ状態欄にはそのページに更新
処理があるか否かを表示し、各レコードごとの状態欄に
は、当該レコードへ更新処理中か、参照処理中か、アク
セスされていないかを表示するように記録する。
For example, as shown in FIG. 2, the management table 20 has columns for each buffer 7, such as page name, page status, and status for each record, and the page status column indicates whether or not the page has been updated. is displayed, and the status column for each record is recorded to indicate whether the record is being updated, referenced, or not accessed.

その後他の業務プログラム2のアクセス要求で同一のペ
ージを要求した場合に、ファイル管理部13はそれを管
理テーブル20によって識別する。
If the same page is subsequently requested by another business program 2, the file management section 13 identifies it using the management table 20.

第3図はファイル管理部13の処理の流れを示し、処理
ステップ30でアクセス要求を受は取ると、処理ステッ
プ31で要求のページがバッファにあるかを管理テーブ
ル20で識別する。
FIG. 3 shows the flow of processing by the file management section 13. When an access request is received in processing step 30, it is determined in processing table 20 whether the requested page is in the buffer or not in processing step 31.

バッファに読み込まれてない場合には0.処理ステップ
32で前記のようにファイル5の所要のページ6をバッ
ファ7に読み込み、処理ステップ33で管理テーブル2
0の該当バッファの項に要求のアクセスの内容を記録し
、処理ステップ34で要求のレコードへのアクセスを実
行する。
0 if not read into the buffer. In processing step 32, the required page 6 of file 5 is read into buffer 7 as described above, and in processing step 33, management table 2 is read.
The content of the request access is recorded in the corresponding buffer section 0, and access to the request record is executed in processing step 34.

処理ステップ31でバッファに要求のページがあると識
別した場合には、処理ステップ35に進んで、そのペー
ジが更新処理中かを、ページ状態欄で識別し、更新処理
でなければ、処理ステップ36で判定して更新要求の場
合には、処理ステップ37でアクセス中のレコードと同
一レコードか識別し、同一の場合のみ要求の実行を拒否
し、その他の場合は処理ステップ33.34で前記のよ
うに管理テーブル20を更新し、要求のアクセスを実行
する。
If it is determined in processing step 31 that there is a requested page in the buffer, the process proceeds to processing step 35, where the page status column identifies whether the page is undergoing update processing, and if it is not update processing, processing proceeds to processing step 36. In the case of an update request, it is determined in processing step 37 whether the record is the same as the record being accessed, and execution of the request is refused only if the record is the same, and in other cases, processing steps 33 and 34 are performed as described above. The management table 20 is updated and the requested access is executed.

処理ステップ35で更新処理中と識別した場合は、処理
ステップ38で要求が更新処理か否かにより、更新処理
であれば要求の実行を拒否する。
If it is determined in processing step 35 that an update process is in progress, processing step 38 determines whether the request is an update process or not, and if it is an update process, the request is rejected.

参照処理の要求であれば処理ステップ38から処理ステ
ップ37に進み、前記と同様に更新処理のレコードと同
一で無い限り要求のアクセスを実行する。
If it is a request for reference processing, the process advances from processing step 38 to processing step 37, and similarly to the above, unless the record is the same as the update processing record, the requested access is executed.

以上により、同一ページへの更新処理の場合、及び更新
処理中のレコードへのアクセスの場合を除き、バッファ
7へ読み込んだページを複数のアクセスに並行して共用
できるようになる。
As described above, the page read into the buffer 7 can be shared by multiple accesses in parallel, except in the case of update processing to the same page and the case of access to a record that is being updated.

一般に参照処理の要求が更新処理より圧倒的に多いので
、上記の制限条件によって、アクセスの実行が拒否され
る場合が実際に発生することは極めて少なく、本方式に
よりバッファへの並行アクセスが大幅に可能になる。
In general, the number of requests for reference processing is overwhelmingly greater than that for update processing, so cases in which access execution is denied due to the above limiting conditions are extremely rare, and this method greatly reduces parallel access to the buffer. It becomes possible.

〔発明の効果〕〔Effect of the invention〕

以上の説明から明らかなように本発明によれば、計算機
の共用ファイルへのアクセスにおいて、バッファに読み
込んだページの共用が可能になるので、計算機の処理効
率を改善するという著しい工業的効果がある。
As is clear from the above description, according to the present invention, pages read into a buffer can be shared when accessing a shared file on a computer, so there is a significant industrial effect of improving the processing efficiency of a computer. .

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

第1図は本発明の構成を示すブロック図、第2図は管理
テーブルの説明図、 第3図は本発明の処理の流れ図、 第4図は従来の構成例を示すブロック図である。 図において、 1.11は処理装置、  2は業務プログラム、3.1
3はファイル管理部、 4は外部記憶装置、  5はファイル、6はページ、 
     7はバッファ、8はレコード、     2
0は管理テーブル、30〜38は処理ステップ を示す。
FIG. 1 is a block diagram showing the configuration of the present invention, FIG. 2 is an explanatory diagram of a management table, FIG. 3 is a flowchart of the processing of the present invention, and FIG. 4 is a block diagram showing an example of a conventional configuration. In the figure, 1.11 is a processing device, 2 is a business program, and 3.1
3 is a file management section, 4 is an external storage device, 5 is a file, 6 is a page,
7 is buffer, 8 is record, 2
0 indicates a management table, and 30 to 38 indicate processing steps.

Claims (1)

【特許請求の範囲】 1以上のレコードからなるページ(6)を入出力単位と
し、1以上の該ページからなり、複数の利用者によって
共用されるファイル(5)を有する計算機において、 1利用者によって該レコードの更新処理が行われる該ペ
ージに対する、他の利用者によるアクセスの要求がある
場合には、 該要求による更新処理のためのアクセスを抑止し、 前記更新処理の行われるレコード以外のレコードに対す
る、該要求による参照処理のためのアクセスを許容する
(13、20)ように構成されていることを特徴とする
ファイルアクセス排他制御方式。
[Claims] In a computer having a page (6) consisting of one or more records as an input/output unit, and having a file (5) consisting of one or more such pages and shared by a plurality of users, one user If there is a request for access by another user to the page on which the update process of the record is performed, the access for the update process due to the request is suppressed, and records other than the record where the update process is performed. 1. A file access exclusive control system characterized in that the file access exclusive control system is configured to allow access for reference processing based on the request (13, 20).
JP62147288A 1987-06-12 1987-06-12 Exclusive control system for file access Pending JPS63311450A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62147288A JPS63311450A (en) 1987-06-12 1987-06-12 Exclusive control system for file access

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62147288A JPS63311450A (en) 1987-06-12 1987-06-12 Exclusive control system for file access

Publications (1)

Publication Number Publication Date
JPS63311450A true JPS63311450A (en) 1988-12-20

Family

ID=15426813

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62147288A Pending JPS63311450A (en) 1987-06-12 1987-06-12 Exclusive control system for file access

Country Status (1)

Country Link
JP (1) JPS63311450A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263360A (en) * 1995-03-27 1996-10-11 Nec Corp Object-related information management system
JPH09179767A (en) * 1995-12-06 1997-07-11 Electron & Telecommun Res Inst Buffer management method using buffer locking technique in storage system of multiple-user environment
JP2021120847A (en) * 2019-04-04 2021-08-19 中科寒武紀科技股▲分▼有限公司Cambricon Technologies Corporation Limited Data processing method, apparatus, and related product
US11687339B2 (en) 2019-04-19 2023-06-27 Cambricon Technologies Corporation Limited Data processing method and apparatus, and related product
US11836491B2 (en) 2019-04-04 2023-12-05 Cambricon Technologies Corporation Limited Data processing method and apparatus, and related product for increased efficiency of tensor processing

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08263360A (en) * 1995-03-27 1996-10-11 Nec Corp Object-related information management system
JPH09179767A (en) * 1995-12-06 1997-07-11 Electron & Telecommun Res Inst Buffer management method using buffer locking technique in storage system of multiple-user environment
JP2021120847A (en) * 2019-04-04 2021-08-19 中科寒武紀科技股▲分▼有限公司Cambricon Technologies Corporation Limited Data processing method, apparatus, and related product
JP2021140745A (en) * 2019-04-04 2021-09-16 中科寒武紀科技股▲分▼有限公司Cambricon Technologies Corporation Limited Data processing method, apparatus, and related product
US11836491B2 (en) 2019-04-04 2023-12-05 Cambricon Technologies Corporation Limited Data processing method and apparatus, and related product for increased efficiency of tensor processing
US11687339B2 (en) 2019-04-19 2023-06-27 Cambricon Technologies Corporation Limited Data processing method and apparatus, and related product

Similar Documents

Publication Publication Date Title
JPH03160534A (en) Access control system for shared file
JPS63311450A (en) Exclusive control system for file access
JPH0798663A (en) Asynchronous i/o control system
US20220188316A1 (en) Storage device adapter to accelerate database temporary table processing
JP2994917B2 (en) Storage system
JP2641399B2 (en) File management device
JP3255081B2 (en) File-access device and machine-readable recording medium recording program
JPH069042B2 (en) Sequential access control device for shared storage medium
JPH01255028A (en) Method for making access to external storage device
JPS63113637A (en) Exclusive processing system for hash table entry
JPH01145745A (en) Exclusive control method for file access
JPH03246741A (en) Synchronous controller
JPH02138646A (en) Processing system for addition of record
JPS62145441A (en) Updating processing system for key-sequenced data set
JPH07244564A (en) Disk array device
JPS6386041A (en) File updating method
JPH03260849A (en) File area control processing method
JPH01166124A (en) Volume shared control system
JPS63121945A (en) Logical address space management system
JPS6022784B2 (en) Duplicate data integrity maintenance method
JPH03105534A (en) File control method
JPS6339054A (en) Controlling system for file extension
JPH06110773A (en) Memory controller
JPH0869401A (en) File management device
JPH0455953A (en) Block input/output control system