JPH01154237A - Executing device for time-division task - Google Patents

Executing device for time-division task

Info

Publication number
JPH01154237A
JPH01154237A JP62312716A JP31271687A JPH01154237A JP H01154237 A JPH01154237 A JP H01154237A JP 62312716 A JP62312716 A JP 62312716A JP 31271687 A JP31271687 A JP 31271687A JP H01154237 A JPH01154237 A JP H01154237A
Authority
JP
Japan
Prior art keywords
task
time
execution
queue
executing
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
JP62312716A
Other languages
Japanese (ja)
Inventor
Koichi Yoshida
孝一 吉田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP62312716A priority Critical patent/JPH01154237A/en
Publication of JPH01154237A publication Critical patent/JPH01154237A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To complete the execution of a time-division task within a prescribed time by adding previously priority order to the task executing queues and heightening the order of a task of a low priority order that is not executed even though it scheduled executing time passed at the time-division parallel execution. CONSTITUTION:The register files are set in the same number as the task executing queues and at the same time each register file contains a data register for scheduled task executing time. Then the corresponding data register value is set to a counter of a system. The executing priority order of the relevant task is heightened in case the system counter exceeds the scheduled task executing time of the task executing queue when said task is carried out. Thus plural tasks are carried out in time division and in parallel with each other.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、マイクロプロセッサ−を用いて制御するシス
テムにおいて、2つ以上のタスク(仕事)を1つのマイ
クロプロセッサ−で時分割に実行し、優先順位を持つ複
数のキューでタスクを実行し、実行待ちのタスクは各々
指定されたキューに対する待行列にキューインされ、存
在するキューの数までのタスクの時分割並列処理を可能
とする時分割マルチタスク実行装置に関するものである
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention is directed to a system controlled using a microprocessor, in which two or more tasks (jobs) are executed in a time-sharing manner by one microprocessor, and the priorities are determined. Time-sharing multitasking allows tasks to be executed in multiple queues, and each task waiting to be executed is queued to a designated queue, allowing time-sharing parallel processing of tasks up to the number of queues that exist. It concerns the execution device.

従来の技術 マイクロプロセッサ−を利用してタスクを実行する場合
、1つのマイクロプロセッサ−に対して、レジスタ群、
スタックポインタ、ステータスレジスタ等からなる1組
のレジスタファイルを準備し、マイクロプロセッサ−か
らの命令に応じてレジスタファイルに必要なデータを転
送しながらタスクを実行する方式のものが多い。ところ
が、この方式では常時1つのタスクしか実行できないか
ら、実行効率が悪(なる。そこで従来から、1つのマイ
クロプロセッサ−に対して設けられた1組のレジスタフ
ァイルを時分割で使用し、複数のタスクを時分割で実行
する方式が考えられている。そのうち、最も典型的なも
のは、マイクロプロセッサ−の1命令毎にタスクを切り
換える方式である。ところがこの方式では、2つ以上の
タスクを1命令毎に順次切り換えて実行するだけである
から、複数のタスク間に実行時間の優先順位をもたせる
ことができない。しかもタスクを切り換えるたびに、そ
れまでレジスタファイルに格納されていたデータを、−
旦メモリ−(スタック)領域に退避させ、次のタスクに
必要なデータを別のメモリー空間等からレジスタファイ
ルに呼び込む操作が必要となる。このデータの切り換え
時間中はタスクを実行することができず、したがって時
間的なロスが大きくなる。
Conventional technology When a task is executed using a microprocessor, a group of registers,
Many systems prepare a set of register files consisting of stack pointers, status registers, etc., and execute tasks while transferring necessary data to the register file in response to instructions from a microprocessor. However, with this method, only one task can be executed at any time, resulting in poor execution efficiency.Therefore, conventionally, a set of register files provided for one microprocessor is used in a time-sharing manner to execute multiple tasks. Methods for executing tasks in time division have been considered.The most typical method is one in which tasks are switched for each microprocessor instruction.However, in this method, two or more tasks are executed in one Since each instruction is simply switched and executed sequentially, it is not possible to prioritize execution time between multiple tasks.Furthermore, each time a task is switched, the data previously stored in the register file is
It is necessary to first save the data to the memory (stack) area and then read the data needed for the next task from another memory space into the register file. During this data switching time, tasks cannot be executed, resulting in a large time loss.

一方、このような1命令毎のタスク切り換えではなく、
ユーザープログラムによって複数のタスクの時間管理を
行い、割込み処理等を用いてタスク切り換えを行う方式
も知られている。この方式によれば、プログラムの作成
時に予め複数のタスクの実行時間に優先順位を設けるこ
とも可能である。しかし、プログラムによって優先順位
を設定するにはプログラム内容に対する高度な理解が必
要であり、マイクロプロセッサ−を使用するユーザーが
、そのユーザーの仕様に合ったプログラムを作成し、優
先順位を設定することは実際上極めて困難である。しか
も、この場合でも1つのマイクロプロセッサ−に対して
1組のレジスタファイルしか存在しないから、タスクの
切り換えのたびにデータの退避と呼び込みを繰り返す必
要があり、したがって時間的なロスは依然として解消さ
れない。
On the other hand, instead of switching tasks for each instruction,
A method is also known in which a user program manages the time of multiple tasks and tasks are switched using interrupt processing or the like. According to this method, it is also possible to prioritize the execution times of a plurality of tasks in advance when creating a program. However, setting priorities using a program requires a sophisticated understanding of the program contents, and it is difficult for users using microprocessors to create programs that meet the user's specifications and set priorities. This is extremely difficult in practice. Moreover, even in this case, since there is only one set of register files for one microprocessor, it is necessary to repeatedly save and retrieve data each time a task is switched, and therefore time loss still remains unresolved.

このような問題点を解決するために、1つのマイクロプ
ロセッサ−に対して複数のレジスタファイルを準備し、
マイクロプロセッサ−(プログラム)からの命令に従っ
てマルチプレクサ−を切り換え、複数のレジスタファイ
ルを順次切り換えながら複数のタスクを時分割で実行す
る方式もある。このようにすれば、1つのタスクに対し
て1つのレジスタファイルが準備されているから、切り
換え時にデータを退避させたり、呼び込んだりする必要
はなく、したがって時間的なロスは少なくなる。しかし
この場合でも複数のタスクの切り換え設定や各タスクの
実行時間の優先順位はプログラムによって設定しなけれ
ばならない。このためユーザーが、ユーザーの仕様に合
わせてプログラムを作成するには相当大きな負担がかか
ることになる。
In order to solve these problems, multiple register files are prepared for one microprocessor.
There is also a method in which multiplexers are switched according to instructions from a microprocessor (program), and multiple tasks are executed in a time-sharing manner while sequentially switching multiple register files. In this way, since one register file is prepared for one task, there is no need to save or read data at the time of switching, and therefore time loss is reduced. However, even in this case, the settings for switching between multiple tasks and the priority order of the execution time of each task must be set by a program. Therefore, creating a program according to the user's specifications imposes a considerable burden on the user.

発明が解決しようとする問題点 このように、従来複数のタスクを1つのマイクロプロセ
ッサ−で実行させる場合には、仮にレジスタファイルが
複数あったとしても、タスク毎のデータ管理、実行時間
管理、優先順位等をプログラムで設定しなければならな
いため、ユーザーに大きな負担をかけるという問題があ
った。
Problems to be Solved by the Invention As described above, conventionally, when multiple tasks are executed by one microprocessor, even if there are multiple register files, data management, execution time management, and priority management for each task are difficult. There was a problem in that the ranking etc. had to be set programmatically, which placed a heavy burden on the user.

本発明は、タスク実行キュー毎にレジスタファイルを持
ち、実行タスクを切り換える時のデータ退避にかかる時
間的ロスをなくし、また、タスク実行キュー毎にタスク
実行予定時間のデータを持ち、複数のタスクが時分割で
並列実行している時、そのタスクが実行予定時間内に終
了しない時、そのタスクの優先順位を自動的に高め、タ
スクが並列実行しているときにも、そのタスクがある時
間内に実行を終了するように自動的にタスクスケジュー
ルを行なう機能を持たせることにより、従来の問題を解
決するものである。
The present invention has a register file for each task execution queue, eliminates the time loss required for saving data when switching execution tasks, and also has data of scheduled task execution time for each task execution queue, so that multiple tasks can be executed. When a task is executed in parallel using time division, if the task does not finish within the scheduled execution time, the priority of the task is automatically increased, and even when the tasks are executed in parallel, the task is This solves the conventional problem by providing a function to automatically schedule tasks so that they end their execution.

問題点を解決するための手段 本発明は上述の問題点を解決するために、タスク実行キ
ューの数だけレジスタファイルを設けるとともに、各レ
ジスタファイル中にタスク実行予定時間のデータレジス
タを設け、システムのカウンタに対し、そのデータレジ
スタ値を設定し、そのタスクの実行が行なわれていると
き、システムのカウンタが、タスク実行キューのタスク
実行予定時間を越した場合、そのタスクの実行優先順位
を高め、複数のタスクの時分割並列実行をさせるように
したものである。
Means for Solving the Problems In order to solve the above-mentioned problems, the present invention provides register files equal to the number of task execution queues, and also provides a data register for the scheduled task execution time in each register file. The data register value is set for the counter, and if the system counter exceeds the scheduled execution time of the task in the task execution queue while the task is being executed, the execution priority of the task is increased. This allows time-sharing parallel execution of multiple tasks.

作用 このようにすれば、タスク実行キューに対し予め優先順
位をつけておいて、複数のタスクの時分割並列実行を行
なわせている時、優先順位の低いキューがほとんど実行
していないような状況に面しても、その低いキューに対
するタスク実行予定時間を越してもなお実行が終了しな
い時、自動的に優先順位を高めほぼ実行予定時間内にそ
のタスクを終了することが可能となる。
By doing this, you can prioritize the task execution queues in advance, and when multiple tasks are executed in parallel in a time-sharing manner, you can avoid situations where queues with lower priorities are hardly being executed. Even if the task is faced with a low queue and the execution is not completed even after the scheduled execution time, it is possible to automatically raise the priority and finish the task almost within the scheduled execution time.

実施例 本発明の一実施例を図に示すブロック図を用いて詳しく
述べる。この例では2つのタスク実行キューが存在する
場合をのべる。第1図において、レジスタファイル1は
レジスタファイルA。
Embodiment An embodiment of the present invention will be described in detail using the block diagram shown in the figure. This example describes a case where two task execution queues exist. In FIG. 1, register file 1 is register file A.

Bの2つから成る。各レジスタファイルには、レジスタ
群(汎用レジスタあるいはデータレジスタ、データポイ
ンタ等から成る)、スタックポインタ、ステータスレジ
スタ、プログラムカウンターを備えている。タスク実行
予定時間データレジスタ2はレジスタファイル−個に対
し一つ存在し、そのレジスタファイルを使用するタスク
の実行終了予定時間を記憶するデータレジスタである。
It consists of two parts B. Each register file includes a register group (consisting of general-purpose registers, data registers, data pointers, etc.), a stack pointer, a status register, and a program counter. One scheduled task execution time data register 2 exists for each register file, and is a data register that stores the scheduled execution end time of a task using that register file.

システムカウンタ3はシステムより発生される(図示せ
ず)カウントクロックにより自動的にカウントを行うカ
ウンターである。実行キュー指定回路4は、レジスタフ
ァイルAあるいはレジスタファイルBのどちらを使用す
るタスク実行キューを実行させるかを決定する回路であ
る。MPX(マルチプレクサ−)5は、タスク実行予定
時間データレジスタAあるいは同Bのデータのいずれを
使用すべきかを選択する回路である。比較器6は、シス
テムカウンターの値と、タスク実行予定時間データレジ
スタ値との比較を行ない、システムカウンターの値が、
タスク実行予定時間データレジスタの値より大きくなる
と、タスク実行キュー優先順位決定回路へ制御するよう
に信号を発生する回路である。タスク実行キュー優先順
位決定回路7は、比較器6より発生した信号を受け、実
行キュー指定回路4に対し制御信号を発生する回路であ
る。
The system counter 3 is a counter that automatically counts based on a count clock (not shown) generated by the system. The execution queue designation circuit 4 is a circuit that determines which of register file A or register file B is used to execute a task execution queue. MPX (multiplexer) 5 is a circuit that selects which data from the task execution scheduled time data register A or B should be used. The comparator 6 compares the value of the system counter with the scheduled task execution time data register value, and the value of the system counter is
This circuit generates a signal to control the task execution queue priority determination circuit when it becomes larger than the value of the scheduled task execution time data register. The task execution queue priority determination circuit 7 is a circuit that receives the signal generated by the comparator 6 and generates a control signal to the execution queue designation circuit 4.

例として、レジスタファイルAを使用するキューをキュ
ーA、レジスタファイルBを使用するキューをキューB
とする。優先順位として、キューAにAカウントクロッ
ク数の連続実行、キューB l: Bカウントクロック
数の連続実行が設定され、 (Aカウントクロック)〉(Bカウントクロック)の条
件であったとする。この場合キューAは、カウントクロ
ックA回分連続実行し、その後キューAは停止しキュー
Bが、カウントクロックB回分連続実行し、その後、キ
ューAがまたカウントクロックA回分の連続実行を行う
。このようにキューAとキューBが交互に時分割並列実
行を行う、この場合レジスタファイルはA、B別々に持
っているため、キューを切り換える時に生じるオーバヘ
ッドは生じない。ここで、前記の不等式で示した優先順
位によれば、キューAはキューBに対して優先順位が高
(設定されていることになる。
For example, a queue that uses register file A is queue A, and a queue that uses register file B is queue B.
shall be. Assume that the priority order is set for queue A to be executed continuously for the number of A count clocks, and for queue B1 to be executed continuously for the number of B count clocks, and that the conditions are (A count clock)>(B count clock). In this case, queue A continuously executes count clocks A times, then queue A stops, queue B continuously executes count clocks B times, and then queue A again continuously executes count clocks A times. In this way, queue A and queue B perform time-division parallel execution alternately. In this case, A and B have separate register files, so no overhead occurs when switching between queues. Here, according to the priority order shown in the above inequality, queue A has a higher priority order than queue B (it is set).

ここで、 (タスク実行予定時間データレジスタ)〈(システムカ
ウンタ) の条件のもとてタスクの実行が終了すれば、この優先順
位の設定のまま次のタスクがキューインされ、前回と同
様の時分割並列実行を行う。
Here, if the execution of the task is completed under the conditions of (task execution time data register) < (system counter), the next task is queued with this priority setting, and the same process as the previous one is performed. Perform split parallel execution.

次にタスク実行中に、 (タスク実行予定時間データレジスタ)〉(システムカ
ウンタ) の条件が成立した時(この条件は比較器6により常時チ
エツクされている)タスク実行キュー優先順位決定回路
7により、自動的にキューBに対する連続実行するカウ
ントクロック数をA回に設定し、キューAとキューBの
優先順位を同等なものにまでレベルを高め処理を実行す
る。このタスクが終了すると、キューBの連続実行する
カウントクロック数は設定されていたBカウントクロッ
ク数に自動的に再設定される。
Next, during task execution, when the condition (task execution time data register)> (system counter) is satisfied (this condition is constantly checked by the comparator 6), the task execution queue priority determination circuit 7 The number of consecutive count clocks executed for queue B is automatically set to A times, the priorities of queue A and queue B are raised to the same level, and processing is executed. When this task is completed, the number of consecutive count clocks for queue B is automatically reset to the set number of B count clocks.

このようにユーザーは、実行しようとするタスクがシス
テムカウンターに対し、いつまでに終了すべきかをタス
ク実行予定時間データレジスタ2に設定するだけで、自
動的に指定時間内に処理を終了することができる。した
がって、ユーザーが実行プログラムによって優先順位を
操作したり、特別な優先順位処理を行う必要はなく、ユ
ーザープログラムの負担を大幅に軽減することができる
。もちろん、この場合にもレジスタファイルは各タスク
毎に設けられているから、タスク切り換え時のデータの
退避や呼び込みは不要となり、タスク切り換え(実行キ
ューの切り換え)に伴うロスは生じない。
In this way, the user can automatically complete processing within the specified time by simply setting the task execution time data register 2 to indicate when the task to be executed should be completed in the system counter. . Therefore, there is no need for the user to manipulate priorities or perform special priority processing using an execution program, and the burden on the user program can be significantly reduced. Of course, in this case as well, since a register file is provided for each task, there is no need to save or retrieve data when switching tasks, and no loss occurs due to task switching (execution queue switching).

発明の詳細 な説明したように、本発明によれば、簡単な制御回路に
より、ユーザープログラムに負担をかけずに1つのマイ
クロプロセッサ−で複数個のタスクを時分割で、タスク
毎の優先順位をつけ実行することができる。
As described in detail, according to the present invention, a single microprocessor can time-share multiple tasks and set the priority of each task using a simple control circuit without placing any burden on the user program. It can be carried out.

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

図面は本発明の一実施例の時分割タスク実行装置のブロ
ック図である。 1・・・・・・レジスタファイル、2・・・・・・タス
ク実行予定時間データレジスタ、3・・・・・・システ
ムカウンター、4・・・・・・実行キュー指定回路、5
・・・・・・MPX(マルチプレクサ−)、6・・・・
・・比較器、7・・・・・・タスク実行キュー優先順位
決定回路。
The drawing is a block diagram of a time-sharing task execution device according to an embodiment of the present invention. 1... Register file, 2... Scheduled task execution time data register, 3... System counter, 4... Execution queue specification circuit, 5
...MPX (multiplexer), 6...
...Comparator, 7...Task execution queue priority determination circuit.

Claims (1)

【特許請求の範囲】[Claims] 1つのマイクロプロセッサーで時分割にタスクを切り換
える装置において優先度をつけることができる複数のタ
スク実行キューを備え、各々の前記キューに対応する複
数のレジスタファイルを備え、上記各レジスタファイル
中にはそれぞれタスク実行予定時間を決定するデータレ
ジスタおよび前記タスク実行キューの実行時間を管理す
るカウンタをそなえた時分割タスク実行装置。
A device for switching tasks in a time-sharing manner using one microprocessor is provided with a plurality of task execution queues that can be prioritized, a plurality of register files corresponding to each of the queues, and each of the register files has a plurality of register files. A time-sharing task execution device comprising a data register for determining a scheduled task execution time and a counter for managing the execution time of the task execution queue.
JP62312716A 1987-12-10 1987-12-10 Executing device for time-division task Pending JPH01154237A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62312716A JPH01154237A (en) 1987-12-10 1987-12-10 Executing device for time-division task

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62312716A JPH01154237A (en) 1987-12-10 1987-12-10 Executing device for time-division task

Publications (1)

Publication Number Publication Date
JPH01154237A true JPH01154237A (en) 1989-06-16

Family

ID=18032564

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62312716A Pending JPH01154237A (en) 1987-12-10 1987-12-10 Executing device for time-division task

Country Status (1)

Country Link
JP (1) JPH01154237A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03188531A (en) * 1989-12-18 1991-08-16 Matsushita Electric Ind Co Ltd Time-division multitask executing device
JPH04180131A (en) * 1990-11-14 1992-06-26 Matsushita Electric Ind Co Ltd Interruption processor
JPH06202887A (en) * 1992-12-28 1994-07-22 Matsushita Electric Ind Co Ltd Microcomputer
JPH07182184A (en) * 1991-09-26 1995-07-21 Internatl Business Mach Corp <Ibm> Method for monitoring of overrun state of execution task, method for monitoring and controlling of task-execution -cycle overrun and apparatus for detection of task-execution-cycle overrun
US8549526B2 (en) * 2007-03-20 2013-10-01 Fujitsu Limited Access control apparatus and access control method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60181934A (en) * 1984-02-29 1985-09-17 Fujitsu Ltd Task priority degree controlling system
JPS6243734A (en) * 1985-08-20 1987-02-25 Nec Corp Microprocessor
JPS62145432A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60181934A (en) * 1984-02-29 1985-09-17 Fujitsu Ltd Task priority degree controlling system
JPS6243734A (en) * 1985-08-20 1987-02-25 Nec Corp Microprocessor
JPS62145432A (en) * 1985-12-20 1987-06-29 Nec Corp Data processor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03188531A (en) * 1989-12-18 1991-08-16 Matsushita Electric Ind Co Ltd Time-division multitask executing device
JPH04180131A (en) * 1990-11-14 1992-06-26 Matsushita Electric Ind Co Ltd Interruption processor
JPH07182184A (en) * 1991-09-26 1995-07-21 Internatl Business Mach Corp <Ibm> Method for monitoring of overrun state of execution task, method for monitoring and controlling of task-execution -cycle overrun and apparatus for detection of task-execution-cycle overrun
JPH06202887A (en) * 1992-12-28 1994-07-22 Matsushita Electric Ind Co Ltd Microcomputer
US8549526B2 (en) * 2007-03-20 2013-10-01 Fujitsu Limited Access control apparatus and access control method

Similar Documents

Publication Publication Date Title
EP0384635B1 (en) Adaptive job scheduling for multiprocessing systems
US5390329A (en) Responding to service requests using minimal system-side context in a multiprocessor environment
US7962913B2 (en) Scheduling threads in a multiprocessor computer
US5247671A (en) Scalable schedules for serial communications controller in data processing systems
US5666523A (en) Method and system for distributing asynchronous input from a system input queue to reduce context switches
US6473780B1 (en) Scheduling of direct memory access
US6408324B1 (en) Operating system having a non-interrupt cooperative multi-tasking kernel and a method of controlling a plurality of processes with the system
EP0052713B1 (en) A process management system for scheduling work requests in a data processing system
JPH01154237A (en) Executing device for time-division task
JP4292705B2 (en) Task scheduling device
JP2636722B2 (en) Multitask execution management method
JPH07141208A (en) Multitask processor
JPH0199132A (en) Multi-task executing device
JP2553698B2 (en) Time-division multitasking execution device
KR100728899B1 (en) High Performance Embedded Processor with Multiple Register Sets and Hardware Context Manager
JPH05108380A (en) Data processing system
JP2579008B2 (en) Time-division multitasking execution device
JPH0588917A (en) Job scheduling system
JPH10177489A (en) Task scheduling method
JPH0644234B2 (en) Task management device
JP2903525B2 (en) Job management method
JPH0895803A (en) Task scheduling method
JP3374480B2 (en) Data processing device
JPH01169540A (en) Time division multi-task execution device
JPH0462093B2 (en)