JPH0713840A - Exclusive control method in parallel data access system - Google Patents

Exclusive control method in parallel data access system

Info

Publication number
JPH0713840A
JPH0713840A JP5156907A JP15690793A JPH0713840A JP H0713840 A JPH0713840 A JP H0713840A JP 5156907 A JP5156907 A JP 5156907A JP 15690793 A JP15690793 A JP 15690793A JP H0713840 A JPH0713840 A JP H0713840A
Authority
JP
Japan
Prior art keywords
data
access
data storage
exclusive control
mode
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
JP5156907A
Other languages
Japanese (ja)
Inventor
Kosaku Yamahira
耕作 山平
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP5156907A priority Critical patent/JPH0713840A/en
Publication of JPH0713840A publication Critical patent/JPH0713840A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress a deadlock to nearly the same degree with processing by a single processor by deciding one access request as a wait or access error when both access requests are in a combination of update and update, or update and reference. CONSTITUTION:Only when data storage areas 1a-1e to be accessed which are specified by access requests from two users overlap with one another at >=2 places as to data in one list format or file format, data to be accessed are locked before an access process request is sent to processors 3a-3e which access the data storage areas 1a-1e. Then one of them is decided as a wait or access error. Consequently, the number of the data areas 1a-1e that two users to >=2 of the data storage areas 1a-1e by the two users is no caused.

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 in a parallel data access system such as a database management system which uses a plurality of processors in parallel.

【0002】[0002]

【従来の技術】従来、複数のプロセサを並列に使用する
データベース管理システムとして、図8に示すように、
データ格納領域1a〜1nを設けた複数のディスク装置
にそれぞれ対応し、各データ格納領域1a〜1nに対す
るデータの格納および読出しを行うデータアクセス部2
a〜2nを備えた複数のプロセサ3a〜3nを設け、こ
れらのプロセサ3a〜3nをネットワーク3で接続した
うえ、さらにネットワーク内の複数のユーザからのアク
セス要求に対する排他制御を行うグローバル排他制御部
5を備えたプロセッサ6と、ユーザからのアクセス要求
を解析し、データ格納領域1a〜1nを並列にアクセス
可能な要求であれば複数の処理に分割し、アクセス対象
のディスク装置に対応したプロセッサ1a〜1nにネッ
トワーク4を通じて送信し、またプロセッサ1a〜1n
によるアクセス結果を併合してユーザに送信する処理の
分割・併合部7を備えたプロセッサ8と、排他制御用の
ディクショナリ管理部9を備えたプロセッサ10を設
け、これらのプロセッサ6,8,10をネットワーク4
に接続し、ネットワーク内の複数のユーザからのアクセ
ス要求に応じたデータをデータ格納領域1a〜1nから
読出したり、書き込んだりするシステムがある。
2. Description of the Related Art Conventionally, as a database management system using a plurality of processors in parallel, as shown in FIG.
A data access unit 2 that corresponds to a plurality of disk devices provided with data storage areas 1a to 1n and stores and reads data in and from the respective data storage areas 1a to 1n.
A global exclusion control unit 5 that provides a plurality of processors 3a to 3n including a to 2n, connects the processors 3a to 3n with the network 3, and further performs exclusive control for access requests from a plurality of users in the network. Of the access request from the user, the data storage areas 1a to 1n are divided into a plurality of processes if the request can be accessed in parallel, and the processors 1a to 1n corresponding to the disk device to be accessed are analyzed. 1n through the network 4 and also the processors 1a-1n
A processor 8 having a dividing / merging unit 7 for merging and transmitting the access result by the user and a processor 10 having a dictionary management unit 9 for exclusive control are provided. Network 4
There is a system that is connected to the network and reads or writes data from the data storage areas 1a to 1n according to access requests from a plurality of users in the network.

【0003】図9は、ディクショナリ管理部9に登録さ
れている排他制御管理テーブル90の従来構成を示す図
であり、1a〜1nのデータをファイル単位または表単
位で更新する場合に使用する排他モードX、ファイル単
位または表単位で参照する場合に使用する共用モード
S、ファイルとその中のページあるいはページ中のレコ
ード、あるいは表中の行などのように階層構造でデータ
を更新する場合に上位のファイルまたは表に対して意図
的にロックをかける意図的排他モードIX、同じく参照
する場合に上位のファイルまたは表に対して意図的にロ
ックをかける意図的参照モードIS、参照中のファイル
または表の中のページまたは行を更新する場合に使用す
る共用意図的排他モードSIXが設けられている。
FIG. 9 is a diagram showing a conventional configuration of an exclusive control management table 90 registered in the dictionary management unit 9, which is an exclusive mode used when updating data 1a to 1n in file units or table units. X, a sharing mode S used when referencing in file units or table units, a higher level when updating data in a hierarchical structure such as files and pages in them, records in pages, or rows in tables Intentional exclusion mode IX that intentionally locks a file or table, intentional reference mode IS that intentionally locks a higher-level file or table when referring to the file or table being referred to A shared intentional exclusive mode SIX is provided for use when updating a page or row within.

【0004】この管理テーブル90によれば、データ格
納領域1a〜1nのデータを参照する場合には共用モー
ドSのロックを、データを更新する場合には排他モード
Xのロックを掛ける。そして、共用モードSのロックを
掛けたユーザ同士は同時実行を許し、共用モードSと排
他モードX及び排他モードX同士の組合せは、同時実行
を許さない。これにより、更新中の不正なデータを他ユ
ーザが参照又は更新したり、参照中のデータが不当に他
ユーザによって更新されることを防ぐ。
According to the management table 90, the shared mode S is locked when referring to the data in the data storage areas 1a to 1n, and the exclusive mode X is locked when updating the data. Then, the users who have locked the shared mode S allow the simultaneous execution, and the combination of the shared mode S and the exclusive mode X and the exclusive modes X does not allow the simultaneous execution. This prevents other users from referencing or updating the unauthorized data being updated, or preventing the referenced data from being unduly updated by another user.

【0005】また、アクセスするデータを階層的に管理
する、すなわち、ファイル、ファイル中のページ及びペ
ージ中のレコードのように、2階層以上でデータの排他
を管理するシステムでは、上位のファイルという単位で
データをアクセスする場合には、前述のとおり共用モー
ドS又は排他モードXのロックを掛けるが、下位のペー
ジという単位でデータをアクセスする場合には、参照な
らば最初にその上位のファイルに意図的共用モードIS
でロックを掛けてから該当ページに共用モードSのロッ
クを掛け、更新ならば最初にその上位のファイルに意図
的排他モードIXでロックを掛けてから該当ページに排
他モードXのロックを掛ける。
Further, in a system for managing access data hierarchically, that is, for managing exclusion of data in two or more layers such as a file, a page in a file and a record in a page, a unit called an upper file. When accessing data with, the shared mode S or exclusive mode X is locked as described above. However, when accessing data in units of lower pages, if it is a reference, it is intended to the upper file first. Sharing mode IS
After locking the page with the shared mode S, if the page is updated, first lock the upper file with the intentional exclusive mode IX and then lock the page with the exclusive mode X.

【0006】そして、意図的共用モードIS又は意図的
排他モードIX間の組合せは、同時実行を許し、意図的
共用モードISと排他モードX、及び意図的排他モード
IXと共用モードS又は排他モードXの組合せは同時実
行を許さない。これにより、あるユーザがファイル(ま
たは表)という単位でデータをアクセスする場合に、そ
のファイル(または表)中のすべてのページ(または
行)にロックを掛けなくても、ページ(または行)とい
う単位でアクセスする他のユーザとの間の排他制御を実
現できるので、異なる階層間の排他制御を効率良く行う
ことができる。
The combination of the intentional shared mode IS or the intentional exclusive mode IX permits simultaneous execution, and the intentional shared mode IS and the exclusive mode X, and the intentional exclusive mode IX and the shared mode S or the exclusive mode X. Does not allow simultaneous execution. This allows a user to access data in the unit of a file (or table), even if all pages (or rows) in the file (or table) are not locked. Since exclusive control with other users who access in units can be realized, exclusive control between different layers can be efficiently performed.

【0007】また、現在参照中のファイルまたは表の中
の一部のページまたは行を更新する場合は、更新対象の
ページまたは行に意図的排他モードIXを掛け、更新対
象領域の排他制御を行う。
When updating a part of pages or rows in the file or table currently being referred to, the page or row to be updated is subjected to the intentional exclusion mode IX to perform exclusive control of the area to be updated. .

【0008】ここで、ファイルはデータのアクセス単位
のうち最も大きな単位を示し、ファイル中のページはそ
の一部の単位を示し、ページ中のレコードは最少単位を
示すものである。
Here, the file represents the largest unit of data access units, the page in the file represents a part of the unit, and the record in the page represents the smallest unit.

【0009】また、表はリレーショナルデータベースに
使用されるデータのアクセス単位のうち最も大きな単位
を示し、上記ファイルに相当する。さらに、表中のペー
ジはその一部の単位を示し、ページ中の行はその一部の
単位を示し、行は上記レコードに相当する。
The table shows the largest unit of access to data used in the relational database and corresponds to the above file. Further, the pages in the table show some of the units, the rows in the page show some of the units, and the rows correspond to the above records.

【0010】なお、このような排他制御方法について
は、ディー・ビー・ツー デザインアンド ディベロッ
プメント ガイド(1988年6月)第101ページか
ら第117ページ(DB2 Design & Development Guide(Ju
ne,1988)(Gabrielle Wiorkowski,David Kull)pp101-11
7)で論じられている。
For such an exclusive control method, refer to the DB2 Design & Development Guide (Ju2), page 101 to page 117 of the DB2 Design and Development Guide (June 1988).
ne, 1988) (Gabrielle Wiorkowski, David Kull) pp101-11
7).

【0011】図10は、図10のような排他制御管理テ
ーブル90によって排他制御を行う場合の分割・併合部
7の処理を示すフローチャートであり、図11はグロー
バル排他制御部5の処理を示すフローチャートである。
以下、これらのフローチャートを用いて従来の排他制御
方法について説明する。
FIG. 10 is a flowchart showing the processing of the division / merge unit 7 when exclusive control is performed by the exclusive control management table 90 as shown in FIG. 10, and FIG. 11 is a flowchart showing the processing of the global exclusive control unit 5. Is.
Hereinafter, the conventional exclusive control method will be described with reference to these flowcharts.

【0012】なお、ディスク装置1a〜1nには、例え
ば1つの表形式の表データが分割して格納されているも
のとする。
It is assumed that the disk devices 1a to 1n store, for example, one tabular table data in a divided manner.

【0013】まず、処理の分割・併合部7はは、ネット
ワーク4を通じてユーザからのアクセス要求を受けたな
らば、そのアクセス要求を解析し、ネットワーク4を使
用してディクショナリ管理部9から表データの格納場所
などに関する情報を受け取り(ステップS1,S2)、
アクセス要求を並列に実行可能な複数の処理に分割し、
ネットワーク4を使用してグローバル排他制御部5に対
し、ロック要求を発行する(ステップS3)。
First, when the processing division / merge unit 7 receives an access request from a user through the network 4, it analyzes the access request and uses the network 4 to extract table data from the dictionary management unit 9. Receives information about the storage location (steps S1 and S2),
Divide the access request into multiple processes that can be executed in parallel,
A lock request is issued to the global exclusive control unit 5 using the network 4 (step S3).

【0014】例えば、ユーザからのアクセス要求をデー
タ格納領域1aに格納されている表データ中の第1ペー
ジの参照要求と第2ページの参照要求とに分割した場
合、第1ページおよび第2ページの表データのそれぞれ
に対して意図的共用モードISのロックをかけるように
ロック要求を発行する。
For example, when the access request from the user is divided into a reference request for the first page and a reference request for the second page in the table data stored in the data storage area 1a, the first page and the second page. Issue a lock request to lock the respective intentional sharing mode IS for each of the table data of.

【0015】グローバル排他制御部5は、このロック要
求に対し図9の管理テーブル90に従って第1ページお
よび第2ページの表データがアクセス可能であるか否か
を判定し(図11のステップS10)、アクセス可能で
あれば、アクセスを許し(図11のステップS11)、
ネットワーク4を通じてデータ格納領域1aが接続され
ているプロセッサ3aのデータアクセス部2aを制御
し、第1ページおよび第2ページの表データのそれぞれ
に対して意図的共用モードISのロックをかける。
In response to this lock request, the global exclusive control unit 5 determines whether or not the table data of the first page and the second page can be accessed according to the management table 90 of FIG. 9 (step S10 of FIG. 11). If access is possible, access is permitted (step S11 in FIG. 11),
The data access unit 2a of the processor 3a, to which the data storage area 1a is connected via the network 4, is controlled to lock the table data of the first page and the second page in the intentional sharing mode IS.

【0016】しかし、既に他のユーザが更新モードXで
アクセス中であった場合には、アクセスを許可せず、第
1ページおよび第2ページの表データに対するアクセス
要求を他のユーザのアクセスが終了するまで待機させる
か、またはエラーとして要求元のユーザに返信する(ス
テップS12)。
However, if another user is already accessing in the update mode X, the access is not permitted and the access request for the table data of the first page and the second page is completed by the other user. Or waits until the request is made or returns an error to the requesting user (step S12).

【0017】アクセス可能であった場合、分割・併合部
7は、データ格納領域1aが接続されているプロセッサ
3aのデータアクセス部2aに対して、第1ページおよ
び第2ページの表データの読出し処理要求を送る(ステ
ップS4)。
When it is accessible, the division / merge unit 7 reads out the table data of the first page and the second page from the data access unit 2a of the processor 3a to which the data storage area 1a is connected. Send the request (step S4).

【0018】この読出し要求に対し、データアクセス部
2aは第1ページおよび第2ページの表データを読出
し、ネットワーク4を通じて分割・併合部7に返信す
る。
In response to this read request, the data access unit 2a reads the table data of the first page and the second page and sends it back to the division / merge unit 7 through the network 4.

【0019】分割・併合部7は、送られて来た第1ペー
ジおよび第2ページの表データを併合し、アクセス要求
を行ったユーザに送信する(ステップS5)。
The dividing / merging unit 7 merges the sent table data of the first page and the second page, and transmits the table data to the user who has made the access request (step S5).

【0020】なお、図10中の波線は、他の排他モード
の場合を省略していることを示すものである。
The broken line in FIG. 10 indicates that the case of other exclusive modes is omitted.

【0021】[0021]

【発明が解決しようとする課題】ところが、上記従来の
排他制御方法にあっては、1つのデータアクセス要求が
分割されて複数のプロセサで並列に処理される場合につ
いて配慮がされておらず、このような条件下では単位時
間当りの待ちの発生確率が高いということの他に、1つ
の要求で発生する可能性のある待ちの最大数は「1」で
はなく、処理の分割数であり、デッドロックの発生確率
が高くなるという問題がある。
However, in the above-mentioned conventional exclusive control method, no consideration is given to the case where one data access request is divided and processed in parallel by a plurality of processors. Under such a condition, the probability of waiting occurrence per unit time is high, and the maximum number of waitings that can occur in one request is not "1", but the number of divisions of processing, There is a problem that the probability of lock generation becomes high.

【0022】また、デッドロックの発生確率が高いとい
うことは、デッドロックが発生すると、片方の要求を取
消し、その要求のためにデータに対して行った処理を元
に戻す必要があることになるので、システムの性能が低
下するという問題を引き起こす。
The high probability of deadlock means that when a deadlock occurs, it is necessary to cancel one of the requests and restore the processing performed on the data due to the request. Therefore, it causes a problem that the system performance is degraded.

【0023】本発明の目的は、1つのデータアクセス要
求を分割して複数のプロセサで並列に処理することによ
って発生し易くなるデッドロックを単一のプロセサで処
理する場合と同程度に抑えることができる並列データア
クセスシステムにおける排他制御方法を提供することで
ある。
An object of the present invention is to suppress deadlock, which tends to occur when one data access request is divided and processed in parallel by a plurality of processors, to the same extent as when a single processor is processed. It is to provide an exclusive control method in a parallel data access system that can be performed.

【0024】[0024]

【課題を解決するための手段】本発明は上記目的を達成
するために、1つの表形式またはファイル形式のデータ
を分割して格納した複数の格納手段と、ユーザからのア
クセス要求に応じて前記格納手段に格納されたデータに
対し並列にアクセスする複数のプロセッサとから成る並
列データアクセスシステムにおいて、1つの表形式また
はファイル形式のデータに関して2つのユーザからのア
クセス要求で指定されるアクセス対象のデータ格納領域
が2ヵ所以上重なる場合のみ、そのデータ格納領域をア
クセスするプロセッサに対してアクセス処理要求を発行
する前に、アクセス対象のデータに対してロックを行
い、両アクセス要求が更新同士又は更新と参照の組合せ
の場合は、一方のアクセス要求を待機またはアクセスエ
ラーとするものである。
In order to achieve the above object, the present invention provides a plurality of storage means for storing data in one table format or a file format in a divided manner, and the storage means according to an access request from a user. In a parallel data access system including a plurality of processors that access data stored in storage means in parallel, access target data specified by access requests from two users regarding one table format or file format data Only when two or more storage areas overlap, lock the data to be accessed before issuing an access processing request to the processor that accesses the data storage area. In the case of the reference combination, one of the access requests is made to wait or an access error. .

【0025】[0025]

【作用】一般に、ロックをかけるデータ格納領域が2つ
以上あり、それらにロックをかける順序が互いに逆にな
る場合には、デッドロックが発生する。複数のデータ格
納領域を複数のプロセッサで並列にアクセスしてロック
を掛ける場合に、並列性を失わずに、それらのデータ格
納領域にロックをかける順序を複数ユーザ間で一致させ
ることは非常に困難である。
In general, when there are two or more data storage areas to be locked and the order of locking them is opposite to each other, a deadlock occurs. When multiple data storage areas are accessed in parallel by multiple processors and locked, it is very difficult to match the order of locking those data storage areas among multiple users without losing parallelism. Is.

【0026】そこで、2ユーザ間で1つの表形式または
ファイル形式のデータに関して並列にアクセスするデー
タ格納領域が2ヵ所以上重なる場合には、各プロセッサ
にアクセス処理要求を行う前に、その表形式またはファ
イル形式のデータに対してロックを掛け、そのうちの一
方を待機またはアクセスエラーとする。
Therefore, when two or more data storage areas that are accessed in parallel for one table format or file format data overlap each other, the table format or the data storage area before the access processing request is issued to each processor. Lock the data in the file format and set one of them as a wait or access error.

【0027】これにより、2ユーザ間で同時にアクセス
するデータ格納領域は1つ以下になるので、2ユーザ間
で2つ以上のデータ格納領域を並列にアクセスすること
に起因するデッドロックは発生しなくなる。
As a result, the number of data storage areas that can be simultaneously accessed by two users is one or less, so that deadlock caused by accessing two or more data storage areas in parallel between two users does not occur. .

【0028】[0028]

【実施例】以下、本発明を図示する実施例に基づいて詳
細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to illustrated embodiments.

【0029】図1は、本発明の一実施例を示す概略構成
図であり、1つの表11のデータが各プロセッサ3a〜
3eが管理する複数のデータ格納領域1a〜1eに分割
されて格納されている。なお、この実施例の詳細構成は
図8と同様である。但し、ディクショナリ管理部9の排
他制御管理テーブルの構成が異なる。
FIG. 1 is a schematic block diagram showing an embodiment of the present invention, in which one table 11 of data corresponds to each processor 3a.about.
The data is divided and stored in a plurality of data storage areas 1a to 1e managed by 3e. The detailed configuration of this embodiment is similar to that of FIG. However, the structure of the exclusive control management table of the dictionary management unit 9 is different.

【0030】この実施例は、複数のプロセッサ3a〜3
eのデータアクセス部2a〜2eにより表11に対する
アクセスを並列に処理するシステムにおいて、2ユーザ
間で1つの表11に関して並列にアクセスするデータ格
納領域が2ヵ所以上重なる場合のみ、排他モードの組合
せにより、それらのユーザ間の同時実行を許さない排他
制御をグローバル排他制御部5が処理の分割・併合部7
からの要求に基づいて行うことに特徴がある。
In this embodiment, a plurality of processors 3a-3
In the system in which the access to the table 11 is performed in parallel by the data access units 2a to 2e of e, the exclusive mode is combined only when two or more data storage areas that are accessed in parallel with respect to one table 11 overlap each other. , The global exclusive control unit 5 performs the exclusive control that does not allow simultaneous execution between these users by the process division / merge unit 7.
The feature is that it is performed based on the request from.

【0031】すなわち、「USER4」と「USER
7」はアクセス対象のデータ格納領域が、データ格納領
域1bと1cの2ヵ所で重なっている。そこで、それら
のアクセスが更新同士、又は更新と参照の場合には、
「USER4」と「USER7」の同時実行を許さな
い。
That is, "USER4" and "USER"
7 ”, the data storage areas to be accessed overlap at two locations, the data storage areas 1b and 1c. So, if those accesses are updates, or updates and references,
Do not allow simultaneous execution of "USER4" and "USER7".

【0032】同様に、「USER5」と「USER7」
もアクセス対象のデータ格納領域が、データ格納領域1
cと1dの2ヵ所で重なっているので、更新同士、又は
更新と参照の場合には同時アクセスを許さない。
Similarly, "USER5" and "USER7"
Also, the data storage area to be accessed is the data storage area 1
Since it overlaps at 2 places of c and 1d, simultaneous access is not allowed between updates or in the case of update and reference.

【0033】しかし、その他の2ユーザの組合せでは、
アクセスするデータ格納領域の重なりが1ヵ所以下であ
るので、従来の排他制御を使用して同時実行を許す。
However, in the other two user combinations,
Since the data storage areas to be accessed overlap at one place or less, simultaneous execution is permitted by using the conventional exclusive control.

【0034】図2は、データ格納領域1a〜1eに格納
されるデータ構造の例を示すもので、表11は、複数の
データ格納領域1a〜1eにに分割して格納される。こ
れは、並列データアクセスシステムにおける並列処理の
性能を上げるためである。
FIG. 2 shows an example of the data structure stored in the data storage areas 1a to 1e, and the table 11 is divided and stored in a plurality of data storage areas 1a to 1e. This is to improve the performance of parallel processing in the parallel data access system.

【0035】表11は、複数の行12から構成され、複
数のユーザの同時実行性を向上させるために、表11よ
り小さな行12などの単位で排他制御を行う。
The table 11 is composed of a plurality of rows 12, and in order to improve the simultaneous executability of a plurality of users, exclusive control is performed in units of rows 12 smaller than the table 11.

【0036】図3は、グローバル排他制御部5がロック
状態を管理している制御ブロックのデータ構造を示すも
ので、どのユーザがどのリソースにロックをかけている
という現在の状態を管理するために使用する。
FIG. 3 shows the data structure of the control block in which the global exclusive control unit 5 manages the locked state. In order to manage the current state in which which user has locked which resource. use.

【0037】そこで、制御ブロックのエントリ13に
は、ユーザ識別子130、リソース種別131、リソー
ス識別子132、ロックモード133などの情報を持
つ。また、ユーザごとのロック情報のサーチやリソース
ごとのロック情報のサーチを容易に行うためのポインタ
134,135を持っている。
Therefore, the entry 13 of the control block has information such as the user identifier 130, the resource type 131, the resource identifier 132, and the lock mode 133. Further, it has pointers 134 and 135 for easily searching the lock information for each user and the lock information for each resource.

【0038】この実施例では、特に、ロック状態管理制
御ブロックにアクセス領域指示情報を持つフィールド1
36を付加している。
In this embodiment, in particular, the field 1 having the access area instruction information in the lock state management control block
36 is added.

【0039】図4は、本実施例における排他モード間の
関係を定義した排他制御管理テーブル14の内容を示す
ものであり、図5は分割・併合部の処理フローを、図6
はグローバル排他制御部5の処理フローを示すものであ
る。また、図7はアクセス領域指示情報136が2ヵ所
以上重なるかどうかの判定方法を示すものである。
FIG. 4 shows the contents of the exclusive control management table 14 which defines the relationship between the exclusive modes in this embodiment, and FIG. 5 shows the processing flow of the division / merge unit in FIG.
Shows a processing flow of the global exclusive control unit 5. Further, FIG. 7 shows a method of determining whether or not the access area instruction information 136 overlaps at two or more places.

【0040】以下、これらの図を参照して排他制御方法
を説明する。但し、従来と同一部分は説明を省略し、異
なる部分についてのみ説明する。
The exclusive control method will be described below with reference to these drawings. However, description of the same parts as the conventional one will be omitted, and only different parts will be described.

【0041】まず、この実施例における排他制御管理テ
ーブル14は、新しい排他モードとして、条件つき排他
モードCX、及び条件つき共用モードCSを設け、表1
1の2ヵ所以上のデータ格納領域をアクセスする場合に
は、その表11に対して、その表中のアクセスするデー
タ格納領域を示す情報136を指定して、条件つき排他
モードCX(以下、CXモード)又は条件つき共用モー
ドCS(以下、CSモード)でロックをかける(ステッ
プS20,S21)。
First, the exclusive control management table 14 in this embodiment is provided with a conditional exclusive mode CX and a conditional shared mode CS as new exclusive modes.
In the case of accessing two or more data storage areas of No. 1, for the table 11, information 136 indicating the data storage area to be accessed in the table is specified, and the conditional exclusive mode CX (hereinafter, CX) is specified. Mode) or conditional shared mode CS (hereinafter, CS mode) is locked (steps S20 and S21).

【0042】詳しくは、5つのデータ格納領域1a〜1
eがあり、例えばデータ格納領域1b,1dを並列にア
クセスする場合、そのデータ格納領域1b,1dをアク
セスするプロセッサ2b,2dに対してアクセス処理要
求を発行する前に、アクセス対象のデータに対してCX
モード又はCSモードでロックをかけ、さらにデータ格
納領域1b,1dに対応したビットが“1”の「010
10」というビット列から成るアクセス領域指示情報1
36を指定し、この情報136をグローバル排他制御部
5に送信する。
Specifically, the five data storage areas 1a to 1
For example, when the data storage areas 1b and 1d are accessed in parallel, before the access processing request is issued to the processors 2b and 2d that access the data storage areas 1b and 1d, the data to be accessed is accessed. CX
Mode or CS mode is locked, and the bit corresponding to the data storage areas 1b and 1d is "010" of "010".
Access area instruction information 1 consisting of a bit string "10"
36 is designated, and this information 136 is transmitted to the global exclusive control unit 5.

【0043】すると、グローバル排他制御部5は、新た
にかけるロックがCXモードで、かつ既にかかっている
ロックがCXモード又はCSモードの場合、及び新たに
かけるロックがCSモードで、既にかかっているロック
がCXモードの場合には、それらのアクセスするデータ
格納領域を示すアクセス領域指示情報136を比較し、
2ヵ所以上の重なりがあるかどうかを判定する(ステッ
プS31,32)。
Then, the global exclusive control unit 5 has already taken the lock when the newly applied lock is in the CX mode and the already applied lock is in the CX mode or the CS mode, and when the newly applied lock is in the CS mode. When the lock is in the CX mode, the access area instruction information 136 indicating the data storage areas to be accessed is compared,
It is determined whether or not there are two or more overlaps (steps S31 and S32).

【0044】この結果、2ヵ所以上の重なりがある場合
には待ち又は排他エラーとし、一方のアクセスのみを許
可する(ステップS34)。
As a result, if there are two or more overlaps, a wait or exclusive error is determined and only one access is permitted (step S34).

【0045】例えば、図1の「USER4」のアクセス
要求は分割・併合部7で分割されてデータ格納領域1
b,1cをアクセスするように分割され、「USER
5」のアクセス要求は分割・併合部7で分割されてデー
タ格納領域1c,1d,1eをアクセスするように分割
され、「USER7」のアクセス要求は分割併・合部7
で分割されてデータ格納領域1b,1c,1dをアクセ
スするように分割されている。
For example, the access request of "USER4" in FIG. 1 is divided by the dividing / merging unit 7 to be divided into the data storage area 1
It is divided to access b, 1c, and "USER
The access request "5" is divided by the division / merge unit 7 to access the data storage areas 1c, 1d, 1e, and the access request "USER7" is divided / merge unit 7.
The data storage areas 1b, 1c, and 1d are divided by.

【0046】従って、「USER4」と「USER7」
とではアクセス対象のデータ格納領域が符号Aで示すよ
うにデータ格納領域1cと1dの2ヵ所で重なってお
り、同様に、「USER5」と「USER7」との間で
も符号Bで示すようにデータ格納領域1cと1dの2ヵ
所で重なってでいる。
Therefore, "USER4" and "USER7"
In and, the data storage area to be accessed overlaps at two locations of the data storage areas 1c and 1d as indicated by the symbol A, and similarly, as shown by the symbol B between “USER5” and “USER7”, The storage areas 1c and 1d overlap at two places.

【0047】そこで、このような場合、アクセス内容が
更新同士、又は更新と参照の場合には同時アクセスを許
さない。
Therefore, in such a case, simultaneous access is not permitted when the access content is between updates or between update and reference.

【0048】しかし、2ヵ所以上の重なりがなく1ヵ所
である場合は、従来と同様に処理する(ステップS3
3)。
However, in the case where there is no overlap in two or more places and there is one place, the processing is performed as in the conventional case (step S3).
3).

【0049】この場合、2つのアクセス領域指示情報が
2ヵ所以上重なっているかどうかの判定は、図7に示す
ように、それらのビット列のビット演算の論理和(対応
する各ビットごとの論理和)を求め(S61)、その論
理和のビット列中の値が“1”のビットの数が2以上で
あるかどうかを判定することによって行うことができ
る。
In this case, it is determined whether or not the two access area designation information overlaps at two or more places, as shown in FIG. 7, as the logical sum of bit operations of these bit strings (corresponding logical sum of each bit). Can be performed (S61) and it is determined whether or not the number of bits whose value in the bit string of the logical sum is "1" is 2 or more.

【0050】また、値が“1”のビットの数の求め方
は、そのビット列中の各ビットごとにそれぞれの値が
“1”かどうかを調べていき、値が“1”のビットの数
を数える。特定のビットの値が“1”かどうかを調べる
ためには、その特定のビットに対応するビットの値だけ
が“1”で、他のビットの値がすべて“0”であるよう
なビット列を作成し、そのビット列と調べるビット列と
のビット演算の論理積を求めればよい。
To determine the number of bits having a value of "1", the number of bits having a value of "1" is checked by checking whether each value in the bit string is "1". Count. In order to check whether the value of a specific bit is "1", a bit string in which only the value of the bit corresponding to the specific bit is "1" and the values of other bits are "0" is used. It is sufficient to create a logical product of bit operations of the created bit string and the bit string to be examined.

【0051】ただし、図7の例では、調べるビット列を
“0”から(n−1)までの各値に対して順に、それら
のビット数分右へシフトした結果(S62)と値“1”
とのビット演算の論理積を求め(S63)、それらの論
理積の結果を加算していくことにより(S64)、値が
“1”のビットの数Sを求めている。
However, in the example of FIG. 7, the bit string to be examined is sequentially shifted to the right by the number of bits for each value from "0" to (n-1) (S62) and the value "1".
The logical product of bit operations with and is obtained (S63), and the results of these logical products are added (S64) to obtain the number S of bits having a value of "1".

【0052】ここで、nは、ビット列全体のビット数と
する。なお、表11に対する排他制御をグローバル排他
制御部5で行わずに、各データアクセス部2a〜2e内
部のローカルな排他制御で代替するシステム、すなわ
ち、表11に排他を掛ける必要があるとき、データ格納
領域1a〜1eに分割されたその表の部分のそれぞれに
対して各データアクセス部2a〜2eが排他を掛けるこ
とにより代替するシステムでは、ステップS3の処理は
不要であり、図4の排他制御管理テーブル14は、CX
モードとCSモードの部分だけでよい。
Here, n is the number of bits of the entire bit string. It should be noted that a system in which the exclusive control for the table 11 is not performed by the global exclusive control unit 5 but the local exclusive control inside each of the data access units 2a to 2e is an alternative, that is, when the table 11 needs to be locked, In the system in which the data access units 2a to 2e substitute the respective parts of the table divided into the storage areas 1a to 1e for exclusion, the process of step S3 is unnecessary, and the exclusive control of FIG. The management table 14 is CX
Only the mode and CS mode parts are required.

【0053】また、並列に実行中の処理が一つの処理を
残し、残りがすべて終了した場合には、処理の分割・併
合部7は、CXモード若しくはCSモードでかけていた
ロックをIXモード若しくはISモードに変更する(又
は、解除する)ことにより、そういう場合の同時実行性
を上げることができる。
When the processes being executed in parallel leave one process and all the remaining processes are completed, the division / merging unit 7 of the process locks the lock in the CX mode or the CS mode with the IX mode or the IS mode. By changing (or canceling) the mode, concurrency in such cases can be improved.

【0054】処理の分割・併合部7は、ネットワーク上
4を使用して各データアクセス部2a〜2eに処理要求
を出すとき、どのプロセッサ(2a〜2e)上のデータ
アクセス部(2a〜2e)に要求を出したか、処理終了
通知を受け取ったかを管理しておく必要があり、その情
報から各データアクセス部(2a〜2e)の処理の終了
状況を容易に知ることができる。
When the processing division / merging unit 7 uses the network 4 to issue a processing request to each of the data access units 2a to 2e, the data access unit (2a to 2e) on which processor (2a to 2e) is to be processed. It is necessary to manage whether the request has been issued to the server or whether the processing end notification has been received, and it is possible to easily know the processing end status of each data access unit (2a to 2e) from the information.

【0055】なお、上記実施例においては表形式のデー
タを分割して格納した例を挙げて説明したが、ファイル
形式のデータについても同様に処理することができるこ
とは言うまでもない。
In the above embodiment, an example in which tabular data is divided and stored has been described, but it goes without saying that file format data can be processed in the same manner.

【0056】[0056]

【発明の効果】以上説明したように本発明においては、
1つの表形式またはファイル形式のデータに関して2つ
のユーザからのアクセス要求で指定されるアクセス対象
のデータ格納領域が2ヵ所以上重なる場合のみ、そのデ
ータ格納領域をアクセスするプロセッサに対してアクセ
ス処理要求を発行する前に、アクセス対象のデータに対
してロックを行い、両アクセス要求が更新同士又は更新
と参照の組合せの場合は、一方のアクセス要求を待機ま
たはアクセスエラーとするよって、一つのデータアクセ
ス要求を分割して複数のプロセサで並列に処理する場合
に発生するデッドロックを単一プロセサで処理する場合
と同程度になるように抑えることができ、処理の並列化
による性能向上を充分に引き出せる効果がある。
As described above, in the present invention,
An access processing request is issued to the processor accessing the data storage area only when the data storage areas to be accessed specified by the access requests from the two users for one table format or file format data overlap. Before issuing, it locks the data to be accessed, and if both access requests are updates or a combination of updates and references, one access request becomes a wait or an access error, so one data access request It is possible to suppress the deadlock that occurs when multiple processors are processed in parallel by multiple processors to the same level as when they are processed by a single processor, and it is possible to sufficiently improve the performance by parallelizing the processing. There is.

【0057】また、デッドロックの発生確率の特に高い
組合せに対してだけ同時アクセスを許さないので、特
に、単純なトラザクション処理と複雑な問合せやバッチ
処理を共存させ、それらの同時実行をサポートするよう
な並列データアクセスシステムにおいて、単純なトラン
ザクション処理の性能を劣化させないで、デッドロック
を抑止できるという効果もある。
Further, since the simultaneous access is not allowed only for a combination having a particularly high probability of occurrence of deadlock, a simple transaction process and a complicated query or batch process coexist, and the simultaneous execution thereof is supported. In such a parallel data access system, there is also an effect that deadlock can be suppressed without degrading the performance of simple transaction processing.

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

【図1】本発明の一実施例を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】データ格納領域のデータ構造を示す図である。FIG. 2 is a diagram showing a data structure of a data storage area.

【図3】ロック状態管理制御プロックのデータ構造を示
す図である。
FIG. 3 is a diagram showing a data structure of a lock state management control block.

【図4】実施例の排他制御管理テーブルの構成図であ
る。
FIG. 4 is a configuration diagram of an exclusive control management table according to the embodiment.

【図5】実施例の処理の分割・併合部の処理フローを示
すフローチャートである。
FIG. 5 is a flowchart showing a processing flow of a division / merge unit of processing according to the embodiment.

【図6】実施例のグローバル排他制御部の処理フローを
示すフローチャートである。
FIG. 6 is a flowchart showing a processing flow of a global exclusive control unit of the embodiment.

【図7】アクセス領域が2ヵ所以上重なるかどうかの判
定方法を示す説明図である。
FIG. 7 is an explanatory diagram showing a method of determining whether or not access areas overlap at two or more places.

【図8】本発明を適用するシステムの構成を示すシステ
ム構成図である。
FIG. 8 is a system configuration diagram showing a configuration of a system to which the present invention is applied.

【図9】従来の排他制御管理テーブルの構成図である。FIG. 9 is a configuration diagram of a conventional exclusive control management table.

【図10】従来の分割・併合部の処理フローを示すフロ
ーチャートである。
FIG. 10 is a flowchart showing a processing flow of a conventional division / merge unit.

【図11】従来のグローバル排他制御部の処理フローを
示すフローチャートである。
FIG. 11 is a flowchart showing a processing flow of a conventional global exclusive control unit.

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

1a〜1n…データ格納領域、2a〜2n…データアク
セス部、3a〜3n…プロセッサ、4…ネットワーク、
5…グローバル排他制御部、7…処理の分割・併合部、
14…排他制御管理テーブル。
1a to 1n ... Data storage area, 2a to 2n ... Data access unit, 3a to 3n ... Processor, 4 ... Network,
5 ... Global exclusive control unit, 7 ... Process division / merge unit,
14 ... Exclusive control management table.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】1つの表形式またはファイル形式のデータ
を分割して格納した複数の格納手段と、ユーザからのア
クセス要求に応じて前記格納手段に格納されたデータに
対し並列にアクセスする複数のプロセッサとから成る並
列データアクセスシステムにおけるアクセス要求の排他
制御方法であって、 1つの表形式またはファイル形式のデータに関して2つ
のユーザからのアクセス要求で指定されるアクセス対象
のデータ格納領域が2ヵ所以上重なる場合のみ、そのデ
ータ格納領域をアクセスするプロセッサに対してアクセ
ス処理要求を発行する前に、アクセス対象のデータに対
してロックを行い、両アクセス要求が更新同士又は更新
と参照の組合せの場合は、一方のアクセス要求を待機ま
たはアクセスエラーとすることを特徴とする並列データ
アクセスシステムにおける排他制御方法。
1. A plurality of storage means for storing one tabular or file format data in a divided manner and a plurality of storage means for accessing data stored in the storage means in parallel in response to an access request from a user. An exclusive control method for access requests in a parallel data access system including a processor, wherein two or more data storage areas to be accessed specified by access requests from two users with respect to one table format or file format data are provided. Only when overlapping, lock the data to be accessed before issuing an access processing request to the processor that accesses the data storage area, and if both access requests are updates or a combination of updates and references, Parallel data, characterized by waiting for one access request or an access error Exclusive control method for data access system.
JP5156907A 1993-06-28 1993-06-28 Exclusive control method in parallel data access system Pending JPH0713840A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5156907A JPH0713840A (en) 1993-06-28 1993-06-28 Exclusive control method in parallel data access system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5156907A JPH0713840A (en) 1993-06-28 1993-06-28 Exclusive control method in parallel data access system

Publications (1)

Publication Number Publication Date
JPH0713840A true JPH0713840A (en) 1995-01-17

Family

ID=15638000

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5156907A Pending JPH0713840A (en) 1993-06-28 1993-06-28 Exclusive control method in parallel data access system

Country Status (1)

Country Link
JP (1) JPH0713840A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005063204A (en) * 2003-08-14 2005-03-10 Ricoh Co Ltd Information processor and stored document management method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005063204A (en) * 2003-08-14 2005-03-10 Ricoh Co Ltd Information processor and stored document management method
JP4518763B2 (en) * 2003-08-14 2010-08-04 株式会社リコー Information processing apparatus and stored document management method

Similar Documents

Publication Publication Date Title
US10803047B2 (en) Accessing data entities
US6792432B1 (en) Database system with methods providing high-concurrency access in B-Tree structures
US6587854B1 (en) Virtually partitioning user data in a database system
US6820085B2 (en) Web system having clustered application servers and clustered databases
US6772155B1 (en) Looking data in a database system
US5592661A (en) Detection of independent changes via change identifiers in a versioned database management system
US5600832A (en) Variant domains and variant maps in a versioned database management system
US6321235B1 (en) Global caching and sharing of SQL statements in a heterogeneous application environment
US5504879A (en) Resolution of relationship source and target in a versioned database management system
US6321234B1 (en) Database server system with improved methods for logging transactions
US6631366B1 (en) Database system providing methodology for optimizing latching/copying costs in index scans on data-only locked tables
US5748952A (en) System and method for avoiding complete index tree traversals in sequential and almost sequential index probes
US6721742B1 (en) Method, system and program products for modifying globally stored tables of a client-server environment
US6353833B1 (en) Caching of distributed dynamic SQL statements in a multiple node RDBMS
JP4746838B2 (en) Partitioning database ownership between different database servers to control access to the database
US7953749B2 (en) Providing the timing of the last committed change to a row in a database table
JP4716635B2 (en) Selective auditing of access to rows in a relational database at the database server
US20070299810A1 (en) Autonomic application tuning of database schema
US20040122946A1 (en) Delegation of administrative operations in user enrollment tasks
US20050102326A1 (en) Method and apparatus for performing conflict resolution in database logging
US8108451B2 (en) System and program products for efficiently locking resources of a global data repository
JPH0727487B2 (en) How to introduce a control table for building search terms
US20090204967A1 (en) Reporting of information pertaining to queuing of requests
US8510269B2 (en) Uninterrupted database index reorganization/movement
Mohan Interactions between query optimization and concurrency control