Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0762833B2 - Exclusive control method for shared data set - Google Patents
[go: Go Back, main page]

JPH0762833B2 - Exclusive control method for shared data set - Google Patents

Exclusive control method for shared data set

Info

Publication number
JPH0762833B2
JPH0762833B2 JP58124172A JP12417283A JPH0762833B2 JP H0762833 B2 JPH0762833 B2 JP H0762833B2 JP 58124172 A JP58124172 A JP 58124172A JP 12417283 A JP12417283 A JP 12417283A JP H0762833 B2 JPH0762833 B2 JP H0762833B2
Authority
JP
Japan
Prior art keywords
division
access
data
exclusive control
data set
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 - Fee Related
Application number
JP58124172A
Other languages
Japanese (ja)
Other versions
JPS6015755A (en
Inventor
敏彦 増川
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 JP58124172A priority Critical patent/JPH0762833B2/en
Publication of JPS6015755A publication Critical patent/JPS6015755A/en
Publication of JPH0762833B2 publication Critical patent/JPH0762833B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、共用データセットの排他制御方式に関し、特
にオンラインシステムにおいて複数の利用者により共用
されるVSAMデータセットなどのデータセットへのアクセ
スを、高いオンライン処理効率で排他制御する方式に関
する。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to an exclusive control method for a shared data set, and more particularly, to access a data set such as a VSAM data set shared by a plurality of users in an online system, The present invention relates to a method of exclusive control with high online processing efficiency.

〔技術の背景〕[Background of technology]

はじめに、本発明の対象となるVSAMデータセットの例に
ついて簡単に説明する。
First, an example of the VSAM data set which is the subject of the present invention will be briefly described.

VSAM(Virtual Storage Access Method)のデータセッ
トは、データ転送単位となるコントロールインターバル
と、複数のコントロールインターバルで構成されるコン
トロールエリアを管理単位としている。
A VSAM (Virtual Storage Access Method) data set has a control interval, which is a data transfer unit, and a control area, which is composed of a plurality of control intervals, as a management unit.

コントロールインターバル(以後CIと呼ぶ)の長さは、
データセットごとに決定され、最大32,768バイトの大き
さまで設定可能である。利用者のアクセス単位であるレ
コードは、原則として1つのCIに収容されるが、2つ以
上のCIにまたがる場合もある。
The length of the control interval (hereinafter referred to as CI) is
It is determined for each data set and can be set up to a maximum size of 32,768 bytes. A record, which is an access unit of a user, is accommodated in one CI in principle, but it may extend over two or more CIs.

コントロールエリア(以後CAと呼ぶ)の大きさは最大1
シリンダであり、データセットを拡張する場合の最小単
位となるものである。第1図は、CAおよびCIによるデー
タセット構成を概念的に示したものである。
The maximum size of the control area (hereafter called CA) is 1
A cylinder is the smallest unit for expanding a data set. FIG. 1 conceptually shows a data set structure by CA and CI.

なお、VSAMによりサポートできるデータセットの種別
は、キー順データセットKSDS、エントリ順データセット
ESDS、相対レコードデータセットRRDSの3つである。
The types of datasets that can be supported by VSAM are key sequence data set KSDS and entry sequence data set.
These are ESDS and relative record data set RRDS.

次に、VSAMデータセットを利用したデータベースシステ
ムの例を、第2図により説明する。
Next, an example of a database system using the VSAM data set will be described with reference to FIG.

第2図において、1−1,1−2はオンライン端末、2は
ホスト、3−1,3−2は業務プログラム、4はオンライ
ンデータベース処理システムのAIM(Advanced Informat
ion Manager)、4aは排他制御部、5はVSAM、5aは排他
制御部、6はディスク装置などのファイル装置に格納さ
れたデータベースを表す。データベース6はVSAMデータ
セットであり、図示のCI1乃至CI9とCA7乃至CI9は、CA2
内の相対的なCI番号で表すと、CI1乃至CI3となる。
In FIG. 2, 1-1 and 1-2 are online terminals, 2 is a host, 3-1 and 3-2 are business programs, and 4 is an online database processing system AIM (Advanced Informat).
ion manager), 4a is an exclusive control unit, 5 is VSAM, 5a is an exclusive control unit, and 6 is a database stored in a file device such as a disk device. The database 6 is a VSAM data set, and CI1 to CI9 and CA7 to CI9 shown are CA2.
When expressed by relative CI numbers in the above, it becomes CI1 to CI3.

オンライン端末1−1,1−2の利用者は、自己の業務を
処理するために、それぞれ業務プログラム3−1,3−2
を呼び出し、データベース6を利用するトランザクショ
ンを投入する。
The users of the online terminals 1-1 and 1-2 have business programs 3-1 and 3-2, respectively, in order to process their own business.
To call a transaction that uses the database 6.

AIMはトランザクションを解析し、必要とするレコード
について、データベース6をアクセスする。データベー
ス6のアクセスは、VSAMを介して該当するCIをアクセス
することにより行われる。
AIM analyzes the transaction and accesses the database 6 for the required record. The database 6 is accessed by accessing the corresponding CI via VSAM.

あるデータアクセスが、更新あるいは追加を目的とする
ものである場合、他のデータ利用者に対して、データの
最新性、つまりデータが最新に更新されたものであるこ
とを保証し、また各利用者間で使用するデータの更新レ
ベルについて同期をとるため、そのデータアクセスが終
了するまで、他の利用者に対して同一データに対するア
クセスを禁止する必要がある。
If a data access is intended for updating or addition, it guarantees to other data users the freshness of the data, that is, the data has been updated most recently, and In order to synchronize the update level of the data used by the users, it is necessary to prohibit other users from accessing the same data until the data access is completed.

このため、VSAMの排他制御部5aは、CI単位での排他制御
機能をもち、ある1つのCIについてデータ更新あるいは
データ追加の処理を行っている間は、そのCIに対する他
のアクセスを全て禁止するようにしている。しかし、1
つのトランザクションから、複数のCIに対してアクセス
要求が生じる場合がある。このため、AIMは、トランザ
クション単位のデータの保証を管理し、また複数のトラ
ンザクション間でデータアクセス順序が競合して、デッ
ドロック状態が生じても検知できる。排他制御部4aは、
この目的で設けられている。
For this reason, the exclusive control unit 5a of VSAM has an exclusive control function in CI units, and prohibits all other access to the CI while performing data update or data addition processing for a certain CI. I am trying. But 1
Access requests may be issued to multiple CIs from one transaction. For this reason, the AIM manages the guarantee of data in transaction units, and can detect even if a deadlock state occurs due to conflicting data access orders among multiple transactions. The exclusive control unit 4a
It is provided for this purpose.

なお、VSAMのみの排他制御によりトランザクション単位
でのデータ保証が得られない例を第2図に説明すると、
図中に例示されているように、業務プログラム3−1が
CI1→CI2の順序でのアクセス要求をもち、業務プログラ
ム3−2がCI2→CI3の順序でのアクセス要求をもってい
る場合、VSAMの排他制御では、業務プログラム3−1の
CI1をアクセスしている間、業務プログラム3−2のCI2
アクセスは排他されず、たとえば更新できる。このた
め、業務プログラム3−1のCI2アクセスは、業務プロ
グラム3−2により更新された後のCI2データへのアク
セスとなり、CI1データとの更新レベルの整合性(ある
いは同期性)を失うことになる。
An example in which data guarantee cannot be obtained in transaction units by exclusive control of VSAM will be explained with reference to FIG.
As illustrated in the figure, the business program 3-1
If the business program 3-2 has access requests in the order of CI1 → CI2, and the business program 3-2 has access requests in the order of CI2 → CI3, the exclusive control of VSAM causes the business program 3-1 to
While accessing CI1, CI2 of business program 3-2
Access is not exclusive and can be updated, for example. Therefore, the CI2 access of the business program 3-1 becomes an access to the CI2 data after being updated by the business program 3-2, and the update level consistency (or synchronism) with the CI1 data is lost. .

従来のAIMの排他制御部4aは、上述したようなトランザ
クション単位でのデータ保証問題を解決するため、CA単
位での排他制御を行っている。すなわち、AIM-VSAMにお
いてはCAにレコードが収容しきれなくなったときに、新
しいCAの切り出し(CA分割と呼ばれる)が行われる。そ
してその際、データの終了位置が変わるため、このデー
タ終了位置をEOD(End of Data)情報として、同一デー
タセットにアクセスしている他の業務プログラムに反映
させ、データの最新性の保証をしている。しかしこの場
合、CA分割がいつ行われるかは予測できないため、ある
CIにデータの更新/追加が行われているとき、そのCIを
含むCA全体を、同一CA内のどのCIにアクセスする業務プ
ログラムに対しても、一律にアクセス禁止するものであ
る。
The exclusive control unit 4a of the conventional AIM performs exclusive control in CA units in order to solve the data guarantee problem in transaction units as described above. That is, in AIM-VSAM, a new CA is cut out (referred to as CA division) when the CA cannot store the records. At that time, since the end position of the data changes, this end position of the data is reflected as EOD (End of Data) information in other business programs accessing the same data set to guarantee the freshness of the data. ing. But in this case, it is not possible to predict when the CA split will occur, so
When data is updated / added to a CI, the entire CA including that CI is uniformly prohibited from access to any business program that accesses any CI in the same CA.

しかし、上記のようなCA単位での排他制御を行った場
合、たとえば第2図の例では、業務プログラム3−1と
3−2のアクセス対象CIはいずれも同じCA1内に含まれ
るため、一方の業務プログラムのアクセス要求が受け付
けられると、そのトランザクション処理が完了するまで
他方の業務プログラムのアクセス要求は待たされること
になる。これは、互いのアクセス対象CIがまったく競合
していない場合であっても、同一CA内にある限り排他さ
れ、従来、オンライン処理効率を低下させる1つの原因
となっていた。
However, when exclusive control is performed in CA units as described above, for example, in the example of FIG. 2, the access target CIs of the business programs 3-1 and 3-2 are both included in the same CA1, so When the access request of the other business program is accepted, the access request of the other business program is kept waiting until the transaction processing is completed. Even if the CIs to be accessed do not conflict with each other, the CIs are excluded as long as they are in the same CA, which has conventionally been one cause of reducing the online processing efficiency.

さらに、従来の方式では、EODの反映は、CPENでEOD情報
を取り込み、CLOSEでEOD情報を反映する方法をとってい
た。しかし、たとえばオンライン業務の場合通常朝一番
に業務をたちあげ、夕方業務終了となるので、業務プロ
グラムはOPEN時点である朝一番の状況をEOD情報として
保持している。これでは、データの最新性が保証されな
い。従って従来方式ではCA分割によりEOD情報が替わる
可能性があるならば、いったん業務プログラムをCLOSE
で終了させて、再度OPENさせる必要があった。この様に
最新データを知るにはOPEN〜CLOSEを繰り返す必要があ
り、OPEN処理の初期設定は時間がかかるため、オンライ
ン業務には向いていなかった。
Further, in the conventional method, the EOD is reflected by CPEN to capture the EOD information and CLOSE to reflect the EOD information. However, for example, in the case of online work, the work is usually started in the morning and finished in the evening, so the work program holds the first situation in the morning at the time of OPEN as EOD information. This does not guarantee the freshness of the data. Therefore, in the conventional method, if the EOD information may change due to CA division, once close the business program.
It was necessary to end it with and open it again. In this way, it is necessary to repeat OPEN-CLOSE to know the latest data, and initialization of OPEN processing takes time, so it was not suitable for online work.

〔発明の目的および構成〕[Object and Structure of Invention]

本発明の目的は、従来の排他制御方式において設定され
ている排他対象データの範囲を、より有効性の高いもの
に縮小する手段を提供することにより、無用なアクセス
遅延を減少させることにあり、そのため、アクセスの競
合関係をより精密にチェックし、またCA分割について
は、時間的に限定した対応手段をとることにより、目的
を達成するものである。
An object of the present invention is to reduce unnecessary access delay by providing means for reducing the range of exclusion target data set in the conventional exclusion control method to a more effective one, Therefore, the objective is achieved by more accurately checking the access conflict relationship and taking a time-limited countermeasure for CA division.

それにより本発明の構成は、複数のオンライン端末と、
データベース6と、データベース6のデータセットを転
送単位となる第1分割単位CIおよび該第1分割単位CIよ
りも上位レベルの第2分割単位CAにより階層化して管理
し、第1分割単位CIごとに排他制御を行うデータ管理手
段5と、オンライン端末から投入されたトランザクショ
ンを解析し、データベース6の共用データセットのアク
セス制御を行うオンライン処理手段4とをそなえ、上記
オンライン処理手段4は、通常、トランザクションがア
クセスしている上記第2分割単位CAであってかつ、その
中の上記第1分割単位CIに共用データセットの排他制御
を行い、そして上記データ管理手段5が第2分割単位CA
を分割処理している間のみ、該第2分割単位CA内の第1
分割単位CIに対するアクセスを、第2分割単位CAで排他
制御することを特徴としている。
Thereby, the configuration of the present invention includes a plurality of online terminals,
The database 6 and the data set of the database 6 are hierarchically managed by a first division unit CI that is a transfer unit and a second division unit CA that is a higher level than the first division unit CI, and is managed for each first division unit CI. It comprises a data management means 5 for performing exclusive control and an online processing means 4 for analyzing access to the shared data set of the database 6 by analyzing a transaction input from an online terminal. Is being accessed by the second division unit CA, and the first division unit CI of the second division unit CA is subjected to exclusive control of the shared data set, and the data management means 5 is the second division unit CA.
Only during the division processing of the first division unit CA in the second division unit CA.
The feature is that the access to the division unit CI is exclusively controlled by the second division unit CA.

〔発明の実施例〕Example of Invention

以下に、本発明の詳細を実施例にしたがって説明する。 Hereinafter, details of the present invention will be described according to examples.

第3図は、本発明の1実施例システムの構成図であり、
第2図で説明したデータベースシステムを改良したもの
である。本図において、3−1,3−2はそれぞれ業務プ
ログラム、4はAIM、4a′は排他制御部、4bはトランザ
クション解析部、5はVSAM、5aは排他制御部、5bはCA分
割処理部、6はディスク装置などのファイル装置に格納
されているデータベース、7はメモリの共通領域に設け
られたCI管理テーブル、8はメモリの共通領域に設けら
れているEOD情報を表す。ここでCI管理テーブル7は業
務プログラムごと及びトランザクションごとに排他する
CIを指示するために用いられ、トランザクションでアク
セスするデータセットのCA番号とCI番号がアクセス順に
登録される。またEOD情報8は、データセットのデータ
終了位置をCA番号とCI番号によって示し、データセット
の更新によりデータ終了位置が変化したとき更新され
る。EOD情報8の更新があると、その内容は対応するデ
ータセットを使用する各業務プログラムに通知される。
各業務プログラムは従来と同様に、OPEN処理時にその時
点でのEOD情報8を取り込んでおり、新しいEOD情報を通
知されたときそれを更新する。なお、第2図の構成要素
と機能的に対応するものには同一の参照番号が用いられ
ている。
FIG. 3 is a block diagram of a system of one embodiment of the present invention,
This is an improvement of the database system described in FIG. In the figure, 3-1 and 3-2 are business programs, 4 are AIMs, 4a 'is an exclusive control unit, 4b is a transaction analysis unit, 5 is VSAM, 5a is an exclusive control unit, 5b is a CA division processing unit, 6 is a database stored in a file device such as a disk device, 7 is a CI management table provided in a common area of the memory, and 8 is EOD information provided in the common area of the memory. Here, the CI management table 7 is exclusive for each business program and each transaction.
It is used to indicate the CI, and the CA number and CI number of the data set accessed in the transaction are registered in the order of access. The EOD information 8 indicates the data end position of the data set by the CA number and the CI number, and is updated when the data end position changes due to the update of the data set. When the EOD information 8 is updated, the content is notified to each business program that uses the corresponding data set.
Each business program fetches the EOD information 8 at that time at the time of the OPEN processing as in the conventional case, and updates it when the new EOD information is notified. Note that the same reference numerals are used for those functionally corresponding to the constituent elements in FIG.

AIMのトランザクション解析部4bは、受け付けられた業
務プログラムのトランザクション単位にデータアクセス
要求を解析し、対応するCA番号+該当CAのCI番号をCI管
理テーブル7に登録する。業務プログラム(3−1)が
CA1のCI1,CI2のデータを得て処理している間に業務プロ
グラム(3−2)がCA1にレコードの追加をすること
で、CA1が満杯になり、CA分割が発生した場合、つまり
第3図の例ではCA1にCI7〜CI9を追加しようとしたがCA1
に空きスペースがなくCA分割が発生した場合、CA2が作
成される。この追加されるCI7〜CI9のデータはCA2+CI1
〜CA2+CI3としてCA2内の相対的なCI番号に変換され、C
I管理テーブル7のテーブルに登録される。尚、このCA
分割中においては、CI7〜CI9に相当するデータは実存し
ているが、業務プログラム3−1が現時点で取得してい
るEOD情報によりアクセスするとそのレコードが無いこ
とになるので、CA分割が完了するまで待たす。またCA分
割が発生した事でデータセットのデータ終了位置(EO
D)は変化するが、データ終了位置の変化はCA分割を生
じさせるアクセスを行った業務プログラム(3−1)に
しか認識できないので、分割完了後、直ちにデータ終了
位置の情報を他の業務プログラム(3−2)にも判るよ
うに通知し(第3図のEOD情報8による)、データの最
新性(アクセスデータが最新に更新されたデータである
こと)を保証するよう制御する。従来はOPEN時にEOD情
報を取り込んでデータセットの終了位置を認識し、EOD
情報の更新はCLOSE時に行っていたので、トランザクシ
ョン処理中にEODの変化を他の業務プログラムに通知す
ることができなかったため、業務プログラム(3−1)
が終了し、再度業務プログラム(3−2)を立ち上げな
いと、CA分割後の最新のデータセットの状態を他の業務
プログラム(3−2)に反映できず、データの最新性の
保証が出来なかった。
The transaction analysis unit 4b of the AIM analyzes the data access request for each transaction of the accepted business program, and registers the corresponding CA number + CI number of the corresponding CA in the CI management table 7. Business program (3-1)
When the business program (3-2) adds a record to CA1 while obtaining and processing the data of CI1 and CI2 of CA1, CA1 becomes full and CA split occurs, that is, the third In the example in the figure, I tried to add CI7 to CI9 to CA1, but CA1
If there is no free space in and CA split occurs, CA2 is created. This added data of CI7 to CI9 is CA2 + CI1
Converted to the relative CI number in CA2 as ~ CA2 + CI3, C
It is registered in the I management table 7. This CA
While the data corresponding to CI7 to CI9 exist during the division, the CA division is completed because the record does not exist when the EOD information acquired by the business program 3-1 is accessed. Wait until. In addition, the data end position (EO
Although D) changes, the change of the data end position can be recognized only by the access business program (3-1) that causes the CA division, so immediately after the division is completed, the information of the data end position is transferred to another business program. (3-2) is notified so that it can be understood (according to EOD information 8 in FIG. 3), and control is performed to guarantee the freshness of the data (the access data is the latest updated data). Conventionally, the EOD information is captured at the time of OPEN and the end position of the data set is recognized to
Since the information was updated at CLOSE, it was not possible to notify other business programs of changes in EOD during transaction processing, so business program (3-1)
If the business program (3-2) is not started and the business program (3-2) is restarted, the state of the latest data set after the CA split cannot be reflected in other business programs (3-2), which guarantees the data freshness. I could not do it.

排他制御部4a′は第2図の従来例の排他制御部4aの機能
を改良したものであり、CI管理テーブル7を参照し、か
つVSAMのCA分割処理部5bからCA分割処理中の情報(たと
えば開始と終了の通知)を得て、排他制御を実行する。
The exclusive control unit 4a ′ is an improved version of the function of the exclusive control unit 4a of the conventional example shown in FIG. 2. It refers to the CI management table 7, and the CA split processing unit 5b of VSAM indicates that the CA split processing is in progress. For example, a notification of start and end) is obtained and exclusive control is executed.

第4図は、排他制御部4a′の制御フローの1例を示した
ものである。以下ステップa乃至eにしたがって説明す
る。
FIG. 4 shows an example of the control flow of the exclusive control unit 4a '. The steps a to e will be described below.

ステップaでは、当該トランザクションがアクセスしよ
うとするCAを他のトランザクションが使用中か否かにつ
いて、第3図の排他情報(CI管理テーブル7)のCA番号
と比較し、一次的判定を行う。ここで当該トランザクシ
ョンのCAが他のトランザクションによって使用されてい
なければ、当該CAの全データをアクセスして良い。しか
し当該CAを他の業務プログラムが使用しているときに
は、次のステップbにおいてCI単位に他のトランザクシ
ョンが使用中か否かを二次的に判定する。
At step a, whether or not the CA that the transaction is trying to access is being used by another transaction is compared with the CA number of the exclusion information (CI management table 7) in FIG. 3 to make a primary determination. Here, if the CA of the transaction is not used by another transaction, all data of the CA may be accessed. However, when the CA is used by another business program, it is secondarily determined in the next step b whether or not another transaction is being used for each CI.

ステップcでは、他のトランザクションが当該CIを先行
してアクセス中であれば、このアクセスの終了を待ち、
終了したときアクセスさせる。
In step c, if another transaction is accessing the CI ahead of the current CI, wait for the end of this access,
Access when finished.

ステップdおよびステップeは、CA分割中の場合の排他
処理であり、ステップdで、VSAMのCA分割処理部5bから
CA分割中の通知があった場合、ステップeでそのCAが自
CAと同じであるか否かを判定する。Noであれば実行し、
Yesであればステップdへ戻り、CA分割処理が終わるま
で待機する。CA分割処理が終了すれば実行に入る。さら
に詳しくいうと、CA分割時にCA分割処理部5bから通知さ
れるのは分割開始通知と分割完了通知であり、これらを
もとに“CA分割中”の判定を行う。
Steps d and e are exclusive processing when the CA division is in progress. In step d, the CA division processing unit 5b of VSAM
If there is a notification that the CA is being split, the CA will
Determine if it is the same as the CA. If No, execute it,
If Yes, the process returns to step d and waits until the CA division process is completed. Execution starts when the CA split processing is completed. More specifically, what is notified from the CA division processing unit 5b at the time of CA division is a division start notification and division completion notification, and based on these, the "CA division in progress" determination is performed.

つまりCA分割中とは、分割処理が開始されていて、分割
完了通知が未だ無い状態の事である。
In other words, the CA is being divided means that the division process has been started and the division completion notification has not yet been issued.

また、CA分割中はこの分割開始時と分割完了時の通知情
報により、分割が完了するまで、各アクセスを待ちに
し、分割完了後にアクセスを実行している。
Further, during the CA division, each access is waited until the division is completed and the access is executed after the division is completed by the notification information at the time of the division start and the division completion.

第5図は、それぞれ本実施例を適用した2つの排他制御
例を示している。図の左側は2つの業務プログラムAPL
1,APL2のCIアクセス要求内容を、右側はその排他制御結
果を表す。同図(a)の例では、APL1とAPL2に同じCI2
が含まれているため、先行APL1のCI2のアクセス完了後
にAPL2のCI2が実行される。同図(b)の例はCI1がAPL1
とAPL2の間で共通に使用される場合である。この場合、
APL1とAPL2のどちらが先行してCI1にアクセスするか
は、APL1とAPL2の各トランザクションの受け付けタイミ
ング、各APLのトランザクション内でのCI1のアクセス順
序などによって決まる。
FIG. 5 shows two exclusive control examples to which the present embodiment is applied. The left side of the figure shows two business programs APL
1, APL2 CI access request content, the right side shows the exclusive control result. In the example of FIG. 3A, CI2 is the same as APL1 and APL2.
Is included, CI2 of APL2 is executed after the access of CI2 of the preceding APL1 is completed. CI1 is APL1 in the example of FIG.
And APL2 are commonly used. in this case,
Which of APL1 and APL2 precedes access to CI1 depends on the acceptance timing of each transaction of APL1 and APL2, the access order of CI1 within each APL transaction, and the like.

APL1,APL2のどちらが先行してCI1を使用しているかを知
るためには、例えばAPL2がCI1をアクセスする場合、自
分以外のトランザクション(APL1)が同一CIを使用して
いるか否かを判定すれば良い。CI1をアクセスしている
他のトランザクション(APL1)があれば、このトランザ
クション(APL1)がCI1のアクセスを終了して排他が解
除されるまでアクセスを待たす。これによりAPL2では、
CI3のアクセスを完了した段階でCI1をアクセスしている
APL1のトランザクションのCI1アクセス終了を待てば良
く、並行アクセスが実現される。
In order to know which of APL1 and APL2 is using CI1 first, for example, when APL2 accesses CI1, it is necessary to determine whether or not the transaction (APL1) other than itself uses the same CI. good. If there is another transaction (APL1) that is accessing CI1, this transaction (APL1) waits until this transaction ends access to CI1 and the exclusion is released. As a result, in APL2,
You are accessing CI1 when you have completed access to CI3
It is sufficient to wait for the end of CI1 access of the APL1 transaction, and parallel access is realized.

次に、APL1,APL2が同じCA1をアクセスしている時にCA分
割が発生した場合の排他制御について説明する。
Next, exclusive control when CA division occurs while APL1 and APL2 are accessing the same CA1 will be described.

たとえばAPL2がCI3をアクセス中の時、APL1がCI1をアク
セスしているものとする。この時にCA分割が発生し、新
たなCAを切り出す場合は、・CI1でのレコード追加によ
りCA1にレコードが格納しきれないか、または・CI3のレ
コード追加でCA1にレコードが格納しきれない場合であ
る。
For example, assume that APL1 is accessing CI1 while APL2 is accessing CI3. If a CA split occurs at this time and a new CA is to be cut out, either: -Records cannot be stored in CA1 due to the addition of records in CI1 or-Records cannot be stored in CA1 due to the addition of records in CI3. is there.

この時点でCA1だけでは格納領域が不足のため、CA分割
が発生し、CA2の格納域を確保する。この場合、第4図
のdにおいて『CA分割中の判定』をしており、CA分割中
ならば、CA分割が完了するまで、当該CAのアクセスを待
たし、分割完了時にEOD情報を反映して、その後にCIア
クセスを実行する(第4図の最下ステップ)ように制御
が行われる。APL2のCI3のレコード追加時の延長でCA分
割が生じた場合の例を次に示す。
At this point, the storage area is insufficient with CA1 alone, so CA splitting occurs and the storage area for CA2 is secured. In this case, the “judgment during CA division” is made in d of FIG. 4, and if the CA division is in progress, the access of the CA is waited until the CA division is completed, and the EOD information is reflected when the division is completed. Then, control is performed so that the CI access is executed thereafter (the bottom step in FIG. 4). The following is an example when CA split occurs due to the extension when adding the CI3 record of APL2.

a)APL1のCI1アクセスにおける排他情報はCA1+CI1で
あり、この箇所にアクセスできるのは、この排他情報を
保持しているAPL1だけである。APL2がCI1をアクセスし
ようとしても、別トランザクションであるAPL1の排他情
報により待ちになる。
a) Exclusive information in CI1 access of APL1 is CA1 + CI1 and only this APL1 holding this exclusive information can access this location. Even if APL2 tries to access CI1, it waits due to the exclusive information of APL1 which is another transaction.

b)APL2のCI3でのデータ追加で分割が発生した場合
は、APL2はCA1+CI3の排他情報を持った後、CI3をアク
セスして、この延長で新たなCA2のCI7が生成される。こ
のCA2を確保する間がアクセスの抑止期間となる。その
後CA2のCI7(CA2内相対CI番号ではCI1)にデータが格納
される。その結果APL2の排他情報はCA1+CI3とCA2+CI7
となる。APL1はCI1をアクセスしようとするが、CA分割
中の抑止期間は待ちとなる。この時の抑止情報は“CA
1",“CA2"と“分割中”の情報である。
b) When a division occurs due to the addition of data in CI3 of APL2, APL2 holds exclusive information of CA1 + CI3, then accesses CI3, and a new CI7 of CA2 is generated by this extension. The period during which the CA2 is secured is the access inhibition period. After that, the data is stored in CI7 of CA2 (CI1 in the relative CI number in CA2). As a result, the exclusive information of APL2 is CA1 + CI3 and CA2 + CI7.
Becomes APL1 tries to access CI1 but waits for the suppression period during CA split. The suppression information at this time is "CA
It is information of "1", "CA2" and "splitting".

c)CA分割完了後、EOD情報を更新し、直ちにAPL1,APL2
に通知する事で、APL1とAPL2ともにEODの認識はCA2+CI
7となり一致する。
c) After CA division is completed, EOD information is updated and immediately APL1, APL2
APL1 and APL2 can recognize EOD by notifying CA2 + CI
7 matches.

d)CA分割完了後、APL1のアクセス抑止を解除し、CI1
をアクセスする。APL1の排他情報は変更の必要がない。
d) After the CA division is completed, release the access suppression of APL1 and
To access. The exclusive information of APL1 does not need to be changed.

e)APL2は通知されたEOD情報に基づいてCI7を認識する
ことができ、同一トランザクションの処理中においても
CI7のを参照、更新可能である。またEOD情報の通知によ
りAPL1もCI7のアクセスが可能となる。
e) APL2 can recognize CI7 based on the notified EOD information, and even during the processing of the same transaction.
You can refer to and update CI7. The APL1 can also access the CI7 by the notification of the EOD information.

次に上述した処理例におけるAPL1とAPL2のEOD認識の変
化は次のようになる。
Next, changes in EOD recognition of APL1 and APL2 in the above-described processing example are as follows.

APL1のOPEN処理ではCI6までのデータしか分からな
い。したがってAPL1には、CI1〜CI6までのデータしか無
いと言うEOD情報が設定される。
Only the data up to CI6 is known in the OPEN processing of APL1. Therefore, EPL information that only data of CI1 to CI6 is present is set in APL1.

OPEN時点でも同様にCI1〜CI6のデータしか無いと認
識する。
Similarly, at the time of OPEN, it recognizes that there is only CI1 to CI6 data.

APL1のアクセス中に、CA1でAPL2のレコード追加に
よりCA分割が発生しCA2が生成され、CI7が作成された。
While accessing APL1, CA1 generated a CA split by adding the record of APL2, and CA2 was created, and CI7 was created.

上記状態でのAPL1がCI1をアクセス後、APL2により生
成されたCI7は、APL1のEOD情報としてCI6しかないのでA
PL1がCI7をアクセスするとデータ無しとなる。
After APL1 accesses CI1 in the above state, CI7 generated by APL2 has only CI6 as EOD information of APL1.
When PL1 accesses CI7, there is no data.

しかし、APL2の契機でCA分割が発生し、CI7が生成され
た時にCA分割完了時に、APL1にEOD情報の変更通知をす
る。このEOD情報をAPL1に反映する事でAPL1は最新デー
タまで(即ちCI7まで)のアクセスが可能となる。
However, CA split occurs at the trigger of APL2, and when the CI split is completed, the APL1 is notified of the change in the EOD information when the CA split is completed. By reflecting this EOD information in APL1, APL1 can access up to the latest data (that is, up to CI7).

〔発明の効果〕〔The invention's effect〕

以上のように、本発明によれば、複数のオンライン端末
からの共用データへのアクセス効率が改善され、応答時
間を短縮することができる。
As described above, according to the present invention, the access efficiency to shared data from a plurality of online terminals is improved and the response time can be shortened.

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

第1図はVSAMデータセットの構成の概念図、第2図は従
来の排他制御方式を説明するためのデータベースシステ
ムの構成図、第3図は本発明の実施例システムの構成
図、第4図は排他制御のフロー図、第5図は本実施例の
適用例を示す図である。 図中、3−1,3−2は業務プログラム、4はオンライン
処理システムのAIM、4a′は排他制御部、4bはトランザ
クション解析部、5はデータ管理システムのVSAM、5aは
排他制御部、5bはCA分割処理部、6はデータベース、7
はCI管理テーブルを表す。
FIG. 1 is a conceptual diagram of the structure of a VSAM data set, FIG. 2 is a structural diagram of a database system for explaining a conventional exclusive control method, and FIG. 3 is a structural diagram of an embodiment system of the present invention, FIG. Is a flow chart of exclusive control, and FIG. 5 is a diagram showing an application example of the present embodiment. In the figure, 3-1 and 3-2 are business programs, 4 is an online processing system AIM, 4a 'is an exclusive control unit, 4b is a transaction analysis unit, 5 is a data management system VSAM, 5a is an exclusive control unit, and 5b. Is a CA division processing unit, 6 is a database, 7
Represents a CI management table.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数のオンライン端末と、データベース
(6)と、データベース(6)のデータセットを転送単
位となる第1分割単位(CI)および該第1分割単位(C
I)よりも上位レベルの第2分割単位(CA)により階層
化して管理し、第1分割単位(CI)ごとに排他制御を行
うデータ管理手段(5)と、オンライン端末から投入さ
れたトランザクションを解析し、データベース(6)の
共用データセットのアクセス制御を行うオンライン処理
手段(4)とをそなえ、上記オンライン処理手段(4)
は、通常、トランザクションがアクセスしている上記第
2分割単位(CA)であってかつ、その中の上記第1分割
単位(CI)に共用データセットの排他制御を行い、そし
て上記データ管理手段(5)が第2分割単位(CA)を分
割処理している間のみ、該第2分割単位(CA)内の第1
分割単位(CI)に対するアクセスを、第2分割単位(C
A)で排他制御することを特徴とする共用データセット
の排他制御方式。
1. A plurality of online terminals, a database (6), a first division unit (CI) as a transfer unit of a data set of the database (6), and the first division unit (C).
Data management means (5) that hierarchically manages by a second division unit (CA) at a higher level than I) and performs exclusive control for each first division unit (CI), and a transaction input from an online terminal. The online processing means (4) is provided with an online processing means (4) for analyzing and controlling access to the shared data set of the database (6).
Normally performs exclusive control of the shared data set in the second division unit (CA) accessed by the transaction and in the first division unit (CI) among them, and the data management means ( 5) the first division within the second division unit (CA) only while the division division processing is being performed on the second division unit (CA).
The access to the division unit (CI) is the second division unit (C
An exclusive control method for shared data sets, which is characterized by exclusive control in A).
JP58124172A 1983-07-08 1983-07-08 Exclusive control method for shared data set Expired - Fee Related JPH0762833B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58124172A JPH0762833B2 (en) 1983-07-08 1983-07-08 Exclusive control method for shared data set

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58124172A JPH0762833B2 (en) 1983-07-08 1983-07-08 Exclusive control method for shared data set

Publications (2)

Publication Number Publication Date
JPS6015755A JPS6015755A (en) 1985-01-26
JPH0762833B2 true JPH0762833B2 (en) 1995-07-05

Family

ID=14878738

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58124172A Expired - Fee Related JPH0762833B2 (en) 1983-07-08 1983-07-08 Exclusive control method for shared data set

Country Status (1)

Country Link
JP (1) JPH0762833B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62145441A (en) * 1985-12-20 1987-06-29 Fujitsu Ltd Updating processing system for key-sequenced data set
JPS63250750A (en) * 1987-04-07 1988-10-18 Nec Corp File access system
JP2734022B2 (en) * 1988-11-09 1998-03-30 日本電気株式会社 Shared file exclusive control method

Also Published As

Publication number Publication date
JPS6015755A (en) 1985-01-26

Similar Documents

Publication Publication Date Title
US7302520B2 (en) Method and apparatus for data storage using striping
CN114328018B (en) Snapshot creation method, computing device and storage medium
JPH04229355A (en) Data access method and data processing system
CN112099908A (en) Virtual machine live migration method, apparatus and computer equipment
CN107704603A (en) A kind of method and device for realizing read and write abruption
JPH0622015B2 (en) Data processing system control method
CN103077196A (en) Access method from public network WEB (World Wide Web) to intranet database
US11288263B2 (en) Change service for shared database object
CN121188060A (en) Database resharding methods, database platforms and computing devices
JPH0762833B2 (en) Exclusive control method for shared data set
CN119166062A (en) Partition management method and device with short write-stop time, electronic device and storage medium
CN116467270B (en) Data management system, data updating method and device
CN120162319A (en) Database snapshot data processing method, device, electronic device, and storage medium
CN114911410B (en) Data storage method, device, equipment and storage medium
JP2830826B2 (en) Distributed file synchronization system and method
JP4286857B2 (en) Internode shared file control method
CN113836366A (en) Data traversal method and device based on embedded system
JPH0456344B2 (en)
CN111510497A (en) Processing method and system for edge storage
JP2787107B2 (en) Buffer control system and device
JPH0337748A (en) External storage accessing system utilizing main storage
CN120803970A (en) Data processing method, apparatus, device, storage medium, and program product
CN120386486A (en) A storage architecture based on multi-dimensional indicators and logical data partitioning
WO2026091611A1 (en) Traffic playback method and apparatus, storage medium, and computer program product
JPH04139545A (en) Data base updating processing system

Legal Events

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