JPS59146387A - Stack control system of multiprocessing - Google Patents

Stack control system of multiprocessing

Info

Publication number
JPS59146387A
JPS59146387A JP2132683A JP2132683A JPS59146387A JP S59146387 A JPS59146387 A JP S59146387A JP 2132683 A JP2132683 A JP 2132683A JP 2132683 A JP2132683 A JP 2132683A JP S59146387 A JPS59146387 A JP S59146387A
Authority
JP
Japan
Prior art keywords
stack
processes
stacks
circuit
switching
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
JP2132683A
Other languages
Japanese (ja)
Inventor
Haruo Akimoto
晴雄 秋元
Kiminori Sato
公則 佐藤
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2132683A priority Critical patent/JPS59146387A/en
Publication of JPS59146387A publication Critical patent/JPS59146387A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K15/00Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers
    • G06K15/02Arrangements for producing a permanent visual presentation of the output data, e.g. computer output printers using printers
    • G06K15/16Means for paper feeding or form feeding

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)

Abstract

PURPOSE:To start access immediately in process switching and to speed up the switching by preparing save and restoration to dispose a stack which is used in an actuated process on an actual stack prior to the process switching. CONSTITUTION:Plural stacks 1-3 are regarded as actual stacks A-C of hardware and the stacks A-C are applied to a transfer control circuit 4 for a main storage device. A process sequence determining circuit 5 determines the basic start sequence of plural processes and a process waiting state detecting circuit 6 detects the waiting state of a process to estimate a waiting time. If the waiting state occurs to this actuated process, the basic start sequence of processes is converted by a process list control circuit 7 according to the estimated time to generate a process list 8 showing the estimated start sequence of processes. Then, a stack allocation control circuit 9 controls the circuit 4 to speed up the switching of access.

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明はスタック制御方式に関し、特にマルチプロセス
処理におけるスタックの切換えを先行制御することによ
り、プロセスの切換えを高速で実行可能にするスタック
制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to a stack control method, and more particularly to a stack control method that enables high-speed process switching by controlling stack switching in advance in multi-process processing. .

〔技術の背景〕[Technology background]

同時に複数のプロセス(プログラムあるいはタスク)を
取扱うマルチプロセス処理を行なうシステムにおいでは
、各プロセス状態の管理を簡単化し、かつプロセスの切
換えを効率的に行なうために、スタックが多く使用され
る。しかし、一般に第1図に示すように2通常、同時に
処理対象とされるプロセスが多数個(1〜n)ある場合
、これに対して実際にシステム内に7S−ドウエア上で
用意されているスタック(実スタック)は、/1−ドウ
エア上の制約から2乃至4個程度に限られており。
In multi-process systems that handle multiple processes (programs or tasks) at the same time, stacks are often used to simplify the management of each process state and to efficiently switch processes. However, as shown in Figure 1, if there are a large number of processes (1 to n) that are to be processed at the same time, the stack actually prepared on the 7S-ware in the system. (Actual stack) is limited to about 2 to 4 due to hardware constraints.

一般にはプロセス数にくらべて少ない数(図示の例では
A、B2個)となっているのが普通である。
Generally, the number is smaller than the number of processes (in the illustrated example, there are two A and B).

このため、従来は、複数のプロセスそれぞれのスタック
(論理的なスタックあるいは仮想スタック)を主記憶装
置内に格納しでおいで、起動されたプロセスを含む少数
のプロセスのスタックのみを、ハードウェア上の実スタ
ックに置く方式がとられている。しかしこの方式では、
現に動作中のプロセスを他のプロセスに切換えたとき、
新たに+tl+されたプロセスのためのスタックが実ス
タック上に存在していない場合には、この時点において
、主記憶装置から実スタックへそのプロセスのスタック
を復元する必要があった。
For this reason, conventionally, the stacks (logical stacks or virtual stacks) of multiple processes are stored in main storage, and only the stacks of a small number of processes, including the started process, are stored on the hardware. The method is to place it on the real stack. However, with this method,
When switching the currently running process to another process,
If the stack for the newly +tl+ process did not exist on the real stack, it was necessary at this point to restore the process's stack from main storage to the real stack.

このため、上記の従来方式では、プロセス切換え時にス
タック復元処理のためのオーバーヘッドが生じるため、
切換え時間が遅れるという欠点があった。
Therefore, in the conventional method described above, overhead is generated for stack restoration processing when switching processes.
The drawback was that the switching time was delayed.

〔発明の目的および構成〕[Object and structure of the invention]

本発明の目的は、マルチプロセス処理システムにおいて
、プロセスの切換に伴うスタック復元のためのオーバー
ヘッドをなくすことにあり、現に動作中のプロセスの次
以降に動作するプロセスを予測し、該予測されたプロセ
スの起動に先行して該プロセスが使用するスタックを実
スタック上に復元することにより、プロセス切換えの高
速化を図ることにある。そしてそれによる本発明の構成
は、マルチプロセス処理を行なうためのマルチプロセス
スタック装置において、2個以上のスタックと、複数の
プロセスについてその基本的な起動順序を決定する回路
と、起動されたプロセスについで待ち状態の発生を検出
しその待ち時間を予測する回路と、該起動されたプロセ
スに待ち状態が発生したときその予測された待ち時間に
したがって上記複数のプロセスの基本的な起動順序を変
更して、予測されるプロセスの起動順序を表わすプロセ
スリストを作成するプロセスリスト制御回路と、該作成
されたプロセスリストにしたがって。
An object of the present invention is to eliminate the overhead for stack restoration accompanying process switching in a multi-process processing system, by predicting the process that will run after the currently running process, and by predicting the process that will run after the currently running process. The purpose of this invention is to speed up process switching by restoring the stack used by the process onto the real stack prior to starting the process. Accordingly, the configuration of the present invention is a multi-process stack device for performing multi-process processing, which includes two or more stacks, a circuit that determines the basic starting order of a plurality of processes, and a circuit that determines the basic starting order of a plurality of processes. A circuit that detects the occurrence of a waiting state and predicts the waiting time, and a circuit that changes the basic starting order of the plurality of processes according to the predicted waiting time when a waiting state occurs in the started process. and a process list control circuit that creates a process list representing a predicted starting order of processes, and according to the created process list.

上記2個以上のスタックに対するプロセスの割り付けを
先行制御することを特徴としている。
The method is characterized in that allocation of processes to the two or more stacks is controlled in advance.

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

はじめに本発明の動作原理を、第2図(αJ 、 (b
) 。
First, the operating principle of the present invention is explained in Fig. 2 (αJ, (b
).

(、Jにしたがって説明する。(Explained according to , J.

説明の便宜上、ハードウェアの実スタックの個数を才2
図(alに示すようにA、B2個とし、プロセスの起動
順序は、同図F6)に示すように、プロセス1.プロセ
ス2.プロセス3.・・・、の順序にしたがうものと仮
定する。一般に、プロセス制御システムのようなリアル
タイムシステムでは、このようにプロセスを起動する順
序をあらかじめ予測することは困難であるが、バッチ処
理、TSS処理システムでは、一定時間毎にジョブの起
動が行イつれ、また入出力装置の動作完了待ちによるプ
ロセスの待ち状態の発生などが生じでも、その待ち状態
の解消時間がおおむね予測できるため、現に動作中のプ
ロセスの次以降に動作すべきプロセスを予測することは
可能である。たとえは、入出力装置の完了待ちのプロセ
スの場合には、磁気ディスク装置などの各装置毎に平均
的な待ち時間を測定することによって2次にそのプロセ
スが起動される時間の予測をたてることが可能であり、
またバッチ処理、TSS処理については、オペレーティ
ングシステムの一部であるスケジュール管理モジュール
によって順序が定まるからである。
For convenience of explanation, the number of actual hardware stacks is expressed as 2.
As shown in the figure (al), there are two processes, A and B, and the startup order of the processes is as shown in F6 of the figure, process 1. Process 2. Process 3. It is assumed that the order of... is followed. Generally, in real-time systems such as process control systems, it is difficult to predict in advance the order in which processes will be started, but in batch processing and TSS processing systems, jobs are started at regular intervals. In addition, even if a process is in a waiting state due to waiting for an input/output device to complete its operation, the time it takes for the waiting state to be resolved can be roughly predicted, so it is possible to predict which process should run after the currently running process. is possible. For example, in the case of a process waiting for the completion of an input/output device, the average waiting time for each device such as a magnetic disk device is measured to secondly predict the time when the process will be started. It is possible to
Furthermore, the order of batch processing and TSS processing is determined by a schedule management module that is part of the operating system.

そこで、212図(C)に示すように、プロセス1が動
作中であってプロセス1がスタックAを使用しでいると
き、スタックBにはプロセス2で使用するスタックを復
元しておく。そしてプロセス1に代ってプロセス2が起
動されると、このプロセス2は、既に復元されでいるス
タックBを使用する。
Therefore, as shown in FIG. 212 (C), when process 1 is in operation and process 1 has finished using stack A, the stack used by process 2 is restored in stack B. When process 2 is started instead of process 1, process 2 uses stack B, which has already been restored.

同時にスタックAにあるプロセス1のスタックは主記憶
装置に退避され、その後にプロセス3が使用するスタッ
クが、主記憶装置から復元される。
At the same time, the stack of process 1 in stack A is saved to the main memory, and then the stack used by process 3 is restored from the main memory.

以下同様にしで、現に動作しでいるプロセスの次に動作
スるプロセスのスタックが、プロセスの起動に先行して
復元され、プロセスの切換時においで、起動されたプロ
セスは、既に復元されているスタックによりただちに動
作することが可能となる。
Similarly, the stack of the process running next to the currently running process is restored prior to starting the process, and when the process is switched, the stack of the started process is restored. This enables immediate operation.

スタックの個数が3以上の場合には、プロセスの切換に
よって起動された次のプロセスが入出力装置の完了待ち
等により動作不能であった場合でも、スタックの入替え
なしに更に次のプロセスを直ちに起動することができる
If the number of stacks is 3 or more, even if the next process started by process switching is inoperable due to waiting for input/output devices to complete, etc., the next process will be started immediately without stack replacement. can do.

以上のように、プロセスの起動に先行してスタックの復
元を行なうことにより、プロセス切換時にスタック復元
待ちとなる時間は減少する。
As described above, by restoring the stack prior to starting a process, the time spent waiting for stack restoration at the time of process switching is reduced.

2・3図は、上述した動作原理にもとづく本発明の一実
施例によるマルチプロセススタック制御回路の構成図で
ある。
2 and 3 are configuration diagrams of a multi-process stack control circuit according to an embodiment of the present invention based on the above-described operating principle.

同図においで、1,2.3はそれぞれ/・−ドウニア北
の実スタックA、B、Cを示し、4は主記憶装置転送制
御回路、5はプロセス順序決定回路。
In the figure, 1, 2.3 indicate the real stacks A, B, and C of Dounia North, respectively, 4 is a main memory transfer control circuit, and 5 is a process order determining circuit.

6はプロセス待ち状態検出回路、7はプロセスリスト制
御回路、8はプロセスリスト、9はスタック割当制御回
路である。
6 is a process waiting state detection circuit, 7 is a process list control circuit, 8 is a process list, and 9 is a stack allocation control circuit.

本実施例ではノ・−ドウエアスタックの個数を3としで
いるが、2以上であれ(′i同様に適用することができ
る。
In this embodiment, the number of nodeware stacks is three, but it can be applied even if it is two or more ('i).

プロセス順序決定回路5には、オペレーティングシステ
ムのスケジューリングモジュールより。
The process order determining circuit 5 is provided with a scheduling module of the operating system.

プロセスを起動する順序を示すデータが供給される。プ
ロセス待ち状態検出回路6は、プロセスに入出力装置の
完了待ちが発生すると、該完了待ちの発生したプロセス
の番号と、その予測待ち時間とを検出する。
Data is provided indicating the order in which processes are started. When a wait for completion of an input/output device occurs in a process, the process waiting state detection circuit 6 detects the number of the process in which the wait for completion has occurred and its estimated waiting time.

プロセス起動順序と、検出された待ち状態プロセス番号
および予測待ち時間とはプロセスリスト制御回路7に転
送され、ここにおいて、現に動作中のプロセスを先頭に
して次以降に起動されるべきプロセスを格納するプロセ
スリスト8が生成される。
The process startup order, the detected waiting state process number, and the predicted waiting time are transferred to the process list control circuit 7, where the currently running process is placed first and the processes to be started next are stored. A process list 8 is generated.

プロセスリスト8は、プロセスの起動順序を基本としで
、入出力装置の完了待ちとなったプロセスについて、そ
の待ち時間を考慮して順序を修正したものである。
Process list 8 is based on the starting order of processes, and the order of processes waiting for completion of input/output devices is modified in consideration of the waiting time.

スタック割当制御回路9は、生成されたプロセスリスト
8に基づき、スタックA、スタックB。
The stack allocation control circuit 9 assigns stack A and stack B based on the generated process list 8.

スタックCにおけるスタックの退避、復元の順序と、該
退避、復元を行うべき時刻とを決定し、主記憶装置転送
制御回路4を制御して、退避、復元を実行させる。スタ
ック割当制御回路9がスタックの退避、復元を制御する
手順は、壜・2図で説明した方法にしたがうものである
The order of saving and restoring the stack in stack C and the times at which the saving and restoring should be performed are determined, and the main memory transfer control circuit 4 is controlled to execute the saving and restoring. The procedure by which the stack allocation control circuit 9 controls the saving and restoring of the stack follows the method explained in Fig. 2.

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

本発明によれば、マルチプロセス処理において。 According to the invention, in multi-process processing.

起動されるプロセスが使用するスタックを実スタック上
に配置するために必要な退避、復元を1プロセス切換え
に先行しで準備しておくことにより。
By preparing the saving and restoring necessary to place the stack used by the activated process on the real stack in advance of switching one process.

実際にそのプロセスを起動するためにプロセス切換えを
行なうとぎには、スタックアクセスを直ちに開始するこ
とが可能となり、プロセス切換えが高速化される。
When a process is actually switched to start the process, stack access can be started immediately, and the process is switched at high speed.

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

第1図はマルチプロセス処理システムにおける一般的な
スタック構成方式を示す説明図、A−2図は本発明の詳
細な説明図、牙3図は本発明実施例の構成図である。 図中、1,2.3はそれぞれ/飄−ドウェア玉のスタッ
クA、B、Cであり、4は主記憶装置転送制御回路、5
はプロセス順序決定回路、6はプロセス待ち状態検出回
路、7はプロセスリスト制御回路、8はプロセスリスト
、9はスタック割当制御回路を表わす。 特許出願人 富士通株式会社
Fig. 1 is an explanatory diagram showing a general stack configuration method in a multi-process processing system, Fig. A-2 is a detailed explanatory diagram of the present invention, and Fig. 3 is a configuration diagram of an embodiment of the present invention. In the figure, 1, 2.3 are stacks A, B, and C of hardware balls, respectively, 4 is a main memory transfer control circuit, and 5 is a main memory transfer control circuit.
6 represents a process order determination circuit, 6 a process waiting state detection circuit, 7 a process list control circuit, 8 a process list, and 9 a stack allocation control circuit. Patent applicant Fujitsu Limited

Claims (1)

【特許請求の範囲】 マルチプロセス処理を行なうためのマルチプロセススタ
ック装置においで、2個以上のスタックと、複数のプロ
セスについてその基本的な起動順序を決定する回路と、
起動されたプロセスについで待ち状態の発生を検出しそ
の待ち時間を予測する回路と1該起動されたプロセスに
待ち状態が発生したときその予測された待ち時間にした
がって上記複数のプロセスの基本的な起動順序を変更し
で、予測されるプロセスの起動順序を表わすプロセスリ
ストを作成するプロセスリスト制御回路と。 液性rLされたプロセスリストにしたがって、上記2個
以上のスタックに対するプロセスの割り付けを先行制御
することを特徴とするスタック制御方式。
[Scope of Claim] A multi-process stack device for performing multi-process processing, comprising two or more stacks and a circuit that determines the basic starting order of a plurality of processes;
1. A circuit that detects the occurrence of a wait state in an activated process and predicts its waiting time; A process list control circuit that changes the startup order and creates a process list representing a predicted process startup order. A stack control method characterized in that the allocation of processes to the two or more stacks is controlled in advance according to a list of processed processes.
JP2132683A 1983-02-10 1983-02-10 Stack control system of multiprocessing Pending JPS59146387A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2132683A JPS59146387A (en) 1983-02-10 1983-02-10 Stack control system of multiprocessing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2132683A JPS59146387A (en) 1983-02-10 1983-02-10 Stack control system of multiprocessing

Publications (1)

Publication Number Publication Date
JPS59146387A true JPS59146387A (en) 1984-08-22

Family

ID=12052014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2132683A Pending JPS59146387A (en) 1983-02-10 1983-02-10 Stack control system of multiprocessing

Country Status (1)

Country Link
JP (1) JPS59146387A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02294737A (en) * 1989-05-09 1990-12-05 Toshiba Corp Information processor
JPH0325530A (en) * 1989-06-23 1991-02-04 Fujitsu Denso Ltd Inter-module coupling execution control system
WO2006030564A1 (en) * 2004-09-17 2006-03-23 Matsushita Electric Industrial Co., Ltd. Processor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5894038A (en) * 1981-11-30 1983-06-04 Nec Corp Storing device of register group

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5894038A (en) * 1981-11-30 1983-06-04 Nec Corp Storing device of register group

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02294737A (en) * 1989-05-09 1990-12-05 Toshiba Corp Information processor
JPH0325530A (en) * 1989-06-23 1991-02-04 Fujitsu Denso Ltd Inter-module coupling execution control system
WO2006030564A1 (en) * 2004-09-17 2006-03-23 Matsushita Electric Industrial Co., Ltd. Processor
CN100440153C (en) * 2004-09-17 2008-12-03 松下电器产业株式会社 Processor
US8042116B2 (en) 2004-09-17 2011-10-18 Panasonic Corporation Task switching based on the execution control information held in register groups

Similar Documents

Publication Publication Date Title
US6006247A (en) Method and system for scheduling threads and handling exceptions within a multiprocessor data processing system
US8793695B2 (en) Information processing device and information processing method
US20040031034A1 (en) System, method and software for reducing interrupt latency while polling in system management mode
JPS59146387A (en) Stack control system of multiprocessing
JP2001282560A (en) Virtual computer control method, its performing device and recording medium recording its processing program
JP2002099434A (en) Control apparatus
JP3601677B2 (en) Task processing system
JP3524961B2 (en) Multiprocessor system and task scheduling method in the system
JPH10177489A (en) Task scheduling method
JPH08137703A (en) Task switching device
JPH064318A (en) Error detecting system
CN116431280A (en) Interrupt signal processing method and interrupt signal processing device
JPH08314740A (en) Process dispatch method
JPH06309180A (en) Interrupt controller for computer system
JP2000066910A (en) Task scheduling method and recording medium
JPH01316830A (en) Task execution control system
JPH02244371A (en) Exclusive control method for multiprocessor system
JPH06214811A (en) Scheduling system
JPS6346861B2 (en)
JPH09106358A (en) Scheduling method of virtual computer system and device therefor
JPH09244905A (en) Scheduling method for multi-task os
JP2000155696A (en) Task execution controller
JPS6126095B2 (en)
JP3910422B2 (en) Management apparatus and management method
JPH11161506A (en) Dispatch method for information processor, information processor and storage medium thereof