JPS62290958A - Task schedule system - Google Patents

Task schedule system

Info

Publication number
JPS62290958A
JPS62290958A JP13364186A JP13364186A JPS62290958A JP S62290958 A JPS62290958 A JP S62290958A JP 13364186 A JP13364186 A JP 13364186A JP 13364186 A JP13364186 A JP 13364186A JP S62290958 A JPS62290958 A JP S62290958A
Authority
JP
Japan
Prior art keywords
task
resource
resources
queue
tasks
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
JP13364186A
Other languages
Japanese (ja)
Inventor
Kazuyoshi Negishi
和義 根岸
Hiromichi Ogata
緒方 博通
Sumio Watanabe
渡辺 澄夫
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP13364186A priority Critical patent/JPS62290958A/en
Publication of JPS62290958A publication Critical patent/JPS62290958A/en
Pending 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/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

PURPOSE:To prevent an idle state of a processor to be caused by the conflict of resources by processing in parallel as much as possible when many tasks waiting for resources exist. CONSTITUTION:A task schedule 1 extracts tasks and schedules them with reference to a resource queue 3 as long as other processors are not using resources after checking a source busy flag 2. If the queue 3 is idle, the tasks are schedules by means of a normal task queue 4. When the occupation of resources is released via a task, the queue 3 is set in a resource busy mode. Then the procedure proceeds to the schedule 1 to schedule the tasks requesting other resources. In a release mode the one's own task is interrupted if a task kept in a resource queuing state is detected. Then the schedule 1 is activated to start the relevant task.

Description

【発明の詳細な説明】 3、発明の詳細な説明 〔産業上の利用分野〕 本発明はメモリを共用するマルチプロセッサシステムに
おけるタスクのスケジューリング方式に関するものであ
る。
Detailed Description of the Invention 3. Detailed Description of the Invention [Field of Industrial Application] The present invention relates to a task scheduling method in a multiprocessor system that shares memory.

〔従来の技術〕[Conventional technology]

タスクスケジューリング方式において、従来はタスク生
成時のプライオリティあるいはユーザ指定のプライオリ
ティで管理されていた。また先入れ先出しでリソースを
待つタスクが大量に発生した場合でも、キューの後ろの
方にあればあるいはプライオリティが低ければ、すぐに
は起動されなし1 。
In task scheduling systems, tasks have traditionally been managed based on the priority at the time of task generation or the priority specified by the user. Also, even if there are a large number of tasks waiting for resources on a first-in, first-out basis, if they are at the back of the queue or have low priority, they will not be started immediately1.

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

中央処理装置が複数あってもこれらリソースを使用する
タスクは、同時には一個しか実行できず、各タスクのリ
ソース使用割合の高い場合、現在完全に使用できても将
来リソースネックになってしまう可能性がある。プライ
オリティおよび順序を無視してもリソースを使用するタ
スクをどれかのプロセッサで必ず処理することにより将
来のネックを防止しスループットを向上させることがで
きる。
Even if there are multiple central processing units, only one task that uses these resources can be executed at a time, and if the resource usage rate of each task is high, there is a possibility that it will become a resource bottleneck in the future even if it is fully used now. There is. Even if priority and order are ignored, it is possible to prevent future bottlenecks and improve throughput by ensuring that a task that uses resources is processed by one of the processors.

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

本発明は従来のタスクキューの他にリソース待ちキュー
を追加する。リソース競合時は、リソース待ちキューに
タスクを入れる。タスクスケジュール時に、リソースが
使用中かどうかを調へ、すソース未使用ならリソース待
ちキュー中のタスクをまずスケジュールする。また、タ
スクがリソースを解放した場合、他にリソース待ちをし
ているタスクがあれば上記の再スケジュールを行ってそ
ちらに切り替えるようにする。
The present invention adds a resource waiting queue to the conventional task queue. When there is resource contention, tasks are placed in the resource waiting queue. When scheduling a task, check whether the resource is in use. If the resource is not in use, schedule the task in the resource waiting queue first. Additionally, when a task releases a resource, if there is another task waiting for the resource, the above rescheduling is performed to switch to that task.

〔作用〕[Effect]

本発明の構成によれば、メモリを共用するプロセッサ上
のタスクスケジューラにおいてタスクが排他リソースを
高い割合で使用する場合、当該リソースを待っているタ
スクがある時に、いずれかのプロセッサでリソースを使
用するタスクを実行することにより、将来発生し得るリ
ソースの競合によるプロセッサのアイドルを防止するこ
とができる。
According to the configuration of the present invention, when a task uses an exclusive resource at a high rate in a task scheduler on a processor that shares memory, when there is a task waiting for the resource, one of the processors uses the resource. By executing the task, it is possible to prevent the processor from being idle due to resource contention that may occur in the future.

〔発明の実施例〕[Embodiments of the invention]

以下、本発明の一実施例を説明する。第1図は、本発明
のタスクスケジューラの概要図である。タスクスケジュ
ーラは、各タスクの終了時リソースの占有解放時あるい
は入出力要求時などに、次に処理するタスクを選択し起
動するために起動される。リソースの要求はプロセッサ
を割り当てられているタスクからのみ行い、タスクの終
了あるいは入出力要求時などタスクがプロセッサを離す
時は必ずリソースを解放することにより、リソースは現
在プロセッサを割り当てられているタスクのみが占有し
ている。
An embodiment of the present invention will be described below. FIG. 1 is a schematic diagram of a task scheduler of the present invention. The task scheduler is activated to select and activate the next task to be processed, such as when a resource is released at the end of each task or when an input/output request is made. Requests for resources are made only from tasks that have been assigned a processor, and by releasing resources whenever a task leaves the processor, such as when a task ends or when making an input/output request, resources can only be used by the task that is currently assigned a processor. is occupied.

第2図に処理の流れを示す、タスクスケジューラ1は、
まず、リソース使用中フラグ2を見て他のプロセッサが
リソースを使用中でなければ、リソース待ちキュー3を
見てタスクを取り出しスケジュールする。リソース待ち
キュー3が空なら、通常タスクキュー4よりタスクをス
ケジュールする。リソース使用中ならば、通常タスクキ
ュー4よりスケジュールを行う。
The task scheduler 1, whose processing flow is shown in FIG.
First, if the resource in use flag 2 is checked and the resource is not in use by another processor, the resource waiting queue 3 is checked and a task is taken out and scheduled. If the resource waiting queue 3 is empty, a task is scheduled from the normal task queue 4. If the resource is in use, scheduling is performed from the normal task queue 4.

タスクからリソースの占有解放を行う場合法のようにす
る。第3図に示すように占有要求時、リソース使用中な
らリソース待ちキュー3へ入る。
When releasing resources from a task, do as follows. As shown in FIG. 3, if the resource is in use at the time of an occupancy request, it enters the resource waiting queue 3.

そして別のリソースを要求しているタスクをスケシール
するためタスクスケジューラへ行く。解放時は第4図に
示すように、他のリソース待ちキュー中のタスクがあれ
ば自タスクを中断し、そのタスクを起動するためタスク
スケジューラへ行く。
It then goes to the task scheduler to schedule the task that is requesting another resource. At the time of release, as shown in FIG. 4, if there is a task in the resource waiting queue, the current task is interrupted and the task goes to the task scheduler to start that task.

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

本発明によれば、リソースを待っているタスクが多数存
在する時、これら最大限に並行処理することにより、リ
ソースの競合によるプロセッサのアイドルを防止するこ
とができる。
According to the present invention, when there are many tasks waiting for resources, by processing them in parallel to the maximum extent possible, it is possible to prevent processors from idling due to resource contention.

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

第1図は、タスクスケジューラの処理概要図、第2図は
、タスクスケジューラの処理の流れ図、第3図はリソー
ス占有時の処理の流れ図、第4図はリソース解放時の処
理の流れ図である。 1・・タスクスケジューラ、2・・・リソース使用中フ
ラグ、3・・・リソース待ちキュー、4・・・通常タス
クキュー。
FIG. 1 is a process outline diagram of the task scheduler, FIG. 2 is a flowchart of the process of the task scheduler, FIG. 3 is a flowchart of the process when resources are occupied, and FIG. 4 is a flowchart of the processes when resources are released. 1...Task scheduler, 2...Resource in use flag, 3...Resource waiting queue, 4...Normal task queue.

Claims (1)

【特許請求の範囲】[Claims] 1、主メモリを共用するマルチプロセッサ上で一個しか
ないリソースを排他使用する複数のタスクをスケジュー
ルするスケジュールにおいて、少なくとも一個のタスク
がリソースを使用状態にある間は、常にマルチプロセッ
サのうち一台がリソースを使用状態のタスクを実行する
ようスケジュールすることを特徴とするタスクスケジュ
ール方式。
1. In a schedule that schedules multiple tasks that exclusively use only one resource on a multiprocessor that shares main memory, one of the multiprocessors always uses the resource while at least one task is using the resource. A task scheduling method that is characterized by scheduling tasks that use resources to be executed.
JP13364186A 1986-06-11 1986-06-11 Task schedule system Pending JPS62290958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13364186A JPS62290958A (en) 1986-06-11 1986-06-11 Task schedule system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13364186A JPS62290958A (en) 1986-06-11 1986-06-11 Task schedule system

Publications (1)

Publication Number Publication Date
JPS62290958A true JPS62290958A (en) 1987-12-17

Family

ID=15109565

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13364186A Pending JPS62290958A (en) 1986-06-11 1986-06-11 Task schedule system

Country Status (1)

Country Link
JP (1) JPS62290958A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868222A (en) * 2015-09-17 2016-08-17 乐视网信息技术(北京)股份有限公司 Task scheduling method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105868222A (en) * 2015-09-17 2016-08-17 乐视网信息技术(北京)股份有限公司 Task scheduling method and device

Similar Documents

Publication Publication Date Title
Goel et al. A comparative study of cpu scheduling algorithms
US5452452A (en) System having integrated dispatcher for self scheduling processors to execute multiple types of processes
CN112087503A (en) Cluster task scheduling method, system, computer and computer readable storage medium
CN111897637B (en) Job scheduling method, device, host and storage medium
US9367349B2 (en) Multi-core system and scheduling method
CN114064316A (en) Synchronization method and system for multi-path collected data
JPH0628323A (en) Process execution control method
CN115695330B (en) Scheduling system, method, terminal and storage medium for shreds in embedded system
JP3644042B2 (en) Multitask processing device
JPS62290958A (en) Task schedule system
JPH05313923A (en) Exclusive controller for shared resources
JP2667575B2 (en) Task scheduling method
JPH0782444B2 (en) Task schedule method
JPH09282185A (en) Real-time system and resource managing method for the same
JPH0640315B2 (en) Central processing unit allocation control method
JPS636655A (en) Task scheduling system
JPH01305461A (en) Right of using bus control system
JP3112287B2 (en) Message management processor
Caprani et al. Implementation of real-time scheduling algorithms in a transputer environment
JPH05204875A (en) Scheduling system for thread
JPH01258135A (en) Transaction execution control system
WO1992003784A1 (en) Scheduling method for a multiprocessing operating system
CN115686781A (en) Page scheduling method and device, electronic equipment and storage medium
JPH0586574B2 (en)
JPH0612394A (en) Process schedule system