JPH064314A - Inter-task synchronizing communication equipment - Google Patents

Inter-task synchronizing communication equipment

Info

Publication number
JPH064314A
JPH064314A JP15961392A JP15961392A JPH064314A JP H064314 A JPH064314 A JP H064314A JP 15961392 A JP15961392 A JP 15961392A JP 15961392 A JP15961392 A JP 15961392A JP H064314 A JPH064314 A JP H064314A
Authority
JP
Japan
Prior art keywords
task
priority
data
queue buffer
inter
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
JP15961392A
Other languages
Japanese (ja)
Inventor
Takahisa Shirakawa
貴久 白川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Home Electronics Ltd
NEC Corp
Original Assignee
NEC Home Electronics Ltd
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Home Electronics Ltd, Nippon Electric Co Ltd filed Critical NEC Home Electronics Ltd
Priority to JP15961392A priority Critical patent/JPH064314A/en
Publication of JPH064314A publication Critical patent/JPH064314A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide an inter-task synchronizing communication equipment provided with a means for decreasing information in a queue buffer. CONSTITUTION:The number of communication data stored in a queue buffer 1 is stored in a counter 2 and based on the value of the counter 2, a priority control part 3 refers to a priority managing table 4 registering the priority of producer/consumer tasks 6 and 7 to be transmitted/received through the queue buffer 1. By the control of the priority control part 3, the execution tasks of the producer/consumer tasks 6 and 7 are switched by a dispatcher 5.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ワープロ及びデータベ
ース等の情報処理装置、あるいはロボット等の制御装置
のタスク間同期通信装置に係り、特に通信情報を分割し
て送受信し、かつ部分的な高速処理を必要とするタスク
間同期通信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing device such as a word processor and a database or a task-to-task synchronous communication device of a control device such as a robot. The present invention relates to an intertask synchronous communication device that requires processing.

【0002】[0002]

【従来の技術】従来のタスク間同期通信装置は、図6に
示すように、ハードディスク106のコントローラ10
5が読み出し及び書き込みコマンドを受け取ってから、
読み出し及び書き込み装置を介してアクセスすべきデー
タの転送を開始するまでの遅延時間を必要とし、CPU
103はコントローラ105の待ち時間中に実行される
データ処理及び書き込みデータを用意するタスクと、コ
ントローラ105を制御するタスク間の同期通信とで使
用されている。
2. Description of the Related Art As shown in FIG. 6, a conventional inter-task synchronous communication device is a controller 10 of a hard disk 106.
After 5 receives the read and write commands,
A delay time is required until the transfer of data to be accessed via the read / write device is required, and the CPU
Reference numeral 103 is used for a task for preparing data processing and write data executed during the waiting time of the controller 105, and for synchronous communication between tasks for controlling the controller 105.

【0003】アドレス及びデータバス108は、CPU
103が主記憶装置101あるいはハードディスク10
6を指定するために使用され、CPU103と指定され
たターゲット間のデータ転送に用いる。
The address and data bus 108 is a CPU
103 is the main storage device 101 or the hard disk 10
6 is used for data transfer between the CPU 103 and the specified target.

【0004】コントローラ105は、CPU103が発
行するコマンドを装置毎に定められた電気信号に変換し
たり、逆に装置の状態情報をCPU103が理解できる
データに変換するために用いられ、ハードディスク10
6との間で転送されるデータを保持するバッファを備え
ている。
The controller 105 is used to convert a command issued by the CPU 103 into an electric signal determined for each device, and conversely to convert the device status information into data that can be understood by the CPU 103.
6 is provided with a buffer for holding data transferred to and from.

【0005】CPU103は、主記憶装置101あるい
は内部レジスタと、このバッファとの間のデータ転送
と、読み出したデータの加工処理あるいは書き込みデー
タの準備処理を行う。
The CPU 103 performs data transfer between the main storage device 101 or the internal register and this buffer, processing of read data or preparation of write data.

【0006】まず、第1の手順では、CPU103が入
力データのアドレスをバッファ内にコピーし、コントロ
ーラ105にその旨を知らせ、コントローラ105はそ
の入力動作が完了するとフラグを立てる。
First, in the first procedure, the CPU 103 copies the address of the input data into the buffer and notifies the controller 105 of that fact, and the controller 105 sets a flag when the input operation is completed.

【0007】CPU103は、このフラグを成功するま
でテストし続け、テストに成功するとCPU103が読
み出されたデータをバッファから取り出し、読み出され
たデータの加工処理を行い、出力も同様の手順で行われ
る。
The CPU 103 continues to test this flag until it succeeds, and if the test is successful, the CPU 103 takes out the read data from the buffer, processes the read data, and outputs the data in the same procedure. Be seen.

【0008】このように、データの加工処理とコントロ
ーラ105の制御処理を順次行うと、CPU103はコ
ントローラ105が未だ稼働中であるかどうかのフラグ
テストだけの処理に消費されてしまう。
As described above, if the data processing process and the control process of the controller 105 are sequentially performed, the CPU 103 consumes only the process of a flag test as to whether the controller 105 is still in operation.

【0009】第2の手順では、CPU103が入力デー
タのアドレスをバッファ内にコピーし、コントローラ1
05にその旨を知らせ、予め入力が終了しているデータ
の加工処理を実行する。
In the second procedure, the CPU 103 copies the address of the input data into the buffer, and the controller 1
This is notified to 05, and the processing of the data that has been input in advance is executed.

【0010】コントローラ105は、その入力動作が完
了するとCPU103に割り込みを発生し、CPU10
3が読み出されたデータをバッファから取り出し、コン
トローラ105に次のコマンドを発行して、割り込まれ
た処理に制御を戻す。
When the input operation is completed, the controller 105 generates an interrupt to the CPU 103 and the CPU 10
3 retrieves the read data from the buffer, issues the next command to the controller 105, and returns control to the interrupted process.

【0011】データの加工処理のような消費者タスクを
優先して割り込みを遅延すると、図7の(A)に示すタ
イミングで処理が実行され、入力されたデータをキュー
バッファに蓄積してもキューバッファが空になるまで、
読み出されたデータの加工処理を実行してしまい、結
局、処理時間が長くかかることになる。
If the interrupt is delayed by prioritizing a consumer task such as data processing, the process is executed at the timing shown in FIG. 7A, and even if the input data is accumulated in the queue buffer, the queue is queued. Until the buffer is empty
The read data is processed, resulting in a long processing time.

【0012】逆に、コントローラ105の制御処理のよ
うな生産者タスクを優先して割り込みに即時応答する
と、図7の(B)に示すタイミングで処理が実行され
る。
On the contrary, when the producer task such as the control process of the controller 105 is prioritized to immediately respond to the interrupt, the process is executed at the timing shown in FIG. 7B.

【0013】ただし、キューバッファに格納できるデー
タ量には制限があるので、キューバッファが満杯になっ
た場合には、データのキューバッファへの書き込み動作
がキューバッファに空きが生じるまで遅延され、出力も
同様の手順で行われ同様の現象が起こる。
However, since there is a limit to the amount of data that can be stored in the queue buffer, when the queue buffer is full, the operation of writing data to the queue buffer is delayed until there is space in the queue buffer, and the output is output. The same procedure occurs and the same phenomenon occurs.

【0014】[0014]

【発明が解決しようとする課題】このような、従来のタ
スク間同期通信装置では、キューバッファ内の情報を減
少させる手段を持っていないため、キューバッファが満
杯になった時点で、生産者タスクと消費者タスクのタス
ク切り替えが頻繁に生じてオーバーヘッドを生じる。
Since such a conventional inter-task synchronous communication device does not have a means for reducing the information in the queue buffer, when the queue buffer becomes full, the producer task And task switching of consumer tasks occurs frequently and causes overhead.

【0015】また、生産者タスクが全てのデータを生産
し終わった段階で、初めて消費者タスクがCPU103
を独占し、かつ処理が加速するために、データが生産さ
れる途中段階を見るとデータがキューバッファ中にあ
り、加工されていない状態で停滞することになる。
Further, when the producer task finishes producing all the data, the consumer task does not have the CPU 103 for the first time.
In order to monopolize the data and accelerate the processing, when the intermediate stage of data production is seen, the data is in the queue buffer, and the data is stagnated in an unprocessed state.

【0016】さらに、消費者タスクがVRAMを使用
し、グラフィックスアクセラレータと共有している場
合、常に生産者タスクが優先されるために、消費者タス
クがVRAM及びグラフィックスアクセラレータを獲得
したまま実行権を失い、グラフィックスアクセラレータ
等の装置の待ち状態時間が増加する。
Further, when the consumer task uses the VRAM and shares it with the graphics accelerator, the producer task is always prioritized, so that the consumer task has the execution right while acquiring the VRAM and the graphics accelerator. And the wait time of devices such as graphics accelerators increases.

【0017】[0017]

【課題を解決するための手段】上述の課題を解決するた
めに、本発明のタスク間同期通信装置は、通信データを
格納するキューバッファと、このキューバッファに格納
された通信データの数を保持するカウンタと、上記通信
データの送/受信を行う各タスクの実行プライオリティ
を、カウンタ値に基づき変更するプライオリティ制御部
とを具備したことを特徴とする。
In order to solve the above problems, an intertask synchronous communication apparatus of the present invention holds a queue buffer for storing communication data and the number of communication data stored in this queue buffer. And a priority control unit that changes the execution priority of each task that transmits / receives the communication data based on the counter value.

【0018】また、本発明のタスク間同期通信装置は、
マルチプロセッサと、このマルチプロセッサの指令の下
に、送信データを格納する共有キューバッファと、この
キューバッファに格納された通信データの数を保持する
カウンタと、上記マルチプロセッサの各プロセッサ間の
通信データの送/受信を行う各タスクの実行プライオリ
ティを、カウンタ値に基づき変更するプライオリティ制
御部とを具備したことを特徴とする。
Further, the inter-task synchronous communication device of the present invention is
A multiprocessor, a shared queue buffer that stores transmission data, a counter that holds the number of communication data stored in this queue buffer, and communication data between the processors of the multiprocessor under the command of this multiprocessor And a priority control unit for changing the execution priority of each task for transmitting / receiving the data based on the counter value.

【0019】さらに、本発明のタスク間同期通信装置
は、上記送信タスクのプライオリティを上げる場合、送
信タスクが送信あるいは受信タスクが受信を行った時
に、上記プライオリティ制御部の各タスクの実行プライ
オリティを変更することを特徴とする。
Further, in the inter-task synchronous communication device of the present invention, when the priority of the transmission task is increased, the execution priority of each task of the priority control unit is changed when the transmission task transmits or the reception task receives. It is characterized by doing.

【0020】[0020]

【実施例】以下、本発明の一実施例を図面を参照して説
明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

【0021】図1は、本発明の一実施例によるタスク間
同期通信装置のブロック構成図である。
FIG. 1 is a block diagram of an inter-task synchronous communication device according to an embodiment of the present invention.

【0022】図2は、本発明の一実施例によるタスク間
同期通信装置が対象とする生産者タスクのフローチャー
トである。
FIG. 2 is a flow chart of the producer task targeted by the intertask synchronous communication apparatus according to one embodiment of the present invention.

【0023】図3は、本発明の一実施例によるタスク間
同期通信装置が対象とする消費者タスクのフローチャー
トである。
FIG. 3 is a flowchart of consumer tasks targeted by the intertask synchronization communication device according to one embodiment of the present invention.

【0024】図4は、本発明の一実施例によるタスク間
同期通信装置のプライオリティ制御部のフローチャート
である。
FIG. 4 is a flow chart of the priority control unit of the inter-task synchronous communication apparatus according to one embodiment of the present invention.

【0025】図5は、本発明の一実施例によるタスク間
同期通信装置の実行状態を示すタイムチャートである。
FIG. 5 is a time chart showing an execution state of the inter-task synchronous communication device according to the embodiment of the present invention.

【0026】本発明の一実施例によるタスク間同期通信
装置は、図1に示すような構成で、キューバッファ1
が、例えばOSの管理の下にシステムコールのみでアク
セスされ、かつ主記憶装置中の部分領域に通信データを
複数個格納している。
An intertask synchronous communication apparatus according to an embodiment of the present invention has a configuration as shown in FIG.
However, for example, it is accessed only by a system call under the control of the OS, and a plurality of communication data are stored in a partial area in the main memory.

【0027】カウンタ2は、例えばセマフォ手法を用い
てアクセスを制御される主記憶装置中の部分領域であ
り、キューバッファ1に格納されている通信データの個
数を保持し、キューバッファが空と満杯の時に、各々受
信を試みた消費者タスク7や送信を試みた生産者タスク
6の実行権を、ディスパッチャ5に通知することで剥奪
する。
The counter 2 is a partial area in the main memory whose access is controlled by using, for example, a semaphore method, holds the number of communication data stored in the queue buffer 1, and the queue buffer is empty and full. At that time, the dispatcher 5 is deprived of the execution right of each of the consumer task 7 attempting to receive and the producer task 6 attempting to send.

【0028】プライオリティ制御部3は、例えばCPU
で実行されるOSプログラムの一部であり、カウンタ2
の値に基づき、プライオリティ管理テーブル4に登録さ
れた、キューバッファ1を介してデータの送受信をする
生産者タスク6及び消費者タスク7のプライオリティの
変更を行なう。
The priority control unit 3 is, for example, a CPU
Counter 2 which is a part of the OS program executed by
Based on the value of, the priority of the producer task 6 and the consumer task 7 registered in the priority management table 4 for transmitting / receiving data via the queue buffer 1 is changed.

【0029】プライオリティ管理テーブル4は、例えば
主記憶装置に記憶されたハッシュテーブルであり、優先
度毎に実行可能状態のタスクを記憶している。
The priority management table 4 is, for example, a hash table stored in the main storage device, and stores tasks in an executable state for each priority.

【0030】タスク切り替えを行うディスパッチャ5
は、プライオリティ管理テーブル4を参照し、例えば優
先権スケジューリング手法に従って、生産者タスク6や
消費者タスク7などの実行タスクの切り替えを行う。
Dispatcher 5 for switching tasks
Refers to the priority management table 4 and switches the execution tasks such as the producer task 6 and the consumer task 7 according to the priority scheduling method, for example.

【0031】生産者タスク6は、例えば図2に示すよう
な処理を行うタスクであり、消費者タスク7に対して、
キューバッファ1を介してデータを送信する。
The producer task 6 is a task for performing the processing shown in FIG. 2, for example.
Data is transmitted via the queue buffer 1.

【0032】消費者タスク7は、例えば図3に示すよう
な処理を行うタスクであり、キューバッファ1を介し
て、生産者タスク6の送信したデータを受信する。
The consumer task 7 is a task for performing the processing shown in FIG. 3, for example, and receives the data transmitted by the producer task 6 via the queue buffer 1.

【0033】次に、本発明の一実施例によるタスク間同
期通信装置の動作について図1〜図5を参照し説明す
る。
Next, the operation of the inter-task synchronous communication apparatus according to the embodiment of the present invention will be described with reference to FIGS.

【0034】まず、初期状態では優先権は生産者タスク
6が持ち、生産者タスク6が図2に示すような処理を行
い、例えばハードディスク等の装置を制御するコントロ
ーラに読み込むアドレスを通知して待ち状態に入る。
First, in the initial state, the producer task 6 has the priority, and the producer task 6 performs the processing shown in FIG. 2 and notifies the controller for controlling a device such as a hard disk of the address to be read and waits. Enter the state.

【0035】その後、待ち状態から復帰し、処理21で
データを読み込んで次のステップに進み、処理22で読
み込みが終了であるかどうかをチェックし、終了であれ
ば処理を終了する、データを読み出せた場合には処理2
3に進む。
After that, the process returns from the waiting state, the data is read in the process 21 and the process proceeds to the next step. In the process 22, it is checked whether the reading is completed. If it is completed, the process is completed. Process 2 if you can
Go to 3.

【0036】初期状態のキューバッファ1は空であり、
処理23では実行権を奪われることなくキューバッファ
1にデータを格納し、カウンタ2に値「1」が保持され
て次のステップに進む。
The queue buffer 1 in the initial state is empty,
In process 23, the data is stored in the queue buffer 1 without being deprived of the execution right, the value "1" is held in the counter 2, and the process proceeds to the next step.

【0037】処理24では、次に読み込むべきアドレス
をコントローラに通知し、コントローラからの割り込み
がくるまで待ち状態になり、ディスパッチャ5はプライ
オリティ管理テーブル4を検索し、最も優先度の高いタ
スクに実行権を与え、消費者タスク7が実行権を得て図
3に示す処理を行う。
In the process 24, the address to be read next is notified to the controller and the controller waits until an interrupt from the controller arrives. The dispatcher 5 searches the priority management table 4 and executes the task with the highest priority. And the consumer task 7 obtains the execution right to perform the processing shown in FIG.

【0038】処理31で、キューバッファ1からデータ
を取り出す。
In process 31, data is taken out from the queue buffer 1.

【0039】ここでは、通信データ量が非常に大きい場
合を想定し、キューバッファ1からデータを「取り出
す」のは、実際にはキューバッファ1内のデータを読み
出す権利を得ることと同等であり、取り出しが行われて
も処理32の処理が終了し、キューバッファ1内のデー
タの読み出し権利を放棄するまで、カウンタ2の値は変
化しないものとする。
Here, assuming that the communication data amount is very large, "retrieving" data from the queue buffer 1 is actually equivalent to obtaining the right to read the data in the queue buffer 1. It is assumed that the value of the counter 2 does not change until the process 32 is completed and the right to read the data in the queue buffer 1 is relinquished even if the data is taken out.

【0040】先程、生産者タスクが処理23でデータを
格納したので、空ではないので実行権を奪われることな
く次のステップに進み、処理32は、例えば取りだした
画像データをVRAMに描画するなどの加工処理を行
う。
Since the producer task stored the data in the process 23 in the previous step, since it is not empty, the process proceeds to the next step without being robbed of the execution right. In the process 32, for example, the fetched image data is drawn in the VRAM. Is processed.

【0041】この処理の途中でハードディスクからのデ
ータ読み出しが終了したことをコントローラが割り込み
によって通知し、ディスパッチャ5に制御が移る。
In the middle of this process, the controller notifies by interrupt that the data reading from the hard disk has been completed, and the control is transferred to the dispatcher 5.

【0042】そこで、ディスパッチャ5はプライオリテ
ィ管理テーブル4を検索し、今まで実行していた消費者
タスク7よりも、コントローラの割り込みによって実行
可能状態になった生産者タスク6の方が優先度が高いの
で、実行タスクを切り替えて生産者タスク6に制御が移
る。
Therefore, the dispatcher 5 searches the priority management table 4, and the producer task 6 which has been made executable by the interrupt of the controller has a higher priority than the consumer task 7 which has been executed so far. Therefore, the execution task is switched and control is transferred to the producer task 6.

【0043】上述と同様に処理が行われ、カウンタ2が
値「2」を保持し、同様に生産者タスク6は待ち状態に
移行し、消費者タスク7に制御が戻る。
The processing is performed in the same manner as described above, the counter 2 holds the value "2", the producer task 6 similarly shifts to the waiting state, and the control is returned to the consumer task 7.

【0044】処理32を終えた時、カウンタ2は値
「1」を保持し、処理33で描画処理の終了判定を行
い、終了しないときは処理31に戻る。
When the process 32 is completed, the counter 2 holds the value "1", the process 33 determines the end of the drawing process, and if not completed, the process returns to the process 31.

【0045】このように、実行タスクが遷移していく過
程において、予め、例えば 0 ≦ A ≦ B ≦ キューバッファのサイズ の関係にある定数A,Bを設定し、プライオリティ制御
部3が図4に示すように、キューバッファ1に対し送受
信されるタイミングで呼び出され、処理41でキューバ
ッファ内の通信データの数をチェックする。
In this way, in the process of transition of the execution task, constants A and B having a relation of 0 ≤ A ≤ B ≤ queue buffer size, for example, are set in advance, and the priority control unit 3 is set in FIG. As shown, the queue buffer 1 is called at the timing of transmission / reception with respect to the queue buffer 1, and the number of communication data in the queue buffer is checked in process 41.

【0046】チェックした結果に基づき終了、または処
理42、あるいは処理43を行い、初期段階でキューバ
ッファ1は空の状態からカウンタ2が値「A」になるま
で徐々に通信データが蓄積されていく。
Based on the check result, the process is terminated, or the process 42 or the process 43 is performed, and the communication data is gradually accumulated from the empty state of the queue buffer 1 to the value "A" of the counter 2 at the initial stage. .

【0047】カウンタ2が値「A」になった時、生産者
タスク6に対して相対的に消費者タスク7のプライオリ
ティを下げようとするが、すでに生産者タスク6に比べ
て消費者タスク7のプライオリティが低いので何も処理
されない。
When the counter 2 reaches the value "A", the consumer task 7 tries to lower the priority relative to the producer task 6, but the consumer task 7 is already compared with the producer task 6. Nothing is processed because the priority of is low.

【0048】その後、カウンタ2の値が「B」になった
時、消費者タスク7に対して総体的に、生産者タスク6
のプライオリティを下げて、消費者タスク7を優先タス
クにする。
After that, when the value of the counter 2 becomes "B", the producer task 6 as a whole is compared with the consumer task 7.
To lower the priority of the consumer task 7 to make the consumer task 7 a priority task.

【0049】また、消費者タスク7が優先タスクになる
と、コントローラからの割り込みが起こった時にも、デ
ィスパッチャ5は消費者タスク7に実行権を与え続け、
図5に示すように、連続して消費者タスク7が実行され
てカウンタ2の値は減少を続け、カウンタ2の値が
「A」になった時、生産者タスク6に対して総体的に消
費者タスク7のプライオリティを下げて、生産者タスク
6を優先タスクにする。
When the consumer task 7 becomes the priority task, the dispatcher 5 continues to give the execution right to the consumer task 7 even when the interrupt from the controller occurs.
As shown in FIG. 5, the consumer task 7 is continuously executed, the value of the counter 2 continues to decrease, and when the value of the counter 2 becomes “A”, the producer task 6 is generally treated. The priority of the consumer task 7 is lowered to make the producer task 6 a priority task.

【0050】以下、同様の処理を繰り返す。次に、従来
のタスク間同期通信装置を図面を参照して説明する。
Thereafter, the same processing is repeated. Next, a conventional inter-task synchronous communication device will be described with reference to the drawings.

【0051】図6は、従来のタスク間同期通信装置にお
ける構成例である。
FIG. 6 shows a configuration example of a conventional inter-task synchronous communication device.

【0052】図7は、従来のタスク間同期通信装置にお
ける、消費者タスクが常に優先タスクである時のタイム
チャート(A)及び生産者タスクが常に優先タスクであ
る時のタイムチャート(B)である。
FIG. 7 is a time chart (A) when the consumer task is always the priority task and a time chart (B) when the producer task is always the priority task in the conventional inter-task synchronous communication device. is there.

【0053】従来のタスク間同期通信装置は、図6に示
すように、ハードディスク106のコントローラ105
が読み出し及び書き込みコマンドを受け取ってから、読
み出し及び書き込み装置を介してアクセスすべきデータ
の転送を開始するまでの遅延時間を必要とし、CPU1
03はコントローラ105の待ち時間中に実行されるデ
ータ処理及び書き込みデータを用意するタスクと、コン
トローラ105を制御するタスク間の同期通信とで使用
されている。
As shown in FIG. 6, a conventional inter-task synchronous communication device is a controller 105 of a hard disk 106.
Requires a delay time from the reception of the read / write command to the start of the transfer of the data to be accessed via the read / write device.
Reference numeral 03 is used for the task of preparing data processing and write data executed during the waiting time of the controller 105 and the synchronous communication between the tasks of controlling the controller 105.

【0054】アドレス及びデータバス108は、CPU
103が主記憶装置101あるいはハードディスク10
6を指定するために使用され、CPU103と指定され
たターゲット間のデータ転送に用いる。
The address and data bus 108 is a CPU
103 is the main storage device 101 or the hard disk 10
6 is used for data transfer between the CPU 103 and the specified target.

【0055】コントローラ105は、CPU103が発
行するコマンドを装置毎に定められた電気信号に変換し
たり、逆に装置の状態情報をCPU103が理解できる
データに変換するために用いられ、ハードディスク10
6との間で転送されるデータを保持するバッファを備え
ている。
The controller 105 is used to convert a command issued by the CPU 103 into an electric signal determined for each device, and conversely to convert the device status information into data that can be understood by the CPU 103.
6 is provided with a buffer for holding data transferred to and from.

【0056】CPU103は、主記憶装置101あるい
は内部レジスタと、このバッファとの間のデータ転送
と、読み出したデータの加工処理あるいは書き込みデー
タの準備処理を行う。
The CPU 103 performs data transfer between the main storage device 101 or internal register and this buffer, processing of read data or preparation of write data.

【0057】まず、第1の手順では、CPU103が入
力データのアドレスをバッファ内にコピーし、コントロ
ーラ105にその旨を知らせ、コントローラ105はそ
の入力動作が完了するとフラグを立てる。
First, in the first procedure, the CPU 103 copies the address of the input data into the buffer and notifies the controller 105 of that fact, and the controller 105 sets a flag when the input operation is completed.

【0058】CPU103は、このフラグを成功するま
でテストし続け、テストに成功するとCPU103が読
み出されたデータをバッファから取り出し、読み出され
たデータの加工処理を行い、出力も同様の手順で行われ
る。
The CPU 103 continues to test this flag until it succeeds, and if the test succeeds, the CPU 103 takes out the read data from the buffer, processes the read data, and outputs the data in the same procedure. Be seen.

【0059】このように、データの加工処理とコントロ
ーラ105の制御処理を順次行うと、CPU103はコ
ントローラ105が未だ稼働中であるかどうかのフラグ
テストだけの処理に消費されてしまう。
As described above, when the data processing process and the control process of the controller 105 are sequentially performed, the CPU 103 is consumed only for the flag test of whether the controller 105 is still in operation.

【0060】第2の手順では、CPU103が入力デー
タのアドレスをバッファ内にコピーし、コントローラ1
05にその旨を知らせ、予め入力が終了しているデータ
の加工処理を実行する。
In the second procedure, the CPU 103 copies the address of the input data into the buffer, and the controller 1
This is notified to 05, and the processing of the data that has been input in advance is executed.

【0061】コントローラ105は、その入力動作が完
了するとCPU103に割り込みを発生し、CPU10
3が読み出されたデータをバッファから取り出し、コン
トローラ105に次のコマンドを発行して、割り込まれ
た処理に制御を戻す。
When the input operation is completed, the controller 105 generates an interrupt to the CPU 103, and the CPU 10
3 retrieves the read data from the buffer, issues the next command to the controller 105, and returns control to the interrupted process.

【0062】データの加工処理のような消費者タスクを
優先し割り込みを遅延すると、図7の(A)に示すタイ
ミングで処理が実行され、入力されたデータをキューバ
ッファに蓄積してもキューバッファが空になるまで、読
み出されたデータの加工処理を実行してしまい、結局、
処理時間が長くかかることになる。
If the consumer task such as data processing is prioritized and the interrupt is delayed, the process is executed at the timing shown in FIG. 7A, and the queue buffer is processed even if the input data is accumulated in the queue buffer. The read data is processed until it becomes empty.
It takes a long processing time.

【0063】逆に、コントローラ105の制御処理のよ
うな生産者タスクを優先し割り込みに即時応答すると、
図7の(B)に示すタイミングで処理が実行される。
On the contrary, when the producer task such as the control processing of the controller 105 is prioritized and the interrupt is immediately responded to,
The process is executed at the timing shown in FIG.

【0064】ただし、キューバッファに格納できるデー
タ量には制限があるので、キューバッファが満杯になっ
た場合には、データのキューバッファへの書き込み動作
がキューバッファに空きが生じるまで遅延され、出力も
同様の手順で行われ同様の現象が起こる。
However, since the amount of data that can be stored in the queue buffer is limited, when the queue buffer is full, the operation of writing data to the queue buffer is delayed until there is space in the queue buffer, and the output The same procedure occurs and the same phenomenon occurs.

【0065】[0065]

【発明の効果】以上説明したように、本発明のタスク間
同期通信装置によれば、キューバッファに格納されてい
る通信データの数量に基づき、通信タスクのプライオリ
ティをプライオリティ制御部で制御することで、通信デ
ータの処理を高速化する効果がある。
As described above, according to the inter-task synchronous communication device of the present invention, the priority of the communication task is controlled by the priority control section based on the number of communication data stored in the queue buffer. It has the effect of speeding up the processing of communication data.

【0066】また、キューバッファが満杯時のタスク切
り替えがなくなるので、タスク切り替えの回数が減少
し、システム全体の処理を高速化する効果がある。
Further, since there is no task switching when the queue buffer is full, the number of task switching is reduced, and the processing of the entire system is speeded up.

【0067】さらに、各タスクがVRAMを描画アクセ
ラレータと共有している場合、装置を占有したRUN状
態が減少するため、装置の有効活用を図る効果がある。
Furthermore, when each task shares the VRAM with the drawing accelerator, the RUN state that occupies the device is reduced, so that the device can be effectively used.

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

【図1】本発明の一実施例によるタスク間同期通信装置
のブロック構成図である。
FIG. 1 is a block diagram of an inter-task synchronous communication device according to an embodiment of the present invention.

【図2】本発明の一実施例によるタスク間同期通信装置
が対象とする生産者タスクのフローチャートである。
FIG. 2 is a flowchart of a producer task targeted by the inter-task synchronization communication device according to the embodiment of the present invention.

【図3】本発明の一実施例によるタスク間同期通信装置
が対象とする消費者タスクのフローチャートである。
FIG. 3 is a flowchart of consumer tasks targeted by the inter-task synchronization communication device according to the embodiment of the present invention.

【図4】本発明の一実施例によるタスク間同期通信装置
のプライオリティ制御部のフローチャートである。
FIG. 4 is a flowchart of a priority control unit of the inter-task synchronous communication device according to the embodiment of the present invention.

【図5】本発明の一実施例によるタスク間同期通信装置
の実行状態を示すタイムチャートである。
FIG. 5 is a time chart showing an execution state of the inter-task synchronous communication device according to the embodiment of the present invention.

【図6】従来のタスク間同期通信装置における構成例で
ある。
FIG. 6 is a configuration example of a conventional inter-task synchronous communication device.

【図7】従来のタスク間同期通信装置における、消費者
タスクが常に優先タスクである時のタイムチャート
(A)及び生産者タスクが常に優先タスクである時のタ
イムチャート(B)である。
FIG. 7 is a time chart (A) when a consumer task is always a priority task and a time chart (B) when a producer task is always a priority task in a conventional inter-task synchronization communication device.

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

1 キューバッファ 2 カウンタ 3 プライオリティ制御部 4 プライオリティ制御部(プライオリティ管理テーブ
ル) 5 プライオリティ制御部(ディスパッチャ) 6 キューバッファ(生産者タスク) 7 キューバッファ(消費者タスク)
1 Queue Buffer 2 Counter 3 Priority Control Unit 4 Priority Control Unit (Priority Management Table) 5 Priority Control Unit (Dispatcher) 6 Queue Buffer (Producer Task) 7 Queue Buffer (Consumer Task)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 通信データを格納するキューバッファ
と、このキューバッファに格納された通信データの数を
保持するカウンタと、上記通信データの送/受信を行う
各タスクの実行プライオリティを、カウンタ値に基づき
変更するプライオリティ制御部とを具備したことを特徴
とするタスク間同期通信装置。
1. A queue buffer for storing communication data, a counter for holding the number of communication data stored in the queue buffer, and an execution priority of each task for transmitting / receiving the communication data as counter values. An inter-task synchronous communication device comprising: a priority control unit that changes based on the above.
【請求項2】 マルチプロセッサと、このマルチプロセ
ッサの指令の下に、送信データを格納する共有キューバ
ッファと、このキューバッファに格納された通信データ
の数を保持するカウンタと、上記マルチプロセッサの各
プロセッサ間の通信データの送/受信を行う各タスクの
実行プライオリティを、カウンタ値に基づき変更するプ
ライオリティ制御部とを具備したことを特徴とするタス
ク間同期通信装置。
2. A multiprocessor, a shared queue buffer for storing transmission data under a command of the multiprocessor, a counter for holding the number of communication data stored in the queue buffer, and each of the multiprocessors. An inter-task synchronous communication device, comprising: a priority control unit that changes the execution priority of each task that transmits / receives communication data between processors based on a counter value.
【請求項3】 上記送信タスクのプライオリティを上げ
る場合は、送信タスクが送信あるいは受信タスクが受信
を行った時に、上記プライオリティ制御部の各タスクの
実行プライオリティを変更することを特徴とする請求項
1記載のタスク間同期通信装置。
3. When the priority of the transmission task is increased, the execution priority of each task of the priority control unit is changed when the transmission task transmits or the reception task receives. The inter-task synchronization communication device described.
【請求項4】 上記送信タスクのプライオリティを上げ
る場合は、送信タスクが送信あるいは受信タスクが受信
を行った時に、上記プライオリティ制御部の各タスクの
実行プライオリティを変更することを特徴とする請求項
2記載のタスク間同期通信装置。
4. When increasing the priority of the transmission task, the execution priority of each task of the priority control unit is changed when the transmission task transmits or the reception task receives. The inter-task synchronization communication device described.
JP15961392A 1992-06-18 1992-06-18 Inter-task synchronizing communication equipment Pending JPH064314A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15961392A JPH064314A (en) 1992-06-18 1992-06-18 Inter-task synchronizing communication equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15961392A JPH064314A (en) 1992-06-18 1992-06-18 Inter-task synchronizing communication equipment

Publications (1)

Publication Number Publication Date
JPH064314A true JPH064314A (en) 1994-01-14

Family

ID=15697543

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15961392A Pending JPH064314A (en) 1992-06-18 1992-06-18 Inter-task synchronizing communication equipment

Country Status (1)

Country Link
JP (1) JPH064314A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11312093A (en) * 1998-04-28 1999-11-09 Hitachi Ltd Distributed processing system
JP2005509943A (en) * 2001-11-13 2005-04-14 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Efficient FIFO communication using semaphores
JP2008009970A (en) * 2006-05-29 2008-01-17 Matsushita Electric Ind Co Ltd Information processing device, information processing method and information processing program
GB2508683A (en) * 2013-03-23 2014-06-11 Throughputer Inc Inter-task communication in a multi-stage manycore processor
US10061615B2 (en) 2012-06-08 2018-08-28 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
US10133599B1 (en) 2011-11-04 2018-11-20 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
US10318353B2 (en) 2011-07-15 2019-06-11 Mark Henrik Sandstrom Concurrent program execution optimization

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11312093A (en) * 1998-04-28 1999-11-09 Hitachi Ltd Distributed processing system
JP2005509943A (en) * 2001-11-13 2005-04-14 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Efficient FIFO communication using semaphores
JP2008009970A (en) * 2006-05-29 2008-01-17 Matsushita Electric Ind Co Ltd Information processing device, information processing method and information processing program
US10318353B2 (en) 2011-07-15 2019-06-11 Mark Henrik Sandstrom Concurrent program execution optimization
US10514953B2 (en) 2011-07-15 2019-12-24 Throughputer, Inc. Systems and methods for managing resource allocation and concurrent program execution on an array of processor cores
US10620998B2 (en) 2011-11-04 2020-04-14 Throughputer, Inc. Task switching and inter-task communications for coordination of applications executing on a multi-user parallel processing architecture
US10789099B1 (en) 2011-11-04 2020-09-29 Throughputer, Inc. Task switching and inter-task communications for coordination of applications executing on a multi-user parallel processing architecture
US10133600B2 (en) 2011-11-04 2018-11-20 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
US10133599B1 (en) 2011-11-04 2018-11-20 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
US10310901B2 (en) 2011-11-04 2019-06-04 Mark Henrik Sandstrom System and method for input data load adaptive parallel processing
US10310902B2 (en) 2011-11-04 2019-06-04 Mark Henrik Sandstrom System and method for input data load adaptive parallel processing
US11928508B2 (en) 2011-11-04 2024-03-12 Throughputer, Inc. Responding to application demand in a system that uses programmable logic components
US10430242B2 (en) 2011-11-04 2019-10-01 Throughputer, Inc. Task switching and inter-task communications for coordination of applications executing on a multi-user parallel processing architecture
US10437644B2 (en) 2011-11-04 2019-10-08 Throughputer, Inc. Task switching and inter-task communications for coordination of applications executing on a multi-user parallel processing architecture
US11150948B1 (en) 2011-11-04 2021-10-19 Throughputer, Inc. Managing programmable logic-based processing unit allocation on a parallel data processing platform
US20210303354A1 (en) 2011-11-04 2021-09-30 Throughputer, Inc. Managing resource sharing in a multi-core data processing fabric
US10963306B2 (en) 2011-11-04 2021-03-30 Throughputer, Inc. Managing resource sharing in a multi-core data processing fabric
USRE47677E1 (en) 2012-06-08 2019-10-29 Throughputer, Inc. Prioritizing instances of programs for execution based on input data availability
US10061615B2 (en) 2012-06-08 2018-08-28 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
USRE47945E1 (en) 2012-06-08 2020-04-14 Throughputer, Inc. Application load adaptive multi-stage parallel data processing architecture
US10942778B2 (en) 2012-11-23 2021-03-09 Throughputer, Inc. Concurrent program execution optimization
GB2508683A (en) * 2013-03-23 2014-06-11 Throughputer Inc Inter-task communication in a multi-stage manycore processor
US8782665B1 (en) 2013-03-23 2014-07-15 Throughputer, Inc. Program execution optimization for multi-stage manycore processors
GB2508683B (en) * 2013-03-23 2014-11-12 Throughputer Inc Program execution optimization for multi-stage manycore processors
US11036556B1 (en) 2013-08-23 2021-06-15 Throughputer, Inc. Concurrent program execution optimization
US11188388B2 (en) 2013-08-23 2021-11-30 Throughputer, Inc. Concurrent program execution optimization
US11347556B2 (en) 2013-08-23 2022-05-31 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry
US11385934B2 (en) 2013-08-23 2022-07-12 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry
US11500682B1 (en) 2013-08-23 2022-11-15 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry
US11687374B2 (en) 2013-08-23 2023-06-27 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry
US11816505B2 (en) 2013-08-23 2023-11-14 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry
US11915055B2 (en) 2013-08-23 2024-02-27 Throughputer, Inc. Configurable logic platform with reconfigurable processing circuitry

Similar Documents

Publication Publication Date Title
US6725457B1 (en) Semaphore enhancement to improve system performance
US8743131B2 (en) Course grain command buffer
US20030177288A1 (en) Multiprocessor system
KR100708096B1 (en) Bus system and execution scheduling method for access commands thereof
WO2006123547A1 (en) Information processing unit, system and method, and processor
JPH064314A (en) Inter-task synchronizing communication equipment
US9015719B2 (en) Scheduling of tasks to be performed by a non-coherent device
JPH09218859A (en) Multiprocessor control system
JPH04120652A (en) Parallel processors
JPH1185673A (en) Method and device for controlling shared bus
JPH01305461A (en) Right of using bus control system
US10025750B2 (en) Transmission device, controller, and system comprising transmission device and controller
JPS6145348A (en) Bus priority control system
JPH03241442A (en) Store buffer control system
EP0341670A2 (en) Processing time allocation system and method
JPH0773136A (en) Operation method for computer system
JPH07219836A (en) Memory control system
JPH02222058A (en) Multiprocessor system
JPH02222059A (en) Multiprocessor system
JPH05134980A (en) Bus system
JPS6143369A (en) Multi-processor system
JPH02143364A (en) Method for controlling processing priority and processor system
JPH03116335A (en) System for transferring from non-privileged cpu to privileged cpu
JPH02184957A (en) Memory access control method
JPH01239665A (en) System for distributing load on multiprocessor