JPH02242434A - Task scheduling method - Google Patents

Task scheduling method

Info

Publication number
JPH02242434A
JPH02242434A JP6221689A JP6221689A JPH02242434A JP H02242434 A JPH02242434 A JP H02242434A JP 6221689 A JP6221689 A JP 6221689A JP 6221689 A JP6221689 A JP 6221689A JP H02242434 A JPH02242434 A JP H02242434A
Authority
JP
Japan
Prior art keywords
task
processor
processors
scheduling
tasks
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
JP6221689A
Other languages
Japanese (ja)
Inventor
Tadashi Kamiwaki
正 上脇
Shinichiro Yamaguchi
伸一朗 山口
Masahiko Saito
雅彦 齊藤
Yoshiki Kobayashi
芳樹 小林
Tomoaki Nakamura
智明 中村
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP6221689A priority Critical patent/JPH02242434A/en
Priority to DE4007998A priority patent/DE4007998A1/en
Publication of JPH02242434A publication Critical patent/JPH02242434A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To efficiently allocate a processor on a task in a multiprocessor consisting of the processors with different instruction sets by providing a flag representing the kind of the processor capable of executing the task at each task. CONSTITUTION:The processors 1011 and 1012 are the processors of type 0 having the same instruction sets, and the processor 1013 is the processor of type 1 having another instruction set, and the type of the processor can be shown by processor kind identifiers 1021-1023. Feasible/infeasible flags 1071-1073 are provided at unprocessed tasks 1061-1063 in a queue stored in a main memory 104, and the flag at respective bit position corresponds to the kind of the proces sor. The task can be executed by the processor of corresponding kind when the flag is set at 1, and no task can be executed when it is set at 0. Thereby, it is possible to efficiently allocate the processor on the task with the multiprocessor including the processors with different instruction sets.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、マルチプロセッサにおけるタスクのスケジュ
ーリング方法に係わり、特に構成の異なるプロセッサを
含むマルチプロセッサにおけるタスクのスケジューリン
グ方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for scheduling tasks in a multiprocessor, and particularly to a method for scheduling tasks in a multiprocessor including processors with different configurations.

〔従来の技術〕[Conventional technology]

従来マルチプロセッサでは、これを構成する複数のプロ
セッサが、全く同じ構成を、従って同じ命令セラ1へを
持つことを条件としたものが多かった。
Conventional multiprocessors were often conditioned on the condition that a plurality of processors constituting the multiprocessor had exactly the same configuration, and therefore had the same instruction cell 1.

また構成が異なり、従って命令セットの異なるプロセッ
サを接続したマルチプロセッサやマルチコンピュータの
場合には、処理すべきタスクが入る待行列がプロセッサ
ごとに設けられており、タスクの実行に先立ってユーザ
またはO8がそのタスクをどのプロセッサの上で実行す
るか決定し、その決定したプロセッサの待行列にタスク
を入れておく必要があった。
Furthermore, in the case of a multiprocessor or multicomputer in which processors with different configurations and therefore different instruction sets are connected, each processor has a queue in which tasks to be processed are placed. It was necessary for the processor to decide on which processor the task should be executed, and to place the task in the queue of the decided processor.

また、特開昭62−208157には、スケジューリン
グ方法ではないが、一部命令セットが異なる複数の計算
機からなる計算機システムのプログラム実行方法が記載
されている。その方法は、コンパイラがどの計算機の上
ででも実行可能なオブジェクトコードを出力するもので
ある。即ちコンパイラはプログラムを解析して、プロセ
ッサ間で共通の命令で実行できる部分と実行できない部
分に分ける。共通に実行できる部分については単一のオ
ブジェクトコードを出力するが、実行できない部分はプ
ロセッサの種類に対応した複数のオブジェクトコードを
出力する。そして、コンパイラは、実行できない部分の
直前に実行しているプロセッサの種類に応じたオブジェ
クトコードに分岐するためのプログラムを挿入する。
Further, Japanese Patent Laid-Open No. 62-208157 describes a program execution method for a computer system consisting of a plurality of computers having partially different instruction sets, although it is not a scheduling method. In this method, the compiler outputs object code that can be executed on any computer. That is, a compiler analyzes a program and divides it into parts that can be executed by common instructions between processors and parts that cannot. A single object code is output for parts that can be executed in common, but multiple object codes corresponding to the type of processor are output for parts that cannot be executed. Then, the compiler inserts a program for branching to the object code corresponding to the type of processor being executed immediately before the unexecutable portion.

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

上記した従来のマルチプロセッサにおけるタスクのスケ
ジューリング方法あるいはマルチプロセッサ用のプログ
ラムコンパイル方式には以下のような問題がある。
The conventional task scheduling method for multiprocessors or the program compilation method for multiprocessors described above has the following problems.

即ち、同一構成のプロセッサのみでマルチプロセッサを
構成する場合には、ベクトルプロセッサを備えたプロセ
ッサやA I処理用プロセッサなどの一つの機能を強化
したプロセッサをシステム中に加えるときに、一つだけ
のプロセッサを入替え一 ることかできず、全部のプロセッサをそれらのプロセッ
サにしなければならない。
In other words, when configuring a multiprocessor using only processors with the same configuration, when adding a processor with an enhanced function, such as a processor equipped with a vector processor or a processor for AI processing, to the system, only one processor is required. You can only replace one processor and have to make all processors the same.

プロセッサ毎に待行列を持つ方法では、同じ構成のプロ
セッサが複数あるときにプロセッサ間で負荷が偏る可能
性がある。
With the method of having a queue for each processor, when there are multiple processors with the same configuration, there is a possibility that the load will be uneven among the processors.

コンパイラが複数のオブジェクトコードを出力する方法
では、オブジェクトコードが大きくなる欠点とともに、
コンパイラを新しく作り直す必要があるという欠点があ
る。
The method in which the compiler outputs multiple object codes has the disadvantage that the object code becomes large.
The disadvantage is that a new compiler must be created.

本発明の目的は、複数のオブジェクトコードを出力する
コンパイラを作成することなしに、命令セットの一部ま
たは全部が異なるプロセッサよりなるマルチプロセッサ
上で、タスクにプロセッサを効率よく割付けるタスクの
スケジューリング方法を提供することにある。
An object of the present invention is to provide a task scheduling method for efficiently allocating processors to tasks on a multiprocessor in which part or all of the instruction set consists of different processors, without creating a compiler that outputs multiple object codes. Our goal is to provide the following.

本発明の別の目的は、ベクトルプロセッサを持ったプロ
セッサと持たないプロセッサのように、ある処理が速い
プロセッサと遅いプロセッサとを含むマルチプロセッサ
において、そのような処理があるタスクはその処理の速
いプロセッサに優先的に割当てることのできるタスクの
スケジューリング方法を提供することにある。
Another object of the present invention is to provide a multiprocessor in which a certain process includes a fast processor and a slow processor, such as a processor with a vector processor and a processor without a vector processor, in which a task with such a process is performed by the fast processor. The object of the present invention is to provide a method for scheduling tasks that can be assigned preferentially to tasks.

また、本発明の別の目的は、ある処理が速いプロセッサ
にその処理を含むタスクを優先的に割当てるとともに、
ある処理が不可能なプロセッサにはその処理を含むタス
クを割当てないようにするタスクのスケジューリング方
法を提供するにある。
Another object of the present invention is to preferentially allocate a task including a certain process to a processor that is fast;
To provide a task scheduling method that prevents a task including a certain process from being assigned to a processor incapable of the process.

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

上記の目的は、各タスクにそのタスクを実行できるプロ
セッサの種類を示すフラグを設けることにより達成され
、各タスクに、そのタスクを処理できる速度に応じた優
先度をプロセッサの種類ごとに示す優先度テーブルを設
けることにより達成され、また上記優先度に不能値を設
けこの値が指定された種類のプロセッサには当該タスク
の処理が不可能とすることにより達成される。
The above objective is achieved by providing each task with a flag indicating the type of processor on which it can run, and giving each task a priority that indicates the priority of each type of processor according to the speed at which it can process the task. This is achieved by providing a table, and by providing a disable value for the priority and making it impossible for a processor of the specified type to process the task.

〔作 用〕[For production]

各タスクに設けるフラグは、システムに含まれるプロセ
ッサの種類の数だけのフラグ(1ビツト)から成る。各
フラグは、各プロセッサの種類に対応しており、そのタ
スクがその種類のプロセッサで実行可能かどうかを表す
。実行可能な状態にあるタスクは、どのプロセッサから
もアクセス可能な待行列に繋がれている。アイドルとな
ったプロセッサやりスケジューリングを行うプロセッサ
は、各自、その待行列の先頭からタスクのフラグを順番
に見ていき、自分のプロセッサで実行可能なタスクがあ
ったら、取り出してきて実行する。これにより、同一種
類のプロセッサ間では負荷の片よりか防がれる。
The flags provided for each task consist of as many flags (1 bit) as there are types of processors included in the system. Each flag corresponds to each type of processor and indicates whether the task can be executed by that type of processor. Tasks that are ready to be executed are placed in a queue that can be accessed by any processor. Each processor that performs idle processor scheduling sequentially checks the flags of tasks starting from the head of its queue, and if it finds a task that can be executed by its own processor, it picks it up and executes it. This prevents load sharing between processors of the same type.

また、各タスクに設ける優先度情報テーブルは、システ
ムに含まれるプロセッサの種類の数の大きさの整数配列
とする。各配列要素は、各プロセッサの種類に対応して
おり、そのタスクがその種類のプロセッサに対して持つ
優先度を示し、そのタスクを高速に実行できるプロセッ
サについては、高い優先度を入れておく。優先度を最低
にしたときはその種類のプロセッサでは、そのタスクが
実行不可能であることを表すとする。以上のようなテー
ブルを備えた各タスクは、実行可能な状態にあるとき、
どのプロセッサからもアクセス可能な待行列に繋がれて
いる。アイドルとなったプロセッサやスケジューリング
を行うプロセッサは、各自、待行列のタスクを見ていき
、自分のプロセッサで実行可能で、優先度が最も高いタ
スクを取り出してきて実行する。
Furthermore, the priority information table provided for each task is an integer array of the size of the number of types of processors included in the system. Each array element corresponds to each type of processor and indicates the priority that the task has with respect to that type of processor.A processor that can execute the task at high speed is given a high priority. When the priority is set to the lowest level, it means that the task cannot be executed by that type of processor. When each task with the above table is ready to execute,
It is connected to a queue that can be accessed by any processor. Each processor that has become idle or that performs scheduling looks at the tasks in its queue, selects and executes the task that can be executed by its own processor and has the highest priority.

この方法により、命令セットが違うプロセッサやある処
理が特別に速いプロセッサを含むマルチプロセッサで効
率良く、タスクにプロセッサを割振ることができる。
This method makes it possible to efficiently allocate processors to tasks using multiple processors, including processors with different instruction sets and processors that are particularly fast at certain processes.

〔実施例〕〔Example〕

以下、本発明の実施例について図面を参照して説明する
。第1図は本発明の一実施例を示すもので、プロセッサ
1011〜1013は、全て共有バス103を通してメ
インメモリ104にアクセス可能である。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows one embodiment of the present invention, in which processors 1011-1013 can all access main memory 104 through shared bus 103. FIG.

このうちプロセッサ1.03.1.10F、2は同一の
命令セットを持つタイプ0のプロセッサ、プロセッサ】
013は別の命令セットを持つタイプ1のプロセッサと
する。このプロセッサのタイプはプロセッサ種類識別子
1021〜1023で示されている。
Of these, processors 1.03.1.10F and 2 are type 0 processors with the same instruction set, processor]
013 is a type 1 processor with a different instruction set. The type of this processor is indicated by processor type identifiers 1021 to 1023.

メインメモリ104には未処理タスク1061〜1o6
3の待行列が記憶されている。この待行列は各タスク同
志を各タスクがもつポインタ1561.1562で繋ぐ
ことにより形成されている。待行列の先頭はヘッダ10
5である。タスク1064〜1066は、現在プロセッ
サ1011〜1013で実行されている。待行列中のタ
スク1061〜1063には実行可否フラグ1071〜
1073が設けられており、各ビット位置のフラグがプ
ロセッサ種類に対応している。そしてフラグが″]ノ′
のときは対応する種類のプロセッサでそのタスクを実行
でき、00″のときは実行できない。例えば実行可否フ
ラグ1071は、タスク】061をタイプ2とタイプ1
のプロセッサでは実行できるが、タイプ0のプロセッサ
では実行できないことを示している。
Unprocessed tasks 1061 to 106 are stored in the main memory 104.
3 queues are stored. This queue is formed by connecting each task with pointers 1561 and 1562 that each task has. Header 10 is at the beginning of the queue
It is 5. Tasks 1064-1066 are currently being executed on processors 1011-1013. Tasks 1061 to 1063 in the queue have executable flags 1071 to 1063.
1073 are provided, and the flag at each bit position corresponds to the processor type. And the flag is ``]ノ'
When , the task can be executed by the corresponding type of processor, and when it is 00'', it cannot be executed.For example, the executable flag 1071 indicates whether task 061 is type 2 or type 1.
This indicates that it can be executed on a type 0 processor, but cannot be executed on a type 0 processor.

第2図は、プロセッサ種類識別子1021〜1023の
内容を示しており、3ビツトより成っていて1ビツトの
みが1”になっている。このプロセッサ種類識別子10
21〜1023は、実行可否フラグ1071〜J073
との論理的な積和をとることにより、その種類のプロセ
ッサでそのタスクを実行できるか否かを調べられるよう
に構成されている。
FIG. 2 shows the contents of the processor type identifiers 1021 to 1023, which consist of 3 bits, of which only 1 bit is 1".
21-1023 are executable flags 1071-J073
By calculating the logical sum of products, it is possible to check whether the task can be executed by that type of processor.

第3図はスケジューラプログラム(以下では単にスケジ
ューラとも呼ぶ)のフローチャートを示す。このスケジ
ューラは、各プロセッサl011〜1013に設けられ
ており、当該プロセッサが実行していたタスクが終了し
たときと、スケジュールのためのタイマ割込みが入った
ときに起動される。
FIG. 3 shows a flowchart of a scheduler program (hereinafter simply referred to as a scheduler). This scheduler is provided in each of the processors 1011 to 1013, and is activated when the task being executed by the processor ends and when a timer interrupt for scheduling occurs.

タイマ割込みは、各プロセッサに一定時間間隔で入る。Timer interrupts enter each processor at regular time intervals.

今プロセッサ1011にタイマ割込みが入って、スケジ
ューラが起動されたとすると、まずステップ201で自
プロセッサの種類を示す識別子1021を読み込む。読
み込んだ値は“100 ”である。次にステップ202
で待行列のヘッダ105の指すタスク1061を見る。
Assuming that a timer interrupt occurs in the processor 1011 and the scheduler is activated, first, in step 201, an identifier 1021 indicating the type of the own processor is read. The read value is "100". Next step 202
The task 1061 pointed to by the header 105 of the queue is seen.

ステップ203では待行列にタスクがないか調べ、未処
理のタスクがなかったときはアイドル処理のステップ2
04へ移る。第1図ではタスク1061が有るからステ
ップ205でタスクの実行可否フラグとプロセッサ種類
識別子の論理的な積和Sを求める。これは両者の各ビッ
トごとのアンドをとり、それらの結果をオアしたもので
、どこかのビット同志のアンドが111 IIになれば
それは当該タスクを当該プロセッサで実行できることを
示す。今の場合、実行可否フラグ1071は” 110
 ”であり、プロセッサ種類識別子1021は”001
”だったので、各ビットごとのアンドは全て“0”従っ
てS−Oで、プロセッサ1011ではタスク1061は
実行できないことがわかる。そこでステップ207へ進
み、待行列の次のタスクを見る。続くステップ203で
タスクがないか調べ、タスク1062が見つかるとステ
ップ205で実行可否フラグ1072とプロセッサ種類
識別子1021の論理的積和Sを求める。今度は” O
O1”と” OO1”なので各ビットのアンドは“OI
I  II O”1″となり、そのオアはII 111
つまり実行可能なことがわかる。それでステップ208
でタスク1062を待行列から取り除く。このときプロ
セッサ1011で実行中であったタスク(タイマ割込み
で中断された)はステップ209で待行列の後端に接続
される。これら待行列のタスクの出2人はポインタ変更
により行われる。
In step 203, it is checked whether there are any tasks in the queue, and if there are no unprocessed tasks, step 2 of idle processing
Move to 04. In FIG. 1, there is a task 1061, so in step 205, the logical sum of products S of the task executable flag and the processor type identifier is calculated. This is done by ANDing each bit of both and ORing the results. If the AND of any bits becomes 111 II, this indicates that the task can be executed by the processor. In this case, the executable flag 1071 is "110"
", and the processor type identifier 1021 is "001
”, therefore, the AND for each bit is all “0”, so it is S-O, which means that the processor 1011 cannot execute the task 1061.Then, the process advances to step 207 and looks at the next task in the queue.Continuing steps In step 203, it is checked whether there is any task, and when task 1062 is found, in step 205, the logical sum of products S of the executable flag 1072 and the processor type identifier 1021 is calculated.
Since “O1” and “OO1”, the AND of each bit is “OI”.
I II O"1", and the or is II 111
This means that it is possible to implement it. So step 208
removes task 1062 from the queue. The task being executed by processor 1011 at this time (interrupted by a timer interrupt) is connected to the rear end of the queue in step 209. The exit of tasks from these queues is done by changing pointers.

そしてステップ209で待行列から取り除いたタスク1
062を実行する。
Task 1 is then removed from the queue in step 209.
Execute 062.

第4図は、各プロセッサによるタスクの実行例をタイム
チャートで示したものである。同図ではプロセッサ10
11〜1013による処理のタイムチャートがPO〜P
2で示されており、タイマ割込み301〜309および
タスクの終了350によりスケジューラプログラムが動
作し、タスク360〜370が各プロセッサ上で実行さ
れている様子を示している。即ち、最初はプロセッサ1
011〜1013は、それぞれタスクT3.T4.T5
を実行していたとする。プロセッサ1011にタイマ割
込み301が入ると、第3図で説明したようにこのプロ
セッサにはタスクT1がスケジュールされる。次にプロ
セッサ1012にタイマ割込み304が入ってタスクT
2が実行され、プロセッサ10】3にタイマ割込み30
7が入り、タスクTOが実行される。プロセッサ101
2では、実行されていたタスクT2の終了350により
、タスクT3が再び実行される。以下、同様に処理が続
く。
FIG. 4 is a time chart showing an example of task execution by each processor. In the figure, processor 10
The time chart of processing by 11 to 1013 is PO to P
2, the scheduler program is operated by timer interrupts 301 to 309 and task termination 350, and tasks 360 to 370 are executed on each processor. That is, initially processor 1
011 to 1013 are task T3. T4. T5
Suppose you are running When timer interrupt 301 occurs in processor 1011, task T1 is scheduled for this processor as explained in FIG. Next, a timer interrupt 304 enters the processor 1012 and the task T
2 is executed and a timer interrupt 30 is sent to the processor 10]3.
7 is entered and task TO is executed. Processor 101
2, task T3 is executed again due to termination 350 of task T2 that was being executed. Processing continues in the same manner.

第5図は、第1図のタスク1061〜1066を実現す
るだめのタスクテーブルを表す。タスク識別子150は
タスクに付けたシリアル番号であり、信号をタスクに送
るときなどにタスクを識別するのに使われる。タスクの
状態151はタスクが現在どのような状態にあるかを表
しており、以下のようなものがある。
FIG. 5 shows a task table for implementing tasks 1061 to 1066 in FIG. 1. The task identifier 150 is a serial number attached to a task, and is used to identify the task when sending a signal to the task. The task state 151 represents the current state of the task, and includes the following states.

User Running・・・・プロセッサ上でタス
クのユーザプログラムを実行している状態。
User Running: A state where the user program of the task is running on the processor.

Kernel Running・・・・プロセッサ上で
ユーザプログラム実行中にシステムコールを行ったり、
割込みが入ったりしたためシステムプログラムを実行し
ている状態。
Kernel Running...Make a system call while a user program is running on the processor,
A state in which a system program is being executed due to an interrupt.

Ready to Run・・・・タスクは実行できる
状態になっているが、まだ、プロセッサが割当てられて
いない。タスクは待行列に繋がれている。
Ready to Run: The task is ready to be executed, but no processor has been assigned yet. Tasks are queued.

5leep・・・・・Iloの応答待ちなど、ある事象
が起るのを待っている状態。
5leep: Waiting for a certain event to occur, such as waiting for Ilo's response.

優先度152はタスクが実行される優先度を表す数値で
、この数値が大きいほど先にプロセッサで実行される。
Priority 152 is a numerical value representing the priority at which a task is executed; the larger this numerical value is, the earlier the task is executed by the processor.

プロセッサが割り当てられるのを待っているタスクの待
行列は、この優先度が大きい順に並べられる。
The queue of tasks waiting to be assigned a processor is sorted in descending order of priority.

実行可否フラグ107は、第1図のフラグ1071〜1
073と同じものであり、本発明の実現のために設けら
れた。これは当該タスクがどの種類のプロセッサで実行
できるかの情報が入る。シグナル・フィールド153は
、タスク間でタスクの中断、終了。
The execution possibility flag 107 is the flag 1071 to 1 in FIG.
It is the same as 073 and was provided for realizing the present invention. This contains information about what type of processor can execute the task. The signal field 153 indicates interruption and termination of tasks between tasks.

エラーなどの情報を送るシグナルが入るフィールドであ
る。タイマー108は、タスクの実行時間、システムの
実行時間などの時間の情報が入るフィールドである。リ
ージョン・テーブル154は、タスクで使われるプログ
ラムやデータが記憶されているリージョンのページテー
ブルを指すポインタとリージョンの大きさの情報が入っ
ている。レジスタ退避領域155には、タスクがタイマ
ー割込みにより中断されたときなどに、中断される前の
タスクのレジスタの情報を退避する領域である。中断さ
れたタスクがスケジュールにより再開されるときには、
ここに退避してあったレジスタの情報をもとにタスクを
再開する。ポインタ156.1.57は第1図で述べた
タスクを待行列に繋ぐときのポインタである。
This field contains signals that send information such as errors. The timer 108 is a field in which time information such as task execution time and system execution time is entered. The region table 154 contains a pointer pointing to a page table of a region in which programs and data used in a task are stored, and information about the size of the region. The register save area 155 is an area for saving register information of the task before the task is interrupted when the task is interrupted by a timer interrupt. When a suspended task is resumed by a schedule,
The task is restarted based on the information in the registers saved here. Pointer 156.1.57 is a pointer used to connect the task described in FIG. 1 to a queue.

以上に説明した第1図の実施例では、スケジューラプロ
グラムは各プロセッサに設けられており、各プロセッサ
は自分のスケジューリングを自分で行うものとしたが、
これを負荷の最も軽い状態にあるプロセッサでスケジュ
ールするようにすることもできる。第6図はそのように
した実施例を示している。これは第1図の構成と殆ど同
じであるが、異なるのはシステム中のプロセッサの種類
を記憶した表110をメインメモリに記憶している点で
ある。表110へは、システム立ち上げ時に各プロセッ
サが自分のプロセッサ種類識別子1021〜1023を
読み出して表110に書き込み、これによってスケジュ
ーラ109は今スケジュールしようとしているプロセッ
サの種類を識別する。
In the embodiment shown in FIG. 1 described above, the scheduler program is provided in each processor, and each processor performs its own scheduling.
This can also be scheduled on the least loaded processor. FIG. 6 shows such an embodiment. This configuration is almost the same as the configuration shown in FIG. 1, but the difference is that a table 110 storing the types of processors in the system is stored in the main memory. When starting up the system, each processor reads out its own processor type identifiers 1021 to 1023 and writes them into the table 110, thereby allowing the scheduler 109 to identify the type of processor that is currently being scheduled.

第7図はこの実施例におけるスケジューラプログラムの
フローチャートであり、スケジュールのためのタイマ割
込みが入ったときにいずれか負荷の低いプロセッサで実
行される。第6図の状態、即ちプロセッサ10】2にタ
イマ割込みが入って、スケジューラプログラムが実行さ
れたとすると、まずステップ701で待行列のヘッダ1
.05の指すタスク】061を見る。ステップ702で
、この見たところにタスクがないか調べる。未処理のタ
スクがなかったときは、スケジューラプログラムは何も
せずに終了するが、今はタスク1061が有ったのでス
テップ703へ進む。ステップ703では、タスクの実
行可否フラグで実行可能となっているプロセッサの内(
これをメインメモリ104の表110を用いて調べる)
、アイドルのプロセッサがあればそのプロセッサを選び
、なければ現在処理しているタスクの処理時間を第5図
のタイマ108より調べ、それが最も長いプロセッサを
選ぶ。第6図では実行可否フラグが” 1 ] 0 ”
なので実行可能なプロセッサの梅類はタイプ1とタイプ
2である。これに該当するのはプロセッサ1.013t
、かないのでこのプロセッサがここでは選択される。ス
テップ704では選択したプロセッサが実行していたタ
スクを中断し、その状態をセーブする。選択されたプロ
セッサ1o13ではタスクT5が実行されていたから、
このタスクを中断し、中断したときのレジスタの内容を
タスクT5のタスクテーブル内のレジスタ退避領域15
5に退避する。ステップ705では、中断したタスクT
5を待行列に入れる。入れる場所はタスクテーブルに書
かれている優先順位152が大きい順に並ぶように挿入
する。最後にステップ706で選択したタスク1061
 (T6)を待行列より取り出して、選択したプロセッ
サ1.013で実行させる。
FIG. 7 is a flowchart of the scheduler program in this embodiment, which is executed by any processor with a low load when a timer interrupt for scheduling occurs. In the state shown in FIG. 6, that is, when a timer interrupt occurs in the processor 10]2 and the scheduler program is executed, first, in step 701, the header 1 of the queue is
.. [Task pointed to by 05] Look at 061. In step 702, a check is made to see if there are any tasks in this visible area. If there are no unprocessed tasks, the scheduler program ends without doing anything, but now that there is task 1061, the process proceeds to step 703. In step 703, among the processors that are executable according to the task executable flag (
Check this using table 110 in main memory 104)
, if there is an idle processor, select that processor; if not, check the processing time of the task currently being processed using the timer 108 in FIG. 5, and select the processor with the longest time. In Figure 6, the executable flag is “1]0”
Therefore, the types of processors that can be executed are type 1 and type 2. This applies to processor 1.013t
, so this processor is selected here. In step 704, the task being executed by the selected processor is interrupted and its state is saved. Since task T5 was being executed on the selected processor 1o13,
This task is interrupted, and the contents of the register at the time of interruption are stored in the register save area 15 in the task table of task T5.
Evacuate to 5. In step 705, the interrupted task T
Queue 5. They are inserted in the order of priority 152 written in the task table. Finally, the task 1061 selected in step 706
(T6) is taken out of the queue and executed on the selected processor 1.013.

第8図は、各プロセッサによるタスクの実行例を示すタ
イムチャートで示したものである。プロセッサ1011
〜1013による処理のタイムチャートがPO〜P2で
示されており、スケジューラプログラムSの終了330
〜332の時にコンテキストスイッチ340〜342に
よって実行タスクが切り換えられる。
FIG. 8 is a time chart showing an example of task execution by each processor. Processor 1011
A time chart of the processing in ~1013 is shown as PO~P2, and the end of the scheduler program S 330
~332, execution tasks are switched by context switches 340-342.

最初、プロセッサ1011〜1013はそれぞれタスク
T3、スケジューラプログラムS、タスクT5をそれぞ
れ実行していたとする。第7図を用いて説明したように
、スケジューラSはプロセッサ■013で実行していた
タスクT5をコンテキストスイッチ342により中断さ
せ、タスクTOを実行させる。スケジューラSが終了す
るとプロセッサ1012は以前に実行していたタスクT
4の実行に戻る。一定時間が過ぎると再びタイマ割込み
310が入り、スケジューラSが実行される。このスケ
ジューラは、第6図のタスクT1を待行列より取り出し
てくる。
Initially, it is assumed that the processors 1011 to 1013 are respectively executing task T3, scheduler program S, and task T5. As explained using FIG. 7, the scheduler S interrupts the task T5 being executed by the processor 2013 using the context switch 342, and causes the task TO to be executed. When the scheduler S terminates, the processor 1012 executes the previously executed task T.
Return to execution of step 4. After a certain period of time has elapsed, a timer interrupt 310 is generated again, and the scheduler S is executed. This scheduler takes out task T1 of FIG. 6 from the queue.

タスクT1の実行可否フラグ1072は“001”なの
でタイプOのプロセッサで実行できる。これはプロセッ
サ1011,1.012であるが、どちらのプロセッサ
もタスクを実行中なので現在実行しているタスクの実行
時間の長い方のプロセッサを選択する。
Since the executable flag 1072 of task T1 is "001", it can be executed by a type O processor. These are processors 1011 and 1.012, but since both processors are currently executing a task, the processor with the longer execution time of the currently executing task is selected.

第8図ではプロセッサ1011の方が長かったとして、
このプロセッサ1011でタスクTIを実行させている
。以下同様に一定時間間隔でタイマ割込みにより、いず
れかのプロセッサでスケジューラが実行され、待行列の
タスクがスケジュールされていく。
In FIG. 8, assuming that processor 1011 is longer,
This processor 1011 executes task TI. Similarly, the scheduler is executed in one of the processors by a timer interrupt at fixed time intervals, and the tasks in the queue are scheduled.

第9図は本発明の別の実施例を示す図である。FIG. 9 is a diagram showing another embodiment of the present invention.

本実施例では各プロセッサ1011〜1013は、その
識別子1021〜1023に示されているように、構成
が異なっており、命令セットが一部異なっている。メイ
ンメモリ104内の待行列に繋がれたタスク1061〜
1063の各々には、各種類のプロセッサがタスクに対
してどのような優先度を持つかを記憶したテーブル10
81〜1083が設けられている。テーブル1081の
最初の行は、プロセッサ種類識別子001を持つタイプ
0のプロセッサがタスク1061に対して0の優先度を
持っていること、すなわち、タイプ0のプロセッサは、
このタスクを実行できないことを表している。以下の行
はタイプ]−のプロセッサが10の優先度をもち、タイ
プ2のプロセッサは20の優先度を持つことを表す。
In this embodiment, the processors 1011 to 1013 have different configurations and partially different instruction sets, as indicated by their identifiers 1021 to 1023. Tasks 1061 to 1061 queued in the main memory 104
1063 each includes a table 10 that stores what priority each type of processor has for tasks.
81 to 1083 are provided. The first row of table 1081 indicates that a type 0 processor with processor type identifier 001 has a priority of 0 for task 1061, i.e., a type 0 processor has
Indicates that this task cannot be performed. The following line represents that a processor of type ]- has a priority of 10, and a processor of type 2 has a priority of 20.

第10図は第9図の実施例で使用するスケジューラプロ
グラムのフローチャートである。このスケジュールプロ
グラムは第3図のスケジューラプログラムと同様に、実
行していたタスクが終了したときと、スケジュールのた
めのタイマー割込みが入ったときに実行される。タイマ
ー割込みは、各プロセッサに一定時間間隔で入る。第9
図の状態でプロセッサ1013にタイマー割込みが入っ
て、スケジューラプログラムが実行される場合を説明す
る。まず、ステップ1001で自分のプロセッサのプロ
セッサ種類識別子1021を読込む。読込んだ値は01
0である。次にステップ1002で待行列のへラダ10
5にタスクが接続されているか調べている。タスクが接
続されていない場合は、処理すべきタスクが無いことを
示しているのでアイ1くル処理1003を行う。ここで
はタスク1061が接続されているのでYeSの方に進
み、ステップ1004で待行列に接続されているタスク
のうち、プロセッサ種類識別子に対応した優先度が最大
のタスクを選択する。第9図ではタスク1061〜10
63が待行列に接続されており、プロセッサ種類識別子
010に対応した優先度は、それぞれ10.0.20で
ある。よって、優先度20を持つタスク1063が選択
される。選択されたタスクの優先度は0ではないので、
ステップ1005からステップ1006へ進む(もし1
選択されたタスクの優先度がOだった場合は、自プロセ
ッサの種類では実行できるタスクがないということなの
で、アイドル処理1003を行う)。ステップ1006
ではタスク1063を待行列から取り除く。即ちポイン
タ1562をなくする。最後にステップto 07でタ
スク1063を実行する。
FIG. 10 is a flowchart of the scheduler program used in the embodiment of FIG. Similar to the scheduler program shown in FIG. 3, this schedule program is executed when the task being executed ends and when a timer interrupt for scheduling occurs. Timer interrupts enter each processor at regular time intervals. 9th
A case will be described in which a timer interrupt is generated in the processor 1013 in the state shown in the figure, and the scheduler program is executed. First, in step 1001, the processor type identifier 1021 of its own processor is read. The read value is 01
It is 0. Next, in step 1002, the Helada 10 in the queue is
Checking whether a task is connected to 5. If no task is connected, this indicates that there is no task to be processed, so the idle processing 1003 is performed. Here, since task 1061 is connected, the process advances to Yes and in step 1004, the task with the highest priority corresponding to the processor type identifier is selected from among the tasks connected to the queue. In Figure 9, tasks 1061 to 10
63 are connected to the queue, and the priorities corresponding to the processor type identifier 010 are 10.0.20, respectively. Therefore, task 1063 with priority 20 is selected. Since the priority of the selected task is not 0,
Proceed from step 1005 to step 1006 (if 1
If the priority of the selected task is O, this means that there is no task that can be executed by the type of the current processor, so idle processing 1003 is performed). Step 1006
Now remove task 1063 from the queue. That is, pointer 1562 is eliminated. Finally, in step to 07, task 1063 is executed.

第1j図は、第9図の各タスクを実現するためのタスク
テーブル106を示す。第5図のテーブルと比較して異
なるのは、第5図の実行可否フラグ107がなくなり、
第5図の優先度152がプロセッサ種類ごとの優先度1
58になった以外は同じである。
FIG. 1j shows a task table 106 for implementing each task in FIG. 9. What is different from the table in FIG. 5 is that the executable flag 107 in FIG. 5 is removed.
Priority 152 in Figure 5 is priority 1 for each processor type.
It is the same except that it is now 58.

実行可否フラグで表現していたプロセッサの種類ごとに
よるタスク実行の可否は、優先度158が0か否かで表
現している。
The feasibility of executing a task for each type of processor, which was expressed by the execution capability flag, is expressed by whether the priority level 158 is 0 or not.

第12図は本発明の別の実施例を示す図である。FIG. 12 is a diagram showing another embodiment of the present invention.

第9図の実施例では、各プロセッサがスケジューラプロ
グラムを持ち、自プロセッサのスケジューリングを行う
としたが、本実施例ではプロセッサの種類を記憶した表
110をメインメモ1月04に記憶しておき、これを用
いていずれかのプロセッサがそのとき必要なスケジュー
リングを行う。このため、システム立ち上げ時に各プロ
セッサが自分のプロセッサ種類識別子1021〜102
3を読み出して表110に書き込んでおく。
In the embodiment shown in FIG. 9, each processor has a scheduler program and schedules its own processor, but in this embodiment, the table 110 storing the types of processors is stored in the main memo January 04. Using this, one of the processors performs the necessary scheduling at that time. Therefore, when starting up the system, each processor enters its own processor type identifier 1021 to 102.
3 is read out and written in table 110.

第13図は本実施例におけるスケジューラのフローチャ
ートを示す。スケジューラプログラムは、スケジュール
のためのタイマー割込みが入ったときにいずれか負荷の
低いプロセッサで実行される。
FIG. 13 shows a flowchart of the scheduler in this embodiment. The scheduler program is executed on any processor with a low load when a timer interrupt for scheduling occurs.

そこで、第12図のように、プロセッサ1011にタイ
マー割込みが入って、ここでスケジューラプログラム1
09が実行された場合を説明する。まず、ステップ13
0Iで待行列のヘッダ1.05の指すタスク1061を
見る。ステップ1302でタスクがないか調べ、未処理
のタスクがなかったときは、スケジューラプログラムは
なにもせずに終了する。ここでは、タスク1061が有
ったのでステップ13o3へ進み、タスク106Iの優
先度テーブル1081を見て、優先度が最も高くなって
いるプロセッサ種類を選択する。
Therefore, as shown in FIG. 12, a timer interrupt is generated in the processor 1011, and the scheduler program 1
The case where 09 is executed will be explained. First, step 13
At 0I, we look at the task 1061 pointed to by queue header 1.05. In step 1302, it is checked whether there are any tasks, and if there are no unprocessed tasks, the scheduler program ends without doing anything. Here, since there is a task 1061, the process advances to step 13o3, looks at the priority table 1081 of the task 106I, and selects the processor type with the highest priority.

ここでは優先度20をもつプロセッサ種類識別子100
(タイプ2)のプロセッサが選択される。ステップ13
04では選択されたプロセッサ種類のプロセッサを表1
10より調べ、プロセッサ1012がその種類のプロセ
ッサであることがわかる。ここではその種類のプロセッ
サが1つしがながったが、複数あったときは現在そのプ
ロセッサが実行しているタスクの実行時間が最も長いプ
ロセッサを選択する。ステップ1305では選択したプ
ロセッサが実行していたタスクを中断し、その状態をセ
ーブする。選択されたプロセッサ1012ではタスクT
4が実行されているから、このタスクを中断し、中断し
たときのレジスタの内容をタスク1065 (T4)の
タスクテーブルのレジスタ退避領域155 (第11図
)に退避する。ステップ1306では、中断したタスク
T4を待行列の最後に入れる。最後にステップ1307
で選択したタスク1061を待行列より取り出して、選
択したプロセッサ1012で実行させる。
Here, processor type identifier 100 with priority 20
(Type 2) processor is selected. Step 13
Table 1 shows the selected processor types in 04.
10, it is found that processor 1012 is that type of processor. Here, only one processor of that type is selected, but if there are multiple processors, the processor that takes the longest to execute the task currently being executed by that processor is selected. In step 1305, the task being executed by the selected processor is interrupted and its state is saved. The selected processor 1012 performs task T
4 is being executed, this task is interrupted, and the contents of the register at the time of interruption are saved in the register save area 155 (FIG. 11) of the task table of task 1065 (T4). In step 1306, the interrupted task T4 is placed at the end of the queue. Finally step 1307
The task 1061 selected in is taken out from the queue and executed by the selected processor 1012.

第14図は本発明の別の実施例を示す図である。FIG. 14 is a diagram showing another embodiment of the present invention.

本実施例では3個のプロセッサ1011〜1013がネ
ットワーク300に接続され、各々はローカルメモリ3
101〜3103を有している。第1図、第6図、第9
図、第12図の実施例では、各プロセッサ全てからアク
セス可能なメインメモリ104に待行列を記憶させてい
たが、本実施例では待行列はマスターとなるプロセッサ
1011のローカルメモリ3101に記憶されている。
In this embodiment, three processors 1011 to 1013 are connected to a network 300, and each processor has a local memory 3.
101 to 3103. Figure 1, Figure 6, Figure 9
In the embodiments shown in FIGS. 10 and 12, the queue is stored in the main memory 104 that can be accessed by all processors, but in this embodiment, the queue is stored in the local memory 3101 of the processor 1011 that is the master. There is.

このプロセッサ1011以外のプロセッサがスケジュー
リングのために待行列にアクセスする必要があるときは
、ネットワーク300とプロセッサ10月を通してロー
カルメモリ3101にアクセスする。実行可能か否か、
および優先度に基づくスケジューリングの方法は既に述
べた実施例と同じである。
When a processor other than processor 1011 needs to access the queue for scheduling, it accesses local memory 3101 through network 300 and processor 101. whether it is practicable or not;
The priority-based scheduling method is the same as in the previously described embodiments.

第15図は本発明の別の実施例を示す図である。FIG. 15 is a diagram showing another embodiment of the present invention.

本実施例は、第14図の実施例の変形例であり、マスタ
ーとなるプロセッサがなく、すべてのローカルメモリに
同一の待行列が記憶されている。即ち各ローカルメモリ
3101〜3103のヘッダ1051〜1053には、
同一のタスク1061.1062が繋がれており、各プ
ロセッサは、自分のローカルメモリの待行列を見てスケ
ジューリングする。待行列の更新は、他の全てのプロセ
ッサに許可を得てから、自分のローカルメモリ内で行う
とともに、各自のローカルメモリでも更新するよう、他
プロセッサに指示するメツセージをネットワーク300
に放送する。
This embodiment is a modification of the embodiment shown in FIG. 14, in which there is no master processor and the same queue is stored in all local memories. That is, in the headers 1051 to 1053 of each local memory 3101 to 3103,
Identical tasks 1061 and 1062 are connected, and each processor schedules tasks by looking at its own local memory queue. The queue is updated in its own local memory after obtaining permission from all other processors, and a message is sent to the network 300 instructing other processors to update their local memory as well.
Broadcast on.

第16図は、本発明の別の実施例を示す図であり、第1
5図の実施例の各ローカルメモリ3101〜3103を
1つの仮想共有メモリ320としてアクセスする構成と
したものである。どのプロセッサからでも任意のローカ
ルメモリへアクセスでき、スケジューリングに用いる待
行列もこの仮想共有メモリに記憶させる。
FIG. 16 is a diagram showing another embodiment of the present invention.
This configuration is such that each of the local memories 3101 to 3103 in the embodiment shown in FIG. 5 is accessed as one virtual shared memory 320. Any local memory can be accessed from any processor, and the queue used for scheduling is also stored in this virtual shared memory.

第17図は仮想共有メモリ320の論理アドレスと物理
アドレスのマツピングの例を示す。仮想共有メモリの論
理アドレス空間500の各アドレス領域がローカルメモ
リ3101〜3103の物理アドレス空間5101〜5
103に対応づけられる。この対応づけを行うためのア
ドレス変換テーブルが第8図に示されており、例えばあ
るプロセッサが論理アドレスOをもつページをアクセス
したとする。このページのプロセッサ番号IDOが自プ
ロセッサの番号であれば、自分のローカルメモリ内の物
理アドレス0のページより読み出す。プロセッサ番号が
異なる場合は、アクセスしたプロセッサは1番号IDO
をもつプロセッサに物理アドレス0のページを転送する
ように、ネットワーク300を通してメツセージを送る
。メツセージを受けたプロセッサは要求されたページを
メツセージにして要求元に送る。この実施例においても
、タスクごとの実行可否あるいは優先度にもとづく制御
は先の実施例と同様である。
FIG. 17 shows an example of mapping of logical addresses and physical addresses of the virtual shared memory 320. Each address area of the logical address space 500 of the virtual shared memory corresponds to the physical address spaces 5101 to 5 of the local memories 3101 to 3103.
103. An address conversion table for making this association is shown in FIG. 8. For example, suppose that a certain processor accesses a page having a logical address O. If the processor number IDO of this page is the number of the own processor, the page is read from the page of physical address 0 in the own local memory. If the processor numbers are different, the accessed processor is number 1 IDO
sends a message through network 300 to transfer the page at physical address 0 to the processor with physical address 0. The processor that receives the message converts the requested page into a message and sends it to the requester. In this embodiment as well, the control based on whether or not each task can be executed or the priority level is the same as in the previous embodiment.

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

本発明によれば、アーキテクチャが異なり、命令セット
も一部異なるプロセッサよりなるマルチプロセッサがあ
るとき、ユーザは、タスクをどのプロセッサで実行させ
るかを意識する必要がないのでタスクの管理効率が大幅
に向上する。
According to the present invention, when there is a multiprocessor consisting of processors with different architectures and partly different instruction sets, the user does not need to be aware of which processor executes a task, which greatly improves task management efficiency. improves.

また、本発明によれば、命令セットは共通であるが、ベ
クトルプロセッサなどにより、ある種の処理が強化しで
あるプロセッサを含むマルチプロセッサで、タスクの処
理内容により最適なプロセッサを割当てるスケジューリ
ングが提供されるのでシステムのスループットが向上す
る。
Further, according to the present invention, scheduling is provided that allocates an optimal processor depending on the processing content of a task in a multiprocessor including processors that have a common instruction set but are enhanced with certain types of processing such as vector processors. system throughput is improved.

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

第1図は本発明の一実施例を示す図、第2図はシステム
を構成するプロセッサの種類とプロセッサ種類識別子の
対応を示す図、第3図は第1図の実施例で用いるスケジ
ューラのフローチャート、第4図は第1図の実施例の動
作例を示すタイムチャート、第5図は第1−図の実施例
におけるタスクテーブルの構成例を示す図、第6図、第
7図および第8図は本発明の別の実施例を示す図、用い
るスケジューラのフローチャート、および動作例を示す
タイムチャート、第9図、第1()図および第11図は
本発明の別の実施例を示す図、用いるスケジューラのフ
ローチャート、およびタスクテーブルの構成例を示す図
、第12回および第13図は本発明の別の実施例で示す
図および用いるスケジューラのフローチャート、第14
図及び第15図はそれぞれ各プロセッサがローカルメモ
リを有してネットワークで結合されたシステムでの本発
明の実施例を示す図、第16図は各プロセッサが有する
ローカルメモリを1つの仮想メモリとしてアクセスする
ようにしたシステムでの本発明の実施例を示す図、第1
7図および第18図は第1b図の実施例における論理空
間と物理空間の対応っけの説明図および上記2つの空間
の対応っけを行うアドレス変換テーブルの説明図である
。 10]1−10]3−・・プo セラ+j、1021〜
1023−プロセッサ種類識別子、1o;3・・・共有
バス、104・・・メインメモリ、105・・・ヘッダ
、1061〜1o66・・・タスク、1071〜107
3・・・実行可否フラグ、1081〜1o83・・・優
先度テーブル、]、09・・・スケジューラプログラム
、110・・・プロセッサ種類識別子表、3101〜3
1o3・・・ローカルメモリ、3zO・・・仮想共有メ
モリ。 代理人弁理士  秋 本 正 実 ]n]] 第 図 1G]3 第 図 第 図 第 図
FIG. 1 is a diagram showing an embodiment of the present invention, FIG. 2 is a diagram showing the correspondence between the types of processors constituting the system and processor type identifiers, and FIG. 3 is a flowchart of the scheduler used in the embodiment of FIG. 1. , FIG. 4 is a time chart showing an example of the operation of the embodiment shown in FIG. 1, FIG. 5 is a diagram showing an example of the configuration of a task table in the embodiment shown in FIGS. The figure is a diagram showing another embodiment of the present invention, a flowchart of the scheduler used, and a time chart showing an example of operation. FIG. 9, FIG. 1(), and FIG. 11 are diagrams showing another embodiment of the present invention. , a flowchart of the scheduler used and a diagram showing an example of the configuration of a task table, 12th and 13th are diagrams showing another embodiment of the present invention and a flowchart of the scheduler used, 14th
15 and 15 are diagrams showing an embodiment of the present invention in a system in which each processor has a local memory and are connected via a network, and FIG. 16 shows an example in which the local memory of each processor is accessed as one virtual memory. FIG. 1 shows an embodiment of the present invention in a system configured to
FIG. 7 and FIG. 18 are explanatory diagrams of the correspondence between the logical space and physical space in the embodiment of FIG. 1b, and an explanatory diagram of an address translation table for making the correspondence between the two spaces. 10] 1-10] 3-...puo Sera+j, 1021~
1023-Processor type identifier, 1o; 3... Shared bus, 104... Main memory, 105... Header, 1061-1o66... Task, 1071-107
3... Executable flag, 1081-1o83... Priority table, ], 09... Scheduler program, 110... Processor type identifier table, 3101-3
1o3...Local memory, 3zO...Virtual shared memory. Representative Patent Attorney Masami Akimoto [n]] Figure 1G] 3 Figure Figure Figure Figure

Claims (1)

【特許請求の範囲】 1、全てが同一構成ではない複数のプロセッサと該プロ
セッサの各々によりアクセス可能な主メモリが共有バス
で接続されて成るマルチプロセッサシステムでのタスク
のスケジューリング方法において、各プロセッサに自プ
ロセッサのスケジュール手段と自プロセッサの種別を示
す識別子の認識手段とを有せしめ、主メモリに未処理タ
スクの待行列を格納し、かつ各タスクには自タスクを実
行可能なプロセッサの種別を示す実行可否フラグを含む
タスクテーブルを設けるとともに、いずれかのプロセッ
サにスケジューリングが必要となった場合に、当該プロ
セッサのスケジュール手段は、上記主メモリの待行列に
繋がれたタスクを順次読み出し、自プロセッサの識別子
と上記読み出したタスクの上記実行可否フラグとの比較
から実行可能と判断した最初のタスクを実行タスクとす
ることを特徴とするタスクのスケージューリング方法。 2、全てが同一構成ではない複数のプロセッサと該プロ
セッサの各々によりアクセス可能な主メモリが共有バス
で接続されて成るマルチプロセッサシステムでのタスク
のスケジューリング方法において、いくつかのプロセッ
サにスケジュール手段を有せしめ、主メモリに未処理タ
スクの待行列と各プロセッサの種別を示す識別子表とを
格納し、かつ各タスクには自タスクを実行可能なプロセ
ッサの種別を示す実行可否フラグを含むタスクテーブル
を設けるとともに、いずれかのプロセッサにスケジュー
リングが必要となった場合に、上記スケジュール手段を
有するプロセッサの1つが、タスク処理中であればその
処理を中断してスケジュール手段を起動し、上記主メモ
リの待行列に繋がれたタスクを順次読み出し、該読み出
したタスクの上記実行可否フラグと上記スケジューリン
グが必要なプロセッサの上記識別子表から読み出した識
別子との比較から実行可能と判断した最初のタスクを実
行タスクとすることを特徴とするタスクのスケジューリ
ング方法。 3、全てが同一構成ではない複数のプロセッサと該プロ
セッサの各々によりアクセス可能な主メモリが共有バス
で接続されて成るマルチプロセッサシステムでのタスク
のスケジューリング方法において、各プロセッサに自プ
ロセッサのスケジュール手段と自プロセッサの種別を示
す識別子の認識手段とを有せしめ、主メモリに未処理タ
スクの待行列を格納し、かつ各タスクには自タスクを実
行する上での各プロセッサ種別ごとの優先度を示す優先
度テーブルを含むタスクテーブルを設けるとともに、い
ずれかのプロセッサにスケジューリングが必要となった
場合に、当該プロセッサのスケジュール手段は、上記主
メモリの待行列に繋がれたタスクを順次読み出し、自プ
ロセッサの識別子に対して最も優先度の高いタスクを各
タスクの上記優先度テーブルを参照して選び出し、該選
び出したタスクを実行タスクとすることを特徴とするタ
スクのスケジューリング方法。 4、全てが同一構成ではない複数のプロセッサと該プロ
セッサの各々によりアクセス可能な主メモリが共有バス
で接続されて成るマルチプロセッサシステムでのタスク
のスケジューリング方法において、いくつかのプロセッ
サにスケジュール手段を有せしめ、主メモリに未処理タ
スクの待行列と各プロセッサの種別を示す識別子表とを
格納し、かつ各タスクには自タスクを実行する上での各
プロセッサ種別ごとの優先度を示す優先度テーブルを含
むタスクテーブルを設けるとともに、いずれかのプロセ
ッサにスケジューリングが必要となった場合に、上記ス
ケジュール手段を有するプロセッサの1つが、タスク処
理中であればその処理を中断してスケジュール手段を起
動し、上記主メモリの待行列に繋がれたタスクを順次読
み出し、上記スケジューリングが必要なプロセッサの識
別子に対して最も優先度の高いタスクを各タスクの上記
優先度テーブルを参照して選び出し、該選び出したタス
クを実行タスクとすることを特徴とするタスクのスケジ
ューリング方法。 5、前記優先度に実行不能を示す不能値を設け、あるタ
スクに対して上記不能値が指定された種別のプロセッサ
には当該タスクを割り当てないことを特徴とする請求項
3または4記載のタスクのスケジューリング方法。 6、前記主メモリに代って各プロセッサ対応にローカル
メモリを設け、前記共有バスに代って各プロセッサ間を
結合するネットワークを設けるとともに、前記待行列は
マスターとして指定された1つのプロセッサ対応のロー
カルメモリに格納し、上記待行列への他プロセッサから
のアクセスを上記ネットワークを介して行うことを特徴
とする請求項1、2、3、4または5記載のタスクのス
ケジューリング方法。 7、前記主メモリに代って各プロセッサ対応にローカル
メモリを設け、前記共有バスに代って各プロセッサ間を
結合するネットワークを設けるとともに、前記待行列は
すべてのプロセッサ対応のローカルメモリに格納し、待
行列の更新時には上記ネットワークを介してすべてのロ
ーカルメモリで行うようにしたことを特徴とする請求項
1、2、3、4または5記載のタスクのスケジューリン
グ方法。 8、前記主メモリに代って各プロセッサ対応にローカル
メモリを設け、前記共有バスに代って各プロセッサ間を
結合するネットワークを設けるとともに、すべてのロー
カルメモリの物理空間アドレスを論理空間のアドレスに
対応づけるためのアドレス変換手段を各プロセッサに設
けることにより単一の仮想メモリを形成し、該仮想メモ
リを各プロセッサの共有メモリとしたことを特徴とする
請求項1、2、3、4または5記載のタスクのスケジュ
ーリング方法。
[Claims] 1. A method for scheduling tasks in a multiprocessor system in which a plurality of processors, all of which do not have the same configuration, and a main memory accessible by each of the processors are connected via a shared bus. It has a scheduling means for its own processor and a means for recognizing an identifier indicating the type of its own processor, stores a queue of unprocessed tasks in the main memory, and indicates for each task the type of processor that can execute the task. A task table including executable flags is provided, and when scheduling is required for any processor, the scheduling means of the processor sequentially reads out the tasks connected to the queue of the main memory and executes the tasks of the own processor. A task scheduling method characterized in that the first task determined to be executable based on a comparison between an identifier and the executable flag of the read task is set as an execution task. 2. A method for scheduling tasks in a multiprocessor system in which a plurality of processors, not all of which have the same configuration, and a main memory that can be accessed by each of the processors are connected via a shared bus, in which some of the processors have scheduling means. Finally, a queue of unprocessed tasks and an identifier table indicating the type of each processor are stored in the main memory, and each task is provided with a task table including an executable flag indicating the type of processor that can execute the task. At the same time, when scheduling is required for any of the processors, if one of the processors having the scheduling means is processing a task, it interrupts the task processing, starts the scheduling means, and fills the queue in the main memory. The tasks connected to the above are sequentially read out, and the first task determined to be executable is set as the execution task by comparing the executable flag of the read task with the identifier read from the identifier table of the processor that requires the scheduling. A task scheduling method characterized by: 3. In a task scheduling method in a multiprocessor system in which a plurality of processors, all of which do not have the same configuration, and a main memory accessible by each processor are connected via a shared bus, each processor is provided with its own scheduling means. a recognition means for an identifier indicating the type of the own processor, a queue of unprocessed tasks is stored in the main memory, and each task is given a priority for each processor type in executing the own task. In addition to providing a task table including a priority table, when scheduling is required for any processor, the scheduling means of that processor sequentially reads out the tasks connected to the queue of the main memory and schedules the tasks of its own processor. 1. A task scheduling method comprising: selecting a task with the highest priority for an identifier by referring to the priority table for each task; and setting the selected task as an execution task. 4. A method for scheduling tasks in a multiprocessor system in which a plurality of processors, not all of which have the same configuration, and a main memory accessible by each of the processors are connected via a shared bus, in which some of the processors have scheduling means. A queue of unprocessed tasks and an identifier table indicating the type of each processor are stored in the main memory, and each task has a priority table indicating the priority of each processor type in executing its own task. and when scheduling is required for any of the processors, if one of the processors having the scheduling means is currently processing a task, the processing is interrupted and the scheduling means is activated; The tasks connected to the queue in the main memory are sequentially read out, the task with the highest priority for the identifier of the processor that requires scheduling is selected by referring to the priority table for each task, and the selected task is A task scheduling method characterized in that an execution task is: 5. The task according to claim 3 or 4, characterized in that the priority level is provided with a disable value indicating that the task cannot be executed, and the task is not assigned to a type of processor for which the disable value is specified for a certain task. scheduling method. 6. In place of the main memory, a local memory is provided corresponding to each processor, and in place of the shared bus, a network is provided that connects each processor, and the queue is connected to one processor designated as the master. 6. The task scheduling method according to claim 1, wherein the task is stored in a local memory, and the queue is accessed from other processors via the network. 7. In place of the main memory, a local memory is provided corresponding to each processor, in place of the shared bus, a network is provided to connect the processors, and the queue is stored in the local memory corresponding to all the processors. 6. The task scheduling method according to claim 1, 2, 3, 4, or 5, wherein updating of the queue is performed in all local memories via the network. 8. A local memory is provided for each processor in place of the main memory, a network is provided to connect each processor in place of the shared bus, and the physical space addresses of all local memories are changed to logical space addresses. Claim 1, 2, 3, 4 or 5, characterized in that a single virtual memory is formed by providing each processor with an address translation means for making the correspondence, and the virtual memory is used as a shared memory of each processor. How to schedule the tasks described.
JP6221689A 1989-03-13 1989-03-16 Task scheduling method Pending JPH02242434A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP6221689A JPH02242434A (en) 1989-03-16 1989-03-16 Task scheduling method
DE4007998A DE4007998A1 (en) 1989-03-13 1990-03-13 Process planning method for multiple computer system - using process control table from which computer are selected for each process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6221689A JPH02242434A (en) 1989-03-16 1989-03-16 Task scheduling method

Publications (1)

Publication Number Publication Date
JPH02242434A true JPH02242434A (en) 1990-09-26

Family

ID=13193733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6221689A Pending JPH02242434A (en) 1989-03-13 1989-03-16 Task scheduling method

Country Status (1)

Country Link
JP (1) JPH02242434A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05216844A (en) * 1991-07-17 1993-08-27 Internatl Business Mach Corp <Ibm> Method and apparatus for improved task distribution in multiprocessor data processing system
JP2003256221A (en) * 2002-02-28 2003-09-10 Fujitsu Ltd Parallel process executing method and multi-processor type computer
WO2007020739A1 (en) * 2005-08-15 2007-02-22 Sony Computer Entertainment Inc. Scheduling method, and scheduling device
JP2007257280A (en) * 2006-03-23 2007-10-04 Yokogawa Electric Corp Distributed processing system and distributed processing method
US7356666B2 (en) 2003-06-27 2008-04-08 Kabushiki Kaisha Toshiba Local memory management system with plural processors
US20110161975A1 (en) * 2009-12-30 2011-06-30 Ibm Corporation Reducing cross queue synchronization on systems with low memory latency across distributed processing nodes
JP2012252413A (en) * 2011-05-31 2012-12-20 Toshiba Corp Information processing apparatus, information processing method, and control program
US9038079B2 (en) 2009-12-30 2015-05-19 International Business Machines Corporation Reducing cross queue synchronization on systems with low memory latency across distributed processing nodes

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05216844A (en) * 1991-07-17 1993-08-27 Internatl Business Mach Corp <Ibm> Method and apparatus for improved task distribution in multiprocessor data processing system
JP2003256221A (en) * 2002-02-28 2003-09-10 Fujitsu Ltd Parallel process executing method and multi-processor type computer
US7356666B2 (en) 2003-06-27 2008-04-08 Kabushiki Kaisha Toshiba Local memory management system with plural processors
US7739457B2 (en) 2003-06-27 2010-06-15 Kabushiki Kaisha Toshiba Local memory management system with plural processors
WO2007020739A1 (en) * 2005-08-15 2007-02-22 Sony Computer Entertainment Inc. Scheduling method, and scheduling device
JP2007052511A (en) * 2005-08-15 2007-03-01 Sony Computer Entertainment Inc Scheduling method and scheduling device
US8375390B2 (en) 2005-08-15 2013-02-12 Sony Computer Entertainment Inc. Scheduling method and scheduling apparatus
JP2007257280A (en) * 2006-03-23 2007-10-04 Yokogawa Electric Corp Distributed processing system and distributed processing method
US20110161975A1 (en) * 2009-12-30 2011-06-30 Ibm Corporation Reducing cross queue synchronization on systems with low memory latency across distributed processing nodes
US8819690B2 (en) * 2009-12-30 2014-08-26 International Business Machines Corporation System for reducing data transfer latency to a global queue by generating bit mask to identify selected processing nodes/units in multi-node data processing system
US9038079B2 (en) 2009-12-30 2015-05-19 International Business Machines Corporation Reducing cross queue synchronization on systems with low memory latency across distributed processing nodes
JP2012252413A (en) * 2011-05-31 2012-12-20 Toshiba Corp Information processing apparatus, information processing method, and control program

Similar Documents

Publication Publication Date Title
US11550627B2 (en) Hardware accelerated dynamic work creation on a graphics processing unit
US6330661B1 (en) Reducing inherited logical to physical register mapping information between tasks in multithread system using register group identifier
US6961935B2 (en) Multi-processor system executing a plurality of threads simultaneously and an execution method therefor
US5010482A (en) Multi-event mechanism for queuing happened events for a large data processing system
US5526521A (en) Method and system for process scheduling from within a current context and switching contexts only when the next scheduled context is different
US8387061B2 (en) Logic for synchronizing multiple tasks at multiple locations in an instruction stream
JP2003030050A (en) Method for executing multi-thread and parallel processor system
US20050066302A1 (en) Method and system for minimizing thread switching overheads and memory usage in multithreaded processing using floating threads
JP5309703B2 (en) Shared memory control circuit, control method, and control program
US4851992A (en) Register/saving/restoring system for saving and restoring data in a register of a slave processor
US20040148606A1 (en) Multi-thread computer
JPH02242434A (en) Task scheduling method
JPS63310051A (en) Method and apparatus for executing input/output process containing program input/output instruction
JP3546694B2 (en) Multi-thread computer system and multi-thread execution control method
US7437535B1 (en) Method and apparatus for issuing a command to store an instruction and load resultant data in a microcontroller
EP0953905B1 (en) Method and apparatus for switching tasks
CN114035847A (en) Method and apparatus for parallel execution of core programs
JPH05151064A (en) Tightly coupled multiprocessor system
JPH07311686A (en) Computer system and method for generation and processing of system management interrupt in it
JPS6097440A (en) Virtual multiprocessor device
JPH09282188A (en) Interruption processing method and system using the method
US20220309026A1 (en) Processor for processing external service requests using a symmetrical network interface
JP2579008B2 (en) Time-division multitasking execution device
JP2008225710A (en) Computer system and process-switching method used in the system
JPH11249917A (en) Parallel computers, their batch processing method, and storage medium