JPH0640315B2 - Central processing unit allocation control method - Google Patents

Central processing unit allocation control method

Info

Publication number
JPH0640315B2
JPH0640315B2 JP31431486A JP31431486A JPH0640315B2 JP H0640315 B2 JPH0640315 B2 JP H0640315B2 JP 31431486 A JP31431486 A JP 31431486A JP 31431486 A JP31431486 A JP 31431486A JP H0640315 B2 JPH0640315 B2 JP H0640315B2
Authority
JP
Japan
Prior art keywords
schedule
task
central processing
processing unit
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP31431486A
Other languages
Japanese (ja)
Other versions
JPS63159940A (en
Inventor
鉄徳 ▲高▼宮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP31431486A priority Critical patent/JPH0640315B2/en
Publication of JPS63159940A publication Critical patent/JPS63159940A/en
Publication of JPH0640315B2 publication Critical patent/JPH0640315B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は中央処理装置(以下CPUと記す)割り当て制
御方式、特に、有限なCPU資源を複数のタスク間で時
分割共用させる機構を有する計算機システムにおけるC
PU割り当て制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial application] The present invention relates to a central processing unit (hereinafter referred to as CPU) allocation control system, and more particularly to a computer having a mechanism for sharing finite CPU resources among a plurality of tasks in a time-sharing manner. C in the system
The present invention relates to a PU allocation control method.

〔従来の技術〕 従来のこの種のCPU割り当て方式は、タスクの優先度
ごとにCPU割り当て待ちのタスクのチェーンの先頭を
指定するタスクポインタを有するスケジュール制御テー
ブルを備え、あるタスクからCPU割り当て要求がある
とこのスケジュール制御テーブルを最高位の優先度のタ
スクポインタから最低位の優先度のタスクポインタにか
けて参照し、優先度が当該タスクより高いタスクに対す
るタスクポインタが空のときにのみ当該タスクにCPU
を割り当てるようにしている。
[Prior Art] A conventional CPU allocation method of this type includes a schedule control table having a task pointer that designates the head of a chain of tasks waiting for CPU allocation for each priority of a task, and a CPU allocation request is issued from a certain task. If so, this schedule control table is referenced from the task pointer with the highest priority to the task pointer with the lowest priority, and the CPU is assigned to the task only when the task pointer for the task with a higher priority is empty.
I am trying to allocate.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

上述した従来方式においては、CPU割り当てに際して
タスクの優先度のみしか考慮しておらず、優先度の高い
タスクがCPUの割り当て待ちであれば優先度の低いタ
スクにはCPUが与えられないため、優先度の高いタス
クがプログラムのループ等でCPUを要求し続けた場合
等は、優先度の低いタスクには永久にCPUは与えられ
ず、端末のレスポンスの遅れやジョブのスループットの
遅れ等が発生し、有限なCPU資源を時分割共用するC
PUスケジュール上の問題点となっている。
In the above-mentioned conventional method, only the priority of the task is taken into consideration when allocating the CPU, and if the task with the high priority is waiting for the CPU allocation, the CPU with the low priority cannot be given the priority. When a high-frequency task continues to request the CPU due to a program loop, etc., the low-priority task will not be permanently given the CPU, causing a delay in the response of the terminal or a delay in the job throughput. , C that shares limited CPU resources in a time-sharing manner
This is a problem on the PU schedule.

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

本発明の方式は、複数のタスク間で中央処理装置を時分
割共用させる機構を有する計算機システムにおける中央
処理装置割り当て制御方式において、 中央処理装置の割り当て待ちタスクを指定するタイクポ
インタ、予め設定された中央処理装置の割り当て回数上
限値を保持するスケジュール抑止上限カウンタ、現時点
の割り当て回数を保持する現スケジュールカウンタおよ
びスケジュール抑止フラグをタスクの優先度対応に有す
るスケジュール制御テーブルと、 タスクからの中央処理装置の割り当て要求に対しスケジ
ュール抑止フラグがリセットされている優先度内の最高
位でかつタスクポインタが指定するタスクに中央処理装
置の割り当てを行うCPUスケジュール制御手段と、 中央処理装置割り当ての度に現スケジュールカウンタを
歩進させスケジュール抑止上限カウンタと比較してこの
比較の結果によりスケジュール抑止フラグをセットする
CPUスケジュール抑止制御手段と、スケジュール抑止
フラグを定期的に解除するCPUスケジュール解除手
段、 とを有することを特徴とする。
According to the method of the present invention, in a central processing unit allocation control method in a computer system having a mechanism for sharing a central processing unit among a plurality of tasks in a time-division manner, a tie pointer for designating a task waiting for allocation of the central processing unit is preset. A schedule control upper limit counter that holds the upper limit value of the number of allocations of the central processing unit, a current schedule counter that holds the current allocation number, and a schedule control table that has a schedule suppression flag corresponding to the priority of the task, and the central processing unit CPU schedule control means for allocating the central processing unit to the task designated by the task pointer, which is the highest priority within which the schedule suppression flag is reset for the allocation request, and the current schedule counter for each allocation of the central processing unit. Walk through A CPU scheduling inhibition control means so that as compared with the schedule deterrence upper counter sets a schedule inhibition flag as a result of the comparison is, CPU scheduling release means for periodically unschedule inhibition flag, and having a city.

〔実施例〕〔Example〕

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

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

第1図を参照すると本実施例は、CPUスケジュール制
御手段1、CPUスケジュール抑止制御手段2、CPU
スケジュール解除制御手段3およびスケジュール制御テ
ーブル4から構成されていることがわかる。
Referring to FIG. 1, in this embodiment, the CPU schedule control means 1, the CPU schedule inhibition control means 2, the CPU
It can be seen that the schedule release control means 3 and the schedule control table 4 are included.

第2図はスケジュール制御テーブル4の詳細をCPU割
り当て待ちのタスクT,T,T…Tと共に示
す。
FIG. 2 shows details of the schedule control table 4 together with tasks T 1 , T 2 , T 3 ... T n waiting for CPU allocation.

第2図において、スケジュール制御テーブル4は、n個
の優先度P,P,…Pごとに、スケジュール抑止
フラグS〜Sと、スケジュール抑止上限カウンタM
〜Mと、現スケジュールカウンタC〜Cと、タ
スクポインタR〜Rとを有する。
In FIG. 2, the schedule control table 4 has a schedule inhibition flag S 1 to S n and a schedule inhibition upper limit counter M for each of the n priority levels P 1 , P 2 , ... P n.
It has 1 to M n , current schedule counters C 1 to C n , and task pointers R 1 to R n .

タスクポインタRは、優先度P(最高位とする)
の、CPU割り当て待ちタスクTを指定し、タスクT
は同様なタスクTを指定する。タスクポインタR
は、第2位の優先度Pの、CPU割り当て待ちタスク
を、また、タスクポインタRは最低位の優先度P
の、CPU割り当て待ちタスクTをそれぞれ指定す
る。
The task pointer R 1 has priority P 1 (highest)
Of the CPU allocation waiting task T 1
1 designates a similar task T 2 . Task pointer R 2
Is the task T 3 waiting for CPU allocation having the second highest priority P 2 , and the task pointer R n is the lowest priority P 3.
of n, respectively specify the CPU allocation tasks waiting T n.

スケジュール抑止上限カウンタM〜Mは、システム
ジェネレーション時等において優先度P〜P毎に設
定された値を保持し、現スケジュールカウンタC〜C
は優先度P〜Pのタスク群にCPUが現時点まで
に割り当てられた回数を保持する。
The schedule inhibition upper limit counters M 1 to M n hold the values set for the respective priorities P 1 to P n at the time of system generation, etc., and the current schedule counters C 1 to C n
n holds the number of times the CPU has been assigned to the task group having the priorities P 1 to P n up to the present time.

また、スケジュール抑止フラグS〜Sは、優先度P
〜Pの、CPU割り当て待ちタスクが存在してもそ
のタスクにはCPUを割り当てることを抑止するように
するか否かを表示し、本実施例においては現在スケジュ
ールカウンタC〜Cがスケジュール抑止上限カウン
タM〜Mの保持内容を越えたとき、対応するスケジ
ュール抑止フラグS〜Sをセットするようにしてい
る。
In addition, schedule inhibition flag S 1 ~S n, the priority P
1 to P n , whether or not to suppress CPU allocation to the task even if there is a CPU allocation waiting task is displayed. In the present embodiment, the current schedule counters C 1 to C n are displayed. When the contents held in the schedule inhibition upper limit counters M 1 to M n are exceeded, the corresponding schedule inhibition flags S 1 to S n are set.

次に、第3図に示す流れ図に沿って本実施例の動作を説
明する。
Next, the operation of this embodiment will be described with reference to the flow chart shown in FIG.

まず、タスクからのCPU割り当て要求があるとCPU
シケジュール制御手段1が呼び出される。CPUスケジ
ュール制御手段1は、スケジュール制御テーブル4のタ
スクポインタR〜Rを優先度の高いタスクから順番
に参照して、現要求中のタスクをも含めてCPU割り当
て待ちのタスクが存在するか否か調べる(ステップ3
0,35,32)。
First, if there is a CPU allocation request from a task, the CPU
The schedule control means 1 is called. The CPU schedule control unit 1 refers to the task pointers R 1 to R n of the schedule control table 4 in order from the task with the highest priority, and whether there is a task waiting for CPU allocation including the currently requested task. Check whether or not (step 3)
0,35,32).

CPU割り当て待ちのタスクに対しては、そのタスクの
優先度に対応するスケジュール抑止フラグを調べ(ステ
ップ31)、抑止表示されているときはCPU割り当て
を行わずにステップ32を経由してステップ35に移行
して次位の優先度を調査する。
For a task waiting for CPU allocation, the schedule suppression flag corresponding to the priority of the task is checked (step 31), and when the suppression display is displayed, CPU allocation is not performed and the process proceeds to step 35 via step 32. Migrate to investigate next priority.

この調査の結果により、全ての優先度がスケジュール抑
止状態に陥ったことがわかったときはスケジュール抑止
を超越し、タスクのキューアウト(ステップ33)、す
なわち、CPU割り当て待ちのタスク中の最高位のタス
ク群内の先頭タスクをタスクチェーンから外し、そのタ
スクにCPUを割り当てる(ステップ34)。
When it is found from the result of this investigation that all the priorities have fallen into the schedule suppression state, the schedule suppression is exceeded, and the task is queued out (step 33), that is, the highest priority among the tasks waiting for CPU allocation. The first task in the task group is removed from the task chain, and the CPU is assigned to the task (step 34).

また、ステップ31で抑止表示されていないときには当
該タスクをキューアウトし(ステップ36)、CPUス
ケジュール制御手段1はCPUスケジュール抑止制御手
段2に制御権を移す。
When the inhibition display is not displayed in step 31, the task is queued out (step 36), and the CPU schedule control means 1 transfers the control right to the CPU schedule inhibition control means 2.

次にCPUスケジュール抑止制御手段2は、ステップ3
6でスキューアウトされたタスクが属する優先度対応の
現スケジュールカウンタを歩進し(ステップ37)、ス
ケジュール抑止上限カウンタと現スケジュールカウンタ
とを比較して現スケジュールカウンタがスケジュール抑
止上限カウンタを越えたか否かを調べる(ステップ3
8)。
Next, the CPU schedule inhibition control means 2 performs step 3
In step 6, the current schedule counter corresponding to the priority to which the task skewed out belongs is incremented (step 37), and the schedule inhibition upper limit counter and the current schedule counter are compared to determine whether the current schedule counter exceeds the schedule inhibition upper limit counter. Check (Step 3
8).

ステップ38で越えていないことがわかると、制御権を
CPUスケジュール制御手段1に戻し、ステップ36で
キューアウトしたタスクにCPUを割り当て(ステップ
34)、また、越えていれば当該優先度のCPU割り当
て抑止するため、スケジュール抑止フラグをセットし
(ステップ39)た後で、制御権をCPUスケジュール
制御手段1に戻しステップ36でキューアウトしたタス
クにCPUを割り当てる(ステップ34)。
If it is found in step 38 that the control has not been exceeded, the control right is returned to the CPU schedule control means 1, and the CPU queued out in step 36 is assigned a CPU (step 34). In order to suppress, after setting the schedule suppression flag (step 39), the control right is returned to the CPU schedule control means 1 and the CPU is assigned to the task queued out in step 36 (step 34).

なお、スケジュール抑止の解除は、CPUスケジュール
解除手段3を定期的に起動し、スケジュール抑止フラグ
を抑止状態から解除することにより行う。
It should be noted that the release of the schedule inhibition is performed by periodically activating the CPU schedule releasing means 3 and releasing the schedule inhibition flag from the inhibition state.

〔発明の効果〕〔The invention's effect〕

以上の説明から明らかなように、本発明によれば、優先
度の高いタスクの異常に多いCPU割り当て回数を検出
しそのようなタスクに対してはCPU割り当てを一時的
に抑止することにより、CPUを割り当てるべきタスク
の優先度が低下してくるため、優先度の低いタスクにも
時折、CPUを割り当てることができるようになり、シ
ステム全体のスループットとレスポンスタイムの向上さ
せることが可能である。
As is clear from the above description, according to the present invention, by detecting an abnormally large number of CPU allocations for a task with a high priority and temporarily suppressing the CPU allocation for such a task, Since the priority of the task to be assigned decreases, it becomes possible to occasionally assign the CPU to the task with the low priority, and it is possible to improve the throughput and the response time of the entire system.

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

第1図は本発明の一実施例のブロック図、第2図は本実
施例におけるスケジュール制御テーブルの詳細図および
第3図は本実施例の流れ図をそれぞれ示す。 1……CPUスケジュール制御手段、2……CPUスケ
ジュール抑止制御手段、3……CPUスケジュール解除
制御手段、4……スケジュール制御テーブル、P〜P
……優先度、S〜S……スケジュール抑止フラ
グ、M〜M……スケジュール抑止上限カウンタ、C
〜C……現スケジュールカウンタ、R〜R……
タスクポインタ、T〜T……タスク。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a detailed view of a schedule control table in the present embodiment, and FIG. 3 is a flow chart of the present embodiment. 1 ... CPU schedule control means, 2 ... CPU schedule inhibition control means, 3 ... CPU schedule cancellation control means, 4 ... Schedule control table, P 1 to P
n ...... priority, S 1 ~S n ...... schedule inhibition flag, M 1 ~M n ...... schedule suppression limit counter, C
1 ~C n ...... current schedule counter, R 1 ~R n ......
Task pointers, T 1 to T n ... Tasks.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】複数のタスク間で中央処理装置を時分割共
用させる機構を有する計算機システムにおける中央処理
装置割り当て制御方式において、 前記中央処理装置の割り当て待ちタスクを指定するタス
クポインタ、予め設定された前記中央処理装置の割り当
て回数上限値を保持するスケジュール抑止上限カウン
タ、現時点の割り当て回数を保持する現スケジュールカ
ウンタおよびスケジュール抑止フラグをタスクの優先度
対応に有するスケジュール制御テーブルと、 前記タスクからの中央処理装置の割り当て要求に対し前
記スケジュール抑止フラグがリセットされている優先度
内の最高位でかつ前記タスクポインタが指定するタスク
に前記中央処理装置の割り当てを行うCPUスケジュー
ル制御手段と、 前記中央処理装置割り当ての度に前記現スケジュールカ
ウンタを歩進させ前記スケジュール抑止上限カウンタと
比較してこの比較の結果により前記スケジュール抑止フ
ラグをセットするCPUスケジュール抑止制御手段と、 前記スケジュール抑止フラグを定期的に解除するCPU
スケジュール解除手段、 とを有することを特徴とする中央処理装置割り当て制御
方式。
1. A central processing unit allocation control method in a computer system having a mechanism for sharing a central processing unit among a plurality of tasks in a time-sharing manner, wherein a task pointer for designating a task waiting for allocation of said central processing unit is preset. A schedule control upper limit counter holding an allocation count upper limit value of the central processing unit, a current schedule counter holding a current allocation count, and a schedule control table having a schedule suppression flag for task priority correspondence, and a central processing from the task CPU schedule control means for allocating the central processing unit to the task specified by the task pointer at the highest priority within which the schedule inhibition flag is reset in response to a device allocation request, and the central processing unit allocation Every time A CPU scheduling inhibition control means the current schedule counter is incremented as compared to the schedule deterrence upper counter sets the schedule inhibition flag as a result of the comparison, CPU periodically release the schedule inhibition flag
A central processing unit allocation control method comprising: a schedule canceling unit.
JP31431486A 1986-12-24 1986-12-24 Central processing unit allocation control method Expired - Lifetime JPH0640315B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31431486A JPH0640315B2 (en) 1986-12-24 1986-12-24 Central processing unit allocation control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31431486A JPH0640315B2 (en) 1986-12-24 1986-12-24 Central processing unit allocation control method

Publications (2)

Publication Number Publication Date
JPS63159940A JPS63159940A (en) 1988-07-02
JPH0640315B2 true JPH0640315B2 (en) 1994-05-25

Family

ID=18051858

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31431486A Expired - Lifetime JPH0640315B2 (en) 1986-12-24 1986-12-24 Central processing unit allocation control method

Country Status (1)

Country Link
JP (1) JPH0640315B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03257631A (en) * 1990-03-08 1991-11-18 Matsushita Electric Ind Co Ltd Time division multitask executing device
JP4830917B2 (en) * 2007-03-07 2011-12-07 三菱電機株式会社 High frequency module device and transmission / reception module device using the same
CN113923130B (en) * 2021-09-06 2024-03-08 特赞(上海)信息科技有限公司 Multi-tenant open interface resource configuration method, device and terminal

Also Published As

Publication number Publication date
JPS63159940A (en) 1988-07-02

Similar Documents

Publication Publication Date Title
Ramos-Thuel et al. On-line scheduling of hard deadline aperiodic tasks in fixed-priority systems
US5999963A (en) Move-to-rear list scheduling
EP1221094B1 (en) Method for time partitioned application scheduling in a computer operating system
US6473780B1 (en) Scheduling of direct memory access
JP2000056992A (en) Task scheduling system, its method and recording medium
JP3644042B2 (en) Multitask processing device
JPH0640315B2 (en) Central processing unit allocation control method
KR100651722B1 (en) Method of configuring Linux kernel for supporting real time performance and test method for supporting real time performance
CN114661415A (en) Scheduling method and computer system
JP2667575B2 (en) Task scheduling method
WO2004019205A2 (en) System and method for robust time partitioning of tasks in a real-time computing environment
JPH0644234B2 (en) Task management device
JPH02204838A (en) Task priority managing system
JPS6126095B2 (en)
JP2566002B2 (en) Task dispatching method
JPH0782444B2 (en) Task schedule method
JPS636655A (en) Task scheduling system
JPS61136134A (en) Queue resource control system
JP2001184326A (en) Multiprocessor scheduling method and computer system for multiprocessor scheduling
JPS62290958A (en) Task schedule system
JPS59170950A (en) Task priority control system
JP2607595B2 (en) Queuing table search method
JPH05128077A (en) Method for distributed processing plural computer system
JPS6334646A (en) Job scheduling system
Han et al. A globally optimal algorithm for scheduling both hard periodic and soft aperiodic tasks