JPH06119190A - Task switching processing system - Google Patents
Task switching processing systemInfo
- Publication number
- JPH06119190A JPH06119190A JP4268736A JP26873692A JPH06119190A JP H06119190 A JPH06119190 A JP H06119190A JP 4268736 A JP4268736 A JP 4268736A JP 26873692 A JP26873692 A JP 26873692A JP H06119190 A JPH06119190 A JP H06119190A
- Authority
- JP
- Japan
- Prior art keywords
- task
- processing
- switching
- system call
- address
- 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.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 111
- 238000000034 method Methods 0.000 claims description 36
- 238000003672 processing method Methods 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000007781 pre-processing Methods 0.000 description 2
- 238000010348 incorporation Methods 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明はタスク切替処理方式に関
し、特に割込みシステム用のリアルタイム・オペレーテ
ィングシステムにおいて用いられるタスク切替処理方式
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a task switching processing system, and more particularly to a task switching processing system used in a real-time operating system for an interrupt system.
【0002】[0002]
【従来の技術】従来、マイクロプロセッサ用のリアルタ
イム・オペレーティングシステム(以下、RTOSと略
称する)は、実行形式においてのみ販売されているのが
一般である。これは、ユーザーがRTOSをソフトウェ
アの一部品として、ブラックボックス的に使用するため
である。しかしながら、最近のRTOSは、機能および
コードサイズ等の拡大化に伴ない、当該機能をユーザー
において選択して組込むことができるようになってきて
いる。2. Description of the Related Art Conventionally, a real-time operating system for a microprocessor (hereinafter abbreviated as RTOS) is generally sold only in an executable form. This is because the user uses the RTOS as a component of software like a black box. However, in recent RTOS, with the expansion of the function and the code size, it has become possible for the user to select and incorporate the function.
【0003】RTOSの機能は、大きく分けて次の二つ
に分類される。The functions of the RTOS are roughly classified into the following two types.
【0004】(1) システム・コール処理 (2) タスク切替処理 システム・コール処理は、各システム・コールを単位と
して独立しているために、容易に組込みの選択が可能で
ある。しかし、タスク管理/切替処理はRTOSの核と
なる機能であり、その性能も要求される。このために、
ユーザーによる機能選択は不可能な構造となっている。
このタスク切替処理について、図9および図10を参照
して説明する。(1) System call processing (2) Task switching processing Since system call processing is independent for each system call, incorporation can be easily selected. However, the task management / switching process is a core function of RTOS, and its performance is also required. For this,
The structure is such that the user cannot select the function.
This task switching process will be described with reference to FIGS. 9 and 10.
【0005】図9は、タスク切替処理の手順を示すフロ
ーチャートであり、図10は、本ソフトウェアの動作環
境を示すブロック図である。簡単のために、タスクは、
タスク1とタスク2の二つであるものとする。タスクの
処理は、タスク1およびタスク2ともに、コプロセッサ
を使用して行われる処理である。今、タスク1が動作し
ており、自ら発行したシステム・コールによってタスク
2に切替えられる。この切替処理は、図9に示されるフ
ローチャートに従って行われる。FIG. 9 is a flow chart showing the procedure of task switching processing, and FIG. 10 is a block diagram showing the operating environment of this software. For simplicity, the tasks are
It is assumed that there are two tasks, task 1 and task 2. The task process is a process performed using a coprocessor for both task 1 and task 2. Now, task 1 is operating, and it is switched to task 2 by the system call issued by itself. This switching process is performed according to the flowchart shown in FIG.
【0006】タスク切替処理においては、現在がネスト
したシステム・コール処理か否かの判定処理が行われ
(ステップ81)、次いで割込み処理中に発行されたシ
ステム・コール処理か否かの判定処理が行われる(ステ
ップ82)。この動作説明においては、タスクが通常通
り発行されたシステム・コールの処理であるために、図
9におけるステップ83に移行する。まず、CPUの割
当てを待っている(以下、「レディ状態」と云う)タス
クの中から、最も優先順位の高いタスクを捜す(ステッ
プ83)。次に、このタスクとシステム・コールを発行
したタスクが同一か否かが判定される(ステップ8
4)。この動作説明においては、タスク1からタスク2
に切替えるために、処理はステップ85に移行する。In the task switching process, a determination process is performed as to whether or not the current system call process is a nested system call process (step 81), and then a determination process as to whether or not the system call process is issued during the interrupt process. (Step 82). In this explanation of the operation, since the task is the processing of the system call issued as usual, the processing shifts to step 83 in FIG. First, the task with the highest priority is searched for from among the tasks waiting for CPU allocation (hereinafter referred to as "ready state") (step 83). Next, it is determined whether this task and the task that issued the system call are the same (step 8).
4). In this operation explanation, task 1 to task 2
To switch to, the processing moves to step 85.
【0007】ステップ85においては、コプロセッサ使
用の判断が行われて、切替えられるタスク2は、コプロ
セッサを使用するために、現在使用しているタスク1の
コプロセッサ・コンテキストがセーブされる(ステップ
86)。続いて、タスク2のコプロセッサ・コンテキス
トがロードされて(ステップ87)、最後に、タスク1
のコンテキストがセーブされ(ステップ88)、タスク
2のコンテキストがセーブされて(ステップ89)、タ
スク2のコンテキストがロードされる(ステップ9
0)。In step 85, the coprocessor usage decision is made, and task 2, which is switched, saves the coprocessor context of task 1 currently in use to use the coprocessor (step 2). 86). Subsequently, the coprocessor context of task 2 is loaded (step 87) and finally task 1
Is saved (step 88), the context of task 2 is saved (step 89), and the context of task 2 is loaded (step 9).
0).
【0008】以上のようにして、タスク1からタスク2
へとタスク切替処理が行われる。As described above, task 1 to task 2
The task switching process is performed.
【0009】[0009]
【発明が解決しようとする課題】上述した従来のタスク
切替処理方式においては、RTOSのタスク切替処理
は、ユーザーにとってブラック・ボックスとして提供さ
れている。このために、下記に示される欠点がある。In the conventional task switching processing method described above, the task switching processing of RTOS is provided to the user as a black box. For this reason, there are drawbacks shown below.
【0010】第1の欠点は、ユーザーが不必要な機能で
あっても、そのままシステムに組込まれてしまうことで
ある。The first drawback is that even if the user has an unnecessary function, it is directly incorporated in the system.
【0011】タスク切替処理においては、RTOSが各
タスクごとに割当てている資源を切替えなければならな
い。コプロセッサの例をとって見ると、コプロセッサを
全く使用しない場合、または一つのタスクでのみ使用す
る場合には、タスク切替処理内でのサポートは不必要で
ある。組込みシステムでは、装置コストを削減するため
に、ソフトウェアのメモリサイズが制限されている。こ
のために、搭載されるソフトウェアは、不必要な部分に
ついては、1バイトでも多く無駄を省かなければならな
い。従来のタスク切替処理方式では、この不要部分を削
除することは不可能である。このために、ユーザー・ア
プリケーションに必要以上のサイズ面の制限を生じさせ
てしまう結果となる。In the task switching process, the resources assigned by the RTOS to each task must be switched. Taking a coprocessor as an example, if the coprocessor is not used at all, or if it is used by only one task, the support in the task switching processing is unnecessary. In embedded systems, the software memory size is limited to reduce device cost. For this reason, the installed software has to eliminate waste even as much as one byte for unnecessary parts. In the conventional task switching processing method, it is impossible to delete this unnecessary part. This results in unnecessarily large size restrictions on the user application.
【0012】第2の欠点は、拡張性がないことである。The second drawback is the lack of scalability.
【0013】ユーザー・アプリケーションでは、RTO
Sが本来サポートしているタスクごとの資源以外に、切
替えたい資源が生じる場合がある。例えば、日本電気製
のCPU「μPD70136」を考えると、他のCPU
とは異なり、メモリ管理のための「ページ・レジスタ」
が備えられている。タスク切替えの際に、このページ・
レジスタを切替えようとしても、従来の処理方式では拡
張性がないために、不可能である。これでは、アプリケ
ーションを組む上での柔軟性を阻害し、大きな制約を課
することになる。In the user application, RTO
In addition to the resource for each task that S originally supports, a resource to be switched may occur. Consider, for example, the CPU “μPD70136” manufactured by NEC.
Unlike "page registers" for memory management
Is provided. When switching tasks, this page
Attempting to switch the register is impossible because the conventional processing method does not have expandability. This impedes flexibility in building an application and imposes great restrictions.
【0014】[0014]
【課題を解決するための手段】本発明のタスク切替処理
方式は、組込みシステム用のオペレーティング・システ
ムにおいて、現在所定のCPUに対して割当てられてい
るタスクを、他のタスクに切替える際の処理手順とし
て、前記オペレーティング・システムが有しているアド
レス・テーブルに登録されている最初の処理ルーチン・
アドレスを取得する第1の処理ステップと、前記第1の
処理ステップにおいて得られた処理ルーチンを実行する
第2の処理ステップと、前記第2の処理ステップにおい
て実行された処理ルーチンの次に登録されている処理ル
ーチン・アドレスを取得して、前記第1の処理ステップ
に制御を移行させる第3の処理ステップとを有してお
り、予め前記アドレス・テーブルに登録されている処理
ルーチンを逐次呼出して、切替対象のタスク個別情報を
順次切替えることを特徴としている。A task switching processing method of the present invention is a processing procedure for switching a task currently assigned to a predetermined CPU to another task in an operating system for an embedded system. As the first processing routine registered in the address table of the operating system.
Registered next to the first processing step of obtaining an address, the second processing step of executing the processing routine obtained in the first processing step, and the processing routine executed in the second processing step. And a third processing step for transferring control to the first processing step, and sequentially calling processing routines registered in advance in the address table. It is characterized in that task individual information to be switched is sequentially switched.
【0015】なお、前記アドレス・テーブルは前記タス
クごとに保有してもよく、または前記タスク共通に保有
するとともに、併せて前記タスク個別に保有するように
してもよい。The address table may be held for each of the tasks, or may be held in common for the tasks and may be held for each of the tasks together.
【0016】[0016]
【実施例】次に、本発明について図面を参照して説明す
る。DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.
【0017】図1は本発明の第1の実施例のタスク切替
前処理のフローチャートであり、図2は、本実施例のコ
プロセッサ切替処理のフローチャート、図3は、タスク
切替後処理フローチャートである。また、図4は、SB
T内のアドレス・テーブルの構造を示す図である。な
お、タスクは、前述の従来例の場合と同様の状態である
ものとする。FIG. 1 is a flowchart of a task switching pre-processing according to a first embodiment of the present invention, FIG. 2 is a flowchart of a coprocessor switching processing of this embodiment, and FIG. 3 is a task-switching processing flowchart. . Moreover, in FIG.
It is a figure which shows the structure of the address table in T. It is assumed that the task is in the same state as in the case of the above-mentioned conventional example.
【0018】システム・コール処理からタスク切替処理
に移行すると、現在がネストしたシステム・コール処理
か否かが判定され(ステップ11)、次いで割込み処理
中に発行されたシステム・コール処理中か否かが判定さ
れる(ステップ12)。この動作説明においては、タス
クが通常通りに発行されたシステム・コールの処理であ
るために、ステップ13の処理に移行する。まず、レデ
ィー状態のタスクの中から、最も優先順位の高いタスク
を捜す(ステップ13)。次に、このタスクとシステム
・コールを発行したタスクが同一か否かが判定される
(ステップ14)。この動作説明においては、タスク1
からタスク2に切替えるために、処理はステップ15に
移行する。When the system call processing shifts to the task switching processing, it is judged whether or not the current system call processing is a nested system call processing (step 11), and then whether or not the system call processing issued during the interrupt processing is in progress. Is determined (step 12). In this explanation of the operation, since the task is the processing of the system call issued as usual, the processing shifts to step 13. First, the task with the highest priority is searched from the tasks in the ready state (step 13). Next, it is determined whether this task is the same as the task that issued the system call (step 14). In this explanation of operation, Task 1
The process proceeds to step 15 to switch from task 2 to task 2.
【0019】ステップ15においては、図4に示される
テーブルのアドレスと、当該テーブル内の最初のエント
リのポインターが得られる。最初のエントリにある処理
ルーチンのアドレスは、コプロセッサの切替処理ルーチ
ンのアドレスである。従って、処理は図3に示されるス
テップ31に移行する。ステップ31においては、コプ
ロセッサ使用の判断処理が行われて、切替えられるタス
ク2は、コプロセッサを使用するために、現在使用して
いるタスク1のコプロセッサ・コンテキストがセーブさ
れる(ステップ32)。続いて、タスク2のコプロセッ
サ・コンテキストがロードされる(ステップ33)。こ
のようにして、コプロセッサの切替処理が終了して、図
1のステップ17の処理に戻る。In step 15, the address of the table shown in FIG. 4 and the pointer of the first entry in the table are obtained. The address of the processing routine in the first entry is the address of the switching processing routine of the coprocessor. Therefore, the process moves to step 31 shown in FIG. In step 31, the coprocessor use determination processing is performed, and the task 2 to be switched is saved in the coprocessor context of the task 1 currently in use in order to use the coprocessor (step 32). . Subsequently, the coprocessor context for task 2 is loaded (step 33). In this way, the coprocessor switching process ends, and the process returns to step 17 in FIG.
【0020】図1におけるステップ17においては、前
述したテーブルのエントリへのポインターが更新され、
次のエントリにある処理ルーチンのアドレスは、タスク
切替処理ルーチンのアドレスである。従って、処理は図
2に示されるステップ21に移行する。図2に示される
タスク切替後処理ルーチンにおいては、まずタスク1の
コンテキストがセーブされて(ステップ21)、続い
て、タスク2のコンテキストがロードされる(ステップ
22)。In step 17 in FIG. 1, the pointers to the above-mentioned table entries are updated,
The address of the processing routine in the next entry is the address of the task switching processing routine. Therefore, the process moves to step 21 shown in FIG. In the post-task-switching processing routine shown in FIG. 2, the context of task 1 is first saved (step 21), and then the context of task 2 is loaded (step 22).
【0021】以上のようにして、タスク切替後処理ルー
チンの処理が終了し、タスク1からタスク2に処理が切
替えられる。As described above, the processing of the task switching post-processing routine is completed, and the processing is switched from the task 1 to the task 2.
【0022】次に、本発明の第2の実施例について説明
する。図5は、本実施例のタスク切替処理のフローチャ
ート、図6は、コプロセッサ処理のフローチャート、図
7は、レジスタ処理のフローチャート、そして図8は、
タスク・コントロール・ブロック(以下、TCBと略称
する)内のアドレス・テーブルの構造を示す図である。
なお、タスクは、前述の従来例の場合と同様の状態であ
るものとする。Next, a second embodiment of the present invention will be described. 5 is a flowchart of task switching processing of this embodiment, FIG. 6 is a flowchart of coprocessor processing, FIG. 7 is a flowchart of register processing, and FIG.
It is a figure which shows the structure of the address table in a task control block (abbreviated to TCB hereafter).
It is assumed that the task is in the same state as in the case of the above-mentioned conventional example.
【0023】システム・コール処理からタスク切替処理
に移行すると、現在がネストしたシステム・コール処理
か否かが判定され(図5におけるステップ41)、次い
で割込み処理中に発行されたシステム・コール処理か否
かが判定される(ステップ42)。この動作説明におい
ては、タスクが通常通りに発行されたシステム・コール
の処理であるために、ステップ43の処理に移行する。
まず、レディー状態のタスクの中から、最も優先順位の
高いタスクを捜す(ステップ43)。次に、このタスク
とシステム・コールを発行したタスクが同一か否かが判
定される(ステップ44)。この動作説明においては、
タスク1からタスク2に切替えるために、処理はステッ
プ45に移行する。When the system call processing shifts to the task switching processing, it is judged whether or not the current system call processing is a nested system call processing (step 41 in FIG. 5). It is determined whether or not (step 42). In this explanation of the operation, since the task is the processing of the system call issued as usual, the processing shifts to step 43.
First, the task with the highest priority is searched from the tasks in the ready state (step 43). Next, it is determined whether this task and the task that issued the system call are the same (step 44). In this explanation of operation,
The process proceeds to step 45 to switch from task 1 to task 2.
【0024】ステップ45においては、切替えられるこ
とを示すフラグが、図8に示されるTCBの切替処理識
別フラグ領域にセットされ、続いて、タスク1のTCB
内のテーブルの最初のエントリのポインターが得られる
(ステップ46)。最初のエントリにある処理ルーチン
のアドレスは、コプロセッサ処理ルーチンのアドレスで
ある。従って、処理は、図6に示されるフローチャート
のステップ61に移行する。図6におけるステップ61
においては、前述した識別フラグがセットされているか
否かが判定される。タスク1のフラグは、図5のステッ
プ45においてセットされているために、図6における
ステップ62に処理が移行する。切替えられるタスク2
は、コプロセッサを使用するために、現在使用している
タスク1のコプロセッサ・コンテキストがセーブされる
(ステップ63)。このようにして、コプロセッサ処理
が終了して、図5の処理フローにおけるステップ48に
処理が戻る。In step 45, a flag indicating that switching is performed is set in the switching process identification flag area of the TCB shown in FIG.
A pointer to the first entry in the table in is obtained (step 46). The address of the processing routine in the first entry is the address of the coprocessor processing routine. Therefore, the processing shifts to step 61 of the flowchart shown in FIG. Step 61 in FIG.
At, it is determined whether or not the above-mentioned identification flag is set. Since the flag of task 1 is set in step 45 of FIG. 5, the process proceeds to step 62 of FIG. Task 2 that can be switched
Saves the coprocessor context of task 1 currently in use to use the coprocessor (step 63). In this way, the coprocessor processing ends, and the processing returns to step 48 in the processing flow of FIG.
【0025】図5におけるステップ48においては、前
述したエントリへのポインターが更新されて、次のエン
トリにある処理ルーチンのアドレスは、レジスタ処理ル
ーチンのアドレスである。従って、処理は図7に示され
る処理フローのステップ71に移行する。ステップ71
においては、図6におけるステップ61の処理と同様
に、識別フラグがセットされているか否かが判定され
る。タスク1のフラグはセットされているため、タスク
1のコンテキストがセーブされて(ステップ72)、レ
ジスタ処理は終了する。そして、処理手順は、図5の処
理フローにおけるステップ48に移行する。再度ステッ
プ48において、前述したエントリへのポインタが更新
される。次のエントリにある処理ルーチンのアドレス
は、「0」である。従って、処理は、図5のステップ5
0に移行する。ステップ50においては、前述したタス
ク1の識別フラグがクリアされ、続いてタスク2のTC
B内のテーブルの最初のエントリのポインターが得られ
る(ステップ51)。In step 48 in FIG. 5, the pointer to the above-mentioned entry is updated, and the address of the processing routine in the next entry is the address of the register processing routine. Therefore, the processing shifts to step 71 of the processing flow shown in FIG. Step 71
In the same manner as in step 61 in FIG. 6, it is determined whether or not the identification flag is set. Since the flag of task 1 has been set, the context of task 1 is saved (step 72) and the register processing ends. Then, the processing procedure shifts to step 48 in the processing flow of FIG. Again in step 48, the pointers to the previously mentioned entries are updated. The address of the processing routine in the next entry is "0". Therefore, the process is step 5 in FIG.
Move to 0. In step 50, the above-mentioned identification flag of task 1 is cleared, and then TC of task 2 is cleared.
The pointer to the first entry in the table in B is obtained (step 51).
【0026】最初のエントリにある処理ルーチンのアド
レスは、コプロセッサ処理ルーチンのアドレスである。
従って、処理は、図6の処理フローにおけるステップ6
1に移行し、ステップ61においては、識別フラグがセ
ットされているか否かが判定される。タスク2のフラグ
がクリアされているために、図6におけるステップ64
に処理が移行し、ステップ64においてタスク2のコプ
ロセッサ・コンテキストがロードされて、コプロセッサ
処理は終了する。そして、処理フローは、図5に示され
るステップ53に戻る。ステップ53においては、前述
したエントリへのポインターが更新され、次のエントリ
にある処理ルーチンのアドレスは、レジスタ処理ルーチ
ンのアドレスである。従って、処理フローは、図7に示
されるステップ71の処理に移行する。図6の処理フロ
ーにおけるステップ61の処理と同様に、ステップ71
においては、識別フラグがセットされているか否かが判
定される。タスク2のフラグはクリアされていないため
に、タスク2のコンテキストがロードされて(ステップ
73)、レジスタ処理が終了する。これにより、処理フ
ローは、図5に示されるステップ53の処理に移行す
る。ステップ53においては、再度、前述したエントリ
へのポインターが更新され、次のエントリにある処理ル
ーチンのアドレスは「0」である。従って、タスク切替
処理は終了となる。The address of the processing routine in the first entry is the address of the coprocessor processing routine.
Therefore, the process is step 6 in the process flow of FIG.
Then, in step 61, it is determined whether or not the identification flag is set. Since the flag of task 2 has been cleared, step 64 in FIG.
, The coprocessor context of task 2 is loaded in step 64, and the coprocessor processing ends. Then, the process flow returns to step 53 shown in FIG. In step 53, the pointer to the aforementioned entry is updated, and the address of the processing routine in the next entry is the address of the register processing routine. Therefore, the processing flow shifts to the processing of step 71 shown in FIG. 7. Similar to the processing of step 61 in the processing flow of FIG. 6, step 71
At, it is determined whether the identification flag is set. Since the flag of task 2 has not been cleared, the context of task 2 is loaded (step 73) and the register processing ends. As a result, the processing flow moves to the processing of step 53 shown in FIG. In step 53, the pointer to the above-mentioned entry is updated again, and the address of the processing routine in the next entry is "0". Therefore, the task switching process ends.
【0027】以上のような処理手順を介して、タスク1
の処理からタスク2の処理えのタスク切替えが行われ
る。The task 1 is processed through the above processing procedure.
The task switching from the processing of 1 to the processing of task 2 is performed.
【0028】[0028]
【発明の効果】以上説明したように、本発明は、タスク
切替処理を機能別のモジュールに分けて、それらのアド
レスをテーブルにより管理することにより、タスク切替
処理における機能選択を、単にテーブルを書換えること
により容易に実現することが可能となり、これにより、
RTOSに対する機能追加が簡単に実現されるという効
果がある。As described above, according to the present invention, the task switching processing is divided into modules according to functions and the addresses thereof are managed by a table, so that the function selection in the task switching processing is simply rewritten in the table. Can be easily realized by
There is an effect that the function addition to the RTOS is easily realized.
【0029】また、前記テーブルをタスクごとに保有す
ることにより、タスク切替え時における画一的な処理を
回避することが可能となり、これにより、コンテキスト
切替え時における処理時間を大幅に短縮することができ
るという効果がある。Further, by holding the table for each task, it is possible to avoid uniform processing at the time of task switching, and thus it is possible to greatly reduce the processing time at the time of context switching. There is an effect.
【図1】本発明の第1の実施例のタスク切替前処理のフ
ローチャートを示す図である。FIG. 1 is a diagram showing a flowchart of task switching preprocessing according to a first embodiment of this invention.
【図2】前記第1の実施例のコプロセッサ切替処理のフ
ローチャートを示す図である。FIG. 2 is a diagram showing a flowchart of a coprocessor switching process of the first embodiment.
【図3】前記第1の実施例のタスク切替後処理のフロー
チャートを示す図である。FIG. 3 is a diagram showing a flowchart of post-task switching processing of the first embodiment.
【図4】SBT内のアドレス・テーブルの構造を示す図
である。FIG. 4 is a diagram showing the structure of an address table in the SBT.
【図5】本発明の第2の実施例のタスク切替処理のフロ
ーチャートを示す図である。FIG. 5 is a diagram showing a flowchart of task switching processing according to the second embodiment of this invention.
【図6】前記第2の実施例のコプロセッサ切替処理のフ
ローチャートを示す図である。FIG. 6 is a diagram showing a flowchart of a coprocessor switching process of the second embodiment.
【図7】前記第2の実施例のレジスタ切替処理のフロー
チャートを示す図である。FIG. 7 is a diagram showing a flowchart of a register switching process of the second embodiment.
【図8】TCB内のアドレス・テーブルの構造を示す図
である。FIG. 8 is a diagram showing the structure of an address table in the TCB.
【図9】従来例のタスク切替処理のフローチャートを示
す図である。FIG. 9 is a diagram showing a flowchart of a task switching process of a conventional example.
11、41、81 シテテム・コール処理判定ステッ
プ 12、42、82 割込み処理判定ステップ 13、43、83 レディータスク検索ステップ 14、44、84 現タスクの同一判定ステップ 15、17、46、48、51、54 エントリ取得
ステップ 16、47、52 種々の処理ステップ 21、88 タスク・コンテキストをセーブするステ
ップ 22、55、73、89 タスク・コンテキストをロ
ードするステップ 31、62、85 プロセッサ使用判定ステップ 32、63、72、86 コプロセッサ・コンテキス
トをセーブするステップ 33、64、87 コプロセッサのコンテキストをロ
ードするステップ 45 フラグをセットするステップ 49 「0」判定ステップ 50 フラグをクリアするステップ 61、71 フラグのセット判定ステップ11, 41, 81 System call processing determination step 12, 42, 82 Interrupt processing determination step 13, 43, 83 Ready task search step 14, 44, 84 Current task identity determination step 15, 17, 46, 48, 51, 54 entry acquisition step 16, 47, 52 various processing steps 21, 88 task context saving step 22, 55, 73, 89 task context loading step 31, 62, 85 processor usage determining step 32, 63, 72,86 save coprocessor context 33,64,87 load coprocessor context 45 set flag 49 "0" decision step 50 clear flag 61,71 set flag Determining step
Claims (3)
システムにおいて、現在所定のCPUに対して割当てら
れているタスクを、他のタスクに切替える際の処理手順
として、 前記オペレーティング・システムが有しているアドレス
・テーブルに登録されている最初の処理ルーチン・アド
レスを取得する第1の処理ステップと、 前記第1の処理ステップにおいて得られた処理ルーチン
を実行する第2の処理ステップと、 前記第2の処理ステップにおいて実行された処理ルーチ
ンの次に登録されている処理ルーチン・アドレスを取得
して、前記第1の処理ステップに制御を移行させる第3
の処理ステップと、 を有しており、予め前記アドレス・テーブルに登録され
ている処理ルーチンを逐次呼出して、切替対象のタスク
個別情報を順次切替えることを特徴とするタスク切替処
理方式。1. An operating system for embedded systems
In the system, as a processing procedure for switching a task currently assigned to a predetermined CPU to another task, the first processing routine registered in the address table of the operating system Registered next to the first processing step for obtaining an address, the second processing step for executing the processing routine obtained in the first processing step, and the processing routine executed in the second processing step. A processing routine address that is present and transfers control to the first processing step
The task switching processing method comprising the steps of: (1) and sequentially calling the processing routines registered in advance in the address table to sequentially switch the task individual information to be switched.
ごとに保有することを特徴とする請求項1記載のタスク
切替処理方式。2. The task switching processing method according to claim 1, wherein the address table is held for each task.
共通に保有するとともに、併せて前記タスク個別にも保
有することを特徴とする請求項1記載のタスク切替処理
方式。3. The task switching processing method according to claim 1, wherein the address table is held in common for the tasks and also in the individual tasks.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26873692A JP3202351B2 (en) | 1992-10-07 | 1992-10-07 | Task switching processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP26873692A JP3202351B2 (en) | 1992-10-07 | 1992-10-07 | Task switching processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH06119190A true JPH06119190A (en) | 1994-04-28 |
| JP3202351B2 JP3202351B2 (en) | 2001-08-27 |
Family
ID=17462637
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP26873692A Expired - Fee Related JP3202351B2 (en) | 1992-10-07 | 1992-10-07 | Task switching processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3202351B2 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7360872B2 (en) | 1997-07-15 | 2008-04-22 | Silverbrook Research Pty Ltd | Inkjet printhead chip with nozzle assemblies incorporating fluidic seals |
| US7434915B2 (en) | 1997-07-15 | 2008-10-14 | Silverbrook Research Pty Ltd | Inkjet printhead chip with a side-by-side nozzle arrangement layout |
| US6557977B1 (en) | 1997-07-15 | 2003-05-06 | Silverbrook Research Pty Ltd | Shape memory alloy ink jet printing mechanism |
-
1992
- 1992-10-07 JP JP26873692A patent/JP3202351B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP3202351B2 (en) | 2001-08-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR100746797B1 (en) | Processor and information processing method | |
| US6820155B1 (en) | Interruption managing device and interruption managing method | |
| US5701493A (en) | Exception handling method and apparatus in data processing systems | |
| JP2000056986A (en) | Software interrupt mechanism | |
| CN111913790A (en) | Task scheduling method and device, household appliance and computer readable storage medium | |
| US20010037425A1 (en) | Interrupt processing method in an operation processing device and the device using the same | |
| JP4609113B2 (en) | Processor | |
| JPH06119190A (en) | Task switching processing system | |
| US5241634A (en) | Method of handling system calls to an operating system of a computer by system service routines stored as firmware | |
| JPH05113887A (en) | Computer system | |
| KR100506254B1 (en) | Apparatus and method for handling interrupt in non-privileged of embedded system | |
| JPH10340197A (en) | Cashing control method and microcomputer | |
| JPH0414376B2 (en) | ||
| KR20040101260A (en) | Method and arrangement for virtual direct memory access | |
| JPH0495137A (en) | Context switching method for operating system | |
| JPH0451329A (en) | Context switching device | |
| JP2616419B2 (en) | Information processing device | |
| JP2003256219A (en) | Program execution method for embedded devices | |
| KR100303020B1 (en) | How to set debugging target in real-time operating system | |
| JP2822728B2 (en) | Computer system | |
| JP2003337711A (en) | Information processing apparatus and method | |
| JPH07141207A (en) | Information processing system | |
| JP2591818B2 (en) | Auxiliary function selection control method | |
| JP2004021610A (en) | Task managing device | |
| JPH10293691A (en) | Register allocation method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19990601 |
|
| LAPS | Cancellation because of no payment of annual fees |