JPH0334031A - Exclusive controller for queue file - Google Patents

Exclusive controller for queue file

Info

Publication number
JPH0334031A
JPH0334031A JP16868589A JP16868589A JPH0334031A JP H0334031 A JPH0334031 A JP H0334031A JP 16868589 A JP16868589 A JP 16868589A JP 16868589 A JP16868589 A JP 16868589A JP H0334031 A JPH0334031 A JP H0334031A
Authority
JP
Japan
Prior art keywords
request
exclusive control
requests
task
queue 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
JP16868589A
Other languages
Japanese (ja)
Inventor
Naoki Doi
直樹 土肥
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP16868589A priority Critical patent/JPH0334031A/en
Publication of JPH0334031A publication Critical patent/JPH0334031A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To improve the processing efficiency for transfer of requests by performing the transfer of requests in a state where plural tasks share a queue file at one time without producing any conflict of the relation between a pointer and a request of the queue file. CONSTITUTION:An inter-task request transfer mechanism consists of the request transfer side tasks 1A - 1C, the request reception side tasks 2A - 2C, a queue file 3, a 1st exclusive control part 6, a 2nd exclusive control part 7, and a 3rd exclusive control part 8. Then the exclusive control is carried out every time a request writing/reading action is carried out to the file 3. Thus no con flict of the relation is produced between a pointer and a request of the file 3. As a result, the requests can be transferred in a state where the file 3 is shared by plural tasks at one time. In such a constitution, the waiting time each task is shortened and the processing efficiency is improved for transfer of requests.

Description

【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) 本発明は、キューファイルをタスク間のデータ受渡し媒
体として用いた場合に適用されるキューファイル排他制
御装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Objective of the Invention (Industrial Application Field) The present invention relates to a queue file exclusive control device that is applied when a queue file is used as a data transfer medium between tasks.

(従来の技術) 従来から、タスク間で要求を受渡す方法の一つとして、
キューファイルと呼ばれる要求の待ち行列を用いた方法
がある。
(Prior art) Conventionally, one of the methods for passing requests between tasks is
There is a method that uses a queue of requests called a queue file.

このキューファイルは、複数の要求を保管するデータ保
管部と、このデータ保管部に対する要求書込み用及び要
求読込み用ポインタを管理するポインタ管理部により実
現され、要求受渡し側のタスクから要求受取り側のタス
クへの要求の受渡しは、上記した各ポインタを用いて行
われるようになっている。
This queue file is realized by a data storage section that stores multiple requests, and a pointer management section that manages pointers for writing requests and reading requests to this data storage section. Transfer of requests to is performed using each of the above-mentioned pointers.

ところで、このようなキューファイルを用いたタスク間
要求受渡渡し機構において、それぞれ独立に動作する要
求受渡し側タスクと要求受取り側タスクが複数浮作した
場合、キューファイルにおけるポインタと要求との対応
関係に矛盾が生じる。
By the way, in such an inter-task request passing mechanism using a queue file, if there are multiple request passing tasks and request receiving tasks that operate independently, the correspondence between pointers and requests in the queue file may change. A contradiction arises.

そこで、あるタスクによるキューファイルの更新が行わ
れている間は、その他のタスクに対し排他をかけるとい
った排他制御が要求される。
Therefore, while a queue file is being updated by a certain task, exclusive control is required to apply exclusion to other tasks.

しかしながら、従来から用いられている排他制御は、一
つのタスクがキューファイルを専有するといった形で行
われるため、データ量の多い要求を受渡す場合や、受渡
しの頻度が高い場合等において、他のタスクが待機して
いる度合が高くなり、処理効率が低下するという問題が
あった。
However, the exclusive control that has been used in the past is performed in such a way that one task monopolizes a queue file, so when a request with a large amount of data is transferred or when the transfer frequency is high, it is difficult for other tasks to There is a problem in that the number of tasks waiting increases and the processing efficiency decreases.

(発明が角¥決しようとする課題) このように、キューファイルをタスク間での要求受渡し
媒体として用いて、それぞれ複数の要求受渡し側タスク
と要求受取り側タスクとの間で要求の受渡しを行う場合
、一つのタスクが長間間に渡ってキューファイルを専有
してしまうおそれがあり、結果的に要求受渡しの処理効
率が低下してしまうという問題があった。
(Problem to be solved by the invention) In this way, a queue file is used as a medium for passing requests between tasks, and requests are passed between a plurality of request-sending tasks and a plurality of request-receiving tasks. In this case, there is a risk that one task may monopolize the queue file for a long period of time, resulting in a problem in that the processing efficiency of request delivery decreases.

本発明はこのような3mを解決するためのもので、キュ
ーファイルにおけるポインタと要求との対応関係に矛盾
を発生させることなく、同時に複数のタスクがキューフ
ァイルを共有した形で要求の受渡しを進めることができ
、これにより要求受渡し処理効率の向上化を図れるキュ
ーファイル排他制御装置の提供を目的としている。
The present invention is intended to solve the above 3M problem, and is to proceed with the delivery of requests while multiple tasks share a queue file at the same time, without causing any inconsistency in the correspondence between pointers and requests in the queue file. The present invention aims to provide a queue file exclusive control device that can improve the efficiency of request delivery processing.

[発明の構成] (課題を解決するための手段) 本発明のキューファイル排他制御装置は上記した目的達
成するために、それぞれ独立に動作する複数の要求受渡
し側タスク及び要求受取り側タスクと、複数の要求を保
管する要求保管部とこれに対する要求書込み用及び要求
読込み用ポインタを管理するポインタ管理部とで要求受
渡し側タスクから要求受取り側タスクに要求を受渡すた
めの待ち行列を構成するキューファイルと、ある要求受
渡し側タスクによる要求保管部に対する要求書込み動作
において排他をかける第1の排他制御手段と、ある要求
受取り側タスクによる要求保管部に対する要求読込み動
作において排他をかける第2の排他制御手段と、あるタ
スクによるポインタ管理部に対するポインタ読込み及び
更新動作において排他をかける第3の排他制御手段とを
具備したものである。
[Structure of the Invention] (Means for Solving the Problem) In order to achieve the above-mentioned purpose, the queue file exclusive control device of the present invention includes a plurality of request delivery side tasks and a request reception side task that operate independently, and a plurality of request receiving side tasks. A queue file that constitutes a queue for passing requests from a request-sending task to a request-receiving task, consisting of a request storage section that stores requests and a pointer management section that manages pointers for writing requests and reading requests thereto. a first exclusive control means that applies exclusion to a request writing operation to the request storage section by a certain request-sending task; and a second exclusive control means to apply exclusion to a request reading operation to the request storage section by a certain request-receiving task. and third exclusive control means that applies exclusion in pointer reading and updating operations for the pointer management unit by a certain task.

(作 用) 本発明のキューファイル排他制御装置では、キューファ
イルを用いた要求受渡し側タスクから閾求受取り側タス
クへの要求受渡し動作において、第1の排他制御手段は
、ある要求受渡し側タスクによる要求保管部に対する要
求書込み動作において排他をかけ、第2の排他制御手段
は、ある要求受取り側タスクによる要求保管部に対する
要求読込み動作において排他をかける。さらに第3の排
他制御手段は、あるタスクによるポインタ管理部に対す
るポインタ読込み及び更新動作において排他をかける。
(Function) In the queue file exclusive control device of the present invention, in the request passing operation from the request passing task to the threshold request receiving task using a queue file, the first exclusive control means is configured to control the request passing by a certain request passing task. The second exclusive control means applies exclusion in a request write operation to the request storage unit, and the second exclusion control means applies exclusion in a request read operation to the request storage unit by a certain request receiving task. Further, the third exclusive control means applies exclusion to pointer reading and updating operations for the pointer management unit by a certain task.

すなわち、本発明では、キューファイルに対する一回の
要求書込み及び読込み動作毎に、キューファイルにおけ
るポインタと要求との対応関係に矛盾が生じないよう排
他制御を行うので、キューファイルを同時に複数のタス
クが共有した形で要求の受渡しを進めることが可能とな
り、これにより各タスクの待ち時間を低減化して処理効
率を向上させることができる。
In other words, in the present invention, exclusive control is performed to prevent conflicts between the correspondence between pointers and requests in the queue file for each request write and read operation to the queue file, so that the queue file cannot be used by multiple tasks at the same time. It becomes possible to proceed with the delivery of requests in a shared manner, thereby reducing the waiting time of each task and improving processing efficiency.

(実施例) 以下、本発明の実施例を図面に基づいて説明する。(Example) Embodiments of the present invention will be described below based on the drawings.

第1図は本発明に係る一実施例のキューファイル排他制
御装置を採用したタスク間要求受渡し機構の構成を示す
図である。
FIG. 1 is a diagram showing the configuration of an inter-task request passing mechanism employing a queue file exclusive control device according to an embodiment of the present invention.

同図において、1 (IA、IB、1.C)はそれぞれ
要求を受渡す側のタスク、2(2A、2B。
In the figure, 1 (IA, IB, 1.C) are the tasks on the side that transfers the request, and 2 (2A, 2B) are the tasks on the side that transfers the request.

2C)はそれぞれ要求を受取る側のタスクで、各タスク
1.2はそれぞれ独立して動作することが可能とされて
いる。
2C) are tasks on the request receiving side, and each task 1.2 is capable of operating independently.

また3は複数の要求を待ち行列の形で保管し、上述した
要求受渡し側タスク1から要求受取り側タスク2に要求
を受渡すためのキューファイルである。このキューファ
イル3は、複数の要求を実際に保管する部分であるデー
タ保管部4と、このデータ保管部4に対する要求書込み
用のポインタと要求読込み用のポインタを管理するポイ
ンタ管理部5とからなっている。
Reference numeral 3 denotes a queue file for storing a plurality of requests in the form of a queue and passing the requests from the above-mentioned request-sending task 1 to the request-receiving task 2. This queue file 3 consists of a data storage section 4 that actually stores multiple requests, and a pointer management section 5 that manages pointers for writing requests and pointers for reading requests to this data storage section 4. ing.

さらに6はある要求受渡し側タスク1によるキューファ
イル3への要求書込み動作において、その他の要求受渡
し側タスク1に対し排他をかける第1の排他制御部、7
はある要求受取り側タスク2によるキューファイル3か
らの要求読込み動作において、その他の要求受取り側タ
スク2に対し排他をかける第2の排他1t111御部、
8はあるタスク1.2によるポインタ管理部5の使用(
ポインタの読込み及び更新)において、その他のタスク
1.2によるポインタ管理部5の使用を禁止する第3の
排他制御部である。
Furthermore, 6 is a first exclusive control unit that applies exclusion to other request-sending tasks 1 when a certain request-sending task 1 writes a request to the queue file 3;
is a second exclusive 1t111 control unit that applies exclusion to other request receiving tasks 2 when a certain request receiving task 2 reads a request from the queue file 3;
8 is the use of the pointer management unit 5 by a certain task 1.2 (
This is a third exclusive control unit that prohibits the use of the pointer management unit 5 by other tasks 1.2 in (reading and updating of pointers).

次にこの実施例の動作を第2図及び第3図のフローチャ
ートを参照しながら説明する。
Next, the operation of this embodiment will be explained with reference to the flowcharts of FIGS. 2 and 3.

IAの要求受渡し側タスクよりキューファイル3に対し
て要求の書込みを行う場合、まず第1の排他制御部6は
、その他の要求受渡し側タスク1B、ICに対して排他
をかけ、これらのタスク1B、ICによるキューファイ
ル3への要求の書込み動作を禁止する(ステップa)。
When a request is written to the queue file 3 by the request-sending task of the IA, the first exclusive control unit 6 first applies exclusion to the other request-sending tasks 1B and IC, and these tasks 1B , prohibits the IC from writing requests to the queue file 3 (step a).

この排他処理を行った後、次に要求受渡し側タスクIA
は、キューファイル3のポインタ管理部5が提供する要
求書込み用ポインタに従ってデータ保管部4に要求を書
込む訳であるが、ここで第3の排他制御部8は、ポイン
タ管理部5に対して排他をかけることにより、その他全
てのタスクによるポインタ管理部5の使用を禁止状態に
する(ステップb)。
After performing this exclusive processing, the request-sending task IA
writes a request to the data storage unit 4 according to the request writing pointer provided by the pointer management unit 5 of the queue file 3. Here, the third exclusive control unit 8 writes the request to the pointer management unit 5. By applying exclusion, use of the pointer management unit 5 by all other tasks is prohibited (step b).

次に、要求受渡し側タスクIAは、上述の如くポインタ
管理部5が提供する要求書込み用ポインタを読込み(ス
テップc)、ポインタ管理部5の排他を一旦解除した後
(ステップd)、読込んだ要求書込み用ポインタに従っ
てデータ保管部4に要求を書込む(ステップe)。
Next, the request delivery task IA reads the request writing pointer provided by the pointer management unit 5 as described above (step c), and after once releasing the exclusion of the pointer management unit 5 (step d), the request writing pointer is read. A request is written to the data storage unit 4 according to the request writing pointer (step e).

この後、再び第3の排他制御部8によりポインタ管理部
5に対し排他がかけられ(ステップf)、この間にポイ
ンタ管理部5の書込み用ポインタが更新される(ステッ
プg)。
Thereafter, the third exclusive control section 8 again applies exclusion to the pointer management section 5 (step f), and during this time the write pointer of the pointer management section 5 is updated (step g).

このポインタ更新が完了すると、ポインタ管理部5に対
する排他制御の解除と(ステップh)、第1の排他制御
部6による排他制御の解除が続いて行われて(ステップ
t)、要求の書込み動作が季冬了する。
When this pointer update is completed, the exclusive control of the pointer management unit 5 is released (step h), and the exclusive control of the first exclusive control unit 6 is subsequently released (step t), and the write operation of the request is completed. The winter season ends.

一方、2Aの要求受取り側タスクによりキューファイル
3からの要求読込みを行う場合は、まず第2の排他制御
部7は、その他の要求受取り側タスク2B、2Cに対し
て排他をかけ、それらのタスク2B、2Cによる要求の
読込み動作を禁止する(ステップj)。
On the other hand, when the request receiving task 2A reads a request from the queue file 3, the second exclusive control unit 7 first applies exclusion to the other request receiving tasks 2B and 2C, and 2B and 2C are prohibited from reading requests (step j).

次に第3の排他制御部8は、ポインタ管理部5に対して
排他をかけ、その他全てのタスクによるポインタ管理部
5の使用を禁止状態とする(ステップk)。
Next, the third exclusive control section 8 applies exclusion to the pointer management section 5, and prohibits the use of the pointer management section 5 by all other tasks (step k).

続いて要求受取り側タスク2Aは、ポインタ管理部5が
提供する要求読込み用ポインタを読込む(ステップ1)
。この後、ポインタ管理部5の排他を一旦解除しくステ
ップm)、読込んだポインタの値が書込み用ポインタの
値よりも小さいことを確認した後(ステップn)、読込
み用ポインタに従ってデータ保管部4からの要求の読込
みを行う(ステップ0)。
Next, the request receiving task 2A reads the request reading pointer provided by the pointer management unit 5 (step 1).
. After that, the exclusion of the pointer management unit 5 is temporarily released (step m), and after confirming that the value of the read pointer is smaller than the value of the write pointer (step n), the data storage unit 4 follows the read pointer. Reads the request from (step 0).

この後、再び第3の排他制御部8によりポインタ管理部
5に対する排他処理が行われ(ステラプル)、この間に
ポインタ管理部5の読込み用ポインタが更新される(ス
テップq)。
Thereafter, the third exclusive control unit 8 again performs exclusive processing on the pointer management unit 5 (stellar pull), and during this time the read pointer of the pointer management unit 5 is updated (step q).

このポインタ更新後、第3の排他制御部8によるポイン
タ管理部5に対する排他制御を解除しくステップr)、
続いて第2の排他制御部7による要求受取り側タスク2
に対する排他制御を解除して(ステップs)、要求の読
込み動作を終了する。
After updating the pointer, the third exclusive control section 8 releases the exclusive control on the pointer management section 5 (step r);
Next, the request receiving task 2 by the second exclusive control unit 7
Exclusive control is released (step s), and the request reading operation is ended.

かくしてこの実施例のキューファイル排他制御装置によ
れば、キューファイル3に対する一回の要求書込み/読
込み動作毎に排他制御を実行することで、同時に複数の
タスクがキューファイル3を共有した形で要求の受渡し
を進めることが可能となる。
Thus, according to the queue file exclusive control device of this embodiment, by executing exclusive control for each request write/read operation to the queue file 3, multiple tasks can simultaneously request requests while sharing the queue file 3. It becomes possible to proceed with the delivery of

したがって、各タスク毎の待機時間に大幅な差異が生じ
なくなり、この結果、処理効率の大幅な向上が期待でき
る。
Therefore, there will be no significant difference in waiting time for each task, and as a result, a significant improvement in processing efficiency can be expected.

[発明の効果] 以上説明したように本発明のキューファイル排他制御装
置によれば、キューファイルにおけるポインタと要求と
の対応関係に矛盾を発生させることなく、同時に複数の
タスクがキューファイルを共有した形で要求の受渡しを
進めることが可能となり、これにより要求受渡し処理効
率の向上化を図れる。
[Effects of the Invention] As explained above, according to the queue file exclusive control device of the present invention, multiple tasks can simultaneously share a queue file without causing any inconsistency in the correspondence between pointers and requests in the queue file. This makes it possible to proceed with the transfer of requests in a manner that allows for improved request transfer processing efficiency.

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

第1図は本発明に係る一実施例のキューファイル排他制
御装置を採用したタスク間要求受渡し機構の構成を示す
ブロック図、第2図は第1図のタスク間要求受渡し機構
におけるキューファイルへの要求書込み動作の流れを示
すフローチャート、第3図は同タスク間要求受渡し機構
におけるキューファイルからの要求読込み動作の流れを
示すフローチャートである。 IA、IB、IC・・要求受渡し側タスク、2A。 2B、2C・・・要求受取り側タスク、3・・・キュー
ファイル、4・・・データ保管部、5・・・ポインタ管
理部、6・・・第1の排他制御部、7・・・第2の排他
制御部、8・・・第3の排他制御部。
FIG. 1 is a block diagram showing the configuration of an inter-task request passing mechanism that employs a queue file exclusive control device according to an embodiment of the present invention, and FIG. FIG. 3 is a flowchart showing the flow of the request writing operation, and FIG. 3 is a flowchart showing the flow of the request reading operation from the queue file in the same intertask request transfer mechanism. IA, IB, IC...Request delivery side task, 2A. 2B, 2C... Request receiving side task, 3... Queue file, 4... Data storage unit, 5... Pointer management unit, 6... First exclusive control unit, 7... Third 2 exclusive control unit, 8... third exclusive control unit.

Claims (1)

【特許請求の範囲】 それぞれ独立に動作する複数の要求受渡し側タスク及び
要求受取り側タスクと、 複数の要求を保管する要求保管部とこれに対する要求書
込み用及び要求読込み用ポインタを管理するポインタ管
理部とで前記要求受渡し側タスクから前記要求受取り側
タスクに要求を受渡すための待ち行列を構成するキュー
ファイルと、 ある要求受渡し側タスクによる前記要求保管部に対する
要求書込み動作において排他をかける第1の排他制御手
段と、 ある要求受取り側タスクによる前記要求保管部に対する
要求読込み動作において排他をかける第2の排他制御手
段と、 あるタスクによる前記ポインタ管理部に対するポインタ
読込み及び更新動作において排他をかける第3の排他制
御手段とを具備したことを特徴とするキューファイル排
他制御装置。
[Scope of Claims] A plurality of request delivery side tasks and request reception side tasks that operate independently, a request storage section that stores a plurality of requests, and a pointer management section that manages pointers for writing requests and reading requests thereto. a queue file that constitutes a queue for passing requests from the request-sending task to the request-receiving task; and a first queue file that imposes exclusion on a request writing operation to the request storage unit by a certain request-sending task. an exclusive control means; a second exclusive control means that applies exclusion to a request read operation to the request storage section by a certain request receiving task; and a third exclusive control means to apply exclusion to a pointer read and update operation to the pointer management section by a certain task. 1. A cue file exclusive control device, comprising: exclusive control means.
JP16868589A 1989-06-30 1989-06-30 Exclusive controller for queue file Pending JPH0334031A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16868589A JPH0334031A (en) 1989-06-30 1989-06-30 Exclusive controller for queue file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16868589A JPH0334031A (en) 1989-06-30 1989-06-30 Exclusive controller for queue file

Publications (1)

Publication Number Publication Date
JPH0334031A true JPH0334031A (en) 1991-02-14

Family

ID=15872575

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16868589A Pending JPH0334031A (en) 1989-06-30 1989-06-30 Exclusive controller for queue file

Country Status (1)

Country Link
JP (1) JPH0334031A (en)

Similar Documents

Publication Publication Date Title
JPH04229355A (en) Data access method and data processing system
US6212543B1 (en) Asymmetric write-only message queuing architecture
JPH04219844A (en) High-speed medium preferential release type exclusive system
JP3609841B2 (en) File management device
JPH0798663A (en) Asynchronous I / O control method
JPH0334031A (en) Exclusive controller for queue file
JPS63307553A (en) File control system
JPH04355818A (en) Data input/output controller
JPS61251944A (en) Buffer area control system
JPS5947341B2 (en) Dynamic exclusive control method for index sequential files
JPH0346033A (en) Inter-job data transfer control method
JPS61843A (en) Resource status holding system
JPH0351912A (en) Spool area return system for each data set
JPH0455953A (en) Block input/output control system
JPH09330239A (en) Exclusive control method
JPS60100239A (en) Shared file control system
JPS6022784B2 (en) Duplicate data integrity maintenance method
JPH0528421B2 (en)
JPH05334012A (en) Large capacity disk controller
JPH0136130B2 (en)
JPS63148365A (en) Managing device for shared resources of multiplex computer
JPH02227754A (en) Disk cache control method
JPS63273147A (en) File input processing system
JPH05274091A (en) Magnetic tape device
JPS6365977B2 (en)