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
JPH0559463B2 - - Google Patents
[go: Go Back, main page]

JPH0559463B2 - - Google Patents

Info

Publication number
JPH0559463B2
JPH0559463B2 JP61131403A JP13140386A JPH0559463B2 JP H0559463 B2 JPH0559463 B2 JP H0559463B2 JP 61131403 A JP61131403 A JP 61131403A JP 13140386 A JP13140386 A JP 13140386A JP H0559463 B2 JPH0559463 B2 JP H0559463B2
Authority
JP
Japan
Prior art keywords
record
shared
block
control
task
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 - Lifetime
Application number
JP61131403A
Other languages
Japanese (ja)
Other versions
JPS62287359A (en
Inventor
Tetsuo Sano
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.)
NEC Corp
Original Assignee
Nippon Electric Co 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP61131403A priority Critical patent/JPS62287359A/en
Publication of JPS62287359A publication Critical patent/JPS62287359A/en
Publication of JPH0559463B2 publication Critical patent/JPH0559463B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/18Handling requests for interconnection or transfer for access to memory bus based on priority control

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)
  • Multi Processors (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、疎結合マルチプロセツサシステムに
おける計算機間共有フアイルの同時アクセス制御
方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for controlling simultaneous access to files shared between computers in a loosely coupled multiprocessor system.

〔従来の技術〕[Conventional technology]

従来の疎結合マルチプロセツサシステムにおけ
るフアイル同時アクセス制御においては、制御単
位はブロツクあるいはフアイルであり、レコード
単位での制御は行われていなかつた。
In conventional file simultaneous access control in a loosely coupled multiprocessor system, the control unit is a block or a file, and control is not performed on a record-by-record basis.

一方、シングルプロセツサシステムあるいは密
結合マルチプロツセツサシステムにおいては、例
えば、第2図に示すような構成により、レコード
単位でのフアイル同時アクセス制御が行われてい
た。この図において、共有排他制御は、フアイル
同時アクセス制御により使用される基本機能であ
り、要求された論理資源名をキーとして複数タス
ク間での資源の共有あるいは排他使用を制御す
る。この制御においては、論理資源名がどの物理
資源に対応するかは関知されないので、ブロツク
に対応づけることも、レコードに対応づけること
も可能である。また、共有バツフア管理は、同一
ブロツクに対応するバツフアであれば、そのブロ
ツクを要求する複数のタスク間で同一バツフアが
共有されるように、共有バツフア領域の割り当て
を行う。そして、レコード単位で同時アクセスを
行うタスクは、論理資源名としてレコードを対応
づけて共有排他制御を要求し、また、フアイル更
新はそのレコードを含むブロツクに対応づけて共
有バツフア管理により割り当てられたバツフア領
域を介して行う。
On the other hand, in a single processor system or a tightly coupled multiprocessor system, simultaneous file access control has been performed on a record-by-record basis, for example, using a configuration as shown in FIG. In this figure, shared exclusive control is a basic function used in file simultaneous access control, and controls the sharing or exclusive use of resources among multiple tasks using the requested logical resource name as a key. In this control, since it is not concerned which physical resource a logical resource name corresponds to, it is possible to associate the logical resource name with a block or with a record. In addition, shared buffer management allocates a shared buffer area so that if the buffers correspond to the same block, the same buffer is shared among a plurality of tasks requesting that block. Tasks that perform simultaneous access in units of records request shared exclusive control by associating records as logical resource names, and file updates are performed using buffers allocated by shared buffer management in association with blocks that include the records. Do it through areas.

ここで、上述の例において、共有バツフアを介
してフアイル更新を行うことの必要性を第3図を
参照して説明する。この図は、シングルプロセツ
サシステムにおいてタスクごとにバツフア領域を
設けた場合の動作を示す図である。タスクT1は、
レコードR1を更新するため、レコードR1を排他
確保後、レコードR1を含むブロツクB1を自タス
クのバツフア領域に読み込む。なお、レコード
R1のみの入出力動作はできない。
The necessity of updating files via a shared buffer in the above example will now be explained with reference to FIG. This figure shows the operation when a buffer area is provided for each task in a single processor system. Task T1 is
In order to update record R1 , after exclusively securing record R1 , block B1 containing record R1 is read into the buffer area of the invoking task. In addition, the record
Input/output operation using only R1 is not possible.

次に、タスクT2はレコードR2を更新するため、
レコードR2を排他確保する。レコードR1とレコ
ードR2は別資源であるため、待ち合わせは起こ
らない。そのあとで、レコードR2を含む同じブ
ロツクB1を自タスクのバツフア領域に読み込む。
タスクT1が自タスクのバツフア領域でレコード
R1をR1′に変更後、この変更されたブロツクB1
書き込み、次に、タスクT2がレコードR2をR2′に
変更後、この変更されたブロツクB1を書き込む。
この結果タスクT2ではR1からR1′この変更が行な
われていないため、タスクT1で行なわれた更新
結果はタスク2で行なわれた更新結果の重ね書き
により失われてしまう。
Then task T 2 updates record R 2 , so
Exclusively secure record R2 . Since record R 1 and record R 2 are different resources, no waiting occurs. After that, the same block B1 containing record R2 is read into the buffer area of the invoking task.
Task T 1 records in the buffer area of its own task
After changing R 1 to R 1 ′, this changed block B 1 is written, and then task T 2 changes record R 2 to R 2 ′ and then writes this changed block B 1 .
As a result, since this change from R 1 to R 1 ' has not been made in task T 2 , the update results made in task T 1 are overwritten by the update results made in task 2 and are lost.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述した従来技術においては、疎結合マルチプ
ロセツサシステムにおいて、レコード単位でフア
イル同時アクセス制御を行う方が望ましい場合で
あつても、それを含むブロツク単位でフアイル同
時アクセス制御を行わざるをえない。このため、
アクセスの競合による待ち合わせの発生頻度が増
加し、フアイル同時アクセスを行うタスクの処理
時間が増加するという問題点があつた。
In the above-mentioned prior art, in a loosely coupled multiprocessor system, even if it is desirable to control simultaneous file access on a record-by-record basis, simultaneous file access control must be carried out on a block-by-block basis. For this reason,
There was a problem in that the frequency of occurrence of waiting due to access conflicts increased, and the processing time of tasks that accessed files simultaneously increased.

ここで、シングルプロセツサシステムあるいは
密結合マルチプロセツサシステムにおいて可能で
あるレコード単位でのフアイル同時アクセス制御
が、疎結合マルチプロセツサシステムにおいて困
難である理由は、共有フアイルに対する入出力バ
ツフア領域(通常、主記憶に取られる)が各計算
機間で共有できないことにある。したがつて、単
純に共有排他制御の単位をレコードにするだけで
は、前述したシングルプロセツサシステムにおい
てタスクごとにバツフア領域を設けた場合と同様
の論理により、共有フアイルの更新結果が保証さ
れなくなる。
The reason why concurrent file access control on a record-by-record basis, which is possible in a single processor system or a tightly coupled multiprocessor system, is difficult in a loosely coupled multiprocessor system is that the input/output buffer area (usually , stored in main memory) cannot be shared between computers. Therefore, if the unit of shared exclusive control is simply a record, the result of updating the shared file is not guaranteed due to the same logic as when a buffer area is provided for each task in the single processor system described above.

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

本発明の疎結合マルチプロセツサシステムにお
けるフアイル同時アクセス制御方式は、疎結合マ
ルチプロセツサシステムを構成する複数の計算機
から共有される二次記憶装置上のフアイルへの同
時アクセス制御において、 該同時アクセス制御の制御単位として、物理入
出力単位の整数倍の制御単位であるブロツクと、
ブロツクより小さい制御単位であるレコードとを
有する場合において、 レコードと該レコードを包含するブロツクとを
指定したレコード単位フアイルアクセス要求に対
して、該要求元タスクと同一の計算機上で動作す
るタスクとの間の制御においては、該レコード単
位での競合が発生していれば待ち合わせを行い、
該レコード単位での競合が発生していなければア
クセス要求を許可し、また、該要求元タスクと異
なる計算機上で動作するタスクとの間の制御にお
いては、該ブロツク単位での競合が発生していれ
ば待ち合わせを行い、該ブロツク単位での競合が
発生していなければアクセス要求を許可するレコ
ード共有排他制御手段と、 個々の計算機ごとに存在する共有バツフア領域
について、同一ブロツクに対応するバツフアの割
り当て要求であれば、該バツフアを要求する複数
タスク間で同一領域を共有させるように割り当て
制御を行う共有バツフア管理手段とを有し、 共有フアイルへのレコード単位でのアクセスに
おいて、共有排他制御は前記レコード共有排他制
御手段により行い、また、物理入出力動作は前記
共有バツフア管理手段により割り当てられたバツ
フア領域を介して行なうように構成する。
The simultaneous file access control method in a loosely coupled multiprocessor system of the present invention controls simultaneous access to a file on a secondary storage device shared by a plurality of computers making up the loosely coupled multiprocessor system. As a control unit, a block is a control unit that is an integral multiple of the physical input/output unit,
When a task has a record that is a control unit smaller than a block, in response to a record unit file access request that specifies a record and a block that includes the record, a task running on the same computer as the requesting task is requested. In the control between records, if a conflict occurs in the record unit, a wait is performed,
If there is no conflict in the record unit, the access request is permitted, and in the control between the requesting task and a task running on a different computer, if there is no conflict in the block unit. A record sharing exclusive control means that waits for the access request if there is no contention in the block unit, and permits the access request if there is no conflict in the block, and allocation of buffers corresponding to the same block with respect to the shared buffer area that exists for each individual computer. If it is a request, it has a shared buffer management means that performs allocation control so that the same area is shared among multiple tasks requesting the buffer, and when accessing the shared file in record units, the sharing exclusive control is performed as described above. This is performed by a record sharing exclusive control means, and the physical input/output operation is performed via a buffer area allocated by the shared buffer management means.

〔実施例〕〔Example〕

本発明の一実施例について図面を参照して説明
する。
An embodiment of the present invention will be described with reference to the drawings.

第1図を参照すると、本発明の一実施例は、レ
コード共有排他制御手段11、を有する共有排他
制御装置1、共有バツフア管理手段21および共
有バツフア領域22を有する疎結合マルチプロセ
ツサシステムを構成する計算機2、および複数計
算機間で共有されるフアイルが存在する二次記憶
装置3から構成されている。本実施例のシステム
は二つの計算機2から構成され、各計算機2とチ
ヤネル接続された共有排他制御専用の装置である
共有排他制御装置1を有する。
Referring to FIG. 1, one embodiment of the present invention comprises a loosely coupled multiprocessor system having a shared exclusive control device 1 having a record sharing exclusive control means 11, a shared buffer management means 21, and a shared buffer area 22. The computer 2 includes a computer 2, and a secondary storage device 3 in which files shared among multiple computers exist. The system of this embodiment is composed of two computers 2, and has a shared exclusive control device 1 which is a device exclusively for shared exclusive control and is connected to each computer 2 through a channel.

また、二次記憶装置3の一例として磁気デイス
ク装置を用いている。なお、いずれかの、あるい
は、両方の計算機2(シングルプロセツサ)を密
結合マルチプロセツサシステムで置き換えた構成
により実施することも可能である。また、共有排
他制御装置1をいずれかの計算機2に内蔵して実
施することも、あるいは、両計算機2に機能分担
させた形で実施することも可能である。
Furthermore, a magnetic disk device is used as an example of the secondary storage device 3. Note that it is also possible to implement the present invention by replacing one or both of the computers 2 (single processors) with a tightly coupled multiprocessor system. Further, it is also possible to implement the shared exclusive control device 1 by incorporating it into one of the computers 2, or by having both computers 2 share the functions.

次に、第4図を参照して、本実施例の動作につ
いて以下詳細に説明する。まず、同時アクセス制
御の対象である、二次記憶装置3上に存在する共
有フアイル31の構成について説明する。共有フ
アイル31は、ブロツクとレコードとに階層構造
化されている。このうち、ページとも呼ばれるブ
ロツクは、入出力動作が行われる単位であり、物
理入出力動作単位(装置により異なるか、例えば
256バイト)の整数倍に取られる。一方、レコー
ドは、論理的なアクセス単位であり、いずれかの
ブロツクに含まれている。なお、複数ブロツクに
またがるレコードを定義することも可能である
が、このような場合には、属するブロツクごとに
別々のレコードとして扱う。ここで、すべての共
有フアイル31には、システム内で一意にそのフ
アイルを識別するためのフアイル識別名であるフ
アイルIDがつけられている。また、各ブロツク
には、それが属するフアイル内でそのブロツクを
一意に識別するためのブロツク識別名であるブロ
ツクIDがつけられている。さらに、各レコード
には、それが属するブロツク内でそのレコードを
一意に識別するためのレコード識別名であるレコ
ードIDがつけられている。以下では、ブロツク
指定とは(フアイルID、ブロツクID)の組を指
定することを、また、レコード指定とは(フアイ
ルID、ブロツクID、レコードID)の組を指定す
ることを言う。
Next, the operation of this embodiment will be described in detail with reference to FIG. 4. First, the configuration of the shared file 31 on the secondary storage device 3, which is subject to simultaneous access control, will be described. The shared file 31 has a hierarchical structure of blocks and records. Among these, a block, also called a page, is a unit in which input/output operations are performed, and is a physical input/output operation unit (which varies depending on the device, e.g.
256 bytes). On the other hand, a record is a logical access unit and is included in any block. Note that it is also possible to define a record that spans multiple blocks, but in such a case, each block to which it belongs is treated as a separate record. Here, all the shared files 31 are given a file ID, which is a file identification name for uniquely identifying the file within the system. Furthermore, each block is given a block ID, which is a block identification name for uniquely identifying the block within the file to which it belongs. Furthermore, each record is given a record ID, which is a record identification name for uniquely identifying the record within the block to which it belongs. In the following, block specification refers to specifying a set of (file ID, block ID), and record specification refers to specifying a set of (file ID, block ID, record ID).

次に、フアイル同時アクセス制御の動作につい
て、処理要求の流れにそつて説明する。まず、フ
アイル同時アクセスを行うタスクは、フアイル同
時アクセス制御ルーチン24に対して以下のよう
な要求を行う。
Next, the operation of simultaneous file access control will be explained along the flow of processing requests. First, a task that performs simultaneous file access makes the following request to the simultaneous file access control routine 24.

(1) レコードの読込時には、レコードを指定して
GET要求を行う。
(1) When reading a record, specify the record and
Make a GET request.

(2) レコードの書込時には、レコードを指定して
PUT要求を行う。
(2) When writing a record, specify the record and
Make a PUT request.

(3) 通常チエツクポイント区間と呼ばれる論理的
にひとまとまりのフアイル更新が終わると、チ
エツクポイント要求を行う。
(3) When a logical group of files, usually called a checkpoint section, has been updated, a checkpoint request is made.

フアイル同時アクセス制御ルーチン24におけ
る処理手順は次のとおりである。
The processing procedure in the file simultaneous access control routine 24 is as follows.

(1) GET処理 レコード共有排他制御手段11に対して、
レコードを指定して共有モードでロツク要求
が行われる。この時、必要であれば、レコー
ド共有排他制御手段11により待ち合わせが
行われる。
(1) GET processing For the record sharing exclusive control means 11,
A lock request is made in shared mode specifying a record. At this time, if necessary, the record sharing exclusive control means 11 makes a wait.

共有バツフア管理手段21に対して、要求
レコードを含むブロツクを指定してバツフア
確保要求が行なわれる。この時、必要であれ
ば共有バツフア管理手段21により該当ブロ
ツクが共有バツフア領域22に読み込まれ
る。
A buffer reservation request is made to the shared buffer management means 21 by specifying a block containing the requested record. At this time, if necessary, the corresponding block is read into the shared buffer area 22 by the shared buffer management means 21.

共有バツフア管理手段21により得られた
バツフアから、要求タスクのレコード格納領
域に、要求されたレコードが転送される。
The requested record is transferred from the buffer obtained by the shared buffer management means 21 to the record storage area of the requesting task.

共有バツフア管理手段21に対して、処理
済みのブロツクを指定して参照モードでバツ
フア解放要求が行なわれる。
A buffer release request is made to the shared buffer management means 21 in reference mode, specifying a processed block.

(2) PUT処理 レコード共有排他制御手段11に対して、
レコードを指定して排他モードでロツク要求
が行なわれる。この時、必要であれば、レコ
ード共有排他制御手段11により待ち合わせ
が行われる。
(2) PUT processing For the record sharing exclusive control means 11,
A lock request is made in exclusive mode by specifying a record. At this time, if necessary, the record sharing exclusive control means 11 makes a wait.

共有バツフア管理手段21に対して、要求
レコードを含むブロツクを指定してバツフア
確保要求が行なわれる。この時、必要であれ
ば共有バツフア管理手段21により該当ブロ
ツクが共有バツフア領域22に読み込まれ
る。
A buffer reservation request is made to the shared buffer management means 21 by specifying a block containing the requested record. At this time, if necessary, the corresponding block is read into the shared buffer area 22 by the shared buffer management means 21.

要求タスクのレコード格納領域から、共有
バツフア管理手段21により得られたバツフ
アに、要求されたレコードが転送される。
The requested record is transferred from the record storage area of the requesting task to the buffer obtained by the shared buffer management means 21.

共有バツフア管理手段21に対して、処理
済みのブロツクを指定して更新モードでバツ
フア解放要求が行なわれる。
A buffer release request is made to the shared buffer management means 21 in update mode, specifying a processed block.

(3) チエツクポイント処理 共有バツフア管理手段21に対して、要求
タスクが参照したすべてのバツフアのバツフ
ア無効化要求が行なわれる。
(3) Checkpoint processing A buffer invalidation request is made to the shared buffer management means 21 for all buffers referenced by the requesting task.

レコード共有排他制御手段11に対して、
要求タスクがロツクしているすべてのレコー
ドのアンロツク要求が行なわれる。
For the record sharing exclusive control means 11,
A request is made to unlock all records locked by the requesting task.

本実施例においては、一方の計算機2の共有バ
ツフア領域22内に、あるブロツクが読み込まれ
ている間は、そのブロツクに含まれるいずれかの
レコードについてロツクがかけられており、レコ
ード共有排他制御手段11におけるロツク制御
で、他方の計算機2の共有バツフア領域22内に
同一ブロツクが読み込まれないように保護され
る。
In this embodiment, while a certain block is being read into the shared buffer area 22 of one computer 2, any record included in that block is locked, and the record sharing exclusive control means 11, the same block is protected from being read into the shared buffer area 22 of the other computer 2.

共有バツフア管理手段21の機能としては、共
有バツフア領域22の効率的な割当制御も重要で
あるが、ここでは、フアイル同時アクセス制御に
関連する機能についてのみ説明する。
Although efficient allocation control of the shared buffer area 22 is also important as a function of the shared buffer management means 21, only the functions related to file simultaneous access control will be described here.

まず、第5図を参照して共有バツフア管理手段
21が使用する管理テーブルである共有バツフア
管理テーブル23について説明する。
First, the shared buffer management table 23, which is a management table used by the shared buffer management means 21, will be explained with reference to FIG.

管理テーブルの各エントリは対応するブロツク
ごとに作成され、フアイルIDおよびブロツクID
からなるブロツク情報と領域へのポインタからな
るバツフア領域情報と更新フラグと使用中タス
ク・リストと参照タスク・リストとを含んでい
る。
Each entry in the management table is created for each corresponding block, and contains the file ID and block ID.
It includes block information consisting of , buffer area information consisting of a pointer to an area, an update flag, an in-use task list, and a reference task list.

次に、各要求に対する処理手順を説明する。 Next, the processing procedure for each request will be explained.

(1) バツフア確保処理 要求されたブロツクが、すでに、共有バツフア
管理テーブル23上に存在するかどうか調べる。
存在する場合には、すでに内容が読み込まれてい
るバツフアを要求タスクに参照させる。存在しな
い場合には、空きバツフア領域を割り当て、要求
されたブロツクを読み込んで要求タスクに参照さ
せる。いずれの場合にも、要求タスクはバツフア
管理エントリの使用中タスク・リストおよび参照
タスク・リストに登録される。
(1) Buffer reservation processing Check whether the requested block already exists on the shared buffer management table 23.
If it exists, have the requesting task refer to the buffer whose contents have already been read. If it does not exist, a free buffer area is allocated and the requested block is read and referenced by the requesting task. In either case, the requested task is registered in the buffer management entry's in-use task list and reference task list.

必要な空きバツフア領域がない場合には、使用
中タスク・リストが空である管理エントリに対応
するバツフアを解放して、要求ブロツクに割り当
てる。このとき、更新フラグがセツトされている
バツフアであれば、次のブロツクへの割り当て前
に、対応するブロツクへの書込処理が行なわれ
る。使用中タスクなしのバツフアがないか、ある
いは、あつてもそれらのバツフアだけでは領域が
不足する場合には、空きができるまで待ち合わせ
が行なわれる。
If there is no necessary free buffer area, the buffer corresponding to the management entry whose busy task list is empty is released and allocated to the request block. At this time, if the buffer has an update flag set, writing to the corresponding block is performed before being assigned to the next block. If there are no buffers with no tasks in use, or even if there are, there is not enough space in those buffers, a wait is performed until a free space becomes available.

(2) バツフア解放処理 要求タスクが、要求されたブロツクに対応する
バツフア管理エントリの使用中タスク・リストか
ら削除される。更新モードでの要求であれば、バ
ツフア管理エントリの更新フラグがセツトされ
る。
(2) Buffer release processing The requesting task is deleted from the in-use task list of the buffer management entry corresponding to the requested block. If the request is in update mode, the update flag of the buffer management entry is set.

(3) バツフア無効化処理 要求タスクがすべてのバツフア管理エントリの
参照タスク・リストから削除される。ここで、参
照タスク・リストが空になつたバツフア管理エン
トリ(このとき、使用中タスクは存在しないはず
である)については、更新フラグがセツトされて
いれば対応するブロツクへの書き込みを行つた
後、エントリの削除が行なわれる。
(3) Buffer invalidation processing The requested task is deleted from the reference task list of all buffer management entries. Here, for buffer management entries whose reference task list is empty (at this time, there should be no tasks in use), if the update flag is set, after writing to the corresponding block. , the entry is deleted.

このバツフア無効化処理は、それが含むすべて
のレコードについてロツクがかけられていないブ
ロツクを、共有バツフア領域22中に保持しない
ようにするために必要である。
This buffer invalidation process is necessary in order to prevent blocks that are not locked for all the records they contain from being held in the shared buffer area 22.

最後に、レコード共有排他制御手段11の動作
について説明する。
Finally, the operation of the record sharing exclusive control means 11 will be explained.

まず、第6図を参照して第4図のレコード共有
排他制御手段11が使用する制御テーブルである
共有排他制御テーブル12について説明する。制
御対象となる資源はブロツクとレコードの2階層
に分けて管理されている。第1階層のブロツク制
御エントリは、フアイルIDおよびブロツクIDか
らなるブロツク情報と、使用中計算機IDと、ブ
ロツク待ちタスク・キユーと、そのブロツクに属
するレコードに対応するレコード制御エントリ・
リストとを含んでいる。第2階層のレコード制御
エントリは、レコードIDからなるレコード情報
とロツク中タスク・リストとレコード待ちタス
ク・キユーとを含んでいる。ここで、ロツク中タ
スク・リスト、レコード待ちタスク・キユーおよ
びブロツク待ちタスク・キユー中にはそれぞれの
状態のタスクごとに、タスクが属する計算機2の
計算機IDとタスクIDと共有モード、排他モード
の別などのロツク要求種別とが登録される。ここ
で、計算機IDはシステム内の各計算機2を一意
に識別するための識別名であり、また、タスク
IDは対応する計算機2内で各タスクを一意に識
別するための識別名である。
First, the shared exclusive control table 12, which is a control table used by the record shared exclusive control means 11 shown in FIG. 4, will be explained with reference to FIG. Resources to be controlled are managed in two levels: blocks and records. The block control entry in the first layer contains block information consisting of a file ID and a block ID, the ID of the computer in use, the task queue waiting for the block, and the record control entry corresponding to the record belonging to the block.
Contains a list. The record control entry in the second hierarchy includes record information consisting of a record ID, a locked task list, and a record waiting task queue. Here, for each task in the locked task list, record-waiting task queue, and block-waiting task queue, the computer ID and task ID of computer 2 to which the task belongs and the shared mode and exclusive mode are listed. Lock request types such as ``lock requests'' are registered. Here, the computer ID is an identification name for uniquely identifying each computer 2 in the system, and also a task
The ID is an identification name for uniquely identifying each task within the corresponding computer 2.

次に、フローチヤートを参照して、レコード共
有排他制御手段11の処理手順を説明する。
Next, the processing procedure of the record sharing exclusive control means 11 will be explained with reference to a flowchart.

まずロツク要求の処理手順を第7図を参照して
以下詳細に説明する。
First, the lock request processing procedure will be explained in detail below with reference to FIG.

ブロツクが他計算機2上のタスクにロツクされ
ていないこと(71,72に相当する)、および
同一計算機2上の他タスクとの間でレコード単位
でのロツク競合が起きていないこと(73,74
に相当する)がチエツクされ、ロツクが許可でき
る状態であれば、要求タスクは該当するレコード
制御エントリのロツク中タスク・リストに登録さ
れる。ロツクが許可できない状態であれば、要求
タスクはレコード待ちタスク・キユーあるいはブ
ロツク待ちタスク・キユーの最後に登録され、ロ
ツク可能な状態になるまで待たされる。
The block is not locked by a task on another computer 2 (corresponding to 71, 72), and there is no lock conflict on a record basis with other tasks on the same computer 2 (73, 74).
) is checked, and if the lock can be permitted, the requesting task is registered in the locking task list of the corresponding record control entry. If locking is not possible, the requesting task is registered at the end of the record-waiting task queue or block-waiting task queue, and is kept waiting until locking becomes possible.

なお、二重ロツク処理については従来処理と同
様であるため、処理フローは省略している。既存
のロツク種別が共有を示し、要求のロツク種別が
排他を示し、しかも、他に共有ロツク中のタスク
が存在する場合には、共有ロツク中のタスクがな
くなるまで待ち合わせる必要がある。二重ロツク
処理後のロツク種別は、既存、要求のいずれもが
共有であれば共有、それ以外の組み合わせの場合
には排他となる。
Note that since the double lock processing is the same as the conventional processing, the processing flow is omitted. If the existing lock type indicates shared, the lock type of the request indicates exclusive, and there are other tasks in the shared lock, it is necessary to wait until there are no more tasks in the shared lock. The lock type after double lock processing is shared if both existing and requested locks are shared, and exclusive in any other combination.

次に、アンロツク要求の処理手順について第8
図を参照して詳細に説明する。
Next, Section 8 describes the unlock request processing procedure.
This will be explained in detail with reference to the drawings.

まず、アンロツク要求タスクが該当するレコー
ド制御エントリのロツク中タスク・リストから削
除され、さらに、ロツク中タスクがなくなつた場
合には、ロツク待ち解除処理が行なわれる。レコ
ード待ち解除処理81では、レコード制御エント
リのレコード待ちタスク・キユーの先頭から順
に、また、ブロツク待ち解除処理82では、ブロ
ツク制御エントリのブロツク待ちタスク・キユー
の先頭から順に、再度ロツク処理と同等の処理が
行われる。
First, the unlock requesting task is deleted from the locked task list of the corresponding record control entry, and if there are no more locked tasks, lock wait release processing is performed. In the record waiting release process 81, the record waiting task queue of the record control entry is sequentially executed from the head, and in the block waiting canceling process 82, the block waiting task queue of the block control entry is again sequentially executed from the head of the block waiting task queue, which is equivalent to the lock process. Processing takes place.

以上の説明においては、本発明の特徴であるレ
コード単位での共有排他制御についてのみ説明し
たが、従来のブロツク単位での共有排他制御を同
時に共有排他制御装置1内に組み込むことも可能
である。また、従来から実施されているように、
共有排他制御装置1にロツク要求の待ち合わせ処
理前に、待ち合わせを行うとデツドロツク状態が
発生するかどうか検査し、発生する場合には待ち
合わせを行わずにロツク要求の拒否を行うデツド
ロツク回避機構を組み込むことも可能である。
In the above description, only the shared exclusive control in units of records, which is a feature of the present invention, has been explained, but it is also possible to incorporate the conventional shared exclusive control in units of blocks into the shared exclusive control device 1 at the same time. In addition, as has traditionally been done,
A deadlock avoidance mechanism is incorporated into the shared exclusive control device 1, before processing to wait for a lock request, to check whether a deadlock state will occur if the waiting is performed, and if a deadlock state occurs, to reject the lock request without performing the waiting. is also possible.

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

以上説明したように、本発明では、疎結合マル
チプロセツサシステムにおけるフアイル同時アク
セス制御において、ブロツクとレコードの階層を
意識し、同一の計算機上で動作するタスク間のア
クセス競合であればレコード単位で共有排他制御
が行なわれる。このため、従来のようにすべてブ
ロツク単位で共有排他制御を行う場合に比して、
フアイル同時アクセスを行うタスク間でのアクセ
ス競合による待ち合わせの発生頻度が減少し、シ
ステムの処理能力が向上するという効果がある。
As explained above, in the present invention, when controlling simultaneous file access in a loosely coupled multiprocessor system, the hierarchies of blocks and records are taken into consideration, and access conflicts between tasks running on the same computer are handled on a record-by-record basis. Shared exclusive control is performed. For this reason, compared to the conventional case of performing shared exclusive control on a block-by-block basis,
This has the effect of reducing the frequency of waits caused by access conflicts between tasks that access files simultaneously, and improving the processing capacity of the system.

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

第1図は本発明の一実施例を示す図、第2図は
シングルプロセツサシステムにおけるレコード単
位フアイル同時アクセス制御を説明するための
図、第3図は共有バツフアなしでのレコード単位
フアイル同時アクセス動作を説明するための図、
第4図は一実施例におけるフアイル同時アクセス
制御処理を説明するための図、第5図は共有バツ
フア管理テーブル23を示す図、第6図は共有排
他制御テーブル12を示す図、第7図はロツク処
理を示す図および第8図はアンロツク処理を示す
図である。 第1図から第8図において、1……共有排他制
御装置、11……レコード共有排他制御手段、1
2……共有排他制御テーブル、2……計算器、2
1……共有バツフア管理手段、22……共有バツ
フア領域、23……共有バツフア管理テーブル、
24……フアイル同時アクセス制御ルーチン、3
……二次記憶装置、31……共有フアイル。
Fig. 1 is a diagram showing an embodiment of the present invention, Fig. 2 is a diagram for explaining record unit file simultaneous access control in a single processor system, and Fig. 3 is a record unit file simultaneous access control without a shared buffer. A diagram to explain the operation,
FIG. 4 is a diagram for explaining file simultaneous access control processing in one embodiment, FIG. 5 is a diagram showing the shared buffer management table 23, FIG. 6 is a diagram showing the shared exclusive control table 12, and FIG. 7 is a diagram showing the shared buffer management table 23. A diagram showing the locking process and FIG. 8 are diagrams showing the unlocking process. In FIGS. 1 to 8, 1...Sharing exclusive control device, 11...Record sharing exclusive control means, 1
2... Shared exclusive control table, 2... Calculator, 2
1... Shared buffer management means, 22... Shared buffer area, 23... Shared buffer management table,
24...File simultaneous access control routine, 3
...Secondary storage device, 31...Shared file.

Claims (1)

【特許請求の範囲】 1 疎結合マルチプロセツサシステムを構成する
複数の計算機により共有される二次記憶装置上の
フアイルへの同時アクセス制御方式において、 該同時アクセス制御の制御単位として、物理入
出力単位の整数倍の制御単位であるブロツクと、
ブロツクより小さい制御単位であるレコードとを
有する場合において、 レコードと該レコードを包含するブロツクとを
指定したレコード単位フアイルアクセス要求に対
して、該要求元タスクと同一の計算機上で動作す
るタスクとの間の制御においては、該レコード単
位での競合が発生していれば待ち合わせを行い、
該レコード単位での競合が発生していなければア
クセス要求を許可し、また、該要求元タスクと異
なる計算機上で動作するタスクとの間の制御にお
いては、該ブロツク単位での競合が発生していれ
ば待ち合わせを行い、該ブロツク単位での競合が
発生していなければアクセス要求を許可するレコ
ード共有排他制御手段と、 個々の計算機ごとに存在する共有バツフア領域
に関する同一ブロツクに対応するバツフアの割り
当て要求であれば、該バツフアを要求する複数タ
スク間で同一領域を共有させるように割り当て制
御を行う共有バツフア管理手段とを有し、 共有フアイルへのレコード単位でのアクセスに
おいて、共有排他制御は前記レコード共有排他制
御手段により行い、また、物理入出力動作は前記
共有バツフア管理手段により割り当てられたバツ
フア領域経由で行なわれることを特徴とする疎結
合マルチプロセツサシステムにおけるフアイル同
時アクセス制御方式。
[Scope of Claims] 1. In a method for controlling simultaneous access to files on a secondary storage device shared by a plurality of computers constituting a loosely coupled multiprocessor system, physical input/output is used as a control unit of the simultaneous access control. A block is a control unit that is an integral multiple of the unit,
When a task has a record that is a control unit smaller than a block, in response to a record unit file access request that specifies a record and a block that includes the record, a task running on the same computer as the requesting task is requested. In the control between records, if a conflict occurs in the record unit, a wait is performed,
If there is no conflict in the record unit, the access request is permitted, and in the control between the requesting task and a task running on a different computer, if there is no conflict in the block unit. A record sharing exclusive control means that waits for a block if there is a conflict and permits an access request if there is no conflict in the block, and a buffer allocation request corresponding to the same block regarding the shared buffer area that exists for each individual computer. If so, the shared buffer management means performs allocation control so that the same area is shared among multiple tasks requesting the buffer, and when accessing the shared file in units of records, the shared exclusive control is applied to the record. A file simultaneous access control method in a loosely coupled multiprocessor system, characterized in that the file simultaneous access control is performed by shared exclusive control means, and physical input/output operations are performed via a buffer area allocated by the shared buffer management means.
JP61131403A 1986-06-05 1986-06-05 Control system for simultaneous file access in loosely coupled multi-processor system Granted JPS62287359A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61131403A JPS62287359A (en) 1986-06-05 1986-06-05 Control system for simultaneous file access in loosely coupled multi-processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61131403A JPS62287359A (en) 1986-06-05 1986-06-05 Control system for simultaneous file access in loosely coupled multi-processor system

Publications (2)

Publication Number Publication Date
JPS62287359A JPS62287359A (en) 1987-12-14
JPH0559463B2 true JPH0559463B2 (en) 1993-08-31

Family

ID=15057159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61131403A Granted JPS62287359A (en) 1986-06-05 1986-06-05 Control system for simultaneous file access in loosely coupled multi-processor system

Country Status (1)

Country Link
JP (1) JPS62287359A (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3087274B2 (en) * 1988-05-06 2000-09-11 富士通株式会社 File exclusion control system
JPH0797349B2 (en) * 1989-03-06 1995-10-18 株式会社日立製作所 Resource management method in information processing system
JPH0398136A (en) * 1989-09-11 1991-04-23 Nec Corp Automatic inter-host file succession system
JPH09305471A (en) * 1996-05-15 1997-11-28 Nec Corp File simultaneous access control system
JP4486108B2 (en) * 2007-04-27 2010-06-23 株式会社大和証券グループ本社 Data processing system, terminal device and program

Also Published As

Publication number Publication date
JPS62287359A (en) 1987-12-14

Similar Documents

Publication Publication Date Title
US6108654A (en) Method and system for locking resources in a computer system
US5946711A (en) System for locking data in a shared cache
US5668958A (en) Heterogeneous filing system with common API and reconciled file management rules
US5226143A (en) Multiprocessor system includes operating system for notifying only those cache managers who are holders of shared locks on a designated page by global lock manager
US5251318A (en) Multiprocessing system comparing information copied from extended storage before and after processing for serializing access to shared resource
JP2575543B2 (en) Simultaneous access management method
US5276835A (en) Non-blocking serialization for caching data in a shared cache
US5355477A (en) Method for updating a block using record-level locks by committing the update if the block has not been updated by another process otherwise spinning
US6105085A (en) Lock mechanism for shared resources having associated data structure stored in common memory include a lock portion and a reserve portion
JPH10301834A (en) Management method for shared memory
US5715447A (en) Method of and an apparatus for shortening a lock period of a shared buffer
US5999976A (en) Parallel file system and method with byte range API locking
JPH056297A (en) Method of transaction processing and system
JPH0522259B2 (en)
US7831642B1 (en) Page cache management for a shared file
JP2685530B2 (en) How to manage shared data
JPH0622015B2 (en) Data processing system control method
JP2829115B2 (en) File sharing method
JPH0559463B2 (en)
JPH01112444A (en) Data access system
KR0152714B1 (en) Buffer Management Method Using Buffer Locking Technique in Storage System in Multi-User Environment
JP3107094B2 (en) Method and apparatus for shortening shared buffer lock period
EP0049423A2 (en) Multiprocessor system
JP2610926B2 (en) Transaction control method
US5926835A (en) Method of isolating a memory location containing an obsolete value