JP3880942B2 - Processor, computer and priority determination method - Google Patents

Processor, computer and priority determination method Download PDF

Info

Publication number
JP3880942B2
JP3880942B2 JP2003079478A JP2003079478A JP3880942B2 JP 3880942 B2 JP3880942 B2 JP 3880942B2 JP 2003079478 A JP2003079478 A JP 2003079478A JP 2003079478 A JP2003079478 A JP 2003079478A JP 3880942 B2 JP3880942 B2 JP 3880942B2
Authority
JP
Japan
Prior art keywords
priority
execution
execution unit
fifo
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2003079478A
Other languages
Japanese (ja)
Other versions
JP2004287883A (en
Inventor
伸一 菅野
幸昌 宮本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2003079478A priority Critical patent/JP3880942B2/en
Priority to US10/752,703 priority patent/US20040139441A1/en
Priority to CNA2004100020726A priority patent/CN1517869A/en
Publication of JP2004287883A publication Critical patent/JP2004287883A/en
Application granted granted Critical
Publication of JP3880942B2 publication Critical patent/JP3880942B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、データフロー型プロセッサに関するものであり、特に入力段と出力段にバッファメモリを備えたプロセッサ及びこのプロセッサにおける実行スレッドの選択方法に関するものである。
【0002】
【従来の技術】
計算機等のプロセッサにデータを処理させる際にはより多くのデータ処理を効率よく行うために、複数のタスクを時分割に実行するマルチスレッド処理が一般的に採用されている(たとえば特許文献1を参照)。
【0003】
データ処理のためのマルチスレッド化を実現する方法がいくつか提案されている。その中にデータフローに従ってスレッドの実行順序を決定するデータフロー型マルチスレッド処理がある。このようなプロセッサでは、処理すべきデータの処理過程で必要とする処理を、その処理順序に従って実行する仕組みが取られている。このようにすると、処理過程にあたらないスレッドは実行されることがなく、その時点で必要とする処理にプロセッサ能力を効率よく割り当てることが可能となる。
【0004】
【特許文献1】
特開2003−029984公報
【0005】
【発明が解決しようとする課題】
しかしながら、各処理単位の処理後の出力結果に依存して次の実行スレッドを選択する従来のデータフロー型では、次のような場合に問題となる。
【0006】
たとえばリアルタイム性を要求する処理対象にあっては、処理の流れ(データフロー)に則さない処理が必要となる場合が多い。データフローから逸脱する処理は別途割り込み処理や作業状態の退避処理等のオーバヘッドを必要とする。また、このような割り込み処理はデータフローに乱れを生じさせ、処理効率を低下させてしまう。
【0007】
本発明はこのような問題に鑑みてなされたものであり、リアルタイム性の損失を最小限に抑えることが可能なデータフロー型プロセッサ、このプロセッサを利用した計算機及び優先度決定方法を提供することを目的とする。
【0008】
【課題を解決するための手段】
本発明によれば、
あるデータ処理を少なくとも1以上に時分割した処理の一つに当たる、1以上の実行単位が処理すべき処理データを記憶するための複数の記憶手段と、
ある実行単位に割り当てた前記複数の記憶手段の少なくとも1つからこの実行単位が処理すべきデータを受け取り、該実行単位に割り当てた前記複数の記憶手段の1つに該実行単位の実行結果を記憶するデータ処理手段と、
前記記憶手段のそれぞれから各記憶手段が記憶する処理データ量についての情報を受け取り、ある記憶手段が記憶する処理データ量から、該記憶手段をアクセスする実行単位の実行状況を求め、該実行状況から該実行単位の以降実行すべき順位を示す優先度を決定する優先度決定手段と、
を備えたことを特徴とするプロセッサが提供される。
【0009】
及び上記プロセッサを備えた計算機が提供される。
【0010】
また、
あるデータ処理を少なくとも1以上に時分割した処理の一つに当たる実行単位について、ある実行単位に割り当てた複数ある記憶装置の少なくとも1つから該実行単位が処理すべきデータを受け取り、
該実行単位に割り当てた前記複数の記憶装置の1つに該実行単位の実行結果を記憶し、
前記記憶装置のそれぞれから各記憶装置が記憶する処理データ量についての情報を受け取り、ある記憶装置が記憶する処理データ量から、該記憶装置をアクセスする実行単位の実行状況を求め、該実行状況から該実行単位の以降実行すべき順位を示す優先度を決定することを特徴とする優先度決定方法が提供される。
【0011】
【発明の実施の形態】
本発明の実施形態について、図を用いながら説明する。
【0012】
(第1の実施形態)
図1は第1の実施形態におけるプロセッサのブロック図の一例である。図1には、複数のFIFO(First-In First-Out:先入先出型メモリ)101、選択部102、実行制御部103、キャッシュ104、切替部105、複数のレジスタセット106、メモリバス107、記憶部108及び演算処理部109が示されている。
【0013】
FIFO101はメモリから構成されており、先に記憶したものから先に読み出すことが可能な記憶装置である。それぞれのFIFO101は1からn(nは任意)の複数備えている。それぞれのFIFO101の記憶容量は必ずしも同じである必要は無いが、複数のスレッドを平等に処理するためには同一の構成である方が好ましい。
【0014】
ここでいうスレッドとは、プロセッサが実行すべき一つの処理を複数のある時間間隔に分割して割り当てた後の処理単位またはその処理単位の実行を指す。スレッドは実行制御部103が行う各部の制御と、この制御下で、予め与えられた所定のプログラムコードを演算処理部109で実行することで実現する。本実施形態のプロセッサはデータフロー型なので、分割した複数のスレッドを1つの処理データに対して順次処理してゆくことで一つの処理が完了する。スレッドは並列処理されるようになっており、非同期に複数の処理データのデータフロー型処理を行うことができる。このように一つの処理をスレッド化するのは、主にリアルタイムOSとったマルチスレッド処理を実現するために行われている。
【0015】
選択部102は複数備えたFIFO101の中から実行制御部103が指定するFIFOを選択する機能を備えている。ここで選択したFIFO101は演算処理部109によって読み書きが成される。
【0016】
実行制御部103は、本実施形態のプロセッサが行う処理全般を制御する機能を備えている。ここには、どのスレッドを優先的に実行するかを示す優先度を保持するテーブルも含まれる。実行制御部103はFIFO101などの情報をもとにこのテーブルを設定し、テーブルの内容にしたがってどの処理データを処理するのどのスレッドの実行を行うかを各部に指示する機能を有する。
【0017】
キャッシュ104は演算処理部109がスレッドに対応するプログラムコードを実行する際に、読み書き速度の遅い記憶装置へ逐次アクセスすることを回避するために設けられている。一般に演算処理部109の処理速度と比較して、メインメモリや磁気ディスク装置といった大容量記憶装置のアクセス速度は遅い。キャッシュ104は大容量記憶装置程の記憶容量は無いものの、アクセス速度の速い記憶装置を用いている。頻繁にアクセスするデータおよびプログラムコードについては一旦キャッシュ104に記憶することで読み書きの時に演算処理部109が待たされるのをなくし、できる限り演算処理部109の処理量を稼ぐために用いられる。
【0018】
切替部105は複数のレジスタセット106の内から処理に必要な1つ以上のレジスタセットをアクセス可能に選択するものである。演算処理部109は、この切替部105を介して処理に必要なデータが格納されているレジスタセットをアクセスする。
【0019】
レジスタセット106は実行制御部103がプログラムコードの実行に必要となる各種レジスタ(一時記憶装置)をまとめたものである。レジスタセット106には、たとえば計算用レジスタ、アドレッシング用レジスタ、スタックポインタといったものが含まれている。本実施形態ではこのレジスタセット106が1からm(mは任意)の複数備えられている。それぞれのレジスタセット106は、必ずしも同じ構成である必要は無いが、それぞれのスレッドがどのレジスタセットを使用しても処理できるためには同一の構成であることが好ましい。
【0020】
メモリバス107は、キャッシュ104、複数のレジスタセット107及び記憶部108の間でデータの授受が行えるように設けられたものである。それぞれに記憶されたデータは、メモリバス107を通じてデータの移動が行える。データの移動は実行制御部103があたる。
【0021】
記憶部108は、本実施形態のプロセッサが処理のために実行するプログラムコードや、処理の対象となる処理データを記憶する。場合によってはキャッシュ104及びレジスタセット107に記憶したデータの一時退避場所として使用される。。
【0022】
演算処理部109は、記憶部108またはキャッシュ104が記憶するプログラムコードを実行する機能を有する。プログラムコードの実行に際しては、実行制御部103の指示によりどのFIFO101、どのレジスタセット106を使用して、どのスレッドを処理するのかを決定する。
【0023】
図2に本実施形態におけるプロセッサのスレッド処理の概要を示す。
本実施形態のプロセッサはデータフロー型であるから、処理データは入力の形でもたらされ、基本的に一つの道筋(フロー)を経て出力が得られる。入力された処理データは、演算処理部109が予め記憶部108に記憶したプログラムコードに従って逐次実行する処理(各スレッド201)を行い、出力結果として出力される。次段の処理がある場合には、出力された出力結果は次段の入力データとなる。
【0024】
入力データである処理データが入力されると、実行制御部103が指示した複数あるFIFO101の一つであるFIFO101−Aがこれを記憶する。FIFO101−Aは実行制御部103などからの求めに応じて、あるいは自発的にFIFO101−A内のFIFO蓄積量を実行制御部103に対して状態報告202−Aとして通知する。
【0025】
実行制御部103の指示により演算処理部109がスレッド201−1を実行すると、FIFO101−A内のデータを入力データとした処理を開始する。このときFIFO101−A内のデータは、先に記憶したものから順に読み出される。このスレッドが行った処理結果は実行制御部103の指示によりFIFO101−Bに記憶される。FIFO101−BもまたFIFO101−Aと同様に、実行制御部103に対してFIFO蓄積量を含む状態報告202−Bを通知する。
【0026】
上記の処理がスレッド201−2からスレッド201−x(xは任意)まで処理を終えると、処理結果が出力として出力される。
【0027】
演算処理部109がどのスレッドを実行状態とするかは、実行制御部103が実行指示203によって指示している。実行制御部103は、FIFO101−AからFIFO101−nが通知する状態報告202−Aから状態報告202−nの情報をもとに自らが備える実行優先度テーブルに優先度を設定し、この優先度から実行指示203を決定する。実行指示203の決定に際しては、複数の状態報告202のうち一部だけを使用して決定した優先度に従っても良いし、すべての状態報告202を考慮して決定した優先度から最優先のスレッド201を決定してもよい。好ましくはすべての状態報告202からそれぞれのスレッド201の実行順位を決定するようにし、処理全体の効率化を図るようにした方が良い。
【0028】
以降、実行制御部103が上記スレッドの実行順位を決定するための方法について説明する。
【0029】
図3に本実施形態におけるプロセッサの実行制御部103が、あるスレッドについての入力側FIFO蓄積量に対するスレッドの実行優先度を決定する方法の一例を示す。図3に示す縦軸に当たるFIFO蓄積量は入力側FIFOであるから、たとえば図2に示すところのスレッド201−1に対するFIFO101−A、スレッド201−2に対するFIFO101−Bとなる。
【0030】
あるスレッドの入力側FIFOに処理待ちデータが多く蓄積されているということは、すなわちそのスレッドの処理が遅れていることを意味する。よってそのスレッドの優先度を上げ、処理待ちデータを速やかに処理する必要がある。このため図3に示すようにFIFO蓄積量が増えるに従って実行され易くなる(優先度が高くなる)よう設定する。交点302に示すように、FIFO蓄積量が高くなるほど実行制御部103が保持する各スレッドの優先度を示すテーブルにより高い優先度が設定される。
【0031】
図3に示す例ではFIFO蓄積量とスレッド実行優先度の関係を比例直線301で示しているが、必ずしも直線である必要はない。たとえばFIFO蓄積量が上限に近づくに連れて、優先度の上がり方が大きくなるようにした比例曲線303であっても良い。この場合にはFIFOが溢れることを効果的に防止することができる。また、曲線や直線に依らずプロセッサの設計の上で実装が簡易となるように優先度が段階的あるいは階段状に高くなるようにしても良い。一例として、FIFO蓄積量にあるしきい値を設け、このしきい値を越えるまではスレッドの実行をしない、またはしきい値を切るまでは実行しつづけるといった操作も可能である。
【0032】
図4は本実施形態におけるプロセッサの、あるスレッドにについて出力側FIFO蓄積量に対するスレッドの優先度決定方法の一例を示す。図4に示す縦軸に当たるFIFO蓄積量は出力側FIFOであるから、たとえば図2に示すところのスレッド201−1に対するFIFO101−B、スレッド201−2に対するFIFO101−Cとなる。
【0033】
あるスレッドの出力側FIFOに処理待ちデータが多く蓄積されているということは、すなわちその後続のスレッドの処理が遅れていることを意味する。このままスレッドを実行すると、出力側のFIFOが溢れてしまう可能性がある。そこでそのスレッドの優先度を下げ、出力側のFIFOが溢れないように処理を抑制する必要がある。このため図4に示すように出力側のFIFO蓄積量が増えるに従って実行され難くなる(優先度が低くなる)よう設定する。交点402に示すように、FIFO蓄積量が高くなるほど実行制御部103が保持する各スレッドの優先度を示すテーブルにより低い優先度が設定される。
【0034】
図4に示す例ではFIFO蓄積量とスレッド実行優先度の関係を比例直線401で示しているが、必ずしも直線である必要はない。たとえば出力側のFIFO蓄積量が上限に近づくに連れて、優先度の下がり方が大きくなるようにした比例曲線403であっても良い。この場合には出力側FIFOが溢れることを効果的に防止することができる。また、曲線や直線に依らずプロセッサの設計の上で実装が簡易となるように優先度が段階的あるいは階段状に低くなるようにしても良い。一例として、FIFO蓄積量にあるしきい値を設け、このしきい値を切るまではスレッドの実行をしない、またはしきい値を越えるまで実行しつづけるといった操作も可能である。
【0035】
上記したように実行制御部103は入力側FIFOから得られた優先度と出力側FIFOから得られた優先度の両方を総合した優先度、あるいは入力側FIFOに基づく優先度に従って、スレッドの優先度を決定する。
【0036】
このとき入力側FIFO蓄積量から得られた優先度と出力側FIFO蓄積量から得られた優先度とが相反する優先度を示す場合も考えられる。たとえば入力側出力側の両方が蓄積量の上限に近い場合が考えられる。この場合には出力側のFIFO蓄積量の空き領域に、入力側FIFOに記憶された処理データを処理した後の出力結果が格納できるだけの領域があることを条件に、入力側FIFO蓄積量に基づく優先度を優先する。この場合を除けば、出力側FIFOが溢れるのを防止するため出力側FIFO蓄積量に基づく優先度を優先する、あるいはこのスレッドの実行を一時的に禁止する。
【0037】
図5に本実施形態におけるプロセッサの、次に実行するスレッドを決定するためのフローの一例を示す。
【0038】
まず、全FIFOの蓄積量を取得する(S1)。取得の方法については、各FIFOに問い合わせても良いし、各FIFOから自主的に報告されたものであっても構わない。取得の方法については限定しない。
【0039】
次に、各FIFOについて上限の蓄積量を超えそうなFIFOがあるかどうかを検査する(S2)。検査の結果超えそうなFIFOがある場合には、そのFIFOに関連するスレッドについて緊急処理を行う(S3)。
【0040】
緊急処理には、たとえば次のような処理がある。一つには該当するFIFOを入力側に持つスレッドを割り込みにより最優先で処理させるものである。割り込みとは通常の処理の順序を強制的に変更させる手段を言う。他のスレッドに優先して処理することにより、当該FIFOの蓄積量を減らすことができる。もう一つは該当するFIFOを出力側に持つスレッドの実行を一時的に禁止するものである。当該スレッドの実行を禁止することで、当該FIFOに追加されるデータを止め、蓄積量に余裕ができるようにする。
【0041】
緊急処理の内容は処理状況や処理データの特性により柔軟に決定すべきものであり、上記した例に限定されるものではない。
【0042】
オーバフローしそうなFIFOが無いときは、次に全スレッドの優先度を求めたかどうかを判断する(S4)。
【0043】
優先度を求めたスレッドがすべででない場合は、処理中あるいは待機中のあるスレッドの一つを選択する(S5)。そして選択したスレッドが使用する入力側および出力側FIFOの蓄積量から、上述した方法で当該スレッドの優先度を決定する(S6)。決定後、再び全スレッドの優先度を求めたかを判断する(S4)。
【0044】
すべてのスレッドについて優先度を求めたと判断すると、優先度を求めたスレッドの中からもっとも高位の優先度を持つスレッドを選択する(S7)。
【0045】
上記のようにすると処理中あるいは待機中のスレッドから、次に実行すべきスレッドを選択することができる。
【0046】
上記したように構成すると、データフロー型プロセッサの処理能力を効率よく必要とする処理に割り当てられるとともに、入力側及び出力側のFIFO蓄積量に応じて実行すべきスレッドを選択することが可能となる。
【0047】
また本実施形態におけるプロセッサを搭載した、データフロー型の処理を行う計算機とすることも可能である。
【0048】
(第2の実施形態)
第2の実施形態におけるプロセッサのブロック図の一例を示す図、およびスレッド処理の概要を示す図は、第1の実施形態における図1および図2と同様である。
【0049】
図6に本実施形態におけるプロセッサの、あるスレッドについての入力側FIFO蓄積量に対するスレッドの優先度決定方法の一例を示す。図6に示す縦軸に当たるFIFO蓄積量は入力側FIFOであるから、たとえば図2に示すところのスレッド201−1に対するFIFO101−A、スレッド201−2に対するFIFO101−Bとなる。
【0050】
あるスレッドの入力側FIFOに処理待ちデータが多く蓄積されているということは、すなわちそのスレッドの処理が遅れていることを意味する。よってそのスレッドの優先度を上げ、処理待ちデータを速やかに処理する必要がある。このため図6に示すようにFIFO蓄積量が増えるに従って実行され易くなる(優先度が高くなる)よう設定する。
【0051】
第1の実施形態との相違は、FIFO蓄積量の増加時と減少時で異なるスレッド実行優先度とするところである。同じFIFO蓄積量のところを見ても、たとえばFIFO蓄積量が増加する際の交点601に当たる優先度は、FIFO蓄積量が減少する際の交点602に当たる優先度に比べて低くなる。
【0052】
入力側FIFOの蓄積量とスレッド処理との関係を見たとき、スレッドが実行されれば入力側FIFOの蓄積量が減ってゆき、逆に実行されなければ増加する傾向にある。このとき交点602があるFIFO蓄積量の減少時について考えると、入力側FIFOの蓄積量が減っていっても、そのスレッドの優先度の下がり方は緩やかになっている。逆に交点601があるFIFO蓄積量の増加時について考えると、入力側FIFOの蓄積量が増えていっても、そのスレッドの優先度の上がり方は緩やかである。つまり入力側FIFOの蓄積量が変化しても、一旦処理を始めたスレッドは優先度が高いまま維持されることから連続して実行される可能性が高い。逆に優先度が低くなり実行され難くなったスレッドは、入力側FIFOの蓄積量がより高くならないと実行され難いことを意味している。
【0053】
図1に示したキャッシュ104は、前述したようにスレッド処理に必要とする処理データを記憶容量は少ないものの高速にアクセスできるように設けられている。記憶容量が少ないことから、一旦読み込んだあるスレッドの処理データは他のスレッドが実行されると上書きされて消滅する可能性が高い。消滅した処理データは再びアクセス速度の遅い記憶装置からキャッシュ104上に読み込まねばならない。入力側FIFOの蓄積量の変動により実行されるスレッドが頻繁に入れ替わると、必然的に他の記憶装置からキャッシュ104に読み込まねばならないデータの量及び回数が増える。
【0054】
図1に示したレジスタセット106についても同様に、実行中及び待機中のスレッドがレジスタセット106の数を上回る場合には、他の記憶装置に一時的に退避する必要がある。これはある時点にレジスタセット106に割り当てられなかったスレッドを実行するために、他のスレッドが占有していたレジスタセット106をこのスレッドのために開放する必要があるからである。レジスタセット106の内容を記憶装置間で移動しなければならないことから、頻繁なスレッドの切替は、キャッシュ104と同様にオーバヘッドを発生させる。
【0055】
本実施形態のプロセッサではあるスレッドが頻繁に実行されやすい状態を実現し、キャッシュ104へのデータ読み込みのオーバヘッドを削減する。よってプロセッサの持つ処理能力を、本来のデータ処理に振り向けることが可能となる。
【0056】
図6に示す例ではFIFO蓄積量とスレッド優先度の関係を楕円で示しているが、必ずしも楕円である必要はない。たとえばプロセッサの設計の上で実装が簡易となるように優先度が段階的あるいは階段状に高くなるようにしても良い。
【0057】
図7は本実施形態におけるプロセッサの、あるスレッドにについて出力側FIFO蓄積量に対するスレッドの優先度決定方法の一例を示す。図7に示す縦軸に当たるFIFO蓄積量は出力側FIFOであるから、たとえば図2に示すところのスレッド201−1に対するFIFO101−B、スレッド201−2に対するFIFO101−Cとなる。
【0058】
あるスレッドの出力側FIFOに処理待ちデータが多く蓄積されているということは、すなわちその後続のスレッドの処理が遅れていることを意味する。このままスレッドを実行すると、出力側のFIFOが溢れてしまう可能性がある。そこでそのスレッドの優先度を下げ、出力側のFIFOが溢れないように処理を抑制する必要がある。このため図7に示すように出力側のFIFO蓄積量が増えるに従って実行され難くなる(優先度が低くなる)よう設定する。
【0059】
第1の実施形態との相違は、FIFO蓄積量の増加時と減少時で異なるスレッド実行優先度とするところである。同じFIFO蓄積量のところを見ても、たとえばFIFO蓄積量が増加する際の交点702に当たる優先度は、FIFO蓄積量が減少する際の交点701に当たる優先度に比べて高くなる。
【0060】
出力側FIFOの蓄積量とスレッド処理との関係を見たとき、スレッドが実行されれば出力側FIFOの蓄積量が増えてゆき、逆に実行されなければ減少する傾向にある。このとき交点702があるFIFO蓄積量の増加時について考えると、出力側FIFOの蓄積量が増えていっても、そのスレッドの優先度の下がり方は緩やかになっている。逆に交点701があるFIFO蓄積量の減少時について考えると、出力側FIFOの蓄積量が減っていっても、そのスレッドの優先度の上がり方は緩やかである。つまり出力側FIFOの蓄積量が変化しても、一旦処理を始めたスレッドは優先度が高いまま維持されることから連続して実行される可能性が高い。逆に優先度が低くなり実行され難くなったスレッドは、出力側FIFOの蓄積量がより低くならないと実行され難いことを意味している。
【0061】
この効果については、上述した図6の説明について参照されたい。
【0062】
図7に示す例ではFIFO蓄積量とスレッド実行優先度の関係を楕円で示しているが、必ずしも楕円である必要はない。たとえばプロセッサの設計の上で実装が簡易となるように優先度が段階的あるいは階段状に高くなるようにしても良い。
【0063】
上記したように実行制御部103は入力側FIFOから得られた優先度と出力側FIFOから得られた優先度の両方を総合した優先度、あるいは入力側FIFOに基づく優先度に従って、スレッドの優先度を決定する。
【0064】
このとき入力側FIFO蓄積量から得られた優先度と出力側FIFO蓄積量から得られた優先度とが相反する優先度を示す場合も考えられる。たとえば入力側FIFO及び出力側FIFOの両方に処理データが蓄積されていないときである。この場合は優先的にスレッドの実行をする必要はないので入力側FIFO蓄積量に基づく優先度を優先する。
【0065】
一方、入力側出力側の両方が蓄積量の上限に近い場合も考えられる。この場合には出力側のFIFO蓄積量の空き領域に、入力側FIFOに記憶された処理データを処理した後の出力結果が格納できるだけの領域があることを条件に、入力側FIFO蓄積量に基づく優先度を優先する。この場合を除けば、出力側FIFOが溢れるのを防止するため出力側FIFO蓄積量に基づく優先度を優先する、あるいはこのスレッドの実行を一時的に禁止する。
【0066】
本実施形態におけるプロセッサの、次に実行するスレッドを決定するためのフローの一例を示す図は、第1の実施形態における図5と同様である。
【0067】
なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。さらに、異なる実施形態にわたる構成要素を適宜組み合わせてもよい。
【0068】
【発明の効果】
本発明によれば、リアルタイム性の損失を最小限に抑えることが可能なデータフロー型プロセッサ、このプロセッサを利用した計算機及び優先度決定方法を提供することができる。
【図面の簡単な説明】
【図1】本発明の第1の実施形態にかかるプロセッサのブロック構成の一例を示す図である。
【図2】本発明の第1の実施形態にかかるプロセッサのスレッド処理の概要を示す図である。
【図3】本発明の第1の実施形態にかかるプロセッサのあるスレッドについての入力側FIFO蓄積量に対するスレッドの起動優先度決定方法の一例を示す図である。
【図4】本発明の第1の実施形態にかかるプロセッサのあるスレッドについての出力側FIFO蓄積量に対するスレッドの起動優先度決定方法の一例を示す図である。
【図5】本発明の第1の実施形態にかかるプロセッサの次に起動するスレッドを決定するためのフローの一例を示す図である。
【図6】本発明の第2の実施形態にかかるプロセッサのあるスレッドについての入力側FIFO蓄積量に対するスレッドの起動優先度決定方法の一例を示す図である。
【図7】本発明の第2の実施形態にかかるプロセッサのあるスレッドについての出力側FIFO蓄積量に対するスレッドの起動優先度決定方法の一例を示す図である。
【符号の説明】
101 FIFO(First-In First-Out)
102 選択部
103 実行制御部
104 キャッシュ
105 切替部
106 レジスタセット
107 メモリバス
108 記憶部
109 演算処理部
202 状態報告
203 実行指示
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data flow type processor, and more particularly to a processor provided with buffer memories in an input stage and an output stage, and a method for selecting an execution thread in the processor.
[0002]
[Prior art]
When a processor such as a computer processes data, multi-thread processing that executes a plurality of tasks in a time-sharing manner is generally employed in order to efficiently perform more data processing (for example, see Patent Document 1). reference).
[0003]
Several methods for realizing multithreading for data processing have been proposed. Among them, there is data flow type multi-thread processing that determines the execution order of threads according to the data flow. Such a processor has a mechanism for executing processes required in the process of data to be processed in accordance with the processing order. In this way, a thread that does not correspond to a process is not executed, and it is possible to efficiently assign processor capacity to a process required at that time.
[0004]
[Patent Document 1]
Japanese Patent Laid-Open No. 2003-029984
[Problems to be solved by the invention]
However, the conventional data flow type that selects the next execution thread depending on the output result after processing of each processing unit has a problem in the following cases.
[0006]
For example, a processing target that requires real-time processing often requires processing that does not conform to the processing flow (data flow). Processing that deviates from the data flow requires overhead such as separate interrupt processing and work state save processing. In addition, such interrupt processing causes a disturbance in the data flow and reduces processing efficiency.
[0007]
The present invention has been made in view of such a problem, and provides a data flow type processor capable of minimizing the loss of real-time property, a computer using this processor, and a priority determination method. Objective.
[0008]
[Means for Solving the Problems]
According to the present invention,
A plurality of storage means for storing process data to be processed by one or more execution units, which corresponds to one of the processes obtained by time-sharing a certain data process into at least one or more;
Data to be processed by the execution unit is received from at least one of the plurality of storage means assigned to a certain execution unit, and the execution result of the execution unit is stored in one of the plurality of storage means assigned to the execution unit. Data processing means,
Information about the amount of processing data stored in each storage unit is received from each of the storage units, and the execution status of an execution unit that accesses the storage unit is obtained from the amount of processing data stored in a storage unit. Priority determining means for determining a priority indicating the order of execution of the execution unit;
There is provided a processor characterized by comprising:
[0009]
And a computer comprising the processor.
[0010]
Also,
With respect to an execution unit corresponding to one of the processes obtained by time-sharing a certain data process into at least one or more, data to be processed by the execution unit is received from at least one of a plurality of storage devices allocated to the execution unit.
Storing the execution result of the execution unit in one of the plurality of storage devices allocated to the execution unit;
Information on the amount of processing data stored in each storage device is received from each of the storage devices, and the execution status of an execution unit that accesses the storage device is determined from the amount of processing data stored in a storage device, A priority determination method is provided, wherein a priority indicating the order of execution of the execution unit is determined.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described with reference to the drawings.
[0012]
(First embodiment)
FIG. 1 is an example of a block diagram of a processor according to the first embodiment. FIG. 1 shows a plurality of FIFOs (First-In First-Out) 101, a selection unit 102, an execution control unit 103, a cache 104, a switching unit 105, a plurality of register sets 106, a memory bus 107, A storage unit 108 and an arithmetic processing unit 109 are shown.
[0013]
The FIFO 101 is composed of a memory, and is a storage device that can be read first from what has been previously stored. Each FIFO 101 includes a plurality of 1 to n (n is arbitrary). The storage capacities of the FIFOs 101 are not necessarily the same, but the same configuration is preferable in order to process a plurality of threads equally.
[0014]
As used herein, a thread refers to a processing unit or execution of a processing unit after a process to be executed by a processor is divided and assigned to a plurality of time intervals. The thread is realized by controlling each unit performed by the execution control unit 103 and executing a predetermined program code given in advance by the arithmetic processing unit 109 under this control. Since the processor of the present embodiment is a data flow type, one process is completed by sequentially processing a plurality of divided threads for one process data. The threads are processed in parallel, and data flow type processing of a plurality of processing data can be performed asynchronously. Threading one process in this way is mainly performed to realize multi-thread processing using a real-time OS.
[0015]
The selection unit 102 has a function of selecting a FIFO designated by the execution control unit 103 from among a plurality of FIFOs 101 provided. The FIFO 101 selected here is read and written by the arithmetic processing unit 109.
[0016]
The execution control unit 103 has a function of controlling overall processing performed by the processor of the present embodiment. This also includes a table that holds a priority indicating which thread is preferentially executed. The execution control unit 103 has a function of setting this table based on information such as the FIFO 101 and instructing each unit to execute which thread of which processing data is processed according to the contents of the table.
[0017]
The cache 104 is provided in order to prevent the arithmetic processing unit 109 from sequentially accessing a storage device having a low read / write speed when the program code corresponding to the thread is executed. In general, the access speed of a mass storage device such as a main memory or a magnetic disk device is slower than the processing speed of the arithmetic processing unit 109. Although the cache 104 does not have the storage capacity of the large capacity storage device, a storage device with a high access speed is used. Data and program codes that are frequently accessed are temporarily stored in the cache 104 so that the arithmetic processing unit 109 does not wait for reading and writing, and is used to increase the processing amount of the arithmetic processing unit 109 as much as possible.
[0018]
The switching unit 105 selects one or more register sets necessary for processing from among a plurality of register sets 106 so as to be accessible. The arithmetic processing unit 109 accesses a register set in which data necessary for processing is stored via the switching unit 105.
[0019]
The register set 106 is a collection of various registers (temporary storage devices) necessary for the execution control unit 103 to execute the program code. The register set 106 includes, for example, a calculation register, an addressing register, and a stack pointer. In the present embodiment, a plurality of register sets 106 having 1 to m (m is arbitrary) are provided. Each register set 106 does not necessarily have the same configuration, but is preferably the same configuration so that each thread can process whatever register set is used.
[0020]
The memory bus 107 is provided so that data can be exchanged between the cache 104, the plurality of register sets 107, and the storage unit 108. The data stored in each can be moved through the memory bus 107. The execution control unit 103 performs data movement.
[0021]
The storage unit 108 stores program code executed for processing by the processor of the present embodiment and processing data to be processed. In some cases, it is used as a temporary save location for data stored in the cache 104 and the register set 107. .
[0022]
The arithmetic processing unit 109 has a function of executing the program code stored in the storage unit 108 or the cache 104. When executing the program code, which FIFO 101 and which register set 106 are used and which thread is to be processed are determined by an instruction from the execution control unit 103.
[0023]
FIG. 2 shows an overview of the thread processing of the processor in this embodiment.
Since the processor of the present embodiment is a data flow type, the processing data is provided in the form of input, and an output is basically obtained through one path (flow). The input processing data undergoes processing (each thread 201) that is sequentially executed by the arithmetic processing unit 109 according to the program code stored in the storage unit 108 in advance, and is output as an output result. When there is a next stage process, the output result that is output is the next stage input data.
[0024]
When processing data that is input data is input, the FIFO 101-A, which is one of a plurality of FIFOs 101 instructed by the execution control unit 103, stores this. The FIFO 101-A notifies the execution control unit 103 of the FIFO accumulation amount in the FIFO 101-A as a status report 202-A in response to a request from the execution control unit 103 or the like.
[0025]
When the arithmetic processing unit 109 executes the thread 201-1 according to an instruction from the execution control unit 103, processing using the data in the FIFO 101-A as input data is started. At this time, data in the FIFO 101-A is read in order from the previously stored data. The processing result performed by this thread is stored in the FIFO 101-B according to an instruction from the execution control unit 103. Similarly to the FIFO 101-A, the FIFO 101-B also notifies the execution control unit 103 of the status report 202-B including the FIFO accumulation amount.
[0026]
When the above processing ends from the thread 201-2 to the thread 201-x (x is arbitrary), the processing result is output as an output.
[0027]
The execution control unit 103 instructs the execution processing unit 103 which thread is to be executed by the arithmetic processing unit 109. The execution control unit 103 sets priorities in the execution priority table provided by itself based on the information of the status reports 202-A to 202-n notified from the FIFO 101-A to the FIFO 101-n. The execution instruction 203 is determined from the above. When the execution instruction 203 is determined, the priority determined by using only a part of the plurality of status reports 202 may be used, or the highest priority thread 201 may be determined from the priority determined in consideration of all the status reports 202. May be determined. Preferably, the execution order of each thread 201 is determined from all the status reports 202 to improve the efficiency of the entire process.
[0028]
Hereinafter, a method for the execution control unit 103 to determine the execution order of the threads will be described.
[0029]
FIG. 3 shows an example of a method in which the execution control unit 103 of the processor according to the present embodiment determines the thread execution priority with respect to the input-side FIFO accumulation amount for a certain thread. Since the FIFO accumulation amount corresponding to the vertical axis shown in FIG. 3 is the input-side FIFO, for example, the FIFO 101-A for the thread 201-1 and the FIFO 101-B for the thread 201-2 shown in FIG.
[0030]
A large amount of processing-waiting data stored in the input-side FIFO of a thread means that the processing of that thread is delayed. Therefore, it is necessary to increase the priority of the thread and process the data waiting for processing promptly. For this reason, as shown in FIG. 3, the setting is made such that execution becomes easier (priority becomes higher) as the FIFO accumulation amount increases. As indicated by the intersection 302, a higher priority is set in the table indicating the priority of each thread held by the execution control unit 103 as the FIFO accumulation amount increases.
[0031]
In the example shown in FIG. 3, the relationship between the FIFO accumulation amount and the thread execution priority is indicated by a proportional straight line 301, but it is not necessarily a straight line. For example, the proportional curve 303 may be such that the priority increases as the FIFO storage amount approaches the upper limit. In this case, it is possible to effectively prevent the FIFO from overflowing. Further, the priority may be increased stepwise or stepwise so that the implementation is simple in the design of the processor regardless of the curve or straight line. As an example, an operation may be performed in which a threshold value is set in the FIFO accumulation amount, and the thread is not executed until the threshold value is exceeded, or the execution is continued until the threshold value is cut.
[0032]
FIG. 4 shows an example of a thread priority determination method for the output-side FIFO accumulation amount for a certain thread of the processor according to this embodiment. Since the FIFO accumulation amount corresponding to the vertical axis shown in FIG. 4 is the output side FIFO, for example, the FIFO 101-B for the thread 201-1 and the FIFO 101-C for the thread 201-2 shown in FIG.
[0033]
The fact that a large amount of processing waiting data is accumulated in the output FIFO of a certain thread means that the processing of the subsequent thread is delayed. If the thread is executed as it is, the FIFO on the output side may overflow. Therefore, it is necessary to lower the priority of the thread and suppress the processing so that the FIFO on the output side does not overflow. For this reason, as shown in FIG. 4, the setting is made such that execution becomes difficult (priority becomes low) as the FIFO accumulation amount on the output side increases. As indicated by the intersection 402, a lower priority is set in the table indicating the priority of each thread held by the execution control unit 103 as the FIFO accumulation amount increases.
[0034]
In the example shown in FIG. 4, the relationship between the FIFO accumulation amount and the thread execution priority is indicated by a proportional line 401, but it is not necessarily a straight line. For example, the proportional curve 403 may be used in which the priority decreases as the FIFO accumulation amount on the output side approaches the upper limit. In this case, it is possible to effectively prevent the output side FIFO from overflowing. Further, the priority may be lowered stepwise or stepwise so that the implementation is simple in the design of the processor regardless of a curve or a straight line. As an example, an operation may be performed in which a threshold value is set in the FIFO accumulation amount, and the thread is not executed until the threshold value is cut, or the execution is continued until the threshold value is exceeded.
[0035]
As described above, the execution control unit 103 determines the priority of the thread according to the priority obtained by combining both the priority obtained from the input-side FIFO and the priority obtained from the output-side FIFO, or the priority based on the input-side FIFO. To decide.
[0036]
At this time, there may be a case where the priority obtained from the input-side FIFO accumulation amount and the priority obtained from the output-side FIFO accumulation amount indicate a conflicting priority. For example, it is conceivable that both the input side and the output side are close to the upper limit of the accumulation amount. In this case, based on the amount of FIFO storage on the input side, provided that there is enough space in the output FIFO storage space to store the output results after processing the processing data stored in the input FIFO. Prioritize priority. Except for this case, priority is given to the priority based on the output-side FIFO accumulation amount or the execution of this thread is temporarily prohibited in order to prevent the output-side FIFO from overflowing.
[0037]
FIG. 5 shows an example of a flow for determining a thread to be executed next in the processor according to this embodiment.
[0038]
First, the accumulated amount of all FIFOs is acquired (S1). As for the acquisition method, each FIFO may be inquired or may be voluntarily reported from each FIFO. The acquisition method is not limited.
[0039]
Next, it is checked whether or not there is a FIFO that is likely to exceed the upper limit accumulation amount for each FIFO (S2). If there is a FIFO that is likely to be exceeded as a result of the inspection, an emergency process is performed for the thread related to the FIFO (S3).
[0040]
Examples of emergency processing include the following processing. One is to process a thread having the corresponding FIFO on the input side with the highest priority by an interrupt. Interrupt means means for forcibly changing the order of normal processing. By processing with priority over other threads, the amount of FIFO storage can be reduced. The other is to temporarily prohibit execution of threads that have the corresponding FIFO on the output side. By prohibiting the execution of the thread, the data added to the FIFO is stopped, so that the accumulated amount can be afforded.
[0041]
The contents of the emergency processing should be determined flexibly according to the processing status and the characteristics of the processing data, and are not limited to the above examples.
[0042]
If there is no FIFO that is likely to overflow, it is next determined whether the priority of all threads has been obtained (S4).
[0043]
If none of the threads for which priority has been obtained is selected, one of the threads being processed or waiting is selected (S5). Then, the priority of the thread is determined by the method described above from the accumulated amounts of the input side and output side FIFOs used by the selected thread (S6). After the determination, it is determined whether the priority of all threads has been obtained again (S4).
[0044]
If it is determined that the priority has been obtained for all the threads, the thread having the highest priority is selected from the threads for which the priorities have been obtained (S7).
[0045]
As described above, the thread to be executed next can be selected from the threads being processed or waiting.
[0046]
With the configuration as described above, it is possible to select a thread to be executed according to the FIFO accumulation amount on the input side and the output side, while being allocated to the processing that efficiently requires the processing capability of the data flow type processor. .
[0047]
It is also possible to use a computer that carries the data flow type processing and includes the processor according to the present embodiment.
[0048]
(Second Embodiment)
A diagram showing an example of a block diagram of a processor in the second embodiment and a diagram showing an overview of thread processing are the same as those in FIGS. 1 and 2 in the first embodiment.
[0049]
FIG. 6 shows an example of a thread priority determination method for the input-side FIFO accumulation amount for a certain thread in the processor according to the present embodiment. Since the FIFO accumulation amount corresponding to the vertical axis shown in FIG. 6 is the input-side FIFO, for example, the FIFO 101-A for the thread 201-1 and the FIFO 101-B for the thread 201-2 shown in FIG.
[0050]
A large amount of processing-waiting data stored in the input-side FIFO of a thread means that the processing of that thread is delayed. Therefore, it is necessary to increase the priority of the thread and process the data waiting for processing promptly. For this reason, as shown in FIG. 6, the setting is made such that execution becomes easier (priority becomes higher) as the FIFO accumulation amount increases.
[0051]
The difference from the first embodiment is that different thread execution priorities are set when the FIFO accumulation amount increases and decreases. Even when looking at the same FIFO accumulation amount, for example, the priority corresponding to the intersection 601 when the FIFO accumulation amount increases is lower than the priority corresponding to the intersection 602 when the FIFO accumulation amount decreases.
[0052]
When the relationship between the accumulated amount of the input-side FIFO and the thread processing is seen, the accumulated amount of the input-side FIFO decreases if the thread is executed, and conversely increases if the thread is not executed. Considering the time when the FIFO accumulation amount at the intersection 602 is reduced at this time, even if the accumulation amount of the input-side FIFO is reduced, the method of decreasing the priority of the thread is gentle. Conversely, when considering the increase in the FIFO accumulation amount at the intersection 601, even if the input FIFO accumulation amount is increased, the thread priority is moderately increased. That is, even if the accumulation amount of the input-side FIFO changes, the thread that has once started processing is likely to be continuously executed because the priority is maintained at a high level. Conversely, a thread whose priority is low and difficult to execute means that it is difficult to execute unless the accumulation amount of the input-side FIFO becomes higher.
[0053]
The cache 104 shown in FIG. 1 is provided so that processing data required for thread processing can be accessed at high speed with a small storage capacity as described above. Since the storage capacity is small, there is a high possibility that the processing data of one thread once read is overwritten and disappears when another thread is executed. The lost processing data must be read into the cache 104 again from a storage device with a slow access speed. If the thread to be executed is frequently changed due to the fluctuation of the input FIFO amount, the amount and number of data that must be read from the other storage device to the cache 104 inevitably increase.
[0054]
Similarly, in the case of the register set 106 illustrated in FIG. 1, if the number of executing and waiting threads exceeds the number of register sets 106, it is necessary to temporarily save to another storage device. This is because in order to execute a thread that was not assigned to the register set 106 at a certain point in time, the register set 106 occupied by another thread needs to be released for this thread. Since the contents of the register set 106 must be moved between storage devices, frequent thread switching causes overhead, as does the cache 104.
[0055]
The processor according to the present embodiment realizes a state in which a thread is likely to be executed frequently, and reduces the overhead of reading data into the cache 104. Therefore, the processing capability of the processor can be allocated to the original data processing.
[0056]
In the example shown in FIG. 6, the relationship between the FIFO accumulation amount and the thread priority is indicated by an ellipse, but it is not always necessary to be an ellipse. For example, the priority may be increased stepwise or stepwise so that the implementation is simple in the design of the processor.
[0057]
FIG. 7 shows an example of a thread priority determination method for the output-side FIFO accumulation amount for a certain thread of the processor according to this embodiment. Since the FIFO accumulation amount corresponding to the vertical axis shown in FIG. 7 is the output-side FIFO, for example, the FIFO 101-B for the thread 201-1 and the FIFO 101-C for the thread 201-2 shown in FIG.
[0058]
The fact that a large amount of processing waiting data is accumulated in the output FIFO of a certain thread means that the processing of the subsequent thread is delayed. If the thread is executed as it is, the FIFO on the output side may overflow. Therefore, it is necessary to lower the priority of the thread and suppress the processing so that the FIFO on the output side does not overflow. For this reason, as shown in FIG. 7, the setting is made such that execution becomes difficult (priority becomes lower) as the FIFO accumulation amount on the output side increases.
[0059]
The difference from the first embodiment is that different thread execution priorities are set when the FIFO accumulation amount increases and decreases. Looking at the same FIFO accumulation amount, for example, the priority corresponding to the intersection 702 when the FIFO accumulation amount increases is higher than the priority corresponding to the intersection 701 when the FIFO accumulation amount decreases.
[0060]
When looking at the relationship between the accumulated amount of the output side FIFO and thread processing, the accumulated amount of the output side FIFO tends to increase if the thread is executed, and conversely decreases if not executed. At this time, considering the increase in the FIFO accumulation amount at the intersection point 702, even if the accumulation amount of the output-side FIFO is increased, the method of decreasing the priority of the thread is gentle. Conversely, when considering a decrease in the FIFO accumulation amount at the intersection point 701, even if the accumulation amount of the output-side FIFO decreases, the priority of the thread increases slowly. That is, even if the accumulation amount of the output-side FIFO changes, the thread that has once started processing is likely to be continuously executed because the priority remains high. Conversely, a thread whose priority is low and difficult to execute means that it is difficult to execute unless the accumulation amount of the output-side FIFO becomes lower.
[0061]
For this effect, refer to the description of FIG. 6 described above.
[0062]
In the example shown in FIG. 7, the relationship between the FIFO accumulation amount and the thread execution priority is indicated by an ellipse, but it is not necessarily required to be an ellipse. For example, the priority may be increased stepwise or stepwise so that the implementation is simple in the design of the processor.
[0063]
As described above, the execution control unit 103 determines the priority of the thread according to the priority obtained by combining both the priority obtained from the input-side FIFO and the priority obtained from the output-side FIFO, or the priority based on the input-side FIFO. To decide.
[0064]
At this time, there may be a case where the priority obtained from the input-side FIFO accumulation amount and the priority obtained from the output-side FIFO accumulation amount indicate a conflicting priority. For example, when processing data is not accumulated in both the input side FIFO and the output side FIFO. In this case, it is not necessary to preferentially execute the thread, so priority is given to the priority based on the input-side FIFO accumulation amount.
[0065]
On the other hand, there may be a case where both the input side and the output side are close to the upper limit of the accumulation amount. In this case, based on the amount of FIFO storage on the input side, provided that there is enough space in the output FIFO storage space to store the output results after processing the processing data stored in the input FIFO. Prioritize priority. Except for this case, priority is given to the priority based on the output-side FIFO accumulation amount or the execution of this thread is temporarily prohibited in order to prevent the output-side FIFO from overflowing.
[0066]
A diagram illustrating an example of a flow for determining a thread to be executed next in the processor according to the present embodiment is the same as FIG. 5 according to the first embodiment.
[0067]
Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. In addition, various inventions can be formed by appropriately combining a plurality of components disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, constituent elements over different embodiments may be appropriately combined.
[0068]
【The invention's effect】
According to the present invention, it is possible to provide a data flow type processor capable of minimizing the loss of real-time property, a computer using the processor, and a priority determination method.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating an example of a block configuration of a processor according to a first embodiment of the present invention.
FIG. 2 is a diagram showing an overview of thread processing of the processor according to the first embodiment of the present invention.
FIG. 3 is a diagram illustrating an example of a thread activation priority determination method for an input-side FIFO accumulation amount for a thread having a processor according to the first embodiment of the present invention;
FIG. 4 is a diagram showing an example of a thread activation priority determination method for an output-side FIFO accumulation amount for a thread with a processor according to the first embodiment of the present invention;
FIG. 5 is a diagram illustrating an example of a flow for determining a thread to be started next after the processor according to the first embodiment of the present invention;
FIG. 6 is a diagram illustrating an example of a thread activation priority determination method for an input-side FIFO accumulation amount for a thread having a processor according to the second embodiment of the present invention;
FIG. 7 is a diagram illustrating an example of a thread activation priority determination method for an output-side FIFO accumulation amount for a thread having a processor according to the second embodiment of the present invention;
[Explanation of symbols]
101 FIFO (First-In First-Out)
102 selection unit 103 execution control unit 104 cache 105 switching unit 106 register set 107 memory bus 108 storage unit 109 operation processing unit 202 status report 203 execution instruction

Claims (4)

あるデータ処理を少なくとも1以上に時分割した処理の一つに当たる、1以上の実行単位が処理すべき処理データを記憶するための複数の記憶手段と、
ある実行単位に割り当てた前記複数の記憶手段の少なくとも1つからこの実行単位が処理すべきデータを受け取り、該実行単位に割り当てた前記複数の記憶手段の1つに該実行単位の実行結果を記憶するデータ処理手段と、
前記記憶手段のそれぞれから各記憶手段が記憶する処理データ量についての情報を受け取り、
ある記憶手段が記憶する処理データ量がより多いほど、該記憶手段から処理すべきデータを受け取る実行単位に対し、該実行単位の以降実行すべき順位を示す優先度をより高い優先度に決定し、
ある記憶手段が記憶する処理データ量がより少ないほど、該記憶手段から処理すべきデータを受け取る実行単位に対し、該実行単位の以降実行すべき順位を示す優先度をより低い優先度に決定し、
幾つかの前記記憶手段が記憶している処理データ量が同等である場合には、該記憶手段から処理すべきデータを受け取る各実行単位に対し、それら記憶手段が記憶する処理データ量の増減傾向について減少傾向が大きい順に、高い優先度を決定する
優先度決定手段と、を備えたことを特徴とするプロセッサ。
A plurality of storage means for storing process data to be processed by one or more execution units, which corresponds to one of the processes obtained by time-sharing a certain data process into at least one or more;
Data to be processed by the execution unit is received from at least one of the plurality of storage means assigned to a certain execution unit, and the execution result of the execution unit is stored in one of the plurality of storage means assigned to the execution unit. Data processing means,
Receiving information about the amount of processing data stored by each storage means from each of the storage means;
As the amount of processing data stored in a storage unit is larger, the priority indicating the order of execution of the execution unit after the execution unit that receives data to be processed from the storage unit is determined as a higher priority. ,
The smaller the amount of processing data stored in a storage means, the lower the priority indicating the order of execution of the execution unit to be executed after that for the execution unit receiving data to be processed from the storage means. ,
When the amount of processing data stored in some of the storage means is equal, the increase / decrease tendency of the amount of processing data stored in the storage means for each execution unit that receives data to be processed from the storage means And a priority determining means for determining a higher priority in descending order of decreasing tendency .
前記優先度決定手段は、ある記憶手段が記憶する処理データ量が該記憶手段の記憶容量の上限を越えると判断したときは、該記憶手段から処理すべきデータを受け取る実行単位に対し、もっとも高位の優先度を決定することを特徴とする、請求項1に記載のプロセッサ。  When the priority determining unit determines that the amount of processing data stored in a certain storage unit exceeds the upper limit of the storage capacity of the storage unit, the priority determining unit is the highest in the execution unit that receives data to be processed from the storage unit. The processor according to claim 1, wherein the priority is determined. 請求項1乃至請求項のいずれかに記載のプロセッサを備えた計算機。Computer including a processor according to any one of claims 1 to 2. あるデータ処理を少なくとも1以上に時分割した処理の一つに当たる実行単位について、ある実行単位に割り当てた複数ある記憶装置の少なくとも1つから該実行単位が処理すべきデータを受け取り、
該実行単位に割り当てた前記複数の記憶装置の1つに該実行単位の実行結果を記憶し、
前記記憶装置のそれぞれから各記憶装置が記憶する処理データ量についての情報を受け取り、
ある記憶装置が記憶する処理データ量がより多いほど、該記憶装置から処理すべきデータを受け取る実行単位に対し、該実行単位の以降実行すべき順位を示す優先度をより高い優先度に決定し、
ある記憶装置が記憶する処理データ量がより少ないほど、該記憶装置から処理すべきデータを受け取る実行単位に対し、該実行単位の以降実行すべき順位を示す優先度をより低い優先度に決定し、
幾つかの前記記憶装置が記憶している処理データ量が同等である場合には、該記憶手段から処理すべきデータを受け取る各実行単位に対し、それら記憶装置が記憶する処理データ量の増減傾向について減少傾向が大きい順に、高い優先度を決定することを特徴とする優先度決定方法。
With respect to an execution unit corresponding to one of the processes obtained by time-sharing a certain data process into at least one or more, data to be processed by the execution unit is received from at least one of a plurality of storage devices allocated to the execution unit.
Storing the execution result of the execution unit in one of the plurality of storage devices allocated to the execution unit;
Receiving information about the amount of processing data that each storage device stores from each of the storage devices;
As the amount of processing data stored in a certain storage device is larger, the priority indicating the order of execution of the execution unit to be executed thereafter is determined as a higher priority for the execution unit that receives data to be processed from the storage device. ,
The smaller the amount of processing data stored in a storage device, the lower the priority indicating the order of execution of the execution unit to be executed after that for the execution unit that receives data to be processed from the storage device. ,
When the amount of processing data stored in some of the storage devices is the same, the increasing / decreasing tendency of the amount of processing data stored in the storage devices for each execution unit that receives data to be processed from the storage means A priority determination method characterized by determining a higher priority in descending order of decreasing tendency .
JP2003079478A 2003-01-09 2003-03-24 Processor, computer and priority determination method Expired - Fee Related JP3880942B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003079478A JP3880942B2 (en) 2003-03-24 2003-03-24 Processor, computer and priority determination method
US10/752,703 US20040139441A1 (en) 2003-01-09 2004-01-08 Processor, arithmetic operation processing method, and priority determination method
CNA2004100020726A CN1517869A (en) 2003-01-09 2004-01-09 Processor, arithmetic processing method and priority decision method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003079478A JP3880942B2 (en) 2003-03-24 2003-03-24 Processor, computer and priority determination method

Publications (2)

Publication Number Publication Date
JP2004287883A JP2004287883A (en) 2004-10-14
JP3880942B2 true JP3880942B2 (en) 2007-02-14

Family

ID=33293582

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003079478A Expired - Fee Related JP3880942B2 (en) 2003-01-09 2003-03-24 Processor, computer and priority determination method

Country Status (1)

Country Link
JP (1) JP3880942B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5145936B2 (en) * 2005-06-02 2013-02-20 学校法人慶應義塾 Multi-thread central processing unit and simultaneous multi-threading control method
JP4647533B2 (en) * 2005-11-28 2011-03-09 富士通セミコンダクター株式会社 Arithmetic processing device, internal configuration determination method of arithmetic processing device, and arithmetic processing system
JP2008009970A (en) * 2006-05-29 2008-01-17 Matsushita Electric Ind Co Ltd Information processing device, information processing method and information processing program
JP4979287B2 (en) 2006-07-14 2012-07-18 富士ゼロックス株式会社 Image processing apparatus and program
JP5452125B2 (en) * 2009-08-11 2014-03-26 クラリオン株式会社 Data processing apparatus and data processing method
WO2012049791A1 (en) * 2010-10-12 2012-04-19 日本電気株式会社 Data processing method, data processing device, and non-temporary computer readable medium on which data processing program has been stored
US9626273B2 (en) 2011-11-09 2017-04-18 Nec Corporation Analysis system including analysis engines executing predetermined analysis and analysis executing part controlling operation of analysis engines and causing analysis engines to execute analysis
JPWO2013099062A1 (en) * 2011-12-28 2015-04-30 日本電気株式会社 Analysis processing system
US9152459B2 (en) * 2012-04-23 2015-10-06 Marvell World Trade Ltd. Adjusting thread priority to improve throughput between peer-to-peer (P2P) devices
WO2020213396A1 (en) 2019-04-17 2020-10-22 株式会社エヌエスアイテクス Processor and program

Also Published As

Publication number Publication date
JP2004287883A (en) 2004-10-14

Similar Documents

Publication Publication Date Title
US20040139441A1 (en) Processor, arithmetic operation processing method, and priority determination method
JP3805305B2 (en) Control of priority and instruction speed on multithreaded processors
JP5040773B2 (en) Memory buffer allocation device and program
EP0827071B1 (en) Multithreaded processor for processing multiple instruction streams independently of each other by flexibly controlling throughput in each instruction stream
US7412590B2 (en) Information processing apparatus and context switching method
US5826081A (en) Real time thread dispatcher for multiprocessor applications
KR100976280B1 (en) Multi processor and multi thread safe message queue with hardware assistance
US9436464B2 (en) Instruction-issuance controlling device and instruction-issuance controlling method
KR100404672B1 (en) Method and apparatus for assigning priority to a load buffer and a store buffer, which contend for a memory resource
JP2001147902A (en) Microprocessor system
EP0747816A2 (en) Method and system for high performance multithread operation in a data processing system
JP3880942B2 (en) Processor, computer and priority determination method
JP2002342163A (en) Method for controlling cache for multithread processor
EP1760581A1 (en) Processing operations management systems and methods
US20050066149A1 (en) Method and system for multithreaded processing using errands
JP3034873B2 (en) Information processing device
US20120226842A1 (en) Enhanced prioritising and unifying interrupt controller
CA2769899C (en) Enhanced prioritising and unifying interrupt controller
US10585701B2 (en) Dynamically allocating storage elements to provide registers for processing thread groups
US6915516B1 (en) Apparatus and method for process dispatching between individual processors of a multi-processor system
JP4088763B2 (en) Computer system, hardware / software logic suitable for the computer system, and cache method
JP4017005B2 (en) Arithmetic unit
JPH05151064A (en) Tightly coupled multiprocessor system
JP2012168725A (en) Multi-thread processor
US11829643B2 (en) Memory controller system and a method of pre-scheduling memory transaction for a storage device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050415

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050606

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060627

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060828

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20061107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061108

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101117

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees