JP2011197896A - Computer system and task management method - Google Patents

Computer system and task management method Download PDF

Info

Publication number
JP2011197896A
JP2011197896A JP2010062647A JP2010062647A JP2011197896A JP 2011197896 A JP2011197896 A JP 2011197896A JP 2010062647 A JP2010062647 A JP 2010062647A JP 2010062647 A JP2010062647 A JP 2010062647A JP 2011197896 A JP2011197896 A JP 2011197896A
Authority
JP
Japan
Prior art keywords
task
job
node
swap
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
JP2010062647A
Other languages
Japanese (ja)
Inventor
Akihiro Ito
昭博 伊藤
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 JP2010062647A priority Critical patent/JP2011197896A/en
Publication of JP2011197896A publication Critical patent/JP2011197896A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a method for efficiently moving a task composing a parallel calculation job between computers.SOLUTION: A computer system includes a plurality of computers connected via a network and is configured such that each computer executes a plurality of tasks composing a job in accordance with scheduling. When moving a task between the computers, execution states of the tasks are referred to and a task processing of which has ended is preferentially selected as a task to be moved.

Description

本発明は、複数の計算機によって並列分散処理を行う計算機システムに関し、特に、並列計算ジョブを構成するタスクを実行中の計算機から別の計算機に移動する技術に関する。   The present invention relates to a computer system that performs parallel and distributed processing using a plurality of computers, and more particularly to a technique for moving a task constituting a parallel calculation job from a computer that is executing to another computer.

一般に、大規模計算を行う場合、複数の計算機で並列計算を行うことによって、計算機システムの処理性能を向上させている。このような並列計算機システムでは、計算機の負荷に偏りが発生する場合がある。このため、計算機の負荷を平準化する技術として、ある計算機上で動作しているプロセスを他の計算機に移動させるプロセスマイグレーション技術が知られている。   Generally, when performing a large-scale calculation, the processing performance of a computer system is improved by performing parallel calculation with a plurality of computers. In such a parallel computer system, the load on the computer may be biased. For this reason, as a technique for leveling the load on a computer, a process migration technique for moving a process operating on a certain computer to another computer is known.

例えば、特許文献1には、転送元プロセスのコピーを転送先計算機に作成し、その間に転送元プロセスの実行を継続し、転送元プロセスの実行記録を転送元計算機上に作成する。第1の転送処理が終了した後、転送先計算機に実行記録を転送するが、この第2の転送処理中にも転送元プロセスの実行を継続し、その実行記録を転送元計算機に作成する。このように実行記録の転送を繰り返し、転送予想時間が所定の長さ以下になった時点で、プロセスの実行を、転送元プロセスから転送先プロセスへ移行する。これによって、プロセスの停止時間を少なくしてプロセスを移動することができる。   For example, in Patent Document 1, a copy of a transfer source process is created in a transfer destination computer, during which the execution of the transfer source process is continued, and an execution record of the transfer source process is created on the transfer source computer. After the completion of the first transfer process, the execution record is transferred to the transfer destination computer. The execution of the transfer source process is continued during the second transfer process, and the execution record is created in the transfer source computer. As described above, the transfer of the execution record is repeated, and when the estimated transfer time becomes equal to or shorter than the predetermined length, the process execution is shifted from the transfer source process to the transfer destination process. As a result, the process can be moved with a reduced process stop time.

また、特許文献2には、移動体端末が通信中の基地局の近くの計算機サーバからサービスを受けることによって、計算機サーバからのレスポンスを向上し、及び計算機リソースを節減するための技術である。特許文献2に記載された発明では、移動体端末の移動先を予測し、予測された移動先の計算機に予めプロセスのアドレス空間のデータを移動しておき、予測された移動先に移動体端末が移動することが明らかになった場合に、プロセスの実行を移行する。   Patent Document 2 discloses a technique for improving response from a computer server and saving computer resources by receiving a service from a computer server near a base station with which a mobile terminal is communicating. In the invention described in Patent Document 2, the destination of the mobile terminal is predicted, data in the process address space is moved in advance to the predicted destination computer, and the mobile terminal is moved to the predicted destination. If it becomes clear that moves, transition the execution of the process.

特開2004―78465号公報JP 2004-78465 A 特開2004−88200号公報JP 2004-88200 A

大規模計算は時間がかかるためジョブの実行時間を短くすることが重要であり、このためにネットワークやCPUといった計算機資源の利用効率を向上する必要がある。特許文献1に記載された技術によると、未転送の差分データを繰り返し更新するため、計算機間で送受信されるデータは転送対象プロセスによって管理されるデータ量を超え、ネットワーク負荷が増える。また、複数回データを転送するため、転送処理のオーバーヘッドが増える。これら理由によって、プロセスを移動するためのネットワーク、CPU等の計算機資源を多く必要とし、結果的にジョブ実行時間が長くなるという課題がある。   Since large-scale computation takes time, it is important to shorten the job execution time. For this reason, it is necessary to improve the utilization efficiency of computer resources such as a network and a CPU. According to the technique described in Patent Document 1, since untransferred differential data is repeatedly updated, the data transmitted and received between computers exceeds the amount of data managed by the transfer target process, and the network load increases. In addition, since data is transferred a plurality of times, the overhead of the transfer process increases. For these reasons, there is a problem that a large amount of computer resources such as a network and a CPU for moving processes are required, resulting in a long job execution time.

特許文献2に記載された技術は、移動体端末に対するサービスに特化したプロセス移動を最適化するものであり、複数の計算機を使用して大規模計算する用途に適用することができない。   The technique described in Patent Document 2 optimizes process movement specialized for services to mobile terminals, and cannot be applied to large-scale calculations using a plurality of computers.

本発明は、並列計算ジョブを構成するタスクを、計算機間で効率的に移動する方法を提供することを目的とする。   It is an object of the present invention to provide a method for efficiently moving tasks constituting a parallel calculation job between computers.

本発明の代表的な一例を示せば以下の通りである。すなわち、ネットワークによって接続された複数の計算機を備え、前記各計算機はジョブを構成する複数のタスクをスケジューリングに従って実行する計算機システムであって、前記計算機間でタスクを移動する場合、前記タスクの実行状態を参照して、処理が終了したタスクを優先的に移動すべきタスクに選択することを特徴とする。   A typical example of the present invention is as follows. That is, a computer system including a plurality of computers connected by a network, each computer executing a plurality of tasks constituting a job according to scheduling, and when a task is moved between the computers, the execution state of the task Referring to FIG. 4, the task that has been processed is selected as a task to be moved preferentially.

本発明によると、タスクの移動処理中におけるシステムのCPU利用率の低下を抑制することが可能となる。これによって、タスクの移動処理のオーバーヘッドを抑えることができる。   According to the present invention, it is possible to suppress a decrease in the CPU utilization rate of the system during task movement processing. As a result, the overhead of task movement processing can be suppressed.

本発明の実施形態の計算機システムの構成図である。It is a block diagram of the computer system of embodiment of this invention. 本発明の実施形態の計算機のハードウェア構成図である。It is a hardware block diagram of the computer of embodiment of this invention. 本発明の実施形態のジョブ管理プロセスの内部構成図である。It is an internal block diagram of the job management process of the embodiment of the present invention. 本発明の実施形態のノード内ジョブ管理プロセスの内部構成図である。It is an internal block diagram of the intra-node job management process of the embodiment of the present invention. 本発明の実施形態のジョブ実行プロセスの内部構成図である。It is an internal block diagram of the job execution process of embodiment of this invention. 本発明の実施の形態のジョブ管理プロセス内のスレーブ管理テーブルの構成図である。It is a block diagram of the slave management table in the job management process of the embodiment of this invention. 本発明の実施の形態のジョブ管理プロセス内のジョブ管理テーブルの構成図である。It is a block diagram of the job management table in the job management process of the embodiment of this invention. 本発明の実施の形態のジョブ管理プロセス内のタスク管理テーブルの構成図である。It is a block diagram of the task management table in the job management process of embodiment of this invention. 本発明の実施の形態のジョブ管理プロセス内の移動中タスク管理テーブルの構成図である。FIG. 6 is a configuration diagram of a moving task management table in the job management process according to the embodiment of this invention. 本発明の実施形態のノード内ジョブ管理プロセスの内部テーブルの構成図である。It is a block diagram of the internal table of the job management process in a node of embodiment of this invention. 本発明の実施形態のノード内ジョブ管理プロセスの内部テーブルの構成図である。It is a block diagram of the internal table of the job management process in a node of embodiment of this invention. 本発明の実施形態のノード内ジョブ管理プロセスの内部テーブルの構成図である。It is a block diagram of the internal table of the job management process in a node of embodiment of this invention. 本発明の実施形態のジョブ実行プロセスの内部テーブルの構成図である。It is a block diagram of the internal table of the job execution process of embodiment of this invention. 本発明の実施形態のジョブ実行プロセスの内部テーブルの構成図である。It is a block diagram of the internal table of the job execution process of embodiment of this invention. 本発明の実施形態のタスクの状態遷移図である。It is a task state transition diagram of an embodiment of the present invention. 本発明の実施形態のタスクを実行する際のプロセス間通信を示すシーケンス図である。It is a sequence diagram which shows the interprocess communication at the time of performing the task of embodiment of this invention. 本発明の実施形態のタスクのスケジューリング方法を示すフローチャートである。It is a flowchart which shows the scheduling method of the task of embodiment of this invention. 本発明の実施形態のタスクのスワップアウト方法を示すフローチャートである。It is a flowchart which shows the swap-out method of the task of embodiment of this invention. 本発明の実施形態の移動対象タスクの選択方法を示すフローチャートである。It is a flowchart which shows the selection method of the movement object task of embodiment of this invention. 本発明の実施形態のタスクの移動方法を示すフローチャートである。It is a flowchart which shows the movement method of the task of embodiment of this invention.

以下に、図面を参照して、本発明の実施形態について説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は、本発明の実施形態の複数のノード(計算機)を用いて並列計算ジョブを実行する計算機システムの例を示す構成図である。   FIG. 1 is a configuration diagram illustrating an example of a computer system that executes a parallel calculation job using a plurality of nodes (computers) according to the embodiment of this invention.

本実施の形態の計算機システムは、クライアントノード10、マスタノード20及びスレーブノード30を備える。クライアントノード10は、ジョブの実行を指示する計算機である。マスタノード20は、ジョブの実行を管理する計算機である。スレーブノード30は、ジョブ本体を実行する計算機である。本計算機システムは、1台のマスタノード20と、必要な数のスレーブノード30とを備える。スレーブノード30の数を増やすことによって、計算機システムの計算能力を高めることができる。   The computer system of this embodiment includes a client node 10, a master node 20, and a slave node 30. The client node 10 is a computer that instructs execution of a job. The master node 20 is a computer that manages job execution. The slave node 30 is a computer that executes the job body. This computer system includes one master node 20 and a required number of slave nodes 30. By increasing the number of slave nodes 30, the computing capacity of the computer system can be increased.

この計算機システムは、複数のタスクから構成される並列計算ジョブを実行するシステムである。クライアントノード10が、ジョブの実行をマスタノード20に指示すると、マスタノード20は、ジョブを構成する各タスクをスレーブノード30に割り当て、スレーブノード30が割り当てられたタスクを実行することによって、ジョブが実行される。   This computer system is a system for executing a parallel calculation job composed of a plurality of tasks. When the client node 10 instructs the master node 20 to execute a job, the master node 20 assigns each task constituting the job to the slave node 30 and executes the task to which the slave node 30 is assigned. Executed.

クライアントノード10は、ジョブの実行を指示するクライアントプロセスP1を実行する。マスタノード20は、ジョブ全体の実行を制御するジョブ管理プロセスP2と、分散ファイルシステム(FS)プロセスP5とを実行する。スレーブノード30は、ノード内で動作するジョブの実行を制御するノード内ジョブ管理プロセスP3と、ジョブを実行するジョブ実行プロセスP4と、分散FSプロセスP5を実行する。   The client node 10 executes a client process P1 that instructs execution of a job. The master node 20 executes a job management process P2 that controls the execution of the entire job and a distributed file system (FS) process P5. The slave node 30 executes an in-node job management process P3 that controls execution of jobs that operate in the node, a job execution process P4 that executes jobs, and a distributed FS process P5.

ジョブ実行プロセスP4は、クライアントプロセスP1がジョブの実行を指示すると、動的に作成される。同一ノードにおいて、ジョブ毎にジョブ実行プロセスP4のインスタンスが作成される。従って、一つのノードが複数のジョブを同時に実行する場合、ノードに複数個のジョブ実行プロセスが生成される。ジョブの処理が終了した後、ジョブ実行プロセスP4は消滅する。   The job execution process P4 is dynamically created when the client process P1 instructs execution of a job. In the same node, an instance of the job execution process P4 is created for each job. Therefore, when one node executes a plurality of jobs simultaneously, a plurality of job execution processes are generated in the node. After the job processing is completed, the job execution process P4 disappears.

分散FSは、ファイルの本体を複数のノードに分散配置し、どのノードからもすべてのファイルへ同一のパス名によるアクセスを可能にするファイルシステムである。ファイルサイズが大きい場合、一つのファイルが複数のノードに分割して配置される。分散FSプロセスP5は、分散FSを実現するためのプロセスであり、各プロセスは分散FSプロセスを経由して、分散FS上のファイルにアクセスすることができる。以下、分散FSプロセスを経由して分散FSにアクセスすることを、単に、分散FSにアクセスする、分散FSからファイルを読み出す、等で表現する。   The distributed FS is a file system in which the main body of a file is distributed to a plurality of nodes, and all the files can be accessed from any node using the same path name. When the file size is large, one file is divided into a plurality of nodes. The distributed FS process P5 is a process for realizing the distributed FS, and each process can access a file on the distributed FS via the distributed FS process. Hereinafter, accessing the distributed FS via the distributed FS process is simply expressed as accessing the distributed FS, reading a file from the distributed FS, or the like.

図2は、本発明の実施の形態の各ノード(計算機)のハードウェアの構成図である。   FIG. 2 is a hardware configuration diagram of each node (computer) according to the embodiment of this invention.

図2に示すように、各ノードは、プロセッサ(CPU)101、ネットワークインターフェース(LAN I/F)102、入出力インターフェース103、メモリ104及びストレージインターフェース105を備え、これらの各部はノードの内部で接続されている。   As shown in FIG. 2, each node includes a processor (CPU) 101, a network interface (LAN I / F) 102, an input / output interface 103, a memory 104, and a storage interface 105. These units are connected inside the node. Has been.

プロセッサ101は、メモリに格納されたプログラムを実行する。入出力インターフェース103には、キーボード106、マウス107及びディスプレイ108が接続される。システムの利用者は、これらの入出力インターフェース103に接続された装置を使用してジョブの実行を指示する。ストレージインターフェース105には、ハードディスクドライブ等の記憶装置109が接続されている、記憶装置109は、オペレーティングシステム、各ノードで動作するプロセスのプログラム、及び並列計算によって解析されるデータが格納される。   The processor 101 executes a program stored in the memory. A keyboard 106, a mouse 107 and a display 108 are connected to the input / output interface 103. A user of the system instructs execution of a job using a device connected to these input / output interfaces 103. A storage device 109 such as a hard disk drive is connected to the storage interface 105. The storage device 109 stores an operating system, a process program operating on each node, and data analyzed by parallel calculation.

システム起動時に、記憶装置109からプログラムがメモリ104に格納され、CPU101がメモリ104に格納されたプログラムを実行する。なお、マスタノード20とスレーブノード30は、ユーザが直接入出力操作を行わないため、キーボード106、マウス107、ディスプレイ108を備えなくてもよい。   When the system is activated, a program is stored in the memory 104 from the storage device 109, and the CPU 101 executes the program stored in the memory 104. Note that the master node 20 and the slave node 30 do not need to include the keyboard 106, the mouse 107, and the display 108 because the user does not directly perform input / output operations.

図3A〜図3Cは、本発明の実施の形態の各ノードで実行されるプロセスの内部構成を示す図である。   3A to 3C are diagrams showing an internal configuration of a process executed in each node according to the embodiment of this invention.

図3Aに示すジョブ管理プロセスP2は、ジョブ制御プログラムP21、スレーブ管理テーブルP22、ジョブ管理テーブルP23、タスク管理テーブルP24及び移動中タスク管理テーブルP25を含む。例えば、ジョブ管理プロセスP2は、記憶装置109に格納されており、メモリ104に読み出され、CPU1010により実行される。   The job management process P2 shown in FIG. 3A includes a job control program P21, a slave management table P22, a job management table P23, a task management table P24, and a moving task management table P25. For example, the job management process P2 is stored in the storage device 109, read into the memory 104, and executed by the CPU 1010.

ジョブ制御プログラムP21は、ジョブを制御するサブプログラムである。従って、ジョブ制御プログラムP21はメモリに格納されており、プロセッサ101によりメモリより読み出されて実行される。スレーブ管理テーブルP22は、システム内のスレーブノード30の情報を管理するための情報を保持する(図4A参照)。ジョブ管理テーブルP23は、実行中のジョブを管理するための情報を保持する(図4B参照)。タスク管理テーブルP24は、実行中ジョブのタスクを管理するための情報を保持する(図4C参照)。移動中タスク管理テーブルP25は、移動中のタスクを管理するための情報を保持する(図4D参照)。   The job control program P21 is a subprogram that controls jobs. Accordingly, the job control program P21 is stored in the memory, and is read from the memory by the processor 101 and executed. The slave management table P22 holds information for managing information of the slave nodes 30 in the system (see FIG. 4A). The job management table P23 holds information for managing the job being executed (see FIG. 4B). The task management table P24 holds information for managing the task of the job being executed (see FIG. 4C). The moving task management table P25 holds information for managing the moving task (see FIG. 4D).

図4A〜図4Dは、本発明の実施の形態のジョブ管理プロセスP2に含まれるテーブルの構成図である。   4A to 4D are configuration diagrams of tables included in the job management process P2 according to the embodiment of this invention.

図4Aに示すスレーブ管理テーブルP22は、スレーブID、ノードアドレス、最大タスク数、最大メモリ量、及びタスクID一覧を含み、システム内の全てのスレーブノードの情報を格納する。スレーブ管理テーブルP2の各エントリは各スレーブノードに対応する。   The slave management table P22 illustrated in FIG. 4A includes a slave ID, a node address, a maximum number of tasks, a maximum memory amount, and a task ID list, and stores information on all slave nodes in the system. Each entry in the slave management table P2 corresponds to each slave node.

スレーブIDは、スレーブノード30を一意に識別するための識別子である。ノードアドレスは、スレーブノード30のネットワーク上のアドレスである。最大タスク数は、そのスレーブノードで同時に実行可能なタスクの数である。最大メモリ量は、そのスレーブノードでタスクが利用可能なメモリ量であり、例えば、単位はMB(メガバイト)で表される。タスクID一覧は、そのスレーブノードで実行中のタスクの識別子である。   The slave ID is an identifier for uniquely identifying the slave node 30. The node address is an address on the network of the slave node 30. The maximum number of tasks is the number of tasks that can be executed simultaneously on the slave node. The maximum amount of memory is the amount of memory that can be used by a task in the slave node. For example, the unit is expressed in MB (megabyte). The task ID list is an identifier of a task being executed on the slave node.

タスクID一覧は、例えば、ジョブの識別子(ジョブID)とタスク番号とを組み合わせたものが記載される。具体的には、図4Aに示すように、最初のエントリ(スレーブID=01)のタスクID一覧の「J01:1,J01:2」は、ジョブIDが「J01」でタスク番号が「1」のタスクと、ジョブIDが「J01」でタスク番号が「2」のタスクが実行中であることを示す。   In the task ID list, for example, a combination of a job identifier (job ID) and a task number is described. Specifically, as shown in FIG. 4A, “J01: 1, J01: 2” in the task ID list of the first entry (slave ID = 01) has a job ID “J01” and a task number “1”. And the task with the job ID “J01” and the task number “2” are being executed.

図4Bに示すジョブ管理テーブルP23は、ジョブID、ジョブプログラム、初期データ、及びタスク番号一覧を含み、本計算機システムで実行中の全てのジョブの情報を格納する。ジョブ管理テーブルP23の各エントリは実行中の各ジョブに対応する。   The job management table P23 illustrated in FIG. 4B includes job IDs, job programs, initial data, and task number lists, and stores information on all jobs being executed in the computer system. Each entry in the job management table P23 corresponds to each job being executed.

ジョブIDは、ジョブを一意に識別するための識別子である。ジョブプログラムは、ジョブの実行形式のプログラムであり、ジョブ実行プロセスP4内で実行される。初期データは、各タスクを初期化する際に各タスクに読み込まれるデータであり、分散FSに格納されているファイルのファイル名で表される。タスク番号一覧は、このジョブを構成する全タスクのタスク番号である。ジョブ管理テーブルP23のエントリはジョブID毎に設けられるため、ジョブ管理テーブルP23のタスク番号一覧は、ジョブIDを含まない。   The job ID is an identifier for uniquely identifying a job. The job program is a job execution format program, and is executed in the job execution process P4. The initial data is data read by each task when each task is initialized, and is represented by the file name of the file stored in the distributed FS. The task number list is the task numbers of all tasks constituting this job. Since an entry in the job management table P23 is provided for each job ID, the task number list in the job management table P23 does not include a job ID.

図4Cに示すタスク管理テーブルP24は、ジョブID、タスク番号、実行状態、全データ量、スワップ量、及びスワップフラグを含み、システムで実行中の全てのタスクの情報を格納する。タスク管理テーブルP24の各エントリは実行中のタスクに対応する。   The task management table P24 illustrated in FIG. 4C includes a job ID, task number, execution state, total data amount, swap amount, and swap flag, and stores information on all tasks being executed in the system. Each entry in the task management table P24 corresponds to a task being executed.

ジョブIDは、ジョブを一意に識別するための識別子である。タスク番号は、ジョブ内でタスクを識別するための番号である。実行状態は、各タスクの実行状態を示し、図7に示す状態遷移図に示されたいずれかの状態となる。全データ量は、このタスクによって利用される全データ量であり、例えば、単位はMB(メガバイト)で表される。なお、全データ量には、スワップ状態のデータの量も含まれる。スワップ量は、スワップされたデータの量であり、例えば、単位はMB(メガバイト)で表される。スワップフラグは、タスクのデータのスワップ処理の状態を示し、IDLE(スワップ処理中ではない)、BUSY(スワップ処理中)、PRE_OUT(スワップアウト処理を行う直前)のいずれかとなる。   The job ID is an identifier for uniquely identifying a job. The task number is a number for identifying a task in the job. The execution state indicates the execution state of each task, and is one of the states shown in the state transition diagram shown in FIG. The total data amount is the total data amount used by this task. For example, the unit is expressed in MB (megabyte). Note that the total amount of data includes the amount of data in the swap state. The swap amount is the amount of swapped data, and for example, the unit is expressed in MB (megabyte). The swap flag indicates the status of task data swap processing, and is one of IDLE (not in swap processing), BUSY (in swap processing), or PRE_OUT (immediately before performing swap-out processing).

なお、タスクによってメモリ104に保持されるデータを、記憶装置109に移動する処理がスワップアウトであり、記憶装置109に移動されたデータをメモリ104に戻す処理がスワップインである。   Note that the process of moving the data held in the memory 104 by the task to the storage device 109 is swap-out, and the process of returning the data moved to the storage device 109 to the memory 104 is swap-in.

図4Dに示す移動中タスク管理テーブルP25は、ジョブID、タスク番号、移動元スレーブID、移動先スレーブID、及び実行状態を含み、移動中の全てのタスクの情報が格納される。移動中タスク管理テーブルP25の各エントリは移動中の各タスクに対応する。   The moving task management table P25 illustrated in FIG. 4D includes a job ID, a task number, a moving source slave ID, a moving destination slave ID, and an execution state, and stores information on all moving tasks. Each entry in the moving task management table P25 corresponds to each moving task.

ジョブIDは、ジョブを一意に識別するための識別子である。タスク番号は、タスクの番号は、ジョブ内でタスクを識別するための番号である。移動元スレーブID及び移動先スレーブIDは、各々、移動されるタスクの移動元のスレーブノード30の識別子と、移動先のスレーブノード30の識別子である。実行状態は、移動中タスクの移動前の状態が示され、タスク移動後にそのタスクの実行状態を移動前の実行状態に復帰するため、移動前の状態を保存するために使用される。   The job ID is an identifier for uniquely identifying a job. The task number is a number for identifying a task in the job. The source slave ID and the destination slave ID are respectively an identifier of the source slave node 30 and an identifier of the destination slave node 30 of the task to be moved. The execution state indicates a state before the movement of the task being moved, and is used to save the state before the movement in order to return the execution state of the task to the execution state before the movement after the task movement.

次に、図3Bに示すノード内ジョブ管理プロセスP3の構成を説明する。例えば、ノード内ジョブ管理プロセスP3は、記憶装置109に格納されており、メモリ104に読み出され、CPU1010により実行される。   Next, the configuration of the intra-node job management process P3 shown in FIG. 3B will be described. For example, the intra-node job management process P3 is stored in the storage device 109, read into the memory 104, and executed by the CPU 1010.

ノード内ジョブ管理プロセスP3は、ノード内ジョブ制御プログラムP31、ノード内ジョブ管理テーブルP32、タスク管理テーブルP33及びメモリ管理テーブルP34を含む。ノード内ジョブ制御プログラムP31は、ジョブの実行を制御するプログラムである。従って、ジョブ制御プログラムP31はメモリに格納されており、プロセッサ101によりメモリより読み出されて実行される。ノード内ジョブ管理テーブルP32は、自ノードで実行中のジョブを管理するための情報を保持する(図5A参照)。タスク管理テーブルP33、実行中のタスクを管理するための情報を保持する(図5B参照)。メモリ管理テーブルP34は、自ノードで実行中のタスクのメモリ使用状態を管理するための情報を保持する(図5C参照)。   The intra-node job management process P3 includes an intra-node job control program P31, an intra-node job management table P32, a task management table P33, and a memory management table P34. The intra-node job control program P31 is a program that controls job execution. Therefore, the job control program P31 is stored in the memory, and is read from the memory by the processor 101 and executed. The intra-node job management table P32 holds information for managing jobs being executed on the own node (see FIG. 5A). The task management table P33 holds information for managing the task being executed (see FIG. 5B). The memory management table P34 holds information for managing the memory usage state of the task being executed on the own node (see FIG. 5C).

図5A〜図5Cは、ノード内ジョブ管理プロセスP3に含まれるテーブルの構成図である。   5A to 5C are configuration diagrams of tables included in the intra-node job management process P3.

図5Aに示すノード内ジョブ管理テーブルP32は、ジョブID、ジョブプログラム、初期データ、及びタスク番号一覧を含み、このノードで実行中のジョブの情報のみが含まれる。ノード内ジョブ管理テーブルP32の各エントリは、そのノードで実行中の各ジョブに対応する。   The intra-node job management table P32 illustrated in FIG. 5A includes a job ID, a job program, initial data, and a task number list, and includes only information on a job being executed on this node. Each entry in the intra-node job management table P32 corresponds to each job being executed on the node.

ノード内ジョブ管理テーブルP32は、ジョブ管理プロセスP2に保持されるジョブ管理テーブルP23と同じ構成であり、同名の各項目は同じ内容のデータを保持する。但し、ノード内ジョブ管理テーブルP32には、そのノードで実行されているジョブの情報のみが含まれる。   The intra-node job management table P32 has the same configuration as the job management table P23 held in the job management process P2, and each item having the same name holds the same data. However, the intra-node job management table P32 includes only information on jobs executed on the node.

図5Bに示すタスク管理テーブルP33は、ジョブID、タスク番号、実行状態、及びノードアドレスを含み、システムで実行中のタスクの情報を格納する。なお、タスク管理テーブルP33には、このノードで実行中のタスクの情報だけでなく、他ノードで実行中のタスクの情報も含まれるが、このノードで実行中のジョブ以外のジョブに対応するタスクの実行状態に関する情報は含まれない。タスク管理テーブルP33の各エントリは実行中のタスクに対応する。   A task management table P33 illustrated in FIG. 5B includes information on a task being executed in the system, including a job ID, a task number, an execution state, and a node address. Note that the task management table P33 includes not only information on tasks being executed on this node but also information on tasks being executed on other nodes, but tasks corresponding to jobs other than jobs being executed on this node. Information on the execution status of is not included. Each entry in the task management table P33 corresponds to a task being executed.

ジョブIDは、ジョブを一意に識別するための識別子である。タスク番号は、ジョブ内でタスクを識別するための番号である。実行状態はタスクの実行状態、実行状態は、各タスクの実行状態を示し、図7に示す状態遷移図に示されたいずれかの状態となる。なお、このノードで実行中のタスクの実行状態のみが格納される。ノードアドレスは、このジョブを実行中のスレーブノード30のネットワーク上のアドレスである。なお、他のノードで実行中のタスクのノードアドレスのみが格納される。   The job ID is an identifier for uniquely identifying a job. The task number is a number for identifying a task in the job. The execution state indicates the execution state of the task, and the execution state indicates the execution state of each task, which is one of the states shown in the state transition diagram shown in FIG. Only the execution state of the task being executed in this node is stored. The node address is an address on the network of the slave node 30 that is executing this job. Note that only the node address of a task being executed on another node is stored.

図5Cに示すメモリ管理テーブルP34は、ジョブID、タスク番号、データ名、データ量、及びスワップ状態を含み、このノードで実行中のすべてのタスクに割り当てられるメモリ領域の情報が含まれる。メモリ管理テーブルP34の各エントリはメモリ領域に対応する。   The memory management table P34 illustrated in FIG. 5C includes a job ID, a task number, a data name, a data amount, and a swap state, and includes information on memory areas allocated to all tasks being executed on this node. Each entry in the memory management table P34 corresponds to a memory area.

ジョブIDは、ジョブを一意に識別するための識別子である。タスク番号は、ジョブ内でタスクを識別するための番号である。データ名は、各タスクによって保持されるデータの名称である。データ量は、各タスクによって保持されるデータの量であり、例えば、単位はMB(メガバイト)で表される。スワップ状態は、メモリのスワップ(特に、スワップアウト)に関する状態を示す。具体的には、スワップ状態には、スワップなしを示す)「NONE」、スワップアウト直前を示す「PRE_OUT」、スワップアウト処理中を示す「OUT」、スワップアウト済を示す「SWAP」、スワップイン処理中を示す「IN」のいずれかが格納される。   The job ID is an identifier for uniquely identifying a job. The task number is a number for identifying a task in the job. The data name is the name of data held by each task. The data amount is the amount of data held by each task. For example, the unit is represented by MB (megabyte). The swap state indicates a state related to memory swap (in particular, swap-out). Specifically, the swap state indicates “no swap”) “NONE”, “PRE_OUT” indicating immediately before swap-out, “OUT” indicating that swap-out is in progress, “SWAP” indicating that swap-out has been completed, swap-in processing One of “IN” indicating the inside is stored.

ノード内ジョブ管理プロセスP3は、ジョブID及びタスク番号によってタスクを一意に識別し、識別されたタスクによって保持されるデータの情報をデータ名、データ量、及びスワップ状態に格納する。各タスクは内部データ、バッファ、受信用バッファの3種類のデータを保持する。内部データはワーク用メモリ領域であり、各タスクは各メモリ領域に名前を付けることによって複数のワーク用メモリ領域を保持することができる。タスクがメモリ領域を保持する場合、ワーク用メモリ領域の名前をメモリ管理テーブルP34のデータ名に格納する。バッファ用のメモリ領域には「buf」、受信バッファには「buf_recv」を、メモリ管理テーブルP34のデータ名に格納するとよい。   The intra-node job management process P3 uniquely identifies a task by a job ID and a task number, and stores data information held by the identified task in a data name, a data amount, and a swap state. Each task holds three types of data: internal data, buffer, and reception buffer. The internal data is a work memory area, and each task can hold a plurality of work memory areas by naming each memory area. When the task holds the memory area, the name of the work memory area is stored in the data name of the memory management table P34. “Buf” may be stored in the buffer memory area, and “buf_recv” may be stored in the data name of the memory management table P34 in the reception buffer.

次に、図3Cに示すジョブ実行プロセスP4の構成について説明する。例えば、ジョブ実行プロセスP4は、記憶装置109に格納されており、メモリ104に読み出され、CPU1010により実行される。   Next, the configuration of the job execution process P4 shown in FIG. 3C will be described. For example, the job execution process P4 is stored in the storage device 109, read into the memory 104, and executed by the CPU 1010.

ジョブ実行プロセスP4は、タスク制御プログラムP41、データ移動プログラムP42、タスク移動プログラムP43、タスク管理テーブルP44、メモリ管理テーブルP45及びタスクP46を含む。タスク制御プログラムP41は、タスクの実行を制御するプログラムである。データ移動プログラムP42は、データのスワップ処理を行うプログラムである。タスク移動プログラムP43は、タスクのノード間移動処理を行うプログラムである。。従って、タスク制御プログラムP41、データ移動プログラムP42、タスク移動プログラムP43はメモリに格納されており、プロセッサ101によりメモリより読み出されて実行される。タスク管理テーブルP44は、自ノードで実行中のタスクの情報を管理する(図6A参照)。メモリ管理テーブルP45は、自ノードで実行中のタスクのメモリ使用状態を管理する(図6B参照)。   The job execution process P4 includes a task control program P41, a data movement program P42, a task movement program P43, a task management table P44, a memory management table P45, and a task P46. The task control program P41 is a program that controls the execution of tasks. The data movement program P42 is a program that performs data swap processing. The task movement program P43 is a program for performing a task inter-node movement process. . Therefore, the task control program P41, the data movement program P42, and the task movement program P43 are stored in the memory, and are read from the memory by the processor 101 and executed. The task management table P44 manages information on tasks being executed on the own node (see FIG. 6A). The memory management table P45 manages the memory usage state of the task being executed in the own node (see FIG. 6B).

タスクP46は、ジョブ実行プロセスP4内に複数個生成することができる。タスクP46の数の上限は、スレーブ管理テーブルP22の最大タスク数に記載された数である。タスクはユーザプログラムであるタスク処理コードP47、内部データ(data)、バッファ(buf)、及び受信バッファ(buf_recv)を含む。   A plurality of tasks P46 can be generated in the job execution process P4. The upper limit of the number of tasks P46 is the number described in the maximum number of tasks in the slave management table P22. The task includes a task processing code P47, which is a user program, internal data (data), a buffer (buf), and a reception buffer (buf_recv).

内部データは、タスクが内部的に利用するワーク用のメモリ領域である。各タスクは、メモリ領域ごとに名前をつけることによって、複数のメモリ領域を利用することが可能である。タスク処理コードP47は、タスク制御プログラムP41に対してメモリ領域を要求することによって、内部データを利用することができる。タスク制御プログラムP41は、タスク処理コードP47が利用したメモリ領域を管理しており、必要があればデータ移動プログラムP42に要求してスワップ処理を行う。   The internal data is a work memory area used internally by a task. Each task can use a plurality of memory areas by naming each memory area. The task processing code P47 can use internal data by requesting a memory area from the task control program P41. The task control program P41 manages the memory area used by the task processing code P47, and if necessary, requests the data movement program P42 to perform swap processing.

また、タスク同士はメッセージ交換によって通信することが可能である。タスクが受信したメッセージは、いったん受信バッファ(buf_recv)に保存される。一方、タスク処理コードP47は、バッファ(buf)からメッセージを取り出して利用する。本システムは、複数のタスクの並行処理と同期処理とを交互に実行する処理モデルで動作する。ある並行処理フェーズで送信したメッセージは、その並行処理フェーズにおいて宛先タスクの受信バッファ(buf_recv)に保存される。その後、同期フェーズにおいて受信バッファ(buf_recv)からバッファ(buf)へメッセージを移動し、次の並行処理フェーズにおいて、宛先タスクのタスク処理コードP47は、バッファへ移動されたメッセージを利用することができる。並行処理と同期処理とを交互に行う動作の詳細は後述する。   Tasks can communicate with each other by exchanging messages. The message received by the task is temporarily stored in the reception buffer (buf_recv). On the other hand, the task processing code P47 takes out a message from the buffer (buf) and uses it. This system operates on a processing model that alternately executes parallel processing and synchronous processing of a plurality of tasks. A message transmitted in a certain parallel processing phase is stored in the reception buffer (buf_recv) of the destination task in the parallel processing phase. Thereafter, the message is moved from the reception buffer (buf_recv) to the buffer (buf) in the synchronization phase, and the task processing code P47 of the destination task can use the message moved to the buffer in the next parallel processing phase. Details of operations for alternately performing parallel processing and synchronous processing will be described later.

図6A、図6Bは、ジョブ実行プロセスP4に含まれるテーブルの構成図である。   6A and 6B are configuration diagrams of tables included in the job execution process P4.

図6Aに示すタスク管理テーブルP44は、ジョブID、タスク番号、実行状態、及びノードアドレスを含み、このジョブ実行プロセスP4によって実行されるジョブに対応するすべてのタスクの情報が記載される。タスク管理テーブルP44の各エントリは、そのノードで実行中の各タスクに対応する。   The task management table P44 shown in FIG. 6A includes a job ID, a task number, an execution state, and a node address, and describes information on all tasks corresponding to the job executed by the job execution process P4. Each entry in the task management table P44 corresponds to each task being executed on the node.

タスク管理テーブルP44は、ノード内ジョブ管理プロセスP3に含まれるタスク管理テーブルP33と同様の構成であり、各項目の意味も同じである。但し、タスク管理テーブルP44には、このジョブ実行プロセスP4によって実行されるジョブ以外のジョブに対応するタスクの情報は記載されない。   The task management table P44 has the same configuration as the task management table P33 included in the intra-node job management process P3, and the meaning of each item is also the same. However, the task management table P44 does not include information on tasks corresponding to jobs other than jobs executed by the job execution process P4.

図6Bに示すメモリ管理テーブルP45は、ジョブID、タスク番号、データ名、データ量、データID、及びスワップファイル名を含み、このジョブ実行プロセスP4が実行する全てのタスクによって保持されるメモリ領域の情報が記載される。メモリ管理テーブルP45の各エントリは、各メモリ領域に対応する。   The memory management table P45 shown in FIG. 6B includes a job ID, a task number, a data name, a data amount, a data ID, and a swap file name, and a memory area held by all tasks executed by the job execution process P4. Information is written. Each entry in the memory management table P45 corresponds to each memory area.

メモリ管理テーブルP45のジョブID、タスク番号、データ名、データ量は、ノード内ジョブ管理プロセスP3に保持されるメモリ管理テーブルP34の各項目と同じ意味である。データIDは、メモリ領域の識別子であり、タスク処理コードP47はデータIDを使用してメモリ領域にアクセスする。具体的には、データIDとしてメモリ領域のハンドル番号やアドレス等を利用する。スワップファイル名は、このメモリ領域がスワップアウトされている場合のスワップファイルの名前である。このスワップファイルは、分散FS上ではなく、各スレーブノードのローカルファイルシステム上に格納される。   The job ID, task number, data name, and data amount in the memory management table P45 have the same meaning as the items in the memory management table P34 held in the in-node job management process P3. The data ID is an identifier of the memory area, and the task processing code P47 accesses the memory area using the data ID. Specifically, the handle number or address of the memory area is used as the data ID. The swap file name is the name of the swap file when this memory area is swapped out. This swap file is not stored on the distributed FS but on the local file system of each slave node.

次に、タスクの実行状態の遷移を説明する。   Next, the transition of the task execution state will be described.

図7は、本発明の実施形態のタスクの状態遷移図である。以下に説明するタスクの状態名称は、ジョブ管理プロセスP2に含まれるタスク管理テーブルP24と、ノード内ジョブ管理プロセスP3に含まれるタスク管理テーブルP33と、ジョブ実行プロセスP4に含まれるタスク管理テーブルP44の実行状態に記載される。   FIG. 7 is a task state transition diagram according to the embodiment of this invention. The task status names described below are the task management table P24 included in the job management process P2, the task management table P33 included in the in-node job management process P3, and the task management table P44 included in the job execution process P4. It is described in the execution state.

新規にジョブ実行プロセスP4内にタスクが生成された時には、タスクの状態は「INIT」になり、ジョブ管理テーブルP23及びノード内ジョブ管理テーブルP32の初期データに記載されたファイルを分散FSから読み込む。ファイルが読み込まれた後、タスクの状態は「WAIT」になる。これは待機状態を意味しており、クライアントプロセスP1からタスク実行指示があるまで待機する。   When a task is newly generated in the job execution process P4, the task state becomes “INIT”, and the files described in the initial data of the job management table P23 and the intra-node job management table P32 are read from the distributed FS. After the file is read, the task state becomes “WAIT”. This means a standby state, and waits until there is a task execution instruction from the client process P1.

タスク実行指示を受けた場合、タスクP46内の受信バッファ(buf_recv)内のメッセージをバッファ(buf)に移動した後、タスクの状態は「PRE_RUN」になる。この状態はタスクがスケジューリングされるのを待っている状態である。   When a task execution instruction is received, after the message in the reception buffer (buf_recv) in the task P46 is moved to the buffer (buf), the task state becomes “PRE_RUN”. This state is a state waiting for a task to be scheduled.

その後、タスクがスケジューリングされると、スワップアウト済みのデータをメモリ領域に読み込んだ後、タスクの状態は「RUN」になり、タスク処理コードP46の実行を開始する。タスク処理コードP46を実行している間、タスクP46によって管理されるデータはスワップアウトされない。タスク処理コードP46の実行が終了した後、タスクの状態は「WAIT」に戻る。タスクの状態が「WAIT」の時、クライアントプロセスP1からタスク終了指示があると、タスクは、利用したメモリ領域を開放し、消滅する。なお、図7では、この状態を「END」と記載しているが、これは便宜的に状態を記載しており、実際にはタスクが消滅するため「END」という状態はテーブルには記載されない。   After that, when the task is scheduled, after the swapped-out data is read into the memory area, the task state becomes “RUN” and the execution of the task processing code P46 is started. While the task processing code P46 is being executed, the data managed by the task P46 is not swapped out. After the execution of the task processing code P46 is completed, the task state returns to “WAIT”. When the task status is “WAIT”, if there is a task end instruction from the client process P1, the task releases the used memory area and disappears. In FIG. 7, this state is described as “END”. However, this state is described for convenience, and the state “END” is not described in the table because the task actually disappears. .

タスクの状態が「WAIT」又は「PRE_RUN」の時、タスクを他のスレーブノード上のジョブ実行プロセスに移動することが可能である。タスクの移動が開始すると、移動元タスクの状態は「MIG_SEND」になり、タスクの移動が終了すると、移動元タスクは消滅する。移動元タスクが移動を開始すると、移動先スレーブノードのジョブ実行プロセス上に、「MIG_RECV」という状態のタスクが生成される。移動処理が完了すると、タスクの状態は「WAIT」又は「PRE_RUN」になり、移動前の状態を復元する。従って、タスクの移動中は同一ジョブIDとタスク番号を持つ二つのタスク(移動元タスク及び移動先タスク)存在する。   When the task state is “WAIT” or “PRE_RUN”, it is possible to move the task to a job execution process on another slave node. When the movement of the task starts, the state of the movement source task becomes “MIG_SEND”, and when the movement of the task ends, the movement source task disappears. When the source task starts to move, a task with a state of “MIG_RECV” is generated on the job execution process of the destination slave node. When the movement process is completed, the task state becomes “WAIT” or “PRE_RUN”, and the state before the movement is restored. Therefore, there are two tasks (movement source task and movement destination task) having the same job ID and task number during task movement.

図8は、本発明の実施形態のタスク実行持のプロセス間通信を示すシーケンス図であり、タスクが状態遷移する際の、各プロセスの連携動作を示す。なお、各プロセスは、各プロセスの属する計算機のCPUによって実行される。   FIG. 8 is a sequence diagram showing inter-process communication with task execution according to the embodiment of this invention, and shows a cooperative operation of each process when a task makes a state transition. Each process is executed by the CPU of the computer to which each process belongs.

ジョブの処理を開始する時、クライアントプロセスP1はジョブ開始要求(M01)をジョブ管理プロセスP2に送信する。ジョブ開始要求はジョブプログラムのファイル名、初期データのファイル名を含む。ジョブプログラム及び初期データは、分散FS上に格納されており、上記ファイル名は分散FS上のファイル名である。   When starting job processing, the client process P1 transmits a job start request (M01) to the job management process P2. The job start request includes the file name of the job program and the file name of the initial data. The job program and initial data are stored on the distributed FS, and the file name is a file name on the distributed FS.

ジョブ管理プロセスP2は、ジョブ開始要求(M01)を受けると、実行されるジョブにジョブIDを割り当て、ノード内ジョブ管理プロセスP3にプロセス生成要求(M02)を送信する。プロセス生成要求(M02)は、ジョブID、ジョブプログラムのファイル名、及び初期データのファイル名を含む。   Upon receiving the job start request (M01), the job management process P2 assigns a job ID to the job to be executed and transmits a process generation request (M02) to the intra-node job management process P3. The process generation request (M02) includes a job ID, a file name of the job program, and a file name of initial data.

ノード内ジョブ管理プロセスP3は、プロセス生成要求(M02)を受けると、ジョブ実行プロセスP4を生成(M03)する。プロセス生成要求(M02)に含まれるジョブプログラムのファイル名及び初期データのファイル名によって特定されるファイルを分散FSから読み出し、読み出された初期データをパラメータとしたプログラムファイルを含むジョブ実行プロセスP4を起動する。ジョブ実行プロセスP4は、起動後に、プロセス生成通知(M04)をノード内ジョブ管理プロセスP3に送信する。   Upon receipt of the process generation request (M02), the intra-node job management process P3 generates a job execution process P4 (M03). A file specified by the file name of the job program and the file name of the initial data included in the process generation request (M02) is read from the distributed FS, and a job execution process P4 including a program file using the read initial data as a parameter is to start. The job execution process P4 transmits a process generation notification (M04) to the in-node job management process P3 after starting.

ノード内ジョブ管理プロセスP3は、プロセス生成通知(M04)を受けると、新規に生成されたジョブの情報をノード内ジョブ管理テーブルP32に追加し、ジョブ管理プロセスP2にプロセス生成通知(M05)を転送する。この時点でノード内ジョブ管理テーブルP32には、ジョブID、ジョブプログラム、及び初期データが記載されたエントリが一つ生成される。但し、まだタスクは生成されていないため、タスク番号一覧は空である。   Upon receipt of the process generation notification (M04), the intra-node job management process P3 adds information on the newly generated job to the intra-node job management table P32 and transfers the process generation notification (M05) to the job management process P2. To do. At this point, one entry describing the job ID, job program, and initial data is generated in the intra-node job management table P32. However, the task number list is empty because no task has been generated yet.

ジョブ管理プロセスP2は、プロセス生成通知(M05)を受けると、ノード内ジョブ管理プロセスP3と同様に、ジョブの情報をジョブ管理テーブルP23に追加し、クライアントプロセスP1にジョブ開始通知(M06)を送信する。   Upon receipt of the process generation notification (M05), the job management process P2 adds job information to the job management table P23 and transmits a job start notification (M06) to the client process P1 as in the in-node job management process P3. To do.

クライアントプロセスP1は、ジョブ開始通知(M06)を受けると、ジョブ管理プロセスP02にタスク生成要求(M07)を送信する。   Upon receiving the job start notification (M06), the client process P1 transmits a task generation request (M07) to the job management process P02.

ジョブ管理プロセスP2は、タスク生成要求(M07)を受けると、生成されるタスクにタスク番号を割り当て、ノード内ジョブ管理プロセスP3経由でジョブ実行プロセスP4にタスク生成要求を転送する(M08、M09)。ジョブ管理プロセスP2によって割り当てられたタスク番号は、タスク生成要求(M8、M9)に付加されてジョブ実行プロセスP4に送られる。   Upon receiving the task generation request (M07), the job management process P2 assigns a task number to the generated task and transfers the task generation request to the job execution process P4 via the intra-node job management process P3 (M08, M09). . The task number assigned by the job management process P2 is added to the task generation request (M8, M9) and sent to the job execution process P4.

ジョブ実行プロセスP4は、タスク生成要求(M9)を受けると、タスクP46を生成し、タスクの生成が完了した後、生成したタスクの情報をタスク管理テーブルP44に追加し、生成されたタスクのジョブID、タスク番号状態、タスク状態(INIT)を含む状態遷移通知[INIT](M10)をノード内ジョブ管理プロセスP3に送信する。   Upon receiving the task generation request (M9), the job execution process P4 generates a task P46, and after the generation of the task is completed, adds the generated task information to the task management table P44, and generates a job for the generated task A state transition notification [INIT] (M10) including the ID, task number state, and task state (INIT) is transmitted to the intra-node job management process P3.

ノード内ジョブ管理プロセスP3は、状態遷移通知(M10)を受けると、受信したタスクの情報(ジョブID、タスク番号、実行状態)をタスク管理テーブルP33に追加し、状態遷移通知(M10)をジョブ管理プロセスP2に転送(M11)する。   Upon receiving the state transition notification (M10), the intra-node job management process P3 adds the received task information (job ID, task number, execution state) to the task management table P33, and sends the state transition notification (M10) to the job. Transfer (M11) to the management process P2.

ジョブ管理プロセスP4は、ジョブ管理プロセスP2を受けると、ノード内ジョブ管理プロセスP3と同様に、タスクの情報をタスク管理テーブルP24に追加する。タスクはまだデータを読み込んでいないため、タスク管理テーブルP24に記載する全データ量、スワップ量は0とし、スワップフラグは「IDLE」とする。この時点で各プロセスP2、P3、P4に含まれるタスク管理テーブルに記載された、このタスクの実行状態は「INIT」になる。   Upon receiving the job management process P2, the job management process P4 adds task information to the task management table P24 as in the in-node job management process P3. Since the task has not yet read data, the total data amount and the swap amount described in the task management table P24 are set to 0, and the swap flag is set to “IDLE”. At this time, the execution state of this task described in the task management table included in each of the processes P2, P3, and P4 is “INIT”.

さらに、ジョブ管理プロセスP2は、スレーブ管理テーブルP22のノードアドレスが、受信した状態遷移通知[INIT]の送信元ノードアドレスに一致するエントリを検索し、当該エントリのタスクID一覧に新規に作成されたタスクの情報(ジョブID及びタスク番号)を追加する。   Further, the job management process P2 searches for an entry in which the node address of the slave management table P22 matches the transmission source node address of the received state transition notification [INIT], and is newly created in the task ID list of the entry. Task information (job ID and task number) is added.

図示を省略したが、ジョブ管理プロセスP2は、状態遷移通知[INIT](M11)を受けると、スレーブ管理テーブルP22を検索し、受信した状態遷移通知[INIT](M11)が含むジョブIDをタスクID一覧に含むエントリを検索する。検索されたエントリがタスクを起動したジョブを実行中のノードに対応するエントリなので、これらエントリに対応するノードで状態遷移通知[INIT](M11)の送信元以外のノードに、状態遷移通知[INIT](M11)の送信元ノードのアドレスを追加した状態遷移通知[INIT]を送信する。この状態遷移通知[INIT]を受けたノード内ジョブ管理プロセスP3は、タスク管理テーブルP33に生成されたタスクに対応するエントリを追加する。このとき、このタスクはリモートノードで実行されているので、タスク管理テーブルP33の実行状態には何も記載せず、タスク管理テーブルP33のノードアドレスには、受信した状態遷移通知[INIT]にジョブ管理プロセスが追加したアドレスを記載する。   Although not shown, when the job management process P2 receives the state transition notification [INIT] (M11), the job management process P2 searches the slave management table P22 and sets the job ID included in the received state transition notification [INIT] (M11) as a task. Search for an entry included in the ID list. Since the retrieved entry is an entry corresponding to the node that is executing the job that started the task, the state transition notification [INIT] is sent to a node other than the transmission source of the state transition notification [INIT] (M11) at the node corresponding to these entries. ] A state transition notification [INIT] to which the address of the transmission source node of (M11) is added is transmitted. Upon receiving this state transition notification [INIT], the intra-node job management process P3 adds an entry corresponding to the generated task to the task management table P33. At this time, since this task is executed in the remote node, nothing is described in the execution state of the task management table P33, and the node address of the task management table P33 contains a job in the received state transition notification [INIT]. Enter the address added by the management process.

このように、新規にタスクを生成した場合、ジョブ実行プロセスP4からタスクの情報をジョブ管理プロセスP2に転送し、さらに他ノードのノード内ジョブ管理プロセスP3へタスクの情報を転送することによって、当該ジョブに関係するノード内ジョブ管理プロセスP3へタスクの情報を伝える。   As described above, when a new task is generated, the task information is transferred from the job execution process P4 to the job management process P2, and further transferred to the in-node job management process P3 of the other node. The task information is transmitted to the intra-node job management process P3 related to the job.

次に、ジョブ実行プロセスP4は、初期データを分散FSから読み込み、読み込んだデータをタスクの内部データ(data)としてメモリ領域に格納する。初期データのファイル名は、ジョブ開始要求(M01)、プロセス生成要求(M02)に記載されており、ジョブ実行プロセスの起動オプションによってジョブ実行プロセスP4に送られる。   Next, the job execution process P4 reads initial data from the distributed FS, and stores the read data in the memory area as internal data (data) of the task. The file name of the initial data is described in the job start request (M01) and the process generation request (M02), and is sent to the job execution process P4 by the start option of the job execution process.

ジョブ実行プロセスP4は、初期データの読み込みが完了した後、ジョブ実行プロセスP4は、タスク管理テーブルP44に記載された当該タスクに対応するエントリの実行状態を「WAIT」に更新し、ジョブID、タスク番号、タスク状態(WAIT)を含む状態遷移通知[WAIT](M12)を、ノード内ジョブ管理プロセスP3へ送信する。   After the job execution process P4 completes the reading of the initial data, the job execution process P4 updates the execution state of the entry corresponding to the task described in the task management table P44 to “WAIT”, the job ID, the task A state transition notification [WAIT] (M12) including the number and task state (WAIT) is transmitted to the intra-node job management process P3.

ノード内ジョブ管理プロセスP3は、状態遷移通知[WAIT](M12)を受けると、ジョブ実行プロセスP4と同様に、タスク管理テーブルP33の当該タスクのエントリの実行状態を「WAIT」に更新する。そして、ノード内ジョブ管理プロセスP3は、状態遷移通知[WAIT]をジョブ管理プロセスP2に転送(M13)する。   Upon receiving the state transition notification [WAIT] (M12), the intra-node job management process P3 updates the execution state of the entry of the task in the task management table P33 to “WAIT”, as in the job execution process P4. Then, the intra-node job management process P3 transfers the state transition notification [WAIT] to the job management process P2 (M13).

ジョブ管理プロセスP2は、状態遷移通知[WAIT](M13)を受けると、ジョブIDとタスク番号が一致するエントリをタスク管理テーブルP24から検索し、検索されたエントリの実行状態を「WAIT」に更新する。   Upon receiving the state transition notification [WAIT] (M13), the job management process P2 searches the task management table P24 for an entry having a matching job ID and task number, and updates the execution state of the searched entry to “WAIT”. To do.

このように、タスク実行状態が変更されたときに、状態遷移通知は、ジョブ実行プロセスP4から、ノード内ジョブ管理プロセスP3、ジョブ管理プロセスP2へ順に転送される。ノード内ジョブ管理プロセスP3及びジョブ管理プロセスP2は、状態遷移通知を受けると、各々、ジョブID及びタスク番号をキーとしてタスク管理テーブルP33及びP24から当該タスクに対応するエントリを検索し、検索されたエントリの実行状態を通知された値に変更する。   Thus, when the task execution state is changed, the state transition notification is sequentially transferred from the job execution process P4 to the in-node job management process P3 and the job management process P2. Upon receipt of the state transition notification, the in-node job management process P3 and the job management process P2 search the entry corresponding to the task from the task management tables P33 and P24 using the job ID and task number as a key, respectively. Change the execution status of the entry to the reported value.

タスクのメモリ使用量又はスワップ状態が変更された場合も、タスク実行状態が変更された場合と同様に、状態遷移通知がジョブ実行プロセスP4から、ジョブ管理プロセスP2へ転送される。この場合は、ノード内ジョブ管理プロセスP3は、状態遷移通知に従ってメモリ管理テーブルP34のエントリの追加/削除、データ量、及びスワップ状態を変更する。ジョブ管理プロセスP2も、状態遷移通知に従ってタスク管理テーブルP24の全データ量、スワップ量、及びスワップフラグを変更する。   Even when the memory usage amount or the swap state of the task is changed, the state transition notification is transferred from the job execution process P4 to the job management process P2, similarly to the case where the task execution state is changed. In this case, the intra-node job management process P3 changes the addition / deletion of entries in the memory management table P34, the data amount, and the swap state in accordance with the state transition notification. The job management process P2 also changes the total data amount, the swap amount, and the swap flag in the task management table P24 according to the state transition notification.

クライアントプロセスP1は、タスク生成要求(M07)を送信した後、ジョブ管理プロセスP2に同期要求(M14)を送信する。同期要求(M14)は、同期待ち対象タスクのタスクID一覧を含む。ジョブ管理プロセスP2は、
同期要求(M14)れを受けると、同期要求(M14)に記載されたすべてのタスクIDが「WAIT」状態になるまで待つ。同期要求(M14)に記載されたタスクが既に終了している場合や、同期待ち中に終了した場合は、ジョブ管理プロセスP2はクライアントプロセスP1にエラー通知を返信する。図8では、タスクの状態が「WAIT」になったので、同期完了通知(M15)をクライアントに返している。
After transmitting the task generation request (M07), the client process P1 transmits a synchronization request (M14) to the job management process P2. The synchronization request (M14) includes a task ID list of tasks to be synchronized. The job management process P2
When receiving the synchronization request (M14), it waits until all task IDs described in the synchronization request (M14) are in the “WAIT” state. If the task described in the synchronization request (M14) has already been completed or has been completed while waiting for synchronization, the job management process P2 returns an error notification to the client process P1. In FIG. 8, since the task status is “WAIT”, a synchronization completion notification (M15) is returned to the client.

図8では、生成され、及び同期されタスクは一つのみであるが、実際には複数のタスクが生成され、及び同期される。具体的には、タスク生成要求(M07)には、複数のタスクに関する情報が記載されており、ジョブ管理プロセスP2は、タスク生成要求(M07)に記載された複数のタスクの生成を、ノード内ジョブ管理プロセスP3に要求する。このとき、ジョブ管理プロセスP2は、スレーブ管理テーブルP22の最大タスク数とタスクID一覧を参照し、タスクの生成が要求されるノードに新たにタスクを生成する余裕があるかを確認する。ジョブ管理プロセスP2は、要求された数のタスクを一つのスレーブノードに生成できない場合は、他のスレーブノードにタスクを生成するために、他のノード内ジョブ管理プロセスP3にタスク生成要求を送信する。   In FIG. 8, there is only one task that is generated and synchronized, but in practice a plurality of tasks are generated and synchronized. Specifically, the task generation request (M07) describes information about a plurality of tasks, and the job management process P2 generates a plurality of tasks described in the task generation request (M07) within the node. Request to the job management process P3. At this time, the job management process P2 refers to the maximum number of tasks and the task ID list in the slave management table P22, and confirms whether there is room for generating a new task in a node for which task generation is requested. When the requested number of tasks cannot be generated in one slave node, the job management process P2 transmits a task generation request to the job management process P3 in another node in order to generate a task in another slave node. .

従って、タスク実行するジョブ実行プロセスP4は、複数のノードで動作することになるが、各タスクからの状態遷移通知は必ずジョブ管理プロセスP2に送信される。ジョブ管理プロセスP2は、クライアントプロセスP1から同期要求(M14)を受けると、同期要求(M14)に記載されたすべてのタスクの状態を確認し、すべてのタスクの状態が「WAIT」になったら、クライアントプロセスP1に同期完了通知(M15)を返信する。   Therefore, the job execution process P4 for executing the task operates on a plurality of nodes, but the state transition notification from each task is always transmitted to the job management process P2. When the job management process P2 receives the synchronization request (M14) from the client process P1, the job management process P2 confirms the status of all tasks described in the synchronization request (M14), and when the status of all tasks becomes “WAIT”, A synchronization completion notification (M15) is returned to the client process P1.

クライアントプロセスP1は、同期完了通知(M15)を受けると、タスク実行指示(M16)をジョブ管理プロセスP2に送信する。タスク実行指示(M16)には実行すべきタスクのタスクIDが記載されており、ジョブ管理プロセスP2は、スレーブ管理テーブルP22のタスクID一覧を参照し、指定されたタスクIDに対応するタスクが動作中のスレーブのノードアドレスを取得する。ジョブ管理プロセスP2は、そのノードのノード内ジョブ管理プロセスにタスク実行指示(M17)を送信する。タスク実行指示(M16)には、当該ノードで実行すべきタスクのタスクIDが記載されている。タスク実行指示(M16)に記載されているタスクが異なるノードで実行されている場合、各ノードのノード内ジョブ管理プロセスにタスク実行指示(M17)を送信する。   Upon receiving the synchronization completion notification (M15), the client process P1 transmits a task execution instruction (M16) to the job management process P2. The task execution instruction (M16) describes the task ID of the task to be executed, and the job management process P2 refers to the task ID list in the slave management table P22 and the task corresponding to the specified task ID operates. Get the node address of the slave inside. The job management process P2 transmits a task execution instruction (M17) to the intra-node job management process of the node. The task execution instruction (M16) describes the task ID of the task to be executed at the node. When the task described in the task execution instruction (M16) is being executed in a different node, the task execution instruction (M17) is transmitted to the intra-node job management process of each node.

ノード内ジョブ管理プロセスP03は、タスク実行指示(M17)を受けると、タスクIDに含まれるジョブIDを取り出し、取り出されたジョブIDを含むタスク実行指示(M18)を、そのジョブを担当するジョブ実行プロセスに転送する。   Upon receiving the task execution instruction (M17), the intra-node job management process P03 extracts the job ID included in the task ID, and executes the task execution instruction (M18) including the extracted job ID as the job execution responsible for the job. Transfer to process.

ジョブ実行プロセスP4は、タスク実行指示(M18)を受けると、タスク実行指示(M18)に含まれるタスクIDからタスク番号を取り出し、取り出されたタスク番号をキーとしてタスク管理テーブルP44から当該タスクに対応するエントリを検索し、検索されたエントリの実行状態を「PRE_RUN」に変更する。そして、ジョブ実行プロセスP4は、当該タスクP46内の受信バッファ(buf_recv)に蓄えられたメッセージをバッファ(buf)に移動し、受信バッファ(buf_recv)の内容をクリアする。その後、ジョブ実行プロセスP4は、状態遷移通知[PRE_RUN]をノード内ジョブ管理プロセスP03に返信する。   Upon receiving the task execution instruction (M18), the job execution process P4 extracts the task number from the task ID included in the task execution instruction (M18), and responds to the task from the task management table P44 using the extracted task number as a key. The entry to be searched is searched, and the execution state of the searched entry is changed to “PRE_RUN”. Then, the job execution process P4 moves the message stored in the reception buffer (buf_recv) in the task P46 to the buffer (buf), and clears the contents of the reception buffer (buf_recv). Thereafter, the job execution process P4 returns a state transition notification [PRE_RUN] to the intra-node job management process P03.

ノード内ジョブ管理プロセスP3は、状態遷移通知[PRE_RUN](M20)を受けると、受信したタスク実行指示(M17)に含まれるタスクIDからジョブIDとタスク番号を取り出し、取り出されたジョブID及びタスク番号をキーとしてタスク管理テーブルP33を検索し、検索されたエントリの実行状態を「PRE_RUN」に変更する。そして、ノード内ジョブ管理プロセスP3は状態遷移通知(M21)をジョブ管理プロセスP2に転送する。   Upon receiving the state transition notification [PRE_RUN] (M20), the in-node job management process P3 extracts the job ID and task number from the task ID included in the received task execution instruction (M17), and extracts the extracted job ID and task. The task management table P33 is searched using the number as a key, and the execution state of the searched entry is changed to “PRE_RUN”. Then, the intra-node job management process P3 transfers the state transition notification (M21) to the job management process P2.

ジョブ管理プロセスP2は、状態遷移通知(M21)を受けると、ノード内ジョブ管理プロセスP3と同様に、タスク管理テーブルP24の、このタスクに対応するエントリの実行状態を「PRE_RUN」に変更する。   Upon receiving the state transition notification (M21), the job management process P2 changes the execution state of the entry corresponding to this task in the task management table P24 to “PRE_RUN”, as in the in-node job management process P3.

次に、ノード内ジョブ管理プロセスP3は、タスク管理テーブルP33を確認し、ノードアドレスが設定されていないタスク(自ノードで実行中のタスク)で実行状態が「RUN」になっているエントリの数を計算する。この数が、そのノードで実際にスケジューリングされているタスクの数である。そして、この数が自ノードの最大タスク数よりも小さければ、タスクの実行を許可し、スケジューリング要求(M22)をジョブ実行プロセスP4に送信する。スケジューリング要求(M22)には、スケジューリング対象となったタスクのタスク番号が含まれている。   Next, the intra-node job management process P3 confirms the task management table P33, and the number of entries in which the execution state is “RUN” for a task for which a node address is not set (task being executed on the own node). Calculate This number is the number of tasks actually scheduled at that node. If this number is smaller than the maximum number of tasks of the own node, the task execution is permitted and a scheduling request (M22) is transmitted to the job execution process P4. The scheduling request (M22) includes the task number of the task to be scheduled.

ジョブ実行プロセスP4は、スケジューリング要求(M22)を受けると、スケジューリング要求(M22)に含まれるタスク番号をキーとしてタスク管理テーブルP44を検索し、検索されたエントリの実行状態を「RUN」に変更する。   Upon receiving the scheduling request (M22), the job execution process P4 searches the task management table P44 using the task number included in the scheduling request (M22) as a key, and changes the execution state of the searched entry to “RUN”. .

そして、ジョブ実行プロセスP4は、状態遷移通知[RUN]をノード内ジョブ管理プロセスP3に返信し、そのタスクP46のタスク処理コードP47の実行を開始する。タスク処理コードP47の実行は、タスク毎にスレッドが割り当てられ、非同期に実行される。このタスク処理コードP47が他タスクへのメッセージ送信や、他タスクから受信したメッセージを、タスクP46のバッファ(buf)から読み出す。   Then, the job execution process P4 returns a state transition notification [RUN] to the intra-node job management process P3, and starts executing the task processing code P47 of the task P46. The task processing code P47 is executed asynchronously with a thread assigned to each task. The task processing code P47 reads a message transmitted to another task or a message received from another task from the buffer (buf) of the task P46.

タスク処理コードP47の実行が終了すると、ジョブ実行プロセスP4は、実行が終了したタスクのタスク番号をキーとしてタスク管理テーブルP44を検索し、検索されたエントリの実行状態を「WAIT」に変更する。そして、この実行が終了したタスクのジョブIDとタスク番号を含んだ状態遷移通知[WAIT](M25)をノード内ジョブ管理プロセスP3に送信する。   When the execution of the task processing code P47 is completed, the job execution process P4 searches the task management table P44 using the task number of the task that has been executed as a key, and changes the execution state of the searched entry to “WAIT”. Then, a state transition notification [WAIT] (M25) including the job ID and task number of the task whose execution has been completed is transmitted to the intra-node job management process P3.

ノード内ジョブ管理プロセスP3は、状態遷移通知[WAIT](M25)を受けると、状態遷移通知[WAIT](M25)に含まれるタスクのジョブID及びタスク番号をキーとしてタスク管理テーブルP33を検索し、検索されたエントリの実行状態を「WAIT」に変更する。さらに、ノード内ジョブ管理プロセスP3は、状態遷移通知[WAIT](M26)をジョブ管理プロセスP2に転送する。   Upon receiving the state transition notification [WAIT] (M25), the intra-node job management process P3 searches the task management table P33 using the job ID and task number of the task included in the state transition notification [WAIT] (M25) as keys. Then, the execution state of the retrieved entry is changed to “WAIT”. Furthermore, the intra-node job management process P3 transfers the state transition notification [WAIT] (M26) to the job management process P2.

ジョブ管理プロセスP2は、状態遷移通知[WAIT](M26)を受けると、ノード内ジョブ管理プロセスP3と同様に、タスク管理テーブルP24の、このタスクに対応するエントリの実行状態を「WAIT」に変更する。その後、ジョブ管理プロセスP2は、クライアントプロセスP1に同期完了通知(M27)を返信する。   Upon receiving the state transition notification [WAIT] (M26), the job management process P2 changes the execution state of the entry corresponding to this task to “WAIT” in the task management table P24, as in the in-node job management process P3. To do. Thereafter, the job management process P2 returns a synchronization completion notification (M27) to the client process P1.

クライアントプロセスP1は、タスク実行指示(M16)を送信した後に、同期要求(M19)をジョブ管理プロセスに送信し、実行したタスクの状態が「WAIT」になるまで待つ。この処理は、M14で示した同期処理と同様の処理である。   After transmitting the task execution instruction (M16), the client process P1 transmits a synchronization request (M19) to the job management process and waits until the state of the executed task becomes “WAIT”. This process is the same as the synchronization process indicated by M14.

このように、クライアントプロセスP1からのタスク実行指示によるタスク処理の開始と、タスクの同期を交互に行うことによって、タスクの実行が進んでいく。   In this way, task execution proceeds by alternately performing task processing start by task execution instructions from the client process P1 and task synchronization.

上記説明では、ノード内ジョブ管理プロセスP3はタスクが「PRE_RUN」状態になった時に、そのタスクをスケジューリングしたが、クライアントプロセスが多数のタスクに対してタスク実行指示を行うと、スレーブノードの最大タスク数を超える数のタスクが同時に「PRE_RUN」状態となり、「PRE_RUN」状態になったタスクをすぐにはスケジューリングできなくなる。また、タスクの内部データ(data)、バッファ(buf)はスワップアウト可能であり、タスク処理コードを実行する際に上記メモリ領域がスワップアウト済みであればスワップインする必要がある。また、ノード内のメモリが不足する場合、タスク処理コードを実行する前に、スワップアウト可能な別のタスクが管理する内部データ(data)、バッファ(buf)をスワップアウトする必要もある。以下では、図9、図10を参照し、スケジューリング処理の詳細を説明する。   In the above description, the intra-node job management process P3 schedules the task when the task is in the “PRE_RUN” state. However, if the client process issues a task execution instruction to many tasks, the maximum task of the slave node The number of tasks exceeding the number simultaneously enter the “PRE_RUN” state, and the task in the “PRE_RUN” state cannot be scheduled immediately. The internal data (data) and buffer (buf) of the task can be swapped out. If the memory area is already swapped out when executing the task processing code, it is necessary to swap in. If the memory in the node is insufficient, it is necessary to swap out the internal data (data) and the buffer (buf) managed by another task that can be swapped out before executing the task processing code. Hereinafter, the scheduling process will be described in detail with reference to FIGS. 9 and 10.

ノード内ジョブ制御プログラムP31が処理を開始すると、タスク管理テーブルP33を確認し
、実行状態が「PRE_RUN」状態のエントリを検索する(S101)。
When the intra-node job control program P31 starts processing, it checks the task management table P33 and searches for an entry whose execution state is “PRE_RUN” (S101).

「PRE_RUN」状態のエントリがない場合、「PRE_RUN」状態のタスクが現れるまで待機する(S102)。   If there is no entry in the “PRE_RUN” state, the process waits until a task in the “PRE_RUN” state appears (S102).

S101において、「PRE_RUN」状態のエントリが存在した場合、S101で見つけられた「PRE_RUN」状態のエントリのジョブID及びタスク番号の一組を選択し、選択されたエントリとジョブID及びタスク番号が一致する、メモリ管理テーブルP34のエントリを検索する。これらのエントリが、このタスクによって利用されるメモリ領域に対応する。   In S101, if there is an entry in the “PRE_RUN” state, a set of job ID and task number of the entry in “PRE_RUN” state found in S101 is selected, and the selected entry matches the job ID and task number. The entry of the memory management table P34 is searched. These entries correspond to the memory area used by this task.

そして、これらのエントリのスワップ状態を確認し、すべてのエントリのスワップ状態が「NONE」であれば、そのタスクをスケジューリング対象として選択する。一方、スワップ状態が「NONE」以外である場合、S101で見つけた別のエントリのジョブID及びタスク番号の組を選択し、前述した手順によってメモリ管理テーブルP34を確認する。   Then, the swap state of these entries is confirmed, and if the swap state of all entries is “NONE”, the task is selected as a scheduling target. On the other hand, if the swap state is other than “NONE”, a combination of the job ID and task number of another entry found in S101 is selected, and the memory management table P34 is confirmed by the above-described procedure.

メモリ管理テーブルP34のスワップ状態が「NONE」である場合、メモリ領域がスワップアウトされておらず、直近でスワップアウトされる予定もない。従って、このステップではスワップインが不要のタスクを優先的にスケジューリングするための処理を行う。このような制御を行うことによって、スレーブノードのCPUの空き時間を最小とし、効率的なスケジューリングが可能となる。また後述するが、タスクを移動する際、スワップ済みデータサイズが大きいタスクを優先的にタスク移動の対象として選択する(S103)。「RUN」状態のタスクを移動することはできないため、前述した制御は、スワップ済みデータサイズが大きいタスクを、スケジューリングせずに移動対象として残す効果がある。   When the swap state of the memory management table P34 is “NONE”, the memory area is not swapped out and is not scheduled to be swapped out most recently. Therefore, in this step, processing for preferentially scheduling tasks that do not require swap-in is performed. By performing such control, the idle time of the slave node CPU is minimized and efficient scheduling becomes possible. As will be described later, when a task is moved, a task having a large swapped data size is preferentially selected as a task movement target (S103). Since a task in the “RUN” state cannot be moved, the control described above has an effect of leaving a task having a large swapped data size as a movement target without scheduling.

S103においてタスクが選択できた場合、選択されたタスクをスケジューリングする。このため、ノード内ジョブ制御プログラムP31は、当該タスクに対応するタスク管理テーブルP33の実行状態を「RUN」に変更する。そして、自ノードのメモリ使用状況を確認し、必要があれば他のタスクをスワップアウトする(S105)。このスワップアウト処理の詳細は図10を用いて後述する。この処理が終わればS111に進む。   If a task can be selected in S103, the selected task is scheduled. Therefore, the intra-node job control program P31 changes the execution state of the task management table P33 corresponding to the task to “RUN”. Then, the memory usage status of the own node is confirmed, and if necessary, other tasks are swapped out (S105). Details of the swap-out process will be described later with reference to FIG. When this process ends, the process proceeds to S111.

S106においてスワップインが不要なタスクを選択できなかった場合、S101で見つけられた他のタスクを選択する。このとき、メモリ管理テーブルP34のスワップ状態が「SWAP」(スワップ済み)のエントリのデータ量をタスク毎に加算し、この計算されたデータ量が最小のものをスケジューリング対象として選択する(S106)。メモリ管理テーブルP34のデータ量は、メモリ領域のデータサイズを表している。このため、スワップ済みのデータサイズが最小のものを選択することによって、スケジューリングにおけるスワップイン処理を最小にしている。また、S103と同様に、スワップ済みデータサイズが大きいタスクをスケジューリングせずに移動対象として残す効果がある。   If a task that does not require swap-in cannot be selected in S106, another task found in S101 is selected. At this time, the data amount of the entry whose swap state is “SWAP” (swapped) in the memory management table P34 is added for each task, and the one with the smallest calculated data amount is selected as a scheduling target (S106). The amount of data in the memory management table P34 represents the data size of the memory area. For this reason, the swap-in process in the scheduling is minimized by selecting the data having the smallest swapped data size. Further, similarly to S103, there is an effect that a task having a large swapped data size is left as a movement target without being scheduled.

その後、ノード内ジョブ制御プログラムP31は、当該タスクに対応するタスク管理テーブルP33の実行状態を「RUN」に変更する。そして、S105と同様の手順で他のタスクをスワップアウトする(S107)。この処理の詳細は後述する。   Thereafter, the intra-node job control program P31 changes the execution state of the task management table P33 corresponding to the task to “RUN”. Then, other tasks are swapped out in the same procedure as S105 (S107). Details of this processing will be described later.

次に、ノード内ジョブ制御プログラムP31は、スケジューリング対象として選択されたタスクのタスク番号をキーとしてメモリ管理テーブルP34を検索し、検索されたタスクの中でスワップ状態が「PRE_OUT」及び「OUT」のものを見つける(S108)。スワップ状態が「PRE_OUT」のエントリは、近いうちにスワップアウトされる予定のメモリ領域であり、このエントリが存在すればそのエントリのスワップ状態を「NONE」に変更する。スワップ状態が「OUT」のエントリは、現在スワップアウト中のメモリ領域である。スワップ状態が「OUT」のエントリが存在した場合、ノード内ジョブ制御プログラムP31は、このメモリ領域のスワップアウト処理をキャンセルするように、ジョブ実行プロセスP4に要求し、キャンセル処理が完了したら、上記エントリのスワップ状態を「NONE」に変更する(S109)。   Next, the intra-node job control program P31 searches the memory management table P34 using the task number of the task selected as the scheduling target as a key, and the swap status among the searched tasks is “PRE_OUT” and “OUT”. A thing is found (S108). An entry whose swap status is “PRE_OUT” is a memory area that is scheduled to be swapped out soon. If this entry exists, the swap status of the entry is changed to “NONE”. An entry whose swap state is “OUT” is a memory area currently being swapped out. When there is an entry whose swap status is “OUT”, the in-node job control program P31 requests the job execution process P4 to cancel the swap-out process of this memory area, and when the cancel process is completed, the entry The swap state is changed to “NONE” (S109).

次に、ノード内ジョブ制御プログラムP31は、メモリ管理テーブルP34を参照し、スケジューリング対象として選択されたタスクのタスク番号をキーとしてメモリ管理テーブルP34から検索、検索されたエントリの中でスワップ状態が「SWAP」のものを探す。状態が「SWAP」のエントリはメモリ領域がスワップアウト済みなので、ノード内ジョブ制御プログラムP31は、ジョブ実行プロセスP4に、このメモリ領域をスワップインするように要求する(S110)。ジョブ実行プロセスP4によるスワップイン処理が終了したらS111に進む。   Next, the intra-node job control program P31 refers to the memory management table P34, searches the memory management table P34 using the task number of the task selected as the scheduling target as a key, and the swap status among the searched entries is “ Search for “SWAP”. Since the memory area of the entry whose state is “SWAP” has already been swapped out, the intra-node job control program P31 requests the job execution process P4 to swap in the memory area (S110). When the swap-in process by the job execution process P4 is completed, the process proceeds to S111.

次に、ノード内ジョブ制御プログラムP31は、スケジューリング対象として選択したタスクのジョブIDとタスク番号を含むスケジューリング要求を作成し、上記ジョブIDに対応するジョブ実行プロセスP4にスケジューリング要求を送信する。そして、ジョブ実行プロセスP4から状態遷移通知が返信されるのを待つ。状態遷移通知を受信すると、スケジューリングできたことが確認できるので、S101に戻る(S111)。   Next, the intra-node job control program P31 creates a scheduling request including the job ID and task number of the task selected as the scheduling target, and transmits the scheduling request to the job execution process P4 corresponding to the job ID. Then, it waits for a status transition notification to be returned from the job execution process P4. When the state transition notification is received, it can be confirmed that scheduling has been performed, and the process returns to S101 (S111).

次に、スワップアウト処理(S105)の詳細について説明する。   Next, details of the swap-out process (S105) will be described.

図10は、本発明の実施の形態のタスクをスワップアウトする手順を示すフローチャートである。   FIG. 10 is a flowchart showing a procedure for swapping out a task according to the embodiment of this invention.

ノード内ジョブ制御プログラムP31は、自ノードに実装されたメモリの量及び使用されているメモリの量を取得し、使用メモリ量が一定基準以下(例えば、実装メモリ量の80%以下)であるか否かを判定する(S201)。使用メモリ量は、メモリ管理テーブルP34のスワップ状態が「SWAP」「OUT」「PRE_OUT」以外のエントリのデータ量を合計することによって求める。使用メモリ量が前記基準以下である場合、空きメモリ量は十分であると判定し処理を終える。一方、使用メモリ量が前記基準を超える場合、空きメモリ量は不十分であると判定し、スワップアウト処理を行うために、次のステップに進む(S201)。   The intra-node job control program P31 obtains the amount of memory installed in the own node and the amount of used memory, and whether the used memory amount is below a certain standard (for example, 80% or less of the installed memory amount). It is determined whether or not (S201). The used memory amount is obtained by summing up the data amounts of entries other than “SWAP”, “OUT”, and “PRE_OUT” in the swap state of the memory management table P34. If the amount of used memory is less than or equal to the reference, it is determined that the amount of free memory is sufficient, and the process ends. On the other hand, if the amount of used memory exceeds the reference, it is determined that the amount of free memory is insufficient, and the process proceeds to the next step in order to perform swap-out processing (S201).

ノード内ジョブ制御プログラムP31は、タスク管理テーブルP33を参照し、実行状態が「WAIT」であるエントリを検索する。実行状態が「WAIT」であるエントリが見つかった場合、見つかったエントリのジョブID及びタスク番号が、タスク管理テーブルP33から検索されたエントリと一致し、スワップ状態が「SWAP」であるエントリを、メモリ管理テーブルP34から検索する。この条件を満たすエントリが見つかった場合、それらのいずれかのメモリ領域をスワップ対象として選択する。   The intra-node job control program P31 refers to the task management table P33 and searches for an entry whose execution state is “WAIT”. When an entry whose execution state is “WAIT” is found, an entry whose job ID and task number of the found entry match the entry searched from the task management table P33 and whose swap state is “SWAP” is stored in the memory. Search from the management table P34. When an entry satisfying this condition is found, one of those memory areas is selected as a swap target.

一方、この条件を満たすエントリが見つからなかった場合、タスク管理テーブルP33を参照し、実行状態が「PRE_RUN」であるエントリを検索し、見つかったエントリのジョブID及びタスク番号が、メモリ管理テーブルP34のジョブID及びタスクIDに一致し、スワップ状態が「SWAP」であるエントリを、メモリ管理テーブルP34から検索する。そして、この条件を満たすエントリが見つかったら、それらのいずれかのメモリ領域をスワップ対象として選択する。   On the other hand, when an entry satisfying this condition is not found, the task management table P33 is referred to, an entry whose execution state is “PRE_RUN” is searched, and the job ID and task number of the found entry are stored in the memory management table P34. The memory management table P34 is searched for an entry that matches the job ID and task ID and whose swap state is “SWAP”. When an entry satisfying this condition is found, one of those memory areas is selected as a swap target.

前述したように、実行状態が「WAIT」であるタスクを優先的にスワップアウトするように制御している。このため、すぐにスケジューリングされるタスク(実行状態が「PRE_RUN」であるタスク)をなるべくスワップアウトしない状態にしておき、スケジューリングするときのスワップイン処理を少なくする効果がある。また、後述するように、本発明では、スワップアウトされたタスク、及びスワップアウトされる予定のタスクは優先的に移動対象タスクとする。従って、前述した制御によって、次にスケジューリングするまで時間がかかるタスク(実行状態が「WAIT」であるタスク)を優先的に移動対象タスクにする効果がある(S202)。   As described above, the task whose execution state is “WAIT” is controlled to be preferentially swapped out. For this reason, the task scheduled immediately (task whose execution state is “PRE_RUN”) is set in a state where it is not swapped out as much as possible, and the swap-in processing at the time of scheduling is reduced. Further, as will be described later, in the present invention, tasks that are swapped out and tasks that are scheduled to be swapped out are preferentially set as tasks to be moved. Therefore, the above-described control has an effect of preferentially setting a task that takes time until the next scheduling (a task whose execution state is “WAIT”) as a movement target task (S202).

S202でスワップ対象を選択できなかった場合、スワップアウトすることはできないので処理を終了する。一方、スワップ対象を選択できたら、S204に進む(S203)。   If the swap target cannot be selected in S202, the process is terminated because it cannot be swapped out. On the other hand, if the swap target can be selected, the process proceeds to S204 (S203).

次に、ノード内ジョブ制御プログラムP31は、ジョブ管理プロセスP2に、S202でスワップ対象として選択されたメモリ領域のジョブID及びタスク番号を含むスワップ事前通知を送信し(S204)、一定時間待機する(S205)。ジョブ管理プロセスP2は、受信したスワップ事前通知に含まれるジョブID及びタスク番号をキーとしてタスク管理テーブルP24を検索し、検索されたエントリのスワップフラグを「PRE_OUT」に変更する。この処理は、この当該メモリ領域がスワップ対象となったことをジョブ管理プロセスP2に通知し、タスク移動対象として選択される可能性を高めるためのものである。タスク移動処理の詳細は後述する。   Next, the intra-node job control program P31 transmits a swap pre-notification including the job ID and task number of the memory area selected as the swap target in S202 to the job management process P2 (S204), and waits for a predetermined time (S204). S205). The job management process P2 searches the task management table P24 using the job ID and task number included in the received prior notice of swap as keys, and changes the swap flag of the searched entry to “PRE_OUT”. This process notifies the job management process P2 that the memory area has been swapped, and increases the possibility of being selected as a task movement target. Details of the task movement process will be described later.

ノード内ジョブ制御プログラムP31は、一定時間待機した後、S202でスワップ対象として選択されたメモリ領域のジョブID及びタスク番号をキーとしてタスク管理テーブルP33を検索する。そして、該当するエントリが検索された場合、検索されたエントリの実行状態が、「PRE_RUN」又は「RUN」であることを確認する。さらに、選択されたメモリ領域のジョブID、タスクID及びデータ名をキーとしてメモリ管理テーブルP34を検索し、検索されたエントリのスワップ状態が「PRE_RUN」であることを確認する。前述した全ての条件が確認できた場合、そのメモリ領域はスワップアウト可能であるので、次のステップに進む。一方、前述した一部の条件が確認できない場合、スワップアウトできないため、S201へ戻る(S206)。   The intra-node job control program P31 waits for a predetermined time, and then searches the task management table P33 using the job ID and task number of the memory area selected as the swap target in S202 as a key. When the corresponding entry is searched, it is confirmed that the execution state of the searched entry is “PRE_RUN” or “RUN”. Further, the memory management table P34 is searched using the job ID, task ID, and data name of the selected memory area as a key, and it is confirmed that the swap state of the searched entry is “PRE_RUN”. If all the above conditions are confirmed, the memory area can be swapped out, and the process proceeds to the next step. On the other hand, if some of the conditions described above cannot be confirmed, swap-out cannot be performed, and the process returns to S201 (S206).

ノード内ジョブ制御プログラムP31は、スワップアウト対象メモリ領域のジョブID、タスク番号及びデータ名を含むスワップ要求をジョブ実行プロセスP4に送信し、ジョブ実行プロセスP4にスワップアウトを指示する。さらに、ノード内ジョブ制御プログラムP31は、そのメモリ領域に対応するメモリ管理テーブルP34のエントリのスワップ状態を「OUT」に変更し、そのメモリ領域のジョブID及びタスク番号を含むスワップ開始通知をジョブ管理プロセスP2に送信する。ジョブ管理プロセスP2は、スワップ開始通知に含まれるジョブID及びタスク番号をキーとしてタスク管理テーブルP24を検索し、検索されたエントリのスワップフラグを「BUSY」に変更する。スワップ処理が開始された後、S201に戻る(S207)。   The intra-node job control program P31 transmits a swap request including the job ID, task number, and data name of the swap-out target memory area to the job execution process P4 and instructs the job execution process P4 to perform swap-out. Further, the intra-node job control program P31 changes the swap state of the entry in the memory management table P34 corresponding to the memory area to “OUT”, and performs swap management notification including the job ID and task number of the memory area. Send to process P2. The job management process P2 searches the task management table P24 using the job ID and task number included in the swap start notification as keys, and changes the swap flag of the searched entry to “BUSY”. After the swap process is started, the process returns to S201 (S207).

次に、タスクの移動処理の詳細について説明する。システムを構成するスレーブノードの負荷(メモリ使用率、CPU使用率)に偏りがある場合、負荷が高いスレーブノードから負荷が低いスレーブノードへタスクを移動することによって、負荷の偏りを平準化する。一般に、負荷が高いスレーブで複数のタスクが実行されている可能性が高く、移動候補となるタスクは複数存在する。本発明では、以下の優先順位で移動候補となるタスクを選択する。
(1)スワップアウト直前のタスク。
(2)すぐにはスケジューリングされない(WAIT状態の)タスク。
(3)メモリの一部がスワップアウトされているタスク。
(4)スワップアウトされていないタスク。
Next, details of the task movement process will be described. When there is a bias in the load (memory usage rate, CPU usage rate) of the slave nodes constituting the system, the load bias is leveled by moving the task from the slave node having a high load to the slave node having a low load. In general, there is a high possibility that a plurality of tasks are executed by a slave with a high load, and there are a plurality of tasks that are movement candidates. In the present invention, a task that is a movement candidate is selected in the following priority order.
(1) Task immediately before swap-out.
(2) Tasks that are not scheduled immediately (in WAIT state).
(3) A task in which a part of the memory is swapped out.
(4) Tasks that have not been swapped out.

スワップアウトされたメモリ領域を持つタスクをスケジューリングするにはスワップインが必要となる。このため、スワップアウトが発生するとCPUの利用効率が低下する。また、本実施の形態では、移動後のタスクによって保持される全てのメモリ領域は、実メモリ上に割り当てられる。そこで、スワップアウト直前のタスクを優先的に移動することによって、スワップアウトの発生を抑制し、CPUの利用効率の低下を防止する。   To schedule a task with a swapped-out memory area, swap-in is required. For this reason, when swap-out occurs, the CPU utilization efficiency decreases. Further, in the present embodiment, all memory areas held by the moved task are allocated on the real memory. Therefore, by preferentially moving the task immediately before the swap-out, the occurrence of the swap-out is suppressed and a decrease in the CPU utilization efficiency is prevented.

また、スケジューリング直前のタスクをスワップアウトすると、すぐにスワップインが発生するため、CPUの利用効率が低下する。また、移動中のタスクはスケジューリングできないため、スケジューリング直前のタスクを移動対象として選択すると、CPUの利用効率を低下させる可能性がある。そこで、すぐにスケジューリングされないタスクを優先的にスケジューリング対象として選択する。   In addition, if the task immediately before scheduling is swapped out, swap-in occurs immediately, which reduces the CPU utilization efficiency. In addition, since a task that is moving cannot be scheduled, if the task immediately before scheduling is selected as a movement target, there is a possibility of reducing the CPU utilization efficiency. Therefore, a task that is not scheduled immediately is selected as a scheduling target with priority.

本実施の形態では、移動後のタスクを保持する全てのメモリ領域を実メモリ上に割り当てるため、スワップアウトされたタスクを移動すると、同時にスワップインを行うことになる。そこで、スワップアウトされたタスクを優先的に移動することによって、タスク移動中に実質的にスワップインを行い、処理時間を短縮する。   In this embodiment, all the memory areas that hold the task after the move are allocated on the real memory. Therefore, when the swapped-out task is moved, the swap-in is performed at the same time. Therefore, by preferentially moving the swapped-out task, the swap-in is substantially performed during the task movement, and the processing time is shortened.

次に、タスク移動の制御方法について詳しく説明する。このタスクの移動は、ジョブ管理プロセスP2のジョブ管理部P21が制御する。   Next, a method for controlling task movement will be described in detail. The movement of this task is controlled by the job management unit P21 of the job management process P2.

図11は、ジョブ制御プログラムP21が移動対象タスクを選択する手順を示すフローチャートである。   FIG. 11 is a flowchart illustrating a procedure by which the job control program P21 selects a movement target task.

タスクの実行状態が変化した場合、スレーブノードの負荷は変化する。また、本システムのスレーブノード数が変更した場合、スレーブノードの負荷のバランスが変化する。このため、タスクの移動を開始すべきかを判定する必要がある。例えば、スレーブノードが追加された場合、ジョブ制御プログラムP12は、スレーブ管理テーブルP22に、追加されたスレーブノードの情報を登録し、タスクの移動を開始すべきかを判定するために、次のステップに進む(S301)。   When the task execution state changes, the load on the slave node changes. Also, when the number of slave nodes in this system changes, the load balance of the slave nodes changes. For this reason, it is necessary to determine whether to start moving the task. For example, when a slave node is added, the job control program P12 registers the information of the added slave node in the slave management table P22 and determines whether to start moving a task in the next step. Proceed (S301).

次に、ジョブ制御プログラムP21は、計算機資源に余裕があるスレーブノードと、計算機資源が不足しているスレーブノードとが存在するか否かを判定する(S302)。具体的には、CPU資源とメモリ資源の、いずれかが不足するスレーブノードは、計算機資源が不足すると判定する。一方、いずれにも余裕があるスレーブノードは、計算機資源に余裕があると判定する。   Next, the job control program P21 determines whether there are slave nodes with sufficient computer resources and slave nodes with insufficient computer resources (S302). Specifically, a slave node in which either one of the CPU resource and the memory resource is insufficient determines that the computer resource is insufficient. On the other hand, a slave node that has a margin in both cases determines that there is a margin in computer resources.

CPU資源については、スレーブ管理テーブルP22に記載された最大タスク数と実行タスク数を比較することによって、CPU資源に余裕があるか否かを判定する。具体的には、最大タスク数が実行タスク数より小さい場合、CPU資源が不足すると判定する。また、実行タスク数が最大タスク数の一定割合(例えば、30%)以下であれば、CPU資源に余裕があると判定する。   As for the CPU resource, it is determined whether or not the CPU resource has a margin by comparing the maximum number of tasks described in the slave management table P22 with the number of execution tasks. Specifically, when the maximum number of tasks is smaller than the number of execution tasks, it is determined that CPU resources are insufficient. Further, if the number of execution tasks is equal to or less than a certain ratio (for example, 30%) of the maximum number of tasks, it is determined that there is a margin in CPU resources.

実行タスク数は、以下のように計算する。まず、スレーブ管理テーブルP22を参照し、実行タスク数を調べたいスレーブノードに対応するエントリを選択する。次に、そのエントリのタスクID一覧(タスクIDセット)を取得し、タスクIDセットを一時的に保持する。タスクIDはジョブID及びタスク番号を含むので、それらを分離する。タスクIDに含まれるジョブID及びタスク番号をキーとして移動中タスク管理テーブルP25を検索し、検索されたエントリの移動元スレーブIDが最初に選択されたスレーブ管理テーブルP22のエントリのスレーブIDに一致している場合、そのタスクは他のノードに移動中であるため、タスクIDセットから取り除く。さらに、移動中タスク管理テーブルP25の移動先スレーブIDに、最初に選択されたスレーブ管理テーブルP22のエントリのスレーブIDに一致するエントリが存在すれば、そのタスクは他のノードから自身へ移動中であるため、タスクIDセットに追加する。このように作成されたタスクIDセットに含まれるタスクIDの数が実行タスク数である。   The number of execution tasks is calculated as follows. First, referring to the slave management table P22, an entry corresponding to the slave node whose number of execution tasks is to be checked is selected. Next, the task ID list (task ID set) of the entry is acquired, and the task ID set is temporarily held. Since the task ID includes a job ID and a task number, they are separated. The moving task management table P25 is searched using the job ID and task number included in the task ID as keys, and the source slave ID of the searched entry matches the slave ID of the entry of the first selected slave management table P22. If so, it is removed from the task ID set because it is moving to another node. Furthermore, if there is an entry that matches the slave ID of the entry of the slave management table P22 selected first in the movement destination slave ID of the moving task management table P25, the task is moving from another node to itself. Therefore, it is added to the task ID set. The number of task IDs included in the task ID set created in this way is the number of execution tasks.

メモリ資源については、スレーブ管理テーブルP22に記載された最大メモリ量と使用メモリ量を比較することによって、メモリ資源に余裕があるか否かを判定する。具体的には、最大メモリ量が使用メモリ量より小さい場合、メモリ資源が不足すると判定する。また、使用メモリ量が最大メモリ量の一定割合(例えば、30%)以下であれば、メモリ資源に余裕があると判定する。   For the memory resource, it is determined whether or not there is a margin in the memory resource by comparing the maximum memory amount described in the slave management table P22 with the used memory amount. Specifically, when the maximum memory amount is smaller than the used memory amount, it is determined that memory resources are insufficient. Further, if the used memory amount is equal to or less than a certain percentage (for example, 30%) of the maximum memory amount, it is determined that there is a margin in memory resources.

使用メモリ量は以下のように計算する。CPU資源の確認処理で求めたタスクIDセットを、ジョブIDとタスク番号に分離し、分離されたジョブID及びタスク番号をキーとしてタスク管理テーブルP24を検索する。そして、検索されたエントリがそのスレーブノードで動作する(実際には、タスク移動完了後に動作する)タスクに対応する。これらエントリの全データ量の和が、当該ノードにおける使用メモリ量である。   The amount of memory used is calculated as follows. The task ID set obtained in the CPU resource confirmation process is separated into a job ID and a task number, and the task management table P24 is searched using the separated job ID and task number as a key. The retrieved entry corresponds to a task that operates on the slave node (actually, it operates after completion of task movement). The sum of the total data amounts of these entries is the used memory amount in the node.

このように、計算機資源に余裕があるスレーブノードと、計算機資源が不足しているスレーブノードとの両方がシステム内に存在する場合、S303に進む。一方、計算機資源に余裕があるスレーブノードと、計算機資源が不足しているスレーブノードとの一方しかシステム内に存在しない場合、タスクを移動せず、処理を終える(S302)。   As described above, when both the slave node having sufficient computer resources and the slave node having insufficient computer resources exist in the system, the process proceeds to S303. On the other hand, if only one of the slave node having sufficient computer resources and the slave node having insufficient computer resources exists in the system, the task is not moved and the process is finished (S302).

次に、ジョブ制御プログラムP21は、S302で調査した計算機資源が不足するスレーブノードで実行中のタスクのうち、移動可能なタスクを抽出する(S303)。具体的には、スレーブ管理テーブルP22を参照し、計算機資源が不足するスレーブノードに対応するエントリのタスクID一覧を取得する。さらに、タスクID一覧に記載されたタスクIDのジョブID及びタスク番号をキーとしてタスク管理テーブルP24を検索し、ジョブID及びタスク番号が一致するエントリ群を抽出する。このエントリ群が、そのスレーブノードで実行中のタスクに対応するエントリである。このエントリ群の中で、実行状態が「PRE_RUN」または「WAIT」であるタスクを抽出する。実行状態が上記のいずれかであるタスクは移動可能である。   Next, the job control program P21 extracts a moveable task among the tasks being executed in the slave node in which the computer resources investigated in S302 are insufficient (S303). Specifically, the slave management table P22 is referred to, and a task ID list of entries corresponding to slave nodes having insufficient computer resources is acquired. Further, the task management table P24 is searched using the job ID and task number of the task ID described in the task ID list as a key, and an entry group having the matching job ID and task number is extracted. This entry group is an entry corresponding to a task being executed on the slave node. In this entry group, a task whose execution state is “PRE_RUN” or “WAIT” is extracted. A task whose execution state is one of the above can be moved.

S303において、条件に一致するエントリが存在しないと判定された場合、移動可能なタスクが存在しないため、タスクを移動せず、処理を終える。一方、S303において、条件に一致するエントリを抽出できた場合、S305に進む(S304)。   If it is determined in S303 that there is no entry that matches the condition, there is no task that can be moved, so the task is not moved and the process ends. On the other hand, if an entry matching the condition can be extracted in S303, the process proceeds to S305 (S304).

次に、ジョブ制御プログラムP21は、S303において抽出されたタスク管理テーブルP24のエントリの中で、スワップフラグが「PRE_OUT」であるエントリがあるか否かを判定する(S305)。   Next, the job control program P21 determines whether or not there is an entry whose swap flag is “PRE_OUT” among the entries of the task management table P24 extracted in S303 (S305).

スワップフラグが「PRE_OUT」であるエントリが存在する場合、このエントリに対応するタスクは、スワップアウト直前の状態なので、移動対象タスクに選択する。さらに、S302で求めた計算機資源に余裕があるスレーブノードの一つを移動先ノードに選択する。そして、移動対象タスクのジョブID及びタスク番号を移動中タスク管理テーブルP25に追加し、タスクを実行中のノードのスレーブIDを移動中タスク管理テーブルP25の移動元スレーブIDに記載し、移動先ノードのスレーブIDを移動先スレーブIDに記載し、移動対象タスクの実行状態を移動中タスク管理テーブルP25の実行状態に記載する。その後、処理をS302に戻る(S306)。   If there is an entry whose swap flag is “PRE_OUT”, the task corresponding to this entry is in the state immediately before the swap-out, so it is selected as the task to be moved. Further, one of the slave nodes having sufficient computer resources obtained in S302 is selected as the movement destination node. Then, the job ID and task number of the task to be moved are added to the moving task management table P25, the slave ID of the node that is executing the task is described in the movement source slave ID of the moving task management table P25, and the movement destination node Is described in the destination slave ID, and the execution state of the movement target task is described in the execution state of the moving task management table P25. Thereafter, the process returns to S302 (S306).

S305において、スワップフラグが「PRE_OUT」であるエントリが存在しない場合、S303で抽出されたエントリ群から実行状態が「WAIT」であるエントリを抽出する。実行状態が「WAIT」であるエントリが存在する場合、S308へ進む。実行状態が「WAIT」であるエントリが存在しない場合、S311へ進む(S307)。   If there is no entry whose swap flag is “PRE_OUT” in S305, an entry whose execution state is “WAIT” is extracted from the entry group extracted in S303. If there is an entry whose execution state is “WAIT”, the process proceeds to S308. If there is no entry whose execution state is “WAIT”, the process proceeds to S311 (S307).

S308では、ジョブ制御プログラムP21は、S306で取り出されたエントリ群の各エントリのスワップフラグを確認し、スワップフラグが「SWAP」又は「BUSY」のタスクが存在するか否か判定する(S308)。   In S308, the job control program P21 confirms the swap flag of each entry of the entry group extracted in S306, and determines whether or not a task whose swap flag is “SWAP” or “BUSY” exists (S308).

S308において、スワップフラグが「SWAP」又は「BUSY」のタスクが存在すると判定された場合、そのタスクのいずれか一つを移動対象タスクにて選択する。続いて、S306と同様の手順で、移動対象タスクの移動先ノードを決定し、移動対象タスクの情報を移動中タスク管理テーブルP25に登録し、S302へ戻る(S309)。   If it is determined in S308 that there is a task whose swap flag is “SWAP” or “BUSY”, one of the tasks is selected as the movement target task. Subsequently, in the same procedure as in S306, the movement destination node of the movement target task is determined, the information of the movement target task is registered in the moving task management table P25, and the process returns to S302 (S309).

S308において、スワップフラグが「SWAP」のタスクも、「BUSY」のタスクも存在しないと判定された場合、スワップ中のタスクは存在しないので、S307で取り出したエントリ群の一つを移動対象タスクに選択する。その後、S306と同様の手順によって、移動対象タスクの移動先ノードを決定し、移動対象タスクの情報を移動中タスク管理テーブルP25に登録し、S302へ戻る(S310)。   If it is determined in S308 that there is no task whose swap flag is “SWAP” or “BUSY”, there is no task being swapped, so one of the entry groups extracted in S307 is set as the movement target task. select. Thereafter, the destination node of the movement target task is determined by the same procedure as S306, the information of the movement target task is registered in the moving task management table P25, and the process returns to S302 (S310).

S307で実行状態が「WAIT」であるエントリが存在しないと判定された場合、S303において抽出されたエントリ群のすべてのエントリの実行状態は「PRE_RUN」である。これらエントリ群のエントリのスワップフラグを確認し、スワップフラグが「SWAP」又は「BUSY」のタスクが存在するか否かを判定する(S311)。   If it is determined in S307 that there is no entry whose execution state is “WAIT”, the execution state of all entries in the entry group extracted in S303 is “PRE_RUN”. The swap flags of the entries of these entry groups are confirmed, and it is determined whether or not there is a task whose swap flag is “SWAP” or “BUSY” (S311).

S311において、スワップフラグが「SWAP」又は「BUSY」のタスクが存在すると判定された場合、そのタスクの一つを移動対象タスクに選択する。その後、S306と同様の手順で、移動対象タスクの移動先ノードを決定し、移動対象タスクの情報を移動中タスク管理テーブルP25に登録し、S302へ戻る(S312)。   If it is determined in S311 that there is a task whose swap flag is “SWAP” or “BUSY”, one of the tasks is selected as a movement target task. Thereafter, the destination node of the movement target task is determined in the same procedure as in S306, the information of the movement target task is registered in the moving task management table P25, and the process returns to S302 (S312).

S311において、スワップフラグが「SWAP」のタスクも、「BUSY」のタスクも存在しないと判定された場合、スワップ中のタスクは存在しないので、S303で抽出したエントリ群のいずれかを移動対象タスクとして選択する。続いて、S306と同様の手順で、移動対象タスクの移動先ノードを決定し、移動対象タスクの情報を移動中タスク管理テーブルP25に登録し、S302へ戻る(S313)。   If it is determined in S311 that there is no task whose swap flag is “SWAP” or “BUSY”, there is no task being swapped, and therefore one of the entry groups extracted in S303 is set as the movement target task. select. Subsequently, a destination node of the movement target task is determined in the same procedure as in S306, information on the movement target task is registered in the moving task management table P25, and the process returns to S302 (S313).

このような手順によって、移動中タスク管理テーブルP25に移動対象タスクの情報が作成される。移動対象タスク選択処理が完了した後、ジョブ制御プログラムP21は、移動中タスク管理テーブルP25に記載された各タスクを移動する。   By such a procedure, information on the movement target task is created in the moving task management table P25. After the movement target task selection process is completed, the job control program P21 moves each task described in the moving task management table P25.

次に、タスク移動処理の詳細を説明する。   Next, details of the task movement process will be described.

図12は、本発明の実施形態のタスクを移動する手順を示すフローチャートである。   FIG. 12 is a flowchart illustrating a procedure for moving a task according to the embodiment of this invention.

ジョブ制御プログラムP21は、移動中タスク管理テーブルP25からエントリを一つ抽出し(S401)、以下の手順でタスクの移動処理を行う。なお、S401において抽出されたエントリに対応するタスクが、移動対象タスクである。   The job control program P21 extracts one entry from the moving task management table P25 (S401), and performs a task moving process according to the following procedure. Note that the task corresponding to the entry extracted in S401 is the movement target task.

まず、移動中タスク管理テーブルP25に記載された全てのタスクについて、移動が完了しているか否かを判定する(S402)。その結果、全てのタスクの移動が完了している場合、タスク移動処理を終了する(S402)。   First, it is determined whether or not the movement has been completed for all tasks described in the moving task management table P25 (S402). As a result, when all the tasks have been moved, the task moving process is terminated (S402).

S403では、ジョブ制御プログラムP21は、移動対象タスクのジョブIDとタスク番号を含む移動開始要求を、移動対象タスクを実行中のスレーブノードのノード内ジョブ管理プロセスP3に送信する。ジョブIDとタスク番号をキーとしてスレーブ管理テーブルP22のタスクID一覧を検索する。検索されたエントリのノードアドレスが、移動対象タスクを実行中のノードのアドレスである。   In S403, the job control program P21 transmits a movement start request including the job ID and task number of the movement target task to the intra-node job management process P3 of the slave node that is executing the movement target task. The task ID list in the slave management table P22 is searched using the job ID and task number as keys. The node address of the retrieved entry is the address of the node that is executing the movement target task.

ノード内ジョブ管理プロセスP3は、移動開始要求を受けると、移動開始要求に含まれるジョブID及びタスク番号をキーとしてタスク管理テーブルP33を検索し、検索されたエントリの実行状態を確認する。   Upon receiving the movement start request, the intra-node job management process P3 searches the task management table P33 using the job ID and task number included in the movement start request as keys, and confirms the execution status of the searched entry.

実行状態が「PRE_RUN」又は「WAIT」であれば、状態を「MIG_SEND」に変更する。さらに、ノード内ジョブ管理プロセスP3は、このタスクを実行中のジョブ実行プロセスP4に、移動対象タスクの実行状態を「MIG_SEND」に変更するよう要求する。これを受けたジョブ実行プロセスP4は、移動対象タスクに対応するタスク管理テーブルP44のエントリの実行状態を「MIG_SEND」に変更する。その後、ノード内ジョブ管理プロセスP3は、移動開始通知をジョブ管理プロセスP2に返信する。   If the execution state is “PRE_RUN” or “WAIT”, the state is changed to “MIG_SEND”. Further, the intra-node job management process P3 requests the job execution process P4 that is executing this task to change the execution state of the migration target task to “MIG_SEND”. Receiving this, the job execution process P4 changes the execution state of the entry of the task management table P44 corresponding to the movement target task to “MIG_SEND”. Thereafter, the intra-node job management process P3 returns a movement start notification to the job management process P2.

ジョブ制御プログラムP21は、ノード内ジョブ管理プロセスから移動開始通知を受けると、移動対象タスクに対応するタスク管理テーブルP24内のエントリの実行状態を「MIG_SEND」に変更し(S403)、S405へ進む(S404)。   When the job control program P21 receives a movement start notification from the intra-node job management process, it changes the execution state of the entry in the task management table P24 corresponding to the movement target task to “MIG_SEND” (S403), and proceeds to S405 ( S404).

移動対象タスクに対応するタスク管理テーブルP33のエントリの実行状態が「PRE_RUN」、「WAIT」以外である場合、ノード内ジョブ管理プロセスP3は、ジョブ管理プロセスP2にエラーを返信する。ジョブ制御プログラムP21は、このエラーを受けた場合、移動対象タスクを移動することができないので、移動処理を中断し、S401に戻る(S404)。   If the execution state of the entry in the task management table P33 corresponding to the movement target task is other than “PRE_RUN” or “WAIT”, the intra-node job management process P3 returns an error to the job management process P2. When the job control program P21 receives this error, it cannot move the task to be moved, so the movement process is interrupted and the process returns to S401 (S404).

ジョブ制御プログラムP21は、移動対象タスクに対応する移動中タスク管理テーブルP25のエントリの移動先スレーブIDを参照し、このスレーブIDをキーとしてスレーブ管理テーブルP22を検索する。検索されたエントリのノードアドレスが、移動先タスクを生成するノードのアドレスである。ジョブ制御プログラムP21は、スレーブ管理テーブルP22から検索されたエントリのタスクID一覧に、移動対象タスクのジョブIDに一致するジョブIDを持つタスクIDが含まれているか否かを判定する。   The job control program P21 refers to the movement destination slave ID of the entry in the moving task management table P25 corresponding to the movement target task, and searches the slave management table P22 using this slave ID as a key. The node address of the retrieved entry is the address of the node that generates the destination task. The job control program P21 determines whether or not the task ID list of the entry retrieved from the slave management table P22 includes a task ID having a job ID that matches the job ID of the movement target task.

判定の結果、このようなタスクIDが含まれていない場合、そのノードでジョブ実行プロセスP4が実行されていないため、プロセス生成要求(図8のM02)を移動先ノードのノード内ジョブ管理プロセスP3に送信して、移動対象タスクを実行するためのジョブ実行プロセスP4を生成する。   As a result of the determination, if such a task ID is not included, the job execution process P4 is not executed on that node, so a process generation request (M02 in FIG. 8) is sent to the intra-node job management process P3 of the destination node. To generate a job execution process P4 for executing the task to be moved.

その後、ジョブ制御プログラムP21は、タスク生成要求(図8のM08)を移動先ノードのノード内ジョブ管理プロセスP3に送信し、移動先タスクを生成する(S405)。このとき、タスク生成要求には、ジョブID、タスク番号及び初期状態が「MIG_RECV」であることを記載する。ノード内ジョブ管理プロセスP3は、タスク生成要求を受信すると、ジョブ実行プロセスP4にタスク生成要求を転送し、ジョブ実行プロセスP4内に移動先タスクを生成する。このときジョブ実行プロセスP4のタスク管理テーブルP44、及びノード内ジョブ管理プロセスP3内のタスク管理テーブルP33には、実行状態が「MIG_RECV」であり、ジョブID及びタスク番号が、移動対象タスクのそれらと一致するエントリが作成される。   Thereafter, the job control program P21 transmits a task generation request (M08 in FIG. 8) to the intra-node job management process P3 of the movement destination node, and generates a movement destination task (S405). At this time, the task generation request describes that the job ID, task number, and initial state are “MIG_RECV”. Upon receiving the task generation request, the intra-node job management process P3 transfers the task generation request to the job execution process P4, and generates a destination task in the job execution process P4. At this time, in the task management table P44 of the job execution process P4 and the task management table P33 in the intra-node job management process P3, the execution state is “MIG_RECV”, and the job ID and task number are the same as those of the migration target task. A matching entry is created.

次に、ジョブ制御プログラムP21は、移動対象先タスクに対応するエントリをタスク管理テーブルP24に生成する。新規に生成されるエントリのジョブID及びタスク番号は、移動対象先タスクのそれらと一致し、実行状態は「MIG_RECV」であり、全データ量及びスワップ量は0であり、スワップフラグは「IDLE」である。   Next, the job control program P21 generates an entry corresponding to the movement target task in the task management table P24. The job ID and task number of the newly generated entry match those of the migration target task, the execution state is “MIG_RECV”, the total data amount and the swap amount are 0, and the swap flag is “IDLE”. It is.

次に、ジョブ制御プログラムP21は、移動対象タスクのジョブを実行する全てのジョブ実行プロセスP4に、移動先タスク生成通知を送信する。まず、ジョブ制御プログラムP21は。スレーブ管理テーブルP22のタスクID一覧を参照し、移動対象タスクのジョブIDを含むエントリを抽出する。これらのエントリに対応するノードでジョブが実行中なので、これらのエントリのノードアドレスに対して、移動対象タスクのジョブID、タスク番号、移動先ノードのアドレスを含む移動先タスク生成通知を送信する。   Next, the job control program P21 transmits a transfer destination task generation notification to all the job execution processes P4 that execute the job of the transfer target task. First, the job control program P21. The entry including the job ID of the task to be moved is extracted by referring to the task ID list in the slave management table P22. Since jobs are being executed at the nodes corresponding to these entries, a destination task generation notification including the job ID of the task to be moved, the task number, and the address of the destination node is transmitted to the node addresses of these entries.

各ノードで動作するノード内ジョブ管理プロセスP3は、移動先タスク生成通知を受信すると、タスク管理テーブルP33に移動先タスクの情報を登録する。ここで新規に生成されるエントリの実行状態は「MIG_RECV」となる。次に、ノード内ジョブ管理プロセスP3は、移動先タスク生成通知に含まれるジョブIDに対応するジョブを実行中のジョブ実行プロセスP4に、移動先タスク生成通知を転送する。   When the intra-node job management process P3 operating at each node receives the migration destination task generation notification, it registers information on the migration destination task in the task management table P33. Here, the execution state of the newly generated entry is “MIG_RECV”. Next, the intra-node job management process P3 transfers the transfer destination task generation notification to the job execution process P4 that is executing the job corresponding to the job ID included in the transfer destination task generation notification.

ジョブ実行プロセスP4は、移動先タスク生成通知を受信すると、移動先タスクの情報をタスク管理テーブルP44に登録する。ここで新規に生成されるエントリの実行状態は「MIG_RECV」になる。エントリが生成されると、ジョブ実行プロセスP4は、移動準備完了通知をノード内ジョブ管理プロセスP3に返信する。   When the job execution process P4 receives the transfer destination task generation notification, the job execution process P4 registers the information of the transfer destination task in the task management table P44. Here, the execution state of the newly generated entry is “MIG_RECV”. When the entry is generated, the job execution process P4 returns a migration preparation completion notification to the in-node job management process P3.

ノード内ジョブ管理プロセスP3は、移動準備完了通知を受信すると、ジョブ管理プロセスP2に移動準備完了通知を転送する。ジョブ制御プログラムP21は、移動先タスク生成通知を送信したすべてのノードから移動準備完了通知を受信した後、S407に進む(S406)。   Upon receiving the migration preparation completion notification, the intra-node job management process P3 transfers the migration preparation completion notification to the job management process P2. The job control program P21 proceeds to S407 after receiving the migration preparation completion notification from all the nodes that transmitted the migration destination task generation notification (S406).

ジョブ制御プログラムP21は、移動元タスクを実行中のジョブ実行プロセスに、移動対象タスクのジョブID、タスク番号、移動先ノードのアドレスを含むデータ移動要求を送信する。具体的には、S403で説明した手順と同様に、ノード内ジョブ管理プロセスを経由してデータ移動要求を送信する。   The job control program P21 transmits a data movement request including the job ID of the movement target task, the task number, and the address of the movement destination node to the job execution process that is executing the movement source task. Specifically, a data movement request is transmitted via the intra-node job management process, similarly to the procedure described in S403.

ジョブ実行プロセスP4のタスク移動プログラムP43は、データ移動要求を受信すると、データ移動要求に含まれるタスク番号をキーとしてメモリ管理テーブルP45を検索する。検索されたエントリが、移動する必要があるメモリ領域に対応する。タスク移動プログラムP43は、検索されたエントリのデータIDを参照し、対応するメモリ領域からデータを読み取り、移動先ノードのジョブ実行プロセスP4に送信する。移動先ノードのジョブ実行プロセスP4は、データを受信すると、メモリ管理テーブルP45に受信したデータの情報を登録する。但し、データIDはノード毎に管理されるメモリ領域のIDであるため、移動元ノードのメモリ管理テーブルP45とは同じ値にはならない。   Upon receiving the data movement request, the task movement program P43 of the job execution process P4 searches the memory management table P45 using the task number included in the data movement request as a key. The retrieved entry corresponds to a memory area that needs to be moved. The task migration program P43 refers to the data ID of the retrieved entry, reads the data from the corresponding memory area, and transmits it to the job execution process P4 of the migration destination node. When the job execution process P4 of the migration destination node receives the data, it registers the received data information in the memory management table P45. However, since the data ID is an ID of a memory area managed for each node, it does not have the same value as the memory management table P45 of the migration source node.

また、データがスワップアウト済みである場合、メモリ管理テーブル45のデータIDは空欄で、スワップファイル名にスワップファイルの名前が記載されている。この場合、スワップファイルの内容を送信する。スワップファイルからデータを送信した場合、移動先ノードにはスワップファイルは作成されず、データは実メモリ領域に割り当てられる。すべてのデータ送信が完了した後、転送元ノードのジョブ実行プロセスP4は、メモリ管理テーブルP45から送信されたデータに対応するエントリを削除し、対応するメモリ領域を開放する。そして、ノード内ジョブ管理プロセスP3を経由して、データ移動完了通知をジョブ管理プロセスP2に送信する(S407)。   When the data has been swapped out, the data ID of the memory management table 45 is blank, and the name of the swap file is described in the swap file name. In this case, the contents of the swap file are transmitted. When data is transmitted from the swap file, the swap file is not created in the migration destination node, and the data is allocated to the real memory area. After all data transmission is completed, the job execution process P4 of the transfer source node deletes the entry corresponding to the data transmitted from the memory management table P45, and releases the corresponding memory area. Then, a data movement completion notification is transmitted to the job management process P2 via the intra-node job management process P3 (S407).

ジョブ制御プログラムP21は、データ移動完了通知を受信したら、移動元タスクを実行中のジョブ実行プロセスP4に、移動対象タスクのジョブID、タスク番号を含むタスク廃棄要求を送信する。具体的には、S403で説明した手順と同様に、ノード内ジョブ管理プロセスを経由してタスク廃棄要求を送信する。タスク実行プロセスP4は、タスク廃棄要求を受信すると、廃棄が要求されたタスクを削除し、削除されたタスクに対応するエントリをタスク管理テーブルP44から削除する。   Upon receiving the data movement completion notification, the job control program P21 transmits a task discard request including the job ID and task number of the movement target task to the job execution process P4 that is executing the movement source task. Specifically, a task discard request is transmitted via the intra-node job management process, as in the procedure described in S403. When the task execution process P4 receives the task discard request, the task execution process P4 deletes the task requested to be discarded, and deletes the entry corresponding to the deleted task from the task management table P44.

さらに、ジョブ制御プログラムP21は、移動中タスク管理テーブルP25から移動対象タスクに対応するエントリを検索し、検索されたエントリの実行状態を取得する。そして、ジョブ制御プログラムP21は、実行状態、移動対象タスクのジョブID、タスク番号を含む移動タスク復帰要求を、移動先ノードのジョブ実行プロセスP4に送信する。具体的には、S403で説明した手順と同様に、ノード内ジョブ管理プロセスP3を経由して移動タスク復帰要求が送信される。   Further, the job control program P21 searches the entry corresponding to the movement target task from the moving task management table P25, and acquires the execution state of the searched entry. Then, the job control program P21 transmits a movement task return request including the execution state, the job ID of the movement target task, and the task number to the job execution process P4 of the movement destination node. Specifically, a moving task return request is transmitted via the intra-node job management process P3 as in the procedure described in S403.

ジョブ実行プロセスP4は、移動タスク復帰要求を受信すると、移動タスク復帰要求に含まれるタスク番号をキーとしてタスク管理テーブルP44を検索し、検索されたエントリの実行状態を移動タスク復帰要求に含まれる実行状態に変更する(S408)。   When the job execution process P4 receives the move task return request, the job execution process P4 searches the task management table P44 using the task number included in the move task return request as a key, and executes the execution state of the retrieved entry included in the move task return request. The state is changed (S408).

以上のステップによってタスクの移動処理が完了する。ジョブ制御プログラムP21は、S401に戻り、移動中タスク管理テーブルP25に記載された他のタスクを移動し、全てのタスクの移動が完了するまでこの処理を繰り返信する。   The task moving process is completed by the above steps. The job control program P21 returns to S401, moves other tasks described in the moving task management table P25, and repeats this process until all the tasks have been moved.

本発明は、明細書に開示した内容から当業者が可能な範囲で変更可能な範囲をその範疇に含む。例えば、本実施の形態では、3種類の計算機(クライアントノード10、マスタノード20、スレーブノード30)を利用したが、これら計算機は共通のものでもよい。例えば、クライアントプロセスP1がマスタノード20上で動作し、マスタノード20をクライアントノード10と共通に運用してもよい。また、マスタノード20上でノード内ジョブ管理プロセスP3とジョブ実行プロセスP4が動作し、マスタノード20をスレーブノード30の一つとして運用してもよい。   The present invention includes within its scope a range that can be changed by a person skilled in the art from the content disclosed in the specification. For example, in this embodiment, three types of computers (client node 10, master node 20, and slave node 30) are used, but these computers may be common. For example, the client process P1 may operate on the master node 20, and the master node 20 may be operated in common with the client node 10. Further, the in-node job management process P3 and the job execution process P4 may operate on the master node 20 and the master node 20 may be operated as one of the slave nodes 30.

また、本発明の実施の形態では、初期データの格納場所として分散FSを利用したが、すべてのノードから同一のパス名でアクセス可能なファイルシステムであれば、他のファイルシステムを利用することが可能である。例えば、NFS(Network File System)を利用してもよい。   In the embodiment of the present invention, the distributed FS is used as a storage location of initial data. However, other file systems may be used as long as the file system can be accessed from all nodes with the same path name. Is possible. For example, NFS (Network File System) may be used.

10 クライアントノード
20 マスタノード
30 スレーブノード
P1 クライアントプロセス
P2 ジョブ管理プロセス
P21 ジョブ制御プログラム
P22 スレーブ管理テーブル
P23 ジョブ管理テーブル
P24 タスク管理テーブル
P25 移動中タスク管理テーブル
P3 ノード内ジョブ管理プロセス
P31 ノード内ジョブ制御プログラム
P32 ホスト内ジョブ管理テーブル
P33 タスク管理テーブル
P34 メモリ管理テーブル
P4 ジョブ実行プロセス
P41 タスク制御プログラム
P42 データ移動プログラム
P43 タスク移動プログラム
P44 タスク管理テーブル
P45 メモリ管理テーブル
P46 タスク
P47 タスク処理コード
P5 分散FS
101 CPU
102 LAN I/F
103 入出力I/F
104 メモリ
105 ストレージI/F
106 キーボード
107 マウス
108 ディスプレイ
109 記憶装置
10 client node 20 master node 30 slave node P1 client process P2 job management process P21 job control program P22 slave management table P23 job management table P24 task management table P25 moving task management table P3 intra-node job management process P31 intra-node job control program P32 Job management table in host P33 Task management table P34 Memory management table P4 Job execution process P41 Task control program P42 Data movement program P43 Task movement program P44 Task management table P45 Memory management table P46 Task P47 Task processing code P5 Distributed FS
101 CPU
102 LAN I / F
103 I / O I / F
104 Memory 105 Storage I / F
106 Keyboard 107 Mouse 108 Display 109 Storage Device

Claims (12)

ネットワークによって接続された複数の計算機を備え、前記各計算機はジョブを構成する複数のタスクをスケジューリングに従って実行する計算機システムであって、
前記計算機間でタスクを移動する場合、前記タスクの実行状態を参照して、処理が終了したタスクを優先的に移動すべきタスクに選択することを特徴とする計算機システム。
A computer system comprising a plurality of computers connected by a network, each computer executing a plurality of tasks constituting a job according to scheduling,
When a task is moved between the computers, a computer system characterized by selecting a task that has been processed as a task to be moved with priority by referring to an execution state of the task.
前記計算機システムは、前記各計算機が、複数のタスクを並列実行する並列実行環境を構成し、
前記各タスクの処理と、前記ジョブを構成する全てのタスクの処理の完了を待つ処理とが一つの処理フェーズに定義され、
前記計算機間でタスクを移動する場合、前記タスクの実行状態を参照して、前記処理フェーズにおいて処理が終了したタスクを優先的に移動すべきタスクに選択することを特徴とする請求項1に記載の計算機システム。
The computer system constitutes a parallel execution environment in which each computer executes a plurality of tasks in parallel,
The processing of each task and the processing of waiting for the completion of the processing of all the tasks constituting the job are defined in one processing phase,
2. The task according to claim 1, wherein when a task is moved between the computers, a task that has been processed in the processing phase is selected as a task to be preferentially moved with reference to an execution state of the task. Computer system.
前記各計算機は、タスクによって利用されるメモリ領域に格納されたデータを二次記憶装置に退避するスワップアウト機能及び前記退避されたデータをメモリに格納するスワップイン機能を備え、
前記退避されたデータを利用するタスクを、優先的に移動すべきタスクに選択することを特徴とする請求項1に記載の計算機システム。
Each of the computers has a swap-out function for saving data stored in a memory area used by a task to a secondary storage device and a swap-in function for storing the saved data in a memory,
2. The computer system according to claim 1, wherein a task that uses the saved data is selected as a task to be moved with priority.
前記各計算機は、スワップインするデータが少ないタスクを優先的に実行されるようにスケジューリングすることを特徴とする請求項3に記載の計算機システム。   The computer system according to claim 3, wherein each of the computers schedules a task with less data to be swapped in so that the task is preferentially executed. 前記各計算機は、処理が終了したタスクが利用するデータを優先的にスワップアウトすべきデータに選択することを特徴とする請求項3に記載の計算機システム。   4. The computer system according to claim 3, wherein each of the computers selects data to be used by a task for which processing has been completed as data to be swapped out preferentially. 前記各計算機は、
前記タスクによって利用されるメモリ領域に格納されたデータをスワップアウトする前に待機状態の時間を設定し、
前記待機状態であるタスクを優先的に移動すべきタスクに選択することを特徴とする請求項3に記載の計算機システム。
Each of the computers is
Set the waiting time before swapping out the data stored in the memory area used by the task,
4. The computer system according to claim 3, wherein the task in the standby state is selected as a task to be moved with priority.
ネットワークで相互に接続された複数の計算機上で、ジョブを構成する複数のタスクをスケジューリングに従って実行する計算機システムにおけるタスクの管理方法であって、
前記方法は、
前記計算機間でタスクを移動する場合、前記タスクの実行状態を判定するステップと、
前記判定されたタスクの実行状態に基づいて、処理が終了したタスクを優先的に移動すべきタスクに選択するステップとを含むことを特徴とするタスクの管理方法。
A method for managing tasks in a computer system that executes a plurality of tasks constituting a job according to scheduling on a plurality of computers connected to each other via a network,
The method
When moving a task between the computers, determining the execution state of the task;
Selecting a task that has been processed as a task to be preferentially moved based on the determined execution state of the task.
前記計算機システムは、前記各計算機が、複数のタスクを並列実行する並列実行環境を構成し、
前記各タスクの処理と、前記ジョブを構成する全てのタスクの処理の完了を待つ処理とが一つの処理フェーズに定義され、
前記タスクを選択するステップでは、前記処理フェーズにおいて処理が終了したタスクを優先的に移動すべきタスクに選択することを特徴とする請求項7に記載のタスクの管理方法。
The computer system constitutes a parallel execution environment in which each computer executes a plurality of tasks in parallel,
The processing of each task and the processing of waiting for the completion of the processing of all the tasks constituting the job are defined in one processing phase,
8. The task management method according to claim 7, wherein, in the step of selecting the task, a task that has been processed in the processing phase is selected as a task to be moved preferentially.
前記各計算機は、タスクによって利用されるメモリ領域に格納されたデータを二次記憶装置に退避するスワップアウト機能及び前記退避されたデータをメモリに格納するスワップイン機能を備え、
前記方法は、前記退避されたデータを利用するタスクを、優先的に移動すべきタスクに選択するステップを含むことを特徴とする請求項7に記載のタスクの管理方法。
Each of the computers has a swap-out function for saving data stored in a memory area used by a task to a secondary storage device and a swap-in function for storing the saved data in a memory,
The method according to claim 7, wherein the method includes a step of selecting a task that uses the saved data as a task to be preferentially moved.
前記方法は、スワップインするデータが少ないタスクを優先的に実行されるようにスケジューリングするステップを含むことを特徴とする請求項9に記載のタスクの管理方法。   The method according to claim 9, wherein the method includes a step of scheduling so that a task with a small amount of data to be swapped in is preferentially executed. 前記方法は、処理が終了したタスクが利用するデータを優先的にスワップアウトすべきデータに選択するステップを含むことを特徴とする請求項9に記載のタスクの管理方法。   The method according to claim 9, wherein the method includes a step of selecting data to be preferentially swapped out as data to be used by a task for which processing has been completed. 前記方法は、
前記タスクによって利用されるメモリ領域に格納されたデータをスワップアウトする前に待機状態の時間を設定するステップと、
前記待機状態であるタスクを優先的に移動すべきタスクに選択するステップとを含むことを特徴とする請求項9に記載のタスクの管理方法。
The method
Setting a waiting time before swapping out data stored in a memory area used by the task;
The task management method according to claim 9, further comprising: selecting the task in the standby state as a task to be moved preferentially.
JP2010062647A 2010-03-18 2010-03-18 Computer system and task management method Pending JP2011197896A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010062647A JP2011197896A (en) 2010-03-18 2010-03-18 Computer system and task management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010062647A JP2011197896A (en) 2010-03-18 2010-03-18 Computer system and task management method

Publications (1)

Publication Number Publication Date
JP2011197896A true JP2011197896A (en) 2011-10-06

Family

ID=44876038

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010062647A Pending JP2011197896A (en) 2010-03-18 2010-03-18 Computer system and task management method

Country Status (1)

Country Link
JP (1) JP2011197896A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015194899A (en) * 2014-03-31 2015-11-05 富士通株式会社 Control program, control method, and control device
WO2016075818A1 (en) * 2014-11-14 2016-05-19 三菱電機株式会社 Server device, client device and server device program
JP2019061359A (en) * 2017-09-25 2019-04-18 富士ゼロックス株式会社 Program and information processing device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015194899A (en) * 2014-03-31 2015-11-05 富士通株式会社 Control program, control method, and control device
US9973575B2 (en) 2014-03-31 2018-05-15 Fujitsu Limited Distributed processing system and control method
WO2016075818A1 (en) * 2014-11-14 2016-05-19 三菱電機株式会社 Server device, client device and server device program
JPWO2016075818A1 (en) * 2014-11-14 2017-04-27 三菱電機株式会社 Server device, client device, server device program, session management method, and client server system
CN107003951A (en) * 2014-11-14 2017-08-01 三菱电机株式会社 Server unit, client terminal device and server program of device
JP2019061359A (en) * 2017-09-25 2019-04-18 富士ゼロックス株式会社 Program and information processing device

Similar Documents

Publication Publication Date Title
JP4569846B2 (en) I / O node control method and method
US7325041B2 (en) File distribution system in which partial files are arranged according to various allocation rules associated with a plurality of file types
JP4612710B2 (en) Transaction parallel control method, database management system, and program
JP6963168B2 (en) Information processing device, memory control method and memory control program
EP1408407A2 (en) Method and apparatus for task allocation in a distributed computing environment
JP2005196602A (en) System configuration changing method in unshared type database management system
JP2007286860A (en) Data transfer method and information processor
CN111404931B (en) Remote data transmission method based on persistent memory
WO2020215752A1 (en) Graph computing method and device
JPWO2005116832A1 (en) Computer system, method and program for controlling job execution in a distributed processing environment
US20170366612A1 (en) Parallel processing device and memory cache control method
JP2011197896A (en) Computer system and task management method
CN113127444B (en) Data migration method, device, server and storage medium
Bali et al. A new hierarchical transaction model for mobile adhoc network environment
JP2002297429A (en) Distributed transaction processing system, distributed transaction processing method and distributed transaction processing program
JP2004046372A (en) Distributed system, resource allocation method, program, and recording medium with which resource allocation program is recorded
JP5238469B2 (en) Database processing method, database processing program, and database instruction apparatus
JP3076280B2 (en) Inter-process communication method using shared memory
JP2005107632A (en) Eai server, and program for eai server
JPH11306151A (en) Decentralized object processor and program storage medium
JP5601473B2 (en) Shared resource management system and shared resource management method
JP7350807B2 (en) Message sending/receiving methods and operating systems
JP2005107824A (en) Eai server, and program for eai server
JP5288272B2 (en) I / O node control method and method
JP2023023082A (en) Application control program, and application control method

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309