JPS63307538A - Control system for simultaneous access of files - Google Patents

Control system for simultaneous access of files

Info

Publication number
JPS63307538A
JPS63307538A JP62143842A JP14384287A JPS63307538A JP S63307538 A JPS63307538 A JP S63307538A JP 62143842 A JP62143842 A JP 62143842A JP 14384287 A JP14384287 A JP 14384287A JP S63307538 A JPS63307538 A JP S63307538A
Authority
JP
Japan
Prior art keywords
deadlock
block
lock
shared
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP62143842A
Other languages
Japanese (ja)
Inventor
Fumio Imai
今井 文生
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
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP62143842A priority Critical patent/JPS63307538A/en
Publication of JPS63307538A publication Critical patent/JPS63307538A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To effectively avoid a deadlock state without deteriorating the performance of a computer system by advancing the processing after production of an unlock request which unlocks only one of shared blocks. CONSTITUTION:A shared block deadlock avoiding means 21 is provided on each process and produces an unlock request only to the block designated by the block identifying information included in the shared block dead lock information received from a shared block deadlock detecting means 31. Then a shared block deadlock after-the-fact means 22 is provided on each process to cancel the replacement of files done by its own process and to produce an unlock request for all blocks locked by its own process when the need is detected for the second access given by its own process to the block to which an unlock is requested by the means 21. Thus it is possible to minimize the production of unlock requests so that a deadlock state is avoided.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はファイルを複数のプロセスから同時にアクセス
することを可能とするファイルのブロック単位の同時ア
クセス制御方式に関し、特にファイルの同時アクセス時
に発生するプロセス間デッドロックの回避方式に関する
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a simultaneous file block-by-block access control method that allows a file to be accessed simultaneously by multiple processes. Concerning methods for avoiding deadlock between processes.

〔従来の技術〕[Conventional technology]

従来、この種のファイル同時アクセス制御方式では、デ
ッドロック回避のための技術として、■ デッドロック
発生時にデッドロック関連プロセスのうちのいずれか1
つのプロセスが行ったファイルアクセス処理のうちのそ
のプロセスの最新チェックポイント時点以降の処理を全
て取り消してデッドロックというすくみ状態を解除させ
る技術。
Conventionally, in this type of concurrent file access control method, techniques for deadlock avoidance include: ■ When a deadlock occurs, one of the deadlock-related processes
A technology that cancels all of the file access processing performed by one process after that process's latest checkpoint, thereby breaking the deadlock state.

■ デッドロックの発生確率を減らすためにプロセスの
最新チェックポイント以降のファイルアクセスのために
ロックしたブロックの共用ロックのうちの必要性がない
と論理的に認められるブロックのロックを逐次アンロッ
クさせてロック待ちの確率を減らすことにより間接的に
デッドロックの発生確率を凍らす技術 等が知られている。
■ To reduce the probability of deadlock occurrence, among the shared locks of blocks locked for file access after the process's latest checkpoint, locks of blocks that are logically deemed unnecessary are sequentially unlocked. Techniques are known that indirectly freeze the probability of deadlock occurrence by reducing the probability of waiting for a lock.

後者■のデッドロック回避技術の例としては、データベ
ースアクセスにおけるDML (DataManipu
lation Language  ;データベース操
作言語)の最新のカレンシ対象外となった共用ロックさ
れているブロックをDML単位にアンロックしていくこ
とによりデッドロックの発生確率を減らすという技術が
挙げられる。
An example of the latter deadlock avoidance technology is DML (Data Manipulator) in database access.
One technique is to reduce the probability of deadlock occurrence by unlocking shared locked blocks that are no longer subject to the latest currency of a database operating language (DML) in units of DML.

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

上述した従来のファイル同時アクセス制御方式は、前者
■のデッドロック回避技術の場合には、デッドロック発
生時の最新チェックポイント以降の取消し処理として取
消し処理自身が必要である以外に取消しを行ったプロセ
スが最新チェックポイント時点からもう一度処理をやり
直す必要があるので、計算機システムの性能の低下の要
因になるという欠点がある。
In the case of the former (2) deadlock avoidance technology, the conventional file simultaneous access control method described above requires the process that performed the cancellation in addition to the cancellation process itself as a cancellation process after the latest checkpoint when a deadlock occurs. Since it is necessary to restart the process from the latest checkpoint point, it has the disadvantage that it causes a decrease in the performance of the computer system.

また、後者■のデッドロック回避技術の場合には、共用
ロックのアンロックを逐次行うことばアンロック要求を
たびたび発行することになるので、アンロフタ性能が悪
い場合であるロック管理のための管理テーブルとしてメ
モリ以外の媒体を使用している計算機システムや疎結合
マルチプロセッサ環境下においてホスト間共用ファイル
に対して同時アクセス制御を行っている計算機システム
等では、計算機システムの性能の低下の要因になるとい
う欠点がある。
In addition, in the case of the latter deadlock avoidance technique, it is necessary to issue frequent unlock requests to sequentially unlock shared locks, so it can be used as a management table for lock management when unlofter performance is poor. In computer systems that use media other than memory, or in computer systems that control simultaneous access to files shared between hosts in a loosely coupled multiprocessor environment, this disadvantage can cause a decline in the performance of the computer system. There is.

本発明の目的は、上述の点に鑑み、デッドロックの発生
時点での処理の取消しの必要性がない場合を判別するこ
とにより、デッドロック回避のためのアンロック要求の
発行を最小限に抑えるとともに処理を前方向に進ませて
しまい、しかもファイル内容の整合性は保証するファイ
ル同時アクセス制御方式を提供することにある。
In view of the above-mentioned points, an object of the present invention is to minimize the issuance of unlock requests to avoid deadlock by determining when there is no need to cancel processing at the time of occurrence of deadlock. The object of the present invention is to provide a simultaneous file access control method that allows processing to proceed in the forward direction while guaranteeing the consistency of file contents.

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

本発明のファイル同時アクセス制御方式は、ファイルと
、このファイルをアクセスする複数のプロセスと、これ
ら複数のプロセスからのファイル内のブロックへの共用
ロック要求、 1Jl−他ロツク要求およびアンロック
要求を受け取りブロックのロック状態を監視しロック要
求に対してロック待ちが発生するときにはロック要求プ
ロセスを待たせ口、り待ちが複数発生した結果としてロ
ック待ちプロセスがデッドロック状態となった場合には
デッドロック関連プロセスのいずれか1つのプロセスに
対してデッドロック発生通知を返すロック管理装置とを
備えた計算機システムにおいて、前記ロック管理装置に
設けられ共用ロックをかけたブロックに他プロセスが排
他ロック要求を出したことによりデッドロックが発生し
たときに共用ロックをかけたプロセスにデッドロック発
生情報および共用ロックをかけたブロックのブロック識
別情報を含む共用ブロックデッドロック通知を前記デッ
ドロック発生通知の一種として返す共用ブロンクデノド
ロンク検出手段と、各プロセスに設けられ前記共囲ブロ
ックデッドロック検出手段から前記共用ブロックデッド
ロック通知を受けたときに前記プロ・ツク識別情報で指
定されたブロックのみに対するアンロック要求を発行す
る共用ブロックデッドロック回避手段と、各プロセスに
設けられ前記共用ブロックデッドロック回避手段により
アンロック要求されたブロックを自プロセスが再度アク
セスする必要が出てくるかどうかを監視し再アクセスの
必要を検出したときに自プロセスによるファイル更新の
取消し処理と自プロセスによりロックしている全ブロッ
クのアンロック要求発行処理とを行う共用ブロックデッ
ドロック事後手段とを有する。
The simultaneous file access control method of the present invention includes a file, a plurality of processes accessing this file, a shared lock request to a block within the file from these plural processes, and 1Jl-receives other lock requests and unlock requests. It monitors the lock status of blocks, and when a lock wait occurs in response to a lock request, it causes the lock request process to wait, and if the lock wait process is in a deadlock state as a result of multiple waits, it is related to a deadlock. In a computer system equipped with a lock management device that returns a deadlock occurrence notification to any one of the processes, another process issues an exclusive lock request to a block that is provided with the lock management device and has a shared lock. A shared block that returns, as a type of deadlock occurrence notification, a shared block deadlock notification containing deadlock occurrence information and block identification information of the block that has held the shared lock to the process that has acquired the shared lock when a deadlock occurs. and a shared block deadlock detection means provided in each process, when receiving the shared block deadlock notification from the enclosing block deadlock detection means, sends an unlock request only to the block specified by the program identification information. The issued shared block deadlock avoidance means and the shared block deadlock avoidance means provided in each process monitor whether or not the own process will need to access the block again, and whether re-access is necessary. The shared block deadlock post-deadlock means includes a shared block deadlock post-deadlock means for canceling a file update by the own process and issuing an unlock request for all blocks locked by the own process when a deadlock is detected.

〔作用〕[Effect]

本発明のファイル同時アクセス制御方式では、共用ブロ
ックデッドロック検出手段がロック管理装置に設けられ
共用ロックをかけたブロックに他プロセスが排他ロック
要求を出したことによりデッドロックが発生したときに
共用ロックをかけたプロセスにデッドロック発生情報お
よび共用ロックをかけたブロックのブロック識別情報を
含む共用ブロックデッドロック通知をデッドロック発生
通知の一種として返し、共用ブロックデッドロック回避
手段が各プロセスに設けられ共用プロックデッドロック
検出手段から共用ブロックデッドロック通知を受けたと
きにブロック識別情報で指定されたブロックのみに対す
るアンロック要求を発行し、共用ブロックデッドロック
事後手段が各プロセスに設けられ共用ブロックデッドロ
ック回避手段によりアンロック要求されたブロックを自
プロセスが再度アクセスする必要が出てくるがどうかを
監視し再アクセスの必要を検出したときに自プロセスに
よるファイル更新の取消し処理と自プロセスによりロッ
クしている全ブロックのアンロック要求発行処理とを行
う。
In the file simultaneous access control method of the present invention, a shared block deadlock detection means is provided in the lock management device, and when a deadlock occurs due to another process issuing an exclusive lock request to a block that has a shared lock, the shared block deadlock detection means is installed in the lock management device. A shared block deadlock notification that includes deadlock occurrence information and block identification information of the block that has acquired a shared lock is returned to the process that applied the shared lock as a type of deadlock occurrence notification. When a shared block deadlock notification is received from the block deadlock detection means, an unlock request is issued only for the block specified by the block identification information, and shared block deadlock post-measures are provided in each process to avoid shared block deadlock. The process monitors whether the block requested to be unlocked by the process needs to be accessed again by the process, and when the need for re-access is detected, the process cancels the file update by the process and locks the block. Performs unlock request issuing processing for all blocks.

〔実施例〕〔Example〕

次に、本発明について図面を参照して詳細に説明する。 Next, the present invention will be explained in detail with reference to the drawings.

第1図は、本発明の一実施例のファイル同時アクセス制
御方式の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of a simultaneous file access control system according to an embodiment of the present invention.

本実施例のファイル同時アクセス制御■方式は、複数の
ファイル10からなるファイル群lと、共用ブロックデ
ッドロック回避手段21および共用ブロックデッドロッ
ク事後手段22を含む複数のプロセス20からなるプロ
セス群2と、共用ブロックデッドロック検出手段31を
含むロック管理装置3とから、その主要部が構成されて
いる。
The simultaneous file access control method (2) of this embodiment consists of a file group 1 consisting of a plurality of files 10 and a process group 2 consisting of a plurality of processes 20 including a shared block deadlock avoidance means 21 and a shared block deadlock post-deadlock means 22. , and a lock management device 3 including a shared block deadlock detection means 31.

プロセス20は、その規約としてファイル10に対して
ファイルアクセスAを実行する際に事前にロック管理装
置3に対してロック要求Rを発行してファイル10のア
クセス対象ブロックをロック状態にするものとする。つ
まり、ファイル2oは、ファイルアクセスAがリード(
READ)アクセスならばロック管理装置3に対して少
なくとも共用ロック要求を発行し、ライト(WRITE
)アクセスならば排他ロック要求を発行する。また、プ
ロセス20は、一連のファイルアクセスAが終了したと
きにロック管理装置3に対してロック要求Rを取り消す
アンロック要求Rを発行して対応ブロックのロック状態
を解除させる。
As a rule, the process 20 issues a lock request R to the lock management device 3 in advance when executing file access A to the file 10 to lock the block to be accessed in the file 10. . In other words, file 2o is read by file access A (
If it is a READ) access, at least a shared lock request is issued to the lock management device 3, and a write (WRITE) request is issued to the lock management device 3.
) access, an exclusive lock request is issued. Furthermore, when the series of file accesses A ends, the process 20 issues an unlock request R for canceling the lock request R to the lock management device 3 to release the locked state of the corresponding block.

共用ブロックデッドロック回避手段21は、自プロセス
20からのロック管理装置3に対するロック要求Rに対
してロック管理装置3がら共用ブロックデソドロフタ通
知が返された場合に、共用プロンクデッドロック通知中
のブロック識別情報で指定されたブロックがその時点で
アンロック可能であるならばこの指定されたlブロック
のみに対するアンロック要求を発行する手段である。
When the lock management device 3 returns a shared block deadlock notification in response to a lock request R from the self-process 20 to the lock management device 3, the shared block deadlock avoidance unit 21 prevents the shared block deadlock from being notified. If the block specified by the block identification information can be unlocked at that time, it is a means for issuing an unlock request only for this specified l block.

共用ブロックデッドロック事後手段22は、自プロセス
20の共用ブロックデッドロック回避手段21を用いた
以後の処理で、アンロックしたブロックを再度アクセス
しないかどうかを監視して、再アクセスの必要が生じた
場合には、この時点で従来のデッドロック回避処理であ
る自プロセス20によるファイル更新の取消し処理と自
プロセス2oによりロックしている全ブロックのアンロ
ック要求の発行処理とを行う手段である。
The shared block deadlock post-execution means 22 monitors whether the unlocked block will not be accessed again in subsequent processing using the shared block deadlock avoidance means 21 of the own process 20, and if the need for re-access has arisen. In this case, at this point, the current deadlock avoidance process is to cancel the file update by the own process 20 and issue a request to unlock all the blocks locked by the own process 2o.

ロック管理装置1!3は、プロセス20からのロック要
求Rまたはアンロック要求Rを受け取ると、どのプロセ
ス20がどのブロックをロックしているかを管理し、す
でにロック中のブロックに対して他のプロセス20から
のロック要求Rがくる場合として共用ロック状態のブロ
ックへの共用ロック要求がくる場合以外の場合には、ロ
ックを要求するプロセス20を待ち状態とし、またこの
ような待ち状態のプロセス20が複数個できてデッドロ
ック状態となった場合には、デッドロックに関連するプ
ロセス20のうちのいずれか1つのプロセス20に対し
てデッドロックが発生した旨を示すデッドロック発生通
知を返す。
When the lock management device 1!3 receives a lock request R or an unlock request R from a process 20, it manages which process 20 is locking which block, and manages the block that is already locked by another process. When a lock request R from 20 is received, except when a shared lock request for a block in a shared lock state is received, the process 20 requesting the lock is placed in a waiting state, and the process 20 in such a waiting state is placed in a waiting state. If a deadlock state occurs due to a plurality of deadlocks, a deadlock occurrence notification indicating that a deadlock has occurred is returned to any one of the processes 20 related to the deadlock.

共用ブロックデソドロ7り検出手段31は、デッドロッ
クに関連するプロセス20のうちで共用ロックをかけた
ブロックに他のプロセス20が排他ロック要求を出して
待ちになっているプロセス20が存在する場合には、共
用ロックをかけているプロセス20のいずれか1つに対
してデッドロックが発生した旨を示すデッドロック発生
情報とデッドロックを引き起こしている共用ロック状態
にあるブロックのブロック識別情報とを含む共用ブロッ
クデッドロック通知という特殊なデッドロック発生通知
を返す手段である。
The shared block lock detection means 31 detects when there is a deadlock-related process 20 that is waiting for another process 20 to issue an exclusive lock request to a block that has a shared lock. includes deadlock occurrence information indicating that a deadlock has occurred for any one of the processes 20 holding the shared lock, and block identification information of the block in the shared lock state causing the deadlock. This is a means of returning a special deadlock occurrence notification called a shared block deadlock notification.

次に、このように構成された本実施例のファイル同時ア
クセス制御方式の動作について第2図fat〜+Ilに
示すタイミングチャートを参照しながら説明する。
Next, the operation of the simultaneous file access control system of this embodiment configured as described above will be explained with reference to the timing charts shown in FIG. 2 fat to +Il.

第2図(al〜(L)は、プロセス20とこのプロセス
20とは異なる他のプロセス(ブ°ロセス20と区別す
るために符号20”を付して示す)20”がファイル1
0のブロックNとこのブロックNとは異なる他のブロッ
クN′とに対するロック要求Rによりデッドロックを起
こしてプロセス20に対して共用ブロックデッドロック
通知が返ると想定した場合のブロック資源からなる2次
元平面上のロック要求順序を示すタイミングチャートで
あり、デッドロック発生後にいかにしてデッドロック状
態を回避してプロセス20が進行して行くかを図示する
ものである。ここで、第2図(a)〜(11中のT1〜
T9は時刻を示し、数字の大きいものほど時間が後であ
ることを示す、また、白丸印はブロックが共用ロック状
態、黒丸印はブロックが排他ロック状態であることを示
している。
In FIG. 2 (al to (L)), a process 20 and another process different from this process 20 (denoted with the reference numeral 20'' to distinguish it from the process 20) 20'' is a file 1.
A two-dimensional block consisting of block resources assuming that a deadlock occurs due to a lock request R for block N 0 and another block N' different from this block N, and a shared block deadlock notification is returned to process 20. This is a timing chart showing the order of lock requests on a plane, and illustrates how the process 20 proceeds while avoiding a deadlock state after a deadlock occurs. Here, FIG. 2(a) to (T1 in 11 to
T9 indicates time, and a larger number indicates a later time. Also, a white circle indicates that the block is in a shared lock state, and a black circle indicates that the block is in an exclusive lock state.

第2図fatに示すように、時刻T1において、プロセ
ス20がプロセス20°により現在排他ロック状態であ
るブロックN°をロックするためにロック管理装置3を
対してロック要求Rを発行すると、プロセス20はロッ
ク管理装置3により待ち状態にされる。
As shown in FIG. 2 fat, at time T1, when the process 20 issues a lock request R to the lock management device 3 in order to lock the block N° currently in the exclusive lock state by the process 20°, the process 20 is placed in a waiting state by the lock management device 3.

次に、第2図(blに示すように、時刻T2において、
こんどはプロセス20”がプロセス20により現在共用
ロック状態であるブロックNを排他口7りしようとして
ロック管理装置3に対して排他ロック要求を発行したと
すると、ロック管理!JIt3においてデッドロック状
態の発生が検出される。このため、ロック管理値W3は
、共用ブロックデッドロック検出手段31を適用して、
ブロックNに共用ロックをかけているプロセス20に対
してデッドロック発生情報および共用ロック状態である
ブロックNのプロ・ツク識別情報を含む共用ブロックデ
ッドロック通知を返す。
Next, as shown in FIG. 2 (bl), at time T2,
This time, if process 20" issues an exclusive lock request to lock management device 3 in an attempt to take exclusive access to block N, which is currently in a shared lock state, a deadlock state will occur in lock management JIt3. Therefore, the lock management value W3 is determined by applying the shared block deadlock detection means 31.
A shared block deadlock notification containing deadlock occurrence information and program identification information of block N in a shared lock state is returned to the process 20 that holds a shared lock on block N.

続いて、第2図fclに示すように、時刻T3において
、共用ブロックデッドロック通知を受けたプロセス20
は、共用ブロックデッドロック回避手段21を用いて共
用ロック状態であるブロックNのみをアンロックするア
ンロック要求をロック管理装置3に対して発行する。こ
のため、ロック管理装置3は、ブロックNをアンロック
し、プロセス20とプロセス20”とのデッドロック状
態が回避される。ただし、プロセス20は依然として待
ち状態のままである。
Subsequently, as shown in FIG. 2 fcl, at time T3, the process 20 that received the shared block deadlock notification
uses the shared block deadlock avoidance means 21 to issue an unlock request to the lock management device 3 to unlock only the block N that is in the shared lock state. Therefore, the lock management device 3 unlocks the block N, and the deadlock state between the processes 20 and 20'' is avoided. However, the process 20 remains in the waiting state.

次に、第2図1d)に示すように、時刻T4において、
ブロックNがアンロックされたためにプロセス20“の
ブロックNへの排他ロック要求の待ちが解け、プロセス
20”が先の処理に進み出す。
Next, as shown in FIG. 2 1d), at time T4,
Since block N has been unlocked, process 20'' is no longer waiting for an exclusive lock request to block N, and process 20'' proceeds to the next process.

続いて、第2図(elに示すように、時刻T5において
、プロセス20″の処理が終了すると、プロセス20”
によりロックされていた全てのブロックがアンロックさ
れ、これを契機にプロセス20のブロックN”でのロッ
ク待ちも解かれる。
Subsequently, as shown in FIG. 2 (el), at time T5, when the process 20'' is completed, the process 20''
All locked blocks are unlocked, and this also releases the process 20 from waiting for a lock on block N''.

次に、第2図([1に示すように、時刻T6において、
ブロックN”でのロック待ちを解かれたプロセス20で
・は、共用ブロックデッドロック事後手段22を用いて
処理が進み出す。以後の処理で、プロセス20が再度ブ
ロックNをアクセスすることがなければ、デッドロック
回避のための自プロセス20によるファイル更新の取消
し処理と自プロセス20によりロック中の全ブロックの
アンロック要求発行処理とをせずに済ますことができる
Next, as shown in FIG. 2 ([1], at time T6,
When the process 20 is released from waiting for the lock on block N'', processing proceeds using the shared block deadlock post-deadlock means 22.If the process 20 does not access block N again in the subsequent processing, This eliminates the need for the self-process 20 to cancel a file update in order to avoid deadlock and to issue an unlock request for all blocks locked by the self-process 20.

もし、第2図(1に示すように、時刻T7においテ、第
2図tr)の状態の後のプロセス20の処理で共用ブロ
ックデッドロック回避手段21によりアンロックしたブ
ロックNを再アクセスしようとすると、共用ブロックデ
ッドロック事後手段22によりこの状況が検出され、従
来はデッドロック回避のためになされていた自プロセス
20によるファイル更新の取消し処理と自プロセス20
によりロック中の全ブロックのアンロック要求の発行処
理とがなされることになる。
If the process 20 attempts to re-access the block N unlocked by the shared block deadlock avoidance means 21 in the process 20 after the state shown in FIG. Then, this situation is detected by the shared block deadlock post-deadlock means 22, and the process of canceling the file update by the own process 20, which was conventionally done to avoid deadlock, and the own process 20
As a result, an unlock request is issued for all locked blocks.

この結果、第2図+11に示すように、時刻T8におい
て、プロセス20では自プロセス20によるファイルl
Oの更新が取り消されるとともに、ロック管理装置3で
は自プロセス20によりロック中の全ブロックのアンロ
ックがなされ、プロセス20が処理の開始状態に戻る。
As a result, as shown in FIG. 2+11, at time T8, the process 20 files l
The update of O is canceled, and in the lock management device 3, all blocks locked by the own process 20 are unlocked, and the process 20 returns to the processing start state.

プロセス20は、処理としては通常再処理をすることに
なる。
The process 20 normally involves reprocessing.

したがって、第2図+11に示すように、時刻T9にお
いて、プロセス20は、再処理の結果、先程は時刻T7
で逆戻りをしなければならなかったところも、今回は通
り抜けられることになる。
Therefore, as shown in FIG. 2+11, at time T9, as a result of reprocessing, the process 20 is
This time, you will be able to go through the places where you had to go back.

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

以上説明したように本発明は、共用ブロックデッドロッ
ク回避のために共用ブロックの1ブロツクのみをアンロ
ックするアンロック要求を発行して処理を進めるように
したことにより、デッドロック回避のためのファイル更
新の取消し処理とアンロック要求発行処理とプロセスの
再実行処理とをデッドロック発生時に行う確率が低下し
、従来のファイル同時アクセス制御方式のデッドロック
回避技術のような計算機システムの性能低下を起こさず
にデッドロック状態を有効に回避することができるとい
う効果がある。
As explained above, in order to avoid deadlocks in shared blocks, the present invention issues an unlock request to unlock only one block of a shared block and proceeds with the process. The probability that update cancellation processing, unlock request issuing processing, and process re-execution processing will be performed when a deadlock occurs is reduced, and performance degradation of the computer system will not occur as with the deadlock avoidance technology of the conventional file simultaneous access control method. This has the effect of effectively avoiding a deadlock situation without causing any problems.

また、本発明は、従来のファイル同時アクセス制御方式
におけるデッドロック回避技術を基礎として容易に構築
できるという効果もある。
Another advantage of the present invention is that it can be easily constructed based on deadlock avoidance techniques in conventional file simultaneous access control systems.

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

第1図は本発明の一実施例の構成を示すブロック図、 第2図(al〜(11は本実施例のファイル同時アクセ
ス制御方式の動作を説明ためのタイミングチャートであ
る。 図において、 1・・・ファイル群、 2・・・プロセス群、 3・・・ロック管理装置、 10・・・ファイル、 20・・・プロセス、 21・・・共用ブロックデッドロック回避手段、22・
・・共用ブロックデッドロック事後手段、31・・・共
用ブロックデッドロック検出手段である。
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 (11 is a timing chart for explaining the operation of the simultaneous file access control method of this embodiment. ... File group, 2... Process group, 3... Lock management device, 10... File, 20... Process, 21... Shared block deadlock avoidance means, 22.
. . . Shared block deadlock post-measurement means; 31 . . . Shared block deadlock detection means.

Claims (1)

【特許請求の範囲】 ファイルと、このファイルをアクセスする複数のプロセ
スと、これら複数のプロセスからのファイル内のブロッ
クへの共用ロック要求、排他ロック要求およびアンロッ
ク要求を受け取りブロックのロック状態を監視しロック
要求に対してロック待ちが発生するときにはロック要求
プロセスを待たせロック待ちが複数発生した結果として
ロック待ちプロセスがデッドロック状態となった場合に
はデッドロック関連プロセスのいずれか1つのプロセス
に対してデッドロック発生通知を返すロック管理装置と
を備えた計算機システムにおいて、前記ロック管理装置
に設けられ共用ロックをかけたブロックに他プロセスが
排他ロック要求を出したことによりデッドロックが発生
したときに共用ロックをかけたプロセスにデッドロック
発生情報および共用ロックをかけたブロックのブロック
識別情報を含む共用ブロックデッドロック通知を前記デ
ッドロック発生通知の一種として返す共用ブロックデッ
ドロック検出手段と、 各プロセスに設けられ前記共用ブロックデッドロック検
出手段から前記共用ブロックデッドロック通知を受けた
ときに前記ブロック識別情報で指定されたブロックのみ
に対するアンロック要求を発行する共用ブロックデッド
ロック回避手段と、各プロセスに設けられ前記共用ブロ
ックデッドロック回避手段によりアンロック要求された
ブロックを自プロセスが再度アクセスする必要が出てく
るかどうかを監視し再アクセスの必要を検出したときに
自プロセスによるファイル更新の取消し処理と自プロセ
スによりロックしている全ブロックのアンロック要求発
行処理とを行う共用ブロックデッドロック事後手段と、 を有することを特徴とするファイル同時アクセス制御方
式。
[Claims] A file, multiple processes that access this file, and receiving shared lock requests, exclusive lock requests, and unlock requests for blocks within the file from these multiple processes, and monitoring the lock state of the blocks. However, when a lock wait occurs in response to a lock request, the lock request process is made to wait, and if the lock wait process becomes deadlocked as a result of multiple lock waits, one of the deadlock-related processes is In a computer system equipped with a lock management device that returns a deadlock occurrence notification to a user, when a deadlock occurs due to another process issuing an exclusive lock request to a block that is provided with a shared lock in the lock management device. shared block deadlock detection means for returning, as a type of deadlock occurrence notification, a shared block deadlock notification including deadlock occurrence information and block identification information of the block that has acquired the shared lock to the process that has acquired the shared lock; shared block deadlock avoidance means provided in the shared block deadlock detection means for issuing an unlock request only for the block specified by the block identification information when the shared block deadlock notification is received from the shared block deadlock detection means; The shared block deadlock avoidance means monitors whether the block requested to be unlocked by the shared block deadlock avoidance means will need to be accessed again by the own process, and cancels the file update by the own process when the need for re-access is detected. and shared block deadlock post-deadlock means for issuing unlock requests for all blocks locked by the own process.
JP62143842A 1987-06-09 1987-06-09 Control system for simultaneous access of files Pending JPS63307538A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62143842A JPS63307538A (en) 1987-06-09 1987-06-09 Control system for simultaneous access of files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62143842A JPS63307538A (en) 1987-06-09 1987-06-09 Control system for simultaneous access of files

Publications (1)

Publication Number Publication Date
JPS63307538A true JPS63307538A (en) 1988-12-15

Family

ID=15348218

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62143842A Pending JPS63307538A (en) 1987-06-09 1987-06-09 Control system for simultaneous access of files

Country Status (1)

Country Link
JP (1) JPS63307538A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271258A (en) * 2018-08-28 2019-01-25 百度在线网络技术(北京)有限公司 Implementation method, device, terminal and the storage medium that Read-Write Locks are reentried

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271258A (en) * 2018-08-28 2019-01-25 百度在线网络技术(北京)有限公司 Implementation method, device, terminal and the storage medium that Read-Write Locks are reentried
CN109271258B (en) * 2018-08-28 2020-11-17 百度在线网络技术(北京)有限公司 Method, device, terminal and storage medium for realizing re-entry of read-write lock
US11119832B2 (en) 2018-08-28 2021-09-14 Baidu Online Network Technology (Beijing) Co., Ltd. Method and device for implementing read-write lock reentry, terminal and storage medium

Similar Documents

Publication Publication Date Title
US8024528B2 (en) Global address space management
US7337290B2 (en) Deadlock resolution through lock requeing
US5423044A (en) Shared, distributed lock manager for loosely coupled processing systems
US6463532B1 (en) System and method for effectuating distributed consensus among members of a processor set in a multiprocessor computing system through the use of shared storage resources
US5940828A (en) Locking contention resolution for shared resources
US7631150B2 (en) Memory management in a shared memory system
US8185710B2 (en) Hardware memory locks
US20050022047A1 (en) Conditional data access after database system failure
JPH0465414B2 (en)
US20070101071A1 (en) Realtime-safe read copy update with per-processor read/write locks
EP0490525A2 (en) Removal of data from a shared cache
JPH03161859A (en) Request control method and access control system
US20070067770A1 (en) System and method for reduced overhead in multithreaded programs
WO2016045605A2 (en) Concurrency control in a shared storage architecture supporting on-page implicit locks
KR20170132873A (en) Method for processing database transactions in a distributed computing system
JPH0552972B2 (en)
JPH04310148A (en) High-speed accessing method for data unit
US20020138706A1 (en) Reader-writer lock method and system
US11113251B2 (en) Transaction manager
US20080082622A1 (en) Communication in a cluster system
CN115629822A (en) Concurrent transaction processing method and system based on multi-core processor
JPS63307538A (en) Control system for simultaneous access of files
JPH0277868A (en) Inter-system data base sharing method
JPS63228335A (en) Event information and reception processing system in computer system
US7447875B1 (en) Method and system for management of global queues utilizing a locked state