[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JPH06187175A - Exclusion control method for multi-task computing system - Google Patents

Exclusion control method for multi-task computing system

Info

Publication number
JPH06187175A
JPH06187175A JP35554692A JP35554692A JPH06187175A JP H06187175 A JPH06187175 A JP H06187175A JP 35554692 A JP35554692 A JP 35554692A JP 35554692 A JP35554692 A JP 35554692A JP H06187175 A JPH06187175 A JP H06187175A
Authority
JP
Japan
Prior art keywords
task
semaphore
priority
processing
priority order
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
JP35554692A
Other languages
Japanese (ja)
Inventor
Tsutomu Sawada
勉 澤田
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.)
ERUGU KK
Original Assignee
ERUGU KK
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 ERUGU KK filed Critical ERUGU KK
Priority to JP35554692A priority Critical patent/JPH06187175A/en
Publication of JPH06187175A publication Critical patent/JPH06187175A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To execute a processing according to a priority order by a task even in the exclusion control method of a multi-task system in which the execution of the processing of the task is operated in the priority order by exclusively using a resource by operating the addition and subtraction of a counter value by a semaphore, and performing a lock operation and an un-lock operation. CONSTITUTION:When a task Tm 7 whose priority order is higher than a task Tn 8 occupying a semaphore 6 executes a P operation, the priority order is increased to the priority order which is the same as the task Tm 7. Then, when the task occupying the semaphore 6 executes a V operation, the priority order of the task is returned to the original order. Thus, the processing of the task Tn 8 occupying the semaphore can be prevented from being taken away by the task whose priority order is lower than the Tm 7 which is not related with the semaphore 6 and higher than the Tn 8, and the waiting task can start traveling according to the priority order.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、マルチタスクを実現す
るオペレーティングシステム(OS)の排他制御方式、
さらに詳しく言えば、排他制御されなければならない資
源を扱うマルチタスク用管理システム(データ管理,ネ
ットワーク管理等)における排他制御方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an exclusive control system of an operating system (OS) for realizing multitask,
More specifically, it relates to an exclusive control method in a multi-task management system (data management, network management, etc.) that handles resources that must be exclusively controlled.

【0002】[0002]

【従来の技術】マルチタスクシステムにおいて、同時に
使用できない資源を複数のタスクが使用する場合には、
他のタスクが使用していないことを調べてから使用す
る。他のタスクが使用している場合には、その使用の終
了までウェイトし、他のタスクが使用を終了して資源の
解放を宣言した後に、ウェイトしていたタスクが使用可
能となる。この操作を実現するロジックは一般的にセマ
フォと呼ばれる。セマフォはカウンタ値で管理され、そ
れに対する2つの操作が機能的に提供される。1つはP
操作(ロック操作)と呼ばれ、カウンタ値を1だけ減算
し、結果が正(0以上)ならばそのまま処理を続行し、
結果が負になるようだとウェイトするものである。もう
1つはV操作(またはアンロック操作)と呼ばれ、カウ
ンタ値に1を加算する。その時、他のタスクがP操作で
ウェイトしているならばそのタスクについてP操作を繰
り返す。
2. Description of the Related Art In a multitasking system, when multiple tasks use resources that cannot be used simultaneously,
Check that it is not used by another task before using it. If another task is using it, it waits until the end of its use, and after the other task finishes its use and declares the release of resources, the waiting task becomes available. The logic that implements this operation is commonly called a semaphore. The semaphore is managed by the counter value, and two operations for it are functionally provided. One is P
It is called operation (lock operation), the counter value is decremented by 1, and if the result is positive (0 or more), the processing is continued,
It waits for the result to be negative. The other is called V operation (or unlock operation) and adds 1 to the counter value. At this time, if another task is waiting for the P operation, the P operation is repeated for that task.

【0003】図4はバイナリセマフォを使用した資源の
排他制御のフローチャートである。タスクAがP操作を
実行している。セマフォカウンタが初期値の1から0に
変化するだけで、このタスクAはそのまま処理を続行す
る。この間に排他的に資源を使用する。同じ資源を使用
したいタスクBがこの間にP操作を実行しても、セマフ
ォカウンタは既に0であるためセマフォ待ちのウェイト
状態になる。この操作によって同じ資源が2重に使用さ
れることを防止できる。タスクAがV操作を実行する
と、セマフォカウンタは一度1に戻って直ちにタスクB
のP操作で再度0に戻る。タスクBはこの時点で、セマ
フォ待ちのウェイトが解放され、その結果資源を使用す
ることができる。タスクAがV操作を実行した時点でタ
スクAもBも実行可能となるが、どちらのタスクが実行
されるかは,タスクの優先順位に依存する。
FIG. 4 is a flowchart of resource exclusive control using a binary semaphore. Task A is executing the P operation. The semaphore counter only changes from the initial value of 1 to 0, and the task A continues processing as it is. Resources are exclusively used during this period. Even if the task B that wants to use the same resource executes the P operation during this period, the semaphore counter is already 0, so that the semaphore wait state is entered. This operation can prevent the same resource from being used twice. When task A executes V operation, the semaphore counter returns to 1 once, and immediately after task B
It returns to 0 again by P operation. At this point, the task B releases the wait for the semaphore and can use the resource as a result. When the task A executes the V operation, both the tasks A and B can be executed, but which task is executed depends on the priority order of the tasks.

【0004】図5はセマフォを実現するロジックの構成
図である。セマフォの管理データ10は、待ちタスクの
リンクヘッド10aとカウンタ10bから構成される。
セマフォ待ち中のタスク(Tn,Tm,・・・)は優先順位
順にリンクされて監視される。ただし、リンク先頭のタ
スクは、セマフォ占有中のタスクを示している。このタ
スクの優先順位はその後にリンクされているタスクより
低い場合もある。 この状態でP操作が実行されると、
そのタスクはに示すように先頭のみ除外して,次のリ
ンクから始まるセマフォ待ちリンク列の優先順位に従っ
た位置に挿入される。また、V操作はセマフォ占有中の
タスク(リンク列先頭のタスク)からのみ発行される。
V操作が発行されると、リンク列先頭のタスクがリンク
から外され,その結果、に示すように先頭に位置する
ことになったタスクのセマフォ待ちウェイト状態が解除
され、そのタスクがセマフォを占有して走行可能とな
る。
FIG. 5 is a block diagram of a logic for realizing a semaphore. The semaphore management data 10 is composed of a link head 10a of a waiting task and a counter 10b.
Tasks (Tn, Tm, ...) Waiting for a semaphore are linked and monitored in order of priority. However, the task at the beginning of the link indicates the task that is occupying the semaphore. The priority of this task may be lower than the tasks linked to it thereafter. When the P operation is executed in this state,
The task is inserted at the position according to the priority of the semaphore waiting link sequence starting from the next link, excluding only the head as shown in. Further, the V operation is issued only from the task that is occupying the semaphore (the task at the head of the link sequence).
When the V operation is issued, the task at the beginning of the link sequence is removed from the link, and as a result, the task waiting at the beginning is released from the semaphore wait state and the task occupies the semaphore. Then it becomes possible to run.

【0005】[0005]

【発明が解決しようとする課題】従来の排他制御方式に
おけるセマフォをウェイトするタスクは、既にセマフォ
を専有しているタスクの後に優先順位順にキューを作成
している。その場合、ウェイトするタスクは、無条件に
セマフォのV操作待ちになり問題点が発生する。図6は
その問題点を説明するための図で、セマフォロジックに
よって優先順位処理が阻害されている状態を示してい
る。セマフォを専有しているタスクTn の優先順位をn
とし、そのセマフォの解除を待っているタスクTm の優
先順位をmとする。n<mであってもそのタスクTn
V操作をタスクTm がウェイトするのは当然であるが、
もしnより高くmより低い優先順位であってセマフォに
関連しないタスクが走行していれば、Tn は優先順位処
理のロジックによってそれらのタスクに実行権を奪われ
てしまう。その結果、Tm は自分の優先順位よりも低い
状態でウェイトしてしまうことになり、優先順位の処理
ロジックがこの時点で破られてしまう。
In the conventional exclusive control system, a task that waits for a semaphore creates a queue in the order of priority after a task that has already occupied the semaphore. In that case, the wait task unconditionally waits for the V operation of the semaphore, which causes a problem. FIG. 6 is a diagram for explaining the problem, and shows a state in which priority processing is blocked by the semaphore logic. The priority of task T n that occupies a semaphore is n
And the priority of task T m waiting for the release of the semaphore is m. Even if n <m, it is natural that the task T m waits for the V operation of the task T n .
If tasks that are higher in priority than n and lower than m and are not associated with a semaphore are running, T n will be deprived of those tasks execution rights by the priority processing logic. As a result, T m is weighted in a state of being lower than its own priority, and the processing logic of priority is broken at this point.

【0006】図7は処理の実行順番の一例を示す図であ
る。Tn はセマフォに関連しない自分より優先順位の高
いタスクTn1〜Tniに実行権を奪われる。この時Tn1
niがTm より優先順位が高いという保証はない。Tn1
〜TniがTn より高くTm より低い優先順位のタスクで
ある事態は充分に可能性がある。その場合にはTm はT
n のみならず不特定多数のTn1〜Tniによっても実行を
妨げられる結果となり、明らかにこれは優先順位処理が
妨害される結果となってしまう。一般にコンピュータ処
理では、図8に示すようにCPUを使用した処理実行に
較べ、こうした資源待ちの占める時間が非常に長い。そ
のため、CPUの使用を優先順位順になるように制御し
ても、優先順位に従わない場合が占める割合が多いと、
実際には優先順位に従った処理ができないことになって
しまう。本発明の目的は上記問題を解決するもので、タ
スクが優先順位に従って走行する原則を破る可能性を小
さくし、確実に優先順位順のタスクを実行できるように
したマルチタスクコンピューティングシステムの排他制
御方式を提供することにある。
FIG. 7 is a diagram showing an example of the execution order of processing. T n is deprived of the execution right by the tasks T n1 to T ni which are not related to the semaphore and have higher priority than themselves. At this time T n1 ~
There is no guarantee that T ni has higher priority than T m . T n1
It is quite possible that ~ T ni is a task of higher priority than T n and lower than T m . In that case T m is T
Execution is hindered not only by n but also by an unspecified number of T n1 to T ni , which obviously hinders priority processing. Generally, in computer processing, such a resource wait time is extremely long as compared with processing execution using a CPU as shown in FIG. Therefore, even if the CPU usage is controlled to be in the order of priority, there are many cases where the priority is not followed.
Actually, the processing according to the priority order cannot be performed. An object of the present invention is to solve the above-mentioned problem and to reduce the possibility that a task violates the principle of traveling according to the priority order, and to execute the task in the priority order surely by exclusive control. To provide a method.

【0007】[0007]

【課題を解決するための手段】前記目的を達成するため
に本発明によるマルチタスクコンピューティングシステ
ムの排他制御方式は、優先順位にしたがってタスクが処
理を実行するとき、セマフォに対してロック操作を行う
ことにより資源を排他的に使用し、前記タスクが処理実
行を終了したとき、前記セマフォに対しアンロック操作
を行うことにより前記資源の使用の解放を宣言しその後
のウェイトしている複数のタスクの優先順位にしたがっ
た前記資源の使用による処理実行を可能にする。この排
他制御方式において、タスク(Tn )がロック操作を行
い資源の排他的使用をしている場合に、前記タスク(T
n )より優先順位の高いタスク(Tm )がロック操作を
行うとそのタスク(Tm )をウェイト状態にするととも
に前記タスク(Tn )の優先順位を(n)から(m)に
引き上げる手段と、前記タスク(Tn )がセマフォに対
しV操作をしたとき、タスク(Tn )を元の優先順位
(n)に戻す手段を有する構成としてある。
In order to achieve the above object, an exclusive control method of a multitask computing system according to the present invention performs a lock operation on a semaphore when a task executes a process according to a priority order. By using the resource exclusively, and when the task finishes the processing execution, the release of the use of the resource is declared by performing the unlock operation to the semaphore, and then the plurality of waiting tasks It enables processing execution by using the resources according to the priority. In this exclusive control method, when a task (T n ) performs a lock operation and exclusively uses a resource, the task (T n )
(n ) When the task (T m ) having a higher priority is locked, the task (T m ) is placed in the wait state and the priority of the task (T n ) is raised from (n) to (m). When the task (T n ) performs a V operation on the semaphore, the task (T n ) is returned to the original priority (n).

【0008】[0008]

【作用】前記構成によれば、資源待ちでウェイトする間
も、システムがタスクの優先順位を忠実に反映した処理
実行をできるようになり、ウェイトしているタスクは自
分より低い優先順位のタスクによって実行権を奪われる
ことはなくなる。
According to the above configuration, the system can execute the processing in which the priority of the task is faithfully reflected even while waiting for the resource, and the waiting task can be executed by the task having the priority lower than itself. You will not be deprived of the right to execute.

【0009】[0009]

【実施例】図1は本発明によるマルチタスクコンピュー
ティングシステムの排他制御方式の実施例を説明するた
めの図である。図1(a) においてマルチタスクコンピュ
ーティングシステムは、CPUによる制御手段1,デー
タ・プログラム記憶手段2,入力装置3,出力装置4お
よび表示手段5により構成されている。このシステムに
よってデータ管理,ネットワーク管理等が行われる。デ
ータ・プログラム記憶手段よりタスク管理プログラムが
読み出され、制御手段1の制御の下にタスクの生成処
理,システム資源の割当て,実行すべきタスクの選択,
実行状態の監視,タスクの消滅処理等を行う。生成され
たタスクは、付与された優先順位にしたがってCPU,
データ,プログラム,入力装置3,出力装置4等の資源
を使用して処理が実行される。複数のタスクは同じ資源
を用いて同時に使用できないので、処理実行時にはセマ
フォカウンタ6を用いて排他的使用が行われる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a diagram for explaining an embodiment of an exclusive control system for a multitask computing system according to the present invention. In FIG. 1A, the multi-task computing system is composed of a control means 1 by a CPU, a data / program storage means 2, an input device 3, an output device 4 and a display means 5. This system performs data management, network management, etc. The task management program is read from the data / program storage means, and under the control of the control means 1, task generation processing, system resource allocation, task selection to be executed,
Performs monitoring of the execution status, task disappearance processing, etc. The generated task is processed by the CPU, according to the assigned priority.
Processing is executed using resources such as data, programs, input device 3, output device 4, and the like. Since a plurality of tasks cannot use the same resource at the same time, the semaphore counter 6 is used exclusively during the execution of processing.

【0010】今、ネットワークを形成してデータを受信
するための優先順位nのタスク(Tn )8が生成され、
セマフォカウンタ6を占有して入力装置3を用いて受信
データを表示手段5に表示するとともにメモリに格納す
る処理がなされていたとする。この状態で、タスク(T
n )8より優先順位の高いタスク(Tm )7が発生し、
同じ入力装置3を用いて処理を実行するためにP操作を
したとする。そして、nとmの間の優先順位のタスク
(Tn1〜Tni)9がタスク(Tn )8の処理の実行中に
発生したとする。かかる場合、タスク(Tm )7のP操
作によって図1(b) に示すように制御手段1の制御の下
にタスク(Tn )の優先順位がタスク(Tm )7と同じ
優先順位mに引き上げられる。この結果、タスク
(Tn )8の優先順位がタスク(Tn1〜Tni)9より高
くなるので、タスク(Tm )7の優先順位を阻害しない
ようになる。そして、現在の処理を終了した後のタスク
(Tn )8のV操作によって制御手段1の制御の下にタ
スク(Tn )8の優先順位が元の順位nに戻される。
Now, a task (T n ) 8 of priority n for forming a network and receiving data is generated,
It is assumed that the semaphore counter 6 is occupied and the input device 3 is used to display the received data on the display means 5 and store the received data in the memory. In this state, the task (T
a task (T m ) 7 having a higher priority than n ) 8 occurs,
It is assumed that the P operation is performed to execute the process using the same input device 3. Then, it is assumed that the tasks (T n1 to T ni ) 9 having the priorities between n and m occur during the execution of the processing of the task (T n ) 8. In such a case, the P operation of the task (T m ) 7 causes the priority of the task (T n ) to be the same as that of the task (T m ) 7 under the control of the control means 1 as shown in FIG. Be raised to. As a result, the priority of the task (T n ) 8 becomes higher than that of the tasks (T n1 to T ni ) 9, so that the priority of the task (T m ) 7 is not hindered. Then, by the V operation of the task (T n ) 8 after the end of the current processing, the priority of the task (T n ) 8 is returned to the original priority n under the control of the control means 1.

【0011】図2は本発明によるマルチタスクコンピュ
ーティングシステムの排他制御方式のP操作の処理を示
すフローチャートである。制御手段1は、まずセマフォ
が占有されているかチェックする(ステップ(以下「S
T」という)1)。占有されていない場合はST2へ進
み、該当のタスクを管理するデータをセマフォ管理デー
タの先頭にリンクして、セマフォカウンタを1減算する
(ST3)。一方、占有中の場合には、ST4に進み、
占有中のタスクの優先順位と、要求タスクのそれを比較
する。その結果、占有タスクの優先順位が低ければその
優先順位をセマフォ待ちとなるタスクの優先順位に引き
上げる(ST5)。既にセマフォ待ちのタスクが存在
し、そのタスクによって占有タスクの優先順位が変更さ
れていない場合、すなわち占有タスクの優先順位変更が
初めて行われる場合には、元の低かった場合の優先順位
を記憶しておく。ついで、要求タスクをセマフォ待ちの
タスクリンク列に、優先順位に従った位置へ挿入しセマ
フォ待ちの状態にする(ST6)。
FIG. 2 is a flow chart showing the processing of the P operation of the exclusive control method of the multitask computing system according to the present invention. The control means 1 first checks whether the semaphore is occupied (step (hereinafter "S
"T") 1). If it is not occupied, the process proceeds to ST2, the data for managing the corresponding task is linked to the head of the semaphore management data, and the semaphore counter is decremented by 1 (ST3). On the other hand, if it is occupied, proceed to ST4,
Compare the priority of the occupying task with that of the requesting task. As a result, if the priority of the dedicated task is low, the priority is raised to the priority of the task waiting for the semaphore (ST5). If there is already a task waiting for a semaphore and the priority of the dedicated task has not been changed by that task, that is, if the priority of the dedicated task is changed for the first time, the priority of the original low priority is stored. Keep it. Then, the requested task is inserted into the semaphore-waiting task link sequence at a position according to the priority order, and the semaphore-waiting state is set (ST6).

【0012】図3は本発明によるマルチタスクコンピュ
ーティングシステムの排他制御方式のV操作の処理を示
すフローチャートである。まず、セマフォカウンタを+
1加算し(ST1)、先頭のセマフォを占有していたタ
スクを管理するデータをリンク列から取り外す(ST
2)。そして、記憶されていた元の優先順位に変更する
(ST3)。つぎに既にセマフォを待っているタスクが
存在しているか否かを判断する(ST4)。セマフォを
待っているタスクが存在していれば、セマフォカウンタ
を1減算し、リンク先頭のタスクの待ち状態を解除する
(ST5)。このタスクは待ちに入っているタスクの中
では、最も優先順位の高いタスクであることが保障され
ているため(セマフォ待ちのリンクは優先順位の高い順
に作成される)、自分の優先順位で走行を開始する。こ
の時、V操作を実行したタスクと,待ちを解除されたタ
スクのどちらが実際に走行開始するかは、互いの優先順
位によって決定され、その高い方が実行を始めることに
なる。
FIG. 3 is a flowchart showing the process of the V operation of the exclusive control system of the multitask computing system according to the present invention. First, set the semaphore counter +
Add 1 (ST1), and remove the data that manages the task that occupied the first semaphore from the link string (ST
2). Then, the stored priority is changed to the original priority (ST3). Next, it is determined whether or not there is a task waiting for the semaphore (ST4). If there is a task waiting for the semaphore, the semaphore counter is decremented by 1 and the waiting state of the task at the head of the link is released (ST5). This task is guaranteed to have the highest priority among the waiting tasks (links waiting for a semaphore are created in order of highest priority), so run at your own priority. To start. At this time, which of the task that has executed the V operation and the task that has been released from the waiting state actually starts running is determined by the mutual priority order, and the higher one starts execution.

【0013】[0013]

【発明の効果】以上、説明したように本発明による排他
制御方式は、セマフォを占有中のタスクの処理実行中
に、セマフォ占有中のタスクより高い優先順位のタスク
がP操作をしてウェイト状態になったとき、セマフォ占
有中のタスクの優先順位をウェイト状態のタスクと同じ
優先順位に引き上げ、セマフォ占有中のタスクが処理を
終了してV操作をしたとき、元の順位に戻すように構成
されているので、ウェイト状態中にセマフォ占有中のタ
スクより優先順位が高く、ウェイト状態のタスクより優
先順位が低いセマフォには関係しないタスクが発生して
も、ウェイト状態のタスクの優先実行権が奪われること
はなくなる。したがって、タスクは優先順位に従って走
行する原則を破る可能性が非常に小さくなる。その結
果、タスクは優先順位で忠実に処理を実行できることに
なり、CPUで優先順位の高い処理から順に実行させる
ことがより確実になるという効果がある。
As described above, in the exclusive control method according to the present invention, while a task that is occupying a semaphore is being processed, a task having a higher priority than the task that is occupying the semaphore performs a P operation and is in a wait state. When the semaphore is occupied, the priority of the task that is occupying the semaphore is raised to the same priority as the task in the wait state, and when the task that is occupying the semaphore finishes its processing and performs a V operation, it is returned to the original priority. Therefore, even if a task that has a higher priority than a task that is occupying a semaphore during the wait state and a lower priority than a task that is in the wait state occurs that is not related to the semaphore, the priority execution right of the task in the wait state is It will not be robbed. Therefore, the task is much less likely to break the principle of running according to priority. As a result, the task can faithfully execute the processing in the priority order, and it is more certain that the CPU executes the processing in order from the higher priority order.

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

【図1】本発明によるマルチタスクコンピューティング
システムの排他制御方式の実施例を説明するための図で
ある。
FIG. 1 is a diagram for explaining an embodiment of an exclusive control system of a multi-task computing system according to the present invention.

【図2】本発明によるマルチタスクコンピューティング
システムの排他制御方式におけるP操作の処理を示すフ
ローチャートである。
FIG. 2 is a flowchart showing a P operation process in the exclusive control method of the multi-task computing system according to the present invention.

【図3】本発明によるマルチタスクコンピューティング
システムの排他制御方式におけるV操作の処理を示すフ
ローチャートである。
FIG. 3 is a flowchart showing a V operation process in the exclusive control method of the multi-task computing system according to the present invention.

【図4】バイナリセマフォを使用した資源の排他制御の
フローチャートである。
FIG. 4 is a flowchart of exclusive control of resources using a binary semaphore.

【図5】セマフォを実現するロジックの構成図である。FIG. 5 is a configuration diagram of a logic that realizes a semaphore.

【図6】セマフォロジックによって優先順位処理が阻害
されている状態を説明するための図である。
FIG. 6 is a diagram for explaining a state in which priority processing is blocked by a semaphore logic.

【図7】処理の実行順番の一例を示す図である。FIG. 7 is a diagram illustrating an example of an execution order of processing.

【図8】コンピュータ処理において、資源待ちの占める
時間が非常に長いことを説明するための図である。
FIG. 8 is a diagram for explaining that a resource wait time is very long in computer processing.

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

1 制御手段 2 データ・プログラム記憶手段 3 入力装置 4 出力装置 5 表示手段 6 セマフォカウンタ 7 タスクTm 8 タスクTn 10 セマフォの管理データ 10a リンクヘッダ 10b セマフォカウンタ1 control means 2 data / program storage means 3 input device 4 output device 5 display means 6 semaphore counter 7 task T m 8 task T n 10 semaphore management data 10a link header 10b semaphore counter

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 マルチタスクコンピューティングシステ
ムにおいて、優先順位にしたがってタスクが処理を実行
するとき、セマフォに対してロック操作を行うことによ
り資源を排他的に使用し、前記タスクが処理実行を終了
したとき、前記セマフォに対しアンロック操作を行うこ
とにより前記資源の使用の解放を宣言しその後のウェイ
トしている複数のタスクの優先順位にしたがった前記資
源の使用による処理実行を可能にする排他制御方式にお
いて、 タスク(Tn )がロック操作を行い資源の排他的使用を
している場合に、前記タスク(Tn )より優先順位の高
いタスク(Tm )がロック操作を行うとそのタスク(T
m )をウェイト状態にするとともに前記タスク(Tn
の優先順位を(n)から(m)に引き上げる手段と、 前記タスク(Tn )がセマフォに対しV操作をしたと
き、タスク(Tn )を元の優先順位(n)に戻す手段を
有することを特徴とするマルチタスクコンピューティン
グシステムの排他制御方式。
1. In a multi-task computing system, when a task executes a process according to a priority order, a resource is exclusively used by performing a lock operation on a semaphore, and the task ends the process execution. At this time, an exclusive control that enables release of the use of the resource by performing an unlock operation on the semaphore and then enables execution of processing by using the resource according to the priority of a plurality of waiting tasks In the method, when a task (T n ) performs a lock operation and exclusively uses a resource, if a task (T m ) having a higher priority than the task (T n ) performs a lock operation, that task (T n ). T
m ) is placed in a wait state and the task (T n )
A means for raising the priority from (n) to (m) of, when the task (T n) has a V operation on a semaphore, a means for returning to the task (T n) of the original priority (n) An exclusive control method for a multi-task computing system characterized by the above.
JP35554692A 1992-12-18 1992-12-18 Exclusion control method for multi-task computing system Pending JPH06187175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP35554692A JPH06187175A (en) 1992-12-18 1992-12-18 Exclusion control method for multi-task computing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP35554692A JPH06187175A (en) 1992-12-18 1992-12-18 Exclusion control method for multi-task computing system

Publications (1)

Publication Number Publication Date
JPH06187175A true JPH06187175A (en) 1994-07-08

Family

ID=18444556

Family Applications (1)

Application Number Title Priority Date Filing Date
JP35554692A Pending JPH06187175A (en) 1992-12-18 1992-12-18 Exclusion control method for multi-task computing system

Country Status (1)

Country Link
JP (1) JPH06187175A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5988729A (en) * 1996-09-26 1999-11-23 Daimlerchrysler Ag Roof construction for an open passenger car
JP2007047866A (en) * 2005-08-05 2007-02-22 Mitsubishi Electric Corp Real-time integrated simple monitor program
US7278141B2 (en) 2003-04-23 2007-10-02 International Business Machines Corporation System and method for adding priority change value corresponding with a lock to a thread during lock processing

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6125249A (en) * 1984-07-14 1986-02-04 Fujitsu Ltd Exclusive control system
JPH02204838A (en) * 1989-02-03 1990-08-14 Hitachi Ltd Task priority managing system
JPH02300939A (en) * 1989-05-16 1990-12-13 Toshiba Corp Semaphore operation system
JPH0342730A (en) * 1989-07-11 1991-02-22 Nec Corp Control system for allocating resources of computer
JPH04195432A (en) * 1990-11-28 1992-07-15 Nec Corp Task management device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6125249A (en) * 1984-07-14 1986-02-04 Fujitsu Ltd Exclusive control system
JPH02204838A (en) * 1989-02-03 1990-08-14 Hitachi Ltd Task priority managing system
JPH02300939A (en) * 1989-05-16 1990-12-13 Toshiba Corp Semaphore operation system
JPH0342730A (en) * 1989-07-11 1991-02-22 Nec Corp Control system for allocating resources of computer
JPH04195432A (en) * 1990-11-28 1992-07-15 Nec Corp Task management device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5988729A (en) * 1996-09-26 1999-11-23 Daimlerchrysler Ag Roof construction for an open passenger car
US7278141B2 (en) 2003-04-23 2007-10-02 International Business Machines Corporation System and method for adding priority change value corresponding with a lock to a thread during lock processing
JP2007047866A (en) * 2005-08-05 2007-02-22 Mitsubishi Electric Corp Real-time integrated simple monitor program
US7472214B2 (en) 2005-08-05 2008-12-30 Mitsubishi Denki Kabushiki Kaisha Real-time embedded simple monitor method and computer product

Similar Documents

Publication Publication Date Title
US6272517B1 (en) Method and apparatus for sharing a time quantum
EP0145889B1 (en) Non-spinning task locking using compare and swap
TW498281B (en) Interface system and method for asynchronously updating a shared resource
US7370326B2 (en) Prerequisite-based scheduler
US7234143B2 (en) Spin-yielding in multi-threaded systems
JPS5983249A (en) Control of queue
US6983462B2 (en) Method and apparatus for serving a request queue
Tokuda et al. Evaluation of Real-Time Synchronization in Real-Time Mach.
US6587955B1 (en) Real time synchronization in multi-threaded computer systems
US5768572A (en) Timer state control optimized for frequent cancel and reset operations
CN113485840A (en) Multi-task parallel processing device and method based on Go language
US7793023B2 (en) Exclusion control
JP3737638B2 (en) Object lock management method and apparatus, and object lock release method and apparatus
EP2664989A1 (en) Task scheduling
JP2000029726A (en) High-speed synchronizing method for programming in java programming language
EP0913770A2 (en) Method and apparatus for sharing a time quantum
JPH11282815A (en) Multi-thread computer system and multi-thread execution control method
JPH06187175A (en) Exclusion control method for multi-task computing system
CN112749020A (en) Microkernel optimization method of Internet of things operating system
Liu et al. Lock-free scheduling of logical processes in parallel simulation
Rajkumar et al. An optimal priority inheritance policy for synchronization in real-time systems
JP2693916B2 (en) Task scheduling method
Yeung et al. A new deadlock detection algorithms for distributed real-time database systems
CN117453413A (en) Resource application method, device, electronic equipment and storage medium
US20130042247A1 (en) Starvationless Kernel-Aware Distributed Scheduling of Software Licenses