JPH0195334A - Multi-task address trap system - Google Patents

Multi-task address trap system

Info

Publication number
JPH0195334A
JPH0195334A JP25402587A JP25402587A JPH0195334A JP H0195334 A JPH0195334 A JP H0195334A JP 25402587 A JP25402587 A JP 25402587A JP 25402587 A JP25402587 A JP 25402587A JP H0195334 A JPH0195334 A JP H0195334A
Authority
JP
Japan
Prior art keywords
address
task
address trap
information
trap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP25402587A
Other languages
Japanese (ja)
Inventor
Hirohiko Ono
洋彦 小野
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP25402587A priority Critical patent/JPH0195334A/en
Publication of JPH0195334A publication Critical patent/JPH0195334A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain an address trap to a specified task by stopping a system in the memory address of the specified task. CONSTITUTION:In an address trap information holding device 201 for multi-task, address trap information for tasks A, B and C are stored. An address trap device 202 fetches a program address from a bus 106 and executes comparison with an executing address from the bus 106 based on the address trap information which can be referred from the device 201. In case to be equal with the address trap information in the device 201, an interrupting signal is outputted to an interrupting signal line 104 and interruption is loaded to a CPU 102. Then, the address trap is executed and the CPU 102 is stopped. When the task is switched to a task B in the CPU 102, the address trap information to be selected by the device 201 are switched to the address trap information for the task B and the device 202 executes the address trap based on the address information for the task B.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、アドレストラップ方式に関し、さらに詳しく
は複数のタスクが動作するシステムでの7ドレストラツ
プ方式に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an address trap method, and more particularly to a seven-address trap method in a system in which a plurality of tasks operate.

〔従来の技術〕[Conventional technology]

情報処理装置においてその情報の処理は、通常プログラ
ムによって行われる。プログラムは、情報を遂次に処理
する。一般にプログラムは全ての処理が互いに関係し合
い、遂次に処理される必要があるわけではない。プログ
ラムを各処理ごとのモジュールに分割し、各々を平行動
作させて処理を行えば、処理速度は向上する。
In an information processing device, the information is normally processed by a program. The program processes information sequentially. In general, all processes in a program are related to each other and do not need to be processed sequentially. Processing speed can be improved by dividing a program into modules for each process and running each module in parallel.

この様な考え方を並列プログラミングといい、各処理に
対応するプログラム・モジ、−ルをタスクという。タス
クはそれぞれ平行動作し、互いに同期をとりデータを通
信しながら処理を行なっていく。このタスクが複数動作
している環境を、マルチタスク環境という。
This way of thinking is called parallel programming, and the program modules that correspond to each process are called tasks. Each task operates in parallel, synchronizes with each other, and performs processing while communicating data. An environment in which multiple tasks are running is called a multitasking environment.

従来、マルチタスクの機能を有するシステムにおいて、
各タスクのプログラムは、そのシステム上のメモリ装置
上にタスクのプログラムのアドレス情報により、配置さ
れて遂次実行される。
Conventionally, in systems with multitasking functions,
The program for each task is placed on a memory device on the system according to the address information of the task program and executed sequentially.

この様な環境において、それぞれのタスクが平行動作し
ているため、メチリ装置上の同一命令コード部のプログ
ラムを複数のタスクが共有し実行することが可能である
。(リエントラントプログラム) この様なマルチタスク環境で実行しているタスクプログ
ラムの指定アドレスによるプログラムの停止(アドレス
トラップ)は、単にメモリ装置上の指定アドレスに関し
てのトラップを行うものであった。複数タスクが同一命
令コードを実行する場合、アドレストラップを行なう時
は、遂次処理を行なうアドレス情報のみによりアドレス
トラップを行なっていた。
In such an environment, since each task operates in parallel, it is possible for a plurality of tasks to share and execute a program of the same instruction code section on the Mechiri device. (Reentrant Program) Stopping a task program running in such a multitasking environment at a specified address (address trap) simply traps the specified address on the memory device. When multiple tasks execute the same instruction code, address trapping is performed using only address information for successive processing.

特定のタスクには注目せず、メモリのアドレスに関して
のトラップを行なうものであった。特定のタスクでのア
ドレストラップ機能は有していない。
It did not focus on a specific task, but instead performed traps on memory addresses. It does not have an address trap function for specific tasks.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上述したマルチタスク環境下でのアドレストラップ方式
では以下の様な問題点があった。
The above-mentioned address trap method under a multitasking environment has the following problems.

・同一メモリ空間内の同一命令コード部(リエントラン
トプログラム)を実行するマルチタスクにおいては、異
なるタスクについてもアドレストラップを行なってしま
う。従来のアドレストラップ方式では、ある命令のアド
レスに関してのアドレストラップを設定する。メモリ中
の同一命令コードを複数のタスクが実行している場合、
複数のタスクのどれか不特定なタスクが7ドレストラツ
プを設定した命令を実行した時、システムを停止させる
ことになる。リエントラントプログラム実行のマルチタ
スク環境のにおいて、不特定のタスクにトラップするこ
とになる。
- In multitasking that executes the same instruction code part (reentrant program) in the same memory space, address traps are also performed for different tasks. In the conventional address trap method, an address trap is set for the address of a certain instruction. If multiple tasks are executing the same instruction code in memory,
When an unspecified task among multiple tasks executes an instruction that sets a 7-dress trap, the system will be stopped. In a multitasking environment of reentrant program execution, this will trap you in an unspecified task.

本発明の目的は、従来のマルチタスク環境でのアドレス
トラップ方式の不具合を除去し、特定のタスクに対して
アドレストラップを可能とするアドレストラップ方式を
提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an address trap method that eliminates the drawbacks of the conventional address trap method in a multitasking environment and enables address traps for specific tasks.

〔問題点を解決するための手段〕[Means for solving problems]

前述の問題点を解決するために本発明が提供する手段は
、マルチタスクの機能を有するシステムにおいて、タス
ク毎のアドレストラップ情報を保持する手段と、システ
ム内でのタスクの変更を知る手段と、アドレストラップ
情報を保持する手段から変更されたタスク用のアドレス
トラップ情報を参照してアドレストラップを行なう手段
を備え、特定のタスクのメモリアドレスにおいてシステ
ムを停止させることを特徴とする。
Means provided by the present invention in order to solve the above-mentioned problems is, in a system having a multitasking function, a means for holding address trap information for each task, a means for knowing the change of a task within the system, The present invention is characterized by comprising means for performing an address trap by referring to address trap information for a task that has been changed from means for holding address trap information, and stopping the system at a memory address of a specific task.

〔実施例1〕 本発明の実施例1について図面を参照して説明する。[Example 1] Example 1 of the present invention will be described with reference to the drawings.

本実施例では、本発明をマイクロコンピュータ装置に適
用した例を示す。
This embodiment shows an example in which the present invention is applied to a microcomputer device.

第1図は、本発明の一実施例であるマルチタスクアドレ
ストラップ装置を備えるマイクロコンピュータ装置を示
すブロック図である。この実施例は、本発明のマルチタ
スクアドレストラップ方式を適用してマイクロコンピュ
ータ装置で実行しているマルチタスク内の特定タスクに
ついてアドレストラップを行なう装置である。
FIG. 1 is a block diagram showing a microcomputer device equipped with a multitask address trap device, which is an embodiment of the present invention. This embodiment is a device that applies the multitask address trap method of the present invention to perform address trapping for a specific task in a multitask being executed by a microcomputer device.

第1図において、101・・・・・・メモリ装置、10
2・・・・・・中央処理装置、103・旧・・カレント
タスクモニタ信号線、104・・・・・・割り込み信号
線、105・・・・・・マルチタスクアドレストラップ
装置、106・・・・・・システムバス、をそれぞれ示
す。
In FIG. 1, 101...memory device, 10
2... Central processing unit, 103... Old task monitor signal line, 104... Interrupt signal line, 105... Multitask address trap device, 106... . . . indicates a system bus.

第2図は、第1図におけるマルチタスクアドレストラッ
プ装置105の詳細を示すブロック図である。
FIG. 2 is a block diagram showing details of the multitask address trap device 105 in FIG. 1.

第2図において、201・・・・・・マルチタスク用ア
ドレストラップ情報保持装置、202・・・・・・アド
レストラップ装置、をそれぞれ示す。
In FIG. 2, 201 . . . multitasking address trap information holding device and 202 . . . address trap device are shown, respectively.

図中の装置で請求範囲のタスク毎のアドレストラップ情
報を保持する手段は、201のマルチタスク用アドレス
トラップ情報保持装置であり、システム内での変更を知
る手段は、103のカレントタスクモニタ信号線であり
、アドレストラップ情報を保持する手段から変更された
タスク用のアドレストラップ情報を参照してアドレスト
ラップを行なう手段は、202のアドレストラップ装置
である。
In the device shown in the figure, the means for holding address trap information for each task as claimed in the claims is a multitasking address trap information holding device 201, and the means for knowing changes within the system is a current task monitor signal line 103. The means for performing the address trap by referring to the changed task address trap information from the means for holding the address trap information is an address trap device 202.

本実施例によるマルチタスクアドレストラップ方式につ
いて、第1図と第2図を参照して説明する。
The multitask address trap system according to this embodiment will be explained with reference to FIGS. 1 and 2.

この実施例でのマイク5コンピユータ装置は、マルチタ
スク環境で動作しているとする。各タスクのプログラム
は101のメモリ装置に格納されており、各タスクのタ
スク制御情報も、101のメモリ装置内の各タスクコン
トロールブロック(T CB)の情報として格納されて
いる。102の中央処理装置では、現在実行中のタスク
情報(T CB)へのメモリ中のベースアドレスを保持
するタスクレジスタのTCBへのアドレス値の変更によ
りマルチタスクのタスクの切り替えを行なうとする。
It is assumed that the microphone 5 computer device in this embodiment is operating in a multitasking environment. A program for each task is stored in the memory device 101, and task control information for each task is also stored as information in each task control block (TCB) in the memory device 101. It is assumed that the central processing unit 102 performs multitasking task switching by changing the address value of the task register that holds the base address of the currently executing task information (TCB) in the memory to the TCB.

第1図において、102の中央処理装置は、101のメ
モリ装置内に格納されている各タスクのフ頴グラムを実
行する。この場合、タスクの切り替えが行われると10
2の中央処理装置内のタスクレジスタのTCBのベース
アドレス値が変更される。マルチタスクアドレストラッ
プ装置は、その値を参照することによりタスクの切り替
えを参照する。103のカレントタスクモニタ信号線は
、このタスクレジスタをモニタする信号線である。
In FIG. 1, a central processing unit 102 executes a program for each task stored in a memory device 101. In this case, when a task switch occurs, 10
The base address value of the TCB of the task register in the central processing unit No. 2 is changed. The multitask address trap device refers to task switching by referring to the value. A current task monitor signal line 103 is a signal line for monitoring this task register.

第2図において、201のマルチタスク用アドレストラ
ップ情報保持装置は、101のメモリ装置内に格納され
ている各タスク用のタスク制御情報(TCB)に対応す
る各タスク用のプログラムに関するアドレストラップ情
報が保持されており、103のカレントタスクモニタ信
号線のTCBのベースアドレス情報に従って、各タスク
用のアドレストラップ情報を選出する機能を備え、20
2のアドレストラップ装置にそのアドレストラップ情報
を参照可能とする装置である。201のマルチタスク用
アドレストラップ情報保持装置内の各タスク用のアドレ
ストラップ情報は、各タスクのプログラム内のアドレス
トラップを行うアドレス情報が保持されているとする。
In FIG. 2, a multitasking address trap information holding device 201 stores address trap information regarding a program for each task corresponding to task control information (TCB) for each task stored in a memory device 101. It has a function of selecting address trap information for each task according to the base address information of the TCB of the current task monitor signal line of 103, and has a function of selecting address trap information for each task.
This is a device that allows the second address trap device to refer to its address trap information. It is assumed that the address trap information for each task in the multitasking address trap information holding device 201 holds address information for performing address trapping in the program of each task.

第1図において、A、B、Cのタスクがマルチタスクで
実行されている場合、101メモリ装置内にはタスクA
、B、C用のTCBが格納されており、201のマルチ
タスク用アドレストラップ情報保持装置内には、タスク
A、B、C用のアドレストラップ情報が格納されている
。その各タスク用のアドレストラップ情報は、メモリ装
置内のTCBのベースアドレス情報から選出されること
が可能である。もし、タスクBの命令コード部の特定ア
ドレスにアドレストラップを行いたい場合、マルチタス
ク用アドレストラップ情報保持装置内のタスクB用のア
ドレストラップ情報保持部に、そのアドレストラップ情
報を格納しておく。
In FIG. 1, when tasks A, B, and C are executed in multitask mode, task A is stored in memory device 101.
, B, and C are stored, and address trap information for tasks A, B, and C is stored in the multitask address trap information holding device 201. The address trap information for each task can be selected from the base address information of the TCB in the memory device. If it is desired to perform an address trap on a specific address in the instruction code section of task B, the address trap information is stored in the address trap information holding section for task B in the multitasking address trap information holding device.

102の中央処理装置がタスクA、B、Cをマルチタス
クで実行している場合、内部の実行中のタスクの制御を
示すタスクレジスタが、タスクの変更時にタスク用のT
CBのベースアドレスを設定され、変更される。103
のカレントタスクモニタ信号線によりそのタスクレジス
タの値を参照して、105のマルチタスクアドレストラ
ップ装置に取り込む。201のマルチタスク用アドレス
トラップ情報保持装置は、103のカレントタスクモニ
タ信号線から取り込んだ現在実行中のタスクのTCBの
ベースアドレスにより、現在実行中のタスク(A、B、
C)を識別し、現在実行中のタスク用のアドレストラッ
プ情報を選出し、202のアドレストラップ装置に参照
可能とする。
When the central processing unit 102 is executing tasks A, B, and C in multi-task mode, the task register that indicates the control of the internally executing tasks is changed to T when the task is changed.
The base address of the CB is set and changed. 103
The value of the task register is referred to by the current task monitor signal line of , and is taken into the multitask address trap device of 105 . The multitask address trap information holding device 201 identifies the currently executing task (A, B,
C), selects the address trap information for the task currently being executed, and makes it referenceable to the address trap device 202.

202のアドレストラップ装置は、106のシステムバ
スより現在実行しているプログラムアドレスを取り込み
、201から参照できる現在実行中のタスクのアドレス
トラップ情報に基すき、106のシステムバスからの実
行アドレスと比較を行い、201のアドレストラップ情
報保持装置内に格納されているアドレストラップ情報と
等しい場合、104の割り込み信号線に割り込み信号を
出力して、102の中央処理装置!こ割り込みをかけて
、アドレストラップを行い、102の中央処理装置を停
止させる。102の中央処理装置で、タスクBにタスク
が切り替わった場合、201のマルチタスク用アドレス
トラップ情報保持装置の選出するアドレストラップ情報
も、既に定義したタスクB用のアドレストラップ情報に
切り替わり、202のアドレストラップ装置は、そのタ
スクB用のアドレストラップ情報に基すき、アドレスト
ラップを行なう。これにより特定のタスクのみに、アド
レストラップをりうことか可能である。
An address trap device 202 takes in the currently executing program address from the system bus 106 and compares it with the execution address from the system bus 106 based on the address trap information of the currently executing task that can be referenced from 201. If the address trap information is equal to the address trap information stored in the address trap information holding device 201, an interrupt signal is output to the interrupt signal line 104, and the central processing unit 102! This interrupt is generated, an address trap is performed, and the central processing unit 102 is stopped. When the task is switched to task B in the central processing unit 102, the address trap information selected by the multitasking address trap information holding device 201 is also switched to the already defined address trap information for task B, and the address of 202 is changed. The trap device performs an address trap based on the address trap information for task B. This allows address traps to be applied only to specific tasks.

もし、タスクAの命令コード部が、タスクBの命令コー
ド部と同一のメモリプログラムを実行する場合において
、タスクBの特定アドレスにアドレストラップを行いた
い場合、アドレストラップを行なうアドレスは、101
のメモリ装置内のタスクA、Hにおいては同一メモリア
ドレスとなるが、201のマルチタスク用アドレストラ
ップ情報保持装置により、アドレストラップ情報が、タ
スクAとBは切り替わっており、101のメモリ装置内
の同一命令コードのアドレストラップを行いたいアドレ
スを、102の中央処理装置が実行しても、現在のタス
クがタスクAの場合は、アドレストラップは行われず、
タスクBに切り替わった場合に、アドレストラップが行
われる。これにより、メモリ中の同一命令コードを実行
するマルチタスクにおいて、特定のタスクの実行にのみ
アドレストラップを行うことが可能である。
If the instruction code part of task A executes the same memory program as the instruction code part of task B, and if you want to perform an address trap to a specific address of task B, the address to which the address trap is performed is 101.
Tasks A and H in the memory device 101 have the same memory address, but the address trap information is switched between tasks A and B by the multitasking address trap information holding device 201, and the memory address in the memory device 101 is the same. Even if the central processing unit 102 executes an address for which an address trap is to be performed for the same instruction code, if the current task is task A, the address trap will not be performed.
When switching to task B, an address trap is performed. As a result, in multitasking that executes the same instruction code in memory, it is possible to perform address trapping only for execution of a specific task.

〔実施例2〕 本発明の実施例2について図面を参照して説明する。[Example 2] A second embodiment of the present invention will be described with reference to the drawings.

本実施例では、本発明をマルチタスクモニタプログラム
環境下のマイクロコンピュータ装置に適用した例を示す
This embodiment shows an example in which the present invention is applied to a microcomputer device under a multi-task monitor program environment.

第3図は、本発明の一実施例であるマルチタスクアドレ
ストラップ装置を備え、マルチタスクモニタプログラム
がマルチタスクのタスク制御を行なっているマイクロコ
ンピュータ装置を示すブロック図である。この実施例は
、本発明のマルチタスクアドレストラップ方式を適用し
てマルチタスクモニタプログラム環境下のマイクロコン
ピュータ装置で実行しているマルチタスク内の特定タス
クについてアドレストラップを行なう装置である。
FIG. 3 is a block diagram showing a microcomputer device including a multitask address trap device according to an embodiment of the present invention, and in which a multitask monitor program performs multitask task control. This embodiment is a device that applies the multitask address trap method of the present invention to perform address trapping for a specific task within a multitask being executed on a microcomputer device under a multitask monitor program environment.

実施例1と実施例2の異なる点は、マルチタスクのタス
クの切り替え情報を、実施例1では、中央処理装置から
直接参照しており、実施例2では、マルチタスクのタス
クの切り替え情報をマルチタスクを制御しているモニタ
プログラムから参照する点である。
The difference between Embodiment 1 and Embodiment 2 is that in Embodiment 1, task switching information for multitasking is directly referenced from the central processing unit, and in Embodiment 2, task switching information for multitasking is referenced directly from the central processing unit. This is referred to by the monitor program that is controlling the task.

第3図において、301・・・・・・メモリ装置、30
2・・・・・・中央処理装置、303・・・・・・カレ
ントタスクモニタ信号線、304・・・・・・割り込み
信号線、305・・・・・・マルチタスクアドレストラ
ップ装置、306・・・・・・システムバス、をそれぞ
れ示す。
In FIG. 3, 301...memory device, 30
2...Central processing unit, 303...Current task monitor signal line, 304...Interrupt signal line, 305...Multi-task address trap device, 306... ...indicates each system bus.

第4図は、第3図におけるマルチタスクアドレストラッ
プ装置305の詳細を示すブpツク図である。
FIG. 4 is a book diagram showing details of the multitask address trap device 305 in FIG.

第4図において、401・・・・・・マルチタスク用ア
ドレストラップ情報保持装置、402・・・・・・アド
レストラップ装置、をそれぞれ示す。
In FIG. 4, 401 . . . address trap information holding device for multitasking and 402 . . . address trap device are shown, respectively.

図中の装置で請求範囲のタスク毎のアドレストラップ情
報を保持する手段は、401のマルチタスク用アドレス
トラップ情報保持装置であり、システム内でのタスクの
変更を知る手段は、303のカレントタスクモニタ信号
線であり、アドレストラップ情報を保持する手段から変
更されたタスク用のアドレストラップ情報を参照してア
ドレストラップを行なう手段は、402のアドレストラ
ップ装置である。
In the device shown in the figure, the means for holding address trap information for each task in the scope of claims is a multitasking address trap information holding device 401, and the means for notifying changes of tasks within the system is a current task monitor 303. The address trap device 402 is a signal line and is a means for performing an address trap by referring to address trap information for a task that has been changed from a means for holding address trap information.

本実施例によるマルチタスクアドレストラップ方式につ
いて、第3図と第4図を参照して説明する。
The multitask address trap system according to this embodiment will be explained with reference to FIGS. 3 and 4.

この実施例でのマイクロコンピュータ装置は、マルチタ
スクモニタプログラムが各タスクのスーパーバイザモー
ドで動作しているマルチタスク環境とする。マルチタス
クモニタプログラムは、301のメモリ装置中に常駐し
ており、マルチタスクのタスクの制御を行なうモニタプ
ログラムである。各タスクのプログラムは、301のメ
モリ装置に格納されており、各タスクのタスク制御情報
も、301のメモリ装置内の各タスクコントロールブロ
ック(TCB)の情報として格納されている。実施例2
では、タスクの切り替えを301のメモリ装置内のマル
チタスクモニタプログラムが、現在実行中のタスク情報
(TCB)へのメモリ中のベースアドレスを保持するマ
ルチタスクモニタプログラム内のタスク情報保持メモリ
部のTCBへのアドレス値の管理により、302の中央
処理装置を制御して、マルチタスクのタスクの切り替え
を行なうとする。
The microcomputer device in this embodiment has a multitask environment in which a multitask monitor program is operating in a supervisor mode for each task. The multitask monitor program is a monitor program that resides in the memory device 301 and controls multitask tasks. A program for each task is stored in the memory device 301, and task control information for each task is also stored as information in each task control block (TCB) in the memory device 301. Example 2
In this case, the multitask monitor program in the memory device 301 switches tasks using the TCB of the task information holding memory section in the multitask monitor program that holds the base address in memory to the currently executing task information (TCB). Assume that the central processing unit 302 is controlled by managing the address value to switch the multitasking tasks.

第3図において、302の中央処理装置は、301のメ
モリ装置内に格納されている各タスクのプログラムを実
行する。この場合、タスクの切り替えが行われると30
1のメモリ装置内のマルチタスクモニタプログラム内の
タスク情報保持メモリ部のTCBのベースアドレス値が
変更され。
In FIG. 3, a central processing unit 302 executes programs for each task stored in a memory device 301. In this case, when the task is switched, 30
The base address value of the TCB of the task information holding memory section in the multitask monitor program in the memory device No. 1 is changed.

マルチタスクアドレストラップ装置は、その値を参照す
ることによりタスクの切り替えを参照する。
The multitask address trap device refers to task switching by referring to the value.

303のカレントタスクモニタ信号線は、このタスク情
報保持メモリをモニタする信号線である。
A current task monitor signal line 303 is a signal line that monitors this task information holding memory.

第4図において、401のマルチタスク用アドレストラ
ップ情報保持装置は、301のメモリ装置内に格納され
ている各タスク用のタスク制御情報(TCB)に対応す
る各タスク用のプログラムに関するアドレストラップ情
報が保持されており、303のカレントタスクモニタ信
号線のTCBのベースアドレス情報に従って、各タスク
用のアドレストラップ情報を選出する機能を備え、40
2のアドレストラップ装置にそのアドレストラップ情報
を参照可能とする装置である。401のマルチタスク用
アドレストラップ情報保持装置内の各タスク用のアドレ
ストラップ情報は、各タスクのプログラム内のアドレス
トラップを行うアドレス情報が保持されているとする。
In FIG. 4, a multitasking address trap information holding device 401 stores address trap information regarding a program for each task corresponding to task control information (TCB) for each task stored in a memory device 301. It has a function of selecting address trap information for each task according to the base address information of the TCB of the current task monitor signal line of 403.
This is a device that allows the second address trap device to refer to its address trap information. It is assumed that the address trap information for each task in the multitasking address trap information holding device 401 holds address information for performing an address trap in the program of each task.

第3図において、マルチタスクモニタプログラム下で、
A、B、Cのタスクがマルチタスクで実行されている場
合、301メモリ装置内にはタスクA、B、C用のTC
Bが格納されており、401のマルチタスク用アドレス
トラップ情報保持装置内には、タスクA、B、C用のア
ドレストラップ情報が格納されている。その各タスク用
のアドレストラップ情報は、メモリ装置内のTCHのベ
ースアドレス情報から選出されることが可能である。も
し、タスクBの命令コード部の特定アドレスにアドレス
トラップを行いたい場合、マルチタスク用アドレストラ
ップ情報保持装置内のタスクB用のアドレストラップ情
報保持部に、そのアドレストラップ情報を格納しておく
In Figure 3, under the multitasking monitor program,
When tasks A, B, and C are executed in multitask mode, the TC for tasks A, B, and C is stored in the memory device 301.
Address trap information for tasks A, B, and C is stored in the multitask address trap information holding device 401. The address trap information for each task can be selected from the base address information of the TCH in the memory device. If it is desired to perform an address trap on a specific address in the instruction code section of task B, the address trap information is stored in the address trap information holding section for task B in the multitasking address trap information holding device.

マルチタスクモニタプログラムでタスクA。Task A in the multitasking monitor program.

B、Cをマルチタスクで実行している場合、内部の実行
中のタスクの制御を示すタスク情報保持メモリ部が、タ
スクの変更時にタスク用のTCBのベースアドレスが設
定され、変更される。303のカレントタスクモニタ信
号線によりそのタスク情報保持メモリ部の値を参照して
、305のマルチタスクアドレストラップ装置に取り込
む。
When B and C are executed in multi-task mode, the task information holding memory section indicating the control of the internally executed task is changed by setting the base address of the TCB for the task when the task is changed. The value of the task information holding memory section is referred to through the current task monitor signal line 303 and taken into the multitask address trap device 305 .

401のマルチタスク用アドレストラップ情報保持装置
は、303のカレントタスクモニタ信号線から取り込ん
だ現在実行中のタスクのTCBのベースアドレスにより
、現在実行中のタスク(A、B、C’)を識別し、現在
実行中のタスク用のアドレストラップ情報を選出し、4
02のアドレストラップ装置に参照可能とする。402
のアドレストラップ装置は、306のシステムバスより
現在実行しているプログラムアドレスを取り込み、40
1から参照できる現在実行中のタスクのアドレストラッ
プ情報に基すき、306のシステムバスからの実行アド
レスと比較を行い、401のアドレストラップ情報保持
装置内に格納されているアドレストラップ情報と等しい
場合、304の割り込み信号線に割り込み信号を出力し
て、302の中央処理装置に割り込みをかけて、アドレ
ストラップを行い、302の中央処理装置を停止させる
。302の中央処理装置で、タスクBにタスクが切り替
わった場合、401のマルチタスク用アドレストラップ
情報保持装置の選出するアドレストラップ情報も、既に
定義したタスクB用のアドレストラップ情報に切り替わ
り、402のアドレストラップ装置は、そのタスクB用
のアドレストラップ情報に基すき、アドレストラップを
行なう。これにより特定のタスクのみに、アドレストラ
ップを行うことが可能である。
The multitasking address trap information holding device 401 identifies the currently executing task (A, B, C') based on the base address of the TCB of the currently executing task taken in from the current task monitor signal line 303. , select the address trap information for the currently running task, and 4
02 address trap device. 402
The address trap device captures the currently executing program address from the system bus 306, and
Based on the address trap information of the currently executing task that can be referenced from 1, it is compared with the execution address from the system bus 306, and if it is equal to the address trap information stored in the address trap information holding device 401, An interrupt signal is output to the interrupt signal line 304 to interrupt the central processing unit 302, perform an address trap, and stop the central processing unit 302. When the task is switched to task B in the central processing unit 302, the address trap information selected by the multitasking address trap information holding device 401 is also switched to the already defined address trap information for task B, and the address trap information 402 is The trap device performs an address trap based on the address trap information for task B. This allows address trapping to be performed only for specific tasks.

もし、タスクAの命令コード部が、タスクBの命令コー
ド部と同一のメモリプログラムを実行する場合において
、タスクBの特定アドレスにアドレストラップを行いた
い場合、アドレストラップを行なうアドレスは、301
のメモリ装置内のタスクA、Bにおいては同一メモリア
ドレスとなるが、401のマルチタスク用アドレストラ
ップ情報保持装置により、アドレストラップ情報が、り
スフAとBは切り替わっており、301のメモリ装置内
の同一命令コードのアドレストラップを行いたいアドレ
スを、302中央処理装置が実行しても、現在のタスク
がタスクAの場合は、アドレストラップは行われず、タ
スクBに切り替わった場合に、アドレストラップが行わ
れる。これにより、メモリ中の同一命令コードを実行す
るマルチタスクにおいて、特定のタスクの実行にのみア
ドレストラップを行うことが可能である。
If the instruction code part of task A executes the same memory program as the instruction code part of task B, and if you want to perform an address trap to a specific address of task B, the address to which the address trap is performed is 301.
Tasks A and B in the memory device 401 have the same memory address, but the address trap information is switched between tasks A and B by the multitasking address trap information holding device 401, and the memory address in the memory device 301 is the same. Even if the central processing unit 302 executes an address for which an address trap is to be performed using the same instruction code, if the current task is task A, the address trap will not be performed, and when switching to task B, the address trap will not be performed. It will be done. As a result, in multitasking that executes the same instruction code in memory, it is possible to perform address trapping only for execution of a specific task.

〔発明の効果〕〔Effect of the invention〕

本発明においては、マルチタスク環境において、特定の
タスクに関して、アドレストラップを行うことを可能と
している。同一命令コードを実行する複数のタスク内の
特定のタスクについてのアドレストラップを行うことが
できる。
In the present invention, it is possible to perform an address trap for a specific task in a multitasking environment. Address trapping can be performed for a specific task among multiple tasks that execute the same instruction code.

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

第1図は本発明の実施例1のマルチタスクアドレストラ
ップ装置を備えるマイクロコンピュータ装置を示すブロ
ック図、第2図はそのマルチタスクアドレストラップ装
置の詳細を示すブロック図である。 101・・・・・・メモリ装置、102・・・・・・中
央処理装置、103・・・・・・カレントタスクモニタ
信号線、104・・・・・・割り込み信号線、1’05
・・団・マルチタスクアドレストラップ装置、1o6・
・団・システムバス、201・・・・・・マルチタスク
用アドレストラップ情報保持装置、202・・・・・・
アドレストラップ装置。 第3図は本発明の実施例2のマルチタスクアドレストラ
ップ装置を備え、マルチタスクモニタプログラム環境下
のマイクロコンピュータ装置を示す図、第4図はそのマ
ルチタスクアドレストラップ装置の詳細を示すブロック
図である。 301・・・・・・メモリ装置、302・・川・中央処
理装置、303・・・・・・カレントタスクモニタ信号
線、304・・・・・・割り込み信号線、3o訃旧・・
マルチタスクアドレストラップ装置、306・・・・・
・システムバス、401・・・・・・マルチタスク用ア
ドレストラップ情報保持装置、402・・・・・・アド
レストラップ装置。 代理人 弁理士  内 原   音 、¥/[ s;2  呵
FIG. 1 is a block diagram showing a microcomputer equipped with a multi-task address trap device according to a first embodiment of the present invention, and FIG. 2 is a block diagram showing details of the multi-task address trap device. 101...Memory device, 102...Central processing unit, 103...Current task monitor signal line, 104...Interrupt signal line, 1'05
・・Gan・Multitasking Address Trap Device, 1o6・
・Group/System bus, 201...Address trap information holding device for multitasking, 202...
Address trap device. FIG. 3 is a diagram showing a microcomputer device equipped with a multitask address trap device according to a second embodiment of the present invention and under a multitask monitor program environment, and FIG. 4 is a block diagram showing details of the multitask address trap device. be. 301...Memory device, 302...Central processing unit, 303...Current task monitor signal line, 304...Interrupt signal line, 3o...
Multitasking address trap device, 306...
- System bus, 401...Address trap information holding device for multitasking, 402...Address trap device. Agent Patent Attorney Oto Uchihara, ¥/[s;2 呵

Claims (1)

【特許請求の範囲】[Claims] マルチタスクの機能を有するシステムにおいて、タスク
毎のアドレストラップ情報を保持する手段と、システム
内でのタスクの変更を知る手段と、アドレストラップ情
報を保持する手段から変更されたタスク用のアドレスト
ラップ情報を参照してアドレストラップを行なう手段を
備え、特定タスクのメモリアドレスにおいてシステムを
停止させることを特徴とするアドレストラップ方式。
In a system having a multitasking function, a means for holding address trap information for each task, a means for knowing changes of tasks within the system, and address trap information for tasks changed from a means for holding address trap information. An address trap method characterized by comprising a means for performing an address trap by referring to a memory address of a specific task, and stopping the system at a memory address of a specific task.
JP25402587A 1987-10-07 1987-10-07 Multi-task address trap system Pending JPH0195334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25402587A JPH0195334A (en) 1987-10-07 1987-10-07 Multi-task address trap system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25402587A JPH0195334A (en) 1987-10-07 1987-10-07 Multi-task address trap system

Publications (1)

Publication Number Publication Date
JPH0195334A true JPH0195334A (en) 1989-04-13

Family

ID=17259192

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25402587A Pending JPH0195334A (en) 1987-10-07 1987-10-07 Multi-task address trap system

Country Status (1)

Country Link
JP (1) JPH0195334A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59128640A (en) * 1983-01-13 1984-07-24 Fuji Facom Corp On-line tracing method in microprogram type computer
JPS6442745A (en) * 1987-08-11 1989-02-15 Nec Corp Trapping system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59128640A (en) * 1983-01-13 1984-07-24 Fuji Facom Corp On-line tracing method in microprogram type computer
JPS6442745A (en) * 1987-08-11 1989-02-15 Nec Corp Trapping system

Similar Documents

Publication Publication Date Title
US6675191B1 (en) Method of starting execution of threads simultaneously at a plurality of processors and device therefor
US6430594B1 (en) Real-time operating system and a task management system therefor
US6820153B2 (en) Interrupt processing and memory management method in an operation processing device and a device using the same
JPH0195334A (en) Multi-task address trap system
JP2677458B2 (en) System call execution device
JP3005562B1 (en) Task management device and task scheduling method
JPH0644234B2 (en) Task management device
JPH0223434A (en) Multi-task tracing system
JPH01195562A (en) Control system for allocation of input/output device
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS63636A (en) Task control system
JPH0495137A (en) Context switching method for operating system
JPH04153837A (en) Timer request processing system
JPH06119190A (en) Task switching processing system
JPH04155532A (en) Task switching system
JPH02287637A (en) Data collecting system for evaluating performance of program
JPH0425943A (en) Divided multiplex task control system
JP2000029850A (en) Task controlling method using inter-processor communication of operating system
JPS62269489A (en) Vision system
JP2000122882A (en) Multi-thread processor and debugging device
JPH03126134A (en) Task switching system for cpu
JPS61208127A (en) Microprogram controller
JPH03182945A (en) Transfer system for data in main storage
JPH02127732A (en) Job control system
JPH04286046A (en) Interruption controller