JPH0594425A - Task managing method using multiple list - Google Patents

Task managing method using multiple list

Info

Publication number
JPH0594425A
JPH0594425A JP28081691A JP28081691A JPH0594425A JP H0594425 A JPH0594425 A JP H0594425A JP 28081691 A JP28081691 A JP 28081691A JP 28081691 A JP28081691 A JP 28081691A JP H0594425 A JPH0594425 A JP H0594425A
Authority
JP
Japan
Prior art keywords
tasks
list
task
cell
pointer
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
JP28081691A
Other languages
Japanese (ja)
Inventor
Yasuhiro Hirano
泰宏 平野
Tetsuji Sato
哲司 佐藤
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP28081691A priority Critical patent/JPH0594425A/en
Publication of JPH0594425A publication Critical patent/JPH0594425A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten a time required for a load distribution by constituting a queue of a low-order list in which low-order cells are connected, pointers indicating the head and the tail, multiple list constituted of a high-order list in which high-order cells are connected, and pointers indicating the head and the tail. CONSTITUTION:At the time of taking out the fixed number B of tasks from the queue, task sources 1-1 to 1-S store tasks information in the low-order cell, and connects the low-order cell with the low-order list, when the tasks are prepared. When the number of the tasks is turned to B, the task sources 1-1 to 1-S store the pointers indicating the head and the tail in the high-order cell, connects the high-order cell with the high-order list, and repeats the processing of changing the point indicating the tail so that the connected high- order cell can be pointed. Then, a processors 3-1 to 3-P retrieves the high-order cell positioned at the head of the queue by using the pointer indicating the head at the time of the completion of the entire taken-out tasks, takes out the entire tasks of the connected low-order list, and repeats the processing of changing the pointer indicating the head so that the next high-order cell can be indicated.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、独立に実行可能な多数
のタスクを並列処理するシステムにおいて、多数のタス
クをキューで管理する方式に関し、特に、一度に複数の
リスクをキューに繋ぐ、あるいは一度に複数のタスクを
キューから取り出す際にリストをたどる回数を少なくす
るタスク管理情報の格納および取り出し方法に関するも
のである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for managing a large number of tasks in a queue in a system for parallel processing a large number of tasks that can be independently executed. The present invention relates to a method for storing and retrieving task management information that reduces the number of times the list is traversed when retrieving a plurality of tasks from a queue at one time.

【0002】[0002]

【従来の技術】図11はS(≧1)個のタスク源(9−
1〜9〜A)から生成される独立に実行可能なタスク
を、タスク配分手段(10)を用いてP(>1)個のプ
ロセッサ(11−1〜11−P)に配分して処理する一
般的な並列処理システムの概念図である。
2. Description of the Related Art FIG. 11 shows S (≧ 1) task sources (9-
Independently executable tasks generated from 1 to 9 to A) are distributed and processed by P (> 1) processors (11-1 to 11-P) using the task distribution means (10). It is a conceptual diagram of a general parallel processing system.

【0003】タスク源(9−1〜9−S)で生成された
タスクは、タスク管理情報をタスク配分手段(10)内
のキューに入れることによって管理される。
The tasks generated by the task sources (9-1 to 9-S) are managed by putting task management information in a queue in the task distribution means (10).

【0004】D. Knuth : The Art of Computer Program
ing, Addison-Wesley, Reading. Mass., 1973 による
と、キューの実現方法としては、配列を用いた環表現と
リストがある。
D. Knuth: The Art of Computer Program
According to ing, Addison-Wesley, Reading. Mass., 1973, there are ring representations using arrays and lists as methods of realizing cues.

【0005】配列を用いた環表現では、キュー長の最大
値が固定であり、最大値を越える数のタスクを管理する
ことができないという問題がある。
The ring representation using an array has a problem that the maximum value of the queue length is fixed and it is impossible to manage the number of tasks exceeding the maximum value.

【0006】一方、リストを用いると、セルを追加する
ことによって管理できるタスク数を動的に変更できる。
On the other hand, the use of a list allows the number of tasks that can be managed to be dynamically changed by adding cells.

【0007】リストによってキューを構成する場合、タ
スク管理情報を格納したセルを繋いだリストと、該リス
トの先頭を示すポインタと、該リストの最後を示すポイ
ンタによってキューを構成する。
When a queue is formed by a list, a list is formed by connecting cells storing task management information, a pointer indicating the beginning of the list, and a pointer indicating the end of the list.

【0008】生成されたタスクをキューに接続する際に
は、タスク情報を格納したセルをリストの先頭または最
後に繋ぎ、リストの先頭または最後を示すポインタを該
接続したセルを指すように変更することによって行なっ
ていた。
When connecting the generated task to the queue, the cell storing the task information is connected to the beginning or end of the list, and the pointer indicating the beginning or end of the list is changed to point to the connected cell. It was done by things.

【0009】タスクを配分するために前記キューから取
り出す際には、リストの先頭を示すポインタを用いて該
キューの先頭に位置するセルを探索し、リストの先頭を
示すポインタを次のセルを指すように変更することによ
って行なっていた。
When the task is taken out from the queue for allocation, the pointer at the head of the list is used to search for the cell at the head of the queue, and the pointer at the head of the list points to the next cell. It was done by changing so.

【0010】図11のような並列処理システムにおける
従来の負荷配分技術がYung-TerngWang, Robert J. T. M
orris : Load Shareing in Distributed Systems, IEEE
Transactions on Computers, Vol. C-34, No. 3, pp.
204-217, Mar. 1985 で分類、整理されている。
A conventional load distribution technique in a parallel processing system as shown in FIG. 11 is Yung-Terng Wang, Robert JT M.
orris: Load Sharing in Distributed Systems, IEEE
Transactions on Computers, Vol. C-34, No. 3, pp.
Classified and organized by 204-217, Mar. 1985.

【0011】タスク配分手段(10)において、1タス
クを単位として配分すると、プロセッサ(11−1〜1
1−P)のアイドル時間を小さくできる反面、負荷配分
の回数が多くなり、負荷配分に必要な情報の収集や通信
のオーバヘッド、複数のプロセッサが同一のキューへア
クセスすることを調停する排他制御によるオーバヘッド
時間が大きくなる。
When the task distribution means (10) distributes one task as a unit, the processors (11-1 to 11-1)
1-P) idle time can be shortened, but the number of times of load distribution is increased, so that information required for load distribution, communication overhead, and exclusive control that arbitrates access to the same queue by multiple processors Overhead time increases.

【0012】この問題を解決する手法として、固定数B
(>1)個のタスクをまとめて配分する方法が前記文献
に示されている。
As a method for solving this problem, a fixed number B
A method for collectively distributing (> 1) tasks is shown in the above-mentioned document.

【0013】また、タスクの総数が既知の場合に、一度
に配分するタスク数を、最初は多くし、処理の進行にと
もなって少なくしていくことによって負荷配分回数を減
少させ、上記オーバヘッドを小さくする方法が、特願平
2−413633(特開平− 号公報)に並
列処理システムの負荷配分方法で提案されている。
When the total number of tasks is known, the number of tasks to be distributed at one time is increased at first and decreased as the processing progresses to reduce the number of times of load distribution, thus reducing the overhead. A method of doing so is proposed in Japanese Patent Application No. 2-413633 (Japanese Patent Laid-Open Publication No. HEI-6) as a load distribution method for a parallel processing system.

【0014】上記の負荷配分手法では、複数個のタスク
情報を一度にキューから取り出すことが必要になる。
In the above load distribution method, it is necessary to take out a plurality of pieces of task information from the queue at once.

【0015】複数個のタスクを一度に前記キューから取
り出す際には、リストの先頭を示すポインタを用いて該
キューの先頭に位置するセルを探索し、取り出したい個
数になるまで順次セルをたどり、リストの先頭を示すポ
インタを最後にとり出したセルの次のセルを指すように
変更することによって行なっていた。
When a plurality of tasks are fetched from the queue at one time, a pointer at the head of the list is used to search for a cell located at the head of the queue, and the cells are sequentially traced until the number reaches the desired number. This is done by changing the pointer indicating the beginning of the list to point to the cell next to the last fetched cell.

【0016】[0016]

【発明が解決しようとする課題】上記の負荷配分手法で
は、複数個のタスク情報を一度にキューから取り出すこ
とが必要になる。
In the above load distribution method, it is necessary to take out a plurality of pieces of task information from the queue at once.

【0017】しかし、複数個のタスク管理情報を一度に
リストから取り出すには、取り出すタスク数回、ポイン
タをたどる必要がある。
However, in order to extract a plurality of task management information from the list at once, it is necessary to trace the pointer several times for the tasks to be extracted.

【0018】そのため、多くのタスク情報を取り出す際
にはポインタをたどる時間が長くなり、負荷配分に要す
る時間が長くなるという問題点があった。
Therefore, there is a problem that the pointer tracing time becomes long when a large amount of task information is taken out, and the time required for load distribution becomes long.

【0019】さらに、複数のプロセッサがキューにアク
セスする場合には、キューをロックして排他的に使用す
る時間が長くなり、プロセッサ間の競合が大きくなりロ
ックの獲得待ちの時間が長くなるという問題点があっ
た。
Further, when a plurality of processors access the queue, the time for locking and exclusively using the queue becomes long, the contention between the processors becomes large, and the waiting time for acquiring the lock becomes long. There was a point.

【0020】本発明では、多数のタスク情報を取り出す
際にポインタをたどる回数を少なくして、負荷配分に要
する時間を短縮することを目的とする。
An object of the present invention is to shorten the time required for load distribution by reducing the number of times the pointer is traced when retrieving a large number of task information.

【0021】[0021]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、S(≧1)個のタスク源と、該タスク源
から生成される独立に実行可能なタスクと、P(>1)
個のプロセッサと、個々のプロセッサに所望の個数のタ
スクを配分するタスク配分手段とを具備した並列処理シ
ステムにおいて、
In order to achieve the above object, the present invention provides S (≧ 1) task sources, independently executable tasks generated from the task sources, and P (> 1). 1)
In a parallel processing system comprising individual processors and task distribution means for distributing a desired number of tasks to individual processors,

【0022】該タスク配分手段において実行待ちのタス
クをキューによって管理する際に、
When managing tasks waiting to be executed in the task distribution means by a queue,

【0023】該タスクの管理情報を格納した下位セルを
繋いだ下位リスト(8)と、該下位リストの先頭を示す
ポインタ(7−1)と、該下位リストの最後を示すポイ
ンタ(7−2)と、該下位リストに繋がれているタスク
数(7−3)を格納した上位セル(7)を繋いだ上位リ
スト(4)からなる多重リストと、該上位リストの先頭
を示すポインタ(5)と、該上位リストの最後を示すポ
インタ(6)によってキューを構成し、
A lower list (8) connecting lower cells storing management information of the task, a pointer (7-1) indicating the head of the lower list, and a pointer (7-2) indicating the end of the lower list. ), And a higher list (4) that connects upper cells (7) that store the number of tasks (7-3) connected to the lower list, and a pointer (5 indicating the beginning of the upper list). ) And a pointer (6) indicating the end of the upper list,

【0024】生成されたタスクをキューに接続する際に
は、タスク情報を格納した下位セルで前記下位リストを
作成し、該下位リストの先頭、最後を示すポインタと該
下位リストに繋がれているタスク数を格納した上位セル
を作成し、前記上位リストの先頭または最後に繋ぎ、上
位リストの先頭または最後を示すポインタを該接続した
上位セルを指すように変更することによって行ない、
When the generated task is connected to the queue, the lower list is created by the lower cells storing the task information, and the pointers indicating the beginning and end of the lower list are connected to the lower list. By creating an upper cell that stores the number of tasks, connecting to the beginning or end of the upper list, and changing the pointer indicating the beginning or end of the upper list to point to the connected upper cell,

【0025】タスクを配分するために前記キューからタ
スクを取り出す際には、
When retrieving tasks from the queue for task distribution,

【0026】上位リストの先頭を示すポインタを用いて
該キューの先頭に位置する上位セルを探索し、
The pointer indicating the head of the upper list is used to search for the upper cell located at the head of the queue,

【0027】取り出すタスク数が1つの上位セルに繋が
れているタスク数を越えていれば、該上位セルに繋がれ
ている下位リストのタスク全てを取り出して、下位リス
トに繋がれているタスク数を0とし、取り出すタスク数
から該上位セルに繋がれていたタスク数を減じた数を新
たに取り出すタスク数として、リンクをたどって次の上
位セルに移動して上位リストの先頭を示すポインタを該
セルを指すように変更して、取り出し操作を繰り返し、
If the number of tasks to be fetched exceeds the number of tasks linked to one upper cell, all tasks in the lower list linked to the upper cell are fetched and the number of tasks linked to the lower list Is set to 0, and a number obtained by subtracting the number of tasks connected to the upper cell from the number of fetched tasks is set as a new task number to be fetched. Change to point to the cell, repeat the ejection operation,

【0028】取り出すタスク数が1つの上位セルに繋が
れているタスク数以下であれは、該上位セルに繋がれて
いる下位リストから、取り出すタスク数個の下位セルを
取り出し、上位セルに繋がれているタスク数から取り出
すタスク数を減じた数を上位セルに繋がれているタスク
数の新しい値とする、という手順で取り出すようにする
ことを特徴としている。
If the number of tasks to be extracted is less than or equal to the number of tasks connected to one upper cell, lower cells of the number of tasks to be extracted are extracted from the lower list connected to the upper cell and connected to the upper cell. It is characterized in that a number obtained by subtracting the number of tasks to be extracted from the number of existing tasks is set as a new value of the number of tasks connected to the upper cell to perform extraction.

【0029】[0029]

【作用】本発明のタスク管理法では、タスク情報を多重
リストで管理することによって、一度に多数のタスクを
取り出す際に、下位リストに繋がれているタスク数を越
える長さのリストをたどることなく取り出すことができ
る。
According to the task management method of the present invention, by managing the task information in a multiple list, when a large number of tasks are taken out at one time, a list having a length exceeding the number of tasks linked to the lower list is traced. Can be taken out without.

【0030】以下図面にもとづき実施例について説明す
る。
Embodiments will be described below with reference to the drawings.

【0031】[0031]

【実施例】図1は本発明の一実施例を示す図で、1−1
〜1−Sはタスク源、2は本発明の多重リストで構成さ
れたキューであり、3−1〜3−Pはプロセッサであ
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a diagram showing an embodiment of the present invention.
1-S is a task source, 2 is a queue composed of multiple lists of the present invention, and 3-1 to 3-P are processors.

【0032】図2および図3は本発明のキューを構成す
る上位リストおよび上位セルと下位リストを示す図であ
る。
FIGS. 2 and 3 are diagrams showing an upper list, an upper cell and a lower list which form the queue of the present invention.

【0033】タスクの管理情報を格納した下位セルを繋
いだ下位リスト8と、該下位リストの先頭を示すポイン
タ7−1と、該下位リストの最後を示すポインタ7−2
と、該下位リストに繋がれているタスク数7−3を格納
した上位セル7を繋いだ上位リスト4からなる多重リス
トと、該上位リストの先頭を示すポインタ5と、該上位
リストの最後を示すポインタ6によってキューを構成す
る。
A lower list 8 connecting lower cells storing task management information, a pointer 7-1 indicating the head of the lower list, and a pointer 7-2 indicating the end of the lower list.
A multiple list consisting of an upper list 4 connecting upper cells 7 storing the number of tasks 7-3 connected to the lower list, a pointer 5 indicating the head of the upper list, and the end of the upper list. A queue is constituted by the pointer 6 shown.

【0034】以下では、プロセッサ3−1〜3−Pが固
定数B(>1)個のタスクをまとめてキューから取り出
す場合と、一度に取り出すタスク数を変える場合の2種
を用いて、本発明の実施例を説明することにする。
In the following, the processor 3-1 to 3-P uses two types of cases in which a fixed number B (> 1) of tasks are collectively taken out from the queue and when the number of tasks to be taken out at one time is changed. Examples of the invention will be described.

【0035】まず、固定数B(>1)個のタスクをまと
めてキューから取り出す場合について説明する。
First, a case where a fixed number B (> 1) of tasks are collected from the queue will be described.

【0036】タスク源1−1〜1−Sは、タスクか生成
されると、タスク情報を下位セルに格納し、下位リスト
につなぐ。
When the task is generated, the task sources 1-1 to 1-S store the task information in the lower cells and connect them to the lower list.

【0037】タスク数がB個になると、下位リストの先
頭および最後を示すポインタを上位セルに格納する。
When the number of tasks reaches B, pointers indicating the beginning and end of the lower list are stored in the upper cell.

【0038】下位リストにつなぐタスク数は常にBであ
るから、下位リストに繋がれているタスク数を上位セル
に格納する必要はない。
Since the number of tasks linked to the lower list is always B, it is not necessary to store the number of tasks linked to the lower list in the upper cell.

【0039】最後に、上位セルを上位リストの最後につ
なぎ、上位リストの最後を示すポインタを該接続した上
位セルを指すように変更する。
Finally, the upper cell is connected to the end of the upper list, and the pointer indicating the end of the upper list is changed to point to the connected upper cell.

【0040】以上の処理を繰り返す。The above processing is repeated.

【0041】プロセッサ3−1〜3−Pは、取り出した
全てのタスクの処理を終えると、上位リストの先頭を示
すポインタを用いて該キューの先頭に位置する上位セル
を探索し、1つの下位リストにつながれているタスク数
は常にBであるから、該上位セルに繋がれている下位リ
ストのタスク全てを取り出して、上位リストの先頭を示
すポインタを次の上位セルを指すように変更する。
When the processors 3-1 to 3-P have finished processing all the extracted tasks, the processors 3-1 to 3-P search for the upper cell located at the head of the queue using the pointer indicating the head of the upper list, and search for one lower Since the number of tasks connected to the list is always B, all tasks in the lower list connected to the upper cell are taken out and the pointer indicating the beginning of the upper list is changed to point to the next upper cell.

【0042】以上の処理を繰り返す。The above processing is repeated.

【0043】以上のように、一度に取り出すタスクの個
数Bがあらかじめ判っている場合には、キューにタスク
を繋ぐ際に一つの下位リストに繋ぐタスク数をBとする
ことにより、下位リストをたどることなくタスクを取り
出せる。
As described above, when the number B of tasks to be taken out at a time is known in advance, the lower list is traced by setting the number of tasks connected to one lower list when connecting the tasks to the queue to B. You can retrieve tasks without having to.

【0044】次に、一度にキューから取り出すタスク数
を変える場合について説明する。
Next, a case where the number of tasks taken out from the queue at one time is changed will be described.

【0045】タスク源1−1〜1−Sは、タスクが生成
されると、タスク情報を下位セルに格納し、下位リスト
につなぐ。
When the task is generated, the task sources 1-1 to 1-S store the task information in the lower cells and connect them to the lower list.

【0046】そして、下位リストの先頭および最後を示
すポインタと下位リストにつなぐタスク数を上位セルに
格納する。
Then, the pointers indicating the beginning and the end of the lower list and the number of tasks connected to the lower list are stored in the upper cell.

【0047】下位リストにつなぐタスク数に制限はな
く、例えば、一定の数としても良いし、一定時間の間に
生成されたタスク数としても良い。
There is no limitation on the number of tasks linked to the lower list, and for example, it may be a fixed number or the number of tasks generated during a fixed time.

【0048】最後に、上位セルを上位リストの最後につ
なぎ、上位リストの最後を示すポインタを該接続した上
位セルを指すように変更する。
Finally, the upper cell is connected to the end of the upper list, and the pointer indicating the end of the upper list is changed to point to the connected upper cell.

【0049】以上の処理を繰り返す。The above processing is repeated.

【0050】プロセッサ3−1〜3−Pは、取り出した
全てのタスクの処理を終えると、キュー2からタスクを
取り出す。
The processors 3-1 to 3-P take out the tasks from the queue 2 after finishing the processing of all the taken out tasks.

【0051】図4は本発明のタスクを取り出す手順の例
を示すフローチャートである。
FIG. 4 is a flow chart showing an example of the procedure for extracting the task of the present invention.

【0052】(1)上位リストの先頭を示すポインタ5
を用いて該キューの先頭に位置する上位セルを探索する
(ステップ111,112)。
(1) Pointer 5 indicating the beginning of the upper list
Is used to search for an upper cell located at the head of the queue (steps 111 and 112).

【0053】(2)該上位セルの下位リストに繋がれて
いるタスク数7−3と取り出すタスク数を比較し、取り
出すタスク数が下位リストに繋がれているタスク数7−
3を越えていれば下記の手順(3)、取り出すタスク数
が下位リストに繋がれているタスク数7−3の1/2以
上かつ下位リストに繋がれているタスク数7−3以下で
あれば下記の手順(4)、取り出すタスク数が下位リス
トに繋がれているタスク数7−3の1/2未満であれば
下記の手順(5)を実行する(ステップ121〜12
3)。
(2) The number of tasks 7-3 connected to the lower list of the upper cell is compared with the number of tasks to be taken out, and the number of tasks to be taken out is the number of tasks 7-connected to the lower list.
If it exceeds 3, the following procedure (3), the number of tasks to be taken out is 1/2 or more of the number of tasks 7-3 connected to the lower list and the number of tasks 7-3 or less connected to the lower list. For example, if the number of tasks to be taken out is less than 1/2 of the number of tasks 7-3 linked to the lower list, the following procedure (4) is executed (steps 121 to 12).
3).

【0054】(3)該上位セルに繋がれている下位リス
ト8のタスク全てを取り出して(ステップ131)、取
り出すタスク数から該上位セルの下位リストに繋がれて
いるタスク数7−3を減じた数を新たに取り出すタスク
数として(ステップ132)、下位リストに繋がれてい
るタスク数7−3を0とし(ステップ133)、リンク
をたどって次の上位セルに移動し(ステップ134)、
上位リストの先頭を示すポインタ5を該セルを指すよう
に変更して(ステップ135)、手順(2)を実行す
る。
(3) All the tasks in the lower list 8 connected to the upper cell are taken out (step 131), and the number of tasks 7-3 connected to the lower list in the upper cell is subtracted from the number of tasks to be taken out. Is set as the number of tasks to be newly extracted (step 132), the number of tasks 7-3 connected to the lower list is set to 0 (step 133), and the link is followed to move to the next higher cell (step 134).
The pointer 5 indicating the head of the upper list is changed to point to the cell (step 135), and the procedure (2) is executed.

【0055】(4)該上位セルに繋がれている下位リス
ト8の先頭から、該下位リストに繋がれているタスク数
7−3から取り出すタスク数を減じた数の下位セルをた
どり(ステップ141)、該下位セルから下位リスト8
の最後までを取り出し(ステップ142)、下位リスト
に繋がれているタスク数7−3から取り出すタスク数を
減じた数を下位リストに繋がれているタスク数7−3の
新しい値とする(ステップ143)。
(4) The number of lower cells obtained by subtracting the number of tasks to be taken from the number of tasks 7-3 connected to the lower list from the head of the lower list 8 connected to the upper cell is traced (step 141). ), From the lower cell to the lower list 8
Until the end (step 142), the number obtained by subtracting the number of tasks to be taken from the number of tasks 7-3 connected to the lower list is set as a new value of the number of tasks 7-3 connected to the lower list (step). 143).

【0056】(5)該上位セルに繋がれている下位リス
ト8の先頭から、取り出すタスク数個の下位セルを取り
出し(ステップ151,152)、下位リストに繋がれ
ているタスク数7−3から取り出すタスク数を減じた数
を下位リストに繋がれているタスク数7−3の新しい値
とする(ステップ153)。
(5) From the head of the lower list 8 connected to the upper cell, the lower cells of the number of tasks to be extracted are extracted (steps 151 and 152), and the number of tasks 7-3 connected to the lower list is extracted. The number obtained by subtracting the number of tasks to be taken out is set as a new value of the number of tasks 7-3 connected to the lower list (step 153).

【0057】以上の処理を繰り返す。The above processing is repeated.

【0058】この例では、下位リストをたどる回数を少
なくするために、取り出すタスク数が1つの上位セルに
繋がれているタスク数の1/2以上であれば、下位リス
トの後方に繋がれているタスクを取り出すようにした
が、リストをたどる時間を短縮することよりも、リスト
の後方のタスクから取り出されてFIFOにならない場
合があることの方が問題であれば、上記手順(2)を次
のようにすれば良い。
In this example, in order to reduce the number of times the lower list is traced, if the number of tasks to be taken out is 1/2 or more of the number of tasks connected to one upper cell, the task is connected to the rear of the lower list. I tried to take out the task that is present, but if it is more problematic that the task that is taken out from the task at the back of the list does not become the FIFO rather than shortening the time to follow the list, follow the above procedure (2). You can do the following:

【0059】(2′)該上位セルの下位リストに繋がれ
ているタスク数7−3と取り出すタスク数を比較し、取
り出すタスク数が下位リストに繋がれているタスク数7
−3を越えていれば手順(3)、取り出すタスク数が下
位リストに繋がれているタスク数7−3以下であれば手
順(5)を実行する。
(2 ') The number of tasks 7-3 connected to the lower list of the upper cell is compared with the number of tasks to be extracted, and the number of tasks to be extracted is the number of tasks 7 connected to the lower list.
If it exceeds -3, the procedure (3) is executed. If the number of tasks to be extracted is 7-3 or less, the procedure (5) is executed.

【0060】すなわち、図4でステップ123を素通り
してステップ151に進む。
That is, in FIG. 4, step 123 is directly passed to step 151.

【0061】最後に、具体例として、一度にキューから
取り出すタスク数を変える場合に、リストをたどる回数
の例を示す。
Finally, as a concrete example, an example of the number of times the list is traced when the number of tasks to be taken out from the queue at one time is changed is shown.

【0062】タスク源が下位リストに繋ぐタスク数は1
6で固定とする。
The number of tasks whose task source is connected to the lower list is 1
Fixed at 6.

【0063】プロセッサがタスクを取り出す手順に、手
順(2′)ではなく、リストをたどる回数が少ない
(2)の方を用いる。
The procedure (2) in which the number of times of tracing the list is small is used instead of the procedure (2 ') in the procedure for the processor to take out the task.

【0064】最初に30個のタスクを取り出し、次に2
0個のタスクを取り出す例を図5乃至図10に示す。
First take 30 tasks, then 2
An example of extracting 0 tasks is shown in FIGS.

【0065】(1−1)図5から図6(1-1) FIGS. 5 to 6

【0066】取り出すタスク数30が先頭の上位セルに
繋がれているタスク数16を越えているので、16個の
タスクを全て取り出す。
Since the number of tasks 30 to be taken out exceeds the number of tasks 16 connected to the head upper cell, all 16 tasks are taken out.

【0067】繋がれているタスク数を0とし、リンクを
たどって次の上位セルに移動し上位リストの先頭を示す
ポインタを該セルを指すように変更する。
The number of connected tasks is set to 0, the link is followed to move to the next upper cell, and the pointer indicating the head of the upper list is changed to point to the cell.

【0068】あと14個のタスクを取り出す必要があ
る。
It is necessary to retrieve 14 more tasks.

【0069】(1−2)図6から図7(1-2) FIGS. 6 to 7

【0070】取り出すタスク数14が上位セルに繋がれ
ているタスク数16の1/2以上かつ繋がれているタス
ク数未満であるから、下位リストを16−14=2回た
どり、残りの14個を取り出し、繋がれているタスク数
を2として、取り出しを終了する。
Since the number of tasks to be taken out 14 is 1/2 or more of the number of tasks 16 connected to the upper cell and less than the number of connected tasks, the lower list is traced 16-14 = 2 times, and the remaining 14 tasks are executed. Is extracted, the number of connected tasks is set to 2, and the extraction is completed.

【0071】(2−1)図7から図8(2-1) FIGS. 7 to 8

【0072】取り出すタスク数20が先頭の上位セルに
繋がれているタスク数2を越えているので、2個のタス
クを全て取り出す。
Since the number of tasks 20 to be taken out exceeds the number of tasks 2 connected to the head upper cell, all two tasks are taken out.

【0073】繋がれているタスク数を0とし、リンクを
たどって次の上位セルに移動し上位リストの先頭を示す
ポインタを該セルを指すように変更する。
The number of connected tasks is set to 0, the link is followed to move to the next upper cell, and the pointer indicating the head of the upper list is changed to point to the cell.

【0074】あと18個のタスクを取り出す必要があ
る。
It is necessary to retrieve 18 more tasks.

【0075】(2−2)図8から図9(2-2) FIGS. 8 to 9

【0076】取り出すタスク数18が上位セルに繋がれ
ているタスク数16を越えているので、16個のタスク
を全て取り出す。
Since the number of tasks to be extracted 18 exceeds the number of tasks 16 connected to the upper cell, all 16 tasks are extracted.

【0077】繋がれているタスク数を0とし、リンクを
たどって次の上位セルに移動し上位リストの先頭を示す
ポインタを該セルを指すように変更する。
The number of tasks connected is set to 0, the link is followed to move to the next upper cell, and the pointer indicating the head of the upper list is changed to point to the cell.

【0078】あと2個のタスクを取り出す必要がある。Two more tasks need to be retrieved.

【0079】(2−3)図9から図10(2-3) FIGS. 9 to 10

【0080】取り出すタスク数2が上位セルに繋がれて
いるタスク数16の1/2未満であるから、下位リスト
の先頭から2個を取り出し、繋がれているタスク数を1
4として、取り出しを終了する。
Since the number of tasks 2 to be taken out is less than 1/2 of the number of tasks 16 connected to the upper cell, two tasks are taken out from the head of the lower list and the number of connected tasks is 1
As a result of 4, the taking out is completed.

【0081】[0081]

【発明の効果】以上説明したように、本発明のタスク管
理法によれば、タスクキューから複数個のタスク情報を
一度に取り出す際に、リストをたどる回数を少なくでき
るので、タスク取り出しに要する時間を短縮することが
できる。
As described above, according to the task management method of the present invention, when a plurality of pieces of task information are fetched from the task queue at one time, the number of times the list is traced can be reduced, so the time required for task fetching can be reduced. Can be shortened.

【0082】そのため、複数のプロセッサが共有のキュ
ーからタスクを取り出す際の競合も小さくできる。
Therefore, the competition when a plurality of processors take out a task from a shared queue can be reduced.

【0083】また、複数のタスク源で生成されるタスク
を共有のキューで管理する場合に、上位セルは各タスク
源で独立に作成できるため、上位セルを上位リストにつ
なぐ時だけキューにアクセスすれば良いので、タスク情
報をキューにつなぐ際の競合も小さくできる。
Further, when the tasks generated by a plurality of task sources are managed by a shared queue, the upper cells can be created independently by each task source, and therefore the queue can be accessed only when the upper cells are connected to the upper list. Since it is sufficient, the contention when connecting the task information to the queue can be reduced.

【0084】したがって、タスク管理に要する時間を短
縮できる。
Therefore, the time required for task management can be shortened.

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

【図1】本発明の1実施例を示す構成図である。FIG. 1 is a configuration diagram showing an embodiment of the present invention.

【図2】本発明の上位リストの図である。FIG. 2 is a diagram of an upper level list of the present invention.

【図3】本発明の上位セルおよび下位リストの図であ
る。
FIG. 3 is a diagram of an upper cell and a lower list of the present invention.

【図4】本発明の処理フローの一例である。FIG. 4 is an example of a processing flow of the present invention.

【図5】本発明の具体例を示す図である。FIG. 5 is a diagram showing a specific example of the present invention.

【図6】本発明の具体例を示す図である。FIG. 6 is a diagram showing a specific example of the present invention.

【図7】本発明の具体例を示す図である。FIG. 7 is a diagram showing a specific example of the present invention.

【図8】本発明の具体例を示す図である。FIG. 8 is a diagram showing a specific example of the present invention.

【図9】本発明の具体例を示す図である。FIG. 9 is a diagram showing a specific example of the present invention.

【図10】本発明の具体例を示す図である。FIG. 10 is a diagram showing a specific example of the present invention.

【図11】一般的な並列処理システムの概念図である。FIG. 11 is a conceptual diagram of a general parallel processing system.

【符号の説明】[Explanation of symbols]

1−1〜1−S タスク源 2 キュー 3−1〜3−P プロセッサ 4 上位リスト 5 上位リストの先頭を示すポインタ 6 上位リストの最後を示すポインタ 7 上位セル 7−1 下位リストの先頭を示すポインタ 7−2 下位リストの最後を示すポインタ 7−3 下位リストに繋がれているタスク数 8 タスクの管理情報を格納した下位セルを繋いだ下位
リスト 9−1〜9−S タスク源 10 タスク配分手段 11−1〜11−P プロセッサ
1-1 to 1-S task source 2 queues 3-1 to 3-P processor 4 upper list 5 pointer to the beginning of the upper list 6 pointer to the end of the upper list 7 upper cell 7-1 to the beginning of the lower list Pointer 7-2 Pointer indicating the end of the lower list 7-3 Number of tasks connected to the lower list 8 Lower list connecting lower cells storing management information of tasks 9-1 to 9-S Task source 10 Task allocation Means 11-1 to 11-P Processor

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 S(≧1)個のタスク源と、該タスク源
から生成される独立に実行可能なタスクと、P(≧1)
個のプロセッサと、個々のプロセッサに所望の個数のタ
スクを配分するタスク配分手段とを具備した並列処理シ
ステムにおいて、 該タスク配分手段において実行待ちのタスクをキューに
よって管理する際に、 該タスクの管理情報を格納した下位セルを繋いだ下位リ
スト(8)と、該下位リストの先頭を示すポインタ(7
−1)と、該下位リストの最後を示すポインタ(7−
2)と、該下位リストに繋がれているタスク数(7−
3)を格納した上位セル(7)を繋いだ上位リスト
(4)からなる多重リストと、該上位リストの先頭を示
すポインタ(5)と、該上位リストの最後を示すポイン
タ(6)によってキューを構成し、 前記S個のタスク源のいずれかによって生成されたタス
クをキューに接続する際には、タスク情報を格納した下
位セルで前記下位リストを作成し、該下位リストの先
頭、最後を示すポインタと該下位リストに繋がれている
タスク数を格納した上位セルを作成し、前記上位リスト
の先頭または最後に繋ぎ、上位リストの先頭または最後
を示すポインタを該接続した上位セルを指すように変更
することによって行ない、 前記P個のプロセッサのいずれかにタスクを配分するた
めに前記キューからタスクを取り出す際には、 上位リストの先頭を示すポインタを用いて該キューの先
頭に位置する上位セルを探索し、 取り出すタスク数が1つの上位セルに繋がれているタス
ク数を越えていれば、該上位セルに繋がれている下位リ
ストのタスク全てを取り出して、下位リストに繋がれて
いるタスク数を0とし、取り出すタスク数から該上位セ
ルに繋がれていたタスク数を減じた数を新たに取り出す
タスク数として、リンクをたどって次の上位セルに移動
して上位リストの先頭を示すポインタを該セルを指すよ
うに変更して、取り出す操作を繰り返し、 取り出すタスク数が1つの上位セルに繋がれているタス
ク数以下であれば、該上位セルに繋がれている下位リス
トから、取り出すタスク数個の下位セルを取り出し、上
位セルに繋がれているタスク数から取り出すタスク数を
減じた数を上位セルに繋がれているタスク数の新しい値
とすることを特徴とする多重リストを用いたタスク管理
法。
1. S (≧ 1) task sources, independently executable tasks generated from the task sources, and P (≧ 1)
In a parallel processing system including individual processors and a task allocation unit that allocates a desired number of tasks to the individual processors, the task allocation unit manages the tasks when the tasks waiting for execution are managed by a queue. A lower list (8) connecting lower cells storing information, and a pointer (7
-1) and a pointer (7-
2) and the number of tasks connected to the lower list (7-
Queued by a multiplex list composed of an upper list (4) connecting upper cells (7) storing 3), a pointer (5) indicating the head of the upper list, and a pointer (6) indicating the end of the upper list. And connecting the task generated by any of the S task sources to the queue, the lower list is created by the lower cells storing the task information, and the beginning and end of the lower list are An upper cell storing the number of tasks connected to the pointer and the lower list is created, connected to the beginning or end of the upper list, and a pointer indicating the beginning or end of the upper list is pointed to the connected upper cell. When the task is taken out of the queue in order to distribute the task to any of the P processors, the top of the upper list is indicated. The upper cell located at the head of the queue is searched using the interface, and if the number of tasks to be extracted exceeds the number of tasks connected to one upper cell, the tasks in the lower list connected to the upper cell All are taken out, the number of tasks connected to the lower list is set to 0, and the number of tasks taken out is subtracted from the number of tasks connected to the upper cell. Move to the upper cell, change the pointer indicating the beginning of the upper list to point to that cell, repeat the fetch operation, and if the number of tasks to fetch is less than or equal to the number of tasks linked to one upper cell, From the lower list connected to the upper cell, the lower cells of the number of extracted tasks are extracted, and the number obtained by subtracting the number of tasks to be extracted from the number of tasks connected to the upper cell is set to the upper cell. A task management method using a multiple list characterized by setting a new value for the number of connected tasks.
JP28081691A 1991-10-01 1991-10-01 Task managing method using multiple list Pending JPH0594425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28081691A JPH0594425A (en) 1991-10-01 1991-10-01 Task managing method using multiple list

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28081691A JPH0594425A (en) 1991-10-01 1991-10-01 Task managing method using multiple list

Publications (1)

Publication Number Publication Date
JPH0594425A true JPH0594425A (en) 1993-04-16

Family

ID=17630380

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28081691A Pending JPH0594425A (en) 1991-10-01 1991-10-01 Task managing method using multiple list

Country Status (1)

Country Link
JP (1) JPH0594425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013005343A1 (en) 2011-07-01 2013-01-10 Renesas Electronics Corporation Apparatus and method for a marker guided data transfer between a single memory and an array of memories with unevenly distributed data amount in an simd processor system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013005343A1 (en) 2011-07-01 2013-01-10 Renesas Electronics Corporation Apparatus and method for a marker guided data transfer between a single memory and an array of memories with unevenly distributed data amount in an simd processor system

Similar Documents

Publication Publication Date Title
US9665404B2 (en) Optimization of map-reduce shuffle performance through shuffler I/O pipeline actions and planning
CN107579926A (en) The QoS methods to set up of Ceph cloud storage systems based on token bucket algorithm
CN105095327A (en) Distributed ELT system and scheduling method
CN106775493B (en) A kind of storage control and I/O Request processing method
US8190857B2 (en) Deleting a shared resource node after reserving its identifier in delete pending queue until deletion condition is met to allow continued access for currently accessing processor
JP3034873B2 (en) Information processing device
US6782535B1 (en) Dynamic queue width system and method
JP4673299B2 (en) Information processing method and information processing system
JPH0594425A (en) Task managing method using multiple list
CN111290858A (en) Input/output resource management method, device, computer equipment and storage medium
CN114116015B (en) Method and system for managing hardware command queue
US5430874A (en) Control method and system for managing memory control blocks of programmed tasks in a multi-processing system
JP2001282551A (en) Job processor and job processing method
JP2003208323A (en) Method, system and program for executing batch job
CN109471898A (en) It is a kind of for data to be carried out with the method and system of shared distribution
JPH06282447A (en) Queue management system
CN113448962B (en) Database data management method and device
CN109656708A (en) Animation play method for limiting, storage medium, electronic equipment and the system of Android
CN111782482B (en) Interface pressure testing method and related equipment
JP4182615B2 (en) Task management device
JP2615046B2 (en) Record addition processing method
JPH01185734A (en) Buffer memory managing system
JPH086829A (en) Simultaneous full data retrieving method for data base
JP2815716B2 (en) Message transmission processing method
JP2787107B2 (en) Buffer control system and device