JPH0594316A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0594316A
JPH0594316A JP25612491A JP25612491A JPH0594316A JP H0594316 A JPH0594316 A JP H0594316A JP 25612491 A JP25612491 A JP 25612491A JP 25612491 A JP25612491 A JP 25612491A JP H0594316 A JPH0594316 A JP H0594316A
Authority
JP
Japan
Prior art keywords
resource
instruction
task
operation number
number identifier
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
JP25612491A
Other languages
Japanese (ja)
Inventor
Kaoru Kuwata
薫 桑田
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 JP25612491A priority Critical patent/JPH0594316A/en
Publication of JPH0594316A publication Critical patent/JPH0594316A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To preferentially perform the use of the resources of the urgent task when plural tasks to share one power exist and the urgent task occurs. CONSTITUTION:An instruction interpreting part 2 to interpret the instruction of each task and judge whether it is the use starting instruction of resources or a use end instruction is provided. An operation number identifier 3 to store the prescribed value in correspondence to the resources is provided. An arithmetic part 4 to add 1 to the value of the operation number identifier 3 at the time of the use start instruction of the resources and subtract 1 at the time of the use end instruction is provided. When the value of the operation number identifier 3 after 1 is subtracted by the use end instruction of the resources is except '0,' an instruction sequencer 5 to perform the use processing to the resources of the previous task from a leading address is provided.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は情報処理装置に関し、特
に複数のタスクが実行される際、同一の資源を共用する
機能を備えた情報処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, and more particularly to an information processing apparatus having a function of sharing the same resource when a plurality of tasks are executed.

【0002】[0002]

【従来の技術】従来、この種の情報処理装置は、複数の
タスクが実行され、一つのタスクが資源の使用処理を実
行している時、別の緊急なタスクが発生してこの資源を
使用処理する場合、より緊急なタスクに制御を切換えて
も、切換わる前のタスクで処理していた資源に対し、こ
の資源の使用処理が終了するまで待つようになってお
り、資源処理の横取りを許していなかった。
2. Description of the Related Art Conventionally, in this type of information processing apparatus, when a plurality of tasks are executed and one task is executing a resource use process, another urgent task occurs and the resource is used. When processing, even if the control is switched to a more urgent task, it waits until the resource use processing for the resource that was being processed by the task before switching is completed, and preemption of resource processing is taken. I did not forgive.

【0003】[0003]

【発明が解決しようとする課題】上述した従来の情報処
理装置では、より緊急度の高いタスクが出現しても、資
源処理に関しては横取りを許さず、資源の競合が起きた
場合は、資源処理は順番に実行されるため、たとえ緊急
なタスクであっても、資源処理が待たされるという欠点
があった。
In the above-described conventional information processing apparatus, even if a task with a higher degree of urgency appears, preemption is not allowed for resource processing, and resource competition occurs when resource competition occurs. However, since they are executed in order, even if the task is an urgent task, there is a drawback that the resource processing is kept waiting.

【0004】本発明の目的は、緊急度の高いタスクに対
しては共用の資源を優先的に使用処理することができる
情報処理装置を提供することにある。
An object of the present invention is to provide an information processing apparatus capable of preferentially using and processing a shared resource for a task of high urgency.

【0005】[0005]

【課題を解決するための手段】本発明の情報処理装置
は、複数のタスクが存在しこれら各タスクが実行される
とき1つの資源を共用する情報処理装置であって、前記
各タスクの命令を解釈し前記資源の使用処理開始の命令
か前記資源の使用処理終了の命令かを判断する命令解釈
部と、前記資源と対応して設けられ所定の値を記憶する
操作数識別子と、前記命令解釈部の判断が前記資源の使
用処理開始の命令であるとき前記操作数識別子の値に1
を加算し前記資源の使用処理終了の命令であるとき前記
操作数識別子の値から1を減算する演算器と、前記複数
のタスクのうちの第1のタスクの前記資源に対する使用
処理が終了した後、前記操作数識別子の値が予め設定さ
れた値以外であるとき前記第1のタスクの前に前記資源
を使用処理していた第2のタスクの前記資源の使用処理
の先頭アドレスからこの資源の使用処理を再開させる命
令シーケンサとを有している。
An information processing apparatus of the present invention is an information processing apparatus that shares a resource when a plurality of tasks exist and each of these tasks is executed, An instruction interpretation unit that interprets and determines whether it is an instruction to start the use processing of the resource or an instruction to end the use processing of the resource, an operation number identifier that is provided corresponding to the resource and stores a predetermined value, and the instruction interpretation When the determination of the copy is an instruction to start the use processing of the resource, the value of the operation number identifier is 1
And an operation unit that subtracts 1 from the value of the operation number identifier when the instruction is an instruction to end the use processing of the resource, and after the use processing for the resource of the first task of the plurality of tasks is completed. , When the value of the operation number identifier is other than a preset value, the resource is processed from the start address of the resource use process of the second task which has used the resource before the first task. And an instruction sequencer for resuming usage processing.

【0006】[0006]

【実施例】次に、本発明の実施例について図面を参照し
て説明する。
Embodiments of the present invention will now be described with reference to the drawings.

【0007】図1は本発明の一実施例を示すブロック図
である。
FIG. 1 is a block diagram showing an embodiment of the present invention.

【0008】この実施例は、内部バス1と、この内部バ
ス1からの各タスクの命令を解釈し資源の使用処理開始
の命令か資源の使用処理終了の命令かを判断する命令解
釈部2と、資源と対応して設けられ所定の値を記憶する
操作数識別子3と、命令解釈部2の判断が資源の使用処
理開始の命令であるとき操作数識別子3の値に1を加算
し資源の使用処理終了の命令であるとき操作数識別子3
の値から1を減算する演算器4と、複数のタスクのうち
の1つのタスクの資源に対する使用処理が終了した後、
操作数識別子の値が予め設定された値(例えば“0”)
以外であるとき前記1つのタスクの前に資源を使用処理
していた他のタスクの資源の使用処理の先頭アドレスか
らこの資源の使用処理を再開させる命令シーケンサ5と
を有する構成となっている。
In this embodiment, an internal bus 1 and an instruction interpreter 2 for interpreting an instruction of each task from the internal bus 1 and determining whether it is an instruction to start a resource use process or an instruction to end a resource use process. , The operation number identifier 3 which is provided corresponding to the resource and stores a predetermined value, and when the instruction interpretation unit 2 judges that the resource use process is started, 1 is added to the value of the operation number identifier 3 Operation number identifier 3 when the instruction is a usage processing end
After the operation unit 4 that subtracts 1 from the value of and the use processing for the resource of one task of the plurality of tasks is completed,
The value of the operation number identifier is a preset value (for example, "0")
In other cases, the instruction sequencer 5 restarts the resource use process from the start address of the resource use process of the other task that has used the resource before the one task.

【0009】次にこの実施例の動作について説明する。Next, the operation of this embodiment will be described.

【0010】タスク処理の各命令は内部バス1を経由し
て、命令解釈部2で解釈される。そこで、資源に対する
使用処理開始であることが解釈されると、その資源と対
応する操作数識別子3の内容(値)を演算器4により1
加算する。資源の使用処理が終了することを命令解釈部
2で解釈すると、その資源と対応する操作数識別子3の
内容を演算器4により1減算する。1減算した後の操作
数識別子3の内容が“0”でない場合、その資源に対す
る処理がネストしたことを示しているため、現在実行し
ているタスクの前に資源を使用処理していたタスクの再
開アドレスを、この資源を操作するための処理部の先頭
アドレスに設定するための処理に制御を移すように命令
シーケンサ5を動作させる。
Each instruction for task processing is interpreted by the instruction interpreting section 2 via the internal bus 1. Then, when it is interpreted that the use process for the resource is started, the contents (value) of the operation number identifier 3 corresponding to the resource is set to 1 by the arithmetic unit 4.
to add. When the instruction interpreting unit 2 interprets that the resource use processing is completed, the arithmetic unit 4 subtracts 1 from the content of the operation number identifier 3 corresponding to the resource. If the content of the operation number identifier 3 after decrementing by 1 is not "0", it means that the process for that resource has been nested. Therefore, the task that is using the resource before the currently executing task is processed. The instruction sequencer 5 is operated so as to transfer control to the processing for setting the restart address to the start address of the processing unit for operating this resource.

【0011】なお、緊急度の判断は中央処理部等で判断
され、その緊急度の高いタスクの命令が内部バス1を介
して命令解釈部2に伝達される。これと同時に中央処理
部は、それまで資源を使用処理していたタスクの資源の
使用処理を中断させる。
The determination of the degree of urgency is made by the central processing unit or the like, and the instruction of the task of high urgency is transmitted to the instruction interpreting unit 2 via the internal bus 1. At the same time, the central processing unit suspends the resource use processing of the task that has used the resource.

【0012】図2はこの実施例において、資源Aを使用
処理中の第1のタスクと緊急度の高い第2のタスクが発
生して、同一の資源Aを使用処理する際の制御の流れを
示した流れ図である。
FIG. 2 shows the flow of control when the same resource A is used and processed when a first task that is using the resource A and a second task with a high degree of urgency occur in this embodiment. It is the flow chart shown.

【0013】まずはじめに、第1のタスクが資源Aに対
する処理P1を実行している(S1)。その際、その資
源Aに対する操作数識別子3の内容は“1”である。
First, the first task is executing the process P1 for the resource A (S1). At that time, the content of the operation number identifier 3 for the resource A is “1”.

【0014】その途中で緊急な第2のタスクが出現し、
第1のタスクは資源Aの処理の最中でその処理P1を中
断し、制御は第2のタスクに移る。第2のタスクの中で
資源Aに対する処理P2が開始されると、資源Aの操作
数識別子3は1加算され、“2”になる。そして第2の
タスクの資源Aに対する処理P2が終了すると、資源A
の操作数識別子3は1減算され“1”になる(S2)。
On the way, an urgent second task appears,
The first task suspends its processing P1 during the processing of the resource A, and the control is transferred to the second task. When the process P2 for the resource A is started in the second task, the operation number identifier 3 of the resource A is incremented by 1 and becomes "2". When the process P2 for the resource A of the second task is completed, the resource A
The operation number identifier 3 of is subtracted by 1 and becomes "1" (S2).

【0015】このとき、操作数識別子3の内容は“0”
ではないので、第2のタスクの前に実行していた第1の
タスクで資源Aに対する処理P1が途中まで実行されて
いたことがわかり、資源Aの処理P1の再開は、中断さ
れたところからではなく、資源Aに対する処理P1の先
頭アドレスにさかのぼってやり直すように設定される。
そして第1のタスクの資源Aの処理P1が先頭アドレス
から実行され、第1のタスクの資源Aに対する処理P1
を終了する。このとき操作数識別子3の内容は1減算さ
れて“0”となる(S3)。
At this time, the content of the operation number identifier 3 is "0".
Since it is not, it can be seen that the process P1 for the resource A was partially executed in the first task that was executed before the second task, and the restart of the process P1 for the resource A was resumed from where it was interrupted. Instead, it is set to trace back to the start address of the process P1 for the resource A and start over.
Then, the process P1 of the resource A of the first task is executed from the start address, and the process P1 of the resource A of the first task is executed.
To finish. At this time, the content of the operation number identifier 3 is decremented by 1 and becomes "0" (S3).

【0016】このようにして、緊急度の高いタスクの共
用の資源に対する使用処理が可能となり、中断されたタ
スクの同資源の使用処理も終了させることができる。
In this way, it becomes possible to perform a process of using a shared resource of a task with a high degree of urgency, and it is possible to end the process of using the same resource of a suspended task.

【0017】[0017]

【発明の効果】以上説明したように本発明は、各タスク
の命令が1つの資源の使用処理の開始命令であればその
内容に1を加算し、使用処理の終了命令であれば1を減
算する操作数識別子を設け、1つのタスクの資源に対す
る使用処理が終了したとき、操作数識別子の内容が所定
の値(0)以外であればこの終了したタスクの前のタス
クの資源に対する使用処理を先頭アドレスから再開する
構成とすることにより、緊急度の高いタスクに対して共
用の資源を優先的に使用処理することができ、かつ中断
されたタスクの同資源に対する使用処理も終了させるこ
とができる効果がある。
As described above, according to the present invention, if the instruction of each task is the start instruction of the use processing of one resource, 1 is added to its content, and if it is the end instruction of the use processing, 1 is subtracted. When the usage process for the resource of one task is completed, if the content of the operation number identifier is other than the predetermined value (0), the usage process for the resource of the task before this completed task is performed. With the configuration that restarts from the start address, the shared resource can be preferentially used for the task with high urgency, and the use processing for the interrupted task for the same resource can be terminated. effective.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

【図2】図1に示された実施例の動作を説明するための
流れ図である。
FIG. 2 is a flow chart for explaining the operation of the embodiment shown in FIG.

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

1 内部バス 2 命令解釈部 3 操作数識別子 4 演算器 5 命令シーケンサ 1 Internal Bus 2 Instruction Interpreter 3 Operation Number Identifier 4 Operation Unit 5 Instruction Sequencer

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数のタスクが存在しこれら各タスクが
実行されるとき1つの資源を共用する情報処理装置であ
って、前記各タスクの命令を解釈し前記資源の使用処理
開始の命令か前記資源の使用処理終了の命令かを判断す
る命令解釈部と、前記資源と対応して設けられ所定の値
を記憶する操作数識別子と、前記命令解釈部の判断が前
記資源の使用処理開始の命令であるとき前記操作数識別
子の値に1を加算し前記資源の使用処理終了の命令であ
るとき前記操作数識別子の値から1を減算する演算器
と、前記複数のタスクのうちの第1のタスクの前記資源
に対する使用処理が終了した後、前記操作数識別子の値
が予め設定された値以外であるとき前記第1のタスクの
前に前記資源を使用処理していた第2のタスクの前記資
源の使用処理の先頭アドレスからこの資源の使用処理を
再開させる命令シーケンサとを有することを特徴とする
情報処理装置。
1. An information processing apparatus that shares a resource when there are a plurality of tasks and each of these tasks is executed. The information processing apparatus interprets the instruction of each task and starts the use processing of the resource. An instruction interpreting unit that determines whether it is an instruction to end the use processing of a resource, an operation number identifier that is provided corresponding to the resource and stores a predetermined value, and an instruction that the determination of the instruction interpreting unit starts the use processing of the resource And an operation unit for adding 1 to the value of the operation number identifier, and subtracting 1 from the value of the operation number identifier when the instruction is an instruction to end the use process of the resource, and a first of the plurality of tasks. After the use processing of the task for the resource is completed, when the value of the operation number identifier is other than a preset value, the second task of the second task that has used the resource before the first task is processed. Start of resource usage processing An information processing device, comprising: an instruction sequencer for restarting the processing of using this resource from a dress.
JP25612491A 1991-10-03 1991-10-03 Information processor Pending JPH0594316A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25612491A JPH0594316A (en) 1991-10-03 1991-10-03 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25612491A JPH0594316A (en) 1991-10-03 1991-10-03 Information processor

Publications (1)

Publication Number Publication Date
JPH0594316A true JPH0594316A (en) 1993-04-16

Family

ID=17288235

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25612491A Pending JPH0594316A (en) 1991-10-03 1991-10-03 Information processor

Country Status (1)

Country Link
JP (1) JPH0594316A (en)

Similar Documents

Publication Publication Date Title
JPS6364144A (en) Inter-memory data transfer system
JPH0594316A (en) Information processor
JPS6027031A (en) Information processor
JP2580072B2 (en) Interrupt processing device
JPH04195358A (en) Executing method for program
JPS59127156A (en) Virtual computer system
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS61199156A (en) Tss session opening processing system
JPH0365721A (en) Print server
JPH09325892A (en) Job parallel execution control method
JPS6347861A (en) Input/output control method for electronic computer
JP2581327B2 (en) Virtual machine I / O interrupt handling method
JP2845006B2 (en) Report output method
JPS6335141B2 (en)
JPS61166631A (en) Microprogram control processor
JPS63128442A (en) Control device for cyclic start task
JPH02202635A (en) Task control method
JPS6132699B2 (en)
JPH11175355A (en) Device and method for processing information, operating system and computer readable medium
JPH02211545A (en) Job execution control system
JPH08212088A (en) Information processor and communication processor
JPH02201543A (en) Processing system for privileged instruction of virtual computer
JPH0344742A (en) Task assignment control system for multiprocessor
JPH06149592A (en) Interruption processing system for microcomputer
JPS63159941A (en) Task control system for real time os