JPH0769840B2 - Lock management controller - Google Patents

Lock management controller

Info

Publication number
JPH0769840B2
JPH0769840B2 JP61275743A JP27574386A JPH0769840B2 JP H0769840 B2 JPH0769840 B2 JP H0769840B2 JP 61275743 A JP61275743 A JP 61275743A JP 27574386 A JP27574386 A JP 27574386A JP H0769840 B2 JPH0769840 B2 JP H0769840B2
Authority
JP
Japan
Prior art keywords
management
lock
resource
lock management
identifier
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
JP61275743A
Other languages
Japanese (ja)
Other versions
JPS63129428A (en
Inventor
理一郎 武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61275743A priority Critical patent/JPH0769840B2/en
Publication of JPS63129428A publication Critical patent/JPS63129428A/en
Publication of JPH0769840B2 publication Critical patent/JPH0769840B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime 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

Description

【発明の詳細な説明】 〔概要〕 計算機における、複数のプロセスで共用する資源の排他
制御のためのロック管理の改良した制御装置である。
DETAILED DESCRIPTION [Outline] This is a control device with improved lock management for exclusive control of resources shared by a plurality of processes in a computer.

複数の共用資源のロック管理を複数の管理プロセスに分
配して分担させるようにし、資源の識別名からハッシュ
関数によって求める値によってその資源を受け持つ管理
プロセスを決定するように構成する。
The lock management of a plurality of shared resources is distributed and shared among a plurality of management processes, and the management process responsible for the resources is determined by a value obtained by a hash function from the identification name of the resource.

この装置により、複数の管理プロセスでロック管理を分
担して、ロック管理の処理を高速化するシステムの構成
が容易になる。
This device facilitates the configuration of a system in which lock management is shared by a plurality of management processes and the speed of lock management processing is increased.

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

本発明は、計算機における、複数のプロセスで共用する
資源の排他制御のためのロック管理の制御装置に関す
る。
The present invention relates to a lock management control device for exclusive control of resources shared by a plurality of processes in a computer.

〔従来の技術〕[Conventional technology]

複数のプロセスの共存可能な計算機においては、それら
のプロセスで共用される計算機資源(以下において単に
資源という)が有る場合には、例えばデータベースの所
定のデータ単位のような資源の場合に、公知のようにそ
の資源を1プロセスが使用している間、他のプロセスに
よるその資源の使用を禁止するための、いわゆる排他制
御が必要になる。
In a computer in which a plurality of processes can coexist, if there is a computer resource (hereinafter simply referred to as a resource) shared by those processes, a known resource such as a predetermined data unit of a database is known. As described above, while one process is using the resource, so-called exclusive control is required to prohibit the use of the resource by another process.

公知のように、ロックは排他制御の手段として広く使用
される。その場合、排他制御の必要な資源を使用するプ
ロセスは使用に先立って、管理プロセスにその資源の識
別名を示して、ロックを要求する。
As is well known, locks are widely used as a means of exclusive control. In that case, a process using a resource that requires exclusive control shows the identification name of the resource to the management process and requests a lock prior to use.

管理プロセスは、例えば指定の識別名の資源ごとに設け
た、公知のいわゆる待ち行列ポートに、要求元プロセス
を接続し、そのポートの行列の先頭になったとき、その
プロセスのみに当該資源の使用を許すように制御する。
The management process connects a requesting process to a well-known so-called queue port, which is provided for each resource of a specified identification name, and when it becomes the head of the queue of that port, the resource is used only for that process. Control to allow.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

従来このような制御を行う管理プロセスは、同一資源に
対する制御の競合を考慮して、実質的には同時に1管理
プロセスのみが処理を実行するように制御しているの
で、その結果多数のプロセスの各種資源に対するロック
要求が集中した場合に、ロック処理待ち時間の増大によ
るシステムの処理効率低下が問題になる。
Conventionally, a management process that performs such control controls the management process so that only one management process executes the process at substantially the same time in consideration of control competition for the same resource. When lock requests for various resources are concentrated, a decrease in system processing efficiency due to an increase in lock processing waiting time becomes a problem.

その対策として、各資源についてそのロック管理を行う
1管理プロセスを定めるようにして、複数の管理プロセ
スに担当資源を分配することが考えられる。
As a countermeasure, it is conceivable to set one management process for performing lock management for each resource and distribute the resource in charge to a plurality of management processes.

そのようにすれば、複数プロセッサを有する計算機の環
境においては、それらの管理プロセスによって互いに異
なる資源に対するロック要求を並行に処理することが可
能となり、処理待ち時間の減少を期待できる。
By doing so, in an environment of a computer having a plurality of processors, lock requests for different resources can be processed in parallel by their management processes, and a reduction in processing waiting time can be expected.

しかしその場合には、ロック要求において複数の管理プ
ロセスと分担資源との対応を識別して、所要の管理プロ
セスに要求を出さなければならないが、従来そのための
効率のよい制御方式が提供されていない。
However, in that case, it is necessary to identify the correspondence between a plurality of management processes and the shared resources in the lock request and issue the request to the required management process, but conventionally, an efficient control method for that purpose has not been provided. .

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

図は本発明の構成を示すブロック図である。 The figure is a block diagram showing the configuration of the present invention.

図において、1はロック要求元のプロセスであり、3は
資源6の識別名2から所定のハッシュ関数値を出力する
ハッシュ関数評価部、4はハッシュ関数値で索引して管
理プロセス識別子を与えるハッシュテーブル、5はその
識別子によって呼び出される管理プロセスである。
In the figure, 1 is a process of a lock request source, 3 is a hash function evaluation unit that outputs a predetermined hash function value from the identification name 2 of the resource 6, and 4 is a hash that indexes by the hash function value and gives a management process identifier. Table 5 is a management process called by the identifier.

〔作用〕[Action]

ロック要求元のプロセス1はロック要求に際し、所要の
資源6の識別名2から、所定のハッシュ関数評価部3に
よって関数値を求める。
At the time of the lock request, the process 1 of the lock request source obtains the function value from the identification name 2 of the required resource 6 by the predetermined hash function evaluation unit 3.

その関数値により、システムのハッシュテーブル4を索
引して必要な管理プロセス5の識別子を得、該識別子に
よって管理プロセス5を呼び、識別名2によりロック処
理を要求する。
Based on the function value, the hash table 4 of the system is indexed to obtain the required identifier of the management process 5, the management process 5 is called by the identifier, and the lock process is requested by the identification name 2.

管理プロセス5は、要求で指定される資源の識別名によ
り、通常のように指定の資源のロック管理を処理する。
The management process 5 handles the lock management of the designated resource as usual by the identifier of the resource designated by the request.

この方式により、複数の管理プロセス5に資源6を振り
分けて管理を分担させ、管理プロセス間で重複して同じ
計算機資源を分担することが無いように振り分けるの
で、各管理プロセスは他の管理プロセスと同じ計算機資
源についてロック管理処理を同時に行う場合に生じ得る
不都合な干渉を考慮する必要無く、複数プロセッサの並
行処理可能な環境において、複数の管理プロセスが効率
良く並行して処理を行うことが可能であり、又ロック管
理を要求する各プロセスは、資源別に必要な管理プロセ
スを容易に識別して呼び出すことができるので、ロック
管理の処理効率を向上できる。
According to this method, the resources 6 are allocated to a plurality of management processes 5 so as to share the management, and the management resources are allocated so as not to share the same computer resources among the management processes. It is possible to efficiently perform parallel processing by multiple management processes in an environment in which multiple processors can perform parallel processing without having to consider inconvenient interference that may occur when performing lock management processing on the same computer resources at the same time. Also, since each process that requests lock management can easily identify and call a necessary management process for each resource, the processing efficiency of lock management can be improved.

〔実施例〕〔Example〕

図においてプロセス1は、各種の処理業務に対応した、
一般に異なる内容を持つプロセスであり、但し図示のよ
うにロック要求のための同一の機構を持つものとする。
In the figure, process 1 corresponds to various processing tasks,
Generally, the processes have different contents, but have the same mechanism for the lock request as shown.

他方、管理プロセス5は公知のロック管理のための通常
の制御機能を有する同一の内容のプロセスでよく、運用
上で図示のように特定の資源6のグループのみを扱うよ
うに分配し、それに応じたハッシュテーブル4を作成す
れば、自動的に各管理プロセス5が異なる資源6を分担
するようになる。
On the other hand, the management process 5 may be a process of the same content having a normal control function for publicly known lock management, and is distributed so as to handle only a specific group of resources 6 as shown in operation, and accordingly If the hash table 4 is created, each management process 5 automatically shares different resources 6.

ロック要求元のプロセス1はロック要求に際し、所要の
資源6の識別名2から、所定のハッシュ関数評価部3に
よって関数値を求める。
At the time of the lock request, the process 1 of the lock request source obtains the function value from the identification name 2 of the required resource 6 by the predetermined hash function evaluation unit 3.

資源の識別名は、通常比較的長い文字列で構成されるの
で、ハッシュ関数として例えば次のような関数を使用し
て、比較的短いビット列の値にできるだけ偏りなく変換
するようにハッシュ関数評価部3を構成する。
Since the identifier of a resource is usually composed of a relatively long character string, the hash function evaluation unit is used to convert it to a relatively short bit string value as evenly as possible by using the following function as a hash function. Make up 3.

即ち、例えば12バイトの識別名を、3バイトづつの4グ
ループに分割し、2グループはビットの並びを反転させ
た後、4グループのビット列の排他的論理和を求め24ビ
ットのビット列を得る。
That is, for example, a 12-byte identification name is divided into 4 groups of 3 bytes each, the bit groups of the 2 groups are inverted, and the exclusive OR of the 4 groups of bit strings is obtained to obtain a 24-bit bit string.

このビット列を被除整数として、適当な整数で除算を行
い、その剰余を関数評価結果として、ハッシュ関数評価
部3から出力する。
This bit string is used as a dividend integer, division is performed by an appropriate integer, and the remainder is output from the hash function evaluation unit 3 as a function evaluation result.

以上の例のようにして、例えば8ビットの関数値出力を
得るようにした場合には、ハッシュテーブル4として、
256項からなるテーブルを設け、各項に管理プロセス5
の識別子を表示する。
When the 8-bit function value output is obtained as in the above example, the hash table 4 is
A table consisting of 256 items is provided, and each item has a management process 5
Display the identifier of.

この例の場合に管理プロセスは最大256個設けることが
でき、それより少ない場合には、1管理プロセスの識別
子が、2項以上に表示されるようにする。
In the case of this example, a maximum of 256 management processes can be provided. If the number is smaller than that, one management process identifier is displayed in two or more terms.

各ロック要求プロセス1は、以上によって求めた関数値
により、システムのハッシュテーブル4を索引して必要
な管理プロセス5の識別子を得、該識別子2によって管
理プロセス5を呼び、識別名2によって資源を指定し
て、そのロック処理を要求する。
Each lock requesting process 1 indexes the hash table 4 of the system by the function value obtained as described above to obtain the required management process 5 identifier, calls the management process 5 by the identifier 2 and allocates the resource by the identification name 2. Specify and request the lock processing.

この方式により、複数の管理プロセス5に資源6を振り
分けて管理を分担させ、資源別に必要な管理プロセスを
容易に識別して呼び出すことができる。
With this method, it is possible to distribute the resources 6 to a plurality of management processes 5 and share the management, and easily identify and call the necessary management process for each resource.

又、運用結果等により、管理プロセス5の数、或いは管
理プロセス5に対する分担資源の分配の変更をする場合
には、ハッシュテーブル4の内容及びハッシュ関数評価
部3の関数の何れか一方又は両方を変更して対処するこ
とができ、管理プロセス5を変更する必要がない。
Further, when changing the number of management processes 5 or distribution of shared resources to the management processes 5 according to the operation result, etc., either one or both of the contents of the hash table 4 and the function of the hash function evaluation unit 3 should be set. It can be changed and dealt with, and it is not necessary to change the management process 5.

〔発明の効果〕 以上の説明から明らかなように、本発明によれば、計算
機における共用資源に関するロック管理処理について、
実現が容易で且つ融通性の高い高速化が得られ、計算機
の処理効率を向上するという著しい工業的効果がある。
[Effects of the Invention] As is clear from the above description, according to the present invention, the lock management process related to the shared resource in the computer,
It has a remarkable industrial effect that it is easy to realize, highly flexible, and has a high speed, and that it improves the processing efficiency of the computer.

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

図は本発明の構成を示すブロック図 である。 図において、 1はプロセス、2は識別名、3はハッシュ関数評価部、
4はハッシュテーブル、5は管理プロセス、6は資源 を示す。
The figure is a block diagram showing the configuration of the present invention. In the figure, 1 is a process, 2 is an identifier, 3 is a hash function evaluation unit,
Reference numeral 4 is a hash table, 5 is a management process, and 6 is a resource.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】計算機で実行される複数のプロセス(1)
によって共用される複数の計算機資源(6)の、該プロ
セス(1)による使用の排他制御のためのロック管理に
おいて、 該計算機に、該計算機資源(6)のロック管理を重複な
く分担する複数の管理プロセス(5)と、該管理プロセ
スを指示する識別子を保持する項からなるハッシュテー
ブル(4)とを設け、 各該プロセス(1)に、入力値を所定のハッシュ関数で
評価して、結果の評価値を出力するハッシュ関数評価部
(3)を設け、 ロック管理を要求する各該プロセス(1)は、所要の該
計算機資源(5)の識別名(2)を該ハッシュ関数評価
部(3)に入力して該評価値を得、該評価値によって該
ハッシュテーブル(4)の該項を索引し、該索引結果の
該識別子により定まる該管理プロセスに要求を発行する
ように構成されていることを特徴とするロック管理制御
装置。
1. A plurality of processes executed by a computer (1)
In the lock management for exclusive control of use of the plurality of computer resources (6) shared by the process (1), the plurality of computer resources (6) share the lock management of the computer resources (6) without duplication. A management process (5) and a hash table (4) consisting of terms holding an identifier for instructing the management process are provided, and an input value is evaluated by a predetermined hash function for each process (1), and a result is obtained. A hash function evaluation unit (3) for outputting the evaluation value of is provided, and each process (1) requesting lock management assigns the identification name (2) of the required computer resource (5) to the hash function evaluation unit (3). 3) to obtain the evaluation value, index the item in the hash table (4) by the evaluation value, and issue a request to the management process determined by the identifier of the index result. Iruko Lock management control apparatus according to claim.
JP61275743A 1986-11-19 1986-11-19 Lock management controller Expired - Lifetime JPH0769840B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61275743A JPH0769840B2 (en) 1986-11-19 1986-11-19 Lock management controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61275743A JPH0769840B2 (en) 1986-11-19 1986-11-19 Lock management controller

Publications (2)

Publication Number Publication Date
JPS63129428A JPS63129428A (en) 1988-06-01
JPH0769840B2 true JPH0769840B2 (en) 1995-07-31

Family

ID=17559774

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61275743A Expired - Lifetime JPH0769840B2 (en) 1986-11-19 1986-11-19 Lock management controller

Country Status (1)

Country Link
JP (1) JPH0769840B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3737638B2 (en) 1998-08-31 2006-01-18 インターナショナル・ビジネス・マシーンズ・コーポレーション Object lock management method and apparatus, and object lock release method and apparatus
US6697901B1 (en) * 2000-10-24 2004-02-24 Oracle International Corporation Using secondary resource masters in conjunction with a primary resource master for managing resources that are accessible to a plurality of entities

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60254342A (en) * 1984-05-31 1985-12-16 Fujitsu Ltd Controlling method of resources in using

Also Published As

Publication number Publication date
JPS63129428A (en) 1988-06-01

Similar Documents

Publication Publication Date Title
JPS62229358A (en) Processor selection system
EP0459714B1 (en) Interrupt processing allocation in a multiprocessor system
US7000051B2 (en) Apparatus and method for virtualizing interrupts in a logically partitioned computer system
US5511200A (en) Method and apparatus for providing an enhanced programmable priority interrupt controller
JPH01155451A (en) Virtual computer system
GB2085624A (en) A coupling equipment for the control of access of data processors to a data line
JPH0769840B2 (en) Lock management controller
JP3144842B2 (en) Microprocessor
JPH0991257A (en) Cpu management system
JPH0713823A (en) File resource management system of virtual computer system
JPS62180455A (en) Multiplexing processor
JPH02245864A (en) Multiprocessor system
JPS6331818B2 (en)
JPS62260257A (en) Control system for assigning input/output port
JPS62237560A (en) Multiprocessor system
JPS58222364A (en) Access control system of disc device in terminal system
JPH04149762A (en) Data control system
JPS6327740B2 (en)
JPH02281338A (en) Task control method
JPS62145441A (en) Updating processing system for key-sequenced data set
JPH03123953A (en) System for sharing peripheral equipment
JP2522161B2 (en) Volume resource management method in virtual computer system
JPH01259430A (en) Subtracting method for interval timer value
JPH0575141B2 (en)
JPH0447357A (en) Control system for virtual computer system