[go: up one dir, main page]

JPS63208948A - Task scheduling system for multi-processor system - Google Patents

Task scheduling system for multi-processor system

Info

Publication number
JPS63208948A
JPS63208948A JP4130187A JP4130187A JPS63208948A JP S63208948 A JPS63208948 A JP S63208948A JP 4130187 A JP4130187 A JP 4130187A JP 4130187 A JP4130187 A JP 4130187A JP S63208948 A JPS63208948 A JP S63208948A
Authority
JP
Japan
Prior art keywords
task
processor
state
ready
ready queue
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
JP4130187A
Other languages
Japanese (ja)
Inventor
Tsukasa Suenaga
司 末永
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 JP4130187A priority Critical patent/JPS63208948A/en
Publication of JPS63208948A publication Critical patent/JPS63208948A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To ensure a high-speed operation with the titled task scheduling system by securing such a constitution where a processor kept under a waiting state monitors a task ready queue via firmware and performing an automatic task scheduling job when a task kept under a ready exists. CONSTITUTION:A task A is kept under a run state with a processor 50 together with a task B is kept under a waiting state and a processor 60 is kept under a waiting state respectively. Under such conditions, when the task A gives a start request to the task B, the task B is connected to a task ready queue TRQ 71 of a main memory 70. A firmware mechanism 61 of the processor 60 refers to an instruction flag 73 set in the memory 70 when the processor 60 is kept under a waiting state and then checks the TRQ 71 to inspect the presence of a task kept under a ready state as long as an instruction is given for monitor of the TRQ. In such a case, the task B is detected and therefore a task dispatcher 62 performs a task scheduling job to extract the task B and to execute it via the processor 60.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、マルチプロセッサシステムにおけるタスク
スケジューリング方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to a task scheduling method in a multiprocessor system.

(従来の技術) 第3図は2台のプロセッサ10.20を備えた従来のマ
ルチプロセッサシステムを示す。今、タスクAがプロセ
ッサ10においてラン(RUN)状態S1、即ち実行中
にあり、タスクBは待ち(WAIT)状態S2にあるも
のとする。またプロセッサ20はCPUウェイト(WA
IT)状態にあるものと−する。このような状態で、プ
ロセッサ10で実行中のタスクAからタスクBに対して
起動要求が出され、タスクBの待ち状182の解除が行
なわれると、タスクBは主記憶30に置かれるタスクレ
ディキュー(TRQ)31に繋がれてレディ(READ
Y)状態$3となる・。−またプロセッサ10はCPU
ウェイト状態にあるプロセッサを調べ、この例のように
プロセッサ20がCPUウェイト状態にあれば同プロセ
ッサ20に対し、5IGP(シグナルプロセッサ)命令
を発行する。この命令は、他のプロセッサに対して各種
の情報を伝えるのに用いられる。
(Prior Art) FIG. 3 shows a conventional multiprocessor system with two processors 10.20. It is now assumed that task A is in the RUN state S1, ie, being executed, in the processor 10, and task B is in the WAIT state S2. The processor 20 also has a CPU weight (WA).
IT). In this state, when task A, which is currently being executed on the processor 10, issues a start request to task B, and the wait state 182 of task B is released, task B is placed in the task ready state stored in the main memory 30. Ready (READ) connected to queue (TRQ) 31
Y) The state becomes $3. - Also, the processor 10 is a CPU
A processor in a wait state is checked, and if the processor 20 is in a CPU wait state as in this example, a 5IGP (signal processor) command is issued to the processor 20. This instruction is used to convey various information to other processors.

さて、CPUウェイト状態にあるプロセッサ20のファ
ームウェア機構21は、第4図のフローチャートに示す
ように、割込み(入出力割込み、タイマ割込み、5IG
P割込み)があるか否かを常時監視しており(ステップ
41)、割込みがあった時点で削込みハンドラに制御を
渡す(ステップ42)ようになっている。例えば、5I
GP命令による5IGP割込みを受付けた場合には、5
IGP割込みハンドラ22に制御が渡される。この結果
、5IGP割込みハンドラ22からタスクディスバッチ
t23に対してディスパッチング割込みが発生し、同デ
ィスパッチャ23に制御が移される。タスクディスバッ
チ1723は、この割込みに応じてタスクスケジューリ
ングを行なう。これにより、タスクレディキュー31か
らレディ状態のタスク、即ちタスクBが取出され、プロ
セッサ20においてタスクBがラン状態S4となる。
Now, the firmware mechanism 21 of the processor 20 in the CPU wait state handles interrupts (input/output interrupts, timer interrupts, 5IG interrupts,
It constantly monitors whether or not there is an interrupt (P interrupt) (step 41), and when an interrupt occurs, control is passed to the cutting handler (step 42). For example, 5I
If a 5IGP interrupt is accepted due to a GP command, 5
Control is passed to the IGP interrupt handler 22. As a result, a dispatching interrupt is generated from the 5IGP interrupt handler 22 to the task dispatch t23, and control is transferred to the task dispatcher 23. The task dispatch 1723 performs task scheduling in response to this interrupt. As a result, the task in the ready state, ie, task B, is taken out from the task ready queue 31, and the task B enters the run state S4 in the processor 20.

上記したように第3図に示す従来システムでは、タスク
がレディ状態になってからスケジューリングされるまで
に、CPtJウェイト状態プロセッサの検出、5IGP
命令によるCPLIウェイト状態プロセッサの起動、お
よび5IGP割込みハンドラの実行といった手順が必要
であった。このため、従来システムでは、高速タスクス
ケジューリングが困難であった。
As mentioned above, in the conventional system shown in FIG.
Procedures were required such as the instruction to wake up the CPLI wait state processor and execute the 5IGP interrupt handler. For this reason, in conventional systems, high-speed task scheduling is difficult.

(発明が解決しようとする問題点) 上記したように従来は、タスクがレディ状態となってか
らスケジューリングされるまでに煩雑な手順が不可欠で
あったため、高速タスクスケジューリングが困難である
という問題があった。
(Problems to be Solved by the Invention) As mentioned above, in the past, there was a problem that high-speed task scheduling was difficult because a complicated procedure was required from when a task became ready to when it was scheduled. Ta.

この発明は上記事情に鑑みてなされたものでその目的は
、タスクスケジューリングの高速化が図れるマルチプロ
セッサシステムにおけるタスクスケジューリング方式を
提供することにある。
The present invention has been made in view of the above circumstances, and an object thereof is to provide a task scheduling method in a multiprocessor system that can speed up task scheduling.

[発明の構成] (問題点を解決するための手段と作用)この発明では、
複数のプロセッサにより共有される主記憶に、レディ状
態のタスクを管理するためのタスクレディキューと、タ
スクレディキューのエントリの実アドレスを記憶するア
ドレス記憶部と、タスクレディキューの監視を行なうか
否かを指示する指示フラグとを置くと共に、上記タスク
レディキューを監視するファームウェア機構を上記各プ
ロセッサに設け、自プロセッサがCPtJウェイト状態
にあり且つ指示フラグがタスクレディキュー監視指示状
態にある場合に、アドレス記憶部に記憶されている実ア
ドレスを用いてタスクレディキューの監視を行ない、レ
ディ状態タスクの存在を検出するとタスクディスパッチ
ャにディスパッチング割込みを発生することにより、タ
スクスケジューリングを行なうようにしたちのである。
[Structure of the invention] (Means and effects for solving the problem) In this invention,
The main memory shared by multiple processors includes a task ready queue for managing tasks in a ready state, an address storage section for storing real addresses of entries in the task ready queue, and whether or not to monitor the task ready queue. A firmware mechanism for monitoring the task ready queue is provided in each processor, and when the own processor is in a CPtJ wait state and the instruction flag is in a task ready queue monitoring instruction state, The real address stored in the address storage unit is used to monitor the task ready queue, and when the presence of a ready task is detected, a dispatching interrupt is generated to the task dispatcher, thereby performing task scheduling. .

(実施例) 第1図はこの発明を適用するマルチプロセッサシステム
の一実施例を示すブロック構成図である。同図において
、50.60はプロセッサ、70はプロセッサ50. 
(30により共有される主記憶である。
(Embodiment) FIG. 1 is a block diagram showing an embodiment of a multiprocessor system to which the present invention is applied. In the figure, 50.60 is a processor, 70 is a processor 50.
(This is the main memory shared by 30.

この上記[70には、レディ状態のタスクを管理するた
めのタスクレディキュー(TRQ)71と、タスクレデ
ィキュー71のエントリ(入口、先頭位置〉の実アドレ
スを記憶するアドレス記憶部72と、タスクレディキュ
ー71の監視を行なうか否かを指示する指示フラグ73
とが画かれる。一方、プロセッサ60には、同プロセッ
サ60が待ち状!l!(即ちCPUウェイト状態)にあ
る場合において必要に応じてタスクレディキュー71の
監視等を行なうファームウェア機構61と、タスクスケ
ジューリングを行なうタスクディスパッチャ62とが設
けられている。またプロセッサ50にも、プロセッサ6
0内のファームウェア機構61.タスクディスパッチャ
62と同様のファームウェア機構、タスクディスバッチ
ャ(図示せず)が用意される。なお、第1図において、
811はタスクAがラン(RUN)状態にあることを、
812はタスクBが待ち(WAIT)状態にあることを
、813はタスクBがレディ(READY)状態にある
ことを、そしてS14はタスクBがラン状態にあること
を、それぞれ示す。
The above [70] includes a task ready queue (TRQ) 71 for managing tasks in a ready state, an address storage section 72 for storing the real address of an entry (entrance, start position) of the task ready queue 71, and a task ready queue (TRQ) 71 for managing tasks in a ready state. An instruction flag 73 for instructing whether or not to monitor the ready queue 71
is depicted. On the other hand, the processor 60 has a waiting status! l! A firmware mechanism 61 that monitors the task ready queue 71 as necessary when the CPU is in a CPU wait state, and a task dispatcher 62 that performs task scheduling are provided. The processor 50 also includes a processor 6.
Firmware mechanism in 061. A task dispatcher (not shown), which is a firmware mechanism similar to the task dispatcher 62, is provided. In addition, in Figure 1,
811 indicates that task A is in the RUN state.
812 indicates that task B is in a WAIT state, 813 indicates that task B is in a READY state, and S14 indicates that task B is in a RUN state.

次に、この発明の一実施例の動作を第2図のフローチャ
ートを参照して説明する。今、タスクAがプロセッサ5
0においてラン状B811にあり(即ち実行中であり)
、タスクBは待ち状態S12にあるものとする。またプ
ロセッサ60はCPUウェイト状態にあるものとする。
Next, the operation of one embodiment of the present invention will be explained with reference to the flowchart shown in FIG. Now task A is processor 5
At 0, it is in run form B811 (i.e. it is running)
, task B is in the waiting state S12. It is also assumed that the processor 60 is in a CPU wait state.

このような状態で、プロセッサ50で実行中のタスクA
からタスクBに対して起動要求が出され、タスクBの持
ち状flls12の解除が行なわれると、タスクBは主
記憶70に置かれるタスクレディキュー(TRQ)71
に繋がれて(具体的にはタスクBのタスクIIJ Il
lブロックの主記憶的格納番地がタスクレディキュー7
1に繋がれて)レディ状態813となる。
In this state, task A being executed by the processor 50
When a startup request is issued to task B from , and the status fulls12 of task B is released, task B is placed in the task ready queue (TRQ) 71 stored in the main memory 70.
(Specifically, Task B's Task IIJ Il
The main memory storage address of l block is task ready queue 7
1) and enters the ready state 813.

一方、プロセッサ60のファームウェアm構61は、同
プロセッサ60が上記のようにCPUウェイト状態にあ
る場合には、第2図のフローチャートに示すように、割
込み(入出力割込み、タイマ割込み、5IGP割込み)
があるか否かを調ぺ(ステップ81)、割込みがある場
合には、その割込み種別に対応する割込みハンドラに制
葬を渡す(ステップ82)、これに対して割込みがない
場合には、プロセッサ60のファームウェア機構61は
主記憶70に置かれている指示フラグ73を参照しくス
テップ83)、タスクレディキュー(TRQ)監視指示
の有無を調べる(ステップ584)。
On the other hand, when the processor 60 is in the CPU wait state as described above, the firmware m structure 61 of the processor 60 interrupts (input/output interrupt, timer interrupt, 5IGP interrupt) as shown in the flowchart of FIG.
If there is an interrupt, the interrupt is passed to the interrupt handler corresponding to the interrupt type (step 82).If there is no interrupt, the processor The firmware mechanism 61 of 60 refers to the instruction flag 73 stored in the main memory 70 (step 83) and checks whether there is a task ready queue (TRQ) monitoring instruction (step 584).

指示フラグ73によってTRQ監視が指示されている場
合、ファームウェア機構61はアドレス記憶部72に記
憶されている実アドレスの指定するタスクレディキュー
(TRQ)71内エントリ(入口)を参照しくステップ
85)、レディ状態にあるタスクが存在するか否か(l
がれているか否か)を調べる(ステップ86)。もし、
レディ状態にあるタスクが存在しない場合にはステップ
81の処理に戻る。これは、指示フラグ13によってT
R0IIが指示されていない場合にも同様である。一方
、上記したようにタスクBがタスクレディキュー71に
繋がれるようになると、ファームウェア機構61はステ
ップ86.においてレディ状態タスク(タスクB)の存
在を判断し、タスクディスパッチャ62に対してディス
パッチング割込みを発生する(ステップ87)。この割
込みにより、タスクディスパッチャ23はタスクスケジ
ューリングを行ない、この結果タスクレディキュー31
からレディ状態のタスク、即ちタスクBが取出され、プ
ロセッサ20においてラン状態814となり、実行を開
始する。なお、プロセッサ50がCPUウェイト状態に
ある場合には、第2図のフローチャートで示される処理
が同プロセッサ60において実行されることは言うまで
もない。
If TRQ monitoring is instructed by the instruction flag 73, the firmware mechanism 61 refers to the entry (entrance) in the task ready queue (TRQ) 71 specified by the real address stored in the address storage unit 72 (step 85); Whether there is a task in the ready state (l
(step 86). if,
If there is no task in the ready state, the process returns to step 81. This is determined by the instruction flag 13.
The same applies when R0II is not specified. On the other hand, when task B becomes connected to the task ready queue 71 as described above, the firmware mechanism 61 performs step 86. The existence of a ready state task (task B) is determined in step 87, and a dispatching interrupt is generated to the task dispatcher 62 (step 87). Due to this interrupt, the task dispatcher 23 performs task scheduling, and as a result, the task ready queue 31
A task in a ready state, ie, task B, is taken out from the processor 20, enters a run state 814, and begins execution. It goes without saying that when the processor 50 is in the CPU wait state, the process shown in the flowchart of FIG. 2 is executed in the processor 60.

以上は2台のプロセッサ構成のマルチプロセッサシステ
ムについて説明したが、この発明は3台以上のプロセッ
サ構成のマルチプロセッサシステムにも適用できること
は勿論である。また、この発明は、タスクスケジューリ
ングに限らず、実行優先度に関連するO8(オペレーテ
ィングシステム〉内ルーチンをスケジューリングする際
にも応用できる。
Although a multiprocessor system configured with two processors has been described above, the present invention is of course applicable to a multiprocessor system configured with three or more processors. Furthermore, the present invention is applicable not only to task scheduling but also to scheduling routines within the O8 (operating system) related to execution priority.

[発明の効果] 以上詳述したようにこの発明によれば、CPUウェイト
状態にあるプロセッサが、そのファームウェア機構によ
り自らタスクレディキューの監視を行ない、レディ状態
にあるタスクが存在する場合に自動的にタスクスケジュ
ーリングを行なうようにしたので、ラン状態プロセッサ
がCPtJウェイト状態プロセッサを検出し、5IGP
命令によりCPLJウェイト状態プロセッサを起動し、
5IGP割込みハンドラを実行することによりタスクス
ケジューリングを行なう従来方式に比べて、タスクスケ
ジューリングの島速化が図れる。
[Effects of the Invention] As detailed above, according to the present invention, the processor in the CPU wait state monitors the task ready queue by itself using its firmware mechanism, and when there is a task in the ready state, the processor automatically monitors the task ready queue. Since task scheduling is performed in advance, the run state processor detects the CPtJ wait state processor and
Activate the CPLJ wait state processor with the instruction;
Compared to the conventional method in which task scheduling is performed by executing a 5IGP interrupt handler, task scheduling can be performed more quickly.

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

第1図はこの発明を適用するマルチプロセッサシステム
の一実施例を示すブロック構成図、第2図は第1図のシ
ステムにおいてCPtJウェイト状態にあるプロセッサ
の動作を説明するためのフローチャート、第3図は従来
のマルチプロセッサシステムを示すブロック構成図、第
゛4図は第3図のシステムにおいてCPUウェイト状態
にあるプロセッサの動作を説明するためのフローチャー
トである。 50、60・・・プロセッサ、61・・・ファームウェ
ア機構、62・・・タスクディスパッチャ、10・・・
主配憶、11・・・タスクレディキュー、12・・・ア
ドレス記憶部、13・・・指示フラグ。 出願人代理人 弁理士 鈴 江 武 彦50、 第1図 第2図 第3図 第4図
FIG. 1 is a block diagram showing an embodiment of a multiprocessor system to which the present invention is applied, FIG. 2 is a flowchart for explaining the operation of a processor in a CPtJ wait state in the system of FIG. 1, and FIG. 4 is a block diagram showing a conventional multiprocessor system, and FIG. 4 is a flowchart for explaining the operation of a processor in a CPU wait state in the system of FIG. 50, 60... Processor, 61... Firmware mechanism, 62... Task dispatcher, 10...
Main storage, 11... Task ready queue, 12... Address storage section, 13... Instruction flag. Applicant's representative Patent attorney Takehiko Suzue 50, Figure 1 Figure 2 Figure 3 Figure 4

Claims (1)

【特許請求の範囲】[Claims] 複数のプロセッサを備えたマルチプロセッサシステムに
おいて、上記複数のプロセッサにより共有される主記憶
に置かれレディ状態のタスクを管理するためのタスクレ
ディキューと、上記主記憶に置かれ上記タスクレディキ
ューのエントリの実アドレスを記憶するアドレス記憶部
と、上記主記憶に置かれ上記タスクレディキューの監視
を行なうか否かを指示する指示フラグと、上記各プロセ
ッサに置かれるファームウェア機構であつて、自プロセ
ッサがCPUウェイト状態にあり且つ上記指示フラグが
タスクレディキュー監視指示状態にある場合に上記アド
レス記憶部に記憶されている実アドレスを用いて上記タ
スクレディキューの監視を行ない、レディ状態タスクの
存在を検出するとタスクディスパッチャにディスパッチ
ング割込みを発生するファームウェア機構とを具備し、
このファームウェア機構からのディスパッチング割込み
に応じてタスクスケジューリングを行なうようにしたこ
とを特徴とするマルチプロセッサシステムにおけるタス
クスケジューリング方式。
In a multiprocessor system including a plurality of processors, a task ready queue is placed in a main memory shared by the plurality of processors for managing tasks in a ready state, and an entry in the task ready queue is placed in the main memory. an address storage unit that stores the real address of the task ready queue; an instruction flag placed in the main memory that instructs whether or not to monitor the task ready queue; and a firmware mechanism placed in each of the processors; When the CPU is in a wait state and the instruction flag is in a task ready queue monitoring instruction state, the task ready queue is monitored using the real address stored in the address storage section, and the existence of a task in a ready state is detected. Then, it is equipped with a firmware mechanism that generates a dispatching interrupt to the task dispatcher,
A task scheduling method for a multiprocessor system, characterized in that task scheduling is performed in response to dispatching interrupts from the firmware mechanism.
JP4130187A 1987-02-26 1987-02-26 Task scheduling system for multi-processor system Pending JPS63208948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4130187A JPS63208948A (en) 1987-02-26 1987-02-26 Task scheduling system for multi-processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4130187A JPS63208948A (en) 1987-02-26 1987-02-26 Task scheduling system for multi-processor system

Publications (1)

Publication Number Publication Date
JPS63208948A true JPS63208948A (en) 1988-08-30

Family

ID=12604648

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4130187A Pending JPS63208948A (en) 1987-02-26 1987-02-26 Task scheduling system for multi-processor system

Country Status (1)

Country Link
JP (1) JPS63208948A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5465335A (en) * 1991-10-15 1995-11-07 Hewlett-Packard Company Hardware-configured operating system kernel having a parallel-searchable event queue for a multitasking processor
KR100421797B1 (en) * 1994-12-09 2004-05-20 텔레폰아크티에볼라게트 엘엠 에릭슨 An internal execution thread management system and method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5465335A (en) * 1991-10-15 1995-11-07 Hewlett-Packard Company Hardware-configured operating system kernel having a parallel-searchable event queue for a multitasking processor
KR100421797B1 (en) * 1994-12-09 2004-05-20 텔레폰아크티에볼라게트 엘엠 에릭슨 An internal execution thread management system and method thereof

Similar Documents

Publication Publication Date Title
US5095427A (en) Dispatch control of virtual machine
US4663709A (en) Control system for tightly-coupled multiprocessing units
JP2514299B2 (en) Serialization method of interrupt handling for process level programming
US20100299472A1 (en) Multiprocessor system and computer program product
JPS62184544A (en) Virtual computer system
JPS63208948A (en) Task scheduling system for multi-processor system
AU588389B2 (en) Multiprocessor data processing system
JPH07191863A (en) Multitask execution managing system
JPH01288954A (en) Service program execution program for multi-processor system
JP2553526B2 (en) Multitasking processor
US20240134669A1 (en) Paravirtual pause loops in guest user space
JPH01217636A (en) Task control system
JPH06214811A (en) Scheduling system
JPS62219061A (en) Control system for multiprocessor
JPS6084659A (en) data processing equipment
JPH03116335A (en) System for transferring from non-privileged cpu to privileged cpu
JPS5843778B2 (en) Multi-processor system control method
JPS634350A (en) Delay task monitoring system
JPH04157534A (en) Suspending/restarting system for task group unit
JPS6136850A (en) Input and output interruption information system
JPH0457022B2 (en)
JPS63184839A (en) Multitask monitor system
JPH0533408B2 (en)
JPS61283955A (en) Task control system for close connection type multi-processor
JPH03245257A (en) Acquisition method for ownership of multiprocessor system resources