JPH01265340A - Queue buffer control system - Google Patents

Queue buffer control system

Info

Publication number
JPH01265340A
JPH01265340A JP9360188A JP9360188A JPH01265340A JP H01265340 A JPH01265340 A JP H01265340A JP 9360188 A JP9360188 A JP 9360188A JP 9360188 A JP9360188 A JP 9360188A JP H01265340 A JPH01265340 A JP H01265340A
Authority
JP
Japan
Prior art keywords
queue
level
age
data
value
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
JP9360188A
Other languages
Japanese (ja)
Inventor
Rie Tanaka
理恵 田中
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP9360188A priority Critical patent/JPH01265340A/en
Publication of JPH01265340A publication Critical patent/JPH01265340A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To avoid such a case where a queue connected to a chain of a low level is not taken out forever by recording the AGE value showing a register history when the queue data is registered to a queue and then taking the queue data out of the queue selected based on the order of the AGE value. CONSTITUTION:A master AGE control part 4 delivers the basic AGE value which is counted up for each register request of the queue data. The queue level control parts 3 record the AGE value calculated from the basic AGE value received from the part 4 and the AGE arithmetic value corresponding to the level of the queue to be registered and contained in the AGE arithmetic value set previously in response to each level of the queue data every time the queue data is registered to the queue. When a queue data extracting request is received, the AGE values are compared with each other among those queues. Then the queue data are taken out of the queues 1a-1m selected according to the order of said AGE values. Thus it is possible to avoid such a case where the queues of low levels are not taken out forever.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、タスク間のデータの授受の際に使用される
キューバッファのキューデータの登録、取り出しを管理
するキューバッファ管理方式に関するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a queue buffer management method that manages the registration and retrieval of queue data in a queue buffer used when exchanging data between tasks. .

〔従来の技術〕[Conventional technology]

第6図は従来のキューバッファ管理方式を示す概略構成
図であり、図において、1はキューデー夕が格納される
複数のキュー1a〜1mを備えたキューバッファ、2は
前記キュ−1a〜1m中の空いているものをチェーンに
接続して管理する空きキュー管理部、3はキューデータ
のレベルに対応して複数のキューレベル管理部3a〜3
nが設けられ、前記キュ−1a〜1m中のキューデータ
が格納されているものを、当該キューデータのレベルに
対応したチェーンに接続して管理するレベル管理部であ
る。
FIG. 6 is a schematic configuration diagram showing a conventional queue buffer management system. In the figure, 1 is a queue buffer provided with a plurality of queues 1a to 1m in which queue data is stored, and 2 is a queue buffer among the queues 1a to 1m. An empty queue management unit that connects and manages empty queues in a chain; 3 is a plurality of queue level management units 3a to 3 corresponding to the level of queue data;
This is a level management unit that connects and manages the queue data in the queues 1a to 1m stored in a chain corresponding to the level of the queue data.

、 第7図は前記キューバッファlの各キュー1a〜1
mの詳細を示す構成図であり、図において、11はその
キューの前に登録されているキュー1a〜1mのキュ一
番号を格納する前方向キュ一番号領域、12はそのキュ
ーの後に登録されているキュー1a〜1mのキュ一番号
を格納する後方向キュ一番号領域、13はキューデータ
が格納されるキューデータ領域である。
, FIG. 7 shows each queue 1a to 1 of the queue buffer l.
This is a configuration diagram showing details of the queue m, and in the figure, 11 is a forward queue number area that stores the queue number of the queues 1a to 1m registered before that queue, and 12 is a forward queue number area that stores the queue numbers of queues 1a to 1m registered before that queue. A backward queue number area stores the queue numbers of the queues 1a to 1m, and 13 is a queue data area where cue data is stored.

また、第5図は前記空きキュー管理部2の詳細を示す構
成図であり、図において、21はこの空きキュー管理部
2が管理している空きキューのチェーンに接続された、
キューデータが登録されていないキューの個数を格納す
る空きキュー個数領域、22は前記チェーンの先頭に接
続されたキューのキュ一番号を格納する先頭空きキュ一
番号領域、23は前記チェーンの最後に接続されたキュ
ーのキュ一番号を格納する最後空きキュ一番号領域であ
る。
FIG. 5 is a block diagram showing details of the free queue management section 2, and in the figure, 21 is connected to a chain of free queues managed by the free queue management section 2.
An empty queue number area 22 stores the number of queues for which no queue data is registered; 22 is a head empty queue number area storing the queue number of the queue connected to the beginning of the chain; and 23 is an area 23 at the end of the chain. This is the last free queue number area that stores the queue numbers of connected queues.

さらに、第8図はレベル管理部3中の各キューレベル管
理部3a〜3nの詳細を示す構成図であり、図において
、31は当該キューレベル管理部3a(〜3n)が管理
しているレベルのチェーンに接続されたキューの個数を
格納するレベルキュー個数領域、32は当該チェーンの
先頭に接続されたキューのキュ一番号を格納するレベル
先頭キュ一番号領域、23は当該チェーンの最後に接続
されたキューのキュ一番号を格納するレベル最後キュ一
番号領域である。
Furthermore, FIG. 8 is a configuration diagram showing details of each queue level management section 3a to 3n in the level management section 3, and in the figure, 31 is a level managed by the queue level management section 3a (to 3n). 32 is a level queue number area that stores the number of queues connected to the chain, 32 is a level head queue number area that stores the queue number of the queue connected to the beginning of the chain, and 23 is a level queue number area that stores the number of queues connected to the chain. This is the last level queue number area that stores the queue number of the queue that has been sent.

次に動作について説明する。第9図はキューバッファの
管理動作を説明するための状態遷移図である。第9図に
はキューバッファ1が1a〜1eの5つのキューを含み
、レベル管理部3が高低2つのレベルに対応した2つの
キューレベル管理部3a、3bを備えたものを示してい
る。第9図(alはキュー1a〜1eのいずれにもキュ
ーデータが登録されていない初期状態が示されており、
各キュー1a〜1eは空きキュー管理部2のチェーンに
順番に接続されている。第9図中)は4つのキューデー
タが、低レベル、高レベル、低レベル、低レベルの順で
登録された状態を示しており、高レベルを管理するキュ
ーレベル管理部3aのチェーンにはキュー1bが、低レ
ベルを管理するキューレベル管理部3bのチェーンには
キュー1allC11dがそれぞれ接続され、空きキュ
ー管理部2のチェーンにはキュー1eのみが残されてい
る。第9図(C)は第9図(b)の状態から1つのキュ
ーデータが取り出された状態を示しており、高レベルを
管理するキューレベル管理部3aのチェーンに接続され
たキュー1bからキューデータが取り出され、当該キュ
ー1bは空きキュー管理部2の管理するチェーンの最後
に接続されている。第9図(d)は第9図(C)の状態
で高レベルのキューデータが1つ登録された状態を示し
ており、そのキューデータは空きキュー管理部2の管理
するチーーンの先頭に接続されていたキュー1eに登録
され、当該キューleはキューレベル管理部3aの管理
するチェーンに接続されている。
Next, the operation will be explained. FIG. 9 is a state transition diagram for explaining queue buffer management operations. FIG. 9 shows that the queue buffer 1 includes five queues 1a to 1e, and the level management unit 3 includes two queue level management units 3a and 3b corresponding to two levels, high and low. FIG. 9 (al shows the initial state in which no queue data is registered in any of the queues 1a to 1e,
Each of the queues 1a to 1e is sequentially connected to a chain of empty queue management sections 2. 9) shows a state in which four queue data are registered in the order of low level, high level, low level, and low level, and the chain of the queue level management unit 3a that manages the high level has queue data. Queues 1allC11d are respectively connected to the chain of the queue level management section 3b in which 1b manages the low level, and only the queue 1e remains in the chain of the free queue management section 2. FIG. 9(C) shows a state where one queue data is extracted from the state of FIG. 9(b), and the queue data is extracted from the queue 1b connected to the chain of the queue level management section 3a that manages the high level. The data is retrieved, and the queue 1b is connected to the end of the chain managed by the free queue management section 2. FIG. 9(d) shows a state in which one high-level queue data is registered in the state of FIG. 9(C), and that queue data is connected to the head of the chain managed by the free queue management section 2. The queue 1e is registered in the queue 1e that was previously used, and the queue le is connected to the chain managed by the queue level management section 3a.

以下、キューデータの登録、取り出しの手順を図に添っ
て詳細に説明する。
Hereinafter, the procedure for registering and retrieving cue data will be explained in detail with reference to the drawings.

■ 第9図(a)の状態で低レベルのキューデータの登
録要求がなされる。
(2) A request to register low-level queue data is made in the state shown in FIG. 9(a).

■ 空きキュー管理部2の管理するチェーンより先頭に
接続されているキュー1aを取り出す。
■ Take out the queue 1a connected to the head of the chain managed by the free queue management section 2.

(i)空きキュー個数領域21の値を“1”減じる。(i) Decrease the value in the number of free queues area 21 by "1".

(ii)空き先頭キュ一番号領域22にキュー1aの後
方向キュ一番号領域12の値を設定する。
(ii) The value of the rear queue number area 12 of the queue 1a is set in the empty head queue number area 22.

(iii )空きキュー個数領域21の値が“0”なら
ば、空き最後キュ一番号領域23に“0”を設定する。
(iii) If the value of the empty queue number area 21 is "0", set the empty last queue number area 23 to "0".

(iv )空きキュー個数領域21の値が“1”ならば
、空き最後キュ一番号領域23にそのキューのキュ一番
号を設定する。
(iv) If the value of the empty queue number area 21 is "1", the queue number of that queue is set in the empty last queue number area 23.

■ レベル管理部3の該当するキューレベル管理部3b
の管理するチェーンにそのキュー1aを接続する。
■ Corresponding queue level management unit 3b of level management unit 3
The queue 1a is connected to the chain managed by .

(i)キューレベル管理部3bのレベルキュー個数領域
31の値を“1”増す。
(i) Increase the value of the level queue number area 31 of the queue level management unit 3b by "1".

(ii)接続されるキュー1aの前方向キュ一番号領域
11に、キューレベル管理部3bのレベル最後キュ一番
号領域33の値を設定する。
(ii) The value of the last level queue number field 33 of the queue level management section 3b is set in the forward queue number field 11 of the connected queue 1a.

(iii )キューレベル管理部3bのレベル最後キュ
一番号領域33に、キュー1aのキュー番号“1”を設
定する。
(iii) Set the cue number "1" of the cue 1a in the last level cue number area 33 of the cue level management section 3b.

(iv)キューレベル管理部3bのレベルキュー個数領
域31の値が“l”ならば、そのレベル先頭キュ一番号
領域32にキュー1aのキュ一番号“l”を設定する。
(iv) If the value in the level cue number field 31 of the cue level management unit 3b is "l", the cue number "l" of the cue 1a is set in the level head cue number field 32.

(v)キュー1aの後方向キュ一番号領域12に“0”
を設定する。
(v) "0" in the backward queue number area 12 of the queue 1a
Set.

■ 前記■〜■の手順で、次の高レベルのキューデータ
をキュー1bに、次の低レベルのキューデータをキュー
ICに、さらに次の低レベルのキューデータをキュー1
dに順次登録してゆく。その際、新規に登録されるキュ
ーの前方向のキューの後方向キュ一番号領域12には、
新規に登録されるキューのキュ一番号が設定される。こ
れによって、状態は第9図(alより第9図(b)に遷
移する。
■ Follow the steps from ■ to ■ above to transfer the next high-level cue data to queue 1b, the next low-level cue data to queue IC, and the next low-level cue data to queue 1.
d sequentially. At this time, in the backward queue number area 12 of the forward queue of the newly registered queue,
The queue number of the newly registered queue is set. As a result, the state transitions from FIG. 9(al) to FIG. 9(b).

■ この第9図(blの状態でキューデータの取り出し
要求がなされると、レベルの高いものから取り出しが行
われるため高レベルのキューレベル管理部3aのチェー
ンに接続されたキュー1bが取り出される。この際のキ
ューレベル管理部3aからのキューの取り出し手順は前
記■の手順、空きキュー管理部2の管理するチェーンへ
の接続手順は前記■、■の手順と同様である。これによ
って、状態は第9図(b)から第9図(C1へ遷移する
(2) When a queue data retrieval request is made in the state shown in FIG. 9 (bl), data is retrieved from the highest level, so the queue 1b connected to the chain of the higher level queue level management section 3a is retrieved. At this time, the procedure for taking out the queue from the queue level management unit 3a is the same as the procedure in (2) above, and the procedure for connecting to the chain managed by the free queue management unit 2 is the same as in the procedures in (2) and (3) above. Transition from FIG. 9(b) to FIG. 9 (C1).

■ ここでさらに、この第9図(C)の状態において高
レベルのキューデータの登録要求がなされる。
(2) Furthermore, in the state shown in FIG. 9(C), a request is made to register high-level queue data.

この際の空きキュー管理部2からのキューの取り出し手
順は前記■の手順、キューレベル管理部3aの管理する
チェーンへの接続手順は前記■、■の手順と同様である
。これによって状態は第9図(C1から第9図fd)へ
遷移する。
At this time, the procedure for taking out the queue from the empty queue management unit 2 is the same as the procedure in (2) above, and the procedure for connecting to the chain managed by the queue level management unit 3a is the same as in the procedures in (2) and (3) above. This causes the state to transition to FIG. 9 (from C1 to FIG. 9 fd).

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

従来のキューバッファ管理方式は以上のように構成され
ているので、第9図の状態(d)よりキューデータの取
り出し要求がなされた場合には再び高レベルのチェーン
に接続されたキュー1eが取り出されることとなり、低
レベルのチェーンに接続されたキューla、lc、ld
は高レベルのチェーンに接続されたキューが存在する限
り、いつまでも取り出されないという問題点があった。
Since the conventional queue buffer management system is configured as described above, when a request is made to retrieve queue data from state (d) in FIG. 9, the queue 1e connected to the higher level chain is retrieved again. queues la, lc, ld connected to the lower level chain.
had the problem that it would never be retrieved as long as a queue connected to a higher level chain existed.

この発明は上記のような問題点を解消するためになされ
たもので、レベルの低いキューがいつまでも取り出され
ないようなことのないキューバッファ管理方式を得るこ
とを目的とする。
The present invention has been made to solve the above-mentioned problems, and aims to provide a queue buffer management system that prevents low-level queues from being taken out forever.

〔課題を解決するための手段〕[Means to solve the problem]

この発明に係るキューバッファ管理方式は、キューバッ
ファのエイジ(AGE)を管理するマスタAGE管理部
を設け、登録されるキューデータの各レベル対応にAG
E演算値を設定し、キューにキューデータを登録する際
、当該キューにマスタAGE管理部の発生する基本AG
E値と、対応するレベルのAGE演算値とから算出した
AGE値を記録し、キューデータの取り出しに際しては
、各キューの/’CUE値の順位に従って選択したキュ
ーよりキューデータの取り出しを行うものである。
The queue buffer management method according to the present invention includes a master AGE management section that manages the age (AGE) of a queue buffer, and an AG corresponding to each level of queue data to be registered.
When setting the E calculation value and registering queue data in the queue, the basic AG generated by the master AGE management unit in the queue
The AGE value calculated from the E value and the AGE calculation value of the corresponding level is recorded, and when retrieving cue data, the cue data is retrieved from the selected queue according to the order of the /'CUE value of each cue. be.

〔作用〕[Effect]

この発明におけるマスタAGE管理部は、キューデータ
の登録要求がある度に、その都度歩進する基本AGE値
を出力し、レベル管理部は、キューにキューデータを登
録する都度、前記マスタAGE管理部の出力する基本A
GE値と、予めキューデータの各レベル対応に設定され
たAGE演算値中の、登録すべきキューのレベルに対応
したへ〇E演算値とから算出したAGE値を併せて記録
し、キューデータの取り出し要求があると各キューのA
GE値を比較して、その順位に従って選択したキューか
らキューデータの取り出しを行う。
The master AGE management unit in this invention outputs a basic AGE value that increments each time there is a request to register cue data, and the level management unit outputs a basic AGE value that increments each time there is a request to register cue data, and the level management unit outputs a basic AGE value that increments each time there is a request to register cue data. The basic output of A
The AGE value calculated from the GE value and the E calculation value corresponding to the level of the cue to be registered among the AGE calculation values set in advance for each level of cue data is recorded together, and the AGE value calculated from the AGE calculation value corresponding to the level of the cue to be registered is recorded together. When there is a retrieval request, the A of each queue
The GE values are compared and the queue data is extracted from the selected queue according to the order.

〔実施例〕〔Example〕

以下、この発明の一実施例を図について説明する。第1
図において、1はキューバッファ、1a〜1mはキュー
、2は空きキュー管理部、3はレベル管理部、3a〜3
nはキューレベル管理部で、第6図に同一符号を付した
ものと同等のものである。また、4はキューデータの登
録要求がある度に、その都度その値が“1”ずつ減少し
てゆく基本AGE値を発生させるマスタAGE管理部で
ある。
An embodiment of the present invention will be described below with reference to the drawings. 1st
In the figure, 1 is a queue buffer, 1a to 1m are queues, 2 is an empty queue management section, 3 is a level management section, and 3a to 3
n is a queue level management unit, which is the same as that shown in FIG. 6 with the same reference numeral. Further, 4 is a master AGE management unit that generates a basic AGE value whose value is decremented by "1" each time there is a request to register cue data.

ここで、前記キュー1a〜1mは第2図に示すように、
前方向キュ一番号領域11、後方向キュ一番号領域12
、キューデータ領域13の外に、キューデータ登録時に
当該キュー1a(〜1m)に与えられるAGE値を記録
しておくAGE領域14を備えている点で、第7図に示
す従来のキューla〜1mとは異なっている。
Here, the queues 1a to 1m are as shown in FIG.
Forward cue number area 11, backward cue number area 12
, the conventional cue la~ shown in FIG. This is different from 1m.

、また、キューレベル管理部3a〜3nはレベルキュー
個数領域31、レベル先頭キュ一番号領域32、レベル
最後キュ一番号領域33の外に、それが管理しているチ
ェーンの先頭に接続されているキュー1a (〜1m)
のA G E 9M域14に記録されたAGE値が格納
されるレベルA G E eJl域34を備え、さらに
、当該キューレベル管理部3a(〜3n)に設定された
レベルに対応したAGE演算値を、前記マスタAGE管
理部40発生する基本AGE値に加算してAGE値を算
出し、前記キュー1a (〜1m)のA G E 領域
14に記録する機能を備えている点で、第8図に示す従
来のキューレベル管理部3a〜3nとは異なっている。
In addition, the queue level management units 3a to 3n are connected to the top of the chain that they manage, outside of the level queue number area 31, level first queue number area 32, and level last queue number area 33. Queue 1a (~1m)
A level AGE eJl area 34 is provided in which the AGE value recorded in the AGE 9M area 14 is stored, and an AGE calculation value corresponding to the level set in the corresponding queue level management section 3a (~3n) is provided. FIG. This is different from the conventional queue level management units 3a to 3n shown in FIG.

次に動作について説明する。第4図はキューバッファの
管理動作を説明するための状態遷移図である。第4図に
は従来と同様、5つのキュー1a〜1 e 、 高低2
レベルのキューレベル管理m 3 a 。
Next, the operation will be explained. FIG. 4 is a state transition diagram for explaining queue buffer management operations. Figure 4 shows five cues 1a to 1e, high and low 2, as before.
Level queue level management m3a.

3bを備え、そして第4図(a)には初期状態、第4図
(′b)には4つのキューデータが、低レベル、高レベ
ル、低レベルの順で登録された状態、第4図(C)には
第4図(blの状態から1つのキューデータが取り出さ
れた状態、第4図(dlには第4図(C1の状態で高レ
ベルのキューデータが1つ登録された状態がそれぞれ示
されている。また、マスタAGE管理部4の発生する基
本AGE値の初期値としては“100”が用いられ、さ
らに、高レベルのAGE演算値として“2”、低レベル
のAGE演算値として“1”がそれぞれ設定されている
3b, and FIG. 4(a) shows the initial state, FIG. 4('b) shows the state where four cue data are registered in the order of low level, high level, and low level. (C) shows a state in which one cue data has been extracted from the state of bl, and FIG. 4 (dl shows a state in which one high-level cue data has been registered in the state of C1). In addition, "100" is used as the initial value of the basic AGE value generated by the master AGE management unit 4, "2" is used as the high level AGE calculation value, and "2" is used as the low level AGE calculation value. "1" is set as the value for each.

以下、キューデータの登録、取り出しの手順を図に添っ
て詳細に説明する。
Hereinafter, the procedure for registering and retrieving cue data will be explained in detail with reference to the drawings.

■ 第9図(alの状態で低レベルのキューデータの登
録要求がなされる。
■ FIG. 9 (A request to register low-level queue data is made in the state al.

■ 空きキュー管理部2の管理するチェーンより先頭に
接続されているキュー1aを取り出す。
■ Take out the queue 1a connected to the head of the chain managed by the free queue management section 2.

(i)空きキュー個数領域21の値を“1°減じる。(i) Decrease the value of the number of free queues area 21 by 1°.

(ii )空き先頭キュ一番号領域22にキュー1の後
方向キュ一番号領域12の値を設定する。
(ii) The value of the backward queue number area 12 of the queue 1 is set in the empty head queue number area 22.

(iii )空きキュー個数領域21の値が“0”なら
ば、空き最後キュ一番号領域23に“0”を設定する。
(iii) If the value of the empty queue number area 21 is "0", set the empty last queue number area 23 to "0".

(iv)空きキュー個数領域21の値が“1”ならば空
き最後キュ一番号領域23にそのキューのキュ一番号を
設定する。
(iv) If the value of the empty queue number area 21 is "1", the queue number of that queue is set in the empty last queue number area 23.

■ レベル管理部3の該当するキューレベル管理部3b
の管理するチェーンにそのキュー1aを接続する。
■ Corresponding queue level management unit 3b of level management unit 3
The queue 1a is connected to the chain managed by .

(i)キューレベル管理部3bのレベルキュー個数領域
31の値を“1”増す。
(i) Increase the value of the level queue number area 31 of the queue level management unit 3b by "1".

(ii)接続されるキュー1aの前方向キュ一番号eM
域11にキューレベル管理部3bのレベル最後キュ一番
号領域33の値を設定する。
(ii) Forward queue number eM of connected queue 1a
The value of the last level cue number area 33 of the cue level management section 3b is set in the area 11.

(iii )キューレベル管理部3bのレベル最後キュ
一番号領域33に、前記キュー1aのキュ一番号“1”
を設定する。
(iii) The cue number "1" of the cue 1a is written in the last cue number area 33 of the cue level management section 3b.
Set.

(iv )キューレベル管理部3bのレベルキュー個数
領域31の値が“1”ならば、そのレベル先頭キュ一番
号領域32にキュー1aのキュ一番号“l”を設定する
(iv) If the value of the level cue number field 31 of the cue level management unit 3b is "1", the cue number "1" of the cue 1a is set in the level head cue number field 32.

(v)キュー1aの後方向キュ一番号領域12に“0”
を設定する。
(v) "0" in the backward queue number area 12 of the queue 1a
Set.

(vi)マスタAGE管理部2の発生する基本AGE値
“100”に、レベル対応に設定されたAGE演算値を
加算し、それをAEG値としてキュー1aのA G E
 eJl域14へ記録しておく。この場合、登録される
キューデータは低レベルなのでAGE演算値は“1”で
あり、従って基本AGE値“100”とこの“1”とを
加えたAGE値“101”がキュー1aOA G E 
fiI域14に設定される。
(vi) Add the AGE calculation value set corresponding to the level to the basic AGE value "100" generated by the master AGE management unit 2, and use it as the AEG value to set the AGE of the queue 1a.
Record it in eJl area 14. In this case, the registered cue data is at a low level, so the AGE calculation value is "1", so the AGE value "101", which is the sum of the basic AGE value "100" and this "1", is the queue 1aOA G E
It is set in fiI area 14.

(vi)キューレベル管理部3bのレベルキュー個数領
域の値が“1”ならば、キューレベル管理部3bのレベ
ルAGE領域34にキ、−1aのAGE領域14のAG
E値 “101”を設定する。
(vi) If the value of the level queue number area of the queue level management unit 3b is “1”, the level AGE area 34 of the queue level management unit 3b is set to 1, and the AG of the AGE area 14 of -1a is
Set the E value “101”.

(vii )マスタAGE管理部2の発生する基本AG
E値から“1”を減じる。
(vii) Basic AG generated by master AGE management unit 2
Subtract “1” from the E value.

■ 前記■〜■の手順で、次の高レベルのキューデータ
をキュー1bに、次の低レベルのデータをキューICに
、さらに次の低レベルのキューデータをキュー1dに順
次登録してゆく。
(2) Following steps (1) to (2) above, the next high level queue data is registered in the queue 1b, the next low level data in the queue IC, and the next low level queue data in the queue 1d.

従って、キュー1bのAGE領域14には101″ (
99+2)が、キュー1cのAGE領域14には“99
” (98+ 1)が、キュー1dのAGE領域14に
は98” (97+1)がそれぞれAGE値として記録
される。
Therefore, the AGE area 14 of queue 1b contains 101'' (
99+2) is stored in the AGE area 14 of queue 1c.
” (98+1), and 98” (97+1) is recorded as the AGE value in the AGE area 14 of the queue 1d.

また、その際、新規に登録されるキューの前方向キュ一
番号領域11にキュ一番号が設定されているキューは、
その後方向キュ一番号領域12に新規に登録されるキュ
ーのキュ一番号が設定される。
In addition, at this time, for the queue whose queue number is set in the forward queue number area 11 of the newly registered queue,
Thereafter, the cue number of the newly registered cue is set in the direction cue number area 12.

これによって、状態は第9図(alより第9図(blに
遷移する。
As a result, the state transitions from FIG. 9(al) to FIG. 9(bl).

■ この第4図(b)の状態でキューデータの取り出し
要求がなされるとAGE値の古いもの(大きいもの)か
ら取り出される。
(2) If a request is made to retrieve queue data in the state shown in FIG. 4(b), the data will be retrieved starting from the oldest (largest) AGE value.

(:)キューレベル管理部3aと3bとの間で各々のレ
ベルA G E 領域34に格納されているAEG値の
比較を行う。
(:) The AEG values stored in each level A GE area 34 are compared between the cue level management units 3a and 3b.

この場合、両レベルA G E ’pM域34のAEG
(iは、供に“101”で等しいので、その場合には高
レベルのキューレベル管理部3aが管理するチェーンに
接続されたキュー1bから取り出すことにする。
In this case, both levels AEG 'pM region 34 AEG
(Since i is equal to "101", in that case, the queue 1b connected to the chain managed by the high-level queue level management section 3a is taken out.

(ii )キューレベル管理部3aのレベルキュー個数
領域31の値を“1”減じる。
(ii) Decrease the value in the level queue count area 31 of the queue level management unit 3a by "1".

(iii )キューレベル管理部3aのレベル先頭キュ
一番号領域32にキュー1bの後方向キュ一番号領域1
2の値を設定する。
(iii) The backward queue number area 1 of the queue 1b is added to the level head queue number area 32 of the queue level management unit 3a.
Set the value of 2.

(iv )レベルキュー個数領域31の値が“0”なら
ば、レベル最後キュ一番号領域33に“0”を、レベル
AGE領域34に“0′をそれぞれ設定する。
(iv) If the value in the level cue number area 31 is "0", set "0" in the level last cue number area 33 and set "0' in the level AGE area 34, respectively.

(v)キューレベル個数領域31の値が“1”ならば、
レベル最後キュ一番号領域33にそのキューのキュ一番
号を設定する。
(v) If the value of the queue level number area 31 is "1",
The cue number of the cue is set in the level last cue number area 33.

(vi )レベルキュー個数領域31の値が“1”以上
ならば、レベル先頭キュ一番号領域33に設定されたキ
ュ一番号のキューのAGE領域14のAGE値をレベル
AGE領域34に設定する。
(vi) If the value in the level cue number area 31 is "1" or more, the AGE value of the AGE area 14 of the cue with the cue number set in the level head cue number area 33 is set in the level AGE area 34.

■ 空きとなったキュー1bを空きキュー管理部2の管
理するチェーンに接続する。
■ Connect the empty queue 1b to the chain managed by the empty queue management section 2.

(i)空きキュー管理部2の空きキュー個数領域21の
値を“1”増す。
(i) Increase the value of the number of free queues area 21 of the free queue management unit 2 by "1".

(ii )接続するキュー1bの前方向キュ一番号領域
11に空きキュー管理部2の最後キュ一番号領域23の
値を設定する。
(ii) Set the value of the last queue number field 23 of the empty queue management section 2 in the forward queue number field 11 of the queue 1b to be connected.

(iii )空きキュー管理部2の最後キュ一番号領域
に接続するキュー1bのキュ一番号“2”を設定する。
(iii) Set the queue number "2" of the queue 1b connected to the last queue number area of the empty queue management section 2.

(iv)空きキュー個数領域21の値が“1°ならば、
空きキュー管理部2の先頭キュ一番号領域22にそのキ
ューのキュ一番号を設定する。
(iv) If the value of the number of free queues area 21 is “1°,”
The queue number of the queue is set in the head queue number area 22 of the empty queue management section 2.

(v)キュー1bの最後キュ一番号領域12に“0”を
設定する。
(v) Set "0" in the last queue number area 12 of the queue 1b.

(vi)空きキュー個数領域の値が“2”以上ならば、
接続するキュー1bの前方向キュー番号領域11に設定
されたキュ一番号“5”のキュー1eの後方向キュ一番
号領域12には、接続されるキュー1bの登録キュー番
号“2′が設定される。これによって、状態は第4図(
b)より第4図(C)に遷移する。
(vi) If the value of the number of free queues area is “2” or more,
The registered queue number ``2'' of the connected queue 1b is set in the backward queue number area 12 of the queue 1e with the queue number ``5'' set in the forward queue number area 11 of the connected queue 1b. As a result, the state is as shown in Figure 4 (
Transition from b) to FIG. 4(C).

■ ここでさらに、この第4図(C)の状態において高
レベルのキューデータの登録要求がなされる。
(2) Furthermore, in the state shown in FIG. 4(C), a request is made to register high-level queue data.

この際の空きキュー管理部1からのキューの取り出し手
順は前記■の手順、レベル1管理部3aへの登録手順は
前記■〜■の手順と同様である。
At this time, the procedure for taking out the queue from the empty queue management unit 1 is the same as the procedure in (2) above, and the procedure for registering it in the level 1 management unit 3a is the same as in the procedures in (1) to (3) above.

〔状態(d)〕[Status (d)]

これによって、状態は第4図(C1より第4図(d)に
遷移する。
As a result, the state transitions from FIG. 4 (C1) to FIG. 4(d).

■ この第4図(d)の状態でさらにキューデータの取
り出し要求がなされた場合、前記■〜■の手順が繰り返
えされる。その場合、キューレベル管理部3aのレベル
AGEM域34のAGE値は“98″であり、キューレ
ベル管理部3bのレベルAGE領域34のAGE値は“
101”なので、AGE値の大きなキューレベル管理部
3bの管理するチェーンに接続されたキュー1aからキ
ューデータが取り出されることになる。
(2) If a request to retrieve the queue data is made in the state shown in FIG. 4(d), the steps (1) to (4) are repeated. In that case, the AGE value in the level AGEM area 34 of the queue level management unit 3a is “98”, and the AGE value in the level AGE area 34 of the queue level management unit 3b is “98”.
101'', the queue data is taken out from the queue 1a connected to the chain managed by the queue level management unit 3b having a large AGE value.

なお、上記実施例では高、低2つのレベルのキューデー
タの登録の際、AGE演算値を各々“2”。
In the above embodiment, when registering cue data of two levels, high and low, the AGE calculation value is set to "2".

“1”の固定値としたものを示したが、第2図の各レベ
ルキュー管理部3a、3b、3nに各レベルごとのAG
E演算値を設けてもよく、この項目を設けることにより
各レベルごとの取り出し順序が任意に選択できるように
なる。
Although a fixed value of "1" is shown, each level queue management section 3a, 3b, 3n in FIG.
An E calculation value may be provided, and by providing this item, the extraction order for each level can be arbitrarily selected.

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

以上のように、この発明によれば、キューにキューデー
タを登録する際、その登録層を示すAGE値を併せて記
録し、キューデータの取り出し時にこのAGE値の順位
に従って選択したキューよりキューデータの取り出しを
行うように構成したので、低レベルのチェーンに接続さ
れたキューが、いつまでも取り出されずにいるようなこ
とのないキューバッファ管理方式が得られる効果がある
。。
As described above, according to the present invention, when registering cue data in a queue, the AGE value indicating the registration layer is also recorded, and when the cue data is retrieved, the cue data is selected from the queue selected according to the order of the AGE value. Since the configuration is configured such that a queue connected to a low-level chain is not taken out forever, it is possible to obtain a queue buffer management method. .

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

第1図はこの発明の一実施例によるキューバッファ管理
方式を示す概略構成図、第2図はそのキューの詳細を示
す構成図、第3図は同じくレベル管理部の詳細を示す構
成図、第4図はその動作を説明するための状態遷移図、
第5図はこの発明および従来の空きキュー管理部の詳細
を示す構成図・第6図は従来のキューバッファ管理方式
を示す概略構成図、第7図はそのキューの詳細を示す構
成図、第8図は同じくレベル管理部の詳細を示す構成図
、第9図はその動作を説明するための状態遷移図である
。 1はキューバッファ、1a〜1mはキュー、2は空きキ
ュー管理部、3はレベル管理部、4はマスタAGE管理
部。 なお、図中、同一符号は同一、又は相当部分を示す。 −266・ 3“ し^CIL、蕾ず!七ヤ 第4図 第5図 第7図 第8図 第9図
FIG. 1 is a schematic configuration diagram showing a queue buffer management system according to an embodiment of the present invention, FIG. 2 is a configuration diagram showing details of the queue, FIG. 3 is a configuration diagram showing details of the level management section, and FIG. Figure 4 is a state transition diagram to explain its operation.
FIG. 5 is a block diagram showing details of the free queue management section of the present invention and the conventional free queue management unit. FIG. 6 is a schematic block diagram showing the conventional queue buffer management method. FIG. 7 is a block diagram showing details of the queue. Similarly, FIG. 8 is a configuration diagram showing details of the level management section, and FIG. 9 is a state transition diagram for explaining its operation. 1 is a queue buffer, 1a to 1m are queues, 2 is an empty queue management section, 3 is a level management section, and 4 is a master AGE management section. In addition, in the figures, the same reference numerals indicate the same or equivalent parts. -266・ 3" CIL, buds!

Claims (1)

【特許請求の範囲】[Claims] キューデータが格納される複数のキューを備えたキュー
バッファと、空いている前記キューをチェーンに接続し
て管理する空きキュー管理部と、前記キューデータが格
納された前記キューを、当該キューデータのレベル毎の
チェーンに接続して管理するレベル管理部とを備え、前
記キューデータの登録要求があると、前記空きキュー管
理部の管理するチェーンの先頭に接続されていたキュー
に当該キューデータを格納して、そのキューデータのレ
ベルに該当するレベルの前記チェーンに当該キューを接
続し、前記キューデータの取り出し要求があると、前記
レベルに従って選択したキューからキューデータを取り
出し、空きとなった当該キューを前記空きキュー管理部
の管理するチェーンに接続するキューバッファ管理方式
において、前記キューデータの登録要求がある度に歩進
して基本AGE値を出力するマスタAGE管理部を設け
るとともに、前記レベル管理部に各レベルに対応したA
GE演算値を設定し、前記レベル管理部が管理している
チェーンに新規にキューを接続する際、そのキューに、
前記基本AGE値と対応するレベルの前記AGE演算値
とから算出したAGE値を記録し、前記キューデータの
取り出し要求があると前記AGE値を比較して、その順
位に従って選択したキューより前記キューデータの取り
出しを行うことを特徴とするキューバーファ管理方式。
a queue buffer including a plurality of queues in which queue data is stored; a free queue management unit that connects and manages the vacant queues into a chain; and a level management unit that connects and manages the chain for each level, and when there is a request to register the queue data, the queue data is stored in the queue connected to the head of the chain managed by the free queue management unit. Then, the queue is connected to the chain at the level corresponding to the level of the queue data, and when there is a request to retrieve the queue data, the queue data is retrieved from the queue selected according to the level, and the queue becomes empty. In the queue buffer management method, a master AGE management unit is provided which increments and outputs a basic AGE value every time there is a request to register the queue data, and the level management unit A corresponding to each level in the section
When setting the GE calculation value and connecting a new queue to the chain managed by the level management section, the queue is
The AGE value calculated from the basic AGE value and the AGE calculation value of the corresponding level is recorded, and when there is a request to retrieve the queue data, the AGE values are compared, and the queue data is extracted from the queue selected according to the order. A Cuban fur management method that is characterized by taking out.
JP9360188A 1988-04-18 1988-04-18 Queue buffer control system Pending JPH01265340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9360188A JPH01265340A (en) 1988-04-18 1988-04-18 Queue buffer control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9360188A JPH01265340A (en) 1988-04-18 1988-04-18 Queue buffer control system

Publications (1)

Publication Number Publication Date
JPH01265340A true JPH01265340A (en) 1989-10-23

Family

ID=14086841

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9360188A Pending JPH01265340A (en) 1988-04-18 1988-04-18 Queue buffer control system

Country Status (1)

Country Link
JP (1) JPH01265340A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8041870B1 (en) * 2003-03-14 2011-10-18 Marvell International Ltd. Method and apparatus for dynamically granting access of a shared resource among a plurality of requestors

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8041870B1 (en) * 2003-03-14 2011-10-18 Marvell International Ltd. Method and apparatus for dynamically granting access of a shared resource among a plurality of requestors
US8307139B1 (en) 2003-03-14 2012-11-06 Marvell International Ltd. Method and apparatus for dynamically granting access of a shared resource among a plurality of requestors
US9037767B1 (en) 2003-03-14 2015-05-19 Marvell International Ltd. Method and apparatus for dynamically granting access of a shared resource among a plurality of requestors

Similar Documents

Publication Publication Date Title
FR2489578A1 (en) ORGANIZATION STRUCTURE FOR BUFFER MEMORY
JP2002520691A (en) Method and apparatus for storing different data structures
US4934823A (en) Staging method and system in electronic file apparatus
JP3515810B2 (en) Sort processing method and apparatus
JPH01265340A (en) Queue buffer control system
EP0522728B1 (en) Method for efficient access of data stored in a nexus table
US6112261A (en) Data transferring system reading and temporarily storing a record until a length of the record is different from a defined record length parameter value
JPS59151252A (en) Picture retrieving device
JP2962335B2 (en) Free space search method
JP2923952B2 (en) Merge processing method
JP2615046B2 (en) Record addition processing method
JPS63129441A (en) Virtual memory managing device
JPS62262154A (en) Data file device
JPS61100847A (en) System for managing page of data accumulating file
JPH01166229A (en) Data control system for hash record
JPS6368966A (en) Text buffer processing system
JPH0264814A (en) File control system for plural files in one magnetic tape volume
JPS63303399A (en) Voice information storage apparatus
JPH04199338A (en) Data base management system
JPH03102574A (en) Time series picture data accumulation management system
JPH0668088A (en) Text management system in distributed processing editer
JPS60132260A (en) Input/output controlling method
JP2000099383A (en) System and method for managing database and storage medium
JPH02127742A (en) Idle area retrieving system
JPH03225453A (en) Memory area securing system