JPH06187312A - Processing method and its device in multi-cpu system - Google Patents

Processing method and its device in multi-cpu system

Info

Publication number
JPH06187312A
JPH06187312A JP35484892A JP35484892A JPH06187312A JP H06187312 A JPH06187312 A JP H06187312A JP 35484892 A JP35484892 A JP 35484892A JP 35484892 A JP35484892 A JP 35484892A JP H06187312 A JPH06187312 A JP H06187312A
Authority
JP
Japan
Prior art keywords
data
thread
traverser
processed
processing
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
JP35484892A
Other languages
Japanese (ja)
Inventor
Hideyuki Kishiba
秀行 岸塲
Yoshiyuki Otsuki
好之 大槻
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP35484892A priority Critical patent/JPH06187312A/en
Publication of JPH06187312A publication Critical patent/JPH06187312A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To perform smooth and efficient parallel decentralized processes of many data. CONSTITUTION:Traverser threads 1, 2, and 3 which performs processes based upon programs are generated corresponding to CPUs 11-14. Process completion flags showing which traverser thread processed the data are added to the data that the traverser threads process and stored in a memory 15. Each traverser thread selects unprocessed data by referring to the process completion flags. The flag of the selected data is changed into a state indicating that the data are already processed. Each traverser thread processes the selected data according to the program.

Description

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

【0001】[0001]

【技術分野】この発明は,マルチCPUシステムにおけ
る処理方法および装置に関する。
TECHNICAL FIELD The present invention relates to a processing method and apparatus in a multi-CPU system.

【0002】[0002]

【従来技術とその問題点】マルチCPUシステムにおい
ては,タスクを複数のスレッドに分割して処理が行なわ
れる。スレッドはCPUに対応しており,タスク内のア
プリケーション・プログラム,データ等を共有してい
る。
2. Description of the Related Art In a multi-CPU system, a task is divided into a plurality of threads for processing. Threads correspond to CPUs and share application programs, data, etc. in tasks.

【0003】マルチCPUシステムで実行される処理の
代表例としてグラフィックスの表示処理を挙げると,こ
の処理に関しては次のような方法が知られている。
As a typical example of the processing executed in the multi-CPU system, a graphics display processing is given. The following method is known for this processing.

【0004】その一つは,表示装置にグラフィックス表
示するための図形データの幾何学変換処理を行なうスレ
ッドを複数個用意しておき,図形データ単位毎に処理を
並列に行なうものである。しかしながらこの方法による
と,図形データを複数のスレッドが並列に処理すること
になるので,複数のスレッドがデータを共有し,同じ図
形データに2つ以上のスレッドが同時にまたは前後して
アクセスすることがある。この場合には,一度処理され
たデータが再度処理されるというような障害が発生し,
データの管理またはスレッド間の相互排除に問題点があ
る。
One of them is to prepare a plurality of threads for performing geometric transformation processing of graphic data for displaying graphics on a display device, and perform the processing in parallel for each graphic data unit. However, according to this method, since multiple threads process graphic data in parallel, multiple threads can share the data and two or more threads can access the same graphic data simultaneously or before and after. is there. In this case, there will be a problem that the processed data will be processed again.
There is a problem in managing data or mutual exclusion between threads.

【0005】もう一つの方法は,幾何学変換処理を座標
変換処理,クリッピング処理,…等の処理単位毎に分割
して,分割した処理をそれぞれ異なるスレッドによって
行なうものである。この場合,図形データがそれぞれの
スレッドに渡されてゆき,処理される。しかしながら,
図形データをスレッド間で転送するためにスレッド間で
データの通信を行なう必要があり,そのためには同期を
とる必要がある。したがって,同期をとるときにいずれ
かのスレッドに待ち時間が生じ,オーバーヘッドが発生
するという問題点がある。
Another method is to divide the geometric transformation processing into processing units such as coordinate transformation processing, clipping processing, ... And perform the divided processing by different threads. In this case, the graphic data is passed to each thread and processed. However,
In order to transfer graphic data between threads, it is necessary to communicate data between threads, and for that purpose it is necessary to synchronize. Therefore, there is a problem that a waiting time occurs in one of the threads when synchronizing and an overhead occurs.

【0006】[0006]

【発明の開示】この発明は,マルチCPUシステムにお
ける並列分散処理を効率的にかつ円滑に行なえるように
することを目的としている。
DISCLOSURE OF THE INVENTION An object of the present invention is to enable parallel and distributed processing in a multi-CPU system to be carried out efficiently and smoothly.

【0007】この発明によるマルチCPUシステムにお
ける処理方法は,複数台のCPUを備えたシステムにお
いて,上記複数台のCPUに対応して生成されかつあら
かじめ設定されたプログラムにしたがう処理を行なう複
数のスレッドによって,多数のデータを並列分散処理す
る方法であり,上記多数のデータのそれぞれに対応して
上記複数のスレッドのいずれかによって処理されている
かどうかを表わす処理済フラグをあらかじめ設定してお
き,上記スレッドが,上記データの処理済フラグを参照
して上記多数のデータのうち処理されていない未処理デ
ータを選択し,上記スレッドが,選択した上記データの
処理済フラグを処理されていることを表わす状態に変更
し,上記スレッドが,選択した上記データについての処
理を行なうものである。
A processing method in a multi-CPU system according to the present invention, in a system having a plurality of CPUs, uses a plurality of threads for processing according to a preset program generated corresponding to the plurality of CPUs. , Is a method for parallel and distributed processing of a large number of data, and sets a processed flag indicating in advance whether or not the data is processed by any of the plurality of threads corresponding to each of the plurality of data. A state in which the unprocessed data that has not been processed among the large number of data is selected by referring to the processed flag of the data, and the thread indicates that the processed flag of the selected data has been processed. And the thread will process the selected data. That.

【0008】この発明によるマルチCPUシステムにお
ける処理装置は,複数台のCPUを備え,上記複数台の
CPUに対応して生成されかつあらかじめ設定されたプ
ログラムにしたがう処理を行なう複数のスレッドによっ
て,多数のデータを並列分散処理する装置であり,上記
多数のデータと,それぞれに対応して上記複数のスレッ
ドのいずれかによって処理されているかどうかを表わす
処理済フラグをあらかじめ記憶した記憶手段を備え,上
記各スレッドは,上記データの処理済フラグを参照して
上記多数のデータのうち処理されていない未処理データ
を選択する手段,選択した上記データの処理済フラグを
処理されていることを表わす状態に変更する手段,およ
び選択した上記データについての処理を実行する手段を
有している。
A processing device in a multi-CPU system according to the present invention includes a plurality of CPUs, and a plurality of threads are formed by a plurality of threads for performing processing according to a preset program generated corresponding to the plurality of CPUs. An apparatus for performing parallel and distributed processing of data, comprising a storage means for storing in advance a large number of data and a processed flag corresponding to each of the plurality of threads for processing. The thread changes the processed flag of the selected data to a state indicating that the processed flag of the selected data is processed, by referring to the processed flag of the data and selecting unprocessed data that has not been processed. And means for executing processing for the selected data.

【0009】この発明によると,複数のスレッドがデー
タに付随する処理済フラグを調べることによって,それ
ぞれのスレッドが処理するべき未処理データを選択でき
る。したがって,複数のスレッドが同じデータを重複し
て処理することがなくなる。データの管理が容易にな
り,またスレッド間の相互排除も行なう必要がなくな
る。したがって,処理の高速化を図ることがきる。さら
に,スレッド間でデータの通信を行なう必要がないの
で,オーバーヘッドの問題も解消させる。
According to the present invention, a plurality of threads can select the unprocessed data to be processed by each thread by checking the processed flag attached to the data. Therefore, multiple threads do not process the same data redundantly. Data management becomes easier, and mutual exclusion between threads becomes unnecessary. Therefore, the processing speed can be increased. Furthermore, since it is not necessary to communicate data between threads, the problem of overhead is solved.

【0010】この発明の好ましい実施態様においては,
上記多数のデータのそれぞれにプライオリティを示すデ
ータをあらかじめ設定しておき,上記スレッドは,未処
理データを選択するときに未処理データのうち最もプラ
イオリティの高い未処理データを選択する。
In a preferred embodiment of the invention,
Data indicating a priority is set in advance for each of the large number of data, and the thread selects the unprocessed data with the highest priority among the unprocessed data when selecting the unprocessed data.

【0011】この実施態様によると,データにプライオ
リティがあったとしても,スレッドはそのプライオリテ
ィの順にデータの処理を行なうことができる。
According to this embodiment, even if the data has priority, the thread can process the data in the order of the priority.

【0012】[0012]

【実施例の説明】図1は,マルチCPUシステムの構造
を示すブロック図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a block diagram showing the structure of a multi-CPU system.

【0013】マルチCPUシステムは,複数台のCPU
と,メモリ15,表示装置16とを備えている。実施例にお
いては,4台のCPU11,12,13および14が設けられて
いる。CPU11〜14は,同一の機能を有するCPUであ
っても,異なる機能を有するCPUであってもよい。メ
モリ15には,システムを動作させるOS(オペレーティ
ング・システム),アプリケーション・プログラム,処
理すべきおよび処理後のデータ,その他の情報が格納さ
れている。表示処理16は,たとえばCRTディスプレイ
である。
The multi-CPU system is composed of a plurality of CPUs.
And a memory 15 and a display device 16. In the embodiment, four CPUs 11, 12, 13 and 14 are provided. The CPUs 11 to 14 may be CPUs having the same function or CPUs having different functions. The memory 15 stores an OS (operating system) for operating the system, application programs, data to be processed and processed, and other information. The display processing 16 is, for example, a CRT display.

【0014】マルチCPUシステムにおいては,タスク
を複数のスレッドに分割して処理を行なう。タスクは,
一つ以上のスレッドがその中で動作する実行環境であ
り,資源(CPU,メモリ等)の割当ての基本単位であ
る。スレッドは,タスクの資源を使用しながら実行され
る仕事の単位であり,各CPUへ割当てる最小単位であ
る。タスクの持つすべての資源はタスク内の複数のスレ
ッドに共用される。具体的には,アプリケーション・プ
ログラム,データ等の領域が全スレッドに共有され,プ
ログラム・カウンタ,スタック・ポインタ,レジスタ等
は各スレッドに固有のものとして設けられる。異なるス
レッドがタスク内にある同じプログラムを呼出すことも
できる。
In a multi-CPU system, a task is divided into a plurality of threads for processing. The task is
It is an execution environment in which one or more threads operate, and is a basic unit of resource (CPU, memory, etc.) allocation. A thread is a unit of work that is executed while using the resources of a task, and is the minimum unit assigned to each CPU. All resources of a task are shared by multiple threads in the task. Specifically, areas such as application programs and data are shared by all threads, and program counters, stack pointers, registers, etc. are provided unique to each thread. Different threads can call the same program in a task.

【0015】以下,一例としてグラフィックス表示処理
について説明する。
The graphics display processing will be described below as an example.

【0016】図2はグラフィックス表示処理の概要を示
すフロー・チャートである。図3はメモリ15の内容を示
すテーブルである。図4はトラバーサ・スレッド1〜3
により処理されるデータの一例を示すテーブルである。
FIG. 2 is a flow chart showing an outline of the graphics display processing. FIG. 3 is a table showing the contents of the memory 15. Figure 4 shows traverser threads 1-3
It is a table which shows an example of the data processed by.

【0017】グラフィックスの表示処理を行なうメイン
・スレッドが起動されると,メイン・スレッドによりト
ラバーサ・スレッド1,2および3が生成される(スレ
ッド・ディスパッチ処理;ステップ21)。トラバーサ・
スレッド1〜3は,それぞれが後述するトラバース処
理,幾何学変換処理および表示要求管理処理を行なう。
好ましくは,トラバーサ・スレッド1〜3およびメイン
・スレッドがCPU11〜14にそれぞれ1対1に対応す
る。
When the main thread for displaying graphics is started, the main thread generates traverser threads 1, 2, and 3 (thread dispatch processing; step 21). Traversa
The threads 1 to 3 perform traverse processing, geometric conversion processing, and display request management processing, which will be described later.
Preferably, the traverser threads 1 to 3 and the main thread correspond to the CPUs 11 to 14 one to one.

【0018】メイン・スレッドおよびトラバーサ・スレ
ッド1〜3は,図3に示されるように,それぞれがプロ
グラム・カウンタ,スタック・ポインタ,レジスタ等
(メイン・スレッド領域,トラバーサ・スレッド1,
2,3領域にある)を固有に有し,アプリケーション・
プログラム(幾何学変換処理プログラム等)領域および
共有データ領域を共有している。共有データ領域には複
数のステッドが同時にアクセスすることができる。
As shown in FIG. 3, the main thread and the traverser threads 1 to 3 respectively include a program counter, a stack pointer, a register, etc. (main thread area, traverser threads 1,
(In a few areas)
The program (geometric conversion processing program etc.) area and shared data area are shared. Multiple shared can access the shared data area at the same time.

【0019】スレッドの生成とは,プログラム・カウン
タ,スタック・ポインタ,レジスタ等のスレッドが固有
にもつ情報をメモリ15に確保することである。
The generation of a thread is to secure in the memory 15 information unique to a thread such as a program counter, a stack pointer, and a register.

【0020】図4に示すように,複数の図形データA〜
Nは,トラバーサ・スレッド1〜3のいずれかによって
処理されるものであり,これらの図形データは処理済フ
ラグとともに,メモリ15の共有データ領域に格納され
る。処理済フラグは,その図形データがいずれかのトラ
バーサ・スレッドによって処理されているならば1に設
定され,未処理の場合には0となっている。図形データ
にはまた,表示装置16に表示する順序のプライオリティ
(優先順位)が付随している。
As shown in FIG. 4, a plurality of graphic data A to
N is processed by any one of the traverser threads 1 to 3, and these graphic data are stored in the shared data area of the memory 15 together with the processed flag. The processed flag is set to 1 if the graphic data is processed by any of the traverser threads, and is 0 if not processed. The graphic data is also accompanied by a priority (priority) of the order of display on the display device 16.

【0021】トラバーサ・スレッド1〜3は,共有デー
タ領域に格納されている図形データの処理済フラグを調
べて,未処理の図形データをプライオリティが高い順に
選択する(トラバース処理;ステップ22)。
The traverser threads 1 to 3 check the processed flag of the graphic data stored in the shared data area and select unprocessed graphic data in descending order of priority (traverse process; step 22).

【0022】トラバーサ・スレッド1〜3はアプリケー
ション・プログラム(幾何学変換プログラム)にアクセ
スし,そのプログラムにしたがって選択した図形データ
の幾何学変換を行なう(幾何学変換処理;ステップ2
3)。
The traverser threads 1 to 3 access an application program (geometric conversion program) and perform geometric conversion of the figure data selected according to the program (geometric conversion process; step 2).
3).

【0023】トラバーサ・スレッド1〜3は,それぞれ
幾何学変換したデータを,図形データのプライオリティ
順に表示装置16に送信する(表示要求管理処理;ステッ
プ24)。
The traverser threads 1 to 3 transmit the geometrically transformed data to the display device 16 in the order of the priority of the graphic data (display request management process; step 24).

【0024】表示装置16は,トラバーサ・スレッド1〜
3のいずれかから送信された幾何学変換データを描画し
て画面に表示する(レンダリング処理;ステップ25)。
The display device 16 includes traverser threads 1 through 1.
The geometric transformation data transmitted from any one of 3 is drawn and displayed on the screen (rendering process; step 25).

【0025】図5および図6はスレッド・ディスパッチ
処理(図2,ステップ21)の詳細な処理手順を示すフロ
ー・チャートである。
FIG. 5 and FIG. 6 are flow charts showing the detailed processing procedure of the thread dispatch processing (FIG. 2, step 21).

【0026】グラフィックスの表示処理を行なうメイン
・スレッドが起動されると,メイン・スレッドは上述し
たようにトラバーサ・スレッド1,2および3を生成す
る。メイン・スレッドは,生成したトラバーサ・スレッ
ドを一旦停止させる(図5,ステップ31)。これに応答
して,メイン・スレッドによって生成された各トラバー
サ・スレッド1〜3は処理を停止し,停止したことを表
わす停止信号をメイン・スレッドに返信する(図6,ス
テップ41)。トラバーサ・スレッドは,メイン・スレッ
ドからの再開信号を待つ(図6,ステップ42)。
When the main thread for displaying graphics is started, the main thread creates the traverser threads 1, 2, and 3 as described above. The main thread temporarily stops the generated traverser thread (FIG. 5, step 31). In response to this, each of the traverser threads 1 to 3 generated by the main thread stops the processing and returns a stop signal indicating the stop to the main thread (FIG. 6, step 41). The traverser thread waits for the restart signal from the main thread (Fig. 6, step 42).

【0027】メイン・スレッドは,トラバーサ・スレッ
ド1〜3のそれぞれから返信される停止信号を受信して
トラバーサ・スレッドが生成されていることを確認し
(図5,ステップ32),トラバーサ・スレッド1〜3に
再開信号を送信する(図5,ステップ33)。
The main thread receives the stop signal returned from each of the traverser threads 1 to 3 and confirms that the traverser thread has been generated (FIG. 5, step 32), and the traverser thread 1 The restart signal is transmitted to 3 to 3 (step 33 in FIG. 5,).

【0028】トラバーサ・スレッド1〜3は,メイン・
スレッドからの再開信号を受信すると(図6,ステップ
42),処理を再開する。処理を再開したトラバーサ・ス
レッドは,メイン・スレッドに処理を再開したことを表
わす開始信号を送信する(図6,ステップ43)。その
後,トラバーサ・スレッドはトラバース処理に移る。
The traverser threads 1 to 3 are the main
When a resume signal is received from the thread (Fig. 6, step
42), restart processing. The traverser thread which has resumed processing transmits a start signal indicating that the processing has been resumed to the main thread (FIG. 6, step 43). After that, the traverser thread moves on to traverse processing.

【0029】メイン・スレッドは,トラバーサ・スレッ
ド1〜3のそれぞれから返信される開始信号を受信する
ことによって,トラバーサ・スレッドが処理を再開した
ことを確認する(図5,ステップ34)。
The main thread confirms that the traverser thread has resumed processing by receiving the start signal returned from each of the traverser threads 1 to 3 (step 34 in FIG. 5).

【0030】図7はトラバーサ・スレッドにおける処理
手順の詳細を示すものである。この処理はすべてのトラ
バーサ・スレッド1〜3に共通のものである。
FIG. 7 shows the details of the processing procedure in the traverser thread. This process is common to all traverser threads 1-3.

【0031】トラバーサ・スレッドは処理を再開する
と,まず共有データ領域の図形データに付随する処理済
フラグをプライオリティの高い順に調べて,処理するデ
ータがあるかどうかを判断する(ステップ51)。全ての
図形データのフラグが1であれば(ステップ51でNO),
トラバーサ・スレッド1は処理を終了する。
When the traverser thread restarts processing, it first checks the processed flags associated with the graphic data in the shared data area in descending order of priority to determine whether there is data to be processed (step 51). If all graphic data flags are 1 (NO in step 51),
The traverser thread 1 finishes the process.

【0032】未処理(処理済フラグが0)図形データが
あれば,そのうちでプライオリティの最も高い図形デー
タが,トラバーサ・スレッドが処理すべき図形データで
ある。トラバーサ・スレッドは,トラバーサ・スレッド
のいずれかによって既に処理されている(処理済フラグ
が1)図形データを空読みする(ステップ52)。
If there is unprocessed (processed flag is 0) graphic data, the graphic data with the highest priority is the graphic data to be processed by the traverser thread. The traverser thread idle-reads the graphic data that has already been processed (the processed flag is 1) by one of the traverser threads (step 52).

【0033】トラバーサ・スレッドは,未処理の図形デ
ータのうちプライオリティが最も高いものを読込み(ス
テップ53),読込んだ図形データの処理済フラグを1に
セットする(ステップ54)。以上の処理がトラバース処
理(図2,ステップ22)である。
The traverser thread reads the unprocessed graphic data with the highest priority (step 53), and sets the processed flag of the read graphic data to 1 (step 54). The above processing is the traverse processing (step 22 in FIG. 2,).

【0034】次に,トラバーサ・スレッドは,幾何学変
換プログラムにアクセスして,このプログラムにしたが
って,ステップ53で読込んだ図形データの幾何学変換処
理(図2,ステップ23)を行なう(ステップ55)。
Next, the traverser thread accesses the geometry conversion program and performs the geometry conversion process (FIG. 2, step 23) of the graphic data read in step 53 according to this program (step 55). ).

【0035】トラバーサ・スレッドによって幾何学変換
された図形データは,プライオリティにしたがって表示
装置16にグラフィックス表示される。以下,表示要求管
理処理(図2,ステップ24)について説明する。
The graphic data geometrically transformed by the traverser thread is graphically displayed on the display device 16 in accordance with the priority. The display request management process (step 24 in FIG. 2) will be described below.

【0036】メモリ15の共有データ領域に表示要求管理
処理で用いられる待ち行列が実現されている。図8(A)
,(B) および(C) に待ち行列の一例が示されている。
1つの待ち行列は,次の待ち行列があることを示すポイ
ンタ,プライオリティを示すCFP,変換された図形デ
ータを格納するデータ・エリアを持つ。CFPが1の待
ち行列は,データ・エリアを持っていない。また,末尾
の待ち行列においては,データ・エリアにはダミー・デ
ータが格納されており,CFPは最も低いプライオリテ
ィを持つ。トラバーサ・スレッドは待ち行列のCFPに
よって,表示装置16に表示するべき図形データがあるか
どうかを認識する。グラフィックス表示処理が起動され
るときにはCFP=1の初期待ち行列のみが存在する。
A queue used in the display request management process is realized in the shared data area of the memory 15. Figure 8 (A)
, (B) and (C) show an example of a queue.
One queue has a pointer indicating that there is a next queue, a CFP indicating priority, and a data area for storing converted graphic data. A queue with a CFP of 1 has no data area. In the queue at the end, dummy data is stored in the data area, and CFP has the lowest priority. The traverser thread recognizes by the CFP in the queue whether or not there is graphic data to be displayed on the display device 16. Only the initial queue with CFP = 1 exists when the graphics display process is activated.

【0037】図8(C) は,同図(B) に示される待ち行列
において,CFPがnの図形データの前にCFPが(n
−1)の待ち行列を挿入する様子を示している。末尾の
待ち行列は最も低いプライオリティを持っているので,
この末尾の待ち行列の前に新しい待ち行列の挿入には特
別な操作を要しない。図8(B) に示すように,プライオ
リティがnのデータが待ち行列に格納されている場合,
プライオリティ(n−1)の待ち行列は,図8(C) に示
すようにプライオリティnの前に挿入される。
FIG. 8C shows that in the queue shown in FIG. 8B, the CFP is (n
It shows a state of inserting the queue of -1). The last queue has the lowest priority, so
Inserting a new queue before this tail queue requires no special handling. As shown in Fig. 8 (B), when data with priority n is stored in the queue,
The queue of priority (n-1) is inserted before the priority n as shown in FIG. 8 (C).

【0038】トラバーサ・スレッド1,2,3がそれぞ
れプライオリティ1,2,3をもつデータA,B,Cを
処理しているものとする。
It is assumed that the traverser threads 1, 2, 3 are processing the data A, B, C having the priorities 1, 2, 3, respectively.

【0039】トラバーサ・スレッド1よりも先にトラバ
ーサ・スレッド2がプライオリティ2の図形データBの
幾何学変換処理を終えると,トラバーサ・スレッド2は
幾何学変換処理を行なった図形データBのプライオリテ
ィ2と既に形成されている待ち行列のCFP(この場合
にはCFP=1の初期待ち行列のみがあるとする)とを
比較する(ステップ56)。トラバース・スレッド2の処
理したデータのプライオリティは2で,既にある待ち行
列のCFPは1であり,プライオリティとCFPは相違
する。したがって,ステップ56でNOである。トラバーサ
・スレッド2は新たな待ち行列をつくり,そのCFPを
2として,変換した図形データBの変換データを,この
新たな行列のデータ・エリア(図8(A) 参照)に格納す
る(ステップ60)。
When the traverser thread 2 finishes the geometric conversion processing of the figure data B having the priority 2 before the traverser thread 1, the traverser thread 2 becomes the priority 2 of the figure data B subjected to the geometric conversion processing. The CFP of the queue already formed (in this case, there is only the initial queue with CFP = 1) is compared (step 56). The priority of the data processed by the traverse thread 2 is 2, the CFP of the existing queue is 1, and the priority and CFP are different. Therefore, step 56 is NO. The traverser thread 2 creates a new queue, sets the CFP to 2, and stores the converted data of the converted graphic data B in the data area of this new matrix (see FIG. 8A) (step 60). ).

【0040】トラバーサ・スレッド2はステップ51に戻
り,トラバース処理を行ない,次の図形データの処理,
たとえばプライオリティ4の図形データDの幾何学変換
処理を行なう。
The traverser thread 2 returns to step 51, performs the traverse process, processes the next graphic data,
For example, the geometric conversion process of the graphic data D of priority 4 is performed.

【0041】次にトラバーサ・スレッド1が幾何学変換
処理を終えると,トラバーサ・スレッド1は,変換処理
を行なった図形データAのプライオリティと初期待ち行
列のCFPとを比較する。待ち行列のCFPは1であ
り,トラバーサ・スレッド1が変換処理した図形データ
Aのプライオリティは1で,プライオリティとCFPは
等しい。したがって,ステップ56でYES である。トラバ
ーサ・スレッド1は変換を行なった図形データを表示装
置16に送り,表示装置16はトラバーサ・スレッド1から
送られてくる図形データAの変換データに基づいて,グ
ラフィックス表示を行なう(ステップ57)。トラバーサ
・スレッド1は表示装置16に変換データを送ると待ち行
列のCFPをインクリメントする(ステップ58)。ここ
で,CFPは2となる。
Next, when the traverser thread 1 finishes the geometric conversion processing, the traverser thread 1 compares the priority of the converted graphic data A with the CFP of the initial queue. The CFP of the queue is 1, the priority of the graphic data A converted by the traverser thread 1 is 1, and the priority and CFP are equal. Therefore, step 56 is YES. The traverser thread 1 sends the converted graphic data to the display device 16, and the display device 16 displays graphics based on the converted data of the graphic data A sent from the traverser thread 1 (step 57). . When the traverser thread 1 sends the converted data to the display device 16, it increments the CFP in the queue (step 58). Here, CFP is 2.

【0042】トラバーサ・スレッド1は,他の待ち行列
に変換データがあるかどうかを判定する(ステップ5
9)。他の待ち行列のうち待ち行列のCFPが2のデー
タ・エリアには,トラバーサ・スレッド2によって変換
処理が行なわれたプライオリティ2の図形データBの変
換データが既に格納されている。したがって,ステップ
59でYES となるので,トラバーサ・スレッド1はステッ
プ57に戻り,同様に図形データBの変換データを表示装
置16に送り,表示装置16はレンダリング処理を行なう。
トラバーサ・スレッド1は,待ち行列のCFPをインク
リメントする。CFPは3となる。トラバーサ・スレッ
ド1は,表示する変換データがさらに残っているかを判
定する。他の待ち行列はもはや存在しないので,トラバ
ーサ・スレッド1はステップ51に戻る。トラバーサ・ス
レッド1は,トラバース処理を行ない,次の図形データ
の処理,たとえばプライオリティ5の図形データEの処
理に移る。
The traverser thread 1 determines whether there is conversion data in another queue (step 5).
9). The conversion data of the graphic data B of the priority 2 which has been converted by the traverser thread 2 is already stored in the data area of the other queues where the CFP is 2. Therefore, the step
Since the answer in 59 is YES, the traverser thread 1 returns to step 57, similarly, the converted data of the graphic data B is sent to the display device 16, and the display device 16 performs the rendering process.
Traverser thread 1 increments the queue's CFP. The CFP is 3. The traverser thread 1 determines whether there is more conversion data to be displayed. The other queue no longer exists, so traverser thread 1 returns to step 51. The traverser thread 1 performs the traverse processing, and moves to the processing of the next graphic data, for example, the processing of the graphic data E of priority 5.

【0043】トラバーサ・スレッド3は,プライオリテ
ィ3の図形データCの幾何学変換処理を終えると,変換
処理を行なった図形データCのプライオリティと,待ち
行列のCFPとを比較する。CFPは3,プライオリテ
ィも3で等しい。したがって,トラバーサ・スレッド3
は,変換処理した図形データCの変換データを表示装置
16に送り,表示装置16はレンダリング処理を行なう。ト
ラバーサ・スレッド3はCFPをインクリメントする。
CFPは3となる。他の待ち行列は存在しないので,ト
ラバーサ・スレッド3はステップ51に戻り,トラバース
処理に移る。
When the traverser thread 3 finishes the geometric conversion processing of the graphic data C having the priority 3, the traverser thread 3 compares the priority of the converted graphic data C with the CFP of the queue. The CFP is 3, and the priority is 3, which is equal. Therefore, traverser thread 3
Is a display device for displaying the converted data of the converted graphic data C.
Then, the display device 16 performs a rendering process. Traverser Thread 3 increments CFP.
The CFP is 3. Since there are no other queues, the traverser thread 3 returns to step 51 and proceeds to traverse processing.

【0044】以上のようにして,トラバーサ・スレッド
1〜3は全ての図形データの処理を行なう。
As described above, the traverser threads 1 to 3 process all graphic data.

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

【図1】システムの構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a system.

【図2】グラフィックス表示処理の処理概要を示すフロ
ー・チャートである。
FIG. 2 is a flow chart showing a processing outline of graphics display processing.

【図3】メモリの内容を示す図である。FIG. 3 is a diagram showing the contents of a memory.

【図4】図形データの一例を示すテーブルである。FIG. 4 is a table showing an example of graphic data.

【図5】スレッド・ディスパッチ処理の詳細な処理手順
を示すフロー・チャートである。
FIG. 5 is a flow chart showing a detailed processing procedure of thread dispatch processing.

【図6】スレッド・ディスパッチ処理の詳細な処理手順
を示すフロー・チャートである。
FIG. 6 is a flow chart showing a detailed processing procedure of thread dispatch processing.

【図7】トラバーサ・スレッドにおける処理手順を示す
フロー・チャートである。
FIG. 7 is a flow chart showing a processing procedure in a traverser thread.

【図8】(A) ,(B) および(C) はそれぞれ待ち行列の一
例を示す図である。
8A, 8B, and 8C are diagrams each showing an example of a queue.

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

11,12,13,14 CPU 15 メモリ 16 表示装置 11, 12, 13, 14 CPU 15 Memory 16 Display device

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 複数台のCPUを備えたシステムにおい
て,上記複数台のCPUに対応して生成されかつあらか
じめ設定されたプログラムにしたがう処理を行なう複数
のスレッドによって,多数のデータを並列分散処理する
方法であり,上記多数のデータのそれぞれに対応して上
記複数のスレッドのいずれかによって処理されているか
どうかを表わす処理済フラグをあらかじめ設定してお
き,上記スレッドが,上記データの処理済フラグを参照
して上記多数のデータのうち処理されていない未処理デ
ータを選択し,上記スレッドが,選択した上記データの
処理済フラグを処理されていることを表わす状態に変更
し,上記スレッドが,選択した上記データについての処
理を行なう,マルチCPUシステムにおける処理方法。
1. In a system having a plurality of CPUs, a large number of data are processed in parallel and distributed by a plurality of threads that perform processing according to a preset program generated corresponding to the plurality of CPUs. A processed flag indicating whether or not the data is processed by any one of the plurality of threads corresponding to each of the plurality of data is set in advance, and the thread sets the processed flag of the data. The unprocessed data that has not been processed is selected from the above-mentioned large number of data by reference, the thread changes the processed flag of the selected data to a state indicating that it has been processed, and the thread selects A processing method in a multi-CPU system for performing the above-mentioned data processing.
【請求項2】 上記多数のデータのそれぞれにプライオ
リティを示すデータをあらかじめ設定しておき,上記ス
レッドは,未処理データを選択するときに未処理データ
のうち最もプライオリティの高い未処理データを選択す
る,請求項1に記載のマルチCPUシステムにおける処
理方法。
2. The data indicating the priority is set in advance for each of the plurality of data, and the thread selects the unprocessed data with the highest priority among the unprocessed data when selecting the unprocessed data. A processing method in the multi-CPU system according to claim 1.
【請求項3】 複数台のCPUを備え,上記複数台のC
PUに対応して生成されかつあらかじめ設定されたプロ
グラムにしたがう処理を行なう複数のスレッドによっ
て,多数のデータを並列分散処理する装置であり,上記
多数のデータと,それぞれに対応して上記複数のスレッ
ドのいずれかによって処理されているかどうかを表わす
処理済フラグをあらかじめ記憶した記憶手段を備え,上
記各スレッドは,上記データの処理済フラグを参照して
上記多数のデータのうち処理されていない未処理データ
を選択する手段,選択した上記データの処理済フラグを
処理されていることを表わす状態に変更する手段,およ
び選択した上記データについての処理を実行する手段を
有している,マルチCPUシステムにおける処理装置。
3. A plurality of CPUs are provided, and the plurality of Cs are provided.
A device for performing parallel distributed processing of a large number of data by a plurality of threads generated corresponding to a PU and performing processing according to a preset program, and the plurality of data and the plurality of threads corresponding to the respective data. A processing unit that stores in advance a processed flag indicating whether or not it has been processed by any of the above, and each of the threads refers to the processed flag of the above-mentioned data, and has not been processed yet among the large number of data. In a multi-CPU system having means for selecting data, means for changing a processed flag of the selected data to a state indicating that the data has been processed, and means for executing processing for the selected data Processing equipment.
【請求項4】 上記複数のデータのそれぞれにプライオ
リティを示すデータをあらかじめ設定しておき,上記各
スレッドは,未処理データを選択するときに未処理デー
タのうち最もプライオリティの高い未処理データを選択
する手段を備えている,請求項3に記載のマルチCPU
システムにおける処理装置。
4. The data indicating the priority is set in advance for each of the plurality of data, and each thread selects the unprocessed data with the highest priority among the unprocessed data when selecting the unprocessed data. The multi-CPU according to claim 3, further comprising:
The processing unit in the system.
JP35484892A 1992-12-18 1992-12-18 Processing method and its device in multi-cpu system Pending JPH06187312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35484892A JPH06187312A (en) 1992-12-18 1992-12-18 Processing method and its device in multi-cpu system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35484892A JPH06187312A (en) 1992-12-18 1992-12-18 Processing method and its device in multi-cpu system

Publications (1)

Publication Number Publication Date
JPH06187312A true JPH06187312A (en) 1994-07-08

Family

ID=18440321

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35484892A Pending JPH06187312A (en) 1992-12-18 1992-12-18 Processing method and its device in multi-cpu system

Country Status (1)

Country Link
JP (1) JPH06187312A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006155480A (en) * 2004-12-01 2006-06-15 Sony Computer Entertainment Inc Scheduling method, scheduling device and multiprocessor system
US8688958B2 (en) 2009-02-18 2014-04-01 Nec Corporation System for data collection from processing elements in a SIMD processor
US20180246998A1 (en) * 2013-04-22 2018-08-30 Google Inc. Mobile Application Performance Simulation

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006155480A (en) * 2004-12-01 2006-06-15 Sony Computer Entertainment Inc Scheduling method, scheduling device and multiprocessor system
US8688958B2 (en) 2009-02-18 2014-04-01 Nec Corporation System for data collection from processing elements in a SIMD processor
US20180246998A1 (en) * 2013-04-22 2018-08-30 Google Inc. Mobile Application Performance Simulation

Similar Documents

Publication Publication Date Title
KR100733852B1 (en) Computer system
US4553202A (en) User controlled dialog resource switching in a multi-tasking word processor
US5440746A (en) System and method for synchronizing processors in a parallel processing environment
US5666523A (en) Method and system for distributing asynchronous input from a system input queue to reduce context switches
US4725946A (en) P and V instructions for semaphore architecture in a multiprogramming/multiprocessing environment
JP2006524381A (en) Simultaneous access to shared resources
EP1031925B1 (en) Cooperative processing of tasks in multi-threaded computing system
EP0561042B1 (en) Dual process display server
AU603876B2 (en) Multiple i/o bus virtual broadcast of programmed i/o instructions
EP0547991A2 (en) Adaptive method for starting tasks in a multi-tasking operating system
EP0362903A2 (en) A special purpose processor for off-loading many operating system functions in a large data processing system
JPH06187312A (en) Processing method and its device in multi-cpu system
CN111813541B (en) Task scheduling method, device, medium and equipment
JPH05120039A (en) Task scheduling system
JPS58115569A (en) Multiprocessor system
JPH05113894A (en) File resource managing system in virtual computer system
JPH11249917A (en) Parallel computers, their batch processing method, and storage medium
JPH05113893A (en) Volume resource managing system in virtual computer
JPS63147254A (en) System for setting access priority to shared dasd file
JPH01282665A (en) On-line control system
JPS62221041A (en) Dispatch controller in virtual computer system
Jackson An experimental multi-processor architecture for small business applications
JPH04274524A (en) System for controlling inter-process communication
JPH02244228A (en) Job start control method
JPH11161506A (en) Dispatch method for information processor, information processor and storage medium thereof