JPH01204161A - Exclusive control system - Google Patents

Exclusive control system

Info

Publication number
JPH01204161A
JPH01204161A JP63027894A JP2789488A JPH01204161A JP H01204161 A JPH01204161 A JP H01204161A JP 63027894 A JP63027894 A JP 63027894A JP 2789488 A JP2789488 A JP 2789488A JP H01204161 A JPH01204161 A JP H01204161A
Authority
JP
Japan
Prior art keywords
index
file
buffer
exclusive control
section
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
JP63027894A
Other languages
Japanese (ja)
Inventor
Hiroaki Makita
槙田 浩明
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 JP63027894A priority Critical patent/JPH01204161A/en
Publication of JPH01204161A publication Critical patent/JPH01204161A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To improve an access multiplication degree by providing index counters in common and local areas respectively and deciding significant index information stored in a buffer when coincidence is obtained between both index counters. CONSTITUTION:When the coincidence is obtained between both values of the index counters 1-1 and 4-1 set in a common area 1 and a local area 2-1, the exclusive control is applied to the significant index information stored in a buffer 5-1 of the area 2-1 and the corresponding blocks of a data part 6-2 and a data file 7 and an access is given to a desired record. As a result, no queuing is produced at an index part 6-1 and the access multiplication degree is improved to the file 7.

Description

【発明の詳細な説明】 〔概要〕 インデックスファイルを参照してデータファイルをアク
セスする場合の排他制御方式に関し、インデックスファ
イルのインデックス部に対する排他制御を行うことなく
、ブロック単位の排他制御を行ってデータファイルに対
するアクセス多重度を向上させることを目的とし、 ローカル域にインデックスファイルのインデックス部を
更新・追加した場合に+1などした値を格納するインデ
ックスカウンタおよび当該インデックス部の内容を格納
するバッファと、共通域にインデックスファイルのイン
デックス部を更新・追加した場合に+1などした値を格
納するインデックスカウンタとを設け、プログラムがデ
ータファイルをアクセスする際に、自己のローカル域の
インデックスカウンタの値と、共通域のインデックスカ
ウンタの値とが一致すると判別した場合に、バッファに
格納されている有効なインデックス情報、およびインデ
ックスファイルのデータ部、データファイルの該当ブロ
ックを排他制御して所望のレコードをアクセスし、一方
、一致しないと判別した場合に、インデックス部から新
たに読み出した内容をバッファに格納した後、この有効
なインデックス情報、およびインデックスファイルのデ
ータ部、データファイルの該当ブロックを排他制御して
所望のレコードをアクセスするように構成する。
[Detailed Description of the Invention] [Summary] Regarding the exclusive control method when accessing a data file by referring to an index file, exclusive control is performed on a block-by-block basis without performing exclusive control on the index part of the index file. The purpose is to improve the multiplicity of accesses to files, and it is common to an index counter that stores a value such as +1 when the index section of an index file is updated or added to the local area, and a buffer that stores the contents of the index section. An index counter that stores a value such as +1 when the index part of an index file is updated or added is provided in the area, and when a program accesses a data file, it stores the value of the index counter in its own local area and the common area. When it is determined that the index counter value of , if it is determined that they do not match, the content newly read from the index section is stored in the buffer, and then this valid index information, the data section of the index file, and the corresponding block of the data file are exclusively controlled and the desired record is stored. Configure to access.

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

本発明は、インデックスファイルを参照してデータファ
イルをアクセスする場合の排他制御方式%式% 〔従来の技術と発明が解決しようとする問題点〕インデ
ックスファイルとデータファイルとからなる第2図に示
すような構造のデータベースを考える。一般に、インデ
ックスファイル21からデータファイル22中のアクセ
スしようとするレコード位置を検索し、データファイル
22の該当する位置のレコードから例えば所望の値を読
み出すようにしている。
The present invention provides an exclusive control method when accessing a data file by referring to an index file. Consider a database with the following structure. Generally, a record position to be accessed in the data file 22 is searched from the index file 21, and, for example, a desired value is read from the record at the corresponding position in the data file 22.

複数のプログラムがこのようなデータベースを共用して
使用する場合、プログラム毎に排他制御が必要となる。
When multiple programs share and use such a database, exclusive control is required for each program.

使用する多重度を上げるには、ファイル単位の排他制御
よりも、ブロック単位の排他制御が有効となる。しかし
、第3図図中斜線を用いて示すように、例えばプログラ
ムXがインデックス部21−1のブロックl、2、デー
タ部21−2のブロック3、およびデータファイル22
のブロック4を排他制御のもとで、ブロック4のレコー
ドに対してアクセスしている場合、他のプログラムYが
データファイル22の他のブロックをアクセスしようと
しても、インデックス部21−1で排他待ちとなってし
まい、ファイル単位の排他制御と、効果は殆ど変わらな
(なってしまう問題点があった。
To increase the degree of multiplicity used, block-based exclusive control is more effective than file-based exclusive control. However, as shown using diagonal lines in FIG. 3, for example, program
If block 4 is under exclusive control and the record in block 4 is being accessed, even if another program Y attempts to access another block in the data file 22, the index section 21-1 will wait for exclusive control. The problem is that the effect is almost the same as exclusive control on a file-by-file basis.

本発明は、インデックスファイルのインデックス部に対
する排他制御を行うことなく、ブロック単位の排他制御
を行ってデータファイルに対するアクセス多重度を向上
させることを目的としている。
An object of the present invention is to improve the multiplicity of accesses to a data file by performing exclusive control on a block-by-block basis without performing exclusive control on the index portion of an index file.

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

第1図を参照して問題点を解決するための手段を説明す
る。
Means for solving the problem will be explained with reference to FIG.

第1図において、インデックスカウンタ1−1、インデ
ックスカウンタ4−i(i=1ないしn)は、インデッ
クス部6−1を更新・追加した場合に+1などした値を
格納するものであって、共通域1あるいはローカル域+
112− iに設けたものである。
In FIG. 1, an index counter 1-1 and an index counter 4-i (i=1 to n) store values incremented by 1 when the index section 6-1 is updated or added, and are common. Area 1 or local area +
112-i.

バッファ5−1 (i=1ないしn)は、インデックス
部6−1の内容を格納などするものである。
The buffer 5-1 (i=1 to n) stores the contents of the index section 6-1.

インデックスファイル6は、検索情報を例えば木構造に
したインデックス部6−1、およびデータファイル7を
ポイントするポインタなどからなるデータ部6−2から
構成されている。
The index file 6 includes an index section 6-1 containing search information in a tree structure, for example, and a data section 6-2 including a pointer pointing to the data file 7.

〔作用〕[Effect]

本発明は、第1図に示すように、インデックスファイル
6のインデックス部6−1を排他制御していないので、
アクセスする毎に例えばローカル域2−1のプログラム
3−1は、自己のローカル域2−1に設けたインデック
スカウンタ4−1の値と、共通域1に設はインデックス
カウンタ1−1の値とを比較し、一致する場合にはバッ
ファ5−1に格納されているインデックス情報が有意で
あると判明するので、このインデックス情報、およびイ
ンデックスファイル6のデータ部6−2、データファイ
ル7の該当ブロックを排他制御して所望のレコードをア
クセスするようにしている。
As shown in FIG. 1, the present invention does not exclusively control the index section 6-1 of the index file 6.
Every time it is accessed, for example, the program 3-1 in the local area 2-1 updates the value of the index counter 4-1 set in its own local area 2-1 and the value of the index counter 1-1 set in the common area 1. If they match, the index information stored in the buffer 5-1 is found to be significant, so this index information, the data part 6-2 of the index file 6, and the corresponding block of the data file 7 The desired record is accessed under exclusive control.

一方、例えばローカル域2−2においては、一致しない
ので、バッファ5−2の内容が無効であり、インデック
スファイル6のインデックス部6−1から読み出した情
報をバッファ5−2に格納すると共に共通域のインデッ
クスカウンタ1−1の値をローカル域2−2のインデッ
クスカウンタ4−2に格納した後、このインデックス情
報、およびインデックスファイル6のデータ部6−2、
データファイル7の該当ブロックを排他制御して所望の
レコードをアクセスするようにしている。
On the other hand, for example, in the local area 2-2, since there is no match, the contents of the buffer 5-2 are invalid, and the information read from the index section 6-1 of the index file 6 is stored in the buffer 5-2, and at the same time, the contents of the buffer 5-2 are invalid. After storing the value of the index counter 1-1 in the index counter 4-2 of the local area 2-2, this index information and the data section 6-2 of the index file 6,
A desired record is accessed by exclusive control of the corresponding block of the data file 7.

従って、インデックス部6−1における待ちが発生する
ことがなく、アクセス多重度を向上させることが可能と
なる。
Therefore, no waiting occurs in the index section 6-1, and it is possible to improve the degree of access multiplicity.

〔実施例〕〔Example〕

次に、第1図を用いて本発明の1実施例の構成図および
動作を順次詳細に説明する。
Next, the configuration diagram and operation of one embodiment of the present invention will be sequentially explained in detail using FIG.

第1図において、共通域lは、ローカル域2−i  (
i”lないしn)に格納されたプログラム3−1が共通
に使用する領域である。
In FIG. 1, the common area l is defined by the local area 2-i (
This area is commonly used by the programs 3-1 stored in i''l to n).

インデックスカウンタ1−1は、共通域1に設けたもの
であって、ローカル域2−1のバッファ5−iに格納さ
れているインデックス情報が有意か否かを判別するため
のものである。一致する場合に、有意と判別される。
The index counter 1-1 is provided in the common area 1 and is used to determine whether the index information stored in the buffer 5-i of the local area 2-1 is significant. If they match, it is determined to be significant.

ローカル域2−iは、プログラム3−iなどを格納する
領域である。
The local area 2-i is an area for storing programs 3-i and the like.

プログラム3−iは、インデックスファイル6を参照し
てデータファイル7の所望のレコードをアクセスなどす
る応用プログラムである。
The program 3-i is an application program that refers to the index file 6 and accesses a desired record of the data file 7.

インデックスカウンタ4−iは、ローカル域2−4に設
けたバッファ5〜iに格納されているインデックス情報
が有意か否かを判別するためのものである。このインデ
ックスカウンタ4−iに格納されている値と、共通域l
に設けたインデフスカウンタ1−1に格納されている値
が一致する場合、有意と判断される。
The index counter 4-i is for determining whether the index information stored in the buffers 5-i provided in the local area 2-4 is significant. The value stored in this index counter 4-i and the common area l
If the values stored in the in-def counter 1-1 provided in the two match, it is determined to be significant.

バッファ5−iは、インデックス部6−1から読み出し
たインデックス情報を格納して保持するものである。
The buffer 5-i stores and holds index information read from the index section 6-1.

インデックスファイル6は、排他制御を行わないインデ
ックス部6−1と、排他制御を行うデータ部6−2とか
ら構成されている。
The index file 6 is composed of an index section 6-1 which is not subject to exclusive control, and a data section 6-2 which is subject to exclusive control.

次に、インデックス部6−1が更新・追加された場合の
動作を、第1図■ないし■に示す順序に従って、詳細に
説明する。尚、インデックス部6−1の更新・追加が発
生するのは、+11インデツクスフアイル6自身の拡張
、(2)インデックスファイル6に対する最大キー値を
持つコードの追加などの事象による。
Next, the operation when the index section 6-1 is updated or added will be described in detail in accordance with the order shown in FIG. Note that updates and additions to the index section 6-1 occur due to events such as expansion of the +11 index file 6 itself and (2) addition of a code with the maximum key value to the index file 6.

第1図において、図中■は、インデックス部6−iのブ
ロックの内容の変更・追加に対応して、インデックスカ
ウンタ1−1.4−1を“+11して図示″2゛にする
ことを表す。これは、プログラム3−1がインデックス
部6−1の内容の変更・追加例えば最大キー値を持つコ
ードをあるブロックに追加した場合、この変更・追加に
対応してバッファ5−1のインデックス情報を更新する
と共に、インデックスカウンタ4−1.1−1に対して
“+1”して図示“2”することを意味している。
In FIG. 1, ■ in the figure indicates that the index counter 1-1.4-1 is increased by "+11" to "2" as shown in the figure in response to changes and additions to the contents of the block of the index section 6-i. represent. This means that when the program 3-1 changes or adds the contents of the index section 6-1, for example, adds a code with the maximum key value to a certain block, the index information of the buffer 5-1 is changed in response to this change or addition. This means that the index counter 4-1.1-1 is updated by "+1" to "2" as shown in the figure.

図中■は、インデックスカウンタ1−1.4−2の値を
比較し、不一致(バッファ5−2の内容が無効)を検出
したことを示す。これは、プログラム3−2がデータフ
ァイル7をアクセスしようとして、前処理としてバッフ
ァ5−2に格納されているインデックス情報が有意か否
かを判別するために、共通域1に設けたインデックスカ
ウンタ1−1の値12″と、自己のローカル域2−2に
設けたインデックスカウンタ4−2の値“1″とを比較
し、不一致(バッファ5−2の内容が無効)を検出した
ことを意味している。
In the figure, ■ indicates that the values of the index counters 1-1 and 4-2 are compared and a mismatch (the contents of the buffer 5-2 are invalid) is detected. This is because when the program 3-2 attempts to access the data file 7, the index counter 1 provided in the common area 1 is used to determine whether or not the index information stored in the buffer 5-2 is significant as a preprocess. -1 value 12" and the value "1" of the index counter 4-2 provided in its own local area 2-2, and a mismatch (the contents of the buffer 5-2 are invalid) is detected. are doing.

図中■は、5空間(当ローカル域2−2)のインデック
ス部バッファ (バッファ5−2)の無効処理を行う。
3 in the figure performs invalidation processing for the index part buffer (buffer 5-2) of space 5 (this local area 2-2).

そして、次の使用の際に、インデノクスファイル6のイ
ンデックス部6−1から最新のインデックス情報を読み
出し、バッファ5−2に格納すると共に、インデックス
カウンタ4−2に対し、共通域lのインデックスカウン
タ1−1の値“2”を格納して等しくさせてお(。
Then, in the next use, the latest index information is read from the index section 6-1 of the index file 6, stored in the buffer 5-2, and the index counter 4-2 of the common area l is read out. Store the value "2" of 1-1 to make them equal (.

以上のように、インデックスファイル6のインデックス
部6−1に対して排他制御を行う代わりに、共通域1お
よびローカル域2−iに夫々インデックスカウンタ1−
1.4−iを設け、両者が一致する場合にバッファ5−
iに格納されているインデックス情報が有意なものと判
別することにより、インデックス部6−1による待ちが
発生することがなく、アクセス多重度を向上させること
が可能となる。
As described above, instead of performing exclusive control on the index section 6-1 of the index file 6, the index counter 1-1 is placed in the common area 1 and the local area 2-i, respectively.
1.4-i is provided, and if both match, buffer 5-i is provided.
By determining that the index information stored in i is significant, the index unit 6-1 does not have to wait, making it possible to improve the multiplicity of accesses.

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

以上説明したように、本発明によれば、インデックスフ
ァイル6のインデックス部6−1に対する排他制御を行
うことなく、共通域1に設けたインデックスカウンタ1
−1およびローカル域2−1に設けたインデックスカウ
ンタ4−iに格納されている両者の値が一致する場合に
該当ローカル域2−1のバッファ5−4に格納されてい
る有意なインデックス情報、およびデータ部6−2、デ
ータファイル7の該当ブロックを排他制御して所望のレ
コードをアクセスする構成を採用しているため、インデ
ックス部6−1における待ちが発生することがなく、デ
ータファイル7に対するアクセス多重度を向上させるこ
とができる。また、インデックス部6−1に対する排他
制御を行わないことによるアクセス速度の向上が図れる
As explained above, according to the present invention, the index counter 1 provided in the common area 1 does not have exclusive control over the index section 6-1 of the index file 6.
-1 and significant index information stored in the buffer 5-4 of the local area 2-1 when both values stored in the index counter 4-i provided in the local area 2-1 match, Since the data section 6-2 and the corresponding block of the data file 7 are exclusively controlled and a desired record is accessed, there is no waiting in the index section 6-1, and the data file 7 is Access multiplicity can be improved. Furthermore, access speed can be improved by not performing exclusive control on the index section 6-1.

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

第1図は本発明の1実施例構成図、第2図はデータベー
ス構造の概念説明図、第3図は従来技術の問題点説明図
を示す。 図中、1は共通域、11,4−iはインデックスカウン
タ、2−1はローカル域、3−iはプログラム、5−1
はバッファ、6はインデックスファイル、6−1はイン
デックス部、6−2はデータ部、7はデータファイルを
表す、ここで、1は1ないしnからなる整数を表す。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a conceptual diagram of a database structure, and FIG. 3 is a diagram illustrating problems in the prior art. In the figure, 1 is a common area, 11, 4-i is an index counter, 2-1 is a local area, 3-i is a program, and 5-1
is a buffer, 6 is an index file, 6-1 is an index portion, 6-2 is a data portion, and 7 is a data file, where 1 represents an integer from 1 to n.

Claims (1)

【特許請求の範囲】 インデックスファイルを参照してデータファイルをアク
セスする場合の排他制御方式において、ローカル域(2
−i)にインデックスファイル(6)のインデックス部
(6−1)を更新・追加した場合に+1などした値を格
納するインデックスカウンタ(4−i)および当該イン
デックス部(6−1)の内容を格納するバッファ(5−
i)と、 共通域(1)にインデックスファイル(6)のインデッ
クス部(6−1)を更新・追加した場合に+1などした
値を格納するインデックスカウンタ(1−1)とを設け
、 プログラム(3−i)がデータファイル(7)をアクセ
スする際に、自己のローカル域(2−i)のインデック
スカウンタ(4−i)の値と、共通域(1)のインデッ
クスカウンタ(1−1)の値とが一致すると判別した場
合に、バッファ(5−i)に格納されている有効なイン
デックス情報、およびインデックスファイル(6)のデ
ータ部(6−2)、データファイル(7)の該当ブロッ
クを排他制御して所望のレコードをアクセスし、一方、
一致しないと判別した場合に、インデックス部(6−1
)から新たに読み出した内容をバッファ(5−i)に格
納した後、この有効なイッデックス情報、およびインデ
ックスファイル(6)のデータ部(6−2)、データフ
ァイル(7)の該当ブロックを排他制御して所望のレコ
ードをアクセスするように構成したことを特徴とする排
他制御方式。
[Claims] In an exclusive control method when accessing a data file by referring to an index file, a local area (2
-i) when the index section (6-1) of the index file (6) is updated or added, the index counter (4-i) that stores the value incremented by 1, etc. and the contents of the index section (6-1) are stored. Buffer to store (5-
i) and an index counter (1-1) that stores a value incremented by 1 when the index section (6-1) of the index file (6) is updated or added to the common area (1), and the program ( When 3-i) accesses the data file (7), it uses the value of the index counter (4-i) of its own local area (2-i) and the index counter (1-1) of the common area (1). If it is determined that the values match, the valid index information stored in the buffer (5-i), the data part (6-2) of the index file (6), and the corresponding block of the data file (7) access the desired record with exclusive control, while
If it is determined that they do not match, the index section (6-1
) is stored in the buffer (5-i), this valid index information, the data part (6-2) of the index file (6), and the corresponding block of the data file (7) are stored in the buffer (5-i). An exclusive control method characterized in that a desired record is accessed under exclusive control.
JP63027894A 1988-02-09 1988-02-09 Exclusive control system Pending JPH01204161A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63027894A JPH01204161A (en) 1988-02-09 1988-02-09 Exclusive control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63027894A JPH01204161A (en) 1988-02-09 1988-02-09 Exclusive control system

Publications (1)

Publication Number Publication Date
JPH01204161A true JPH01204161A (en) 1989-08-16

Family

ID=12233595

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63027894A Pending JPH01204161A (en) 1988-02-09 1988-02-09 Exclusive control system

Country Status (1)

Country Link
JP (1) JPH01204161A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02253449A (en) * 1989-03-28 1990-10-12 Pfu Ltd Simultaneous execution control system for data base

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57172456A (en) * 1981-04-16 1982-10-23 Hitachi Ltd File managinf system for multiplex processor
JPS62209638A (en) * 1986-02-14 1987-09-14 Fujitsu Ltd Managing system for file edition number

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57172456A (en) * 1981-04-16 1982-10-23 Hitachi Ltd File managinf system for multiplex processor
JPS62209638A (en) * 1986-02-14 1987-09-14 Fujitsu Ltd Managing system for file edition number

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02253449A (en) * 1989-03-28 1990-10-12 Pfu Ltd Simultaneous execution control system for data base

Similar Documents

Publication Publication Date Title
US7958091B2 (en) Method for fast bulk loading data into a database while bypassing exit routines
CN111651424B (en) Data processing method, device, data node and storage medium
US6424970B1 (en) Sorting system and method executed by plural computers for sorting and distributing data to selected output nodes
JPH07104810B2 (en) Shared file access control method
JPH01204161A (en) Exclusive control system
JPH0456344B2 (en)
JPH05189286A (en) Disk cache control system and control method
JPH04112253A (en) Data accessing method using multilayer buffer
JPH0782451B2 (en) Database management system
JPH0744426A (en) File system file management method
JPS63285631A (en) Updating and processing system for index file
JPS62145441A (en) Updating processing system for key-sequenced data set
JP2748986B2 (en) Buffer management method
JPH0474232A (en) Multi-task computer
JPH08328929A (en) Database partition management system
JPS61278932A (en) Method of processing data addition
JPH0816369A (en) Method and system for clustering
JP2891815B2 (en) Media name management method for loosely coupled systems
JP2507399B2 (en) Database equipment
JPH0679282B2 (en) Buffer management method
JPH0266645A (en) Network data base
JPH02280242A (en) Access system for index file
JPH03276238A (en) Record control system
JPH05204729A (en) Data base access system
JPH025153A (en) Data base record format conversion system