JPH0424828A - Multi-task control system - Google Patents

Multi-task control system

Info

Publication number
JPH0424828A
JPH0424828A JP12923190A JP12923190A JPH0424828A JP H0424828 A JPH0424828 A JP H0424828A JP 12923190 A JP12923190 A JP 12923190A JP 12923190 A JP12923190 A JP 12923190A JP H0424828 A JPH0424828 A JP H0424828A
Authority
JP
Japan
Prior art keywords
task
execution
register
tasks
state
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
JP12923190A
Other languages
Japanese (ja)
Inventor
Tomoyuki Yoshino
智之 吉野
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP12923190A priority Critical patent/JPH0424828A/en
Publication of JPH0424828A publication Critical patent/JPH0424828A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To switch the tasks at a high speed and to improve the task executing efficiency in a multi-task control system by controlling the tasks after storing the task executing requests, the task states, and the task control resources including the task priority, etc., into a register. CONSTITUTION:When a task executing request is produced, a task control means 3 writes the information on the request into the corresponding storage unit of a task executing request register 1. When the tasks are carried out, the contents of the registers 1 are checked and the task having the highest priority is selected from among those requested tasks. This selected task is decides as the one to be carried out next. Then the means 3 writes the information showing that the task is ready to be executed into a storage unit of a task state register 2 corresponding to the selected task and then instructs the execution of the task. Thus the tasks are switched at a high speed and the task executing efficiency is improved in a multi-task control system.

Description

【発明の詳細な説明】[Detailed description of the invention] 【産業上の利用分野】[Industrial application field]

本発明は、マルチタスクのタスクスイッチングを制御す
るマルチタスク管理方式に関する。
The present invention relates to a multitask management method for controlling task switching of multitasks.

【従来の技術】[Conventional technology]

従来の汎用的なマルチタスク・モニタのようなマルチタ
スク管理方式では、タスクの状態や優先順位などのタス
ク管理資源を格納する一般にタスク・コントロール・ブ
ロック(TCB)と呼ばれるテーブルを用いてタスクの
切替制御が行われていた(例えば、CQ出版(株)発行
「インタフェース」誌1990年1月号、第139〜1
94頁参照)。 その−例として、タスク・コントロール・ブロックは、
タスクごとに用意され、タスクには固有のタスク番号が
割り振られ、構造体の配列として定義されている。その
各タスク・コントロール・ブロックのデータ構造は、タ
スクの動作状態を表す状態区分、タスク・プログラムへ
のポインタ、タスクニ割り付けられたスタック情報、タ
スクが使用している資源リストへのポインタ等の各要素
から構成されている。タスクの起動においては、指定さ
れたタスクの状態区分を停止状態から待機状態にした後
、タスクの実行順序を制御するスケジューラを呼び出す
。スケジューラは配列として定義されているタスク・コ
ントロール・ブロックを1番から順に検索し、最初に見
つかった待機状態のタスクすなわち最も優先順位の高い
待機状態のタスクを選択し、ディスパッチャを呼び出す
。 ディスパッチャは選択されたタスクの制御を行い、その
タスクは実行される。タスクは実行が終了すると、自分
のタスク・コントロール番ブロックの状態区分を停止状
態にする。
In conventional multitask management methods such as general-purpose multitask monitors, task switching is performed using a table generally called a task control block (TCB) that stores task management resources such as task status and priority. (For example, "Interface" magazine published by CQ Publishing Co., Ltd., January 1990 issue, No. 139-1)
(See page 94). As an example, the task control block is
It is prepared for each task, each task is assigned a unique task number, and defined as an array of structures. The data structure of each task control block includes elements such as a state classification representing the operating state of the task, a pointer to the task program, stack information allocated to the task, and a pointer to the resource list used by the task. It consists of When starting a task, the state classification of the specified task is changed from the stopped state to the standby state, and then a scheduler that controls the task execution order is called. The scheduler searches the task control blocks defined as an array in order from number 1, selects the first task found in a waiting state, that is, the task in a waiting state with the highest priority, and calls the dispatcher. The dispatcher takes control of the selected task, and the task is executed. When a task finishes executing, it changes the state classification of its own task control number block to the stopped state.

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

上記従来の技術において、タスク・コントロール・ブロ
ックは、メモリ上に展開されており、このよう1こメモ
リ上にタスクの管理資源が多く存在する場合、タスクの
実行要求の発生時や実行終了時におけるタスク・スイッ
チングの判断あるいはスイッチング処理の実行のために
行われるタスク・コントロール・ブロックの参照や更新
に要するメモリ・アクセスの頻度が高くなる。 従って、従来の技術においては、タスクのスイッチング
が頻繁に行われほど、本来のタスクの実行時間に対する
タスク・スイッチング処理に要する時間の割合が増加す
ることとなり、実行効率が悪くなっていた。 本発明は、上記従来技術の欠点を除去することを目的と
するものである。すなわち、本発明はマルチタスクのタ
スク−スイッチング処理を1li1′速化し、タスクの
実行効率を高(することのできるマルチタスク管理方式
を提供することを目的とするものである。
In the above-mentioned conventional technology, the task control block is developed on memory, and when there are many task management resources in one memory, the task control block is The frequency of memory access required for referencing and updating task control blocks for determining task switching or executing switching processing increases. Therefore, in the conventional technology, the more frequently tasks are switched, the more the ratio of time required for task switching processing to the original task execution time increases, resulting in poor execution efficiency. The present invention aims to eliminate the drawbacks of the prior art described above. That is, an object of the present invention is to provide a multitask management system that can speed up multitask task switching processing by 1li1' and increase task execution efficiency.

【課題を解決するための手段] 本発明のマルチタスク管理方式は、複数のタスクに対応
する複数の記憶単位を有し、それらの記憶単位の配列順
序がタスクの優先順位に対応し、各記憶単位にタスクの
実行要求の育無を格納するタスク実行要求レジスタ(第
1図1)と、複数のタスクに対応する複数の記憶単位を
有し、それらの記憶単位の配列順序がタスクの優先順位
に対応し、各記憶単位にタスクの状態を格納するタスク
状態レジスタ(第1図2)と、タスク要求レジスタの内
容に基づいて、最も優先順位の高いタスクがどれである
かを判定し、そのタスクに対応するタスク状態レジスタ
の記憶単位に実行状態であることを示す情報を格納する
とともに、そのタスクの実行を指示するタスク管理手段
(第1図3)とを備えている。 【作用】 タスク管理手段は、タスクの実行要求が発生すると、タ
スク実行要求レジスタの対応する記憶単位(記憶ビット
素子)、すなわちそのタスクに割り当てられている記憶
単位に実行要求があったことを示す情報(例えば2進数
“1”)を書き込む。 また、一つのタスクの実行が終了したとき、タスク管理
手段は、実行要求が無いことを示す情報(例えば2進数
“0”)をタスク実行要求レジスタの対応する記憶単位
に書き込む。このようにタスク実行要求レジスタは、実
行要求の発生、消滅に応じて更新され、常に最新のタス
クの実行要求の状況が保持されている。 タスクの実行をする場合、タスク実行要求レジスタの内
容を調べて、タスク実行要求のあるタスクのうち最も優
先順位の高いタスクを捜し、それを次に実行すべきタス
クと決定する。 次に、タスク管理手段は、その決定されたタスクに対応
するタスク状態レジスタの記憶単位にタスクが実行状態
であることを示す情報(2進数“1”)を書き込み、そ
のタスクの実行を指示する。もしいずれのタスクにも実
行要求がなければ、その場合にのみ実行されるバックグ
ラウンドタスクに制御を渡す。 なお、タスクの状態としては、例えば、■実行要求がな
く、また実行状態でもない停止状態、■実行要求はあっ
たがまだ実行には移っていない状態、■実行中の状態お
よび実行が割込により中断している状態などがある。 本発明によれば、タスク実行要求、タスクの状態、優先
順位等のタスク管理資源をレジスタに保持して、タスク
の管理をするので、マルチタスクのタスク切替処理を高
速化し、タスクの実行効率を高くすることができる。ま
た、タスク管理資源として、最小限必要なもののみを用
い、データ構造を簡略化しているので、メモリアクセス
の必要がないレジスタの使用と相俟って、タスクの実行
効率を一層高(することができる。
[Means for Solving the Problems] The multitask management method of the present invention has a plurality of memory units corresponding to a plurality of tasks, and the arrangement order of the memory units corresponds to the priority order of the tasks. Each unit has a task execution request register (Figure 1) that stores the status of a task execution request, and multiple storage units corresponding to multiple tasks, and the arrangement order of these storage units is determined by the priority of the task. Based on the contents of the task status register (Fig. 1, 2), which stores the task status in each memory unit, and the task request register, it determines which task has the highest priority, and then determines which task has the highest priority. It stores information indicating the execution state in the memory unit of the task state register corresponding to the task, and also includes task management means (FIG. 1, 3) for instructing the execution of the task. [Operation] When a task execution request occurs, the task management means indicates that there is an execution request in the corresponding memory unit (memory bit element) of the task execution request register, that is, the memory unit assigned to the task. Write information (for example, a binary “1”). Further, when the execution of one task is completed, the task management means writes information indicating that there is no execution request (for example, a binary number "0") into the corresponding storage unit of the task execution request register. In this way, the task execution request register is updated in accordance with the generation and disappearance of execution requests, and always holds the status of the latest task execution request. When executing a task, the contents of the task execution request register are checked to find the task with the highest priority among the tasks for which a task execution request has been made, and this is determined as the task to be executed next. Next, the task management means writes information (binary number "1") indicating that the task is in the execution state into the storage unit of the task status register corresponding to the determined task, and instructs the execution of the task. . If there is no execution request for any task, control is passed to a background task that is executed only in that case. Note that the state of a task is, for example: ■ A stopped state where there is no execution request and is not in a running state, ■ A state where an execution request has been made but it has not started execution yet, ■ A state in which a task is being executed or when execution is interrupted. In some cases, the program may be suspended due to some reasons. According to the present invention, tasks are managed by holding task management resources such as task execution requests, task states, and priorities in registers, thereby speeding up multitasking task switching processing and improving task execution efficiency. It can be made higher. In addition, the data structure is simplified by using only the minimum necessary task management resources, which, together with the use of registers that do not require memory access, further increases task execution efficiency. I can do it.

【実施例] 以下、図面に示す実施例より本発明の詳細な説明する。 第1図は、本発明の実施例の構成を示すブロック図であ
り、第2図は第1図におけるレジスタの構成を説明する
ための図である。 この実施例は、第1図に示すように、タスクに対する実
行要求のを無を各タスクごとに記憶するタスク実行要求
レジスタ1と、タスクの状態を各タスクごとに記憶する
タスク状態レジスタ2と、タスクの切替の管理をするス
ケジューラ(タスク管理手段)3と、複数のタスクを含
むタスク群4とを備えている。 タスク実行要求レジスタ1およびタスク状態レジスタ2
は、それぞれn+1個のタスク#0〜#nに対応するn
+1ビットの記憶位置を有している。すなわちレジスタ
の各ビットは、そのビット番号に等しいタスク番号を持
つタスクが関連づけられている。従ってこれら二つのレ
ジスタのサイズであるビット数が本実施例の方式によっ
て制御できるタスクの数を左右する。また、タスク番号
の値が優先順位を表し、その値の大小関係が優先度とな
って表れるようになっている。 タスク実行要求レジスタ1の各ビットはそれに対応する
タスクに対する実行要求の有無を表す。 第4図に示すように、“0″は実行要求の無いことを表
し、′1”は実行要求のあることを表す。 タスク状態レジスタ2は、実行中であったがより優先度
の高いタスクの実行によって中断されている( Pre
empted )状態、または現在実行中(Run)の
場合に“l”となり、それ以外の場合(Co閣plet
e 、 Ready )には“0”となる。 そのタスクの状態には、第3図に示すように、「停止(
Coi+plete)」r待機(Ready) J  
r実行(Run)J「中断(Pree++pted) 
Jの4個の状態がある。「停止」は実行要求が無い状態
を意味し、「待機」は実行要求は発生しているが、実行
権を得ていない状態を意味し、「実行」は実行権を獲得
し、そのタスクが実行中である状態を意味し、「中断」
は実行状態にあったタスクが、割込処理ルーチンの実行
によりその処理を中断されている状態を意味する。 以上4つの状態と各レジスタの対応するビットとの関係
は、タスク実行要求レジスタ1の値が“0″ならば停止
状態、タスク実行要求レジスタ1の値が“1”かつタス
ク状態レジスタ2の値が“0”ならば待機状態、タスク
実行要求レジスタ1の値が“1″かつタスク状態レジス
タ2の値が“1”ならば中断状態または実行状態を表す
。。 スケジューラ3は、タスク実行要求レジスタ1およびタ
スク状態レジスタ2を用いて、タスク切替の制御と管理
をするものである。次に掲げる各場合(1)(2)(3
)に分けてスケジユーラ3の処理を説明する。 (1) タスク実行要求の発生 実行を要求するタスクがタスク実行要求レジスタ1上の
被要求タスクに対応したビットを“1″にすることによ
りそのタスクへの実行要求の発生をスケジューラ3へ伝
える。スケジューラ3はタスク実行要求レジスタlを参
照し、被要求タスクの優先順位がその時点で実行要求の
発生しているタスクの中で最高位のものであればタスク
状態レジスタ2の該当ビットを“1”にセットして、そ
のタスクが実行中であることを表示した後、即座にその
タスクの実行を開始する。それ以外の場合には実行を要
求したタスクの処理を再開する。 (2) タスクの実行終了 あるタスクの実行が終了した場合、まずスケジューラ3
は、タスク実行要求レジスタlとタスク状態レジスタ2
の二つのレジスタの該当ビットを“0”にし、要求され
た実行が終了してタスクが「停止」状態になったことを
表示する。このようにして最高位の優先順位を持ったタ
スクの実行が終了したので、その次に優先順位が高いタ
スクを二つのレジスタ1,2を見て捜す。もし最高位の
優先順位を持つタスクの状態が「中断」であった場合も
しくは実行要求の発生しているタスクが無かった場合に
は、実行が終了したタスクの直前に実行されていたタス
クへ実行権を戻す。それ以外つまり「待機」状態のタス
クの優先順位が一番高い場合には新たにそのタスクの実
行を開始する。 (3) 割込の発生 割込が発生した場合には、その割込に関連付けられた割
込処理ルーチンが実行される。この時に実行中のタスク
が存在した場合には、そのタスクの状態は「実行」から
「中断」に移行される。そして割込処理ルーチンの実行
終了後、割込発生前に実行されていたタスクは再び「実
行」状態に復帰される。また、この割込処理ルーチンの
中で任意のタスクに実行要求を発行することも可能であ
る。その場合には、前項(2)のタスクの実行終了時の
処理と同様の処理によって次に実行されるべきタスクが
決定される。 以上に、本実施例の基本的動作について説明したが、こ
こで具体的な例を挙げて動作を説明する。 第5図は動作フローの一例を示す図である。 ここに32ビツトのレジスタが2つあるものとし、これ
らをそれぞれタスク実行要求レジスタ1とタスク状態レ
ジスタ2として割り当てる。また、説明のためにタスク
#1とタスク#2という構成を定義する。 スケジューラ3ははじめにタスク実行要求レジスタ1と
タスク状態レジスタ2を初期化する(第5図ステップ5
1)。 現在実行状態にあるタスク#1から実行要求を何も受け
ていない停止状態のタスク#2への実行要求が発生した
と仮定する。そうすると、まず要求元タスクがタスク実
行要求レジスタ1内の要求先タスクのビットを“1″に
セットすることにより要求先タスクを実行させたい旨を
表示する(ステップ53)。 ここでスケジューラ3が要求元タスクと要求先タスクの
優先順位を比較してその値の高い方のタスクに実行権を
移す(ステップ54)。結果として優先順位の高い方が
要求元であればこれ以上例もせずに要求元タスクの実行
を継続する。 その逆に要求先タスクの優先順位の方が高ければ、タス
ク状態レジスタ2のビットを“1”にセットして実行状
態に入ったことを表示する(ステップ56)。そして、
タスクの実行を開始する(ステップ57)。第6図の例
においてはタスク#2の方が優先順位が高いため、タス
ク#2が即座に実行される。 タスクの実行終了によりスケジューラ3に制御が渡る。 ここではタスク実行要求レジスタ1とタスク状態レジス
タ2内のビットのうち、実行を終了したタスクに対応す
るビットを“0”にし、実行要求の存在と実行状態にあ
ることの表示を抹消する(ステップ58.59)。 そして、実行要求の表示が有りかつ優先順位の一番高い
タスク、つまり第6図の場合にはタスク#1しかないの
でこのタスク#1に再び実行権が戻る(ステップ54)
。 実行すべきタスクが無くなった場合には、バックグラウ
ンドタスクへ制御を移し、新たなタスクの実行要求の発
生を待つ。 以上が基本的なタスク切替動作の例であるが、次に割込
発生時の動作例を説明する。 第7図に示すように、タスク#1の実行中に、ある割り
込みが発生したと仮定する。そうするとこの割り込みに
関連付けられた割り込み処理ルーチンに制御が渡る。こ
の例では、この割り込み処理ルーチンの中でタスク#2
の実行を要求するものとする。そのためにタスク実行要
求レジスタ1内のタスク#2のビットを“1”にセット
する。 その後、この割り込み処理ルーチンを終了する際に再び
タスクのスケジュールが行われ、その結果、割り込み発
生前に実行されていたタスク#1よりも割り込み処理ル
ーチンの中で新たに実行を要求されたタスク#2の方が
優先順位が高いため、タスク#1には戻らずにタスク#
2の実行が開始される。 【発明の効果】 本発明によれば、タスク実行要求、タスクの状態、優先
順位等のタスク管理資源をレジスタに保持して、タスク
の管理をするので、マルチタスクのタスク切替処理を高
速化し、タスクの実行効率を高くすることができる。 また、本発明は、タスク管理資源として、最小限必要な
もののみを用い、データ構造を開路化しているので、メ
モリアクセスの必要がないレジスタの使用と相俟って、
タスクの実行効率を一層高くすることができ、簡易タス
クモニタとして有用である。
[Examples] The present invention will be described in detail below using examples shown in the drawings. FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention, and FIG. 2 is a diagram for explaining the configuration of the register in FIG. 1. As shown in FIG. 1, this embodiment includes a task execution request register 1 that stores execution requests for each task and a task status register 2 that stores the status of each task for each task. It includes a scheduler (task management means) 3 that manages task switching, and a task group 4 that includes a plurality of tasks. Task execution request register 1 and task status register 2
is n corresponding to n+1 tasks #0 to #n, respectively.
It has +1 bit storage location. That is, each bit of the register is associated with a task having a task number equal to the bit number. Therefore, the number of bits that are the sizes of these two registers influences the number of tasks that can be controlled by the method of this embodiment. Further, the value of the task number represents the priority, and the magnitude relationship between the values is expressed as the priority. Each bit of the task execution request register 1 indicates whether there is an execution request for the corresponding task. As shown in Figure 4, "0" indicates that there is no execution request, and '1' indicates that there is an execution request. is interrupted by the execution of ( Pre
It is “l” if it is in the empty state or currently running (Run), and otherwise it is
e, Ready) is “0”. As shown in Figure 3, the status of the task is "Stopped (
Coi+plete)"rReady J
rRun J ``Pree++pted''
There are four states of J. "Stopped" means that there is no execution request, "Waiting" means that an execution request has been issued but the execution right has not been obtained, and "Running" means that the execution right has been acquired and the task is "Suspended" means that it is running.
means a state in which a task that was in an execution state has its processing interrupted due to execution of an interrupt processing routine. The relationship between the above four states and the corresponding bits of each register is that if the value of task execution request register 1 is "0", the state is stopped, and the value of task execution request register 1 is "1" and the value of task status register 2. If the value is "0", it represents a standby state, and if the value of the task execution request register 1 is "1" and the value of the task status register 2 is "1", it represents a suspended state or an execution state. . The scheduler 3 uses the task execution request register 1 and the task status register 2 to control and manage task switching. In each of the following cases (1) (2) (3)
) The processing of the scheduler 3 will be explained separately. (1) Generation of a task execution request The task requesting execution sets the bit corresponding to the requested task in the task execution request register 1 to "1" to notify the scheduler 3 of the generation of an execution request to that task. The scheduler 3 refers to the task execution request register l, and if the priority of the requested task is the highest among the tasks for which an execution request has been issued at that time, the corresponding bit of the task status register 2 is set to "1". ” to indicate that the task is running and then immediately start running the task. In other cases, processing of the task that requested execution is resumed. (2) Termination of task execution When the execution of a certain task is finished, first the scheduler 3
is task execution request register l and task status register 2
The corresponding bits in the two registers are set to "0" to indicate that the requested execution has been completed and the task is in the "stopped" state. In this way, the execution of the task with the highest priority is completed, and the task with the next highest priority is searched for by looking at the two registers 1 and 2. If the state of the task with the highest priority is "suspended" or if there is no task that has an execution request, execute the task that was being executed immediately before the task that finished executing. return rights. Otherwise, if the task in the "standby" state has the highest priority, execution of that task is newly started. (3) Occurrence of interrupt When an interrupt occurs, the interrupt processing routine associated with the interrupt is executed. If there is a task being executed at this time, the state of that task is transitioned from "executing" to "suspended." After the execution of the interrupt processing routine is completed, the tasks that were being executed before the occurrence of the interrupt are returned to the "executing" state. It is also possible to issue an execution request to any task within this interrupt processing routine. In that case, the task to be executed next is determined by the same process as the process at the end of task execution in the previous section (2). The basic operation of this embodiment has been explained above, and now the operation will be explained using a specific example. FIG. 5 is a diagram showing an example of an operation flow. Here, it is assumed that there are two 32-bit registers, and these are assigned as task execution request register 1 and task status register 2, respectively. Furthermore, for the sake of explanation, a configuration of task #1 and task #2 will be defined. The scheduler 3 first initializes the task execution request register 1 and the task status register 2 (step 5 in Figure 5).
1). Assume that an execution request is issued from task #1, which is currently in the execution state, to task #2, which is in the stopped state and has not received any execution request. Then, first, the requesting task indicates that it wants the requested task to be executed by setting the bit of the requested task in the task execution request register 1 to "1" (step 53). Here, the scheduler 3 compares the priorities of the requesting task and the requesting task and transfers the execution right to the task with the higher value (step 54). As a result, if the one with the higher priority is the request source, the request source task continues to be executed without any further steps. Conversely, if the requested task has a higher priority, the bit in the task status register 2 is set to "1" to indicate that the task has entered the execution state (step 56). and,
Start execution of the task (step 57). In the example of FIG. 6, task #2 has a higher priority, so task #2 is executed immediately. When the execution of the task ends, control is passed to the scheduler 3. Here, among the bits in the task execution request register 1 and the task status register 2, the bit corresponding to the task that has finished execution is set to "0", and the presence of the execution request and the indication that it is in the execution state are erased (step 58.59). Then, since there is only one task with an execution request displayed and the highest priority, that is, task #1 in the case of FIG. 6, the execution right is returned to task #1 (step 54).
. If there are no more tasks to execute, control is transferred to a background task and waits for a new task execution request. The above is an example of the basic task switching operation. Next, an example of the operation when an interrupt occurs will be explained. As shown in FIG. 7, it is assumed that an interrupt occurs during the execution of task #1. Control then passes to the interrupt handling routine associated with this interrupt. In this example, task #2 is executed in this interrupt handling routine.
shall be required to carry out the following. For this purpose, the bit of task #2 in task execution request register 1 is set to "1". Thereafter, when this interrupt handling routine ends, the task is scheduled again, and as a result, task #1 that is newly requested to be executed in the interrupt handling routine is given priority over task #1 that was being executed before the interrupt occurred. Since task #2 has a higher priority, it does not return to task #1.
2 is started. [Effects of the Invention] According to the present invention, task management resources such as task execution requests, task states, priorities, etc. are held in registers to manage tasks, thereby speeding up multitasking task switching processing. Task execution efficiency can be increased. In addition, the present invention uses only the minimum necessary resources as task management resources and has an open-circuit data structure, so in conjunction with the use of registers that do not require memory access,
It can further improve task execution efficiency and is useful as a simple task monitor.

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

第1図は、本発明の実施例の構成を示すブロック図であ
る。 第2図は第1図におけるレジスタの構成を説明するため
の図である。 第3図はタスクの動作状態の遷移を説明するための図で
ある。 第4図はタスクの状態と各レジスタの値との対応を示す
図である。 第5図は本発明の実施例に動作の一例を示す動作フロー
図である。 第6図はタスクの切替を説明するための図である。 第7図は割り込みによるタスクの切替を説明するための
図である。 1・・・タスク実行要求レジスタ、2・・・タスク状態
レジスタ、3・・・スケジューラ、4・・・タスク実行
手段。 特許出願人 富士ゼロックス株式会社 代 理 人 弁理士 岩上昇 第1図 高い 優先順位 ビット番号 応 低い 応 第3図 第4図 第6図 第7図
FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a diagram for explaining the configuration of the register in FIG. 1. FIG. 3 is a diagram for explaining the transition of the operational state of a task. FIG. 4 is a diagram showing the correspondence between the state of a task and the value of each register. FIG. 5 is an operation flow diagram showing an example of the operation of the embodiment of the present invention. FIG. 6 is a diagram for explaining task switching. FIG. 7 is a diagram for explaining task switching due to an interrupt. DESCRIPTION OF SYMBOLS 1...Task execution request register, 2...Task status register, 3...Scheduler, 4...Task execution means. Patent Applicant Fuji Xerox Co., Ltd. Agent Patent Attorney Iwatori Figure 1 High priority bit number Low priority Figure 3 Figure 4 Figure 6 Figure 7

Claims (1)

【特許請求の範囲】 複数のタスクに対応する複数の記憶単位を有し、それら
の記憶単位の配列がタスクの優先順位に対応し、各記憶
単位にタスクの実行要求の有無を格納するタスク実行要
求レジスタと、 複数のタスクに対応する複数の記憶単位を有し、それら
の記憶単位の配列がタスクの優先順位に対応し、各記憶
単位にタスクの状態を格納するタスク状態レジスタと、 タスク要求レジスタの内容に基づいて、最も優先順位の
高いタスクがどれであるかを判定し、そのタスクに対応
するタスク状態レジスタの記憶単位に実行状態であるこ
とを示す情報を格納するとともに、そのタスクの実行を
指示するタスク管理手段と を備えたことを特徴とするマルチタスク管理方式。
[Claims] A task execution system that has a plurality of memory units corresponding to a plurality of tasks, the arrangement of these memory units corresponds to the priority of the tasks, and the presence or absence of a task execution request is stored in each memory unit. a request register; a task state register having a plurality of storage units corresponding to a plurality of tasks, an arrangement of the storage units corresponding to the priorities of the tasks, and storing the state of the task in each storage unit; Based on the contents of the register, it is determined which task has the highest priority, and information indicating that the task is in the execution state is stored in the memory unit of the task status register corresponding to that task. A multi-task management method characterized by comprising a task management means for instructing execution.
JP12923190A 1990-05-21 1990-05-21 Multi-task control system Pending JPH0424828A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12923190A JPH0424828A (en) 1990-05-21 1990-05-21 Multi-task control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12923190A JPH0424828A (en) 1990-05-21 1990-05-21 Multi-task control system

Publications (1)

Publication Number Publication Date
JPH0424828A true JPH0424828A (en) 1992-01-28

Family

ID=15004413

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12923190A Pending JPH0424828A (en) 1990-05-21 1990-05-21 Multi-task control system

Country Status (1)

Country Link
JP (1) JPH0424828A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6702352B2 (en) 2001-12-25 2004-03-09 Moriroku Kabushiki Kaisha Console for vehicle
WO2007020739A1 (en) * 2005-08-15 2007-02-22 Sony Computer Entertainment Inc. Scheduling method, and scheduling device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6702352B2 (en) 2001-12-25 2004-03-09 Moriroku Kabushiki Kaisha Console for vehicle
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

Similar Documents

Publication Publication Date Title
US5613114A (en) System and method for custom context switching
US7441240B2 (en) Process scheduling apparatus, process scheduling method, program for process scheduling, and storage medium recording a program for process scheduling
US6272517B1 (en) Method and apparatus for sharing a time quantum
US6430594B1 (en) Real-time operating system and a task management system therefor
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
US9870252B2 (en) Multi-threaded processing with reduced context switching
US9135060B2 (en) Method and apparatus for migrating task in multicore platform
KR100509794B1 (en) Method of scheduling jobs using database management system for real-time processing
KR101400286B1 (en) Method and apparatus for migrating task in multi-processor system
EP0969380A2 (en) Method for efficient non-virtual main memory management
US20090083746A1 (en) Method for job management of computer system
US20050283785A1 (en) Preemptive multi-tasking with cooperative groups of tasks
JPH04195577A (en) Task scheduling system for multiprocessor
US8032884B2 (en) Thread hand off
WO2005046304A2 (en) Method and system for allocation of special purpose computing resources in a multiprocessor system
GB2348306A (en) Batch processing of tasks in data processing systems
US7032099B1 (en) Parallel processor, parallel processing method, and storing medium
US5355488A (en) Method for adaptively building a library of program threads
EP0676693A2 (en) Method and system for dynamically selecting a communication mode
EP0913770A2 (en) Method and apparatus for sharing a time quantum
US6820153B2 (en) Interrupt processing and memory management method in an operation processing device and a device using the same
CN111158875A (en) Multi-module-based multi-task processing method, device and system
JPH0424828A (en) Multi-task control system
JP3019317B2 (en) Process scheduling method
JP3349547B2 (en) Scheduling system