JPS5935454B2 - Prioritization method and device - Google Patents
Prioritization method and deviceInfo
- Publication number
- JPS5935454B2 JPS5935454B2 JP9433376A JP9433376A JPS5935454B2 JP S5935454 B2 JPS5935454 B2 JP S5935454B2 JP 9433376 A JP9433376 A JP 9433376A JP 9433376 A JP9433376 A JP 9433376A JP S5935454 B2 JPS5935454 B2 JP S5935454B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- time
- value
- priority
- ready
- 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
Links
- 238000000034 method Methods 0.000 title claims description 7
- 238000012913 prioritisation Methods 0.000 title description 2
- 230000001186 cumulative effect Effects 0.000 claims description 9
- 238000007726 management method Methods 0.000 description 14
- 238000010586 diagram Methods 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Description
【発明の詳細な説明】
本発明はマルチプログラミングを行う計算機システムに
おいて、プログラムに中央処理装置(CPU)を割当て
るための優先順位を動的に制御する優先順位決定方法お
よび装置に関する。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a priority determination method and apparatus for dynamically controlling priorities for allocating central processing units (CPUs) to programs in a computer system that performs multiprogramming.
一般に、マルチプログラミング方式の計算機システムに
おいては、各プログラムはそれぞれある優先順位を割当
てられ、この優先順位に基いてデイスパツチングと称す
るCPUの割当てが制仰される。即ち、最も優先順位の
高い第1のプログラムがCPUで実行されている(ラン
)伏態にあり、これよりも優先順位の低い第2のプログ
ラムは、CPUさえ割当てられればCPUで実行可能な
(レデイ)状態lこあると仮定する。このとき、第1の
プログラムが、例えば、I/O命令を実行し、1/0動
作が完了するまでウエイト(WAIT)状態に入ると(
第1図1)、次に優先順位の高い第2のプログラムがC
PUで実行され、ラン状態となる(第1図2)。ここで
、第1のプログラムのI/O動作が完了すると、第1の
プログラムは実行可能なレデイ(READY)状態とな
るが(第1図4)、現在CPUで実行している第2のプ
ログラムの方が第1のプログラムよりも優先順位が低い
ので、直ちに、CPUを割当てられ、ラン(RUN)状
態となる(第1図2)。その結果、第2のプログラムは
、CPUを取り上げられ、レデイ状態にもどされる(第
1図(2)。優先順位が多数ある場合でも、同様に、レ
デイ伏態にあるプログラムのうち最も優先順位の高いプ
ログラムがCPUで実行されることlこなり、優先順位
を高くすることによりCPUをそのプログラムに優先的
′こ割当てることができる。Generally, in a multiprogramming type computer system, each program is assigned a certain priority, and CPU allocation called dispatching is controlled based on this priority. In other words, the first program with the highest priority is running on the CPU, and the second program with a lower priority can be executed on the CPU if the CPU is allocated. Assume that there are l states (ready). At this time, if the first program, for example, executes an I/O instruction and enters a wait state until the 1/0 operation is completed (
1), the second program with the next highest priority is C
It is executed on the PU and enters a running state (Fig. 1, 2). Here, when the I/O operation of the first program is completed, the first program enters the executable READY state (FIG. 1, 4), but the second program currently running on the CPU Since this program has a lower priority than the first program, it is immediately allocated the CPU and enters the RUN state (FIG. 1, 2). As a result, the CPU is taken away from the second program and the second program is returned to the ready state (Figure 1 (2)).Even if there are many priorities, the second program is taken away from the CPU and returned to the ready state. A high priority program can be executed by the CPU, and by increasing the priority, the CPU can be preferentially allocated to that program.
従来、計算機システムにおいては、プログラムの緊急度
あるいはI/0命令の発生頻度等に応じて各プログラム
にデイスパツチの優先順位が与えられており、前述のご
とくこの優先順位によりCPUでのプログラムの実行が
制闘されている。Conventionally, in computer systems, each program has been given a dispatch priority depending on the degree of urgency of the program or the frequency of occurrence of I/0 instructions, and as mentioned above, this priority determines the execution of the program by the CPU. It is being controlled.
1/0命令の発生頻度が高いプログラムに高いデイスパ
ツチングプライオリテイを与えることにより、システム
全体のスルーブツトを高くできることが知られている。It is known that the throughput of the entire system can be increased by giving a high dispatching priority to a program that frequently generates 1/0 instructions.
そして、I/O命令の発生頻度としては、そのプログラ
ムのウエイト状態にある時間すなわちウエイト時間と(
CPU時間十ウエイト時間)との比が一般に使用されて
いる。しかしながら、この従来の方式においては、優先
順位の大小は、CPUへの割当ての順位を表わすだけで
あり、必ずしも、プログラムのCPUでの実行の度合い
lこ対応していない。このため、場合によつては、優先
順位の低いプログラムにCPUが全く割当てられず、優
先順位がある程度低いと処理が全然進まないという事態
も発生することがある。本発明の目的はこのような欠点
を改良するための優先順位決定方法および装置を提供す
ることにある。The frequency of occurrence of I/O commands is determined by the time the program is in a wait state, that is, the wait time (
The ratio of CPU time to wait time is commonly used. However, in this conventional system, the magnitude of priority only represents the order of allocation to the CPU, and does not necessarily correspond to the degree of execution of the program on the CPU. Therefore, in some cases, a situation may occur in which no CPU is allocated to a program with a low priority, and if the priority is low to a certain extent, the processing does not proceed at all. SUMMARY OF THE INVENTION An object of the present invention is to provide a prioritization method and apparatus for overcoming these drawbacks.
即ち、本発明によれば、各プログラムのCPUでの相対
的な実行の度合いに関する指標(レデイ状態にある時間
とラン状態にある時間の比)として与えられた優先順位
、すなわち、外部優先順位が与えられる。That is, according to the present invention, the priority given as an index regarding the relative degree of execution of each program in the CPU (ratio of time in ready state to time in run state), that is, external priority is Given.
この外部優先順位により指定されるCPUサービスが各
プログラムに与えられるように、本発明では、内部優先
順位が決定され、これに従つてCPUでのデイスパツチ
が行われる。すなわち、本発明においては、一定時間毎
に、各プログラムへのCPUのサービスの度合いを調べ
、これと与えられた外部優先順位とから、次の期間にお
ける内部優先順位が決定される。なお、本発明では、各
プログラムに対するCPUでのサービスの割当ての度合
いは、各プログラムのCPUでの実行時間(以下ラン時
間という)だけではなく、各プログラムがレデイ状態に
あつた時間(以下単にレデイ時間とよぶ)をも考慮して
計算される。In order to provide each program with the CPU service specified by this external priority, the present invention determines an internal priority and dispatches on the CPU accordingly. That is, in the present invention, the degree of service of the CPU to each program is checked at fixed time intervals, and the internal priority order for the next period is determined from this and the given external priority order. In addition, in the present invention, the degree of service allocation by the CPU to each program is determined not only by the execution time of each program by the CPU (hereinafter referred to as run time) but also by the time during which each program is in a ready state (hereinafter simply referred to as ready state). It is calculated by taking into consideration the amount of time (referred to as time).
このような配慮は、次に述べるような計算機におけるプ
ログラムの動作の性質によるものである。Such consideration is due to the nature of program operation in computers as described below.
即ち、計算機において、実行されるプログラムlこは、
l/0命令を多発するものや演算中心でほとんどI/0
命令を出さないものがある。I/0デバイスの動作は、
CPUの処理速度に比べて低速であり、一度1/0命令
をだすと、プログラムは中断され、このため、I/O命
令を多発するプログラムは、優先順位が等しくても、I
/0命令をあまりださないプログラムに比べてCPUで
のサービスをより多く受けられないこと6こなり、単に
CPUでサービスをうけたラン時間だけで、プログラム
の実行の度合いを決定することは適当でない。また、優
先順位が等しいとすると、レデイ時間は、ほぼ等しく優
先順位を高めると、レデイ時間は短くなる。従つて、レ
デイ時間が短いということは、サービスをうける度合い
が高いことを示している。本発明はこれらの性質を利用
しており、一定期間毎に、プログラムのラン時間とレデ
イ時間とが測定され、これらの値からプログラムの実行
の度合いが計算される。That is, the program executed on the computer is:
Items that use many l/0 instructions or operations that are mostly I/0
There are some things that don't issue orders. The operation of the I/0 device is
It is slow compared to the processing speed of the CPU, and once a 1/0 instruction is issued, the program is interrupted. Therefore, programs that issue many I/O instructions will receive I/O instructions even if their priorities are equal.
/0 Programs that do not receive many CPU services compared to programs that do not issue many instructions6. Therefore, it is inappropriate to determine the degree of execution of a program based solely on the run time that is serviced by the CPU. Not. Furthermore, assuming that the priorities are the same, the ready time will be approximately equal, and if the priority is raised, the ready time will be shortened. Therefore, a short ready time indicates that the degree of service received is high. The present invention utilizes these properties, and the run time and ready time of a program are measured at regular intervals, and the degree of execution of the program is calculated from these values.
このプログラムの実行の度合いが、与えられた外部優先
順位で指定された度合いと比較され、次の期間における
内部優先順位が決定され、これにより前記次の期間に対
して外部優先順位で指定された目標が達成されるように
なる。ずなわち、外部優先順位を等しく与えた場合を考
えると、レデイ時間とラン時間との比が等しくなるよう
にデイスパツチングプライオリテイが与えられることに
なり、I/O命令を多発するプログラムは短いCPU時
間に対応してレデイ時間も短くなるように比較的高いデ
イスパツチングプライオリテイが与えられ、演算中心の
プログラムには、長いCPU時間に対応してレデイ時間
も長くなるように比較的低いデイスパツチングプライオ
リテイが与えられることになり、かつ、あまりに低いデ
イスパツチングプライオリテイが与えられたために、C
PUの割当てが全くなされなかつたような場合には、次
周期におけるデイスパツチングプライオリテイが上げら
れるように作用するため、従来のように、演算中心でI
/O命令の発生頻度が低いために低いデイスパツチング
プライオリテイが割当てられ、CPUが与えられず処理
が全然進まない等の欠点をなくすことができる。The degree of execution of this program is compared with the degree specified by the given external priority to determine the internal priority for the next period, which for said next period is specified by the external priority. Goals will be achieved. In other words, if we consider the case where external priorities are given equally, dispatching priorities will be given so that the ratio of ready time and run time is equal, and a program that uses many I/O instructions will A relatively high dispatching priority is given so that the ready time corresponds to a short CPU time, and a relatively low dispatching priority is given to a calculation-intensive program so that the ready time corresponds to a long CPU time. C
In the case where no PU is allocated at all, the dispatching priority in the next cycle is raised.
Since the /O command occurs less frequently, it is assigned a low dispatching priority, and it is possible to eliminate the disadvantage that the CPU is not given and the processing does not proceed at all.
次に図面を参照して本発明を詳細に説明する。第2図お
よび第3図はこの発明の一実施例を示す図である。本実
施例においては、ある与えられた内部優先順位Pで動作
しているある期間におけるレデイ時間とラン時間との比
Rを計算し、目標として与えられた外部優先順位の値P
Eと前述のRとの比をとり、この値を内部優先順位Pに
乗することにより、内部優先順位を修正し、この修正さ
れた値を次の時間間隔におけるデイスパツチのための内
部優先順位として使用することにより、各プログラムの
CPUによるサービスの受け方を目標に近づけようとす
るものである。Next, the present invention will be explained in detail with reference to the drawings. FIGS. 2 and 3 are diagrams showing one embodiment of the present invention. In this embodiment, the ratio R between the ready time and the run time during a certain period of operation with a given internal priority P is calculated, and the value P of the external priority given as a target is calculated.
Modify the internal priority by taking the ratio of E and the aforementioned R, multiplying this value by the internal priority P, and use this modified value as the internal priority for the dispatch in the next time interval. By using this, it is possible to bring the service provided by each program closer to the target by the CPU.
また、以下の本実施例においては、マルチプログラム状
態で実行されるプログラムの数はNより少なく、また、
各プログラムには、番号1(ト)くN)が割あてられて
いるものとする。In addition, in this embodiment below, the number of programs executed in the multi-program state is less than N, and
It is assumed that each program is assigned a number 1(g)xN).
また、本実施例においては、プログラムの実行の度合い
としてレデイ時間とラン時間の比が使われる。さらに、
プログラム番号1によりアドレスされる管理テーブル1
が第2図に示すように用意されている。管理テーブル1
の各ワードは、一定時間間隔Tpの間でレデイ状態(こ
あつた時間の累計を保持する第2のフイールドT2、ラ
ン状態にあつた時間の累計を保持する第1のフイールド
t1、プログラムがレデイ状態にあつた時刻を保持する
第3のフイールドT1、現時点での内部優先順位を保持
する第4のフイールドPおよび各プログラムに与えられ
た外部優先順位を保持する第5のフイールドPEをもつ
。また、参照英字Tはタイマ(時計装置)を示し、これ
は、10μs(マイクロセカンド)毎に1ずつカウント
アツプするカウンタで構成され、現時点における時刻T
ODを計時するとともに一定時間間隔Tp(ここでは、
500ミリセカンド毎)に制御回路4に対して割込みt
を起す。参照英字TdはプログラムがCPUにデイスパ
ツチされた時刻を保持するレジスタであり、この出力お
よび管理テーブル1の第1から第3のフイールドTl,
t2およびt1の値は、切換ゲートSWlを介して演算
回路2の一方の人力に印加される。また、タイマTの出
力TOPl管理テーブル1の第2のフイールドT2の出
力および演算回路2に接続された第1のラツチ(Tw)
3の出力は切換ゲートSWlを介して演算回路2の他の
入力に印加されている。演算回路2の出力は第2のラツ
チ5にも印加され、このラツチ5の出力は切換ゲートS
Wlを介して演算回路2の人力に印加される。また、制
御回路4は計時装置Tからの計時割込みItlプログラ
ムiがCPUに割当てられたことを示す信号Salプロ
グラムIOCPUでの実行が中断されたことを示す信号
Sbおよびプログラムiがレデイ状態になつたを示す信
号Scを受け取り、これらの信号を起動信号として管理
テーブルの読出し、書込み、演算回路への指令、レジス
タやラツチへの格納および切換ゲートの設定等の制御指
令を出す。次に、この制御回路4の制御の下に行われる
本発明の動作を説明する。なお、時計装置Tにより設定
される時間間隔Tpの開始時点においては、次の期間に
おける各プログラムの内部優先順位の値P(1)が決定
されており、この値は管理テーブル1の第4のフイール
ドPに格納されているものとし、デイスパツチはこの内
部優先順位に基づいておこなわれる。Furthermore, in this embodiment, the ratio of ready time to run time is used as the degree of program execution. moreover,
Management table 1 addressed by program number 1
are prepared as shown in FIG. Management table 1
A second field T2 holds the cumulative amount of time the program has been in the ready state during a fixed time interval Tp, a first field t1 holds the cumulative amount of time the program has been in the run state, and It has a third field T1 that holds the time when the program entered the state, a fourth field P that holds the current internal priority, and a fifth field PE that holds the external priority given to each program. , the reference letter T indicates a timer (clock device), which consists of a counter that counts up by 1 every 10 μs (microseconds), and the current time T
OD is measured and a certain time interval Tp (here,
Interrupts the control circuit 4 every 500 milliseconds)
wake up The reference alphabet Td is a register that holds the time when the program was dispatched to the CPU, and this output and the first to third fields Tl,
The values of t2 and t1 are applied to one side of the arithmetic circuit 2 via the switching gate SWl. In addition, the output of the second field T2 of the output TOPl management table 1 of the timer T and the first latch (Tw) connected to the arithmetic circuit 2
The output of No. 3 is applied to the other input of the arithmetic circuit 2 via the switching gate SWl. The output of the arithmetic circuit 2 is also applied to the second latch 5, and the output of this latch 5 is applied to the switching gate S.
It is applied to the human power of the arithmetic circuit 2 via Wl. In addition, the control circuit 4 receives a timing interrupt Itl from the timing device T, a signal Sal indicating that the program i has been assigned to the CPU, a signal Sb indicating that the execution of the program IOCPU has been interrupted, and a signal Sb indicating that the program i has become ready. It receives a signal Sc indicating , and issues control commands such as reading and writing of a management table, commands to arithmetic circuits, storage to registers and latches, and setting of switching gates using these signals as activation signals. Next, the operation of the present invention performed under the control of this control circuit 4 will be explained. Note that at the start of the time interval Tp set by the clock device T, the internal priority value P(1) of each program for the next period is determined, and this value is determined from the fourth value in the management table 1. It is assumed that the priority is stored in field P, and dispatch is performed based on this internal priority order.
また、管理テーブル1上のラン時間t1(1)およびレ
デイ時間T2(1)はともに1になつているとする。あ
る時刻において、あるプログラムiに対してCPUが割
当てられると、制御回路4には、信号Saが印加され、
これにより第2図aに示す動作が行われる。即ち、計時
装置Tの値で示されるこのときのTODが、レジスタT
dに格納され、この値とこのプログラムiがレデイにな
つた時刻T3(1)との差、即ち、このプログラムiが
デイスパツチされるまでにレデイ状態であつた時間が演
算回路2により計算され、第1のラツチ3(Tw)に格
納される。次に、この値と管理テーブル1の第2のフイ
ールドT2(1)に格納されているレデイ時間とが演算
回路2により加算され、その結果が第1のラツチ3を介
して管理テーブル1の同一記憶位置T2(1)にもどさ
れ、プログラムiのレデイ時間の累積が行われる。また
、プログラムiを実行中に、このプログラムiがI/0
命令を出したりあるいはこのプログラムiよりも高い優
先順位をもつプログラムiがレデイ状態になつたために
、このプログラムiが続けてCPUで実行不可能になつ
たとき、信号Sbが制御回路4に印加され、第2図bに
示すような動作が開始される。Further, it is assumed that the run time t1(1) and the ready time T2(1) on the management table 1 are both 1. At a certain time, when a CPU is assigned to a certain program i, a signal Sa is applied to the control circuit 4.
As a result, the operation shown in FIG. 2a is performed. That is, the TOD at this time indicated by the value of the timer T is the register T.
d, and the calculation circuit 2 calculates the difference between this value and the time T3(1) when this program i became ready, that is, the time that this program i was in the ready state before being dispatched. It is stored in the first latch 3 (Tw). Next, this value and the ready time stored in the second field T2(1) of the management table 1 are added by the arithmetic circuit 2, and the result is sent to the same field in the management table 1 via the first latch 3. It is returned to the storage location T2(1), and the ready time of program i is accumulated. Also, while program i is running, this program i
When this program i becomes unable to be executed by the CPU because it issues a command or a program i with a higher priority than this program i becomes ready, the signal Sb is applied to the control circuit 4. , the operation as shown in FIG. 2b is started.
即ち、このときの時刻TODとレジスタTdの値との差
、即ち、今回のデイスパツチでプログラムiがラン状態
にあつた時間が演算回路2により計算され、ラツチ3に
格納される。That is, the difference between the time TOD at this time and the value of the register Td, that is, the time during which the program i was in the running state in the current dispatch is calculated by the arithmetic circuit 2 and stored in the latch 3.
次に、この値が管理テーブル1の第1のフイールドのi
番目の語t1(1)の値に加えられ、同じ管理テーブル
の同一記憶位置に格納され、これにより、プログラムi
のラン時間の累積が行われる。プログラムiが出してい
たI/O命令が完了したためあるいはプログラムiが実
行中にそれよりも更に高い優先順位をもつプログラムα
が実行可能になつたために、CPUを取り上げられるこ
とによつてプログラムiがレデイ状態になつたときには
信号Scが制御回路4に印加され、第2図cに示すよう
に、そのときの時刻、即ち、計時装置Tの値が管理テー
ブル1の第3のフイールドT3のi番目の語T3(1)
に格納され、これによりプログラムがレデイ状態になつ
た時間の更新を行う。Next, this value is set to i in the first field of management table 1.
is added to the value of the word t1(1) of the program i
The run time is accumulated. Because the I/O command issued by program i has completed, or because program α has a higher priority than program i while it is being executed.
When the program i becomes ready to be executed by taking away the CPU, the signal Sc is applied to the control circuit 4, and as shown in FIG. 2c, the current time, i.e. , the value of the timer T is the i-th word T3(1) of the third field T3 of the management table 1.
This updates the time when the program became ready.
計時装置Tにより計時割込みが発生すると、即ち一定時
間間隔Tpが経過すると、割込み発生信号1tが制御回
路4に印加され、これにより第2図dに示す動作が開始
される。まず、プログラム番号1としてOが印加され、
管理テーブル1の第2のフイールドT2(1)に格納さ
れているレデイ時間の累積値および第1のフイールドt
1(1)に格納されているラン時間の累積値が読み出さ
れ、演算回路2により、その比R(1)が計算され、こ
の値が第2のラツチ5に格納される。When a timekeeping interrupt is generated by the timekeeping device T, that is, when a predetermined time interval Tp has elapsed, an interrupt generation signal 1t is applied to the control circuit 4, thereby starting the operation shown in FIG. 2d. First, O is applied as program number 1,
The cumulative value of ready time stored in the second field T2(1) of management table 1 and the first field t
1(1) is read out, the arithmetic circuit 2 calculates the ratio R(1), and this value is stored in the second latch 5.
次に、管理テーブル1の第5のフイールドPE(1)に
格納されている外部優先順位と第4のフイールドP(1
)に格納されている内部優先順位とが読み出され、演算
回路2により乗算が実行され、この結果がラツチ3に格
納される。次に、この値が、先に第2のラツチ5に格納
されているレデイ/ラン時間の比で除算され、その結果
が第1のラツチ3を介して管理テーブル1の第4のフイ
ールドPのプログラムに対応した記憶位置P(1)に格
納され、次の期間における内部優先順位として使用され
る。また、t1(1),T2(1)には、初期値として
値1が格納される。なお、この値1は単位時間10μs
を示し、除算に際し、値0が除数に印加されないように
1とされている。これらの動作をプログラム番号N−1
まで繰り返し、次の期間Tpにおける優先順位の計算お
よびラン時間ならびにレデイ時間の累積値の初期化を行
う。なお、本発明の一実施例の説明では、説明簡単化の
ため、制御回路の具体的な構成については触れていない
が、上記説明で示した動作を行うための制御回路は、通
常の論理回路の組合わせであるいはマイクロプログラム
方式の制御回路により容易に実現できることは明らかで
ある。Next, the external priority stored in the fifth field PE(1) of the management table 1 and the fourth field P(1
) is read out, multiplication is performed by the arithmetic circuit 2, and the result is stored in the latch 3. This value is then divided by the ready/run time ratio previously stored in the second latch 5, and the result is passed through the first latch 3 to the fourth field P of the management table 1. It is stored in the storage location P(1) corresponding to the program and used as an internal priority in the next period. Further, the value 1 is stored in t1(1) and T2(1) as initial values. Note that this value 1 corresponds to a unit time of 10 μs.
is set to 1 so that the value 0 is not applied to the divisor during division. These operations are set to program number N-1.
The calculation of priorities and the cumulative values of run time and ready time are initialized for the next period Tp. Note that in the description of one embodiment of the present invention, the specific configuration of the control circuit is not mentioned in order to simplify the explanation, but the control circuit for performing the operations shown in the above description is a normal logic circuit. It is clear that this can be easily realized by a combination of the above or by a microprogram type control circuit.
また、本実施例の上記信号Sa,Sbは本発明の優先順
位決定装置が用いられる情報処理装置内に設けられたプ
ログラムのデイスパツチを行うためのデイスパツチヤ一
により発生され、また、上記信号Scは前記情報処理装
置内に設けられた割り込み処理機構により発生されるが
、本発明の要旨に直接関係ないので詳しい説明を省く。Further, the above-mentioned signals Sa and Sb of this embodiment are generated by a dispatcher for dispatching programs provided in an information processing apparatus in which the priority determining apparatus of the present invention is used, and the above-mentioned signal Sc is Although this is generated by an interrupt processing mechanism provided in the information processing device, a detailed explanation will be omitted since it is not directly related to the gist of the present invention.
第1図はプログラム処理の状態を示す遷移図、第2図は
本発明の優先順位決定方法および装置の動作を説明する
ためのフロウチヤートおよび第3図は本発明における優
先順位決定装置の一実施例を示す図である。
第3図において、参照数字1は管理テーブル、参照数字
2は演算回路、参照数字3,5はラツチ、参照数字4は
制御回路、参照英字Tは刻時装置、参照英字Tdはレジ
スタおよび参照英字SWl,SW2は切換ゲートをそれ
ぞれ示す。FIG. 1 is a transition diagram showing the state of program processing, FIG. 2 is a flowchart for explaining the operation of the priority determining method and device of the present invention, and FIG. 3 is an embodiment of the priority determining device of the present invention. FIG. In Figure 3, reference number 1 is a management table, reference number 2 is an arithmetic circuit, reference numbers 3 and 5 are latches, reference number 4 is a control circuit, reference letter T is a clock device, reference letter Td is a register and reference letter SWl and SW2 respectively indicate switching gates.
Claims (1)
グ方式の計算機システムにおける各プログラムの優先順
位を定めかつ中央処理装置への割当ての優先順位を制御
する優先順位決定方法において、各プログラム毎に各プ
ログラムがある時間間隔において前記中央処理装置で実
行されている状態にあつた時間すなわちラン時間および
各プログラムが前記処理装置で実行可能な状態にあつた
時間すなわちレディ時間を調べ、これらの時間を次の時
間間隔における優先順位決定のための要因として使用す
ることを特徴とする優先順位決定方法。 2 複数個のプログラムを実行するマルチプログラミン
グ方式の計算機システムにおいて、各プログラム毎に各
プログラムが中央処理装置で実行されていた時間すなわ
ちラン時間、前記処理装置に対する割当てを待つていた
実行可能な時間すなわちレディ時間および前記実行可能
になつた時刻をそれぞれ保持する記憶位置をもつ第1、
第2および第3の保持手段と、現時点における各プログ
ラムの優先順位を保持する第4の保持手段と、前記中央
処理装置にある1つのプログラムが割当てられた時刻を
保持する第5の保持手段と、一定時間間隔毎に内容がカ
ウントアップされる計時装置と、前記中央処理装置にお
いて前記ある1つのプログラムの実行が中断された時点
でこの時点における時刻と前記第5の法持手段に格納さ
れている時刻との差によりそのプログラムの前記ラン時
間を計算し、この値を前記第1の保持手段のそのプログ
ラムに対応した記憶位置に格納されているこれまでのそ
のプログラムの前記ラン時間の累積時間値に加えこの加
算値を前記第1の保持手段の前記記憶位置に格納し、ま
たあるプログラムが実行可能な状態になつた時点で前記
計時装置の値を前記第3の保持手段におけるそのプログ
ラムに対応した記憶位置に格納し、前記中央処理装置に
前記ある1つのプログラムが割当てられた時点で前記計
時装置の値と前記第3の保持手段におけるそのプログラ
ムに対応する記憶位置に格納された値との差によりこの
プログラムの前記レディ時間を計算し、この値を前記第
2の保持手段の前記プログラムに対応した記憶位置に格
納されている累積値に加えこれを新たな累積値として前
記第2の保持手段の前記記憶位置に格納し、一定時間間
隔毎に各プログラムに対応する前記第1および第2の保
持手段の記憶位置に格納された値をもとに前記一定時間
間隔における前記レディ時間の累積値と前記ラン時間の
累積値とを知りこれらを用いて次の一定時間間隔におけ
る各プログラムの優先順位の値を計算し、その結果を前
記第4の保持手段に格納する動作を行なう演算手段およ
び制御手段とから構成されたことを特徴とする優先順位
決定装置。[Scope of Claims] 1. In a priority determination method for determining the priority of each program in a multi-programming computer system that executes a plurality of programs and controlling the priority of allocation to a central processing unit, Check the time during which each program was running on the central processing unit during a certain time interval, that is, the run time, and the time when each program was ready to run on the processing unit, that is, the ready time, and calculate these times. A method for determining priorities, characterized in that: is used as a factor for determining priorities in the next time interval. 2. In a multi-programming computer system that executes a plurality of programs, the time during which each program is being executed by the central processing unit, that is, the run time, and the executable time during which each program is waiting for allocation to the processing unit, namely, a first one having a storage location for respectively holding a ready time and said executable time;
second and third holding means, fourth holding means for holding the current priority of each program, and fifth holding means for holding the time at which one program in the central processing unit is assigned; , a timekeeping device whose contents are counted up at regular time intervals; and a timekeeping device whose contents are counted up at regular time intervals; and when execution of the one program is interrupted in the central processing unit, the current time and the time are stored in the fifth method holding means. The run time of the program is calculated based on the difference between the run time and the current time, and this value is calculated as the cumulative run time of the program up to now, which is stored in the memory location corresponding to the program in the first storage means. This additional value is stored in the storage location of the first holding means in addition to the value, and when a certain program becomes executable, the value of the clocking device is stored in the program in the third holding means. and the value of the clock device and the value stored in the storage location corresponding to the program in the third holding means at the time when the one program is assigned to the central processing unit. The ready time of this program is calculated based on the difference between the above, and this value is added to the cumulative value stored in the storage location corresponding to the program in the second storage means, and this is set as a new cumulative value to the second storage unit. The ready time is stored in the memory location of the holding means, and the ready time at the given time interval is calculated based on the values stored in the storage locations of the first and second holding means corresponding to each program at each given time interval. Calculating means that performs an operation of knowing the cumulative value and the cumulative value of the run time, using these to calculate the priority value of each program at the next fixed time interval, and storing the result in the fourth holding means. and a control means.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9433376A JPS5935454B2 (en) | 1976-08-06 | 1976-08-06 | Prioritization method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP9433376A JPS5935454B2 (en) | 1976-08-06 | 1976-08-06 | Prioritization method and device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5319736A JPS5319736A (en) | 1978-02-23 |
| JPS5935454B2 true JPS5935454B2 (en) | 1984-08-29 |
Family
ID=14107343
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP9433376A Expired JPS5935454B2 (en) | 1976-08-06 | 1976-08-06 | Prioritization method and device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS5935454B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05339926A (en) * | 1992-06-05 | 1993-12-21 | Niigata Kankyo Service Kk | Method and device for removing and recovering adhered material at intake |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5523528A (en) * | 1978-08-02 | 1980-02-20 | Nec Corp | Multi-programming control system |
| JPS6061416U (en) * | 1983-09-30 | 1985-04-30 | 株式会社クボタ | Starting device with automatic engine decompression release device |
-
1976
- 1976-08-06 JP JP9433376A patent/JPS5935454B2/en not_active Expired
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH05339926A (en) * | 1992-06-05 | 1993-12-21 | Niigata Kankyo Service Kk | Method and device for removing and recovering adhered material at intake |
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5319736A (en) | 1978-02-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CA1081857A (en) | Apparatus for processing interrupts in microprocessing systems | |
| US5535380A (en) | System to reduce latency for real time interrupts | |
| US7748001B2 (en) | Multi-thread processing system for detecting and handling live-lock conditions by arbitrating livelock priority of logical processors based on a predertermined amount of time | |
| US5388245A (en) | Memory arbitration method and apparatus for multiple-cycle memory coprocessors employing a data cache unit and stack RAM | |
| CN101334766B (en) | Paralleling microprocessor and its realization method | |
| US4200912A (en) | Processor interrupt system | |
| GB1352577A (en) | Multi-processor processing system having inter-processor interrupt transfer apparatus | |
| US7565659B2 (en) | Light weight context switching | |
| CA2056356C (en) | Interruption handling system | |
| JPS5935454B2 (en) | Prioritization method and device | |
| US8973006B2 (en) | Circuit arrangement for execution planning in a data processing system | |
| KR101635816B1 (en) | Apparatus and method for thread progress tracking using deterministic progress index | |
| KR20130039479A (en) | Apparatus and method for thread progress tracking | |
| US7904703B1 (en) | Method and apparatus for idling and waking threads by a multithread processor | |
| US4409653A (en) | Method of performing a clear and wait operation with a single instruction | |
| US7603673B2 (en) | Method and system for reducing context switch times | |
| US4987534A (en) | Processor having synchronized operation between a CPU and a vector processor | |
| JPS6161416B2 (en) | ||
| JP4759026B2 (en) | Processor | |
| Drótos et al. | Interrupt driven parallel processing | |
| US12411704B2 (en) | Efficient central processing unit overcommit for virtual machines with symmetric multi-processing | |
| JPS6031649A (en) | Timer controlling method in virtual computer system | |
| JPH0795276B2 (en) | Information processing equipment | |
| JPS63269239A (en) | Processor load measuring system | |
| Wang | Interrupt Processing and Process Scheduling |