Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP4650504B2 - Process control device, process control method, and process control program - Google Patents
[go: Go Back, main page]

JP4650504B2 - Process control device, process control method, and process control program - Google Patents

Process control device, process control method, and process control program Download PDF

Info

Publication number
JP4650504B2
JP4650504B2 JP2008053474A JP2008053474A JP4650504B2 JP 4650504 B2 JP4650504 B2 JP 4650504B2 JP 2008053474 A JP2008053474 A JP 2008053474A JP 2008053474 A JP2008053474 A JP 2008053474A JP 4650504 B2 JP4650504 B2 JP 4650504B2
Authority
JP
Japan
Prior art keywords
resource
cpu
execution
release
waiting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2008053474A
Other languages
Japanese (ja)
Other versions
JP2009211386A (en
Inventor
愛子 三角
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2008053474A priority Critical patent/JP4650504B2/en
Publication of JP2009211386A publication Critical patent/JP2009211386A/en
Application granted granted Critical
Publication of JP4650504B2 publication Critical patent/JP4650504B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Multi Processors (AREA)
  • Advance Control (AREA)

Description

本発明は、プロセス制御装置、プロセス制御方法およびプロセス制御プログラムに関する。   The present invention relates to a process control device, a process control method, and a process control program.

本発明に関連する技術として、システム共有資源をロックした状態で、ワークロードクラスが、そのワークロードクラスに与えられたCPU時間を使い切った場合に、プロセスの実行を打ち切らず、無条件にシステム共有資源が解放されるまで、割り当て時間をオーバーしてCPU資源を与えるCPU配分装置があった。ワークロードクラスは、CPUの配分単位である。   As a technology related to the present invention, when a workload class uses up the CPU time given to the workload class while the system shared resource is locked, the system is unconditionally shared without stopping the execution of the process. There has been a CPU distribution device that gives CPU resources over the allotted time until resources are released. The workload class is a CPU allocation unit.

図24は、本発明に関連するCPU配分装置の例を示すブロック図である。図24に例示するCPU配分装置は、CPU配分テーブル202と、目標時間格納テーブル203と、プロセス対応テーブル204と、使用時間格納テーブル205と、インターバル初期化手段250と、目標時間計算手段210と、プロセス選択手段220と、プロセス実行手段240と、プロセス管理テーブル207と、実行可能プロセスキュー記憶手段206と、資源管理テーブル208とを備える。   FIG. 24 is a block diagram showing an example of a CPU distribution device related to the present invention. The CPU distribution device illustrated in FIG. 24 includes a CPU distribution table 202, a target time storage table 203, a process correspondence table 204, a usage time storage table 205, an interval initialization unit 250, a target time calculation unit 210, A process selection unit 220, a process execution unit 240, a process management table 207, an executable process queue storage unit 206, and a resource management table 208 are provided.

CPU配分テーブル202は、各ワークロードクラスに対するCPU配分比率を記憶する。目標時間格納テーブル203は、ワークロードクラス毎の目標時間を記憶する。プロセス対応テーブル204は、各プロセスのワークロードクラス番号を記憶する。使用時間格納テーブル205は、ワークロードクラス毎のCPU使用時間を記憶する。インターバル初期化手段250は、一定時間毎に使用時間格納テーブル205に記憶されるCPU使用時間を初期化する。資源管理テーブル208には、資源の解放を待つプロセスのキューが格納される。   The CPU distribution table 202 stores a CPU distribution ratio for each workload class. The target time storage table 203 stores a target time for each workload class. The process correspondence table 204 stores the workload class number of each process. The usage time storage table 205 stores the CPU usage time for each workload class. The interval initialization unit 250 initializes the CPU usage time stored in the usage time storage table 205 at regular intervals. The resource management table 208 stores a queue of processes waiting for resource release.

目標時間計算手段210は、CPU配分比率に応じて目標時間を設定する。プロセス決定手段240は、実行可能プロセスキュー記憶手段206に格納された実行可能プロセスを実行し、プロセス管理テーブル207にプロセスの状態を記録する。   The target time calculation unit 210 sets a target time according to the CPU distribution ratio. The process determination unit 240 executes the executable process stored in the executable process queue storage unit 206 and records the process status in the process management table 207.

プロセス選択手段220は、以下に示すように動作する。図25および図26は、図24に示すCPU配分装置のプロセス選択手段220の動作を示すフローチャートである。プロセス選択手段220は、実行可能プロセスキュー記憶手段206の先頭にキューイングされているプロセスのプロセス番号および実行優先順位を取得し、それぞれ変数n,wにセットする(ステップS201)。そして、実行優先順位wが、ユーザが設定可能な優先順位より高いか否かを判定する(ステップS202)   The process selection unit 220 operates as described below. 25 and 26 are flowcharts showing the operation of the process selection means 220 of the CPU distribution device shown in FIG. The process selection means 220 acquires the process number and execution priority of the process queued at the head of the executable process queue storage means 206, and sets them in the variables n and w, respectively (step S201). Then, it is determined whether or not the execution priority order w is higher than the priority order that can be set by the user (step S202).

実行優先順位wが、ユーザが設定可能な優先順位より高い場合には、プロセス実行手段240に制御を渡す。また、実行優先順位wが、ユーザが設定可能な優先順位の範囲な範囲内である場合には、ステップS203に移行する。   If the execution priority w is higher than the priority that can be set by the user, control is passed to the process execution means 240. On the other hand, if the execution priority w is within the range of the priority order that can be set by the user, the process proceeds to step S203.

ステップS203では、プロセス番号nのワークロードクラス番号をプロセス対応テーブル204から取得する。そして、そのワークロードクラスのCPU目標時間を、目標時間格納テーブル203から取得し(ステップS204)、そのワークロードクラスのCPU使用時間を、使用時間格納テーブル205から取得する(ステップS205)。   In step S203, the workload class number of process number n is acquired from the process correspondence table 204. Then, the CPU target time of the workload class is acquired from the target time storage table 203 (step S204), and the CPU usage time of the workload class is acquired from the usage time storage table 205 (step S205).

ステップS205の後、プロセス選択手段220は、CPU使用時間がCPU目標時間未満であるか否かを判定する(ステップS206)。CPU使用時間がCPU目標時間未満である場合に、プロセス実行手段240に制御を渡す。また、CPU使用時間がCPU目標時間以上である場合、ステップS207に移行する。   After step S205, the process selection unit 220 determines whether or not the CPU usage time is less than the CPU target time (step S206). When the CPU usage time is less than the CPU target time, control is passed to the process execution means 240. If the CPU usage time is equal to or longer than the CPU target time, the process proceeds to step S207.

ステップS207において、プロセス選択手段220は、実行可能プロセスキュー記憶手段206に格納された次のプロセスがキューイングされているか否かを判定する。次のプロセスがキューイングされている場合には、ステップS208に移行する。また、次のプロセスがキューイングされていない場合には、プロセス選択手段220に制御を渡す(換言すれば、ステップS201から処理を開始する)。   In step S207, the process selection unit 220 determines whether the next process stored in the executable process queue storage unit 206 is queued. If the next process is queued, the process proceeds to step S208. If the next process is not queued, control is passed to the process selection unit 220 (in other words, the process is started from step S201).

ステップS208では、実行可能プロセスキュー記憶手段206に格納されたの次のプロセスのプロセス番号、および実行優先順位を取得し、それぞれ変数n,wにセットする。その後、ステップS202以降の処理を繰り返す。   In step S208, the process number and execution priority of the next process stored in the executable process queue storage unit 206 are acquired and set in the variables n and w, respectively. Then, the process after step S202 is repeated.

以上のような動作により、システム共有資源をロックした状態で、ワークロードクラスが、そのワークロードクラスに与えられたCPU時間を使い切った場合に、プロセスの実行を打ち切らず、無条件にシステム共有資源が解放されるまで、割り当て時間をオーバーしてCPU資源を与える。このような動作によって、他のワークロードクラスのプロセスが配分されたCPU資源をまだ使用していないにもかかわらず、CPU時間を使い切った他のワークロードクラスが取得しているシステム共有資源を待ったまま実行できない状態に陥ることを防止していた。なお、システム共有資源をロックする場合には、必ず、ユーザが設定可能な優先順位の範囲よりも高い実行優先順位に設定する。そして、実行優先順位をもとに、システム共有資源取得中か否かの判断を行っていた。   With the above operation, if the workload class uses up the CPU time given to the workload class while the system shared resource is locked, the process execution is not aborted and the system shared resource is unconditionally CPU resources are allocated over the allotted time until is released. Due to such an operation, the process of another workload class waits for the system shared resource acquired by another workload class that has used up the CPU time even though the CPU resource is not yet used. It was prevented from falling into a state where it could not be executed. When the system shared resource is locked, the execution priority is always set to be higher than the priority range that can be set by the user. Then, based on the execution priority, it is determined whether or not system shared resources are being acquired.

また、他の方式として、システムが使用したCPU時間はワークロードクラスへの配分対象としない方式がある。この方式では、CPU時間全体からシステムが使用したCPU時間を除いた残りの時間について、ワークロードクラス毎に配分比率を指定する。そして、ワークロードクラス毎にCPU使用時間を累積していき、各ワークロードクラスに配分されたCPU時間を越えた場合には、そのワークロードクラスで実行しているプロセスの優先順位を低くする。このように制御することにより、配分されたCPU資源をまだ使用していないワークロードクラスのプロセスに優先的にCPU資源が割り当てられるようにしている。   As another method, there is a method in which the CPU time used by the system is not subject to allocation to the workload class. In this method, an allocation ratio is designated for each workload class for the remaining time excluding the CPU time used by the system from the entire CPU time. Then, the CPU usage time is accumulated for each workload class, and when the CPU time allocated to each workload class is exceeded, the priority order of processes executed in the workload class is lowered. By controlling in this way, CPU resources are preferentially allocated to workload class processes that have not yet used the allocated CPU resources.

また、特許文献1には、ジョブの性質に従って予め分類された各ジョブグループに対するCPU資源の配分比率を指定できるようにし、そのCPU資源の配分比率と、実際に各ジョブに割り当てられた配分実績とに基づいてジョブスケジュールが行われるようにするジョブスケジュール処理方式が記載されている。   Japanese Patent Laid-Open No. 2004-26883 allows designation of a CPU resource distribution ratio for each job group classified in advance according to the nature of the job, and shows the CPU resource distribution ratio and the actual distribution allocated to each job. Describes a job schedule processing method that allows a job schedule to be performed based on the above.

また、特許文献2には、共有資源解放要求処理において、ジョブが共有資源を解放すると、そのジョブが一時的なCPU割り当て保証ジョブであるか否かを判定し、一時的なCPU割り当て保証ジョブである場合、一時的なCPUの割り当てを解除するジョブのスケジュール方法が記載されている。   Further, in Patent Document 2, when a job releases a shared resource in the shared resource release request process, it is determined whether or not the job is a temporary CPU allocation guarantee job. In some cases, a job scheduling method for releasing the temporary CPU assignment is described.

また、特許文献3には、リアルタイム処理トランザクションが、ディレード処理型トランザクションが処理を完了するまで資源待ちとなる場合、そのディレード処理型トランザクションが動作するタスクの実行優先度を上げるタスク優先度変更方式が記載されている。   Further, Patent Document 3 discloses a task priority change method for increasing the execution priority of a task in which a delayed processing type transaction operates when a real time processing transaction waits for a resource until the delayed processing type transaction completes processing. Are listed.

特開昭62−210546号公報(第1ページ)JP 62-210546 A (first page) 特開2004−148512号公報(段落0034,0035)JP 2004-148512 A (paragraphs 0034, 0035) 特開平10−40117号公報(段落0007)JP 10-40117 A (paragraph 0007)

図24に示すCPU配分装置では、ワークロードクラスを大きな類似機能のまとまりで設定した場合(例えば、バッチ業務、オンライン業務、開発業務でワークロードクラスを分ける等の場合)には、システム共有資源の取得区間をオーバーしてCPU資源を与えても、オーバーしたCPU時間が配分の設定値から大きくずれることはなかった。   In the CPU distribution device shown in FIG. 24, when a workload class is set as a group of large similar functions (for example, when a workload class is divided into batch work, online work, development work, etc.), the system shared resource Even if CPU resources were given over the acquisition interval, the over-CPU time did not deviate significantly from the distribution setting value.

ところが、CPU単体性能向上に伴い、1つのOSで多くの業務を行うようになり、類似機能をさらにいくつかのワークロードクラスに分割してきめ細かく設定する必要性が増えてきた。例えば、バッチ業務、オンライン業務1、オンライン業務2、オンライン業務3、開発業務等のようにワークロードクラスを分ける必要が生じる場合があった。CPU配分の設定値が小さくなると、システム共有資源のロック区間をオーバーしてCPU資源を与えた場合に、CPU配分の設定値からずれる割合が大きくなり、これにより全体のCPU配分を崩すようになってきた。また、類似機能をさらにいくつかのワークロードクラスに分割することにより、システムが共有資源をロックする場合の他に、ワークロードクラス間で資源(例えば、オンライン業務共有資源)を共有する場合も生じるようになった。共有資源がシステムでなく特定業務に限定される場合には、その特定業務が実行される優先順位の範囲内で高い優先順位となっていればよく、全ての業務よりも高い実行優先順位(すなわち、ユーザが設定可能な優先順位の範囲よりも高い実行優先順位)には設定しない。このため、あるワークロードクラスでワークロードクラス間共有資源を取得したままCPU配分時間を使い切ったために、他のワークロードクラスがCPU配分時間を使い切っていないにもかかわらず、ワークロードクラス間共有資源待ちのままCPU資源を使用することができない状態に陥る場合が生じるようになった。   However, as the performance of a single CPU has been improved, a lot of work has been performed with one OS, and the need to finely divide similar functions into several workload classes has increased. For example, it may be necessary to divide workload classes such as batch business, online business 1, online business 2, online business 3, and development business. If the CPU allocation setting value becomes small, when the CPU resource is given beyond the lock section of the system shared resource, the ratio deviating from the CPU allocation setting value becomes large, thereby destroying the entire CPU allocation. I came. Furthermore, by dividing the similar function into several workload classes, in addition to the case where the system locks shared resources, there are cases where resources (for example, online business shared resources) are shared among the workload classes. It became so. If the shared resource is limited to a specific job rather than a system, it should be a higher priority within the priority range in which the specific job is executed, and a higher execution priority (ie, higher than all jobs). The execution priority is not set higher than the range of priority that can be set by the user. For this reason, a shared resource between workload classes is used even though another workload class has not used up the CPU allocation time because the CPU allocation time has been used up while a shared resource between workload classes has been acquired in a certain workload class. In some cases, the CPU resources cannot be used while waiting.

また、システムが使用したCPU時間はワークロードクラスへの配分対象としない方式では、システム資源の取得によるCPU配分バランスの崩れは発生しない。しかし、ワークロードクラスで実行しているプロセスから依頼されて動作したシステム部分は、配分対象ではないため、結果的にコンピュータが各ワークロードクラスのために使用したCPU資源は、配分比率とは異なるものになるという問題がある。また、システム部分以外で、ワークロードクラス間の共有資源を取得するような場合には、あるワークロードクラスでワークロードクラス間共有資源を取得したままCPU配分時間を使い切ったために、他のワークロードクラスがCPU配分時間を使い切っていないにもかかわらず、ワークロードクラス間共有資源待ちのままCPU資源を使用することができない状態に陥るという問題も発生する。   Further, in a method in which the CPU time used by the system is not targeted for allocation to the workload class, the CPU distribution balance is not disrupted due to acquisition of system resources. However, since the system part requested and operated by the process executing in the workload class is not the allocation target, the CPU resource used by the computer for each workload class as a result is different from the allocation ratio. There is a problem of becoming something. In addition, when acquiring shared resources between workload classes outside of the system part, the CPU allocation time has been used while acquiring shared resources between workload classes in a certain workload class, and other workloads have been used. There is also a problem that the CPU resource cannot be used while waiting for the shared resource between workload classes even though the class does not use up the CPU allocation time.

そこで、本発明は、ワークロードクラスの定め方によらず、CPU配分時間を使い切っていないにもかかわらず共有資源待ちのままCPU資源を使用することができない状態に陥ることを防止することができ、プロセスの強制的実行によるCPU配分比率からのずれを抑えることができるプロセス制御装置、プロセス制御方法およびプロセス制御プログラムを提供することを目的とする。   Therefore, the present invention can prevent the CPU resource from being used while waiting for the shared resource even though the CPU allocation time is not used up, regardless of how the workload class is defined. An object of the present invention is to provide a process control device, a process control method, and a process control program that can suppress a deviation from a CPU distribution ratio due to forced execution of a process.

本発明のプロセス制御装置は、実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定する強制実行対象特定手段と、前記資源確保プロセスを強制的に実行させる強制実行手段と、強制実行手段からプロセスの実行に伴い資源の解放を要求されると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する資源解放手段とを備えることを特徴とする。   The process control apparatus of the present invention does not use up the CPU until the CPU target time when there is no process in the executable process queue that is a queue of executable processes that does not use up the CPU until the CPU target time. A process that operates in the workload class and waits for a resource to be released, a forcible execution target specifying means for specifying a resource securing process that secures the resource, and forcibly executing the resource securing process And a forced execution means that, when requested to release a resource in accordance with the execution of a process by the forced execution means, releases the resource, interrupts the process, and waits for the release of the resource. Resource release means for adding to the queue.

また、本発明のプロセス制御方法は、実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定し、前記資源確保プロセスを強制的に実行させ、プロセスの実行に伴い資源の解放を要求されると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加することを特徴とする。   The process control method of the present invention uses up the CPU until the CPU target time when there is no process in the executable process queue that is a queue of executable processes that does not use up the CPU until the CPU target time. A process that operates in a non-workload class that is waiting for a resource to be released and a resource securing process that secures the resource, forcibly execute the resource securing process, and When a resource release is requested in accordance with execution, the resource is released, the process is suspended, and a release waiting process waiting for the resource release is added to the executable process queue.

また、本発明のプロセス制御プログラムは、コンピュータに、実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定する強制実行対象特定処理、前記資源確保プロセスを強制的に実行させる強制実行処理、および、強制実行処理でのプロセスの実行に伴い資源の解放要求が生じると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する資源解放処理を実行させることを特徴とする。   Also, the process control program of the present invention can achieve up to the CPU target time when there is no process in the executable process queue that is a queue of executable processes that has not used up the CPU until the CPU target time. A process that operates in a workload class that does not use up the CPU and that waits for a resource to be released, a forcible execution target specifying process that specifies a resource securing process that secures the resource, and the resource securing process Forcible execution processing to be forcibly executed, and when a resource release request is generated in accordance with execution of a process in the forcible execution processing, the resource is released, the process is interrupted, and the release wait waiting for the resource to be released It is characterized by executing a resource release process that adds a process to the executable process queue. .

本発明によれば、ワークロードクラスの定め方によらず、CPU配分時間を使い切っていないにもかかわらず共有資源待ちのままCPU資源を使用することができない状態に陥ることを防止することができ、プロセスの強制的実行によるCPU配分比率からのずれを抑えることができる。   According to the present invention, it is possible to prevent the CPU resource from being in a state where the CPU resource cannot be used while waiting for the shared resource even though the CPU allocation time is not used up, regardless of how the workload class is determined. The deviation from the CPU distribution ratio due to the forced execution of the process can be suppressed.

以下、本発明の実施形態を図面を参照して説明する。
図1は、本発明のプロセス制御装置の例を示すブロック図である。プロセス制御装置は、コンピュータ10によって実現される。プロセス制御装置10は、プロセス対応テーブル101と、CPU配分テーブル102と、目標時間格納テーブル103と、使用時間格納テーブル104と、プロセス管理テーブル105と、実行可能プロセスキュー記憶手段106と、資源管理テーブル107と、強制実行情報格納テーブル108と、目標時間計算手段110と、プロセス選択手段120と、強制実行プロセス選択手段130と、プロセス実行手段140と、インターバル初期化手段150と、資源取得手段160と、資源解放手段170とを備える。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing an example of a process control apparatus of the present invention. The process control device is realized by the computer 10. The process control apparatus 10 includes a process correspondence table 101, a CPU distribution table 102, a target time storage table 103, a usage time storage table 104, a process management table 105, an executable process queue storage means 106, and a resource management table. 107, forced execution information storage table 108, target time calculation means 110, process selection means 120, forced execution process selection means 130, process execution means 140, interval initialization means 150, resource acquisition means 160, Resource release means 170.

プロセス対応テーブル101は、各プロセスのワークロードクラス番号を記憶する記憶手段である。図2は、プロセス対応テーブル101を示す説明図である。図2に示すように、プロセス対応テーブル101には、プロセス番号順に各プロセスのワークロードクラス番号が格納される。なお、ワークロードクラスはCPUの配分単位であり、ワークロードクラス番号は、各ワークロードクラスの識別情報である。また、プロセス番号は、各プロセスの識別情報である。   The process correspondence table 101 is a storage unit that stores the workload class number of each process. FIG. 2 is an explanatory diagram showing the process correspondence table 101. As shown in FIG. 2, the process correspondence table 101 stores the workload class number of each process in the order of the process number. The workload class is a CPU allocation unit, and the workload class number is identification information of each workload class. The process number is identification information of each process.

CPU配分テーブル102は、各ワークロードクラスのCPU配分比率を記憶する記憶手段である。図3は、CPU配分テーブル102を示す説明図である。図3に示すように、CPU配分テーブル102には、ワークロードクラス番号順にCPU配分比率が格納される。CPU配分比率は、例えば、百分率で表された値であるが、百分率以外で表されていてもよい。   The CPU distribution table 102 is a storage unit that stores the CPU distribution ratio of each workload class. FIG. 3 is an explanatory diagram showing the CPU distribution table 102. As shown in FIG. 3, the CPU distribution table 102 stores CPU distribution ratios in the order of workload class numbers. The CPU distribution ratio is, for example, a value expressed as a percentage, but may be expressed as a percentage other than a percentage.

目標時間格納テーブル103は、各ワークロードクラスのCPU目標時間を記憶する記憶手段である。CPU目標時間は、CPU配分比率に応じて各ワークロードクラスに割り当てられた時間である。図4は、目標時間格納テーブル103を示す説明図である。図4に示すように、目標時間格納テーブル103には、ワークロードクラス番号順にCPU目標時間が格納される。   The target time storage table 103 is storage means for storing the CPU target time of each workload class. The CPU target time is a time allocated to each workload class according to the CPU distribution ratio. FIG. 4 is an explanatory diagram showing the target time storage table 103. As shown in FIG. 4, the target time storage table 103 stores CPU target times in the order of workload class numbers.

使用時間格納テーブル104は、各ワークロードクラスのCPU使用時間を記憶する記憶手段である。CPU使用時間は、CPUにより実際に処理を実行したワークロードクラス毎の時間である。図5は、使用時間格納テーブル104を示す説明図である。図5に示すように、使用時間格納テーブル104には、ワークロードクラス番号順にCPU使用時間が格納される。   The usage time storage table 104 is storage means for storing the CPU usage time of each workload class. The CPU usage time is the time for each workload class that is actually executed by the CPU. FIG. 5 is an explanatory diagram showing the usage time storage table 104. As shown in FIG. 5, the CPU usage time is stored in the usage time storage table 104 in the order of the workload class number.

プロセス管理テーブル105は、各プロセスの状態を示す情報を記憶する記憶手段である。図6は、プロセス管理テーブル105を示す説明図である。図6に示すように、プロセス管理テーブル105には、実行可フラグ、資源待ちフラグ、実行中断フラグ、実行優先順位、資源待ちしている資源番号の組が、プロセス番号順に格納される。実行可フラグは、実行可能か否かを示すフラグであり、セットされている状態(オン)で実行可能であることを表す。資源待ちフラグは、資源(共有資源)を待っている状態であるか否かを示すフラグであり、セットされている状態で資源待ち状態であることを表す。実行中断フラグは、実行を中断する要求があるか否かを示すフラグであり、セットされている状態で実行を中断する要求があることを表す。また、各種フラグがセットされていない状態をオフと記す。   The process management table 105 is a storage unit that stores information indicating the state of each process. FIG. 6 is an explanatory diagram showing the process management table 105. As shown in FIG. 6, the process management table 105 stores a set of an executable flag, a resource waiting flag, an execution interruption flag, an execution priority, and a resource number waiting for resources in the order of process numbers. The executable flag is a flag indicating whether or not execution is possible, and represents that execution is possible in a set state (ON). The resource waiting flag is a flag indicating whether or not the resource (shared resource) is waiting, and indicates that the resource waiting state is set. The execution interruption flag is a flag indicating whether or not there is a request to interrupt the execution, and represents that there is a request to interrupt the execution in the set state. A state where various flags are not set is described as OFF.

プロセスが解放を待つ資源には、システム資源だけでなく、ワークロードクラス間で共有される資源も含まれる。   The resources for which a process waits for release include not only system resources but also resources shared among workload classes.

また、資源番号は、各資源を識別するための識別情報である。   The resource number is identification information for identifying each resource.

図7は、実行可能プロセスキュー記憶手段106を示す説明図である。実行可能プロセスキュー記憶手段106は、実行可能プロセスが実行優先順位順にキューイングされる記憶手段である。具体的には、実行可能プロセスキュー記憶手段106は、実行優先順位順にキューイングされたプロセス番号および実行優先順位の情報を記憶する。   FIG. 7 is an explanatory diagram showing the executable process queue storage unit 106. The executable process queue storage unit 106 is a storage unit in which executable processes are queued in the order of execution priority. Specifically, the executable process queue storage means 106 stores information on process numbers and execution priorities queued in the order of execution priority.

図8は、資源管理テーブル107を示す説明図である。資源管理テーブル107は、資源番号順に、資源を確保しているテナントプロセスのプロセス番号を記憶するとともに、資源待ちのプロセスが実行優先順位順にキューイングされる記憶手段である。図8に示すように、“0”,“1”等の資源番号順に、テナントプロセスのプロセス番号および資源待ちのプロセス番号が記憶される。   FIG. 8 is an explanatory diagram showing the resource management table 107. The resource management table 107 is a storage unit that stores process numbers of tenant processes that have secured resources in the order of resource numbers and queues processes waiting for resources in the order of execution priority. As shown in FIG. 8, the process number of the tenant process and the process number waiting for the resource are stored in the order of resource numbers such as “0” and “1”.

図9は、強制実行情報格納テーブル108を示す説明図である。強制実行情報格納テーブル108は、資源番号と、資源解放時に優先的に資源を渡すプロセスのプロセス番号が格納される記憶手段である。   FIG. 9 is an explanatory diagram showing the forced execution information storage table 108. The forced execution information storage table 108 is a storage unit that stores a resource number and a process number of a process that preferentially delivers a resource when releasing the resource.

目標時間計算手段110は、CPU配分テーブル102に格納されているワークロードクラス毎のCPU配分比率をもとに、一定のインターバル時間で各ワークロードクラスが使用可能なCPU時間を計算し、目標時間格納テーブル103に記憶させる。   The target time calculation means 110 calculates the CPU time that can be used by each workload class at a fixed interval time based on the CPU distribution ratio for each workload class stored in the CPU distribution table 102, and the target time Store in the storage table 103.

プロセス選択手段120は、実行可能プロセスキュー記憶手段106にキューイングされているプロセスを先頭から順番にサーチし、目標時間格納テーブル103に格納されているCPU目標時間までCPUを使い切っていないプロセスを特定する。そのようなプロセスを特定したならば、そのプロセスを選択して、プロセス実行手段140に制御を渡す。また、CPU目標時間までCPUを使い切っていないプロセスが、キューイングされた最後のプロセスまで存在しなかった場合には、強制実行プロセス選択手段130に制御を渡す。プロセス選択手段120は、プロセスがCPU目標時間までCPUを使い切っているか否かを以下のように判定する。すなわち、実行可能プロセスキュー記憶手段106にキューイングされているプロセスのワークロードクラス番号をプロセス対応テーブル101から取得し、そのワークロードクラス番号のCPU使用時間およびCPU目標時間を、使用時間格納テーブル104、目標時間格納テーブル103で参照し、両者を比較することによって、プロセスがCPU目標時間までCPUを使い切っているか否かを判定すればよい。   The process selection unit 120 searches the processes queued in the executable process queue storage unit 106 in order from the top, and identifies the processes that have not used up the CPU until the CPU target time stored in the target time storage table 103. To do. If such a process is specified, the process is selected and control is passed to the process execution means 140. Also, if the process that has not used up the CPU until the CPU target time does not exist until the last queued process, control is passed to the forced execution process selection means 130. The process selection unit 120 determines whether the process has used up the CPU until the CPU target time as follows. That is, the workload class number of the process queued in the executable process queue storage means 106 is acquired from the process correspondence table 101, and the CPU usage time and CPU target time of the workload class number are obtained as the usage time storage table 104. Then, referring to the target time storage table 103 and comparing them, it may be determined whether or not the process has used up the CPU until the CPU target time.

強制実行プロセス選択手段130は、CPU目標時間までCPUを使い切っていないプロセスが、実行可能プロセスキュー記憶手段106にキューイングされたプロセス中に存在しなかった場合、以下の処理を行う。強制実行プロセス選択手段130は、目標時間格納テーブル103と使用時間格納テーブル104とを参照し、CPU目標時間までCPUを使い切っていないワークロードクラスをサーチする。さらに、強制実行プロセス選択手段130は、プロセス対応テーブル101を参照し、そのワークロードクラスで動作するプロセスをサーチする。そして、強制実行プロセス選択手段130は、プロセス管理テーブル105に格納されているそのプロセスの状態が資源待ちである場合、対象となる資源番号と資源解放時に優先的に資源を渡すプロセスの番号とを強制実行情報格納テーブル108に格納し、対象となる資源を確保しているプロセスのプロセス番号を資源管理テーブル107から取得して、プロセス実行手段140に制御を渡す。   The forcible execution process selection unit 130 performs the following process when a process that has not used up the CPU until the CPU target time does not exist in the process queued in the executable process queue storage unit 106. The forced execution process selection means 130 refers to the target time storage table 103 and the usage time storage table 104 and searches for a workload class that does not use up the CPU until the CPU target time. Further, the forced execution process selection unit 130 refers to the process correspondence table 101 and searches for a process that operates in the workload class. Then, when the process state stored in the process management table 105 is waiting for a resource, the forced execution process selection unit 130 obtains a target resource number and a process number to which a resource is preferentially delivered when the resource is released. The process number of the process which is stored in the forced execution information storage table 108 and the target resource is secured is acquired from the resource management table 107, and control is passed to the process execution means 140.

プロセス実行手段140は、CPU目標時間までCPUを使い切っていないプロセスとしてプロセス選択手段120に選択されたプロセスや、資源を確保しているプロセスとして資源管理テーブル107から強制実行プロセス選択手段130によって取得されたプロセスに対して以下の処理を行う。プロセス実行手段140は、それらのプロセスを実行可能プロセスキュー記憶手段106からデキューする。そして、プロセス実行手段140は、そのプロセスのワークロードクラスのCPU使用時間がCPU目標時間に到達するか、あるいは、プロセス管理テーブル105中の実行中断フラグがセットされるまで、そのプロセスを実行するとともに、そのプロセスのワークロードクラスの使用時間格納テーブル104中のCPU使用時間に実行時間を加算する。プロセス実行手段140は、プロセスの実行終了後に、強制実行情報格納テーブル108中に登録されている資源番号を削除する。   The process execution means 140 is acquired by the forced execution process selection means 130 from the resource management table 107 as a process selected by the process selection means 120 as a process that does not use up the CPU until the CPU target time, or as a process that secures resources. The following processing is performed on the processed process. The process execution unit 140 dequeues these processes from the executable process queue storage unit 106. Then, the process execution unit 140 executes the process until the CPU usage time of the workload class of the process reaches the CPU target time or the execution interruption flag in the process management table 105 is set. The execution time is added to the CPU usage time in the usage time storage table 104 of the workload class of the process. The process execution means 140 deletes the resource number registered in the forced execution information storage table 108 after completion of the process execution.

インターバル初期化手段150は、一定のインターバル時間毎に動作し、使用時間格納テーブル104中の各ワークロードクラスが使用したCPU使用時間を0にセットする。   The interval initialization unit 150 operates at regular intervals, and sets the CPU usage time used by each workload class in the usage time storage table 104 to zero.

資源取得手段160は、資源の取得(確保)がプロセスから要求されると、資源管理テーブル107を参照し、その資源が既に取得されているか否かを判定する。その資源が未だ取得されていない場合、資源取得手段160は、資源の取得を要求したプロセス(資源取得要求プロセス)のプロセス番号を、テナントプロセスのプロセス番号として資源管理テーブル107に格納する。また、資源が既に取得されている場合には、資源取得要求プロセスを資源管理テーブル107中の資源待ちプロセスキューにつなぎ、プロセス管理テーブル105中の資源待ちフラグをセットし、プロセス管理テーブル105中の資源待ちしている資源番号として、その既に取得されている資源の番号をセットする。なお、プロセスをキューにつなぐとは、プロセスをキューに追加することである。   When resource acquisition (reservation) is requested from a process, the resource acquisition unit 160 refers to the resource management table 107 and determines whether or not the resource has already been acquired. If the resource has not yet been acquired, the resource acquisition unit 160 stores the process number of the process that requested acquisition of the resource (resource acquisition request process) in the resource management table 107 as the process number of the tenant process. If the resource has already been acquired, the resource acquisition request process is connected to the resource waiting process queue in the resource management table 107, the resource waiting flag in the process management table 105 is set, and the process management table 105 The number of the resource already acquired is set as the resource number waiting for the resource. Note that “connecting a process to a queue” means adding a process to the queue.

資源解放手段170は、資源を解放するとともに、解放した資源の番号が強制実行情報格納テーブル108の資源番号と一致している場合には、強制実行情報格納テーブル108に格納されているプロセスを資源管理テーブル107の資源待ちプロセスキューからデキューし、資源番号が一致していない場合には、資源管理テーブル107の資源待ちプロセスキューの先頭のプロセスをデキューする。そして、資源解放手段170は、デキューしたプロセスの番号を資源管理テーブル107のテナントプロセスのプロセス番号にセットする。さらに、デキューしたプロセスのプロセス管理テーブル105の実行可フラグをセットし、資源待ちフラグをリセットし、そのプロセスを実行可能プロセスキュー106につなぐ。資源解放手段170は、解放資源が強制実行情報格納テーブル108の資源番号と一致している場合には、最後に資源解放要求プロセスのプロセス管理テーブル105の実行中断フラグと実行可フラグをセットし、資源解放要求プロセスを実行可能プロセスキュー106にキューイングし、プロセス実行手段140に制御を戻す。   The resource release means 170 releases the resources, and if the number of the released resources matches the resource number of the forced execution information storage table 108, the resource release means 170 executes the process stored in the forced execution information storage table 108 as a resource. Dequeue from the resource waiting process queue in the management table 107. If the resource numbers do not match, the process at the head of the resource waiting process queue in the resource management table 107 is dequeued. Then, the resource release unit 170 sets the dequeued process number to the process number of the tenant process in the resource management table 107. Further, the executable flag in the process management table 105 of the dequeued process is set, the resource waiting flag is reset, and the process is connected to the executable process queue 106. If the released resource matches the resource number of the forced execution information storage table 108, the resource releasing unit 170 finally sets the execution suspension flag and the executable flag in the process management table 105 of the resource release request process, The resource release request process is queued in the executable process queue 106, and control is returned to the process execution means 140.

プロセス対応テーブル101、CPU配分テーブル102、目標時間格納テーブル103、使用時間格納テーブル104、プロセス管理テーブル105、実行可能プロセスキュー記憶手段106、資源管理テーブル107、および強制実行情報格納テーブル108は、例えば、コンピュータ10が備える記憶装置によって実現される。また、目標時間計算手段110、プロセス選択手段120、強制実行プロセス選択手段130、プロセス実行手段140、インターバル初期化手段150、資源取得手段160、および資源解放手段170は、例えば、プログラム(プロセス制御プログラム)に従って動作するコンピュータ10のCPUによって実現される。例えば、コンピュータ10のCPUが、プロセス制御プログラムを読み込み、そのプログラムに従って、目標時間計算手段110、プロセス選択手段120、強制実行プロセス選択手段130、プロセス実行手段140、インターバル初期化手段150、資源取得手段160、および資源解放手段170として動作する。   The process correspondence table 101, CPU distribution table 102, target time storage table 103, usage time storage table 104, process management table 105, executable process queue storage means 106, resource management table 107, and forced execution information storage table 108 are, for example, This is realized by a storage device included in the computer 10. The target time calculation unit 110, the process selection unit 120, the forced execution process selection unit 130, the process execution unit 140, the interval initialization unit 150, the resource acquisition unit 160, and the resource release unit 170 are, for example, a program (process control program). This is realized by the CPU of the computer 10 that operates in accordance with (1). For example, the CPU of the computer 10 reads the process control program, and according to the program, the target time calculation means 110, the process selection means 120, the forced execution process selection means 130, the process execution means 140, the interval initialization means 150, the resource acquisition means 160 and resource release means 170.

次に、本発明の動作について説明する。
まず、各ワークロードクラスのCPU目標時間を算出して目標時間格納テーブル103に記憶させる動作について説明する。なお、CPU配分テーブル102には、予め定められたワークロードクラス毎のCPU配分比率が設定されている。図10は、CPU目標時間を目標時間格納テーブル103に記憶させる動作の例を示すフローチャートである。
Next, the operation of the present invention will be described.
First, the operation of calculating the CPU target time for each workload class and storing it in the target time storage table 103 will be described. In the CPU distribution table 102, a CPU distribution ratio for each predetermined workload class is set. FIG. 10 is a flowchart illustrating an example of an operation for storing the CPU target time in the target time storage table 103.

まず、目標時間計算手段110は、CPU配分テーブル102に記憶されているワークロードクラス毎のCPU配分比率を読み込み(ステップS111)、全ワークロードクラスのCPU配分比率の合計値を計算する(ステップS112)。既に説明したように、CPU配分比率は、例えば、百分率で表された値であるが、百分率以外で表されていてもよい。   First, the target time calculation unit 110 reads the CPU distribution ratio for each workload class stored in the CPU distribution table 102 (step S111), and calculates the total value of the CPU distribution ratios for all workload classes (step S112). ). As already described, the CPU distribution ratio is, for example, a value expressed as a percentage, but may be expressed as other than a percentage.

次に、目標時間計算手段110は、各ワークロードクラスのCPU目標時間をそれぞれ計算する(ステップS113)。目標時間計算手段110は、ワークロードクラス毎に、「一定のインターバル時間」に、ステップS112で求めた合計値に対するCPU配分比率の割合を乗じることで、個々のワークロードクラスのCPU目標時間を計算する。「一定のインターバル時間」とは、インターバル初期化手段150が、使用時間格納テーブル104に格納されたCPU使用時間を0に初期化する周期である。この一定のインターバル時間をIとし、ステップS112で計算した全ワークロードクラスのCPU配分比率の合計値をSとし、CPU目標時間の計算対象としているワークロードクラスのCPU配分比率をRとすると、目標時間計算手段110は、個々のワークロードクラス毎に、I×R/Sを計算することにより、各ワークロードクラスのCPU目標時間を計算する。このように、目標時間計算手段110は、一定のインターバル時間をCPU配分比率に応じて配分することで、各ワークロードクラスのCPU目標時間を計算する。   Next, the target time calculation means 110 calculates the CPU target time for each workload class (step S113). The target time calculation means 110 calculates the CPU target time for each workload class by multiplying the “certain interval time” by the ratio of the CPU distribution ratio to the total value obtained in step S112 for each workload class. To do. The “fixed interval time” is a cycle in which the interval initialization unit 150 initializes the CPU usage time stored in the usage time storage table 104 to zero. Assuming that this fixed interval time is I, the total value of CPU distribution ratios of all workload classes calculated in step S112 is S, and the CPU distribution ratio of the workload classes for which CPU target time is calculated is R, the target The time calculation means 110 calculates the CPU target time of each workload class by calculating I × R / S for each workload class. As described above, the target time calculation unit 110 calculates the CPU target time of each workload class by allocating a certain interval time according to the CPU distribution ratio.

次に、目標時間計算手段110は、計算した各ワークロードクラスのCPU目標時間を目標時間格納テーブル103に記憶させる(ステップS114)。このとき、図4に示すように、ワークロードクラス番号順にCPU目標時間を記憶させる。   Next, the target time calculation unit 110 stores the calculated CPU target time of each workload class in the target time storage table 103 (step S114). At this time, as shown in FIG. 4, CPU target times are stored in the order of workload class numbers.

次に、プロセス選択からプロセス実行までの制御の流れを説明する。図11は、プロセス選択からプロセス実行までの制御の流れを示す説明図である。   Next, the flow of control from process selection to process execution will be described. FIG. 11 is an explanatory diagram showing the flow of control from process selection to process execution.

プロセス選択手段120は、実行可能なプロセスを選択する。そして、プロセス選択手段120は、実行可能なプロセスを選択できた場合には、プロセス実行手段140に制御を渡し、実行可能なプロセスを選択できなかった場合には、強制実行プロセス選択手段130に制御を渡す。このプロセス選択手段120の動作については、図12を用いて後述する。   The process selection unit 120 selects an executable process. Then, the process selection unit 120 passes control to the process execution unit 140 when the executable process can be selected, and controls to the forced execution process selection unit 130 when the executable process cannot be selected. give. The operation of the process selection unit 120 will be described later with reference to FIG.

強制実行プロセス選択手段130は、強制的に実行するプロセスを選択する。強制実行プロセス選択手段130は、強制的に実行するプロセスを選択できた場合には、プロセス実行手段140に制御を渡し、強制的に実行するプロセスを選択できなかった場合には、プロセス選択手段120に制御を渡す。この強制実行プロセス選択手段130の動作については、図13、図14および図15を用いて後述する。   The forced execution process selection unit 130 selects a process to be forcibly executed. When the process to be forcibly executed can be selected, the forced execution process selection unit 130 transfers control to the process execution unit 140. When the process to be forcibly executed cannot be selected, the process selection unit 120 is selected. Pass control to. The operation of the forced execution process selection unit 130 will be described later with reference to FIGS.

プロセス実行手段140は、プロセス選択手段120、または、強制実行プロセス選択手段130で選択されたプロセスを実行し、プロセス選択手段120に制御を渡す。このプロセス実行手段140の動作については、図16および図17を用いて後述する。   The process execution unit 140 executes the process selected by the process selection unit 120 or the forced execution process selection unit 130 and passes control to the process selection unit 120. The operation of the process execution unit 140 will be described later with reference to FIGS. 16 and 17.

次に、プロセス選択手段120の動作について説明する。図12は、プロセス選択手段120の動作の例を示すフローチャートである。プロセス選択手段120は、実行可能プロセスキュー記憶手段106において先頭にキューイングされているプロセスのプロセス番号を取得する(ステップS121)。すなわち、実行可能プロセスキュー記憶手段106に記憶されているプロセス番号のうち、優先順位が最も高いプロセス番号を取得する。プロセス選択手段120が取得したプロセス番号を、ここではnとする。   Next, the operation of the process selection unit 120 will be described. FIG. 12 is a flowchart illustrating an example of the operation of the process selection unit 120. The process selection unit 120 acquires the process number of the process queued at the head in the executable process queue storage unit 106 (step S121). In other words, the process number having the highest priority among the process numbers stored in the executable process queue storage unit 106 is acquired. Here, the process number acquired by the process selection unit 120 is n.

次に、プロセス選択手段120は、取得したプロセス番号nに対応するワークロードクラス番号(すなわち、プロセス番号nのプロセスのワークロードクラス番号)をプロセス対応テーブル101から取得する(ステップS122)。ステップS121からステップS122に移行した場合、プロセス選択手段120は、ステップS121で取得したプロセス番号に対応するワークロードクラス番号をプロセス対応テーブル101から取得する。また、後述のステップS127からステップS122に移行した場合、プロセス選択手段120は、ステップS127で取得したプロセス番号に対応するワークロードクラス番号をプロセス対応テーブル101から取得する。   Next, the process selection unit 120 acquires the workload class number corresponding to the acquired process number n (that is, the workload class number of the process with the process number n) from the process correspondence table 101 (step S122). When the process proceeds from step S121 to step S122, the process selection unit 120 acquires the workload class number corresponding to the process number acquired in step S121 from the process correspondence table 101. Further, when the process proceeds from step S127 described later to step S122, the process selection unit 120 acquires a workload class number corresponding to the process number acquired in step S127 from the process correspondence table 101.

ステップS122の次に、プロセス選択手段120は、ステップS122で取得したワークロードクラス番号に対応するCPU目標時間を、目標時間格納テーブル103から取得する(ステップS123)。すなわち、そのワークロードクラス番号が示すワークロードクラスのCPU目標時間を取得する。   After step S122, the process selection unit 120 acquires the CPU target time corresponding to the workload class number acquired in step S122 from the target time storage table 103 (step S123). That is, the CPU target time of the workload class indicated by the workload class number is acquired.

次に、プロセス選択手段120は、ステップS122で取得したワークロードクラス番号に対応するCPU使用時間を、使用時間格納テーブル104から取得する(ステップS124)。すなわち、ステップS122で取得したワークロードクラス番号が示すワークロードクラスのCPU使用時間を取得する。   Next, the process selection unit 120 acquires the CPU usage time corresponding to the workload class number acquired in step S122 from the usage time storage table 104 (step S124). That is, the CPU usage time of the workload class indicated by the workload class number acquired in step S122 is acquired.

プロセス選択手段120は、CPU使用時間がCPU目標時間よりも小さいか否かを判定する(ステップS125)。CPU使用時間がCPU目標時間よりも小さければ(ステップS125のY)、プロセス実行手段140に制御を渡す。CPU使用時間がCPU目標時間と等しいか、または、大きい場合には(ステップS125のN)、プロセス選択手段120は、実行可能プロセスキュー記憶手段106に次のプロセスがキューイングされているか否かを判定する(ステップS126)。   The process selection unit 120 determines whether or not the CPU usage time is shorter than the CPU target time (step S125). If the CPU usage time is shorter than the CPU target time (Y in step S125), control is passed to the process execution means 140. When the CPU usage time is equal to or longer than the CPU target time (N in Step S125), the process selection unit 120 determines whether or not the next process is queued in the executable process queue storage unit 106. Determination is made (step S126).

実行可能プロセスキュー記憶手段106に次のプロセスがキューイングされている場合(ステップS126のY)、プロセス選択手段120は、実行可能プロセスキュー記憶手段106にキューイングされている次のプロセスのプロセス番号を取得し(ステップS127)、ステップS122に移行する。そして、ステップS127で取得したプロセス番号について、ステップS122以降の処理を行う。   When the next process is queued in the executable process queue storage unit 106 (Y in step S126), the process selection unit 120 displays the process number of the next process queued in the executable process queue storage unit 106. Is acquired (step S127), and the process proceeds to step S122. And the process after step S122 is performed about the process number acquired by step S127.

実行可能プロセスキュー記憶手段106に次のプロセスがキューイングされていない場合(ステップS126のN)というのは、キューイングされている最後のプロセスまで、CPU使用時間がCPU目標時間未満のプロセスが存在しない場合である。換言すれば、CPU目標時間までCPU使用時間を使い切っていないプロセスが実行可能プロセスキュー記憶手段106にキューイングされていない場合である。この場合、プロセス選択手段120は、強制実行プロセス選択手段130に制御を渡す。   When the next process is not queued in the executable process queue storage means 106 (N in step S126), there is a process whose CPU usage time is less than the CPU target time until the last queued process. This is the case. In other words, a process that has not used up the CPU usage time until the CPU target time is not queued in the executable process queue storage unit 106. In this case, the process selection unit 120 passes control to the forced execution process selection unit 130.

次に、強制実行プロセス選択手段130の動作について説明する。図13、図14および図15は、強制実行プロセス選択手段130の動作の例を示すフローチャートである。以下の説明で、例えば、ワークロードクラス番号がiであるワークロードクラスを、単にワークロードクラスiと記す。また、プロセス番号xに対応するワークロードクラス番号とは、プロセス番号がxであるプロセスのワークロードクラス番号である。   Next, the operation of the forced execution process selection unit 130 will be described. 13, 14, and 15 are flowcharts illustrating an example of the operation of the forced execution process selection unit 130. In the following description, for example, a workload class whose workload class number is i is simply referred to as a workload class i. The workload class number corresponding to the process number x is the workload class number of the process whose process number is x.

強制実行プロセス選択手段130は、変数iに0をセットする(ステップS231)。次に、強制実行プロセス選択手段130は、ワークロードクラスiのCPU目標時間を目標時間格納テーブル103から取得し(ステップS232)、ワークロードクラスiのCPU使用時間を使用時間格納テーブル104から取得する(ステップS233)。そして、CPU使用時間がCPU目標時間未満であるか否かを判定する(ステップS234)。CPU使用時間がCPU目標時間以上であれば(ステップS234のN)、ステップS246(図15参照)に移行し、CPU使用時間がCPU目標時間未満であれば(ステップS234のY)、ステップS235に移行する。   The forced execution process selection unit 130 sets 0 to the variable i (step S231). Next, the forced execution process selection unit 130 acquires the CPU target time of the workload class i from the target time storage table 103 (step S232), and acquires the CPU usage time of the workload class i from the usage time storage table 104. (Step S233). Then, it is determined whether the CPU usage time is less than the CPU target time (step S234). If the CPU usage time is equal to or longer than the CPU target time (N in step S234), the process proceeds to step S246 (see FIG. 15), and if the CPU usage time is less than the CPU target time (Y in step S234), the process proceeds to step S235. Transition.

ステップS235では、強制実行プロセス選択手段130は、変数jに0をセットする。   In step S235, the forced execution process selection unit 130 sets 0 to the variable j.

次に、強制実行プロセス選択手段130は、プロセス対応テーブル101を参照し、プロセス番号jに対応するワークロードクラス番号を取得し(ステップS236)、そのワークロードクラス番号が変数iと等しいか否かを判定する(ステップS237)。すなわち、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラス番号iと等しいか否かを判定する。プロセス番号jに対応するワークロードクラス番号が変数iと等しくなければ(ステップS237のN)、ステップS244(図14参照)に移行する。プロセス番号jに対応するワークロードクラス番号が変数iと等しい場合(ステップS237のY)、そのjは、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスのプロセス番号である。この場合(ステップS237のY)、ステップS238に移行する。   Next, the forcible execution process selection unit 130 refers to the process correspondence table 101, acquires the workload class number corresponding to the process number j (step S236), and determines whether or not the workload class number is equal to the variable i. Is determined (step S237). That is, it is determined whether or not the CPU usage time is less than the CPU target time and is equal to the focused workload class number i. If the workload class number corresponding to the process number j is not equal to the variable i (N in step S237), the process proceeds to step S244 (see FIG. 14). When the workload class number corresponding to the process number j is equal to the variable i (Y in step S237), j is a process operating in the target workload class whose CPU usage time is less than the CPU target time. Process number. In this case (Y in step S237), the process proceeds to step S238.

ステップS238では、強制実行プロセス選択手段130は、変数kにjの値をセットする。   In step S238, the forced execution process selection unit 130 sets the value of j to the variable k.

次に、強制実行プロセス選択手段130は、プロセス管理テーブル105において、プロセス番号kの資源待ちフラグがオンであるか否かを判定する(ステップS239)。すなわち、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスが資源待ち状態であるか否かを判定する。プロセス管理テーブル105に記憶されているプロセス番号kの資源待ちフラグがオフであるならば(ステップS239のN)、ステップS244に移行し、オンであれば(ステップS239のY)、ステップS240に移行する。   Next, the forced execution process selection unit 130 determines whether or not the resource waiting flag for the process number k is on in the process management table 105 (step S239). That is, it is determined whether or not a process operating in the target workload class whose CPU usage time is less than the CPU target time is in a resource waiting state. If the resource wait flag for the process number k stored in the process management table 105 is off (N in step S239), the process proceeds to step S244, and if it is on (Y in step S239), the process proceeds to step S240. To do.

ステップS240において、強制実行プロセス選択手段130は、プロセス管理テーブル105に格納されているプロセス番号kの資源番号(資源待ちしている資源番号。図6参照。)を、変数mにセットする。すなわち、プロセス番号kのプロセスが待っている資源の資源番号をmにセットする。   In step S240, the forced execution process selection unit 130 sets the resource number of the process number k stored in the process management table 105 (resource number waiting for resources; see FIG. 6) in the variable m. That is, the resource number of the resource waiting for the process with the process number k is set to m.

次に、強制実行プロセス選択手段130は、資源管理テーブル107に格納されている資源番号mのテナントプロセスのプロセス番号を、変数nにセットする(ステップS241)。すなわち、着目している資源番号mの資源を確保しているプロセスのプロセス番号をnにセットする(ステップS241)。以上のようにして、CPU使用時間がCPU目標時間未満となっている着目中のワークロードクラスで動作するプロセスが待っている資源を確保中のプロセスのプロセス番号をnとしている。   Next, the forced execution process selection means 130 sets the process number of the tenant process of the resource number m stored in the resource management table 107 to the variable n (step S241). That is, the process number of the process that secures the resource of the target resource number m is set to n (step S241). As described above, the process number of the process that secures the resources waiting for the process operating in the workload class of interest whose CPU usage time is less than the CPU target time is n.

次に、強制実行プロセス選択手段130は、プロセス管理テーブル105を参照して、プロセス番号nの実行可能フラグ(資源番号mの資源を確保しているプロセスの実行可能フラグ)がオンであるか否かを判定する(ステップS242)。その実行可能フラグがオンであれば(ステップS242のY)、ステップS248に移行する。オフであれば(ステップS242のN)、強制実行プロセス選択手段130は、変数kにnの値をセットし(ステップS243)、ステップS239以降の処理を繰り返す。   Next, the forced execution process selection unit 130 refers to the process management table 105 and determines whether the executable flag of the process number n (the executable flag of the process that secures the resource of the resource number m) is on. Is determined (step S242). If the executable flag is on (Y in step S242), the process proceeds to step S248. If it is off (N in step S242), the forced execution process selection unit 130 sets the value of n to the variable k (step S243), and repeats the processing from step S239 onward.

ステップS242で実行可能フラグがオンと判定された場合、その時点のnは、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスが待っている資源を確保中のプロセスであって、実行可能フラグがオンとなっているプロセスのプロセス番号を意味する。   If it is determined in step S242 that the executable flag is on, n at that time secures resources waiting for processes operating in the target workload class whose CPU usage time is less than the CPU target time. This means the process number of a process in which the executable flag is on.

また、ステップS244において、強制実行プロセス選択手段130は、プロセス番号jが最終エントリであるか否かを判定する(ステップS244)。すなわち、jが最大のプロセス番号に達したか否かを判定する。プロセス番号jが最終エントリであれば(ステップS244のY)、ステップS246(図15参照)に移行する。また、プロセス番号jが最終エントリでなければ(ステップS244のN)、強制実行プロセス選択手段130は、jの値を1増加させ(ステップS245)、そのjに関して、ステップS236以降の処理を行う。   In step S244, the forced execution process selection unit 130 determines whether or not the process number j is the last entry (step S244). That is, it is determined whether j has reached the maximum process number. If the process number j is the last entry (Y in step S244), the process proceeds to step S246 (see FIG. 15). If the process number j is not the last entry (N in step S244), the forced execution process selection unit 130 increments the value of j by 1 (step S245), and performs the processing from step S236 onward for that j.

また、ステップS246において、強制実行プロセス選択手段130は、ワークロードクラス番号iが目標時間格納テーブル103における最終エントリであるか否かを判定する(ステップS246)。ワークロードクラス番号iが最終エントリであれば(ステップS246のY)、プロセス選択手段120に制御を渡す。ワークロードクラス番号iが最終エントリでなければ(ステップS246のN)、iの値を1増加させ(ステップS247)、そのiに関して、ステップS232(図13参照)以降の処理を行う。   In step S246, the forced execution process selection unit 130 determines whether the workload class number i is the last entry in the target time storage table 103 (step S246). If the workload class number i is the last entry (Y in step S246), control is passed to the process selection unit 120. If the workload class number i is not the final entry (N in step S246), the value of i is incremented by 1 (step S247), and the processing subsequent to step S232 (see FIG. 13) is performed for that i.

また、ステップS242からステップ248に移行した時点で、CPU使用時間がCPU目標時間未満の着目中のワークロードクラスで動作するプロセスが待っている資源を確保中のプロセスであって、実行可能フラグがオンとなっているプロセスのプロセス番号(n)が特定されることになる。強制実行プロセス選択手段130は、強制実行情報格納テーブル108の資源番号として、その資源番号mを格納する(ステップS248)。さらに、強制実行プロセス選択手段130は、資源解放時に優先的に資源を渡すプロセスのプロセス番号(図9参照)として、kの値を、強制実行情報格納テーブル108に格納する(ステップS249)。そして、プロセス実行手段140に制御を渡す。   In addition, when the process proceeds from step S242 to step 248, a resource that is waiting for a process that operates in a focused workload class whose CPU usage time is less than the CPU target time is being secured, and an executable flag is set. The process number (n) of the process that is turned on is specified. The forced execution process selection means 130 stores the resource number m as the resource number of the forced execution information storage table 108 (step S248). Further, the forced execution process selection unit 130 stores the value of k in the forced execution information storage table 108 as the process number (see FIG. 9) of the process that preferentially delivers resources when releasing resources (step S249). Then, control is passed to the process execution means 140.

上記の動作において、ステップS239の処理は、資源待ちフラグがオフであるということは、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスが、資源を待っていないということを意味する。この場合には、ステップS240,S241,S242,S248,S249を行ってプロセス実行手段140に制御を渡すのではなく、ステップS244に移行し、jが最終エントリでなければ、jを1インクリメントし(ステップS245)、ステップS236からの処理を繰り返す。jが最終エントリであれば、iが最終エントリであるか否かを判定し、iを1インクリメントしてステップS232からの処理を繰り返す。このように、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスが資源を待っていない場合には、プロセス実行手段140にそのプロセスを強制的に実行させることはしない。   In the above operation, the processing in step S239 indicates that the resource wait flag is off means that the process operating in the target workload class whose CPU usage time is less than the CPU target time waits for resources. It means not. In this case, steps S240, S241, S242, S248, and S249 are not performed to transfer control to the process execution means 140, but the process proceeds to step S244. If j is not the final entry, j is incremented by 1 ( Steps S245) and S236 are repeated. If j is the final entry, it is determined whether i is the final entry, i is incremented by 1, and the processing from step S232 is repeated. As described above, when the process operating in the target workload class whose CPU usage time is less than the CPU target time is not waiting for the resource, the process execution unit 140 is forced to execute the process. I won't do that.

次に、プロセス実行手段140の動作について説明する。図16および図17は、プロセス実行手段140の動作の例を示すフローチャートである。プロセス実行手段140は、プロセス選択手段120または強制実行プロセス選択手段130で選択されたプロセス、すなわちプロセス番号nのプロセスのワークロードクラス番号を、プロセス対応テーブル101から取得し、そのワークロードクラス番号を変数pにセットする(ステップS341)。   Next, the operation of the process execution unit 140 will be described. 16 and 17 are flowcharts showing an example of the operation of the process execution means 140. The process execution unit 140 acquires the workload class number of the process selected by the process selection unit 120 or the forced execution process selection unit 130, that is, the process of the process number n from the process correspondence table 101, and sets the workload class number. The variable p is set (step S341).

すなわち、プロセス選択手段120が実行するステップS125(図12参照)において、CPU使用時間がCPU目標時間未満であると判定され、プロセス選択手段120から制御を渡された場合には、その時点でプロセス選択手段120が取得していたプロセス番号nに対応するワークロードクラス番号を変数pにセットする。   That is, in step S125 (see FIG. 12) executed by the process selection unit 120, if it is determined that the CPU usage time is less than the CPU target time and control is passed from the process selection unit 120, the process is performed at that time. The workload class number corresponding to the process number n acquired by the selection means 120 is set in the variable p.

また、強制実行プロセス選択手段130が実行するステップS242(図15参照)において、資源番号mの資源を確保しているプロセス番号nのプロセスの実行可能フラグがオンであり、ステップS248,S249(図16参照)の処理後に強制実行プロセス選択手段130から制御を渡された場合には、その時点で強制実行プロセス選択手段130が特定していたプロセス番号nに対応するワークロードクラス番号を変数pにセットする。   Further, in step S242 (see FIG. 15) executed by the forced execution process selection unit 130, the executable flag of the process of the process number n that secures the resource of the resource number m is on, and steps S248 and S249 (FIG. 16), if the control is passed from the forced execution process selection means 130, the workload class number corresponding to the process number n specified by the forced execution process selection means 130 at that time is set to the variable p. set.

ステップS341の後、プロセス実行手段140は、ワークロードクラスpのCPU目標時間を目標時間格納テーブル103から取得し、変数qにセットし(ステップS342)、ワークロードクラスpのCPU使用時間を使用時間格納テーブル104から取得し、変数rにセットする(ステップS343)。   After step S341, the process execution means 140 acquires the CPU target time of the workload class p from the target time storage table 103, sets it to the variable q (step S342), and sets the CPU usage time of the workload class p as the usage time. Obtained from the storage table 104 and set to the variable r (step S343).

そして、プロセス実行手段140は、実行可能プロセスキュー記憶手段106にキューイングされているプロセス番号から、nをデキューし(ステップS344)、プロセス管理テーブル105に格納されているプロセス番号nの実行可フラグをオフにする(ステップS345)。さらに、プロセス実行手段140は、プロセス管理テーブル105に格納されているプロセス番号nの実行中断フラグをオフにする(ステップS346)。次に述べるステップS347は、プロセスを実行するステップであり、ステップS344〜S346では、これから実行しようとするプロセスのプロセス番号nを実行可能プロセスキュー記憶手段106からデキューし、その実行可フラグおよび実行中断フラグをいずれもオフとしている。   Then, the process execution unit 140 dequeues n from the process numbers queued in the executable process queue storage unit 106 (step S344), and the executable flag of the process number n stored in the process management table 105 is obtained. Is turned off (step S345). Further, the process execution means 140 turns off the execution interruption flag of the process number n stored in the process management table 105 (step S346). Step S347 to be described next is a step of executing the process. In steps S344 to S346, the process number n of the process to be executed is dequeued from the executable process queue storage means 106, its executable flag and execution interruption are performed. All flags are off.

ステップS346の後、プロセス実行手段140は、プロセス番号nのプロセスを最小単位分だけ実行する(ステップS347)。   After step S346, the process execution unit 140 executes the process with the process number n for the minimum unit (step S347).

強制実行プロセス選択手段130がステップS242,S248,S249の処理を行い、強制実行プロセス選択手段130から制御を渡された場合、このようにステップS347を実行することで、資源番号mの資源を確保しているプロセス番号nのプロセスを強制的に実行させている。   When the forced execution process selection unit 130 performs the processes of steps S242, S248, and S249 and is given control from the forced execution process selection unit 130, the resource of the resource number m is secured by executing step S347 in this way. The process number n is forcibly executed.

ただし、ステップS347は、資源番号mの資源を確保しているプロセス番号nのプロセスを強制的に実行させるためだけのステップではない。プロセス選択手段120から制御を渡されてステップS347に移行した場合には、CPU目標時間までCPUを使用していないプロセス(プロセス選択手段120が選択したプロセス)を最小単位分、実行する。   However, step S347 is not only a step for forcibly executing the process of the process number n that secures the resource of the resource number m. When control is passed from the process selection unit 120 and the process proceeds to step S347, a process that does not use the CPU until the CPU target time (process selected by the process selection unit 120) is executed for the minimum unit.

ステップS347の後、プロセス実行手段140は、使用時間格納テーブル104に格納されているワークロードクラスpのCPU使用時間に対し、ステップS347で実行した時間分を加算して、ワークロードクラスpのCPU使用時間を更新する(ステップS348)。   After step S347, the process execution means 140 adds the time executed in step S347 to the CPU usage time of the workload class p stored in the usage time storage table 104, and the CPU of the workload class p. The usage time is updated (step S348).

次に、プロセス実行手段140は、プロセス管理テーブル105に格納されているプロセス番号nの実行中断フラグがオンになっているか否かを確認する(ステップS349)。プロセス番号nの実行中断フラグがオンであれば(ステップS349のY)、ステップS354に移行し、オフであれば(ステップS349のN)、ステップS350に移行する。   Next, the process execution unit 140 checks whether or not the execution interruption flag for the process number n stored in the process management table 105 is turned on (step S349). If the execution interruption flag of the process number n is on (Y in step S349), the process proceeds to step S354, and if it is off (N in step S349), the process proceeds to step S350.

ステップS350では、プロセス実行手段140は、変数rの値が変数qの値以上であるか否かを判定する(ステップS350)。変数rの値が変数qの値以上であれば(ステップS350のY)、ステップS347以降の処理を繰り返す。すなわち、ステップS343で変数rにセットしたCPU使用時間が既にCPU目標時間を超えている場合、実行中断フラグがオンになるまで、プロセス番号nのプロセスを実行させる。   In step S350, the process execution unit 140 determines whether or not the value of the variable r is greater than or equal to the value of the variable q (step S350). If the value of the variable r is greater than or equal to the value of the variable q (Y in step S350), the processes in and after step S347 are repeated. That is, if the CPU usage time set in the variable r in step S343 has already exceeded the CPU target time, the process with the process number n is executed until the execution interruption flag is turned on.

また、変数rの値が変数qの値未満である場合(ステップS350のN)、プロセス実行手段140は、使用時間格納テーブル104に格納されているワークロードクラスpのCPU使用時間(ステップS347で実行した時間分が加算されたCPU使用時間)がCPU目標時間未満であるか否かを判定する(ステップS351)。CPU使用時間がCPU目標時間未満であれば、ステップS347以降の処理を繰り返し、CPU使用時間がCPU目標時間以上になったならばステップS352に移行する。   If the value of the variable r is less than the value of the variable q (N in step S350), the process execution unit 140 uses the CPU usage time of the workload class p stored in the usage time storage table 104 (in step S347). It is determined whether or not the CPU usage time to which the executed time is added is less than the CPU target time (step S351). If the CPU usage time is less than the CPU target time, the processing from step S347 is repeated, and if the CPU usage time is equal to or longer than the CPU target time, the process proceeds to step S352.

ステップS352では、プロセス実行手段140は、プロセス管理テーブル105に格納されているプロセス番号の実行可フラグをオンにする(ステップS352)。次に、プロセス実行手段140は、実行可能プロセスキュー記憶手段106に、プロセス番号nを実行順位順になるようにエンキューする(ステップS353)。そして、プロセス実行手段140は、強制実行情報格納テーブル108に登録されている資源番号を削除する(ステップS354)。   In step S352, the process execution unit 140 turns on the execution flag of the process number stored in the process management table 105 (step S352). Next, the process execution unit 140 enqueues the process numbers n into the executable process queue storage unit 106 in order of execution order (step S353). Then, the process execution unit 140 deletes the resource number registered in the forced execution information storage table 108 (step S354).

なお、上記のステップS347で、プロセス実行手段140がプロセス番号nのプロセスを実行するときに、資源解放手段170に資源の解放を要求する場合、資源解放手段170によって、そのプロセスの実行中断フラグがオンにされ、そのプロセスは中断される。資源を解放した資源解放手段170から制御を戻されると、プロセス実行手段140はステップS348を行い、その後のステップS349で実行中断フラグがオンとなっているので、ステップS347に戻らない。よって、プロセス番号nのプロセスは中断されていることになる。   When the process execution unit 140 executes the process with the process number n in the above step S347, when the resource release unit 170 requests the resource release, the resource release unit 170 sets an execution interruption flag for the process. Turned on and the process is interrupted. When control is returned from the resource release unit 170 that has released the resource, the process execution unit 140 performs step S348, and since the execution interruption flag is turned on in the subsequent step S349, the process execution unit 140 does not return to step S347. Therefore, the process of process number n is interrupted.

次に、インターバル初期化手段150の動作について説明する。図18は、インターバル初期化手段150の動作の例を示すフローチャートである。インターバル初期化手段150は、使用時間格納テーブル104中の全てのワークロードクラスのCPU使用時間に0をセットすると(ステップS151)、一定のインターバル時間が経過するのを待つ(ステップS152)。その一定のインターバル時間が経過すると、ステップS151以降の処理を繰り返す。   Next, the operation of the interval initialization unit 150 will be described. FIG. 18 is a flowchart showing an example of the operation of the interval initialization unit 150. When the interval initialization means 150 sets 0 for the CPU usage time of all the workload classes in the usage time storage table 104 (step S151), it waits for a certain interval time to elapse (step S152). When the certain interval time has elapsed, the processing after step S151 is repeated.

次に、資源取得手段160および資源解放手段170の動作について説明する。資源取得手段160および資源解放手段170は、プロセス実行手段140がステップS347でプロセスを実行している最中に、プロセス実行手段140によって起動される。プロセス実行手段140がステップS347で資源の取得を要求する場合には、資源取得手段160を起動して、取得する資源の資源番号を指定して、その資源を取得させる。このときプロセス実行手段140が実行しているプロセスを資源取得要求プロセスと記す。また、プロセス実行手段140がステップS347で資源の解放を要求する場合には、資源解放手段170を起動して、解放する資源の資源番号を指定して、その資源を解放させる。このときプロセス実行手段140が実行しているプロセスを資源解放プロセスと記す。   Next, operations of the resource acquisition unit 160 and the resource release unit 170 will be described. The resource acquisition unit 160 and the resource release unit 170 are activated by the process execution unit 140 while the process execution unit 140 is executing the process in step S347. When the process execution unit 140 requests acquisition of a resource in step S347, the resource acquisition unit 160 is activated, the resource number of the resource to be acquired is specified, and the resource is acquired. At this time, the process executed by the process execution unit 140 is referred to as a resource acquisition request process. When the process execution unit 140 requests the resource release in step S347, the resource release unit 170 is activated, the resource number of the resource to be released is designated, and the resource is released. At this time, the process executed by the process execution unit 140 is referred to as a resource release process.

図19は、資源取得手段160の動作の例を示すフローチャートである。資源取得手段160は、取得する資源を資源番号によって指定されると、その資源番号を変数sにセットする(ステップS161)。   FIG. 19 is a flowchart illustrating an example of the operation of the resource acquisition unit 160. When the resource acquisition means 160 is designated by the resource number, the resource acquisition means 160 sets the resource number in the variable s (step S161).

次に、資源取得手段160は、資源管理テーブル107において、資源番号sのテナントプロセスのプロセス番号格納領域にプロセス番号が格納されているか否かを確認する(ステップS162)。テナントプロセスのプロセス番号格納領域にプロセス番号が未格納であれば(ステップS162のN)、ステップS163に移行し、プロセス番号が格納済みであれば(ステップS162のY)、ステップS164に移行する。   Next, the resource acquisition unit 160 checks whether or not the process number is stored in the process number storage area of the tenant process of the resource number s in the resource management table 107 (step S162). If the process number is not stored in the process number storage area of the tenant process (N in step S162), the process proceeds to step S163. If the process number is already stored (Y in step S162), the process proceeds to step S164.

ステップS163では、資源取得手段160は、資源管理テーブル107中の資源番号sのテナントプロセスのプロセス番号格納領域に、資源取得要求プロセスの番号を格納し(ステップS163)、資源取得手段160を終了する。   In step S163, the resource acquisition unit 160 stores the resource acquisition request process number in the process number storage area of the tenant process of the resource number s in the resource management table 107 (step S163), and ends the resource acquisition unit 160. .

また、ステップS164に移行した場合、資源取得手段160は、資源管理テーブル107における資源番号sの資源待ちプロセスキューに、資源取得要求プロセスを実行優先順位順となるようにキューイングする(ステップS164)。すなわち、資源取得要求プロセスのプロセス番号を実行優先順位順となるように格納する。次に、資源取得手段160は、プロセス管理テーブル105中の資源取得要求プロセスの実行中断フラグをオンにセットし(ステップS165)、プロセス管理テーブル105中の資源取得要求プロセスの資源待ちフラグをオンにセットする(ステップS166)。さらに、プロセス管理テーブル105中の資源取得要求プロセスの資源番号(資源待ちしている資源番号。図6参照)として、変数sをセットし、プロセス実行手段140に制御を戻す(ステップS167)。   When the process proceeds to step S164, the resource acquisition unit 160 queues the resource acquisition request processes in the resource waiting process queue of the resource number s in the resource management table 107 in the order of execution priority (step S164). . That is, the process numbers of the resource acquisition request processes are stored in order of execution priority. Next, the resource acquisition unit 160 turns on the execution interruption flag of the resource acquisition request process in the process management table 105 (step S165), and turns on the resource waiting flag of the resource acquisition request process in the process management table 105. Set (step S166). Further, the variable s is set as the resource number of the resource acquisition request process in the process management table 105 (resource number waiting for the resource; see FIG. 6), and control is returned to the process execution means 140 (step S167).

図20および図21は、資源解放手段170の動作の例を示すフローチャートである。資源解放手段170は、解放する資源を資源番号によって指定されると、その資源番号を変数tにセットする(ステップS171)。次に、資源解放手段170は、資源管理テーブル107において資源番号tのテナントプロセスのプロセス番号格納領域に格納されているプロセス番号を削除する(ステップS172)。このように、テナントプロセスのプロセス番号格納領域に格納されているプロセス番号を削除することによって、プロセス実行手段140が実行しているプロセスで確保していた資源(解放を要求された資源)を解放する。   20 and 21 are flowcharts showing an example of the operation of the resource releasing unit 170. When the resource to be released is designated by the resource number, the resource releasing unit 170 sets the resource number to the variable t (step S171). Next, the resource release unit 170 deletes the process number stored in the process number storage area of the tenant process of the resource number t in the resource management table 107 (step S172). In this way, by deleting the process number stored in the process number storage area of the tenant process, the resource (resource requested to be released) secured in the process executed by the process execution unit 140 is released. To do.

次に、資源解放手段170は、強制実行情報格納テーブル108に格納されている資源番号と変数tとが一致しているか否かを判定する(ステップS173)。一致していない場合、ステップS175に移行し、一致している場合、ステップS174に移行する。   Next, the resource release unit 170 determines whether or not the resource number stored in the forced execution information storage table 108 matches the variable t (step S173). If they do not match, the process proceeds to step S175, and if they match, the process proceeds to step S174.

ステップS174において、資源解放手段170は、強制実行情報格納テーブル108中の「源解放時に優先的に資源を渡すプロセスのプロセス番号(図9参照)」を変数uにセットする(ステップS174)。   In step S174, the resource release unit 170 sets the “process number of the process to which the resource is preferentially delivered when the source is released (see FIG. 9)” in the forced execution information storage table 108 in the variable u (step S174).

また、ステップS175では、資源解放手段170は、資源管理テーブル107中の、資源番号tの資源待ちプロセスキューにプロセスが存在するか否かを確認する(ステップS175)。存在していなければ(ステップS175のN)、資源解放手段170を終了する。存在している場合(ステップS175のY)、資源解放手段170は、資源管理テーブル107中の、資源番号tの資源待ちプロセスキューの先頭のプロセスのプロセス番号を変数uにセットする(ステップS176)。   In step S175, the resource releasing unit 170 checks whether or not there is a process in the resource waiting process queue of the resource number t in the resource management table 107 (step S175). If it does not exist (N in step S175), the resource releasing unit 170 is terminated. If it exists (Y in step S175), the resource releasing unit 170 sets the process number of the first process in the resource waiting process queue of the resource number t in the resource management table 107 in the variable u (step S176). .

ステップS174の後、および、ステップS176の後、資源解放手段170は、資源管理テーブル107中の資源番号tの資源待ちプロセスキューから、プロセス番号uをデキューする(ステップS177)。すなわち、ステップS174の後では、「源解放時に優先的に資源を渡すプロセスのプロセス番号」をデキューし、ステップS176の後では、資源番号tの資源待ちプロセスキューの先頭のプロセスのプロセス番号をデキューする。   After step S174 and after step S176, the resource releasing unit 170 dequeues the process number u from the resource waiting process queue of the resource number t in the resource management table 107 (step S177). That is, after step S174, “the process number of the process that gives priority to resources when releasing the source” is dequeued, and after step S176, the process number of the first process in the resource waiting process queue of resource number t is dequeued. To do.

次に、資源解放手段170は、資源管理テーブル107中の、資源番号tのテナントプロセスのプロセス番号格納領域に変数uを設定する(ステップS178)。   Next, the resource release unit 170 sets a variable u in the process number storage area of the tenant process with the resource number t in the resource management table 107 (step S178).

続いて、資源解放手段170は、プロセス管理テーブル105中のプロセス番号uの資源待ちフラグをオフにし(ステップS179)、さらに、プロセス管理テーブル105中のプロセス番号uの実行可フラグをオンにする(ステップS180)。次に、資源解放手段170は、実行可能プロセスキュー記憶手段106の実行可能プロセスキューに、プロセス番号uを実行優先順位順となるようにキューイングする(ステップS181)。   Subsequently, the resource releasing unit 170 turns off the resource waiting flag for the process number u in the process management table 105 (step S179), and further turns on the executable flag for the process number u in the process management table 105 (step S179). Step S180). Next, the resource release unit 170 queues the process numbers u in the executable process queue of the executable process queue storage unit 106 in the order of execution priority (step S181).

次に、資源解放手段170は、強制実行情報格納テーブル108中の資源番号と変数tが一致しているか否かを判定し(ステップS182)、一致していなければ、資源解放手段170を終了する。   Next, the resource release unit 170 determines whether or not the resource number in the forced execution information storage table 108 matches the variable t (step S182). If they do not match, the resource release unit 170 ends. .

一致していれば、資源解放手段170は、プロセス管理テーブル105中の資源解放プロセスの実行中断フラグをオンにセットし(ステップS183)、さらに、プロセス管理テーブル105中の資源解放プロセスの実行可フラグをオンにセットし(ステップS184)、実行可能プロセスキュー記憶手段106に資源解放プロセスを実行優先順位順となるようにキューイングし、プロセス実行手段140に制御を渡す(ステップS185)。   If they match, the resource release means 170 sets the execution flag of the resource release process in the process management table 105 to ON (step S183), and further executes the resource release process executable flag in the process management table 105. Is set to ON (step S184), the resource release processes are queued in the executable process queue storage means 106 in order of execution priority, and control is passed to the process execution means 140 (step S185).

ステップS171〜S185の処理において、資源解放手段170は、ステップS172でテナントプロセスのプロセス番号格納領域に格納されているプロセス番号を削除することによって、解放要求された資源を解放している。また、ステップS177でプロセス番号uをデキューすることで、その資源の解放の待ち状態であったプロセスを、資源待ちプロセスキューからデキューしている。さらに、ステップS181で、そのプロセス番号uを実行可能プロセスキューにキューイングすることで、待っていた資源が解放されたプロセスを実行可能プロセスキューにキューイングしている。   In the processing of steps S171 to S185, the resource release unit 170 releases the resource requested to be released by deleting the process number stored in the process number storage area of the tenant process in step S172. In addition, by dequeueing the process number u in step S177, the process waiting for the release of the resource is dequeued from the resource waiting process queue. In step S181, the process number u is queued in the executable process queue, so that the process in which the waiting resource is released is queued in the executable process queue.

また、ステップS183,S184,S185で、資源解放プロセスの実行中断フラグおよび実行可フラグをオンとし、資源解放プロセスを実行可能プロセスキューにキューイングすることにより、資源解放プロセスを中断させている。ステップS185の後、資源解放プロセスを実行していたプロセス実行手段140は、資源解放手段170から制御を戻されると、ステップS348,S349(図16および図17参照)を行い、ステップS349で、資源解放プロセスの実行中断フラグがオンになっていることを確認して、ステップS347〜S351のループ処理を抜け、ステップS347には戻らないので、中断したプロセスをさらに実行し続けることはない。   In steps S183, S184, and S185, the resource release process is suspended by turning on the execution suspension flag and the executable flag of the resource release process and queuing the resource release process in the executable process queue. After step S185, when the process execution unit 140 that has executed the resource release process returns control from the resource release unit 170, the process execution unit 140 performs steps S348 and S349 (see FIGS. 16 and 17). After confirming that the execution interruption flag of the release process is turned on, the process exits the loop process of steps S347 to S351 and does not return to step S347, so that the interrupted process is not continuously executed.

次に、本発明の動作の具体例を説明する。図22は、各テーブルの状態の具体例を示す説明図である。以下の説明では、プロセス対応テーブル101に、プロセス番号0に対応するワークロードクラス番号として“0”が格納され、プロセス番号1に対応するワークロードクラス番号として“1”が格納されている場合を例にする。また、CPU配分テーブル102において、ワークロードクラス0に対応するCPU配分比率が80%であり、ワークロードクラス1に対応するCPU配分比率が70%であると定められている場合を例にする。また、以下に示す例では、CPUの配分を行うインターバル時間(インターバル初期化手段150が全ワークロードクラスのCPU使用時間を0に初期化する周期)が100ミリ秒であるとする。   Next, a specific example of the operation of the present invention will be described. FIG. 22 is an explanatory diagram showing a specific example of the state of each table. In the following description, “0” is stored as the workload class number corresponding to process number 0 and “1” is stored as the workload class number corresponding to process number 1 in the process correspondence table 101. Take an example. Further, a case where the CPU distribution ratio corresponding to the workload class 0 is defined as 80% and the CPU distribution ratio corresponding to the workload class 1 is defined as 70% in the CPU distribution table 102 is taken as an example. Further, in the example shown below, it is assumed that the interval time for CPU allocation (cycle in which the interval initialization unit 150 initializes the CPU usage time of all workload classes to 0) is 100 milliseconds.

図10を参照して、目標時間計算手段110の動作の具体例を説明する。目標時間計算手段110は、CPU配分テーブル102から、ワークロードクラス0のCPU配分比率“80”、およびワークロードクラス1のCPU配分比率“20”を読み込み(ステップS111)、各ワークロードクラスのCPU配分比率の合計値を計算する(ステップS112)。ワークロードクラス0,1のCPU配分比率は、それぞれ、80,20であるので、本例では、80と20とを加算して、その計算結果である100を算出する。次に、インターバル時間が100ミリ秒であるので、ワークロードクラス0,1のCPU目標時間をそれぞれ、100×80/100=80ミリ秒、100×20/100=20ミリ秒と計算する(ステップS113)。そして、目標時間計算手段110は、各ワークロードクラス0,1のCPU目標時間をそれぞれ80ミリ秒、20ミリ秒として目標時間格納テーブル103にセットする(ステップS114)。   A specific example of the operation of the target time calculation unit 110 will be described with reference to FIG. The target time calculation means 110 reads the CPU distribution ratio “80” of the workload class 0 and the CPU distribution ratio “20” of the workload class 1 from the CPU distribution table 102 (step S111), and the CPU of each workload class. The total value of the distribution ratio is calculated (step S112). Since the CPU distribution ratios of the workload classes 0 and 1 are 80 and 20, respectively, in this example, 80 and 20 are added to calculate 100 as the calculation result. Next, since the interval time is 100 milliseconds, the CPU target times of the workload classes 0 and 1 are calculated as 100 × 80/100 = 80 milliseconds and 100 × 20/100 = 20 milliseconds, respectively (step) S113). Then, the target time calculation unit 110 sets the CPU target times of the workload classes 0 and 1 as 80 milliseconds and 20 milliseconds, respectively, in the target time storage table 103 (step S114).

図19を参照して、資源取得手段160の動作の具体例を説明する。プロセス番号1のプロセスから資源番号0の資源の取得を要求されているとする。すなわち、資源要求プロセスのプロセス番号が1であるとする。資源取得手段160は、取得する資源番号0を変数sにセットする(ステップS161)。図22に示すように、資源管理テーブル107において、資源番号0のテナントプロセスのプロセス番号格納領域にプロセス番号0が格納されているとする。すると、資源取得手段160は、テナントプロセスのプロセス番号が格納済みであるので(ステップS162のY)、資源管理テーブル107中の資源番号0の資源待ちプロセスキューに、プロセス1を実行優先順位順となるようにキューイングする(ステップS164)。次に、資源取得手段160は、プロセス管理テーブル105中のプロセス番号1の実行中断フラグおよび資源待ちフラグをオンにセットし(ステップS165,S166)、プロセス管理テーブル105中のプロセス番号1の資源番号(資源待ちしている資源番号)に、資源番号0をセットする(ステップS167)。そして、プロセス実行手段140に制御を戻す。   A specific example of the operation of the resource acquisition unit 160 will be described with reference to FIG. Assume that a process having a resource number 0 is requested by a process having a process number 1. That is, it is assumed that the process number of the resource request process is 1. The resource acquisition unit 160 sets the resource number 0 to be acquired to the variable s (step S161). As shown in FIG. 22, it is assumed that process number 0 is stored in the process number storage area of the tenant process with resource number 0 in the resource management table 107. Then, since the process number of the tenant process has already been stored in the resource acquisition unit 160 (Y in step S162), the process 1 is placed in the resource waiting process queue of the resource number 0 in the resource management table 107 in the order of execution priority. Then, queuing is performed (step S164). Next, the resource acquisition unit 160 sets the execution suspension flag and resource wait flag of process number 1 in the process management table 105 to ON (steps S165 and S166), and the resource number of process number 1 in the process management table 105. Resource number 0 is set in (resource number waiting for resource) (step S167). Then, control is returned to the process execution means 140.

次に、図12を参照して、プロセス選択手段120の動作の具体例を説明する。本例では、実行可能プロセスキュー記憶手段106には、プロセス番号0のプロセスが実行可能プロセスとしてキューイングされ、他にキューイングされている実行可能プロセスはないものとする。また、ワークロードクラス番号0のCPU使用時間は80ミリ秒になっていて、ワークロードクラス番号1のCPU使用時間は10ミリ秒になっているとする。   Next, a specific example of the operation of the process selection unit 120 will be described with reference to FIG. In this example, it is assumed that the process with the process number 0 is queued as an executable process in the executable process queue storage unit 106 and there are no other executable processes queued. Further, it is assumed that the CPU usage time of workload class number 0 is 80 milliseconds and the CPU usage time of workload class number 1 is 10 milliseconds.

プロセス選択手段120は、ステップ121で、実行可能プロセスキューにキューイングされているプロセスのプロセス番号0を取得する。次に、プロセス番号0のワークロードクラス番号(本例では、ワークロードクラス番号は0)をプロセス対応テーブル101から取得する(ステップS122)。そして、プロセス選択手段120は、そのワークロードクラス番号0のCPU目標時間80ミリ秒を、目標時間格納テーブル103から取得し(ステップS123)、そのワークロードクラス番号0のCPU使用時間80ミリ秒を、使用時間格納テーブル104から取得する(ステップS124)。すると、取得したCPU使用時間およびCPU目標時間は等しいので(ステップS125のN)、ステップS126に移行し、実行可能プロセスキュー記憶手段106に他にキューイングされている実行可能プロセスがないため、強制実行プロセス選択手段130に制御を渡す。   In step 121, the process selection unit 120 acquires the process number 0 of the process queued in the executable process queue. Next, the workload class number of process number 0 (in this example, the workload class number is 0) is acquired from the process correspondence table 101 (step S122). Then, the process selection unit 120 acquires the CPU target time 80 milliseconds of the workload class number 0 from the target time storage table 103 (step S123), and obtains the CPU usage time 80 milliseconds of the workload class number 0. And obtained from the usage time storage table 104 (step S124). Then, since the acquired CPU usage time and CPU target time are equal (N in step S125), the process proceeds to step S126, and there is no other executable process queued in the executable process queue storage unit 106. Control is passed to the execution process selection means 130.

次に、図13、図14および図15を参照して、強制実行プロセス選択手段130の動作の具体例を説明する。強制実行プロセス選択手段130は、変数iに0をセットする(ステップS231)。そして、目標時間格納テーブル103からワークロードクラス0のCPU目標時間80ミリ秒を取得し(ステップS232)、使用時間格納テーブル104からワークロードクラス0のCPU使用時間80ミリ秒を取得する(ステップS233)。CPU使用時間がCPU目標時間以上であるため(ステップS234のN)、ステップS246に移行し、強制実行プロセス選択手段130は、ワークロードクラス番号0が最終エントリであるか否かを判定する(ステップS246)。ワークロードクラス番号として1があり、ワークロードクラス番号0は最終エントリではないので(ステップS246のN)、ステップS247に移行し、強制実行プロセス選択手段130は、iの値を1増加させ、i=1としてステップS232に移行する(ステップS247)。   Next, a specific example of the operation of the forced execution process selection unit 130 will be described with reference to FIGS. 13, 14, and 15. The forced execution process selection unit 130 sets 0 to the variable i (step S231). Then, the CPU target time 80 milliseconds of the workload class 0 is acquired from the target time storage table 103 (step S232), and the CPU usage time 80 milliseconds of the workload class 0 is acquired from the usage time storage table 104 (step S233). ). Since the CPU usage time is equal to or longer than the CPU target time (N in Step S234), the process proceeds to Step S246, and the forced execution process selection unit 130 determines whether or not the workload class number 0 is the final entry (Step S234). S246). Since the workload class number is 1 and the workload class number 0 is not the final entry (N in step S246), the process proceeds to step S247, and the forced execution process selection unit 130 increases the value of i by 1, and i = 1 and the process proceeds to step S232 (step S247).

続いて、強制実行プロセス選択手段130は、目標時間格納テーブル103からワークロードクラス1のCPU目標時間20ミリ秒を取得し(ステップS232)、使用時間格納テーブル104からワークロードクラス1のCPU使用時間10ミリ秒を取得する(ステップS233)。すると、CPU使用時間がCPU目標時間未満であるため(ステップS234のY)、強制実行プロセス選択手段130は、変数jを0にセットする(ステップS235)。   Subsequently, the forced execution process selection unit 130 acquires the CPU target time 20 milliseconds for the workload class 1 from the target time storage table 103 (step S232), and the CPU usage time for the workload class 1 from the usage time storage table 104. 10 milliseconds is acquired (step S233). Then, since the CPU usage time is less than the CPU target time (Y in step S234), the forced execution process selection unit 130 sets the variable j to 0 (step S235).

続いて、強制実行プロセス選択手段130は、プロセス対応テーブル101を参照し、プロセス番号j(ここでは0)のワークロードクラス番号0を取得する(ステップS236)。取得したワークロードクラス番号0が変数iの値(ここでは1)でないため(ステップS237のN)、ステップS244に移行する。ステップS244では、プロセス番号j(=0)が、プロセス対応テーブル101において最終エントリであるか否かを判定する。ここでは、プロセス番号0は最終エントリではないため(ステップS244のN)、強制実行プロセス選択手段130は、jの値を1増加させ、j=1としてステップS236に移行する。   Subsequently, the forced execution process selection unit 130 refers to the process correspondence table 101 and acquires the workload class number 0 of the process number j (0 in this case) (step S236). Since the acquired workload class number 0 is not the value of the variable i (here, 1) (N in step S237), the process proceeds to step S244. In step S244, it is determined whether or not the process number j (= 0) is the last entry in the process correspondence table 101. Here, since process number 0 is not the last entry (N in step S244), the forced execution process selection unit 130 increments the value of j by 1 and sets j = 1, and proceeds to step S236.

強制実行プロセス選択手段130は、プロセス対応テーブル101を参照し、プロセス番号j(ここでは1)のワークロードクラス番号1を取得する(ステップS236)。取得したワークロードクラス番号1が変数iの値である1と等しいので(ステップS237のY)、強制実行プロセス選択手段130は、変数kにjの値1をセットする(ステップS238)。   The forced execution process selection unit 130 refers to the process correspondence table 101 and acquires the workload class number 1 of the process number j (here, 1) (step S236). Since the acquired workload class number 1 is equal to 1 which is the value of the variable i (Y in step S237), the forced execution process selection unit 130 sets the value 1 of j to the variable k (step S238).

次に、プロセス管理テーブル105に格納されているプロセス番号1の資源待ちフラグがオンであるか否かを判定する(ステップS239)。プロセス番号1の資源待ちフラグがオンであるので(ステップS239のY)、強制実行プロセス選択手段130は、プロセス管理テーブル105に格納されているプロセス番号1に対応する、資源待ちしている資源番号0を、変数mにセットする(ステップS240)。さらに、資源管理テーブル107に格納されている資源番号0のテナントプロセスのプロセス番号0を、変数nにセットする(ステップS241)。   Next, it is determined whether or not the resource wait flag of process number 1 stored in the process management table 105 is on (step S239). Since the resource wait flag for process number 1 is on (Y in step S239), the forced execution process selection means 130 is the resource number waiting for resources corresponding to process number 1 stored in the process management table 105. 0 is set to the variable m (step S240). Further, the process number 0 of the tenant process with the resource number 0 stored in the resource management table 107 is set to the variable n (step S241).

次に、強制実行プロセス選択手段130は、プロセス管理テーブル105においてプロセス番号n(=0)の実行可フラグがオンになっているか否かを確認する(ステップS242)。本例では、プロセス管理テーブル105においてプロセス番号0の実行可フラグはオンであるとする(ステップS242のY)。よって、この時点でのn=0が、ワークロードクラス1で動作するプロセス1が待っている資源を確保中のプロセスのプロセス番号である。続いて、ステップS248に移行し、強制実行情報格納テーブル108の資源番号にm(=0)を格納する(ステップS248)。さらに、強制実行プロセス選択手段130は、資源解放時に優先的に資源を渡すプロセスのプロセス番号(図9参照)として、kの値(ここでは1)を、強制実行情報格納テーブル108に格納し(ステップS249)、プロセス実行手段140に制御を渡す。   Next, the forced execution process selection unit 130 checks whether or not the execution flag of the process number n (= 0) is turned on in the process management table 105 (step S242). In this example, it is assumed that the execution flag of process number 0 is on in the process management table 105 (Y in step S242). Therefore, n = 0 at this time is the process number of the process that is securing the resources that the process 1 operating in the workload class 1 is waiting for. Subsequently, the process proceeds to step S248, and m (= 0) is stored in the resource number of the forced execution information storage table 108 (step S248). Further, the forced execution process selection means 130 stores the value of k (here, 1) in the forced execution information storage table 108 as the process number (see FIG. 9) of the process that preferentially delivers resources when releasing resources (see FIG. 9). In step S249, control is passed to the process execution means 140.

次に、図16および図17を参照して、プロセス実行手段140の動作の具体例を説明する。プロセス実行手段140は、強制実行プロセス選択手段130で選択されたプロセス番号n(ここではn=0)のワークロードクラス番号(ここでは0)をプロセス対応テーブル101から取得し、変数pにセットする(ステップS341)。強制実行プロセス選択手段130で選択されたプロセス番号nとは、強制実行プロセス選択手段130から制御が渡された時点のnであり、上記のように、ワークロードクラス1で動作するプロセス1が待っている資源を確保中のプロセスのプロセス番号を意味している。   Next, a specific example of the operation of the process execution unit 140 will be described with reference to FIGS. 16 and 17. The process execution unit 140 acquires the workload class number (here, 0) of the process number n (here, n = 0) selected by the forced execution process selection unit 130 from the process correspondence table 101 and sets it in the variable p. (Step S341). The process number n selected by the forced execution process selection unit 130 is n at the time when control is passed from the forced execution process selection unit 130, and the process 1 operating in the workload class 1 waits as described above. This means the process number of the process that is securing the reserved resource.

ステップS341の後、プロセス実行手段140は、目標時間格納テーブル103からワークロードクラス番号p(=0)のCPU目標時間(ここでは80ミリ秒)を取得して変数qにセットし(ステップS342)、使用時間格納テーブル104からワークロードクラス番号p(=0)のCPU使用時間(ここでは80ミリ秒)を取得して変数rにセットする(ステップS343)。そして、n=0であるので、実行可能プロセスキュー106から、プロセス番号0をデキューする(ステップS344)。さらに、プロセス管理テーブル105に格納されているプロセス番号0の実行可フラグおよび実行中断フラグをオフとする(ステップS345,S346)。   After step S341, the process execution unit 140 acquires the CPU target time (80 milliseconds here) of the workload class number p (= 0) from the target time storage table 103 and sets it in the variable q (step S342). Then, the CPU usage time (80 milliseconds here) of the workload class number p (= 0) is acquired from the usage time storage table 104 and set in the variable r (step S343). Since n = 0, the process number 0 is dequeued from the executable process queue 106 (step S344). Further, the execution flag and the execution interruption flag of process number 0 stored in the process management table 105 are turned off (steps S345 and S346).

そして、プロセス実行手段140は、プロセス番号0を最小実行単位分、実行し(ステップS347)、使用時間格納テーブル104のワークロードクラスp(=0)のCPU使用時間を、ステップS347で実行した時間分加算する(ステップS348)。   Then, the process execution means 140 executes the process number 0 for the minimum execution unit (step S347), and the CPU usage time of the workload class p (= 0) in the usage time storage table 104 is the time executed in step S347. The minutes are added (step S348).

次に、プロセス管理テーブル105に格納されているプロセス番号0の実行中断フラグがオンになったか否かを判定する(ステップS349)。ここでは、プロセス番号0の実行中断フラグがオフのままであるとする(ステップS349のN)。次に、プロセス実行手段140は、変数rの値(80ミリ秒)と、変数qの値(80ミリ秒)とを比較し、r=qであるので(ステップS350のY)、ステップS347に移行する。その後、プロセス番号0の実行中断フラグがオンになるまで、ステップS347〜S350の処理を繰り返す。   Next, it is determined whether or not the execution interruption flag of process number 0 stored in the process management table 105 is turned on (step S349). Here, it is assumed that the execution interruption flag of process number 0 remains off (N in step S349). Next, the process execution unit 140 compares the value of the variable r (80 milliseconds) with the value of the variable q (80 milliseconds), and since r = q (Y in step S350), the process execution unit 140 proceeds to step S347. Transition. Thereafter, the processes in steps S347 to S350 are repeated until the execution interruption flag of process number 0 is turned on.

次に、図20および図21を参照して、資源解放手段170の動作の具体例を説明する。上記のステップS347(図16参照)でプロセス実行手段140がプロセス番号0のプロセスを実行中に、そのプロセスから資源番号0の解放要求を行ったとする。すなわち、プロセス番号0のプロセスが資源解放プロセスであるとする。すると、資源解放手段170は、解放する資源番号0を変数tにセットする(ステップS171)。そして、資源管理テーブル107中の、資源番号t(ここでは0)のテナントプロセスのプロセス番号格納領域に格納されているプロセス番号0を削除し(ステップS172)、変数tが強制実行情報格納テーブル108中の資源番号0と一致しているか否かを判定する(ステップS173)。ここでは、変数tの値は0であり、両者は一致しているので(ステップS173のY)、資源解放手段170は、強制実行情報格納テーブル108中の「源解放時に優先的に資源を渡すプロセスのプロセス番号(図9参照)」を変数uにセットする。本例では、源解放時に優先的に資源を渡すプロセスのプロセス番号は1となっているので、u=1とする(ステップS174)。   Next, a specific example of the operation of the resource release unit 170 will be described with reference to FIGS. Assume that the process execution means 140 issues a resource number 0 release request from the process while executing the process number 0 in step S347 (see FIG. 16). That is, it is assumed that the process with process number 0 is a resource release process. Then, the resource release means 170 sets the resource number 0 to be released to the variable t (step S171). Then, the process number 0 stored in the process number storage area of the tenant process of the resource number t (here 0) in the resource management table 107 is deleted (step S172), and the variable t is the forced execution information storage table 108. It is determined whether or not it matches the resource number 0 in the middle (step S173). Here, since the value of the variable t is 0 and the two match (Y in step S173), the resource release unit 170 gives the resource preferentially when the source is released in the forced execution information storage table 108. The process number of the process (see FIG. 9) ”is set in the variable u. In this example, since the process number of the process that preferentially delivers resources when the source is released is 1, u = 1 is set (step S174).

ここではt=0,u=1であるので、資源解放手段170は、資源管理テーブル107において資源番号0の資源待ちプロセスキューから、プロセス番号1をデキューする(ステップS177)。さらに、資源管理テーブル107中の資源番号0のテナントプロセスのプロセス番号格納領域にプロセス番号1を格納する(ステップS178)。   Here, since t = 0 and u = 1, the resource releasing unit 170 dequeues process number 1 from the resource waiting process queue of resource number 0 in the resource management table 107 (step S177). Further, process number 1 is stored in the process number storage area of the tenant process of resource number 0 in the resource management table 107 (step S178).

また、資源解放手段170は、プロセス管理テーブル105中のプロセス番号1の資源待ちフラグをオフとし(ステップS179)、そのプロセス番号1の実行可フラグをオンとする(ステップS180)。さらに、実行可能プロセスキュー記憶手段106にプロセス番号1を実行優先順位順となるようにキューイングする(ステップS181)。   Further, the resource releasing unit 170 turns off the resource waiting flag of process number 1 in the process management table 105 (step S179), and turns on the executable flag of process number 1 (step S180). Further, the process number 1 is queued in the executable process queue storage means 106 in the order of execution priority (step S181).

そして、強制実行情報格納テーブル108中の資源番号と変数tが一致しているので(ステップS182のY)、資源解放手段170は、プロセス管理テーブル105において、資源解放プロセス(本例では、プロセス0)の実行中断フラグおよび実行可フラグをオンにセットする(ステップS183,S184)。実行可能プロセスキュー記憶手段106に、資源解放プロセスを実行優先順位順となるようにキューイングする(ステップS185)。すなわち、プロセス番号0を実行優先順位順となるようにキューイングする。その後、プロセス実行手段140に制御を戻す。   Since the resource number in the forced execution information storage table 108 matches the variable t (Y in step S182), the resource release unit 170 uses the resource release process (in this example, process 0) in the process management table 105. ) Is set to ON (steps S183 and S184). The resource release processes are queued in the executable process queue storage unit 106 in the order of execution priority (step S185). That is, the process number 0 is queued so as to be in the order of execution priority. Thereafter, control is returned to the process execution means 140.

プロセス実行手段140は、ステップS347(図16参照)でのプロセス実行中に資源番号0の解放要求を行った後、資源解放手段170から制御を戻されると、ステップS348以降の処理を行う。使用時間格納テーブル104のワークロードクラス0のCPU使用時間を、ステップS347で実行した時間分加算し(ステップS348、図16参照)。続くステップS349では、プロセス管理テーブル105に格納されているプロセス番号0の実行中断フラグがオンになっているので、ステップS354に移行し、強制実行情報格納テーブル108に登録されている資源番号0を削除し、プロセス選択手段120に制御を渡す。   The process execution unit 140 performs the processing from step S348 onward when control is returned from the resource release unit 170 after making a release request for the resource number 0 during the process execution in step S347 (see FIG. 16). The CPU usage time of workload class 0 in the usage time storage table 104 is added by the time executed in step S347 (see step S348, FIG. 16). In subsequent step S349, since the execution suspension flag of process number 0 stored in the process management table 105 is turned on, the process proceeds to step S354, and the resource number 0 registered in the forced execution information storage table 108 is set. Delete and pass control to the process selection means 120.

次に、図18を参照して、インターバル初期化手段150の動作の具体例を説明する。インターバル初期化手段150は、使用時間格納テーブル104中の全てのワークロードクラスのCPU使用時間に0をセットし(ステップS151)、100ミリ秒が経過するのを待つ(ステップS152)。100ミリ秒経過すると、ステップS151以降の処理を再度行う。   Next, a specific example of the operation of the interval initialization unit 150 will be described with reference to FIG. The interval initialization unit 150 sets 0 for the CPU usage time of all workload classes in the usage time storage table 104 (step S151), and waits for 100 milliseconds to elapse (step S152). When 100 milliseconds have elapsed, the processing after step S151 is performed again.

次に、本発明の効果について説明する。
本発明によれば、CPU使用時間がCPU目標時間未満となっているワークロードクラスで動作するプロセスが待っている資源を確保中のプロセスを強制的に実行させる。従って、CPU配分時間を使い切っていないにもかかわらず、共有資源待ちのままCPU資源を使用することができない状態に陥ることを防止することができる。
Next, the effect of the present invention will be described.
According to the present invention, a process that is securing resources waiting for a process operating in a workload class whose CPU usage time is less than the CPU target time is forcibly executed. Accordingly, it is possible to prevent the CPU resource from being in a state where the CPU resource cannot be used while waiting for the shared resource even though the CPU allocation time is not used up.

本発明によれば、ステップS239における資源待ちフラグがオンかオフかの判定を行うことで、CPU使用時間がCPU目標時間未満となっている着目しているワークロードクラスで動作するプロセスが、資源待ち状態であるか否かを判定している。そして、そのプロセスが資源待ち状態でない場合(ステップS239のN)では、プロセス実行手段140に制御を渡さず、プロセス実行手段140がそのプロセスの強制的実行(ステップS347)を行うことはない。換言すれば、システム資源等の資源を取得(確保)している場合でも、他のワークロードクラスがその資源の解放を待っていない場合には、強制的な実行を行わない。そのため、ワークロードクラスをきめ細かく設定し、各ワークロードクラスのCPU配分比率が小さくなる場合でも、システム資源の取得区間の強制実行を行った結果のCPU配分と、元々定めていたCPU配分比率とのずれを削減することができる。   According to the present invention, by determining whether the resource waiting flag in step S239 is on or off, a process operating in the target workload class whose CPU usage time is less than the CPU target time is It is determined whether or not it is in a waiting state. If the process is not in a resource waiting state (N in step S239), control is not passed to the process execution unit 140, and the process execution unit 140 does not forcibly execute the process (step S347). In other words, even when a resource such as a system resource is acquired (secured), if another workload class is not waiting for the resource to be released, the forced execution is not performed. Therefore, even if the workload class is set finely and the CPU allocation ratio of each workload class is small, the CPU allocation as a result of the forced execution of the system resource acquisition interval and the originally determined CPU allocation ratio Deviation can be reduced.

また、資源を確保中のプロセスを強制的に実行させた場合でも、そのプロセスが資源の解放を要求すると、資源解放手段170は、そのプロセスを中断させる(ステップS183,S184,S185)。その結果、実行優先順位が、ユーザが設定可能な優先順位の範囲に戻るまでの余分な区間を実行しないので、システム資源の取得区間の強制実行を行った結果のCPU配分と、元々定めていたCPU配分比率とのずれを削減することができる。   Further, even when the process that has secured the resource is forcibly executed, when the process requests the release of the resource, the resource release means 170 interrupts the process (steps S183, S184, S185). As a result, since the execution priority does not execute an extra section until it returns to the priority order range that can be set by the user, the CPU allocation as a result of the forced execution of the system resource acquisition section was originally determined. Deviation from the CPU distribution ratio can be reduced.

また、プロセスが解放を待つ資源には、システム資源だけでなく、ワークロードクラス間で共有される資源も含まれ、システム資源だけでなく、ワークロードクラス間共有資源についても、他のワークロードクラスが資源の解放を待つ場合に、その資源を確保しているプロセスの強制的な実行(ステップS347)を行う。よって、類似機能をさらにいくつかのワークロードクラスに分割したことによりワークロードクラス間で共有する資源が存在するようになった場合でも、ワークロードクラス間共有資源のロックネックによるスループットの低下を防止することができる。   In addition, resources that a process waits for release include not only system resources, but also resources shared among workload classes. Other workload classes include not only system resources but also shared resources between workload classes. When waiting for the release of the resource, the process that secures the resource is forcibly executed (step S347). Therefore, even if similar functions are further divided into several workload classes, resources that are shared among the workload classes can be prevented, and a decrease in throughput due to a lock neck of shared resources between workload classes is prevented. can do.

次に、本発明の概要について説明する。図23は、本発明の概要を示すブロック図である。本発明のプロセス制御装置は、強制実行対象特定手段501(例えば、強制実行プロセス選択手段130)と、強制実行手段502(例えば、プロセス実行手段140)と、資源解放手段503(例えば、資源解放手段170)とを備える。   Next, the outline of the present invention will be described. FIG. 23 is a block diagram showing an outline of the present invention. The process control apparatus of the present invention includes a forced execution target identification unit 501 (for example, forced execution process selection unit 130), a forced execution unit 502 (for example, process execution unit 140), and a resource release unit 503 (for example, resource release unit). 170).

強制実行対象特定手段501は、実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に(例えば、プロセス選択手段120がステップS121〜S127の処理でCPU使用時間がCPU目標時間未満のプロセスを選択できなかった場合)、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセス(例えば、ステップS242でYとなるときのプロセス番号kのプロセス)と、その資源を確保している資源確保プロセス(例えば、ステップS242でYとなるときのプロセス番号nのプロセス)とを特定する。   The forced execution target specifying unit 501 determines that the process selection unit 120 does not use the CPU until the CPU target time exists in the executable process queue that is a queue of executable processes (for example, the process selection unit 120 performs step S121). Process in which the CPU usage time is less than the CPU target time in the process of S127), a process that operates in a workload class that does not use up the CPU until the CPU target time and waits for the release of resources (For example, the process of process number k when Y is determined in step S242) and the resource reservation process that secures the resource (for example, the process of process number n when Y is determined in step S242) are specified. .

強制実行手段502は、資源確保プロセスを強制的に実行させる(例えば、ステップS347を行う)。   The forcible execution unit 502 forcibly executes the resource securing process (for example, performs step S347).

資源解放手段503は、強制実行手段からプロセスの実行に伴い資源の解放を要求されると、その資源を解放する(例えば、ステップS172を行う)とともに、そのプロセスを中断し(例えば、ステップS183〜S185を行い)、その資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する(例えば、ステップS181を行う)。   When the resource release unit 503 is requested to release the resource in accordance with the execution of the process from the forced execution unit, the resource release unit 503 releases the resource (for example, performs step S172) and interrupts the process (for example, step S183 to step S183). (S185 is performed), and a release waiting process waiting for the release of the resource is added to the executable process queue (for example, step S181 is performed).

以上のような構成により、資源確保プロセスを強制的に実行させ、CPU目標時間を使い切っていないにもかかわらず、資源待ちのままとなってしまう状態に陥ることを防止することができる。また、資源解放手段503は、資源解放時に、資源解放を要求したプロセスを中断するので、ワークロードクラスをきめ細かく設定し、各ワークロードクラスのCPU配分比率が小さくなる場合でも、システム資源の取得区間の強制実行を行った結果のCPU配分と、元々定めていたCPU配分比率とのずれを削減することができる。   With the configuration as described above, it is possible to forcibly execute the resource securing process and prevent a situation in which a resource is kept waiting even though the CPU target time is not used up. Further, since the resource release unit 503 interrupts the process that requested the resource release at the time of resource release, even if the workload class is set finely and the CPU allocation ratio of each workload class becomes small, the system resource acquisition interval It is possible to reduce a deviation between the CPU distribution as a result of the forced execution of the CPU and the originally determined CPU distribution ratio.

また、上記の実施形態には、強制実行対象特定手段501が、資源の解放を待つ解放待ちプロセスが存在していることを条件に(ステップS239でYとなることを条件に)、資源確保プロセスを強制実行手段502に実行させる構成が開示されている。   Further, in the above embodiment, the forced execution target specifying unit 501 is provided with a resource securing process on the condition that there is a release waiting process waiting for the release of the resource (provided that the result is Y in step S239). Has been disclosed.

そのような構成により、ワークロードクラスをきめ細かく設定し、各ワークロードクラスのCPU配分比率が小さくなる場合でも、システム資源の取得区間の強制実行を行った結果のCPU配分と、元々定めていたCPU配分比率とのずれを削減することができる。   With such a configuration, even when the workload class is set finely and the CPU distribution ratio of each workload class is small, the CPU distribution as a result of forcibly executing the acquisition section of the system resources and the CPU that was originally determined Deviation from the distribution ratio can be reduced.

また、資源が、ワークロードクラス間で共有される資源を含むことが開示されている。   It is also disclosed that the resources include resources that are shared between workload classes.

また、確保されている資源の資源識別情報と、資源解放時にその資源を優先的に使用するプロセスのプロセス識別情報とを記憶する優先プロセス記憶手段(例えば、強制実行情報格納テーブル108)を備え、強制実行対象特定手段501が、資源確保プロセスが確保している資源の資源識別情報を優先プロセス記憶手段に記憶させ(例えばステップS248を行い)、解放待ちプロセスのプロセス識別情報を、その資源を優先的に使用するプロセスのプロセス識別情報として優先プロセス記憶手段に記憶させ(例えば、ステップS249を行い)、資源解放手段503が、解放した資源の資源識別情報と優先プロセス記憶手段が記憶している資源識別情報とが一致する場合に(例えば、ステップS173のY)、優先プロセス記憶手段に記憶されているプロセス識別情報が示すプロセスを実行可能プロセスキューにキューイングする(例えば、ステップS174で定めたuに関してステップS181を行う)構成が開示されている。   In addition, there is provided priority process storage means (for example, forced execution information storage table 108) for storing resource identification information of the secured resource and process identification information of a process that preferentially uses the resource when releasing the resource, The forced execution target specifying unit 501 stores the resource identification information of the resource secured by the resource securing process in the priority process storage unit (for example, performing step S248), and prioritizes the process identification information of the process waiting to be released. Is stored in the priority process storage means as the process identification information of the process to be used automatically (for example, step S249 is performed), and the resource release means 503 stores the resource identification information of the released resources and the priority process storage means. When the identification information matches (for example, Y in step S173), it is recorded in the priority process storage means. By the process identification information is queued in the executable process queue processes shown are (e.g., perform step S181 with respect to u which defines in step S174) configuration is disclosed.

また、強制実行手段502は、実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在する場合(例えば、プロセス選択手段120がステップS121〜S127の処理でCPU使用時間がCPU目標時間未満のプロセスを選択した場合)、そのプロセスを実行する構成が開示されている。   Further, the forcible execution unit 502 determines that there is a process that does not use up the CPU until the CPU target time in the executable process queue (for example, the process selection unit 120 performs the CPU usage time in steps S121 to S127). If a process of less than time is selected), a configuration for executing that process is disclosed.

本発明は、ワークロード毎に資源の割り当てを行うプロセス制御に好適に適用される。   The present invention is preferably applied to process control in which resources are allocated for each workload.

本発明のプロセス制御装置の例を示すブロック図である。It is a block diagram which shows the example of the process control apparatus of this invention. プロセス対応テーブルを示す説明図である。It is explanatory drawing which shows a process corresponding | compatible table. CPU配分テーブルを示す説明図である。It is explanatory drawing which shows a CPU distribution table. 目標時間格納テーブルを示す説明図である。It is explanatory drawing which shows a target time storage table. 使用時間格納テーブルを示す説明図である。It is explanatory drawing which shows a usage time storage table. プロセス管理テーブルを示す説明図である。It is explanatory drawing which shows a process management table. 実行可能プロセスキュー記憶手段を示す説明図である。It is explanatory drawing which shows the executable process queue memory | storage means. 資源管理テーブルを示す説明図である。It is explanatory drawing which shows a resource management table. 強制実行情報格納テーブルを示す説明図である。It is explanatory drawing which shows a forced execution information storage table. CPU目標時間を目標時間格納テーブルに記憶させる動作の例を示すフローチャートである。It is a flowchart which shows the example of the operation | movement which memorize | stores CPU target time in a target time storage table. プロセス選択からプロセス実行までの制御の流れを示す説明図である。It is explanatory drawing which shows the flow of control from process selection to process execution. プロセス選択手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a process selection means. 強制実行プロセス選択手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of the forced execution process selection means. 強制実行プロセス選択手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of the forced execution process selection means. 強制実行プロセス選択手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of the forced execution process selection means. プロセス実行手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a process execution means. プロセス実行手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a process execution means. インターバル初期化手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of an interval initialization means. 資源取得手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a resource acquisition means. 資源解放手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a resource release means. 資源解放手段の動作の例を示すフローチャートである。It is a flowchart which shows the example of operation | movement of a resource release means. 各テーブルの状態の具体例を示す説明図である。It is explanatory drawing which shows the specific example of the state of each table. 本発明の概要を示すブロック図である。It is a block diagram showing the outline of the present invention. 本発明に関連するCPU配分装置の例を示すブロック図である。It is a block diagram which shows the example of the CPU distribution apparatus relevant to this invention. 図24に示すCPU配分装置のプロセス選択手段の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the process selection means of the CPU distribution apparatus shown in FIG. 図24に示すCPU配分装置のプロセス選択手段の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the process selection means of the CPU distribution apparatus shown in FIG.

符号の説明Explanation of symbols

10 プロセス制御装置
101 プロセス対応テーブル
102 CPU配分テーブル
103 目標時間格納テーブル
104 使用時間格納テーブル
105 プロセス管理テーブル
106 実行可能プロセスキュー記憶手段
107 資源管理テーブル
108 強制実行情報格納テーブル
110 目標時間計算手段
120 プロセス選択手段
130 強制実行プロセス選択手段
140 プロセス実行手段
150 インターバル初期化手段
160 資源取得手段
170 資源解放手段
501 強制実行対象特定手段
502 強制実行手段
503 資源解放手段
DESCRIPTION OF SYMBOLS 10 Process control apparatus 101 Process correspondence table 102 CPU allocation table 103 Target time storage table 104 Usage time storage table 105 Process management table 106 Executable process queue storage means 107 Resource management table 108 Forced execution information storage table 110 Target time calculation means 120 Process Selection means 130 Forced execution process selection means 140 Process execution means 150 Interval initialization means 160 Resource acquisition means 170 Resource release means 501 Forced execution target identification means 502 Forced execution means 503 Resource release means

Claims (9)

実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定する強制実行対象特定手段と、
前記資源確保プロセスを強制的に実行させる強制実行手段と、
強制実行手段からプロセスの実行に伴い資源の解放を要求されると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する資源解放手段とを備える
ことを特徴とするプロセス制御装置。
A process that operates in a workload class that does not use up the CPU until the CPU target time when there is no process in the executable process queue that is the queue of executable processes that does not use up the CPU until the CPU target time. A forcible execution target specifying means for specifying a release waiting process waiting for the release of a resource and a resource securing process securing the resource;
Forcibly executing means for forcibly executing the resource securing process;
When the forcible execution means requests the release of a resource along with the execution of the process, the resource is released, and the process is suspended and a release waiting process waiting for the release of the resource is added to the executable process queue. A process control apparatus.
強制実行対象特定手段は、資源の解放を待つ解放待ちプロセスが存在していることを条件に、資源確保プロセスを強制実行手段に実行させる
請求項1に記載のプロセス制御装置。
The process control device according to claim 1, wherein the forcible execution target specifying unit causes the forcible execution unit to execute the resource securing process on condition that there is a release waiting process waiting for the release of the resource.
資源は、ワークロードクラス間で共有される資源を含む
請求項1または請求項2に記載のプロセス制御装置。
The process control apparatus according to claim 1, wherein the resource includes a resource shared between workload classes.
確保されている資源の資源識別情報と、資源解放時に当該資源を優先的に使用するプロセスのプロセス識別情報とを記憶する優先プロセス記憶手段を備え、
強制実行対象特定手段は、資源確保プロセスが確保している資源の資源識別情報を優先プロセス記憶手段に記憶させ、解放待ちプロセスのプロセス識別情報を、前記資源を優先的に使用するプロセスのプロセス識別情報として優先プロセス記憶手段に記憶させ、
資源解放手段は、解放した資源の資源識別情報と優先プロセス記憶手段が記憶している資源識別情報とが一致する場合に、優先プロセス記憶手段に記憶されているプロセス識別情報が示すプロセスを実行可能プロセスキューにキューイングする
請求項1から請求項3のうちのいずれか1項に記載のプロセス制御装置。
A priority process storage means for storing resource identification information of a secured resource and process identification information of a process that preferentially uses the resource when releasing the resource;
The forced execution target specifying means stores the resource identification information of the resource secured by the resource securing process in the priority process storage means, and the process identification information of the process waiting to be released is the process identification of the process that preferentially uses the resource. Information is stored in the priority process storage means,
The resource release means can execute the process indicated by the process identification information stored in the priority process storage means when the resource identification information of the released resource matches the resource identification information stored in the priority process storage means. The process control device according to any one of claims 1 to 3, wherein the process control device is queued in a process queue.
強制実行手段は、実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在する場合、当該プロセスを実行する
請求項1から請求項4のうちのいずれか1項に記載のプロセス制御装置。
The process according to any one of claims 1 to 4, wherein the forcible execution means executes the process when there is a process that does not use up the CPU until the CPU target time in the executable process queue. Control device.
実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定し、
前記資源確保プロセスを強制的に実行させ、
プロセスの実行に伴い資源の解放を要求されると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する
ことを特徴とするプロセス制御方法。
A process that operates in a workload class that does not use up the CPU until the CPU target time when there is no process in the executable process queue that is the queue of executable processes that does not use up the CPU until the CPU target time. Identify the release-waiting process that waits for the release of the resource and the resource reservation process that secures the resource,
Forcing the resource securing process to run;
When a resource is requested to be released in accordance with the execution of a process, the process releases the resource, interrupts the process, and adds a waiting process for waiting for the release of the resource to an executable process queue. Control method.
資源の解放を待つ解放待ちプロセスが存在していることを条件に、資源確保プロセスを実行する
請求項6に記載のプロセス制御方法。
The process control method according to claim 6, wherein the resource securing process is executed on condition that there is a release waiting process waiting for the release of the resource.
コンピュータに、
実行可能なプロセスのキューである実行可能プロセスキューの中にCPU目標時間までCPUを使い切っていないプロセスが存在していない場合に、CPU目標時間までCPUを使い切っていないワークロードクラスで動作するプロセスであって資源の解放を待つ解放待ちプロセスと、当該資源を確保している資源確保プロセスとを特定する強制実行対象特定処理、
前記資源確保プロセスを強制的に実行させる強制実行処理、および、
強制実行処理でのプロセスの実行に伴い資源の解放要求が生じると、当該資源を解放するとともに、前記プロセスを中断し、前記資源の解放を待つ解放待ちプロセスを実行可能プロセスキューに追加する資源解放処理
を実行させるためのプロセス制御プログラム。
On the computer,
A process that operates in a workload class that does not use up the CPU until the CPU target time when there is no process in the executable process queue that is the queue of executable processes that does not use up the CPU until the CPU target time. A forced execution target identification process that identifies a release waiting process that waits for the release of a resource and a resource allocation process that secures the resource,
A forced execution process for forcibly executing the resource securing process; and
When a resource release request is generated during execution of a process in forced execution processing, the resource is released, and the process is suspended and a release waiting process waiting for the resource release is added to the executable process queue. Process control program to execute processing.
前記コンピュータに、
資源の解放を待つ解放待ちプロセスが存在していることを条件に、強制実行処理で資源確保プロセスを強制的に実行する
請求項8に記載のプロセス制御プログラム。
In the computer,
The process control program according to claim 8, wherein the resource securing process is forcibly executed by the forcible execution process on condition that there is a release waiting process waiting for the release of the resource.
JP2008053474A 2008-03-04 2008-03-04 Process control device, process control method, and process control program Expired - Fee Related JP4650504B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008053474A JP4650504B2 (en) 2008-03-04 2008-03-04 Process control device, process control method, and process control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008053474A JP4650504B2 (en) 2008-03-04 2008-03-04 Process control device, process control method, and process control program

Publications (2)

Publication Number Publication Date
JP2009211386A JP2009211386A (en) 2009-09-17
JP4650504B2 true JP4650504B2 (en) 2011-03-16

Family

ID=41184463

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008053474A Expired - Fee Related JP4650504B2 (en) 2008-03-04 2008-03-04 Process control device, process control method, and process control program

Country Status (1)

Country Link
JP (1) JP4650504B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026552B (en) * 2019-12-09 2023-03-03 腾讯科技(深圳)有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06214811A (en) * 1993-01-20 1994-08-05 Toshiba Corp Scheduling system
JPH0877025A (en) * 1994-09-01 1996-03-22 Kokusai Electric Co Ltd Task priority control method and task priority control device
JPH1124946A (en) * 1997-07-04 1999-01-29 Canon Inc Task scheduling apparatus and method
JP2000148512A (en) * 1998-11-06 2000-05-30 Hitachi Ltd How to schedule a job
JP2003122586A (en) * 2001-08-09 2003-04-25 Matsushita Electric Ind Co Ltd Task scheduling device

Also Published As

Publication number Publication date
JP2009211386A (en) 2009-09-17

Similar Documents

Publication Publication Date Title
US7302686B2 (en) Task management system
CN107291548B (en) Task resource scheduling method and device
US8954975B2 (en) Task scheduling method for real time operating system
US20090083746A1 (en) Method for job management of computer system
KR101644800B1 (en) Computing system and method
JPH07141305A (en) Execution control method for parallel computers
KR101640848B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
JPH0659906A (en) Execution control method for parallel computers
FR3025907B1 (en) MECHANISM AND METHOD FOR PROVIDING COMMUNICATION BETWEEN A CLIENT AND A SERVER BY ACCESSING SHARED MEMORY MESSAGE DATA.
CN110781145B (en) File system task scheduling method, device, equipment and readable storage medium
US20210149726A1 (en) Scheduling device, scheduling system, scheduling method, and non-transitory computer-readable medium
JP5605131B2 (en) Job scheduling program, method, and apparatus
Biswas et al. Determining proficient time quantum to improve the performance of round robin scheduling algorithm
CN115766612B (en) A scheduling method based on weight conversion probability and corresponding device
US20170344266A1 (en) Methods for dynamic resource reservation based on classified i/o requests and devices thereof
CN114153578A (en) Data access method, device, equipment and storage medium
JP4650504B2 (en) Process control device, process control method, and process control program
CN113225269A (en) Container-based workflow scheduling method, device and system and storage medium
KR101335038B1 (en) Periodic and aperiodic task scheduling algorithm based on topological sort and residual time
Azmi et al. Performance comparison of priority rule scheduling algorithms using different inter arrival time jobs in grid environment
CN106775975A (en) Process scheduling method and device
CN112181661B (en) Task scheduling method
JP2001022601A (en) Job execution control method and parallel computer system
Patel SJRR CPU scheduling algorithm
JP6337684B2 (en) Observation plan creation device and observation device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20101105

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20101116

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101129

R150 Certificate of patent or registration of utility model

Ref document number: 4650504

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131224

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees