JP3212656B2 - Data processing system and microcomputer - Google Patents

Data processing system and microcomputer

Info

Publication number
JP3212656B2
JP3212656B2 JP35229791A JP35229791A JP3212656B2 JP 3212656 B2 JP3212656 B2 JP 3212656B2 JP 35229791 A JP35229791 A JP 35229791A JP 35229791 A JP35229791 A JP 35229791A JP 3212656 B2 JP3212656 B2 JP 3212656B2
Authority
JP
Japan
Prior art keywords
task
stack
stack area
tasks
execution
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.)
Expired - Fee Related
Application number
JP35229791A
Other languages
Japanese (ja)
Other versions
JPH06168145A (en
Inventor
剛 清水
寛 竹山
学 小早川
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 JP35229791A priority Critical patent/JP3212656B2/en
Publication of JPH06168145A publication Critical patent/JPH06168145A/en
Application granted granted Critical
Publication of JP3212656B2 publication Critical patent/JP3212656B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、オペレーティングシス
テム若しくはオペレーティングシステムプログラム(以
下OSとも記す)のメモリ管理方式に関し、特にOSの
管理の下で中央処理装置が複数のタスク(ユーザープロ
グラム)を実行制御するマルチタスク処理システムにお
いて、作業用のスタック領域を各タスクに割り当てるた
めのスタック制御方式、並びに同制御方式を採用可能な
シングルチップマイクロコンピュータに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory management system for an operating system or an operating system program (hereinafter, also referred to as an OS), and more particularly to a central processing unit which controls execution of a plurality of tasks (user programs) under the management of the OS. The present invention relates to a stack control method for allocating a work stack area to each task and a single-chip microcomputer that can adopt the control method in a multitask processing system.

【0002】[0002]

【従来の技術】マルチタスク処理においては、システム
の処理を独立して並列に処理可能な単位即ちタスクに分
割して、これをオペレーティングシステム(OS)が管
理しながらその実行を制御する。斯るマルチタスク制御
OSは、タスクからのシステムコール(タスクの実行要
求)に対してマイクロプロセッサやその他の資源を優先
度などに応じて当該タスクに割り当ててそのタスクの実
行を制御する。OSは、このときタスクにスタック領域
を割り当てる。このスタック領域は、サブルーチンへの
パラメータの引き渡しやサブルーチンからの戻り番地の
保持並びにタスクの実行を中断したときのレジスタ情報
の待避・復帰処理などに利用される。タスクに割り当て
られるスタック領域が各タスクに夫々固有の領域とされ
ると、登録されるタスクの数又は登録可能なタスクの数
に比例してメモリの使用量が増大する。特に仮想記憶を
サポートしていないデータ処理システムにおいてはスタ
ック領域に使用されるメモリ容量の増大が顕著である。
そこでスタック領域のためのメモリ使用量を削減するた
めの技術として特開昭63−86035号がある。この
特開昭63−86035号は、スタック領域を一括プー
ル化し、必要に応じてそのプールから動的にスタック領
域を切り出してタスクに割り付ける方式を開示してい
る。
2. Description of the Related Art In multitask processing, system processing is divided into units, or tasks, which can be processed independently and in parallel, and the execution is controlled while being managed by an operating system (OS). Such a multitask control OS controls the execution of the task by allocating a microprocessor or other resources to the task in response to a system call (task execution request) from the task according to the priority or the like. At this time, the OS allocates a stack area to the task. This stack area is used for transferring parameters to the subroutine, holding a return address from the subroutine, and saving and restoring register information when execution of a task is interrupted. If the stack area assigned to each task is an area unique to each task, the memory usage increases in proportion to the number of tasks registered or the number of tasks that can be registered. In particular, in a data processing system that does not support virtual storage, the memory capacity used for the stack area is significantly increased.
Japanese Patent Laid-Open No. 63-86035 discloses a technique for reducing the amount of memory used for the stack area. Japanese Patent Application Laid-Open No. 63-86035 discloses a method in which a stack area is collectively pooled, and a stack area is dynamically cut out from the pool as needed and allocated to tasks.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、タスク
の実行要求に応じてプール領域から動的にスタック領域
を切り出してタスクに割り当てる方式においては、その
動的な制御故にOSの処理が複雑化することがわかっ
た。さらに動的にスタック領域を切り出し制御したとし
てもスタック領域が不足しないようにそのプール領域の
記憶容量を定める必要がある。すなわち、同時に実行さ
れるタスクの数を予め計算した上で、プール領域の容量
が決定される。したがって、スタック領域のためのメモ
リ利用効率が低下してしまうことがある。
However, in a method in which a stack area is dynamically cut out from a pool area in response to a task execution request and assigned to a task, the processing of the OS becomes complicated due to the dynamic control. I understood. Further, even if the stack area is dynamically cut out and controlled, it is necessary to determine the storage capacity of the pool area so that the stack area does not become insufficient. That is, the capacity of the pool area is determined after previously calculating the number of tasks to be executed simultaneously. Therefore, the memory utilization efficiency for the stack area may be reduced.

【0004】特に仮想記憶を有しないシステムにおいて
は、タスクに割り付け可能なメモリ容量には物理的な制
限があるので、スタック領域のサイズ(記憶容量)をで
きるだけ小さなサイズにすることが必要になる。特に比
較的規模の小さなデータ処理システム、たとえば、中央
処理装置と周辺の入出力(I/O)機能やランダム・ア
クセス・メモリ(RAM),リード・オンリ・メモリ
(ROM)などを1チップに搭載したシングルチップマ
イクロコンピュータによって制御部が構成されるような
データ処理システムの場合には、限られた記憶容量しか
持たない内蔵RAMを用いて複数のタスクを実行しなけ
ればならず、スタック領域のサイズを更に小さくする必
要性があることを本発明者は見い出した。また、物理的
に限られたメモリ領域の中で、タスクの実行要求毎に動
的にスタック領域を切り出したり、あるいは夫々のタス
クに固有のスタック領域を割り付ける方法は、実行可能
な若しくは登録可能なタスク数に自ずから制限を及ぼす
ことにもなる。
Particularly, in a system having no virtual storage, there is a physical limitation on the memory capacity that can be allocated to a task, so that it is necessary to reduce the size (storage capacity) of the stack area as small as possible. Particularly, a relatively small-scale data processing system, for example, a central processing unit and peripheral input / output (I / O) functions, a random access memory (RAM), a read-only memory (ROM), etc. are mounted on one chip. In the case of a data processing system in which the control unit is configured by a single-chip microcomputer, a plurality of tasks must be executed using an internal RAM having a limited storage capacity, and the size of the stack area is increased. The present inventor has found that it is necessary to further reduce. In addition, a method of dynamically cutting out a stack area for each task execution request in a physically limited memory area or allocating a stack area specific to each task is executable or registered. This naturally limits the number of tasks.

【0005】本発明の目的は、スタック領域をタスクに
割り付ける処理が簡単であって、且つ、スタック領域の
ためのメモリ利用効率を向上させることができるマルチ
タスク処理システムにおけるスタック制御方式を提供す
ることにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a stack control method in a multitask processing system in which a process for allocating a stack area to a task is simple and the efficiency of using a memory for the stack area can be improved. It is in.

【0006】本発明の別の目的は、スタック領域として
割当可能なメモリ領域が限られたデータ処理システムに
おいて、実行可能な若しくは登録可能なタスク数を比較
的多くすることができるマルチタスク処理システムにお
けるスタック制御方式を提供することにある。
Another object of the present invention is to provide a multi-task processing system capable of relatively increasing the number of executable or registerable tasks in a data processing system having a limited memory area that can be allocated as a stack area. It is to provide a stack control method.

【0007】更に本発明はそのようなスタック制御方式
を採用可能な1チップ型のマイクロコンピュータを提供
することを目的とする。
A further object of the present invention is to provide a one-chip microcomputer which can employ such a stack control method.

【0008】本発明の前記並びにその他の目的と新規な
特徴は本明細書の記述及び添付図面から明らかになるで
あろう。
The above and other objects and novel features of the present invention will become apparent from the description of the present specification and the accompanying drawings.

【0009】[0009]

【課題を解決するための手段】本願において開示される
発明のうち代表的なものの概要を簡単に説明すれば下記
の通りである。
The following is a brief description of an outline of a typical invention among the inventions disclosed in the present application.

【0010】本発明に関するオペレーティングシステム
には、同一の優先度を有する複数のタスクに一つのスタ
ック領域を割り当てる様なスタック管理機能が持たせら
れる。したがって、一つのスタック領域は同一優先度を
持つ複数のタスクに対して共用される。但し、一つのス
タック領域を共通利用する複数のタスクは、それらが同
時に実行されないタスクとされ、かつ、それらの実行順
序が予め決定可能なタスクとされる。すなわち、タスク
A,B及びCに一つのスタック領域を共用させる場合、
各タスクA,B及びCの実行順序は、タスクAの実行終
了後、タスクBが実行され、タスクBの実行終了後、タ
スクCが実行されるような実行順序とされるのが良い。
言い換えるならば、共用スタック領域は、排他的に実行
中の一つのタスク(A,B又はC)に割り付けられる。
The operating system according to the present invention has a stack management function for allocating one stack area to a plurality of tasks having the same priority. Therefore, one stack area is shared by a plurality of tasks having the same priority. However, a plurality of tasks that commonly use one stack area are tasks that are not executed at the same time, and tasks whose execution order can be determined in advance. That is, when tasks A, B and C share one stack area,
The execution order of the tasks A, B and C is preferably such that the task B is executed after the execution of the task A, and the task C is executed after the execution of the task B.
In other words, the shared stack area is exclusively allocated to one task (A, B or C) that is executing.

【0011】また、本発明に関するOSは、一つのタス
クに対して一つのスタック領域を専用として割り当てる
ことができる。たとえば、10個のタスクをOSが管理
するとき、OSは、二つのタスクにそれぞれ専用のスタ
ック領域を割り当て、ある同一の優先度を有する四つの
タスクに一つの共用のスタック領域を割り当て、他の同
一の優先度を有する四つのタスクに一つの共用のスタッ
ク領域を割り当てる。結果的に、全スタック領域の数は
10個のタスクがあるにもかかわらず四つとされ得る。
The OS according to the present invention can allocate one stack area to one task for exclusive use. For example, when the OS manages 10 tasks, the OS assigns a dedicated stack area to each of the two tasks, assigns a shared stack area to four tasks having the same priority, and assigns a shared stack area to the other tasks. One shared stack area is allocated to four tasks having the same priority. As a result, the total number of stack areas can be four even though there are ten tasks.

【0012】[0012]

【作用】したがって、本発明に従えば、タスクの総数が
n個(nは正の整数)であってもスタック領域の総数を
m<n(mは正の整数)とすることができるので、スタ
ック領域が割り当てられるべきランダム・アクセス・メ
モリの全メモリ容量に対する全スタック領域の割合を低
減することができる。
Therefore, according to the present invention, even when the total number of tasks is n (n is a positive integer), the total number of stack areas can be set to m <n (m is a positive integer). The ratio of the total stack area to the total memory capacity of the random access memory to which the stack area is to be allocated can be reduced.

【0013】その結果、シングルチップマイクロコンピ
ュータの様に内蔵ランダム・アクセス・メモリ(RA
M)の記憶容量が制限される場合であっても、スタック
領域として利用される記憶容量は、上記RAMの全記憶
容量のわずかとされ得るので、シングルチップコンピュ
ータにマルチタスクのオペレーティングシステムプログ
ラム(OS)を搭載することが可能となる。
As a result, a built-in random access memory (RA) like a single-chip microcomputer
Even if the storage capacity of M) is limited, the storage capacity used as the stack area can be only a small amount of the total storage capacity of the RAM, so that a multi-task operating system program (OS ) Can be mounted.

【0014】[0014]

【実施例】まず最初に本発明に従うオペレーティングシ
ステムに関し説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First, an operating system according to the present invention will be described.

【0015】図5に示されるように、マルチタスク制御
用のオペレーティングシステム(OS)は複数のタスク
P1乃至Piを並列的に管理してその実行を制御する。
As shown in FIG. 5, an operating system (OS) for multitask control manages a plurality of tasks P1 to Pi in parallel and controls their execution.

【0016】図6には、OSがタスクを管理するとき同
タスクが採り得るタスク状態遷移図の一例が示される。
同図に示される遷移状態は、休止状態、実行可能状態、
実行状態、及び待ち状態である。
FIG. 6 shows an example of a task state transition diagram that can be taken by the OS when the OS manages the task.
The transition states shown in the figure are a sleep state, an executable state,
An execution state and a waiting state.

【0017】休止状態とは、タスクがまだ起動されてい
ない状態即ちタスクの実行要求がまだされていない状
態、或いはタスクの実行が終了された状態である。実行
可能状態とは、タスクを実行可能な状態であるが、優先
度の高い他のタスクなどが実行されているためプロセッ
サが割り付けられず待っている状態である。前記実行状
態とは、タスクにプロセッサが割り付けられて現在実行
中の状態である。前記待ち状態とは、タスクが、プロセ
ッサ以外の資源の獲得を待っている、又は何らかの事象
の発生を待っている状態である。
The dormant state is a state in which the task has not been started yet, that is, a state in which the execution of the task has not been requested, or a state in which the execution of the task has been completed. The executable state is a state in which a task is executable, but a state in which a processor is not allocated and waits because another high-priority task or the like is being executed. The execution state is a state in which a processor is allocated to a task and is currently being executed. The waiting state is a state in which the task is waiting for the acquisition of a resource other than the processor or the occurrence of some event.

【0018】本発明に従うOSは、複数のタスクに同一
スタック領域を共有させるようなメモリ管理機能を含ま
せられている。本発明のOSは、例えば図4示されるよ
うに、優先度が同一レベルであって実行順序が相互に予
め決定されるようなタスク群に同一のスタック領域を共
有させるように、スタック領域の割り当てを制御する。
図4では、タスクP2,P3,P4のスタック領域B、
タスクP5,P6,P7のスタック領域C、タスクP
8,P9,P10のスタック領域Dが夫々共有スタック
領域とされる。
The OS according to the present invention includes a memory management function that allows a plurality of tasks to share the same stack area. For example, as shown in FIG. 4, the OS of the present invention allocates a stack area so that a task group whose priority is the same level and whose execution order is mutually predetermined is shared by the same stack area. Control.
In FIG. 4, the stack areas B of the tasks P2, P3 and P4,
Stack area C of tasks P5, P6, and P7, task P
The stack areas D of 8, P9, and P10 are each a shared stack area.

【0019】尚、タスクP1,P11には、それぞれス
タック領域A及びEが専用スタック領域として割り当て
られる。そして、本発明のOSは、個々の共有スタック
領域に対しては、タスクの実行開始から終了までを単位
として、前記共有スタック領域に対するタスクの割り付
けを排他的に制御する。
The tasks P1 and P11 are assigned stack areas A and E, respectively, as dedicated stack areas. Then, the OS of the present invention exclusively controls the assignment of the task to the shared stack area for each shared stack area in units from the start to the end of the execution of the task.

【0020】図1は、本発明のOS内に含ませられる前
記排他的な制御のプログラムフローチャートの例が示さ
れている。すなわち、タスクの実行が要求されたとき、
スタック領域を共有する他のタスクが実行中であるか否
か(換言すれば当該共有スタック領域を他のタスクが使
用しているか否か)が判定される(S11)。その結果
他のタスクが実行中でないと判定されれば、OSは当該
タスクを実行可能にする(S12)。一方、他のタスク
が実行中であると判定されれば、OSは当該タスクの実
行開始即ち実行可能な状態への遷移を遅延させる(S1
3)。
FIG. 1 shows an example of a program flowchart of the exclusive control included in the OS of the present invention. That is, when task execution is requested,
It is determined whether another task sharing the stack area is being executed (in other words, whether another task is using the shared stack area) (S11). As a result, if it is determined that another task is not being executed, the OS enables the task to be executed (S12). On the other hand, if it is determined that another task is being executed, the OS delays the start of execution of the task, that is, the transition to the executable state (S1).
3).

【0021】図3は、タスクの実行開始を遅延させる前
記処理の一例を示している。たとえば、図4のようにス
タック領域Bを利用してタスクP2が実行状態にあると
きに,同スタック領域を共有する他のタスクP3,P4
の実行が要求されると、当該共有スタック領域Bに固有
のスタック行列管理ポインタ(後述するBp)にそれら
タスクP3,P4を繋いで待ち行列を形成するような処
理を採用することができる。この待ち行列は、例えば、
先入れ先出し(FIFO)のキューイングテーブルで構
成される。
FIG. 3 shows an example of the processing for delaying the start of execution of a task. For example, when the task P2 is in the execution state using the stack area B as shown in FIG. 4, the other tasks P3 and P4 sharing the same stack area
Is required, the tasks P3 and P4 are connected to a stack matrix management pointer (Bp described later) unique to the shared stack area B to form a queue. This queue, for example,
It consists of a first-in first-out (FIFO) queuing table.

【0022】実行要求されたタスクが割り付けられるべ
きスタック領域を容易に認識可能にする為、各タスクに
対し、それが割り付けられるべきスタック領域を指示す
るスタック指示情報若しくはスタック指示データ(後述
するSPD)が設けられる。他のタスクが実行中である
か否かを判定できるようにする為、共有スタック領域に
現在割り付けられているタスクが存在しているか否かを
指示するためのスタック管理変数(Bd)が共有スタッ
ク領域Bに対して設けられる。したがって、OSはタス
クが実行要求されると、そのタスクが割り付けられるス
タック領域を認識するために、そのタスクのスタック指
示情報をアクセスする。その結果、スタック指示情報
が、例えば、共用スタック領域を指示している時、上記
共有スタック領域の為に設けられたスタック管理変数を
アクセスする。その結果、上記スタック領域に現在割り
付けられているタスクが存在すると判定されれば、上記
実行要求されているタスクは、待ち行列に入れられる。
このことは、後述される図12〜図14で詳細に説明す
る。
In order to easily recognize the stack area to which the task requested to be executed is to be allocated, stack instruction information or stack instruction data (SPD to be described later) for each task indicating the stack area to which the task is to be allocated. Is provided. In order to determine whether or not another task is being executed, a stack management variable (Bd) for indicating whether or not the currently allocated task exists in the shared stack area has a shared stack. Provided for region B. Therefore, when a task is requested to be executed, the OS accesses the stack instruction information of the task in order to recognize the stack area to which the task is allocated. As a result, when the stack instruction information indicates, for example, the shared stack area, the stack management variable provided for the shared stack area is accessed. As a result, if it is determined that there is a task currently allocated to the stack area, the task whose execution is requested is put in a queue.
This will be described in detail with reference to FIGS.

【0023】共有スタック領域に対するタスクの前記排
他的な割り付け制御の一貫として、実行開始が遅延され
たタスクの取扱いを考慮する場合には、例えば図2に示
されるように、一つのタスクの実行を終了したとき、ス
タック領域を共有すると共に実行開始が遅延されている
ところの他のタスクが存在するか否かを判定する(S2
1)。この判定の結果、実行開始が遅延されている他の
タスクが存在する場合には、当該実行開始が遅延されて
いる単数若しくは複数のタスクの中から選ばれた一つの
タスクが実行可能状態にされる(S22)。
As a part of the exclusive allocation control of tasks to the shared stack area, when considering the handling of a task whose execution has been delayed, for example, as shown in FIG. Upon completion, it is determined whether or not there is another task sharing the stack area and whose execution is delayed (S2).
1). As a result of this determination, when there is another task whose execution start is delayed, one task selected from one or more tasks whose execution start is delayed is set to the executable state. (S22).

【0024】実行開始が遅延されている他のタスクが存
在するか否かを容易に判定する為、図5に示されたスタ
ック行列管理ポインタBpの値を参照して、当該ポイン
タの値が他のタスクを指しているか否かを判定する。
In order to easily determine whether or not there is another task whose execution has been delayed, the value of the pointer is checked by referring to the value of the stack matrix management pointer Bp shown in FIG. It is determined whether or not it points to the task.

【0025】当該実行開始が遅延されている複数のタス
クの何れを選択するかのOSによる制御は、その待ち行
列に含まれるタスクの優先度の高いものから、或いは待
ち時間の長いものから、又はタスクの実行に要する時間
が短いものから選択させたり、システムの要求に応じて
適宜選択させることもできる。選ばれた一つのタスクを
実行可能にさせる前記処理を比較的簡単にする為、実行
可能なタスクを繋ぐためのレディータスク行列管理ポイ
ンタを設け、これにそのタスクを繋ぐようにされる。
The OS controls which of the plurality of tasks whose execution start is delayed is selected from tasks having higher priority or longer waiting time in tasks included in the queue, or The task can be selected from those having a short execution time, or can be selected as appropriate according to the requirements of the system. In order to relatively simplify the processing for enabling one selected task to be executable, a ready task matrix management pointer for connecting executable tasks is provided, and the task is connected to this.

【0026】上述のスタック制御方式は、1チップ型の
マイクロコンピュータのオペレーティングシステムとし
て有効である。その際マルチタスク処理されるべき複数
のタスクにスタック領域を共有させるとき、一つのタス
クの実行開始から終了までを単位としてそのタスクにそ
のスタック領域を排他的に割り付け制御するための共有
スタック制御領域を確保する機能、すなわちスタック行
列管理ポインタBp、スタック指示情報SPD、スタッ
ク管理変数Bdを設け、それを管理する機能をオペレー
ティングシステムにもたせ、該オペレーティングシステ
ムを搭載すればよい。
The above-described stack control method is effective as an operating system for a one-chip microcomputer. In this case, when a plurality of tasks to be multitasked share a stack area, a shared stack control area for exclusively allocating the stack area to the task in units of execution from the start to the end of the task. That is, a stack matrix management pointer Bp, stack instruction information SPD, and a stack management variable Bd are provided, and an operating system may be provided with a function of managing them, and the operating system may be mounted.

【0027】この様にオペレーティングシステムを構成
すれば下記の効果を得ることができる。複数のタスクに
同一スタック領域を共有させ、タスクの実行開始から終
了までを1単位として共有スタック領域に対するタスク
の割り付けを排他的に待ち行列方式で制御するので、一
括メモリプール化によるスタック領域の動的割り付け制
御や仮想記憶を利用する制御に比べて、スタック領域を
タスクに割り付ける処理プログラムを簡単にできる。同
時に、共有スタック領域を設定するので、マルチタスク
処理システムにおけるスタック領域のためのメモリ容量
を低減可能であり、また、共有スタック領域を複数タス
クで利用するので、メモリ利用効率を向上させることが
できる。このメモリ利用効率は、スタック領域に対する
共有の度合いを増す程に向上する。
By configuring the operating system in this way, the following effects can be obtained. Multiple tasks share the same stack area, and the assignment of tasks to the shared stack area is controlled exclusively in a queue manner from the start to the end of task execution as a unit. A processing program for allocating a stack area to a task can be simplified as compared with a dynamic allocation control or a control using virtual memory. At the same time, since the shared stack area is set, the memory capacity for the stack area in the multitask processing system can be reduced, and the memory use efficiency can be improved because the shared stack area is used by a plurality of tasks. . This memory utilization efficiency improves as the degree of sharing with the stack area increases.

【0028】マルチタスク処理システムにおけるスタッ
ク領域のためのメモリ利用効率の向上は、スタック領域
として割当可能なメモリ領域が限られたデータ処理シス
テムにおいても、実行可能な若しくは登録可能なタスク
数をさほど制限しないように働く。
The improvement of the memory use efficiency for the stack area in the multitask processing system is achieved by limiting the number of tasks that can be executed or registered even in a data processing system in which the memory area that can be allocated as the stack area is limited. Work not to.

【0029】さらに、1チップ型のマイクロコンピュー
タ(シングルチップマイクロコンピュータ)のようにス
タック領域として割当可能なメモリ領域が限られた中で
も、管理すべきタスクを構成する各種ユーザープログラ
ム若しくはアプリケーションプログラムに対してOSの
柔軟な対応を可能にする。
Furthermore, even if the memory area that can be allocated as a stack area is limited as in a one-chip microcomputer (single-chip microcomputer), various user programs or application programs that constitute tasks to be managed are provided. Enables flexible OS support.

【0030】以下、1チップ型のマイクロコンピュータ
(シングルチップマイクロコンピュータ)を用いたデー
タ処理システムに本発明を適用した一実施例について説
明する。
An embodiment in which the present invention is applied to a data processing system using a one-chip microcomputer (single-chip microcomputer) will be described below.

【0031】図7に示されるマイクロコンピュータ10
は、特に制限されないが、オペレーティングシステムプ
ログラム(OS)やタスク(ユーザプログラム若しくは
アプリケーションプログラム)といった動作プログラム
を実行する中央処理装置(CPU)11、上記OSやタ
スクといった動作プログラムなどを保有するROM(リ
ード・オンリ・メモリ)12、前記中央処理装置11の
作業領域やデータの一時記憶領域、例えばスタック領域
などとして利用されるRAM(ランダム・アクセス・メ
モリ)13、入出力(I/O)インタフェース14、タ
イマ15を含み、それらはアドレスバス16、データバ
ス17、及びコントロールバス18によって結合されて
いる。上記マイクロコンピュータ10は、公知の半導体
集積回路製造技術によって単結晶シリコンのような1個
の半導体基板1上に形成されている。
The microcomputer 10 shown in FIG.
Although not particularly limited, a central processing unit (CPU) 11 that executes an operation program such as an operating system program (OS) or a task (a user program or an application program), and a ROM (read) that holds an operation program such as the OS or the task. A memory (only memory) 12, a RAM (random access memory) 13 used as a work area of the central processing unit 11 and a temporary storage area of data, for example, a stack area, an input / output (I / O) interface 14, It includes a timer 15, which is coupled by an address bus 16, a data bus 17, and a control bus 18. The microcomputer 10 is formed on one semiconductor substrate 1 such as single crystal silicon by a known semiconductor integrated circuit manufacturing technique.

【0032】上記タイマ15は、端子T1〜T3を介し
て、外部に設けられたモータM1〜M3の発生するパル
ス信号S1〜S3を受けて、パルス信号の数をカウント
する。前記I/Oインタフェース14は、キーボード5
1からの入力データを端子T4〜T10を介して内部デ
ータバス17に供給し、内部データバス17上のデータ
を端子T14〜Tnを介して表示装置(ディスプレイ)
52に出力する。
The timer 15 receives pulse signals S1 to S3 generated by externally provided motors M1 to M3 via terminals T1 to T3, and counts the number of pulse signals. The I / O interface 14 includes a keyboard 5
1 is supplied to the internal data bus 17 via the terminals T4 to T10, and the data on the internal data bus 17 is supplied to the display device (display) via the terminals T14 to Tn.
52.

【0033】図7のデータ処理システムの動作について
は後で詳述する。
The operation of the data processing system of FIG. 7 will be described later in detail.

【0034】上記OSは、タスク管理、タスク付属同期
管理、同期・通信管理、時間管理、割込み管理などの機
能を含む。以下に、その概要を示すと、(1)タスク管
理(スケジューラを含む)は、CPU(Central
Processing Unit)11をタスクに割
り付ける順序やタスクの起動・終了など、タスクの状態
を管理し、このときタスクは優先順位の高いものから順
にCPUに割り付けられ、(2)タスク付属同期管理
は、タスクの実行中断・再開など、タスクの基本的な同
期処理を行い、(3)同期・通信管理は、イベントフラ
グ、セマフォ、メイルボックスの三つの機能があり、タ
スク間の同期・通信処理を行い、(4)時間管理は、時
間の管理を行うと共に、タスクの実行制御のための時間
監視を行い、(5)割込み管理は、割込み発生時に割込
み処理ハンドラを起動し、割込み処理やタスクへの割込
み発生の連絡を行う。
The OS includes functions such as task management, task-attached synchronization management, synchronization / communication management, time management, and interrupt management. The outline is as follows. (1) The task management (including the scheduler) is performed by the CPU (Central).
(Processing Unit) 11 manages the state of the tasks, such as the order in which the tasks are allocated to the tasks, and the activation and termination of the tasks. At this time, the tasks are allocated to the CPU in descending order of priority. (3) Synchronization and communication management has three functions of event flags, semaphores, and mailboxes, and performs synchronization and communication between tasks. (4) Time management manages time and monitors time for task execution control. (5) Interrupt management activates an interrupt handler when an interrupt occurs, and performs interrupt processing and interrupts to the task. Report the occurrence.

【0035】尚、本発明は、OSのタスク管理スタック
領域割付け機能に関するものなので、上記(2)〜
(5)に示される管理内容に関しては詳細に説明されな
いが、当業者にとって容易に理解されるであろう。
The present invention relates to the task management stack area allocating function of the OS.
Although the management content shown in (5) is not described in detail, it will be easily understood by those skilled in the art.

【0036】前記中央処理装置11は、ROM12に記
憶されたOSを核として各種タスクを所定の手順に従っ
て実行制御する。CPU11は、実行すべきタスクの実
行に際し、そのタスクを構成する動作プログラムをRO
M12から読み込んで解読するため、アドレスバス16
に上記タスクの先頭アドレスに対応するアドレス信号を
送出する。上記ROM12はアドレス信号に対応して、
プログラムデータをデータバス17に送出する。CPU
11は、上記プログラムデータを読み込んでこれを解読
し、その解読結果に応じて各種演算制御や周辺回路の制
御を行う。したがって、CPU11は、OSを実行して
いる動作モード(スーパーバイザモード)とタスク(ユ
ーザープログラム)を実行している動作モード(ユーザ
ーモード)とを有している。上記OSを実行しているC
PU11が、以下において説明される各種のタスク制御
を実行していると見なされる。尚、図7には中央処理装
置11が保有する各種レジスタとして、たとえば、16
ビットのプログラムカウンタPCや8ビットのコンディ
ションコードレジスタCCRのような制御レジスタ、デ
ータレジスタやアドレスレジスタなどとして使われる汎
用レジスタ群Rn、及び現在実行中のタスクに割り付け
られているスタック領域のトップアドレス(先頭アドレ
ス)を指す16ビットのスタックポインタSTKPが代
表的に図示されている。
The central processing unit 11 executes and controls various tasks in accordance with a predetermined procedure using the OS stored in the ROM 12 as a core. When executing a task to be executed, the CPU 11 transmits an operation program constituting the task to the RO.
The address bus 16 is used to read and decode data from the M12.
Sends an address signal corresponding to the head address of the task. The ROM 12 corresponds to the address signal,
The program data is sent to the data bus 17. CPU
Reference numeral 11 reads and decodes the program data, and controls various arithmetic operations and peripheral circuits according to the result of the decoding. Therefore, the CPU 11 has an operation mode (supervisor mode) for executing the OS and an operation mode (user mode) for executing the task (user program). C running the above OS
It is assumed that the PU 11 is performing various task controls described below. FIG. 7 shows various registers held by the central processing unit 11, for example, 16 registers.
Control registers such as a program counter PC of 8 bits and a condition code register CCR of 8 bits, a general-purpose register group Rn used as a data register and an address register, and a top address of a stack area allocated to a task currently being executed ( A 16-bit stack pointer STKP indicating the start address) is representatively shown.

【0037】汎用レジスタ群Rnは、たとえば、それぞ
れが16ビットとされる7本のレジスタR0〜R6を含
む。7本のレジスタR0〜R6の内、たとえば、4本の
レジスタR0〜R3は、各タスクの文脈(プログラム)
内でワークレジスタとして定義される。この様にする理
由は、スタック領域として準備する記憶領域の容量を低
減する為である。しかし、全ての汎用レジスタR0〜R
6をプログラム内でワークレジスタとして定義しても良
い。このスタックされるべき汎用レジスタRnの本数
は、システム構築時に特定することができる。
The general-purpose register group Rn includes, for example, seven registers R0 to R6 each having 16 bits. Of the seven registers R0 to R6, for example, four registers R0 to R3 store context (program) of each task.
Defined as a work register within The reason for this is to reduce the capacity of the storage area prepared as a stack area. However, all the general registers R0 to R
6 may be defined as a work register in the program. The number of the general-purpose registers Rn to be stacked can be specified when the system is constructed.

【0038】図8は、マイクロコンピュータ10のシン
グルチップモードでのアドレスマップを示している。R
OM12は16kバイトとされ、16進アドレス(H′
が付される)で表示するとH′0000からH′3FF
Fをしめる。ROMアドレスH′0000〜H′003
Dは、本発明と直接関係しないので詳細には説明されな
いが、インターラプトベクターテーブルを含む。H′0
03E〜H′3FFFは、図9に示される様に、RAM
13のアドレス領域を後述される図10の様に初期設定
するためのデータテーブルを記憶する領域99、OSプ
ログラムの記憶された領域100、タスクP1〜P11
のプログラムが記憶された領域101〜111、及びス
タック指示データ(SPD)テーブルの記憶された領域
112を含む。このSPDテーブルは、各タスクP1〜
P11に対応して設けられるスタック指示データSPD
1〜SPD11を含む。これら各スタック指示データS
PD1〜SPD11は、各タスクが利用するスタック領
域を示すための情報が記憶される。たとえば、各スタッ
ク指示データSPD1〜SPD11は、対応するスタッ
ク領域のボトムアドレス、すなわち、アドレスマップ上
で割り当てられる各スタック領域の最上位アドレス(終
端アドレス)とされる。尚、ここで図8のアドレスマッ
プ上において、アドレスの上位側とは、アドレスの大き
な方向(H′FFFF方向)を示し、アドレスの下位側
とはアドレスの小さな方向(H′0000方向)を示す
と見なされる。さらに、スタック領域にあるデータがス
タックされる場合、スタックポインタSTKPの値は、
ボトムアドレス(スタック領域のアドレスマップ上での
最上位アドレス)からスタックされるべきデータのバイ
ト数を引いた値へと更新されるものとする。
FIG. 8 shows an address map of the microcomputer 10 in the single chip mode. R
OM12 is 16 kbytes and has a hexadecimal address (H '
H'0000 to H'3FF
Close F. ROM address H'0000 to H'003
D includes interrupt vector tables, which are not described in detail because they are not directly related to the present invention. H'0
03E to H'3FFF are RAMs as shown in FIG.
13, an area 99 for storing a data table for initial setting as shown in FIG. 10 to be described later, an area 100 for storing an OS program, and tasks P1 to P11.
And an area 112 where a stack instruction data (SPD) table is stored. The SPD table includes the tasks P1 to P1.
Stack instruction data SPD provided corresponding to P11
1 to SPD11. Each of these stack instruction data S
PD1 to SPD11 store information for indicating a stack area used by each task. For example, each of the stack instruction data SPD1 to SPD11 is the bottom address of the corresponding stack area, that is, the highest address (end address) of each stack area allocated on the address map. Here, on the address map of FIG. 8, the upper side of the address indicates the larger address direction (H'FFFF direction), and the lower side of the address indicates the smaller address direction (H'0000 direction). Is considered. Further, when data in the stack area is stacked, the value of the stack pointer STKP is:
It is assumed that the value is updated to a value obtained by subtracting the number of bytes of data to be stacked from the bottom address (the highest address on the address map of the stack area).

【0039】図4の様に、各スタック領域を各タスクに
設定する場合、各スタック指示データSPD1〜SPD
11には夫々以下の様なデータがセットされる。 SPD1 スタック領域Aのボトムアドレス SPD2〜4 スタック領域Bのボトムアドレス SPD5〜7 スタック領域Cのボトムアドレス SPD8〜10 スタック領域Dのボトムアドレス SPD11 スタック領域Eのボトムアドレス
As shown in FIG. 4, when setting each stack area for each task, each stack instruction data SPD1 to SPD
The following data is set in 11 respectively. SPD1 Bottom address of stack area A SPD2-4 Bottom address of stack area B SPD5-7 Bottom address of stack area C SPD8-10 Bottom address of stack area D SPD11 Bottom address of stack area E

【0040】したがって、CPU11は、上記スタック
指示データテーブル112内の所望のスタック指示デー
タ記憶領域のアドレスをアドレスバス16に出力し、リ
ード状態を示すコントロール信号をコントロールバス1
8に出力することによって、上記所望スタック指示デー
タ記憶領域をアクセスする。そして、CPU11は、そ
れに応答してROM13からデータバス17に出力され
たアドレスデータをリードすることによって、タスクが
どのスタックに割り当てられているかを識別する。
Therefore, the CPU 11 outputs the address of the desired stack instruction data storage area in the stack instruction data table 112 to the address bus 16 and sends a control signal indicating a read state to the control bus 1.
8 to access the desired stack instruction data storage area. Then, the CPU 11 reads the address data output from the ROM 13 to the data bus 17 in response thereto to identify which stack the task is assigned to.

【0041】RAM13は、図8に示される様に、51
2バイトとされ、16進アドレスで表示すると、H′F
D80〜H′FF7Fに割り当てられる。RAMアドレ
スH′FD80〜H′FF7Fに割当てられる。RAM
アドレスH′FD80〜H′FF7Fは、図10に示さ
れる様に、16バイトのOSスタック領域201、それ
ぞれ12バイトとされる各タスクのタスク管理テーブル
TCB1ないしTCB11を記憶する領域202〜21
3、それぞれ20バイトとされるスタック領域Aないし
E、それぞれ1バイトとされるスタック管理変数Adな
いしEdを記憶する領域214ないし218、それぞれ
2バイトとされるスタック行列管理ポインタApないし
Epを記憶する領域219ないし223、実行待ち行列
管理ポインタXpを記憶する領域24、及び247バイ
トのCPU11の作業領域224を含む。
The RAM 13 stores, as shown in FIG.
When represented by a hexadecimal address, H'F
D80 to H'FF7F. Allocated to RAM addresses H'FD80 to H'FF7F. RAM
Addresses H'FD80 to H'FF7F are, as shown in FIG. 10, an OS stack area 201 of 16 bytes and areas 202 to 21 for storing task management tables TCB1 to TCB11 of 12 bytes each.
3. Stack areas A to E each having 20 bytes, areas 214 to 218 each storing stack management variables Ad to Ed each having 1 byte, and stack matrix management pointers Ap to Ep each having 2 bytes. Areas 219 to 223, an area 24 for storing the execution queue management pointer Xp, and a 247-byte work area 224 for the CPU 11 are included.

【0042】尚、スタック管理変数AdないしEd及び
スタック行列管理ポインタApないしEpの領域214
ないし223は共有スタック制御領域とされる。
The area 214 of the stack management variables Ad to Ed and the stack matrix management pointers Ap to Ep
To 223 are shared stack control areas.

【0043】スタック管理変数領域214〜218には
対応するスタック領域が使用されているか否かを示す情
報、又は対応スタック領域(A〜E)を使用しているタ
スクを特定するための情報、例えば、そのタスクの番号
情報がCPU11によって記述される。
Each of the stack management variable areas 214 to 218 includes information indicating whether a corresponding stack area is used or information for specifying a task using the corresponding stack area (A to E), for example, The CPU 11 describes the task number information.

【0044】スタック行列管理ポインタApないしEp
は対応する共有スタック領域の空きを待っているタスク
を待ち行列に繋ぐためのポインタとされる。
Stack matrix management pointers Ap to Ep
Is a pointer for connecting a task waiting for an empty space of the corresponding shared stack area to a queue.

【0045】図10からも明かなようにスタック領域
(A)とこれに対応する共有スタック制御領域214、
219は連続するアドレスにマッピングされている。従
って、CPU11は、例えば、タスクP2の実行要求が
他のタスク又はキーボード51からされたとき、同タス
クP2の実行に利用するスタック領域がBであること
を、上記内部アドレスバス16にスタック指示データS
PD2を示すアドレスを出力し、内部データバス17に
出力されるスタック指示データSPD2の内容から認識
することができる。その共有スタック領域Bを他のタス
クが使用しているか否かは、スタック指示データSPD
2の内容が指しているアドレスの上位側次アドレスをC
PU11が参照(アクセス)すれば、そこに割り当てら
れているスタック管理変数領域215の保持情報Bpか
ら認識できる。さらに当該スタック領域Bを他のタスク
が使用している場合に当該タスクをスタック待ち行列に
繋げたり、あるいはスタック待ち行列に繋がっているタ
スクを認識したりする場合には、CPU11が、さらに
その次アドレスのスタック行列管理ポインタBpの値を
参照して行列を辿ったりすればよい。したがって、それ
らの手順は極めて簡単になる。1個のタスクに専用化さ
れたスタック領域A,Eのためのスタック管理変数A
d,Edとスタック行列管理ポインタAp,Epは当該
スタック領域が1個のタスクに占有されていることを上
記と同じ手順で認識させるために利用するものである。
したがって、専用スタック領域であることを示す特別な
フラグなどを設け、それをCPU11が参照するような
手順(プログラム)を採用すれば、専用スタック領域
A,Eに関してはスタック管理変数領域214,218
やスタック行列管理ポインタ領域219,223をRA
Mに割り当てなくてもよい。この様にすることによっ
て、RAM13のメモリ容量を有効に利用できる。
As is clear from FIG. 10, the stack area (A) and the corresponding shared stack control area 214,
219 is mapped to consecutive addresses. Therefore, for example, when the execution request of the task P2 is made from another task or the keyboard 51, the CPU 11 informs the internal address bus 16 of the stack instruction data that the stack area used for the execution of the task P2 is B. S
An address indicating PD2 is output and can be recognized from the contents of stack instruction data SPD2 output to internal data bus 17. Whether the shared stack area B is used by another task is determined by the stack instruction data SPD.
The next higher address of the address pointed to by the contents of 2 is C
When the PU 11 refers (accesses), it can be recognized from the holding information Bp of the stack management variable area 215 assigned to the PU 11. Further, when the task is connected to the stack queue when another task is using the stack area B, or when the task connected to the stack queue is recognized, the CPU 11 further proceeds to the next step. The matrix may be traced by referring to the value of the stack matrix management pointer Bp of the address. Therefore, those procedures become extremely simple. Stack management variable A for stack areas A and E dedicated to one task
d and Ed and the stack matrix management pointers Ap and Ep are used to recognize that the stack area is occupied by one task in the same procedure as described above.
Therefore, if a special flag or the like indicating that the area is a dedicated stack area is provided and a procedure (program) that the CPU 11 refers to is used, the stack management variable areas 214 and 218 are used for the dedicated stack areas A and E.
And the stack matrix management pointer areas 219 and 223
It is not necessary to assign to M. By doing so, the memory capacity of the RAM 13 can be used effectively.

【0046】図8のアドレスマップに示される様に、1
12バイトの内蔵レジスタは、16進アドレスで表示す
ると、H′FF90からH′FFFFに割り当てられ
る。これらのレジスタは、I/Oインタフェース14内
のレジスタ及び内蔵周辺回路であるタイマ15内のレジ
スタに対応している。これらのレジスタに関しては、本
発明と直接関係しないので、詳細に説明されないが、当
業者にとって容易に理解されるであろう。
As shown in the address map of FIG.
When the internal register of 12 bytes is represented by a hexadecimal address, it is allocated to H'FF90 to H'FFFF. These registers correspond to registers in the I / O interface 14 and registers in the timer 15 which is a built-in peripheral circuit. These registers are not directly related to the present invention and will not be described in detail, but will be readily understood by those skilled in the art.

【0047】図11にはタスク管理テーブルTCBの一
例が示される。タスク管理テーブルTCBは、対応タス
クの開始アドレス指定領域20、タスクを待ち行列に繋
ぐための各種ポインタ群21、図6に示されるようなタ
スクの状態が記述される領域22、及びタスクの優先度
を記述する領域23などを含む。例えば実行可能状態の
タスクを繋げる待ち行列の先頭はCPU11によって実
行待ち行列管理ポインタ24に記述される。その記述内
容は対応タスクにおけるタスク管理テーブルのポインタ
21Aのアドレスである。夫々のタスク管理テーブルに
おけるポインタを利用して、CPU11は次々にタスク
を繋げる様なことができる。同様にCPU11による前
記スタック待ち行列管理ポインタへの記述は、対応タス
クにおけるタスク管理テーブルのポインタ21Bのアド
レスである。実際には一つのタスクがスタック待ち行列
と実行待ち行列の双方に繋がれることはないので前記ポ
インタ21Aと21Bは同一の領域が使用される。
FIG. 11 shows an example of the task management table TCB. The task management table TCB includes a start address designation area 20 for the corresponding task, a group of various pointers 21 for connecting the task to the queue, an area 22 in which the state of the task as shown in FIG. 6 is described, and a priority of the task. And the like in which an area 23 is described. For example, the head of the queue connecting the tasks in the executable state is described in the execution queue management pointer 24 by the CPU 11. The description content is the address of the pointer 21A of the task management table in the corresponding task. Using the pointers in the respective task management tables, the CPU 11 can connect the tasks one after another. Similarly, the description of the stack queue management pointer by the CPU 11 is the address of the pointer 21B of the task management table in the corresponding task. Since one task is not actually connected to both the stack queue and the execution queue, the same area is used for the pointers 21A and 21B.

【0048】図12にはタスク、スタック領域、及びス
タック制御領域の関係が機能的に示されている。同図に
は共有スタック領域Bと専用スタック領域Aが代表的に
示されている。タスクP2,P3,P4の夫々が利用す
るところのスタック領域がBであることは、夫々のスタ
ック指示データSPD2,SPD3,SPD4が指して
いるRAM13のアドレスによって認識される。タスク
P1が利用するスタック領域がAであることは該タスク
に対応するスタック指示データSPD1が指しているR
AM13のアドレスによって認識される。同図において
タスクP2がスタック領域Bに割り付けられて実行状態
にあるとき、スタック管理変数領域Bdには当該スタッ
ク領域Bを利用しているタスクP2を示す情報(タスク
番号)がCPU11によって書き込まれている。このと
き、スタック領域Bを共有する他のタスクP3の実行要
求があると、CPU11はスタック行列管理ポインタB
pにタスクP3に対応するタスク管理テーブルTCB3
のポインタアドレスをスタック行列管理ポインタBpに
記述して繋ぐ。続いてタスクP4の実行要求があると、
CPU11は更にタスク管理テーブルTCB3のポイン
タにタスクP4に対応するタスク管理テーブルTCB4
のポインタアドレスを記述してスタック待ち行列を形成
する。一方タスクP1の実行が要求されていない状態に
おいては、それ専用のスタック領域Aに対応するスタッ
ク管理変数領域Adは「空き」(即ち未使用)を意味す
る情報がCPU11によって記述されており、また、ス
タック行列管理ポインタApにもタスクを繋ぐための情
報が記述されず「空き」の状態にされている。
FIG. 12 functionally shows the relationship among the task, the stack area, and the stack control area. FIG. 2 representatively shows a shared stack area B and a dedicated stack area A. The fact that the stack area used by each of the tasks P2, P3 and P4 is B is recognized by the address of the RAM 13 pointed to by each of the stack instruction data SPD2, SPD3 and SPD4. The fact that the stack area used by the task P1 is A indicates that the stack indication data SPD1 corresponding to the task indicates R
It is recognized by the address of AM13. In the figure, when the task P2 is allocated to the stack area B and is in the execution state, information (task number) indicating the task P2 using the stack area B is written by the CPU 11 in the stack management variable area Bd. I have. At this time, if there is an execution request for another task P3 sharing the stack area B, the CPU 11 sends the stack matrix management pointer B
The task management table TCB3 corresponding to the task P3 in p
Is described and connected to the stack matrix management pointer Bp. Subsequently, when there is a request to execute the task P4,
The CPU 11 further sets the pointer of the task management table TCB3 to the task management table TCB4 corresponding to the task P4.
Are described to form a stack queue. On the other hand, when the execution of the task P1 is not requested, the CPU 11 describes information indicating “free” (ie, unused) in the stack management variable area Ad corresponding to the dedicated stack area A. Also, information for connecting tasks is not described in the stack matrix management pointer Ap, and the stack matrix management pointer Ap is in an “empty” state.

【0049】図13にはタスクの実行要求に際してのス
タック領域に対するタスク割付制御のフローチャートが
示されている。この内容は、図1に対応された更に詳細
なものに対応する。
FIG. 13 shows a flowchart of the task allocation control to the stack area when a task execution request is made. This content corresponds to the more detailed one corresponding to FIG.

【0050】先ず、休止状態のタスクの中から一つのタ
スクに対して実行要求があると、CPU11は要求され
たタスクのスタック指示データ(SPD)から当該タス
クが利用するスタック領域を求める(S31)。例え
ば、図12においてタスクP2の実行要求があると、C
PU11はタスク2に対応するスタック指示データSP
D2の指すRAM13のアドレスによってスタック領域
Bを認識する。
First, when there is an execution request for one of the tasks in the suspended state, the CPU 11 obtains a stack area used by the task from the stack instruction data (SPD) of the requested task (S31). . For example, in FIG. 12, when there is a request to execute task P2, C
PU11 is stack instruction data SP corresponding to task 2.
The stack area B is recognized based on the address of the RAM 13 indicated by D2.

【0051】次ぎに、CPU11はそのスタック領域B
を使って実行状態にある他のタスクが存在するか否かを
判定するための情報を、スタック領域Bに対応するスタ
ック管理変数領域Bdから求める(S32)。CPU1
1は該スタック管理変数領域の参照の為、前記スタック
指示データを利用する。例えば、図12のタスクP2に
着目すると、CPU11はスタック指示データSPD2
が指すRAM13のアドレスの上位側次アドレスをアク
セスすることによって、対応するスタック管理変数領域
Bdを参照する。
Next, the CPU 11 sets the stack area B
Is used to obtain information for determining whether there is another task in the execution state from the stack management variable area Bd corresponding to the stack area B (S32). CPU1
1 uses the stack instruction data to refer to the stack management variable area. For example, focusing on the task P2 in FIG. 12, the CPU 11 determines that the stack instruction data SPD2
By accessing the next higher address of the address of the RAM 13 indicated by, the corresponding stack management variable area Bd is referred to.

【0052】前記スタック管理変数領域を参照した結
果、その領域が「空き」の状態であれば、CPU11は
当該スタック領域は未使用であると判定する。一方、当
該領域にタスクの番号などの情報が保持されていると
き、CPU11は他のタスクによって使用中であると判
定する(S33)。例えば、図12に示されるように、
スタック管理変数領域BdにタスクP2を意味する情報
が記述されている状態において、そのスタック領域Bを
共有するタスクP3の実行要求に従って、CPU11が
スタック管理変数領域Bdを参照した場合には、タスク
P2が当該スタック領域Bに割り付けられていると判断
する。また、図12においてスタック管理変数領域Ad
が「空き」の状態において、そのスタック領域Aを利用
しようとするタスクP1の実行要求に従って、CPU1
1がスタック管理変数領域Adを参照した場合には、当
該スタック領域Aは未使用であると判定する。
As a result of referring to the stack management variable area, if the area is in an "empty" state, the CPU 11 determines that the stack area is unused. On the other hand, when information such as a task number is held in the area, the CPU 11 determines that the task is being used by another task (S33). For example, as shown in FIG.
In a state where information meaning the task P2 is described in the stack management variable area Bd, when the CPU 11 refers to the stack management variable area Bd in accordance with the execution request of the task P3 sharing the stack area B, the task P2 Is assigned to the stack area B. In FIG. 12, the stack management variable area Ad
Is "empty", the CPU 1 responds to the execution request of the task P1 which intends to use the stack area A.
When 1 refers to the stack management variable area Ad, it is determined that the stack area A is unused.

【0053】ステップS33により使用中であると判定
された場合には、今回実行要求されたタスクをスタック
行列管理ポインタに繋ぐ(S34)。そして斯るタスク
を待ち状態にして実行を遅延させる(ステップS3
5)。例えば、図12に示されように、タスクP2が実
行状態にあるとき、そのスタック領域Bを共有する他の
タスクP3の実行要求があった場合、CPU11は、そ
のタスクP3に対応するタスク管理テーブルTCB3の
ポインタ(図11のポインタ21B)アドレスをスタッ
ク行列管理ポインタBpに記述して繋ぐ。続いてタスク
P4の実行要求があると、更にCPU11はタスク管理
テーブルTCB3のポインタにタスクP4に対応するタ
スク管理テーブルTCB4のポインタアドレスを記述し
てスタック待ち行列を形成する。
If it is determined in step S33 that the task is being used, the task requested to be executed this time is linked to the stack matrix management pointer (S34). Then, the task is put into a waiting state to delay the execution (step S3).
5). For example, as shown in FIG. 12, when the task P2 is in the execution state and there is an execution request for another task P3 sharing the stack area B, the CPU 11 executes the task management table corresponding to the task P3. The pointer (pointer 21B in FIG. 11) address of TCB3 is described and connected to the stack matrix management pointer Bp. Subsequently, when there is a request to execute the task P4, the CPU 11 further describes a pointer address of the task management table TCB4 corresponding to the task P4 in a pointer of the task management table TCB3 to form a stack queue.

【0054】ステップS33により未使用であると判定
された場合、CPU11は対応するスタック管理変数領
域に該当タスク番号を記述する(S36)。そして当該
タスクが実行可能状態にされる(S37)。
If it is determined in step S33 that the task is unused, the CPU 11 writes the corresponding task number in the corresponding stack management variable area (S36). Then, the task is set in an executable state (S37).

【0055】特に、本実施例に従えば、スタック領域を
共有するタスクとスタック領域を占有するタスクとが混
在され、スタック領域AやDのような専用スタック領域
に対してもスタック管理変数が割り当てられている。そ
のため、タスクの実行要求に際してのスタック領域割り
付け制御手順は、共有スタック領域に対しもまた専用ス
タック領域に対しても同じとすることができる。したが
って、OSのプログラム作成が簡単化され得る。
In particular, according to this embodiment, tasks sharing the stack area and tasks occupying the stack area are mixed, and the stack management variables are allocated to the dedicated stack areas such as the stack areas A and D. Have been. Therefore, the stack area allocation control procedure at the time of a task execution request can be the same for the shared stack area and the dedicated stack area. Therefore, the creation of the OS program can be simplified.

【0056】図14にはタスクの実行終了に際してのタ
スク割付制御の一例フローチャートが示される。この内
容は、図2に対応し、実行開始が遅延されたタスクの取
扱いとスタック領域の解放を考慮した更に詳細な内容を
有する。
FIG. 14 is a flowchart showing an example of the task allocation control at the end of the execution of the task. This content corresponds to FIG. 2 and has more detailed contents in consideration of handling of the task whose execution start is delayed and release of the stack area.

【0057】先ず、タスクの実行が終了されるとき、C
PU11は、そのタスクが占有していたスタック領域を
スタック指示データから求める(S41)。次ぎに、C
PU11はそのスタック指示データが指すRAM13の
アドレスを元に対応するスタック行列管理ポインタを参
照してスタック待ち行列にタスクが繋がれているかを判
定するための情報を取得する(S42)。そして、CP
U11はその情報に基づいてスタック待ち行列を構成す
るタスク管理テーブルが存在するか否かを判定する(S
43)。
First, when the execution of the task is terminated, C
The PU 11 obtains the stack area occupied by the task from the stack instruction data (S41). Next, C
The PU 11 refers to the corresponding stack matrix management pointer based on the address of the RAM 13 indicated by the stack instruction data, and acquires information for determining whether a task is connected to the stack queue (S42). And CP
U11 determines whether there is a task management table constituting the stack queue based on the information (S11).
43).

【0058】ステップS43の判定結果により該当する
タスク管理テーブルが存在しない場合には、CPU11
は対応するスタック管理変数に「空き」を意味する情報
を書き込む(S44)。これにより、当該スタック領域
は、その後実行要求された所定のタスクに割り付け可能
になる。
If there is no corresponding task management table as a result of the determination in step S43, the CPU 11
Writes information meaning "empty" in the corresponding stack management variable (S44). As a result, the stack area can be allocated to a predetermined task whose execution has been requested thereafter.

【0059】ステップS43の判定結果によりスタック
待ち行列を構成するタスク管理テーブルが存在してる場
合には、CPU11はスタック待ち行列に含まれる一つ
のタスク管理テーブルを当該スタック待ち行列からはず
して当該スタック待ち行列を更新する(S45)。どの
タスク管理テーブルをはずすかは図2で説明した通り、
スタック待ち行列に含まれるタスクの優先度、或いは待
ち時間の長さ、又はタスクの実行に要する時間の長短な
どを考慮して決定される。そして、CPU11はスタッ
ク待ち行列からはずしたタスク管理テーブルに対応する
タスクの番号などを対応するスタック管理変数領域に記
述する(S46)。さらに、CPU11はスタック待ち
行列からはずしたタスク管理テーブルを今度は実行待ち
行列に加えて当該タスク管理テーブルに対応するタスク
を実行可能な状態にする(S47)。
If the result of the determination in step S43 indicates that there is a task management table constituting the stack queue, the CPU 11 removes one task management table included in the stack queue from the stack queue and removes the stack queue. The matrix is updated (S45). Which task management table to remove, as explained in Fig. 2,
The priority is determined in consideration of the priority of the tasks included in the stack queue, the length of the waiting time, or the length of time required for executing the tasks. Then, the CPU 11 describes the number of the task corresponding to the task management table removed from the stack queue in the corresponding stack management variable area (S46). Further, the CPU 11 adds the task management table removed from the stack queue to the execution queue this time, and makes the task corresponding to the task management table executable (S47).

【0060】上記スタック領域は、特に制限されない
が、タスク内におけるサブルーチンへのパラメータ引き
渡しやサブルーチンからの戻り番地の格納領域、さらに
は相対的に優先度の高いタスクの実行要求などによって
そのときCPUが割り付けられて実行状態にあったタス
クが中断されるようなときに当該中断されるべきタスク
の実行再開に必要な各種レジスタ情報の待避領域などと
して利用される。このレジスタ情報の待避領域には、図
7に示されるようなプログラムカウンタPCの値、コン
ディションコードレジスタCCRの保有値、スタックポ
インタSTKPの値、並びに汎用レジスタ群Rnの保有
データなどが待避される。
Although the stack area is not particularly limited, the CPU may be used in response to a parameter transfer to a subroutine in a task, a storage area for a return address from a subroutine, or a request to execute a task having a relatively high priority. When a task that has been assigned and is in an execution state is interrupted, it is used as a save area for various register information necessary for resuming execution of the task to be interrupted. In the register information save area, the value of the program counter PC, the value held in the condition code register CCR, the value of the stack pointer STKP, the data held in the general-purpose register group Rn, and the like are saved as shown in FIG.

【0061】図15にはタスクの実行状態におけるスタ
ック領域の利用態様の一例が示される。例えばタスクP
2の実行状態に着目すると、その過程において「KEI
SAN」というサブルーチンに分岐するとき、当該タス
クP2が割り付けられる共有スタック領域Bにはそのサ
ブルーチンのためのパラメータ「X,Yが」引き渡され
ると共に、サブルーチンからの戻り番地例えば「100
0番地」が保持される。このときスタックポインタST
KPはスタック指示データSPD2の保有アドレスによ
ってプリセットされ、これをスタック領域Bの開始番地
として保有しており、スタック動作毎に順次デクリメン
トされていく。そして、サブルーチン「KEISAN」
の実行途上において、当該タスクP2よりも優先度の高
いタスク(タスクP2とは異なるスタック領域を利用す
る)例えばタスクP1の実行要求によってそのサブルー
チン「KEISAN」を中断するときは、それまでに利
用していた各種レジスタの情報例えばプログラムカウン
タPC、コンディションコードレジスタCCR、スタッ
クポインタSTKPの値などをスタック領域Bに待避
し、その後で当該タスクP2の実行を中断する。
FIG. 15 shows an example of how the stack area is used in the task execution state. For example, task P
Focusing on the execution state of “KEI 2”,
When branching to the subroutine "SAN", the parameters "X, Y" for the subroutine are delivered to the shared stack area B to which the task P2 is allocated, and the return address from the subroutine, for example, "100"
"0 address" is held. At this time, the stack pointer ST
The KP is preset by the holding address of the stack instruction data SPD2, holds this as the start address of the stack area B, and is sequentially decremented for each stack operation. And the subroutine "KEISAN"
During the execution of the subroutine "KEISAN", if a task having a higher priority than the task P2 (using a stack area different from that of the task P2), for example, a task P1 execution request is interrupted, the subroutine "KEISAN" is used up to that time. The information of the various registers, for example, the value of the program counter PC, the condition code register CCR, the value of the stack pointer STKP, and the like are saved in the stack area B, and thereafter, the execution of the task P2 is interrupted.

【0062】ここで、タスクの登録即ちタスクをOSに
認識可能にする手法は、OSとアプリケーションプログ
ラムとを合成してROMへのロードモジュールを構成す
るようなプログラム構築時にROM上のテーブルでOS
に認識可能にするやり方と、タスクの生成や削除を行う
システムコールを用いる手法がある。このとき、上記説
明では、どのタスクが何れのスタック領域を共有するか
は、夫々のタスクと対を成すスタック指示データによっ
てOSが認識する。したがって、上記共有スタック領域
に対するタスクの割り付け制御をサポートするOSを利
用したシステムにおいて、登録可能なタスク数が全スタ
ック領域の容量に対して余裕があるようなアプリケーシ
ョンプログラムを対象とする場合、必ずしも共有スタッ
ク領域を設定しなくてもよい場合があり、このようなと
き全てのスタック領域をタスクに1対1対応する専用領
域とすることもできる。全てのスタック領域が専用有領
域である場合には、スタック管理変数領域やスタック行
列管理ポインタのようなスタック制御領域を確保しなく
てもよく、タスクの起動要求に応じて対応スタック領域
を単に当該スタック領域に割り付ければよい。これを考
慮すると、上記共有スタック領域に対するタスクの割り
付け制御をサポートするOSには、タスクの登録時に複
数のタスクによるスタック領域共有状態を認識したとき
にスタック管理変数領域やスタック行列管理ポインタの
ようなスタック制御領域を確保する機能を与えておくこ
とにより、システムに最適なスタック領域割り付け制御
を行うことができる。
Here, the method of registering a task, that is, making the task recognizable by the OS, is performed by combining the OS and an application program to construct a load module to be loaded into the ROM.
There is a method of making a task recognizable and a method of using a system call for creating or deleting a task. At this time, in the above description, the OS recognizes which task shares which stack area with the stack instruction data paired with each task. Therefore, in a system using an OS that supports the task allocation control to the shared stack area, if the number of tasks that can be registered is intended for an application program that has a sufficient capacity with respect to the capacity of the entire stack area, it is not necessarily shared. In some cases, it is not necessary to set a stack area. In such a case, all the stack areas may be dedicated areas corresponding to tasks one-to-one. When all the stack areas are dedicated areas, it is not necessary to secure a stack control area such as a stack management variable area or a stack matrix management pointer, and the corresponding stack area is simply allocated in response to a task activation request. Allocate it to the stack area. Considering this, the OS that supports the task allocation control to the shared stack area is provided with an OS such as a stack management variable area and a stack matrix management pointer when a task area registration state recognizes a shared state of the stack area by a plurality of tasks. By providing a function to secure the stack control area, it is possible to perform optimal stack area allocation control for the system.

【0063】図16は、図7のデータ処理システムに適
用されるOSとタスクとのタイムチャートの例を示して
いる。尚、同図には理解を容易とするため、タスクP1
ないしP5のみが示される。尚、これらタスクP1ない
しP5のスタック領域及び優先度は図4に従うものとす
る。
FIG. 16 shows an example of a time chart of the OS and tasks applied to the data processing system of FIG. It should be noted that the task P1 is shown in FIG.
Through P5 are shown. Note that the stack areas and priorities of these tasks P1 to P5 are based on FIG.

【0064】上記データ処理システムが起動されると、
それに応答して初期化プログラム(図示されていな
い)、たとえば、タスクP11が実行され、RAM13
の図9に示される初期化データテーブル99に従って、
図10の様にRAM13のアドレスが初期化される。上
記初期化プログラムの最後プログラム語には、例えばタ
スクP1を実行要求するための命令str_tskP1
が入れられており、上記OSは、それの命令に基づい
て、タスクP1を実行可能状態とする。すなわち、タス
クP1内の命令str_tskはシステムコール命令す
なわち、OS内のタスクを実行状態とするためのサブル
ーチンタスク起動(start−task)を呼びだす
命令とされる。尚、図13に示されるプログラムフロー
チャートがこのサブルーチンに対応する。
When the data processing system is started,
In response, an initialization program (not shown), for example, task P11 is executed, and RAM 13 is executed.
According to the initialization data table 99 shown in FIG.
The address of the RAM 13 is initialized as shown in FIG. The last program word of the initialization program includes, for example, an instruction str_tskP1 for requesting execution of the task P1.
The OS makes the task P1 executable according to the instruction. That is, the instruction str_tsk in the task P1 is a system call instruction, that is, an instruction for calling a subroutine task start (start-task) for bringing a task in the OS into an execution state. The program flow chart shown in FIG. 13 corresponds to this subroutine.

【0065】タスクP1は上記データ処理システムのメ
インプログラムと見なされる。モータM1〜M3を所定
の速度で回転させる様なプログラム及び速度調整の為の
プログラムを含む。図示される様に、タスクP1の内部
プログラムには、タスクP2,P3,P4を実行要求す
る命令str_tskP2,str_tskP3,st
r_tskP4が含まれる。したがって、タスクP1が
タスクP2,P3及びP4を次々と実行要求する。その
結果、システムコール命令str_tskP2に応答
し、OS内のサブルーチンstart−taskが起動
されタスクP2に共有スタック領域Bを割りつけて実行
可能状態とする。そして次のシステムコール命令str
_tskP3に応答して再度サブルーチンスタートタス
ク(start_task)が起動される。上記タスク
P3は上記タスクP2とスタック領域Bを共有しかつ、
既にスタック領域BにタスクP2が割り当てられている
ので、タスクP3はスタック待ち行列につながれること
になる。同様に、システムコール命令str_tskP
4に応答して再度サブルーチンスタートタスク(sta
rt_task)が起動されるが、前記タスクP3同様
にそのタスクP4もスタック領域Bを共有するため、タ
スクP4もまたスタック待ち行列につながれることにな
る。したがってスタック待ち行列は、タスクP3とそれ
につづくタスクP4とがつながれることになる。この時
同様に実行待ち行列にもタスクP3とタスクP4がつな
がれることになる。
The task P1 is regarded as the main program of the data processing system. The program includes a program for rotating the motors M1 to M3 at a predetermined speed and a program for speed adjustment. As shown, the internal program of the task P1 includes instructions str_tskP2, str_tskP3, st for requesting execution of the tasks P2, P3, and P4.
r_tskP4 is included. Therefore, task P1 requests execution of tasks P2, P3 and P4 one after another. As a result, in response to the system call instruction str_tskP2, the subroutine start-task in the OS is started, and the shared stack area B is allocated to the task P2 to make it executable. And the next system call instruction str
The subroutine start task (start_task) is started again in response to _tskP3. The task P3 shares the stack area B with the task P2, and
Since the task P2 has already been assigned to the stack area B, the task P3 is connected to the stack queue. Similarly, the system call instruction str_tskP
4 again in response to subroutine start task (sta
rt_task) is started, but since the task P4 shares the stack area B like the task P3, the task P4 is also connected to the stack queue. Therefore, in the stack queue, the task P3 and the following task P4 are connected. At this time, task P3 and task P4 are also connected to the execution queue.

【0066】その後、タスクP1内のシステムコール命
令str_tskP1によって、タスクP1は自らを図
6の待ち状態とする。すなわち命令stp_tskP1
はOS内のサブルーチンスリープタスク(sleep_
task)を呼びだす命令とされる。上記サブルーチン
スリープタスクは、それが起動されると、タスク管理テ
ーブルTCBのタスクの状態を記憶する領域22のデー
タを待ち状態を示すデータとし、対応するタスクを待ち
状態とする。
After that, the task P1 sets itself to the waiting state in FIG. 6 by the system call instruction str_tskP1 in the task P1. That is, the instruction stp_tskP1
Is the subroutine sleep task in the OS (sleep_
task). When the subroutine sleep task is activated, the data in the area 22 of the task management table TCB, which stores the status of the task, is set to the data indicating the wait state, and the corresponding task is set to the wait state.

【0067】次に、実行可能状態とされているタスクP
2が実行される。タスクP2はたとえば、モータM1,
M2,M3から出力される各パルス信号S1〜S3をタ
イマ15で計測するプログラムとされる。
Next, the task P in the executable state
2 is executed. The task P2 is, for example, a motor M1,
The program is a program for measuring each pulse signal S1 to S3 output from M2 and M3 by the timer 15.

【0068】タスクP2のプログラム語の最後にはシス
テムコール命令Ext_tskP2が書かれている。こ
のシステムコール命令Ext_tskP2はOSのサブ
ルーチンタスク終了(Exit−task)を呼び出す
命令とされ、それによって図14のプログラムフローチ
ャートが実行される。したがって、システムコール命令
Ext_tskP2が実行されるとタスクP2は終了さ
れる(休止状態とされる)ことになり、スタック行列管
理ポインタが調べられる。
At the end of the program word of the task P2, a system call instruction Ext_tskP2 is written. The system call instruction Ext_tskP2 is an instruction for calling the subroutine task end (Exit-task) of the OS, and the program flowchart of FIG. 14 is executed. Therefore, when the system call instruction Ext_tskP2 is executed, the task P2 is terminated (it is put into a sleep state), and the stack matrix management pointer is examined.

【0069】この実施例の場合、タスクP1からタスク
P2ないしP4の実行要求が出されているので、OSは
タスクP2を待ち行列からはずし、タスクP3を実行可
能状態とする。そして、タスクP3が実行される。タス
クP3は、タスクP2で得られた計測データをCPU1
1で演算し、各モータM1ないしM3の回転速度データ
を求めるプログラムとされる。
In this embodiment, since the execution request of the tasks P2 to P4 has been issued from the task P1, the OS removes the task P2 from the queue and sets the task P3 to an executable state. Then, the task P3 is executed. The task P3 transmits the measurement data obtained in the task P2 to the CPU 1
1 to obtain a rotational speed data of each of the motors M1 to M3.

【0070】次に上記タスクP3の実行はシステムコー
ル命令Ext_tskP3にしたがって終了される(休
止状態にされる)と、OSは、タスクP3を待ち行列か
らはずし、タスクP4を実行可能状態とする。そして、
タスクP4が実行される。
Next, when the execution of the task P3 is terminated (set to a sleep state) in accordance with the system call instruction Ext_tskP3, the OS removes the task P3 from the queue and sets the task P4 to an executable state. And
Task P4 is executed.

【0071】タスクP4は、上記タスクP3で得られた
速度データを表示装置52に表示するプログラムとされ
る。タスクP4の実行は、システムコール命令Ext_
tskP4に従って、終了される(休止状態とされ
る)。タスクP4のプログラムにおいて、上記システム
コール命令Ext_tskP4の前には、システムコー
ル命令wup_tskP1が記入されている。このシス
テムコール命令wup_tskはOS内のサブルーチン
ウェイクアップタスク(wakeup−task)を呼
びだす命令とされ、それによって待ち状態とされている
タスクを実行可能状態とする。したがって、図16にお
いて、タスクP1が待ち状態とされているタスクであ
り、上記システムコール命令wup_tskP1によっ
て、タスクP1が実行可能状態に復帰される。すなわ
ち、タスクP1のタスク管理テーブルTCB1内のタス
クの状態を記憶する領域22のデータが、待ち状態を示
すデータから実行状態を示すデータに書き変えられる。
そして、タスクP1が実行される。これによってタスク
P3の結合に基づいて、モータの回転速度を所定値に設
定する為のタスクP1内のプログラムが実行されようと
する。
The task P4 is a program for displaying the speed data obtained in the task P3 on the display device 52. The execution of the task P4 is performed by the system call instruction Ext_
In accordance with tskP4, the process is terminated (rested). In the program of the task P4, a system call instruction wup_tskP1 is written before the system call instruction Ext_tskP4. The system call instruction wup_tsk is an instruction for calling a subroutine wakeup task (wakeup-task) in the OS, and the task placed in a waiting state is thereby made executable. Therefore, in FIG. 16, the task P1 is a task in the waiting state, and the system call instruction wup_tskP1 returns the task P1 to the executable state. That is, the data in the area 22 storing the task state in the task management table TCB1 of the task P1 is rewritten from data indicating the waiting state to data indicating the execution state.
Then, the task P1 is executed. As a result, the program in task P1 for setting the rotation speed of the motor to a predetermined value is about to be executed based on the combination of task P3.

【0072】図16では、その後キーボード51の入力
によって、システムコール命令istr_tskP5が
発生されている。このシステムコール命令istr_t
skは、外部キー入力などのデータに応答して発せられ
る様な命令で、非タスク部からのタスク実行要求命令と
される。この命令istr_tskは、OS内のサブル
ーチン非タスク部の為のタスク起動(start ta
sk for task−independent p
ortion)を呼びだす命令である。そのサブルーチ
ンによって、タスクP1の実行は中断され、待ち状態と
され、タスクP5が実行される。したがって、タスクに
依存しない外部入力によってもタスクの実行要求を発行
することができる。前記タスクP5は、たとえば、モー
タM1〜M3の回転を停止させる様な出力信号01〜0
3をシングルチップマイコン10から出力させるプログ
ラムとされる。この様にしてOSはタスクP1ないしP
5の実行を制御する。
In FIG. 16, a system call instruction istr_tskP5 is generated by an input from the keyboard 51 thereafter. This system call instruction istr_t
sk is a command issued in response to data such as an external key input, and is a task execution request command from a non-task unit. This instruction istr_tsk is a task start (start ta) for a subroutine non-task part in the OS.
sk for task-independent p
instruction) to call out (orion). By the subroutine, the execution of the task P1 is suspended, the task P1 is put into a waiting state, and the task P5 is executed. Therefore, a task execution request can be issued by an external input that does not depend on the task. The task P5 includes, for example, output signals 01 to 0 for stopping rotation of the motors M1 to M3.
3 is output from the single-chip microcomputer 10 as a program. In this way, the OS executes tasks P1 through P
5 is controlled.

【0073】上記実施例によれば以下の作用効果を得る
ものである。
According to the above embodiment, the following effects can be obtained.

【0074】(1)複数のタスクに同一スタック領域を
共有させ、タスクの実行開始から終了までを1単位とし
て共有スタック領域に対するタスクの割り付けを排他的
に制御することにより、一括メモリプール化によるスタ
ック領域の動的割り付け制御や仮想記憶を利用する制御
に比べて、スタック領域をタスクに割り付ける処理を簡
単にすることができる。これと同時に、マルチタスク処
理システムにおけるスタック領域のためのメモリ利用効
率を向上させることができる。このメモリ利用効率は、
スタック領域に対する共有度合いを増す程向上する。ス
タック領域に対する共有度合いを増すには、一連の実行
順序が一義的に決定される性質のタスクを多く採用すれ
ばよく、換言すれば、往々にして動作パターンが限られ
るような機器の制御に最適である。
(1) The same stack area is shared by a plurality of tasks, and the assignment of tasks to the shared stack area is exclusively controlled with the unit from the start to the end of task execution as one unit, so that the stack by batch memory pooling Processing for allocating a stack area to a task can be simplified as compared with dynamic area allocation control or control using virtual storage. At the same time, the memory utilization efficiency for the stack area in the multitask processing system can be improved. This memory utilization efficiency is
It increases as the degree of sharing with the stack area increases. In order to increase the degree of sharing with the stack area, it is sufficient to employ a large number of tasks whose sequence is uniquely determined, in other words, it is most suitable for controlling devices whose operation patterns are often limited. It is.

【0075】(2)上記により、マルチタスク処理シス
テムにおけるスタック領域のためのメモリ利用効率が向
上すれば、スタック領域として割当可能なメモリ領域が
限られた中でも、実行可能な若しくは登録可能なタスク
数が制限される事態を防止することができる。したがっ
て、1チップ型のマイクロコンピュータのようにスタッ
ク領域として割当可能なメモリ領域が限られた中でも、
タスクを構成する各種ユーザープログラム若しくはアプ
リケーションプログラムに対してOSを柔軟に対応させ
ることができる。
(2) As described above, if the memory use efficiency for the stack area in the multitask processing system is improved, the number of executable or registerable tasks can be increased even if the memory area that can be allocated as the stack area is limited. Can be prevented from being restricted. Therefore, even if the memory area that can be allocated as a stack area is limited as in a one-chip microcomputer,
The OS can flexibly correspond to various user programs or application programs constituting a task.

【0076】(3)共有スタック領域と専用スタック領
域が混在される場合に、その専用スタック領域に対して
もスタック管理変数領域やスタック行列管理ポインタの
ようなスタック制御領域を確保することにより、双方の
スタック領域に対するタスクの割り付け制御に図13及
び図14で説明したような同一手順を採用することがで
き、スタック割り付け制御を一層簡素化することができ
る。
(3) When a shared stack area and a dedicated stack area are mixed, a stack control area such as a stack management variable area and a stack matrix management pointer is secured for the dedicated stack area. The same procedure as described with reference to FIGS. 13 and 14 can be employed for the task allocation control to the stack area, and the stack allocation control can be further simplified.

【0077】(4)従来のスタック領域一括プール化に
よるスタック領域動的割り付け制御に対し、スタック待
ち行列によりどのタスクがどのタスクによって実行遅延
されているか否かが明らかになり、これをその他適宜の
プロセスシーケンスにも利用することが可能になる。
(4) In contrast to conventional stack area dynamic pooling control by stack area batch pooling, a stack queue makes it clear which task is being delayed by which task, and this is determined by other appropriate methods. It can also be used for process sequences.

【0078】以上本発明者によってなされた発明を実施
例に基づいて具体的に説明したが、本発明はそれに限定
されるものではなく、その要旨を逸脱しない範囲におい
て種々変更可能であることは言うまでもない。
Although the invention made by the inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited thereto and can be variously modified without departing from the gist of the invention. No.

【0079】例えば上記実施例では、共有スタック領域
に対するタスクの割り付け制御により実行を遅延させる
べきタスクをポインタで繋いでスタック待ち行列を形成
して管理する場合について説明したが、実行を遅延させ
るべきタスクの番号情報若しくはそのタスク管理テーブ
ルアドレスなどを特定の領域に順番に書き込んで管理す
るような配列管理などの手法を採用することもできる。
但し斯る手法は、スタック待ち行列に比べてメモリ使用
量が僅かながら増えると予想される。
For example, in the above-described embodiment, a case has been described in which a task whose execution is to be delayed by the task allocation control to the shared stack area is connected by a pointer to form a stack queue and managed, but a task whose execution is to be delayed is described. A method such as array management in which the number information or the task management table address thereof is written and managed in a specific area in order can be adopted.
However, such an approach is expected to use a small amount of memory compared to the stack queue.

【0080】また、OSのリアルタイム性若しくはタス
クの緊急的な実行を考慮する場合には、任意のタスクに
よって共通利用可能なスタック領域を予め確保してお
き、非同期で発生する事象に対処しなければならないよ
うなタスクの優先的な実行にも対応できるようにすれば
よい。
When considering the real-time nature of the OS or the urgent execution of a task, it is necessary to secure a stack area that can be commonly used by any task in advance and to deal with events that occur asynchronously. What is necessary is just to be able to cope with the priority execution of the task that does not become unnecessary.

【0081】また、共有スタック領域に対するタスクの
割り付け制御を実現するに当たり、どのタスクがどのス
タック領域を共有するかをOSに認識可能にするための
手法は上記実施例の説明に限定されず、明示的若しくは
暗黙的にタスクとスタック領域とを論理的に結合する以
下の手法がある。 (a)スタック領域を共有するタスク或いはタスク群を
テーブルを用いてOSに認識させる。 (b)ロードモジュールの生成若しくはタスクの生成な
どのタスク登録時に、登録されるタスクが使用するスタ
ック領域を指定させ、その際他のタスクと同じスタック
領域が指定されているときは、その指定されたスタック
領域を共有させる。 (c)同一優先度を持つタスクには同一スタック領域を
自動的に共有させる。 (d)タスク登録時に他のタスクを指定させ、指定され
たタスクが使用するスタック領域を当該登録されるべき
タスクにも共有させる。 (e)タスクを登録したタスクのためのスタック領域を
当該登録されるべきタスクに共有させる。
Further, in realizing the task allocation control to the shared stack area, the method for enabling the OS to recognize which task shares which stack area is not limited to the description of the above-described embodiment. There are the following methods for logically or implicitly connecting a task and a stack area. (A) A task or a task group sharing a stack area is recognized by the OS using a table. (B) At the time of task registration, such as generation of a load module or task, a stack area to be used by the registered task is designated. If the same stack area as another task is designated at that time, the designation is made. Shared stack area. (C) Tasks having the same priority are automatically made to share the same stack area. (D) Another task is designated at the time of task registration, and the stack area used by the designated task is shared by the task to be registered. (E) The stack area for the task in which the task is registered is shared by the task to be registered.

【0082】以上の説明では主として本発明者によって
なされた発明をその背景となった利用分野である1チッ
プ型のマイクロコンピュータに適用した場合について説
明したが、本発明はそれに限定されず、種々のコンピュ
ータシステムに広くて適用することができる。
In the above description, the case where the invention made by the present inventor is mainly applied to a one-chip microcomputer which is the field of application as the background has been described. Widely applicable to computer systems.

【0083】本発明は、少なくともOSによってタスク
を管理してその実行を制御するマルチタスク制御を条件
とするものに広く適用することができる。
The present invention can be widely applied to a system that requires at least an OS to manage tasks and controls the execution of the tasks, subject to multitask control.

【0084】[0084]

【発明の効果】本願において開示される発明のうち代表
的なものによって得られる効果を簡単に説明すれば下記
の通りである。
The effects obtained by typical ones of the inventions disclosed in the present application will be briefly described as follows.

【0085】すなわち、1個のスタック領域を複数のタ
スクが共有することにより、スタック領域のためのメモ
リ利用効率を向上させることができるという効果があ
る。
That is, since one task is shared by a plurality of tasks, there is an effect that the memory use efficiency for the stack area can be improved.

【0086】これにより、従来メモリ容量不足によって
満足のいくマルチタスク処理が行えなかったシステムに
おいてもOSによるマルチタスク処理の実現が可能にな
るという効果がある。
As a result, there is an effect that the multitask processing by the OS can be realized even in a system in which satisfactory multitask processing cannot be performed satisfactorily due to insufficient memory capacity.

【0087】それと共に、スタック領域として割当可能
なメモリ領域が限られた中でも、実行可能な若しくは登
録可能なタスク数の制限を緩和することができるという
効果がある。
In addition, even when the memory area that can be allocated as the stack area is limited, there is an effect that the limitation on the number of tasks that can be executed or registered can be relaxed.

【0088】更に、それらタスクの実行開始から終了ま
でを1単位として共有スタック領域に対するタスクの割
り付けを排他的に制御することにより、複雑なメモリ制
御が不要になり、しかも、プログラムサイズも小さくな
り、処理の高速化も可能になる。
Furthermore, by exclusively controlling the allocation of tasks to the shared stack area with the execution from the start to the end of each task as one unit, complicated memory control becomes unnecessary, and the program size is reduced. The processing can be sped up.

【0089】さらに、1チップ型のマイクロコンピュー
タのようにスタック領域として割当可能なメモリ領域が
限られた中でも、管理すべきタスクを構成する各種ユー
ザープログラム若しくはアプリケーションプログラムに
対してOSの柔軟な対応を可能にする。
Further, even if the memory area that can be allocated as a stack area is limited as in a one-chip microcomputer, the OS can flexibly cope with various user programs or application programs constituting tasks to be managed. enable.

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

【図1】図1は本発明に係るスタック制御方式をタスク
の実行要求に際しての処理に着目した原理的な一例フロ
ーチャートである。
FIG. 1 is a flowchart illustrating one example of the principle of the stack control method according to the present invention, focusing on processing when a task execution request is issued;

【図2】図2は本発明に係るスタック制御方式をタスク
の実行終了に際しての処理に着目した原理的な一例フロ
ーチャートである。
FIG. 2 is a flowchart illustrating an example of a principle of the stack control method according to the present invention, focusing on processing at the end of execution of a task.

【図3】図3は図1の処理によってタスクの実行開始が
遅延された状態を示す一例説明図である。
FIG. 3 is a diagram illustrating an example of a state where execution of a task is delayed by the process of FIG. 1;

【図4】図4はタスクによるスタック領域の共有関係を
示す一例説明図である。
FIG. 4 is an explanatory diagram illustrating an example of a sharing relationship of a stack area by a task;

【図5】図5はマルチタスク制御OSとタスクとの一例
関係説明図である。
FIG. 5 is an explanatory diagram of an example relationship between a multitask control OS and a task.

【図6】図6はマルチタスク制御OSがタスクを管理す
るときの一例状態遷移図である。
FIG. 6 is an example state transition diagram when the multitask control OS manages a task.

【図7】図7は本発明に係る1チップマイクロコンピュ
ータの一実施例ブロック図である。
FIG. 7 is a block diagram showing an embodiment of a one-chip microcomputer according to the present invention.

【図8】図8は図7に示されるマイクロコンピュータの
一例アドレスマップである。
FIG. 8 is an example address map of the microcomputer shown in FIG. 7;

【図9】図9は図7に示されるマイクロコンピュータの
内蔵ROMにおける一部のアドレスマップである。
FIG. 9 is a partial address map in a built-in ROM of the microcomputer shown in FIG. 7;

【図10】図10は図7に示されるマイクロコンピュー
タの内蔵RAMのアドレスマップである。
FIG. 10 is an address map of a built-in RAM of the microcomputer shown in FIG. 7;

【図11】図11はタスク管理テーブルの一例説明図で
ある。
FIG. 11 is an explanatory diagram of an example of a task management table.

【図12】図12はタスク、スタック領域、及びスタッ
ク制御領域の一例関係説明図である。
FIG. 12 is an explanatory diagram illustrating an example of a relationship between a task, a stack area, and a stack control area;

【図13】図13はタスクの実行要求に際してのスタッ
ク領域に対するタスク割付制御の一例フローチャートで
ある。
FIG. 13 is a flowchart illustrating an example of task allocation control for a stack area when a task execution request is issued;

【図14】図14は実行開始が遅延されたタスクの取扱
いとスタック領域の解放を考慮してタスクの実行終了に
着目したタスク割付制御の一例フローチャートである。
FIG. 14 is a flowchart illustrating an example of task allocation control focusing on the end of task execution in consideration of handling of a task whose execution start is delayed and release of a stack area.

【図15】図15はタスクの実行状態におけるスタック
領域の一例説明図である。
FIG. 15 is a diagram illustrating an example of a stack area in a task execution state;

【図16】図16はCPUのOS実行状態とタスク実行
状態のタイムチャートを示す一例説明図である。
FIG. 16 is an explanatory diagram illustrating an example of a time chart of an OS execution state and a task execution state of a CPU;

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

OS オペレーティングシステム P1乃至P11 タスク A乃至E スタック領域 10 マイクロコンピュータ 11 中央処理装置 12 ROM 13 RAM 14 I/Oインタフェース 15 タイマ SPD1乃至SPDi スタック指示データ TCB1乃至TCBi タスク管理テーブル Ad乃至Ed スタック管理変数 Ap乃至Ep スタック行列管理ポインタ 21 ポインタ群 24 実行待ち行列管理ポインタ OS Operating system P1 to P11 Tasks A to E Stack area 10 Microcomputer 11 Central processing unit 12 ROM 13 RAM 14 I / O interface 15 Timer SPD1 to SPDi Stack instruction data TCB1 to TCBi Task management tables Ad to Ed Stack management variables Ap to Ep stack matrix management pointer 21 pointer group 24 execution queue management pointer

フロントページの続き (56)参考文献 特開 昭63−86035(JP,A) 特開 昭62−165243(JP,A) 特開 昭63−201730(JP,A) 特開 平3−163630(JP,A) 特開 昭60−103457(JP,A) 特開 昭63−113738(JP,A) 特開 平1−120636(JP,A) 森川治、「常駐プログラムにおけるス タック領域の確保」、インターフェー ス、Vol.16、No.8、CQ出版株 式会社、1990年井8月、pp.251〜255 (特許庁CSDB文献番号:CSNW 199800227010) (58)調査した分野(Int.Cl.7,DB名) G06F 9/46 G06F 12/00 G06F 9/40 - 9/42 JICSTファイル(JOIS) CSDB(日本国特許庁)Continuation of the front page (56) References JP-A-63-86035 (JP, A) JP-A-62-165243 (JP, A) JP-A-63-201730 (JP, A) JP-A-3-163630 (JP, A) , A) JP-A-60-103457 (JP, A) JP-A-63-113738 (JP, A) JP-A-1-120636 (JP, A) Osamu Morikawa, "Securing a stack area in a resident program", Interface, Vol. 16, No. 8, CQ Publishing Co., Ltd., August 1990, pp. 251-255 (Patent Office CSDB Document No .: CSNW 199800227010) (58) Fields investigated (Int. Cl. 7 , DB name) G06F 9/46 G06F 12/00 G06F 9/40-9/42 JICST file (JOIS) CSDB (Japan Patent Office)

Claims (9)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 オペレーティングシステムによる管理の
下で複数のタスクを実行制御可能な中央処理装置と、タ
スクの実行制御に用いるスタック領域が割当てられるメ
モリとを含み、前記中央処理装置は、複数のタスクに同
一スタック領域を共有させ、それらタスクの実行開始か
ら終了までを単位として、前記共有スタック領域に対す
るタスクの割り付けを排他的に制御可能なものである
とを特徴とするデータ処理システム
1. A central processing unit capable of executing control multiple tasks under the management by the operating system, data
A stack area to be used for
A central processing unit, wherein the central processing unit allows a plurality of tasks to share the same stack area, and is capable of exclusively controlling the assignment of tasks to the shared stack area in units from the start to the end of execution of those tasks. data processing system according to claim this <br/> and is.
【請求項2】 前記中央処理装置は、前記タスク割り付
けの排他的な制御として、タスクの実行が要求されたと
き、スタック領域を共有する他のタスクが実行中である
か否かを判定、実行中でなければ当該タスクを実行
し、他のタスクが実行中であれば当該タスクの実行開始
を遅延させる処理を行うものであることを特徴とする請
求項1記載のデータ処理システム
2. The task allocation device according to claim 1 , wherein
As an exclusive control of only, when the execution of the task is requested, it is determined whether or not other tasks sharing the stack area is running, executing the task if it is not running
2. The data processing system according to claim 1, wherein if another task is being executed, processing for delaying execution of the task is performed.
【請求項3】 前記中央処理装置は、実行が要求された
タスクが割り付けられるべき共有スタック領域を、タス
クに固有のスタック指示情報から求めるものであること
を特徴とする請求項2記載のデータ処理システム
Wherein the central processing unit, the data processing according to claim 2, wherein the shared stack space to be allocated is performed is requested task, and requests from specific stack instruction information to the task System .
【請求項4】 前記中央処理装置は、前記他のタスクが
実行中であるか否かの判定を、共有スタック領域に現在
割り付けられているタスクが存在していることを指示す
るためのスタック管理変数を参照して行うものであるこ
とを特徴とする請求項2又は3記載のデータ処理システ
4. A stack management for determining whether or not the other task is being executed, by indicating that a task currently assigned to a shared stack area exists. 4. The data processing system according to claim 2, wherein the data processing is performed by referring to a variable.
M
【請求項5】 前記中央処理装置は、前記実行開始を
延させるために、共有スタック領域固有のスタック行列
管理ポインタに実行開始が遅延されるタスクを繋ぐ処理
行うものであることを特徴とする請求項2乃至4の何
れか1項記載のデータ処理システム。
5. The central processing unit performs a process of connecting a task whose execution start is delayed to a stack matrix management pointer unique to a shared stack area in order to delay the execution start. The data processing system according to any one of claims 2 to 4, wherein:
【請求項6】 前記中央処理装置は、前記タスク割り付
けの排他的な制御として、タスクの実行を終了したとき
に、そのタスクとスタック領域を共有していて実行開始
が遅延されている他のタスクが存在するか否かを判定
し、これにより存在すると判定したときに、実行開始が
遅延されている単数若しくは複数のタスクの中から選ば
れた一つのタスクを実行可能にする処理を更に行うもの
であることを特徴とする請求項2記載のデータ処理シス
テム
6. The task processing device according to claim 1, wherein the central processing unit allocates the task.
As an exclusive control, when execution of a task ends, it is determined whether or not there is another task that is sharing the stack area with that task and whose execution is delayed, and then when it is determined, further performs a process execution start is feasible for one task selected from among single or plurality of tasks is delayed
Data processing cis according to claim 2, characterized in that
Tem .
【請求項7】 前記中央処理装置は、前記実行開始が遅
延されている他のタスクが存在するか否かの判定を、
タック行列管理ポインタの値を参照して、当該ポインタ
の値が他のタスクに繋がれているか否かを判定すること
によって行うものであることを特徴とする請求項6記載
データ処理システム
7. The central processing unit determines whether or not there is another task whose execution start is delayed by referring to the value of a stack matrix management pointer and determining whether or not there is another task. determining whether Luke not been connected to the task
7. The data processing system according to claim 6, wherein the data processing is performed by:
【請求項8】 前記中央処理装置は、選ばれた一つのタ
スクを実行可能にする前記処理として、当該タスクを、
実行可能なタスクの待ち行列を形成するための実行待ち
行列管理ポインタに繋ぐ処理を行うものであることを特
徴とする請求項6又は7記載のデータ処理システム
Wherein said central processing unit, as the process that can perform one task chosen, the task,
8. The data processing system according to claim 6, wherein a process for connecting to an execution queue management pointer for forming a queue of executable tasks is performed .
【請求項9】 中央処理装置と、中央処理装置のオペレ
ーティングシステムが格納された第1メモリと、オペレ
ーティングシステムによる管理の下で中央処理装置がタ
スクを実行するとき、スタック領域が割当てられる第2
メモリとを含み、前記中央処理装置は、オペレーティン
グシステムによる管理下において、マルチタスク処理さ
れるべき複数のタスクスタック領域を共有させた
き、タスクにはその共有スタック領域を、タスクの実行
開始から終了までを単位として排他的に割り付け制御す
るものであることを特徴とする1チップ型のマイクロコ
ンピュータ。
9. A central processing unit and an operation of the central processing unit.
A first memory in which the operating system is stored and an operating system.
Central processing unit under the control of the
When the disk is executed, the second
And a central processing unit, comprising: a memory;
Under the management of the task system , a stack area is shared by a plurality of tasks to be multitasked , and the task uses the shared stack area exclusively from the start to the end of the execution of the task. A one-chip type microcomputer, wherein the microcomputer is assigned to the microcomputer.
JP35229791A 1991-02-08 1991-12-13 Data processing system and microcomputer Expired - Fee Related JP3212656B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35229791A JP3212656B2 (en) 1991-02-08 1991-12-13 Data processing system and microcomputer

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP3-39269 1991-02-08
JP3926991 1991-02-08
JP35229791A JP3212656B2 (en) 1991-02-08 1991-12-13 Data processing system and microcomputer

Publications (2)

Publication Number Publication Date
JPH06168145A JPH06168145A (en) 1994-06-14
JP3212656B2 true JP3212656B2 (en) 2001-09-25

Family

ID=26378599

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35229791A Expired - Fee Related JP3212656B2 (en) 1991-02-08 1991-12-13 Data processing system and microcomputer

Country Status (1)

Country Link
JP (1) JP3212656B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9448844B2 (en) 2009-11-13 2016-09-20 Samsung Electronics Co., Ltd. Computing system and method controlling memory of computing system

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7380245B1 (en) * 1998-11-23 2008-05-27 Samsung Electronics Co., Ltd. Technique for detecting corruption associated with a stack in a storage device
JP2001076282A (en) 1999-09-02 2001-03-23 Canon Inc Information processor and its method
GB2369464B (en) * 2000-11-27 2005-01-05 Advanced Risc Mach Ltd A data processing apparatus and method for saving return state
JP2007257257A (en) * 2006-03-23 2007-10-04 Matsushita Electric Ind Co Ltd Task execution environment switching method in multi-task system
US10613864B2 (en) * 2018-03-16 2020-04-07 Texas Instruments Incorporated Processor with hardware supported memory buffer overflow detection
JP6726721B2 (en) * 2018-10-12 2020-07-22 株式会社ユニバーサルエンターテインメント Amusement machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
森川治、「常駐プログラムにおけるスタック領域の確保」、インターフェース、Vol.16、No.8、CQ出版株式会社、1990年井8月、pp.251〜255(特許庁CSDB文献番号:CSNW199800227010)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9448844B2 (en) 2009-11-13 2016-09-20 Samsung Electronics Co., Ltd. Computing system and method controlling memory of computing system

Also Published As

Publication number Publication date
JPH06168145A (en) 1994-06-14

Similar Documents

Publication Publication Date Title
CN105579961B (en) Data processing system, operating method and hardware unit for data processing system
JP4160255B2 (en) Application programming interface that controls the allocation of physical memory in a virtual storage system by an application program
US5127098A (en) Method and apparatus for the context switching of devices
EP0729106B1 (en) Data buffer
US7840773B1 (en) Providing memory management within a system management mode
JPS62165250A (en) Virtual memory
JP3938343B2 (en) Task management system, program, and control method
JP3212656B2 (en) Data processing system and microcomputer
JPS63310051A (en) Method and apparatus for executing input/output process containing program input/output instruction
JP2821345B2 (en) Asynchronous I / O control method
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
JP3349547B2 (en) Scheduling system
JPS63244152A (en) Access control system for extended memory device
JP2003248620A (en) Dynamic memory managing method and dynamic memory management information processing device
JPH05128078A (en) Parallel processor
JPS594743B2 (en) Multiprocessor system information
JPH08507630A (en) Memory management device and memory management method
JPS62241050A (en) Memory management system for computer system
JP2535584B2 (en) Real memory fixed processing computer
JP2941809B2 (en) Image processing method and apparatus
JPS63172346A (en) Stack allocating method
JPH03257634A (en) Method and device for parallelly processing program
JPS61136131A (en) Information processor
JPH0452490B2 (en)
JPH0743664B2 (en) Shared storage area allocation processing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010703

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080719

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090719

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100719

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 10

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110719

Year of fee payment: 10

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees