JPH03185518A - Parallel execution system for output instruction sentence - Google Patents

Parallel execution system for output instruction sentence

Info

Publication number
JPH03185518A
JPH03185518A JP32403489A JP32403489A JPH03185518A JP H03185518 A JPH03185518 A JP H03185518A JP 32403489 A JP32403489 A JP 32403489A JP 32403489 A JP32403489 A JP 32403489A JP H03185518 A JPH03185518 A JP H03185518A
Authority
JP
Japan
Prior art keywords
output
parallel
order
file
execution
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
JP32403489A
Other languages
Japanese (ja)
Inventor
Haruhiro Yamamoto
晴弘 山本
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 JP32403489A priority Critical patent/JPH03185518A/en
Publication of JPH03185518A publication Critical patent/JPH03185518A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To execute a program at high speed by providing a computer system with an intermediate file allocating means, an execution order storing means, a paired intermediate file parallel output means, and a paired output file output means. CONSTITUTION:The intermediate file allocating means 13 respectively allocates corresponding intermediate files 42 to respective tasks. Each intermediate file 42 has an area 44 for storing output information and an execution order storing area 45 for storing a number indicating the order for outputting the output information. The paired intermediate file parallel output means 15 outputs the output information obtained from respective tasks in parallel to the allocated intermediate files. The output order is the executed order, i.e. the order of task 2, task 1 and task 3. The paired output file output means 17 extracts the execution order stored in the area 45 formed on the head of the output information area 44 and outputs the output information to an output file 43 in accordance with the execution order. Even when programs are executed in parallel, the executed results can be outputted at high speed in the correct order.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は実行するプログラムを互いに異なるタスクに分
割して並列実行する機能を有する計算機システムにおい
て、出力命令文を含むプログラムを互いに異なるタスク
に分割して並列実行する方式に関する。
Detailed Description of the Invention (Industrial Application Field) The present invention is a computer system having a function of dividing a program to be executed into different tasks and executing them in parallel. and parallel execution methods.

(従来の技術) 実行するプログラムを互いに異なるタスクに分割して並
列実行する機能を有する計算機システムにおいて、出力
命令文を含むプログラムを互いに穴なるタスクに分割し
て並列実行する場合、互いに穴なるタスクから1つの出
力ファイルへ出力情報を出力する方法がある。この方法
では出力時に排他同期制御によるオーバヘッドが生ずる
という問題があった。そこでこの問題点を解決するため
に、互いに異なるタスクからの出力情報にそれぞれ時刻
情報を添えて各タスクに対応する中間ファイルへ出力し
、後に時刻情報順に出力情報を並べ換えて出力ファイル
へ出力する。という方法が考えられた。
(Prior Art) In a computer system that has a function of dividing a program to be executed into different tasks and executing them in parallel, when a program including an output instruction statement is divided into tasks that are mutually exclusive and executed in parallel, tasks that are mutually identical There is a method to output output information from to one output file. This method has the problem of generating overhead due to exclusive synchronization control during output. In order to solve this problem, output information from different tasks is appended with time information and output to an intermediate file corresponding to each task, and later the output information is rearranged in the order of time information and output to the output file. A method was devised.

(発明が解決しようとする課題) 従来の方法では、出力命令の実行順を各タスクから出力
された時刻情報として記録するため、中間ファイルへ出
力する順と出力ファイルへ出力すべき順とが一致してい
ない場合には正しい順序で結果が11Jられないという
問題点がある。
(Problem to be Solved by the Invention) In the conventional method, the order in which output instructions are executed is recorded as time information output from each task, so the order in which they are output to an intermediate file and the order in which they should be output to an output file are not consistent. If they do not match, there is a problem that the results will not be displayed in the correct order.

例えば、出力命令文を含むDoループをDOループによ
る繰り返し毎に異なるタスクに分割して並列大行する場
合、各々のタスク中の出力命令文が実行される時刻は、
必ずしも出力ファイルへ出力すべき順になるとは限らな
かった。このため。
For example, when a Do loop containing output statements is divided into different tasks for each iteration of the DO loop and executed in parallel, the times at which the output statements in each task are executed are:
The order in which they should be output to the output file was not necessarily the same. For this reason.

プログラムの並列実行を行うと逐次実行した場合の結果
と異なる恐れがある。
When a program is executed in parallel, the results may differ from those when executed serially.

本発明は、複数のタスクからそれぞれ出力される出力情
報を正しい順序で外部出力することができ、プログラム
実行速度の向上を計れる出力命令文並列実行方式を提供
することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide an output statement parallel execution method that can output output information from a plurality of tasks to the outside in the correct order and can improve program execution speed.

(課題を解決するための手段) 本発明によれば、実行するプログラムを複数のタスクに
分割して並列実行する機能を有する計算機システムに適
用される出力命令文並列実行方式において、前記複数の
タスクにそれぞれ対応する実行順格納領域を有する中間
ファイルを割り当てる中間ファイル割当手段と、前記実
行順格納領域に出力命令文の実行順を示す番号を与える
実行順指示手段と、前記複数のタスクの出力命令文実行
結果である出力情報を前記中間ファイルへ並列出力する
対中間ファイル並列出力手段と、前記実行順格納領域に
格納された順番にしたがって前記中間ファイルから外部
出力を行うための出力ファイルへ前記出力情報を出力す
る対出力ファイル出力手段とを有することを特徴とする
出力命令文並列実行方式が得られる。
(Means for Solving the Problems) According to the present invention, in an output statement parallel execution method applied to a computer system having a function of dividing a program to be executed into a plurality of tasks and executing them in parallel, intermediate file allocation means for allocating an intermediate file having an execution order storage area corresponding to each of the plurality of tasks; execution order instructing means for giving a number indicating the execution order of the output instruction statements to the execution order storage area; and output instructions for the plurality of tasks. intermediate file parallel output means for outputting output information as a statement execution result in parallel to the intermediate file; and output to an output file for externally outputting from the intermediate file according to the order stored in the execution order storage area. An output statement parallel execution method is obtained, which is characterized by having a pair of output file output means for outputting information.

(実施例) 以下に1本発明の一実施例について9図面を参照して説
明する。以降では、一つの実行可能プログラムを異なる
タスクに分割することを“マルチタスク化する°と呼ぶ
(Example) An example of the present invention will be described below with reference to nine drawings. Hereinafter, dividing one executable program into different tasks will be referred to as "multitasking."

第1図に示すように1本実施例では、実行可能なプログ
ラムをマルチタスク化して並列実行する機能をHする計
算機システム11において、対中間ファイル出力判定手
段12.中間ファイル割り当て手段13.実行順格納手
段14.対中間ファイル並列出力手段15.対出カフア
イル出力判定手段16.および対出力ファイル出力手段
17を備えている。
As shown in FIG. 1, in this embodiment, in a computer system 11 that has a function of multitasking executable programs and executing them in parallel, intermediate file output determination means 12. Intermediate file allocation means 13. Execution order storage means 14. Intermediate file parallel output means 15. Output cuff output determination means 16. and a pair of output file output means 17.

第2図に、並列実行することが有効な原始プログラムの
一例を示す。このプログラムは、DOループを含んでお
り、DOループによる繰り返し毎に異なるタスクに分割
して並列実行することができる。この場合、DOループ
の中にはWRITE文以外にタスク間で実行順を問題と
する関係はないものとする。
FIG. 2 shows an example of a source program that can be effectively executed in parallel. This program includes a DO loop, and can be divided into different tasks and executed in parallel for each repetition of the DO loop. In this case, it is assumed that there is no relationship in the DO loop other than the WRITE statement that makes the execution order an issue between tasks.

第3図は、第2図の原始プログラムを翻訳し。Figure 3 shows the translation of the source program shown in Figure 2.

得られたコンパイルユニットを結合して得られた実行可
能プログラムを3つの異なるタスクに分割して並列実行
する状況を示す。
A situation is shown in which an executable program obtained by combining the obtained compilation units is divided into three different tasks and executed in parallel.

TS3図に示すように、各タスク内での実行時間に差が
生じ、WRITE文の実行順が出力すべき順番とは異な
っている。つまり、タスク1.タスク2.タスク3の順
に実行されるべきWRITE文が、並列実行した場合に
は、タスク2.タスク1、タスク3の順になっている。
As shown in Figure TS3, there is a difference in execution time within each task, and the execution order of the WRITE statements is different from the order in which they should be output. In other words, task 1. Task 2. If the WRITE statements that should be executed in the order of task 3 are executed in parallel, tasks 2. The order is task 1, task 3.

第4図に、このように実行順が、出力すべき順と異なっ
ていても、正しい順序で出力するようにした本実施例の
動作概略図を示す。
FIG. 4 shows a schematic diagram of the operation of this embodiment in which output is performed in the correct order even if the execution order is different from the order in which the output should be performed.

以下1本実施例の動作を第1図、第4図及び第5図を参
照して説明する。
The operation of this embodiment will be explained below with reference to FIGS. 1, 4, and 5.

実行可能プログラム(第2図のプログラム)41を並列
実行するとき、対中間ファイル出力判定手段12は、ス
テップS1においてプログラム中に、外部出力時に出力
順が問題となるようなWRITE文が存在するか否かを
判定する。第4図の実行可能プログラム41は、DOル
ープをDOループによる繰り返し毎に異なるタスクに分
割して実行されるもので、DOループ内に WRITE
文を含むのでその出力順が問題となる。
When the executable program (the program shown in FIG. 2) 41 is executed in parallel, the intermediate file output determining means 12 determines in step S1 whether there is a WRITE statement in the program that causes problems in the output order when outputting to an external device. Determine whether or not. The executable program 41 in FIG. 4 is executed by dividing the DO loop into different tasks each time the DO loop repeats.
Since it contains sentences, the output order is a problem.

タスクの実行時、当該WRITE文に対応する部分に至
ると、ステップS2において中間ファイル割り当て手段
13は、各タスクに対応する中間ファイル42をそれぞ
れ割り当てる。この中間ファイル42には、出力情報を
格納する領域44と。
When executing a task, when a portion corresponding to the WRITE statement is reached, the intermediate file allocation means 13 allocates the intermediate file 42 corresponding to each task in step S2. This intermediate file 42 includes an area 44 for storing output information.

この出力情報を出力すべき順番を示す番号を格納する実
行順格納領域45とを有している。
It has an execution order storage area 45 that stores a number indicating the order in which this output information should be output.

実行順格納手段14は、ステップS3で実行順格納領域
45へWRITE文の実行順を示す番号を格納する。
The execution order storage means 14 stores a number indicating the execution order of the WRITE statement in the execution order storage area 45 in step S3.

χ・I中間ファイル皿列出力手段15は、ステップS4
で割り当てられた中間ファイルへ各タスクからの出力情
報を並列出力する。この時の出力順は実行された順であ
り1本実施例では、タスク2゜タスク1.タスク3の順
番である。
The χ·I intermediate file plate array output means 15 performs step S4.
The output information from each task is output in parallel to the intermediate file allocated in . The output order at this time is the order in which they were executed, and in this embodiment, task 2, task 1. It is the order of task 3.

χ1出カフアイル出力文iす定手段16は、ステップS
5で当該DOループの実行即ち、各タスクにおける実行
が全て終了したか否かを判定する。実行が終了した場合
、対出力ファイル出力手段18は、ステップS6で出力
情報44の先頭に設けられた実行順格納領域45へ格納
されていた実行順を取り出し、ステップS7でこれらの
実行順に従って出力ファイル43へ出力情報44を出力
する。
The means 16 for determining the χ1 output file output statement i is performed in step S.
In step 5, it is determined whether the execution of the DO loop, that is, the execution of each task has been completed. When the execution is completed, the output file output unit 18 retrieves the execution order stored in the execution order storage area 45 provided at the beginning of the output information 44 in step S6, and outputs the execution order according to these execution orders in step S7. Output information 44 is output to file 43.

このようにしてプログラムを実行する際に並列実行を行
なっても正しい順序で出力を得ることができる。
In this way, even if the program is executed in parallel, output can be obtained in the correct order.

(発明の効果) 以上で説明してきたように、この方式では、実行可能プ
ログラムをマルチタスク化して並列実行する機能を有す
る計算機システムに適用される出力命令文並列実行方式
において、中間ファイル割当手段と実行順格納手段と、
対中間ファイル並列出力手段と、対出力ファイル出力手
段とを有することで出力時に出力順が問題となるような
出力文の実行を異なるタスクに分割して並列実行させた
場合でも正しい順序で結果が得られ、プログラムの実行
を高速化することができる。
(Effects of the Invention) As explained above, in this method, in the output instruction statement parallel execution method applied to a computer system having the function of multitasking an executable program and executing it in parallel, the intermediate file allocation means and Execution order storage means;
By having a parallel output means for intermediate files and a means for outputting output files, it is possible to ensure that the results are in the correct order even when the execution of an output statement whose output order is a problem during output is divided into different tasks and executed in parallel. This can speed up program execution.

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

第1図は本発明の出力命令文並列実行方式の一実施例を
採用した計算機システムのブロック図。 第2図は第1図の計算システムに並列実行させることが
仔効な原始プログラム、第3図はマルチタスク化したプ
ログラムの実行状況を説明するための図、第4図は第1
図の計算システムでの第2図のプログラムを実行した場
合の動作を説明するための図、第5図は第1図の計算シ
ステムの並列実行動作を示すフローチャート。 11・・・計算機システム、12・・・対中間ファイル
出力i++定手段、13・・・中間ファイル割り当て手
段。 14・・・実行順格納手段、15・・・対中間ファイル
並列出力手段、16・・・対出力ファイル出力判定手段
。 17・・・中間ファイル入力手段、18・・・対出力フ
ァイル出力手段、41・・・実行可能プログラム、42
・・・中間ファイル、43・・・出力ファイル、44・
・・出力情報、45・・・実行順格納領域。 第 図 1 第2図 第3■ タスク1 タスク2 タスク3 第4 図 1 実行可能プログラム 2 中間ファイル 3 出力ファイル
FIG. 1 is a block diagram of a computer system that employs an embodiment of the output statement parallel execution method of the present invention. Figure 2 is a primitive program that can be effectively executed in parallel by the calculation system in Figure 1, Figure 3 is a diagram for explaining the execution status of a multitasking program, and Figure 4 is a diagram for explaining the execution status of a multitasking program.
A diagram for explaining the operation when the program of FIG. 2 is executed in the calculation system shown in the figure, and FIG. 5 is a flowchart showing the parallel execution operation of the calculation system of FIG. 11... Computer system, 12... Intermediate file output i++ constant means, 13... Intermediate file allocation means. 14... Execution order storage means, 15... Intermediate file parallel output means, 16... Output file output determination means. 17... Intermediate file input means, 18... Output file output means, 41... Executable program, 42
...Intermediate file, 43...Output file, 44.
...Output information, 45...Execution order storage area. Figure 1 Figure 2 Figure 3 Task 1 Task 2 Task 3 Figure 1 Executable program 2 Intermediate file 3 Output file

Claims (1)

【特許請求の範囲】[Claims] 1、実行するプログラムを複数のタスクに分割して並列
実行する機能を有する計算機システムに適用される出力
命令文並列実行方式において、前記複数のタスクにそれ
ぞれ対応する実行順格納領域を有する中間ファイルを割
り当てる中間ファイル割当手段と、前記実行順格納領域
に出力命令文の実行順を示す番号を与える実行順格納手
段と、前記複数のタスクの出力命令文実行結果である出
力情報を前記中間ファイルへ並列出力する対中間ファイ
ル並列出力手段と、前記実行順格納領域に格納された順
番にしたがって前記中間ファイルから外部出力を行うた
めの出力ファイルへ前記出力情報を出力する対出力ファ
イル出力手段とを有することを特徴とする出力命令文並
列実行方式。
1. In an output statement parallel execution method applied to a computer system having a function of dividing a program to be executed into a plurality of tasks and executing them in parallel, an intermediate file having an execution order storage area corresponding to each of the plurality of tasks is used. intermediate file allocation means for allocating; execution order storage means for assigning a number indicating the execution order of output command statements to the execution order storage area; The intermediate file parallel output means for outputting, and the output file output means for outputting the output information from the intermediate file to an output file for external output in accordance with the order stored in the execution order storage area. A method for parallel execution of output statement statements.
JP32403489A 1989-12-15 1989-12-15 Parallel execution system for output instruction sentence Pending JPH03185518A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32403489A JPH03185518A (en) 1989-12-15 1989-12-15 Parallel execution system for output instruction sentence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32403489A JPH03185518A (en) 1989-12-15 1989-12-15 Parallel execution system for output instruction sentence

Publications (1)

Publication Number Publication Date
JPH03185518A true JPH03185518A (en) 1991-08-13

Family

ID=18161417

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32403489A Pending JPH03185518A (en) 1989-12-15 1989-12-15 Parallel execution system for output instruction sentence

Country Status (1)

Country Link
JP (1) JPH03185518A (en)

Similar Documents

Publication Publication Date Title
Campbell et al. The specification of process synchronization by path expressions
JPS5948424B2 (en) parallel computing system
JPH0397059A (en) Method of synchronizing parallel processors
JPH0380337A (en) Parallel form producing device
KR102062208B1 (en) Apparatus and Method for translating multithreaded program code
US20200201600A1 (en) Overflow condition
US6256782B1 (en) Compile apparatus, compile method and computer-readable medium storing compiler
JPH03185518A (en) Parallel execution system for output instruction sentence
JPH02197954A (en) Parallel execution regenerating system
JPS5819973A (en) Multiprocessor computer of time division bus system
JP3239963B2 (en) Multi-processor computer system
Smith Parallel Computing in C/C++
SU942024A1 (en) Sub-program control device
SU732872A1 (en) Address former
JPS63316235A (en) System for allotting arithmetic register in loop construction
JPH05127945A (en) Program execution situation analysis system
JPH0769831B2 (en) Register allocation method in compiler
JPH03186777A (en) Lsi tester
JPH0264766A (en) Vectorizing processing system
JP2001184320A (en) Distributed executing device and recording medium
JPH0373026A (en) Compile system
JPS6373434A (en) Program production system for debugging of data flow type computer
JPH0239242A (en) Temporary work area allocation system for electronic computer system
JPH02110636A (en) Debugging device for tag architecture machine and its compiler
JPH01263574A (en) Apparatus for automatically forming test pattern program