JPH03113564A - Job parallel executing device - Google Patents

Job parallel executing device

Info

Publication number
JPH03113564A
JPH03113564A JP25126289A JP25126289A JPH03113564A JP H03113564 A JPH03113564 A JP H03113564A JP 25126289 A JP25126289 A JP 25126289A JP 25126289 A JP25126289 A JP 25126289A JP H03113564 A JPH03113564 A JP H03113564A
Authority
JP
Japan
Prior art keywords
processor
job
execution
processors
barrier
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.)
Granted
Application number
JP25126289A
Other languages
Japanese (ja)
Other versions
JPH07111708B2 (en
Inventor
Shoichi Sakon
彰一 左近
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 JP25126289A priority Critical patent/JPH07111708B2/en
Publication of JPH03113564A publication Critical patent/JPH03113564A/en
Publication of JPH07111708B2 publication Critical patent/JPH07111708B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To use the processors with high efficiency by providing a means which fetches and carries out the jobs remaining up to the barrier point of an opened processor and at the same time grants the execution of other processors at the barrier points. CONSTITUTION:A remaining part execution means 6 detects a barrier synchronizing point set right after a processor is opened via another processor assigned to a job under execution and takes out the context of one of processors saved by a context store means 5 to carry out the job part remaining up to a barrier synchronizing point. A substitute execution means 7 carries out the jobs in place of a processor at and after the barrier synchronizing point. Then an execution join means 8 assigns again a processor to the job which is carried out by another processor at the barrier synchronizing point of another processor. Thus it is possible to join the execution at the immediately following barrier synchronizing point when a deprived processor is assigned again to the relevant job. As a result, the processors can be flexibly assigned.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、マルチプロセッサシステムに利用する。[Detailed description of the invention] [Industrial application field] INDUSTRIAL APPLICATION This invention is utilized for a multiprocessor system.

特に、マルチジョブ環境下での効率のよい並列実行手段
に関する。
In particular, it relates to efficient parallel execution means in a multi-job environment.

〔概要〕〔overview〕

本発明は、マルチジョブ環境下での並列実行手段におい
て、 解放されたプロセッサのバリア点までの残存ジョブを引
き取って実行し、また、バリア点で他のプロセッサの実
行参入を許可する手段を設けることにより、 プロセッサを効率よく使用することができるようにした
ものである。
The present invention provides a means for parallel execution in a multi-job environment to take over and execute the remaining jobs up to the barrier point of the released processor, and to allow other processors to enter execution at the barrier point. This allows for efficient use of the processor.

〔従来の技術〕[Conventional technology]

マルチプロセッサシステムでは、ひとつのプログラムの
いくつかの部分を複数のプロセッサで並列に実行するこ
とによってプログラムの実行のターンアラウンドタイム
を短縮することができる。
In a multiprocessor system, the turnaround time for program execution can be shortened by executing several parts of one program in parallel on multiple processors.

従来、このような並列実行を行うときの第一の方法とし
て、プログラム中のある程度まとまった大きさの処理単
位をタスクとし、各タスクを割り当てられたプロセッサ
に割り振って実行する方法が用いられていた。
Conventionally, the first method for performing parallel execution of this type was to use a fairly large processing unit in a program as a task, and to allocate each task to an assigned processor for execution. .

また、第二の方法として、プログラム中のループの一つ
一つの繰り返しを複数のプロセッサに分割してふりわけ
、それに並列に実行することも行われていた。
A second method is to divide each loop in a program into multiple processors and execute them in parallel.

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

しかし、第一の方法の場合には、タスク起動などのオー
バヘッドを避けるためにタスクの大きさを大きく取らざ
るをえない。例えば、ループの一つ一つの繰り返しを別
々のタスクとすることはオーバヘッドが大きくなりすぎ
るため不可能なことが多い。想定したプロセッサ数にお
いて最適のタスク分割であっても、マルチジョブ環境の
ようにそのジョブに割り当てられるプロセッサ数が一定
でない場合に、プロセッサに割り当てられるタスクがア
ンバランスになりやすく、また、そのように大きな独立
のタスクを必ずしも作れるとは限らない欠点がある。
However, in the case of the first method, it is necessary to increase the size of the task in order to avoid overhead such as task activation. For example, it is often impossible to make each iteration of a loop a separate task because the overhead would be too large. Even if the task division is optimal for the expected number of processors, if the number of processors assigned to a job is not constant, such as in a multi-job environment, the tasks assigned to the processors can easily become unbalanced. The disadvantage is that it is not always possible to create large independent tasks.

また、第二の方法の場合に、各プロセッサのローカルエ
リアの設定を正しく行うためにはl−つのジョブに固定
台数のプロセッサを割り当てなけばならない。これには
マルチジョブ環境でプロセラ勺割り当てを固定しなけれ
ならず、柔軟性が著しく失われてしまう欠点がある。
Furthermore, in the case of the second method, in order to correctly set the local area of each processor, a fixed number of processors must be assigned to one job. This has the disadvantage that the processor allocation must be fixed in a multi-job environment, resulting in a significant loss of flexibility.

本発明は、このような欠点を除去するもので、プロセッ
サの割り当てを柔軟に行うことができるジョブ並列実行
装置を提供することを目的とする。
The present invention aims to eliminate such drawbacks and to provide a job parallel execution device that can flexibly allocate processors.

〔問題点を解決するだめの手段〕[Failure to solve the problem]

本発明は、複数個のプロセッサを備え、ひとつのジョブ
の実行に割り当てられるプロセッサの個数が不定である
環境でそのジョブが実行される系に結合をされたジョブ
並列実行装置において、実行中のジョブに割り当てられ
たひとつのプロセッサがこのジョブから解放されるとこ
のプロセッサのコンテキストをセーブする保存手段と、
上記実行中のジョブに割り当てられた他のプロセッサが
上記ひとつのプロセッサが解放された直後のバリア同期
点を検出し、上記保存手段にセーブされた上記ひとつの
プロセッサのコンテキストを取り出して上記バリア同期
点までに残存するジョブ部分を実行する第一実行手段と
、上記バリア同期点以後に上記ひとつのプロセッサが実
行すべきジョブを代行して実行する第二実行手段と、上
記性のプロセッサのバリア同期点で上記ひとつのプロセ
ッサを上記性のプロセッサが実行中のジョブに再度割り
当てる実行参入手段とを備えたことを特徴とする。
The present invention provides a job parallel execution device that is equipped with a plurality of processors and is connected to a system in which a job is executed in an environment where the number of processors assigned to the execution of one job is undefined. a storage means for saving the context of one processor assigned to the processor when the processor is released from this job;
Another processor assigned to the job being executed detects the barrier synchronization point immediately after the one processor is released, retrieves the context of the one processor saved in the storage means, and retrieves the context of the one processor and processes the barrier synchronization point immediately after the one processor is released. a first execution means for executing the remaining job part until the barrier synchronization point; a second execution means for executing on behalf of the job to be executed by the one processor after the barrier synchronization point; and a barrier synchronization point for the processor. and execution entry means for reassigning the one processor to a job being executed by the processor of the above nature.

〔作用〕[Effect]

マルチジョブ環境下でプログラムを並列実行するときに
、プロセッサ割当手段でジョブに対してプロセッサを動
的に割り当てたり、また奪ったりする。また、ジョブの
プログラム中の独立あるいは部分的に独立なループの別
々の繰り返しをプロセッサ割当手段でそのジョブに割り
当てられた数のプロセッサに振り分けて実行する。この
並列に実行される部分以外で全プロセッサが共通に実行
する部分を各々のプロセッサで行う。プロセッサ割当手
段によってそのジョブに現在割り当てられている全プロ
セッサの間での同期をバリア同期手段でとる。ジョブ実
行中にすでに割り当てられていたあるプロセッサがプロ
セッサ割当手段によって他のジョブに奪われた場合に、
奪われたプロセッサのコンテキストをセーブする。この
ジョブに割り当てられていて奪われなかったプロセッサ
が直後のバリア同期点でこのジョブから奪われたプロセ
ッサがあることを検出して、奪われたプロセッサのセー
ブされたコンテキストを取り出しバリア同期点までの実
行を行う。また、奪われたプロセッサのプロセッサ共通
部分に関する実行をや工われていない他のプロセッサが
肩代わりして行う。
When executing programs in parallel in a multi-job environment, a processor allocation means dynamically allocates or deprives a processor to a job. Further, separate repetitions of independent or partially independent loops in the program of a job are distributed and executed by the processor allocation means to the number of processors allocated to the job. Parts that are commonly executed by all processors other than the parts executed in parallel are executed by each processor. Barrier synchronization means synchronizes all processors currently assigned to the job by processor assignment means. If a processor that has already been allocated during job execution is taken over by another job by the processor allocation means,
Save the stolen processor's context. A processor assigned to this job that was not taken away detects that there is a processor taken away from this job at the barrier synchronization point immediately after, retrieves the saved context of the taken processor, and returns it to the barrier synchronization point. carry out the execution. In addition, other processors that have not been stolen take over the execution of the processor common part of the stolen processor.

奪われたプロセッサがそのジョブに再度割り当てられた
ときに、直後のバリア同期点から実行を参人させる。
When the stolen processor is reassigned to the job, execution begins at the next barrier sync point.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面を参照して説明す
る。第1図は、この実施例の構成を示すブロック構成図
である。
An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of this embodiment.

この実施例は、第1図に示すように1.プロセッサ共通
部分実行手段1と、バリア同期手段2と、ループ並列実
行手段3と、代替実行手段7と、プロセッサ割当手段4
と、コンテキスト保存手段5と、残存部分実行手段6と
、実行参人手段8とを備える。すなわち、この実施例は
、複数個のプロセッサを備え、ひとつのジョブの実行に
割り当てられるプロセッサの個数が不定である環境でそ
のジョブが実行される系に結合をされ、実行中のジョブ
に割り当てられたひとつのプロセッサがこのジョブから
解放されるとこのプロセッサのコンテキストをセーブす
る保存手段であるコンテキスト保存手段5と、上記実行
中のジョブに割り当てられた他のプロセッサが上記ひと
つのプロセッサが解放された直後のバリア同期点を検出
し、上記保存手段にセーブされた上記ひとつのプロセッ
サのコンテキストを取り出して上記バリア同期点までに
残存するジョブ部分を実行する第一実行手段である残存
部分実行手段6と、上記バリア同期点以後に上記ひとつ
のプロセッサが実行すべきジョブを代行して実行する第
二実行手段である代替実行手段7と、上記他のプロセッ
サのバリア同期点で上記ひとつのプロセッサを上記他の
プロセッサが実行中のジョブに再度割り当てる実行参人
手段8とを備える。
In this embodiment, as shown in FIG. Processor common part execution means 1, barrier synchronization means 2, loop parallel execution means 3, alternative execution means 7, and processor allocation means 4
, a context storage means 5 , a remaining part execution means 6 , and an execution participant means 8 . In other words, this embodiment is connected to a system in which a job is executed in an environment that includes a plurality of processors and the number of processors assigned to the execution of one job is undefined, and the number of processors assigned to the job being executed is connected to the system. When one processor is released from this job, the context saving means 5, which is a saving means for saving the context of this processor, and the other processors assigned to the job being executed are Remaining part execution means 6, which is a first execution means, detects the immediate barrier synchronization point, retrieves the context of the one processor saved in the storage means, and executes the remaining job part up to the barrier synchronization point; , an alternative execution means 7 which is a second execution means that executes a job to be executed by the one processor on behalf of the one processor after the barrier synchronization point; and execution participant means 8 for reassigning jobs to the jobs being executed by the processors.

次に、この実施例の動作について図面を参照して説明す
る。第2図は、第1図に対する処理フロー図である。
Next, the operation of this embodiment will be explained with reference to the drawings. FIG. 2 is a processing flow diagram for FIG. 1.

ステップS10でプロセッサ共通部分実行手段1が各プ
ロセッサのローカル変数の設定などの全プロセッサが共
通に行う処理を実行する。ステップSllでプロセッサ
割当手段4によって実行中にプロセッサが奪われた場合
に、ステップ312でコンテキスト保存手段5が奪われ
たプロセッサで実行していたコンテキストをセーブする
。その後に、ステップS13でバリア同期手段2により
全プロセッサの間で同期がとられる。このときに、ステ
ップS14で直前のプロセッサ共通部分実行中にプロセ
ッサが奪われたことが検出された場合に、ステップS1
5で残存部分実行手段6が奪われたプロセッサのセーブ
されたコンテキストを取り出し、残りのプロセッサがバ
リア実行点までの残存部分を実行する。ステップS16
で直前のプロセッサ共通部分より前にプロセッサが奪わ
れて少ないプロセッサ数で実行されている場合でかつ直
前のプロセッサ共通部分で後で使われているプロセッサ
のローカル変数に値が設定されている場合に、ステップ
S17で代替実行手段7が奪われたプロセッサのプロセ
ッサ共通部分を実行する。これにより、プロセッサ割当
手段4が奪われたプロセッサを返してくれたときに次の
バリア実行点からの返ってきたプロセッサの実行の参人
が可能になる。ただし、一度奪われたプロセッサがほと
んど戻ってこないような運用環境条件の場合は、この代
替実行は無駄であるので行わない。
In step S10, the processor common part execution means 1 executes processing commonly performed by all processors, such as setting local variables of each processor. When a processor is taken away during execution by the processor allocation means 4 in step Sll, the context storage means 5 saves the context being executed on the taken processor in step 312. Thereafter, in step S13, the barrier synchronization means 2 synchronizes all the processors. At this time, if it is detected in step S14 that the processor has been usurped during the execution of the previous processor common part, in step S1
At step 5, the remaining part execution means 6 retrieves the saved context of the usurped processor, and the remaining processors execute the remaining part up to the barrier execution point. Step S16
If a processor is stolen before the previous processor common part and the processor is executed with fewer processors, and if a value is set in a local variable of a processor that will be used later in the previous processor common part, , in step S17, the alternative execution means 7 executes the processor common part of the stolen processor. Thereby, when the processor allocation means 4 returns the stolen processor, it becomes possible to participate in the execution of the returned processor from the next barrier execution point. However, if the operating environment is such that processors that have been stolen are rarely returned, this alternative execution is wasteful and is not performed.

プロセッサを奪った側のジョブが終了するなどしてプロ
セッサ割当手段4がそのプロセッサを元のジョブに返し
たときに実行参人手段8がプロセッサを待ち状態にし、
そのジョブ実行中の他のプロセッサが次のバリア同期を
行った後にステップ318でプロセッサが戻ってきたこ
とが検出されると、ステップS19で実行参入手段8を
実行に参入させる。ステップS20で、ループ並列実行
手段3がジョブのプログラム中の各々の繰り返しのデー
タ依存関係が独立または部分的に独立の場合に、独立な
繰り返しの部分をそれぞれのプロセッサに割り当てて並
列に実行させる。この部分はジョブに割り当てられたプ
ロセッサ数にほぼ比例して実行時間が短縮され、かつ、
割り当てられたプロセッサ数が何台であっても正しく実
行することができる。ステップ321で、プロセッサ割
当手段4によって実行中のプロセッサが奪われた場合に
ステ0 ツブS22でコンテキスト保存手段5が奪われたプロセ
ッサで実行していたコンテキストをセーブする。
When the processor allocation means 4 returns the processor to the original job due to the completion of the job that stole the processor, the execution participant means 8 places the processor in a waiting state,
When the return of the processor is detected in step 318 after the other processors executing the job have performed the next barrier synchronization, the execution entry means 8 is caused to enter execution in step S19. In step S20, when the data dependencies of each repetition in the job program are independent or partially independent, the loop parallel execution means 3 assigns the independent repetition parts to the respective processors and executes them in parallel. In this part, the execution time is shortened almost in proportion to the number of processors assigned to the job, and
It can be executed correctly no matter how many processors are assigned. In step 321, when the currently executing processor is taken away by the processor allocating means 4, in step S22, the context saving means 5 saves the context that was being executed on the taken processor.

その後に、ステップS23でバリア同期手段2で全プロ
セッサの間で同期がとられる。このときに、ステップS
24で直前のループ並列部分実行中にプロセッサが奪わ
れたことが検出された場合に、ステップS25で残存部
分実行手段6が奪われたプロセッサのセーブされたコン
テキストを取り出し、奪われていない残りのプロセッサ
がバリア実行点までの残存部分を実行する。プロセッサ
を奪った側のジョブが終了するなどしてプロセッサ割当
手段4がそのプロセッサを元のジョブに返したときに、
実行参入手段8がそのプロセッサを待ち状態にし、その
ジョブ実行中の他のプロセッサが次のバリア同期を行っ
た後にステップ326でプロセッサが戻ってきたことが
検出されると、ステップS27で実行参入手段8を実行
に参人させる。
Thereafter, in step S23, the barrier synchronization means 2 synchronizes all the processors. At this time, step S
If it is detected in step S24 that a processor has been usurped during the previous parallel partial execution of the loop, in step S25 the remaining partial execution means 6 retrieves the saved context of the stolen processor and uses the remaining undeprived context. The processor executes the remaining portion up to the barrier execution point. When the processor allocation means 4 returns the processor to the original job due to the end of the job that stole the processor,
After the execution entry means 8 puts the processor in a waiting state and the other processors executing the job perform the next barrier synchronization, when it is detected in step 326 that the processor has returned, the execution entry means 8 puts the processor in a waiting state and in step S27 the execution entry means 8 puts the processor in a waiting state. Participate in the implementation of 8.

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

本発明は、以上説明したように、マルチジョブ環境下で
ジョブに割り当てられるプロセッサが任意の時点で奪わ
れたり戻ったりしてその数が動的に変化する場合でも割
り当てられたプロセッサを効率よく用いることができる
効果がある。
As explained above, the present invention efficiently uses the processors assigned to a job in a multi-job environment even when the number of processors assigned to a job changes dynamically by being taken away or returned at any time. There is an effect that can be done.

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

第1図は本発明実施例の構成を示すブロック構成図。 第2図は本発明実施例の動作を示す処理フロー図。 ■・・・プロセッサ共通部分実行手段、2・・・バリア
同期手段、3・・・ループ並列実行手段、4・・・プロ
セッサ割当手段、5・・・コンテキスト保存手段、6・
・・残存部分実行手段、7・・・代替実行手段、訃・・
実行参入手段。
FIG. 1 is a block configuration diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a processing flow diagram showing the operation of the embodiment of the present invention. ■... Processor common part execution means, 2... Barrier synchronization means, 3... Loop parallel execution means, 4... Processor allocation means, 5... Context storage means, 6.
... Remaining partial execution means, 7... Alternative execution means, death...
Execution entry means.

Claims (1)

【特許請求の範囲】 1、複数個のプロセッサを備え、ひとつのジョブの実行
に割り当てられるプロセッサの個数が不定である環境で
そのジョブが実行される系に結合をされたジョブ並列実
行装置において、 実行中のジョブに割り当てられたひとつのプロセッサが
このジョブから解放されるとこのプロセッサのコンテキ
ストをセーブする保存手段と、上記実行中のジョブに割
り当てられた他のプロセッサが上記ひとつのプロセッサ
が解放された直後のバリア同期点を検出し、上記保存手
段にセーブされた上記ひとつのプロセッサのコンテキス
トを取り出して上記バリア同期点までに残存するジョブ
部分を実行する第一実行手段と、 上記バリア同期点以後に上記ひとつのプロセッサが実行
すべきジョブを代行して実行する第二実行手段と、 上記他のプロセッサのバリア同期点で上記ひとつのプロ
セッサを上記他のプロセッサが実行中のジョブに再度割
り当てる実行参入手段と を備えたことを特徴とするジョブ並列実行装置。
[Scope of Claims] 1. In a job parallel execution device equipped with a plurality of processors and coupled to a system in which a job is executed in an environment where the number of processors allocated to the execution of one job is undefined, A storage means that saves the context of one processor assigned to a running job when the processor is released from this job, and a storage means that saves the context of this processor when one processor assigned to the running job is released; a first execution means that detects a barrier synchronization point immediately after the barrier synchronization point, retrieves the context of the one processor saved in the storage means, and executes the job portion remaining up to the barrier synchronization point; a second execution means for executing a job to be executed by the one processor on behalf of the processor; and execution entry that reassigns the one processor to the job being executed by the other processor at the barrier synchronization point of the other processor. A job parallel execution device characterized by comprising: means.
JP25126289A 1989-09-27 1989-09-27 Job parallel execution unit Expired - Lifetime JPH07111708B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25126289A JPH07111708B2 (en) 1989-09-27 1989-09-27 Job parallel execution unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25126289A JPH07111708B2 (en) 1989-09-27 1989-09-27 Job parallel execution unit

Publications (2)

Publication Number Publication Date
JPH03113564A true JPH03113564A (en) 1991-05-14
JPH07111708B2 JPH07111708B2 (en) 1995-11-29

Family

ID=17220165

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25126289A Expired - Lifetime JPH07111708B2 (en) 1989-09-27 1989-09-27 Job parallel execution unit

Country Status (1)

Country Link
JP (1) JPH07111708B2 (en)

Also Published As

Publication number Publication date
JPH07111708B2 (en) 1995-11-29

Similar Documents

Publication Publication Date Title
JP2882475B2 (en) Thread execution method
US5642508A (en) Distributed control method and apparatus for job execution
EP0326671A2 (en) A computer system and a method of monitoring transient data structures of a computer system
EP0330836A3 (en) Method for multiprocessor system having self-allocating processors
JPH05204675A (en) Scheduling system
JPS61177566A (en) Execution of application service program written in high level program language by multiplex processor/data processing system
JPH031698B2 (en)
JPH0628323A (en) Process execution control method
JPH07160656A (en) External interruption control method
KR20050057834A (en) Method for mass data processing through scheduler in multi processor system
JPH03113564A (en) Job parallel executing device
Bianco et al. Preemptive scheduling of multiprocessor tasks on the dedicated processor system subject to minimal lateness
JPH02210542A (en) Execution control system for virtual computer system
JPH05204875A (en) Scheduling system for thread
JPS5819973A (en) Multiprocessor computer of time division bus system
JPH11306149A (en) Parallel arithmetic processor and method therefor
JPH0973435A (en) Test system for closely coupled multiprocessor system
JPH11249917A (en) Parallel computers, their batch processing method, and storage medium
KR940002148B1 (en) Job-scheduling method by using semaphore conception
KR100241356B1 (en) Multilevel scheduling structure for dynamic synchronization in distributed system
JPH09265405A (en) Exclusive access method for shared resource
JPH01259430A (en) Subtracting method for interval timer value
JPH02244371A (en) Exclusive control method for multiprocessor system
JPH04238539A (en) Operating system for program
JPH0296833A (en) Different type job control system