[go: up one dir, main page]

JP7355456B2 - CPU resource management device - Google Patents

CPU resource management device Download PDF

Info

Publication number
JP7355456B2
JP7355456B2 JP2019222164A JP2019222164A JP7355456B2 JP 7355456 B2 JP7355456 B2 JP 7355456B2 JP 2019222164 A JP2019222164 A JP 2019222164A JP 2019222164 A JP2019222164 A JP 2019222164A JP 7355456 B2 JP7355456 B2 JP 7355456B2
Authority
JP
Japan
Prior art keywords
time
interval
cpu
interval time
cpu usage
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.)
Active
Application number
JP2019222164A
Other languages
Japanese (ja)
Other versions
JP2021092904A (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 Solution Innovators Ltd
Original Assignee
NEC Solution Innovators Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP2019222164A priority Critical patent/JP7355456B2/en
Publication of JP2021092904A publication Critical patent/JP2021092904A/en
Application granted granted Critical
Publication of JP7355456B2 publication Critical patent/JP7355456B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)
  • Multi Processors (AREA)

Description

本発明は、CPUリソース管理装置、CPUリソース管理方法、および、プログラムに関する。 The present invention relates to a CPU resource management device, a CPU resource management method, and a program.

近年のコンピュータシステムでは、システム管理者が、プロセスが属するクラスであるワークロードクラスを設定し、ワークロードクラス毎に利用可能なCPUリソースを割り当てることが行われている。このようなコンピュータシステムでは、各ワークロードクラスに対するリソース配分を適切に行わないと、システム性能が大きく低下し、システムの運用に支障をきたすことがある。そのため、これまでにも、各ワークロードクラスに対するCPUリソース配分を工夫して行うための技術が開示されている。 In recent computer systems, system administrators set workload classes, which are classes to which processes belong, and allocate available CPU resources to each workload class. In such a computer system, if resources are not allocated appropriately to each workload class, system performance may drop significantly and system operation may be hindered. Therefore, techniques have been disclosed for devising CPU resource allocation to each workload class.

例えば、特許文献1には、各ワークロードクラスに割り当てるCPUリソースの配分比に従い、一定の時間であるインターバル毎に、各ワークロードクラスにCPUリソースを割り当てる最大CPU使用時間を設定し、この最大CPU使用時間に従い、各ワークロードクラスに属するプロセスにCPUリソースを割り当てる技術が記載されている。例えば、a、b、cの3つのワークロードクラスがあり、そのCPUリソース配分比を4:3:3とし、インターバル時間を100msとすると、1回のインターバルでは、ワークロードクラスa、b、cに属する各プロセスに、それぞれ最大40ms、30ms、30msのCPU使用時間が割り当てられることになる。 For example, in Patent Document 1, according to the distribution ratio of CPU resources to be allocated to each workload class, the maximum CPU usage time to allocate CPU resources to each workload class is set at each fixed time interval, and this maximum CPU A technique is described that allocates CPU resources to processes belonging to each workload class according to usage time. For example, if there are three workload classes a, b, and c, and the CPU resource distribution ratio is 4:3:3 and the interval time is 100ms, then in one interval, workload classes a, b, and c A maximum of 40 ms, 30 ms, and 30 ms of CPU usage time will be allocated to each process belonging to .

特許第4427802号Patent No. 4427802

ところで、インターバル内で、割り当てられた最大CPU使用時間を必要としない低負荷なワークロードクラスが存在する場合、余剰CPU時間分だけ、インターバルを早く終了し、次のインターバルを開始することが望ましい。例えば、ワークロードクラスaは高負荷な状態にあり、割り当てられた最大CPU使用時間以上にCPUリソースを必要とするが、ワークロードクラスb、cは低負荷な状態にあり、割り当てられた最大CPU使用時間を必要としないものとする。このとき、ワークロードクラスb、cが割り当てられた最大CPU使用時間の30msのうち例えば15msだけしか使用しなかった場合、30msの余剰CPU時間分だけ、インターバルを早く終了し、次のインターバルを開始する。この結果、前回のインターバルは実質70msに短縮される。次のインターバルでも同様の状況が生じると、次のインターバルも実質70msに短縮される。 By the way, if there is a low-load workload class that does not require the allocated maximum CPU usage time within the interval, it is desirable to end the interval earlier by the excess CPU time and start the next interval. For example, workload class a is in a high load state and requires more CPU resources than the allotted maximum CPU usage time, while workload classes b and c are in a low load state and require more CPU resources than the allotted maximum CPU usage time. It shall not require any usage time. At this time, if workload classes b and c use only 15ms of the maximum CPU usage time of 30ms allocated to them, the interval will end early by the 30ms of extra CPU time and the next interval will start. do. As a result, the previous interval is effectively shortened to 70 ms. If a similar situation occurs in the next interval, the next interval will also be effectively shortened to 70 ms.

このように割り当てられた最大CPU使用時間を必要としない低負荷なワークロードクラスの余剰CPU時間分だけインターバルを短縮することにより、割り当てられた最大CPU使用時間以上にCPUリソースを必要とする高負荷なワークロードクラスのターンアラウンド時間を改善することができる。しかしながら、インターバルを短縮すればするほどに単位時間当たりのプロセス切り替え回数が増大するため、スループットが低下する。 In this way, by shortening the interval by the surplus CPU time of a low-load workload class that does not require the allocated maximum CPU usage time, you can reduce the interval by the surplus CPU time of a low-load workload class that does not require the allocated maximum CPU usage time. can improve turnaround time for specific workload classes. However, as the interval is shortened, the number of process switches per unit time increases, resulting in a decrease in throughput.

本発明の目的は、上述した課題を解決するCPUリソース管理装置を提供することにある。 An object of the present invention is to provide a CPU resource management device that solves the above-mentioned problems.

本発明の一形態に係るCPUリソース管理装置は、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたCPUリソース管理装置であって、
前記プロセッサは、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する実行制御手段と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する調整手段と、
を備えるように構成されている。
A CPU resource management device according to one embodiment of the present invention includes:
A CPU resource management device comprising a storage device that stores a process, and a processor that executes the process,
The processor includes:
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. Execution control means for recording the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval. and,
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and adjustment means for determining the next maximum CPU usage time for each workload class based on the distribution ratio of CPU usage time for each workload class;
It is configured to include.

また本発明の他の形態に係るCPUリソース管理方法は、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータが実行するCPUリソース管理方法であって、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録し、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
ように構成されている。
Further, a CPU resource management method according to another embodiment of the present invention includes:
A CPU resource management method executed by a computer including a storage device that stores a process and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. and record the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
It is configured as follows.

また本発明の他の形態に係るプログラムは、
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータに、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する処理と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する処理と、
を行わせるように構成されている。
Further, a program according to another embodiment of the present invention is
A computer including a storage device that stores a process, and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. terminating the interval and recording the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
is configured to perform the following.

本発明は上述したような構成を有することにより、コンピュータシステムのスループットを改善することができる。 By having the configuration as described above, the present invention can improve the throughput of a computer system.

本発明の第1の実施形態に係るCPUリソース管理装置のブロック図である。FIG. 1 is a block diagram of a CPU resource management device according to a first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置におけるワークロード定義の構成例を示す図である。FIG. 3 is a diagram illustrating a configuration example of a workload definition in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置における実行可能プロセスキューの構成例を示す図である。FIG. 3 is a diagram illustrating a configuration example of an executable process queue in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置における次回のインターバル時間見直し処理(1)で使用する判定ルールの構成例を示す図である。FIG. 6 is a diagram illustrating a configuration example of a determination rule used in the next interval time review process (1) in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置における次回のインターバル時間見直し処理(1)で使用する計算式を示す図である。FIG. 6 is a diagram showing a calculation formula used in the next interval time review process (1) in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置における次回のインターバル時間見直し処理(2)で使用する条件式を示す図である。FIG. 7 is a diagram showing a conditional expression used in the next interval time review process (2) in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置における次回のインターバル時間見直し処理(2)で使用する計算式を示す図である。FIG. 7 is a diagram showing a calculation formula used in the next interval time review process (2) in the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置の動作を表すフローチャートである。3 is a flowchart showing the operation of the CPU resource management device according to the first embodiment of the present invention. 本発明の第1の実施形態に係るCPUリソース管理装置の作用効果の説明図である。FIG. 2 is an explanatory diagram of the effects of the CPU resource management device according to the first embodiment of the present invention. 本発明の第2の実施形態に係るCPUリソース管理装置のブロック図である。FIG. 2 is a block diagram of a CPU resource management device according to a second embodiment of the present invention. 本発明の第3の実施形態に係るCPUリソース管理装置のブロック図である。FIG. 3 is a block diagram of a CPU resource management device according to a third embodiment of the present invention.

次に本発明の実施の形態について図面を参照して詳細に説明する。
[第1の実施形態]
図1は本発明の第1の実施形態に係るCPUリソース管理装置100のブロック図である。図1を参照すると、CPUリソース管理装置100は、記憶装置110と、この記憶装置110に接続されたCPU120とから構成されている。
Next, embodiments of the present invention will be described in detail with reference to the drawings.
[First embodiment]
FIG. 1 is a block diagram of a CPU resource management device 100 according to a first embodiment of the present invention. Referring to FIG. 1, the CPU resource management device 100 includes a storage device 110 and a CPU 120 connected to the storage device 110.

記憶装置110は、ハードディスクやメモリなどから構成され、CPU120で実行される各種処理に必要な処理情報およびプログラム114を記憶するように構成されている。プログラム114は、CPU120に読み込まれて実行されることにより各種処理部を実現するプログラムであり、図示しない通信インターフェース部などのデータ入出力機能を介して外部装置(図示せず)や記憶媒体(図示せず)から予め読み込まれて記憶装置110に保存される。記憶装置110に記憶される処理情報には、ワークロード定義111、実行可能プロセスキュー112、および、ディスパッチング情報113がある。 The storage device 110 is composed of a hard disk, a memory, etc., and is configured to store processing information and programs 114 necessary for various processes executed by the CPU 120. The program 114 is a program that implements various processing units by being read and executed by the CPU 120, and is connected to an external device (not shown) or a storage medium (not shown) via a data input/output function such as a communication interface unit (not shown). (not shown) is read in advance and stored in the storage device 110. The processing information stored in the storage device 110 includes a workload definition 111, an executable process queue 112, and dispatching information 113.

ワークロード定義111は、プロセス(もしくはジョブ)が属するクラス(ワークロードクラス)を定義するクラス定義と、各ワークロードクラスに割り当てるCPUリソースの配分比(または配分率)を定義する配分定義とを表す情報である。ワークロード定義111は、主に、システム管理者により設定される。図2は、ワークロード定義111の構成例である。このワークロード定義111のクラス定義では、それぞれa、b、cという名前の3つのワードロードクラスが存在することが定義されている。ワードロードクラスは、主に、業務単位に分けられる。また、このワークロード定義111の配分定義では、ワークロードクラスa、b、cのCPUリソースの配分比が4:3:3であることが定義されている。 The workload definition 111 represents a class definition that defines the class (workload class) to which a process (or job) belongs, and a distribution definition that defines the distribution ratio (or distribution rate) of CPU resources to be allocated to each workload class. It is information. The workload definition 111 is mainly set by a system administrator. FIG. 2 is a configuration example of the workload definition 111. The class definition of this workload definition 111 defines that there are three word load classes named a, b, and c, respectively. Word load classes are mainly divided into business units. Further, in the distribution definition of this workload definition 111, it is defined that the distribution ratio of CPU resources for workload classes a, b, and c is 4:3:3.

実行可能プロセスキュー112は、実行可能なプロセスがキューイングされる記憶手段である。図3は、実行可能プロセスキュー112の構成例である。この実行可能プロセスキュー112では、キューイングされたプロセスのプロセス番号および所属するワークロードクラスの情報が記憶されている。実行可能プロセスキュー112には、プロセス番号および所属するワークロードクラスの情報以外に、各プロセスの実行優先度などの情報が記憶されていてもよい。また、各プロセスが所属するワークロードクラスは、実行可能プロセスキュー112以外の箇所で記憶するようにしてもよい。 The executable process queue 112 is a storage means in which executable processes are queued. FIG. 3 shows an example of the configuration of the executable process queue 112. This executable process queue 112 stores information about the process number of the queued process and the workload class to which it belongs. The executable process queue 112 may store information such as the execution priority of each process in addition to the process number and the workload class to which it belongs. Furthermore, the workload class to which each process belongs may be stored in a location other than the executable process queue 112.

ディスパッチング情報113は、プロセスにCPUリソースを割り当てる制御に使用する情報である。図1を参照すると、ディスパッチング情報113は、ベースインターバル時間131、プロセス切替平均時間132、閾値133、次回のインターバル時間134、次回のワークロードクラス毎の最大CPU使用時間135、前回のインターバル時間136、前回の総割り当て時間137、および、前回のCPUリソース割り当て打ち切り回数138を含んで構成されている。 The dispatching information 113 is information used to control the allocation of CPU resources to processes. Referring to FIG. 1, the dispatching information 113 includes a base interval time 131, average process switching time 132, threshold value 133, next interval time 134, next maximum CPU usage time for each workload class 135, and previous interval time 136. , the previous total allocation time 137, and the previous CPU resource allocation abort count 138.

ベースインターバル時間131は、基本となるインターバル時間であり、固定値である。例えば、ベースインターバル時間131は、100msとしてよい。 The base interval time 131 is a basic interval time and is a fixed value. For example, the base interval time 131 may be 100 ms.

プロセス切替平均時間132は、CPU120上で実行するプロセスを別のプロセスに切り替えるために必要な時間の平均値である。プロセス切替平均時間132は、1回のプロセス切替にかかる平均時間である。 The process switching average time 132 is an average value of the time required to switch a process executed on the CPU 120 to another process. The process switching average time 132 is the average time required for one process switching.

閾値133は、後述する次回のインターバル時間見直し処理(2)の判定で使用する閾値である。 The threshold value 133 is a threshold value used in determination of the next interval time review process (2), which will be described later.

次回のインターバル時間134は、次回のインターバルで使用されるインターバル時間である。この次回のインターバル時間134は可変値である。 The next interval time 134 is the interval time to be used in the next interval. This next interval time 134 is a variable value.

次回のワークロードクラス毎の最大CPU使用時間135は、次回のインターバルにおけるワークロードクラス毎の最大CPU使用時間である。最大CPU使用時間は、配分時間とも称される。 The next maximum CPU usage time for each workload class 135 is the maximum CPU usage time for each workload class in the next interval. The maximum CPU usage time is also referred to as allocation time.

前回のインターバル時間136は、前回のインターバルで使用されたインターバル時間である。 The previous interval time 136 is the interval time used in the previous interval.

前回の総割り当て時間137は、前回のインターバルの開始から終了までの時間である。 The previous total allocation time 137 is the time from the start to the end of the previous interval.

前回のCPUリソース割り当て打ち切り回数138は、前回のインターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数である。 The previous CPU resource allocation abort count 138 is the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time from the start to the end of the previous interval.

CPU120は、演算処理装置とその周辺回路とから構成され、記憶装置110からプログラム114を読み込んで実行することにより、ハードウェアとプログラム114とを協働させて各種処理部を実現するように構成されている。CPU120で実現される処理部には、初期化手段121と実行制御手段122と調整手段123とがある。 The CPU 120 is composed of an arithmetic processing unit and its peripheral circuits, and is configured to read the program 114 from the storage device 110 and execute it, thereby causing the hardware and the program 114 to work together to implement various processing units. ing. The processing section implemented by the CPU 120 includes an initialization means 121, an execution control means 122, and an adjustment means 123.

初期化手段121は、ワークロード定義111およびディスパッチング情報113を初期化するように構成されている。具体的には、初期化手段121は、図示しない通信インターフェース部などのデータ入出力機能を介してシステム管理者からワークロード定義111を入力し、記憶装置110に記憶する。また初期化手段121は、ベースインターバル時間131に予め定められた固定時間(例えば100ms)を設定する。また初期化手段121は、プロセス切替平均時間132に事前の測定などによって決定した1回のプロセス切替にかかる平均時間(例えば10μs)を設定する。また初期化手段121は、閾値133に予め定められた値(例えば5%)を設定する。また初期化手段121は、次回のインターバル時間134にベースインターバル時間131と同じ時間を設定する。また初期化手段121は、次回のワークロードクラス毎の最大CPU使用時間135に、次回のインターバル時間134に設定したインターバル時間をワークロード定義111に記載されるワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロードクラス毎の最大CPU使用時間を設定する。また初期化手段121は、前回のCPUリソース割り当て打ち切り回数138に初期値(例えば0)を設定する。但し、初期化手段121は、前回のインターバル時間136、前回の総割り当て時間137、および、前回のCPUリソース割り当て打ち切り回数138に前回の履歴が残されている場合、それらを初期化しないようにしてもよい。 The initialization means 121 is configured to initialize the workload definition 111 and the dispatching information 113. Specifically, the initialization unit 121 receives the workload definition 111 from the system administrator via a data input/output function such as a communication interface unit (not shown), and stores it in the storage device 110 . The initialization means 121 also sets a predetermined fixed time (for example, 100 ms) to the base interval time 131. Further, the initialization unit 121 sets the average time required for one process switching (for example, 10 μs) determined by prior measurement to the process switching average time 132 . The initialization unit 121 also sets the threshold value 133 to a predetermined value (for example, 5%). The initialization means 121 also sets the next interval time 134 to the same time as the base interval time 131. In addition, the initialization means 121 distributes the CPU usage time for each workload class described in the workload definition 111 to the interval time set as the next interval time 134 to the maximum CPU usage time 135 for each next workload class. Set the maximum CPU usage time for each workload class calculated by distributing it according to the ratio. The initialization unit 121 also sets an initial value (for example, 0) to the previous CPU resource allocation abort count 138. However, if the previous history is left in the previous interval time 136, the previous total allocation time 137, and the previous CPU resource allocation abort count 138, the initialization means 121 does not initialize them. Good too.

実行制御手段122は、プロセスにCPUリソースを割り当てて実行するように構成されている。具体的には、実行制御手段122は、ディスパッチング情報113を記憶装置110から読み出し、そのディスパッチング情報113に従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行するインターバルを開始する。また実行制御手段122は、インターバルを開始すると、内部変数として有するワークロードクラス毎のCPU使用時間とCPUリソース割り当て打ち切り回数をそれぞれ零にリセットし、次回のインターバル時間134をセットしたタイマの減算を開始する。また実行制御手段122は、インターバル開始後のCPU使用時間が、次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスを実行可能プロセスキュー112から取り出してCPU120を割り当てて実行する。また実行制御手段122は、プロセスの実行時間に応じて、そのプロセスが属するワークロードクラスのCPU使用時間を加算する。また実行制御手段122は、プロセスの実行中に、そのプロセスが属するワークロードクラスのCPU使用時間がその最大CPU使用時間135を超えると、そのプロセスへのCPUリソースの割り当てを打ち切り、そのプロセスを実行可能プロセスキュー112に格納する。その際、実行制御手段122は、CPUリソース割り当て打ち切り回数をインクリメントする。また、実行中のプロセスが自らCPUを離す事象(入出力要求など)が発生した場合、実行制御手段122は、そのプロセスへのCPUリソースの割り当てを打ち切り、そのプロセスを図示しない実行待ちキューなどに格納する。このとき実行制御手段122は、CPUリソース割り当ての打ち切りを行った原因が最大CPU使用時間によるものでないため、CPUリソース割り当て打ち切り回数はインクリメントしない。 The execution control means 122 is configured to allocate CPU resources to processes and execute them. Specifically, the execution control unit 122 reads the dispatching information 113 from the storage device 110 and, according to the dispatching information 113, determines the interval at which processes of each workload class queued in the executable process queue 112 are executed. Start. Furthermore, when the interval starts, the execution control means 122 resets the CPU usage time and the number of CPU resource allocation aborts for each workload class, which are internal variables, to zero, and starts subtracting the timer set to the next interval time 134. do. The execution control unit 122 also controls processes belonging to workload classes whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time set in the next maximum CPU usage time 135 for each workload class to an executable process. It is taken out from the queue 112, assigned to the CPU 120, and executed. Furthermore, the execution control unit 122 adds the CPU usage time of the workload class to which the process belongs, depending on the execution time of the process. Furthermore, if the CPU usage time of the workload class to which the process belongs exceeds its maximum CPU usage time 135 while the process is being executed, the execution control means 122 terminates the allocation of CPU resources to the process and executes the process. It is stored in the possible process queue 112. At this time, the execution control means 122 increments the number of times CPU resource allocation is aborted. Furthermore, when an event occurs that causes a process that is being executed to release itself from the CPU (such as an input/output request), the execution control unit 122 terminates the allocation of CPU resources to the process, and places the process in an execution queue (not shown) or the like. Store. At this time, the execution control means 122 does not increment the number of times the CPU resource allocation is aborted because the reason for aborting the CPU resource allocation is not due to the maximum CPU usage time.

一方、実行制御手段122は、インターバル開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスが、実行可能プロセスキュー112に存在しない場合、次回のインターバル時間134をセットしたタイマの減算を停止させ、今回のインターバルを終了する。また実行制御手段122は、インターバル開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135に設定されている最大CPU使用時間以下であるワークロードクラスに属するプロセスが、実行可能プロセスキュー112に存在していても、次回のインターバル時間134をセットしたタイマの値が零になってタイムアウトすると、今回のインターバルを終了する。 On the other hand, the execution control unit 122 determines that processes belonging to workload classes whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time set in the next maximum CPU usage time 135 for each workload class are executable. If it does not exist in the process queue 112, the timer that set the next interval time 134 stops decrementing, and the current interval ends. In addition, the execution control means 122 determines that a process belonging to a workload class whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time set in the next maximum CPU usage time 135 for each workload class is an executable process. Even if the data exists in the queue 112, when the value of the timer that sets the next interval time 134 becomes zero and times out, the current interval ends.

また実行制御手段122は、インターバルを終了すると、次のような更新処理をディスパッチング情報113に対して行った後、更新後のディスパッチング情報113を記憶装置110に書き戻す。先ず実行制御手段122は、前記のインターバル時間136に、次回のインターバル時間134に設定されていた時間を記憶する。また実行制御手段122は、次回のインターバル時間134から停止またはタイムアップしたタイマの値を減算することによって、今回のインターバルの開始から終了までの時間を総割り当て時間として計算し、前回の総割り当て時間137に記憶する。例えば、次回のインターバル時間134が例えば100msの場合、インターバルを開始するとタイマは100msから減算を開始するため、例えばタイマ値が30msの時点でインターバルを終了すると、100ms-30ms=70msが総割り当て時間となる。また実行制御手段122は、インターバル開始から終了までにカウントしたCPUリソース割り当て打ち切り回数を前回のCPUリソース割り当て打ち切り回数138に記憶する。 Further, when the interval ends, the execution control unit 122 performs the following update process on the dispatching information 113, and then writes back the updated dispatching information 113 to the storage device 110. First, the execution control means 122 stores the time set as the next interval time 134 in the above-mentioned interval time 136. In addition, the execution control means 122 calculates the time from the start to the end of the current interval as the total allocated time by subtracting the value of the timer that has stopped or expired from the next interval time 134, and calculates the time from the start to the end of the current interval as the total allocated time. 137. For example, if the next interval time 134 is 100ms, the timer starts subtracting from 100ms when the interval starts, so if the interval ends when the timer value is 30ms, the total allocated time will be 100ms - 30ms = 70ms. Become. Furthermore, the execution control unit 122 stores the number of CPU resource allocation aborts counted from the start to the end of the interval in the previous CPU resource allocation abort count 138.

調整手段123は、実行制御手段122による前回のインターバルにおける各ワークロードクラスのプロセスの実行状況に基づいて、次回のインターバル時間および次回のワークロードクラス毎の最大CPU使用時間を調整するように構成されている。具体的には、調整手段123は、実行制御手段122によって更新されたディスパッチング情報113を記憶装置110から読み出し、次回のインターバル時間を以下のようにして見直す。 The adjustment means 123 is configured to adjust the next interval time and the next maximum CPU usage time for each workload class based on the execution status of the process of each workload class in the previous interval by the execution control means 122. ing. Specifically, the adjustment means 123 reads out the dispatching information 113 updated by the execution control means 122 from the storage device 110, and reviews the next interval time as follows.

<次回のインターバル時間見直し処理(1)>
先ず調整手段123は、前回の総割り当て時間137とベースインターバル時間131とを比較し、前回の総割り当て時間137が、ベースインターバル時間131より長いか、同じか、短いかを判断する。また調整手段123は、前回のCPUリソース割り当て打ち切り回数138が1以上か否か、すなわち、CPUリソースの割り当てが打ち切られたワークロードクラスが存在したか否かを判断する。次に調整手段123は、上記2つの判断の結果と予め定められた判定ルールとに基づいて、次回のインターバル時間を前回のインターバル時間136から変更するか、変更しないかを判断する。
<Next interval time review process (1)>
First, the adjusting means 123 compares the previous total allocated time 137 and the base interval time 131, and determines whether the previous total allocated time 137 is longer, the same as, or shorter than the base interval time 131. The adjustment unit 123 also determines whether the previous CPU resource allocation abort count 138 is 1 or more, that is, whether there is a workload class for which CPU resource allocation has been aborted. Next, the adjusting means 123 determines whether to change the next interval time from the previous interval time 136 or not, based on the results of the above two determinations and a predetermined determination rule.

図4は、判定ルールの構成例である。この判定ルールでは、以下の2つのケースの場合、次回のインターバル時間を前回のインターバル時間から変更し、それ以外のケースの場合、次回のインターバル時間を変更せずに前回のインターバル時間と同じにする。
<ケース1>
CPUリソースの割り当てが打ち切られたワークロードクラスが存在し、且つ、前回の総割り当て時間がベースインターバルより短い。
<ケース2>
前回の総割り当て時間がベースインターバルより長い。CPUリソースの割り当てが打ち切られたワークロードクラスが存在するか否かは問わない。
FIG. 4 is a configuration example of the determination rule. In this judgment rule, in the following two cases, the next interval time will be changed from the previous interval time, and in other cases, the next interval time will not be changed and will be the same as the previous interval time. .
<Case 1>
There is a workload class for which CPU resource allocation has been discontinued, and the previous total allocation time is shorter than the base interval.
<Case 2>
The previous total allocation time is longer than the base interval. It does not matter whether there is a workload class for which CPU resource allocation has been discontinued.

調整手段123は、上記判定において、次回のインターバル時間を前回のインターバル時間から変更すると判定した場合、ケース1の場合は、次回のインターバル時間を前回のインターバル時間よりも長い時間に変更し、ケース2の場合は、次回のインターバル時間を前回のインターバル時間よりも短い時間に変更する。具体的には、調整手段123は、図5に示す計算式(1)に従って、次回のインターバル時間を計算する。即ち、調整手段123は、前回の総割り当て時間137に対するベースインターバル時間131の比を前回のインターバル時間136に乗じて得られる時間を、次回のインターバル時間とする。 If the adjustment unit 123 determines in the above determination that the next interval time is to be changed from the previous interval time, in case 1, the adjustment unit 123 changes the next interval time to a time longer than the previous interval time, and in case 2. In this case, change the next interval time to a shorter time than the previous interval time. Specifically, the adjusting means 123 calculates the next interval time according to calculation formula (1) shown in FIG. That is, the adjusting means 123 sets the time obtained by multiplying the previous interval time 136 by the ratio of the base interval time 131 to the previous total allocated time 137 as the next interval time.

<次回のインターバル時間見直し処理(2)>
調整手段123は、上記次回のインターバル時間見直し処理(1)に引き続き、次回のインターバル時間見直し処理(2)を実行する。次回のインターバル時間見直し処理(2)では、先ず調整手段123は、図6に示す条件式(2)が成立するか否かを判断する。即ち、調整手段123は、ベースインターバル時間に対する、最大CPU使用時間に達したことが原因で行われたプロセス切替による総時間(プロセス切替平均時間×n)の割合が、閾値以上か否かを判断する。ここで、条件式2および後述する計算式3において、nは前回のCPUリソース割り当て打ち切り回数138である。
<Next interval time review process (2)>
The adjusting means 123 executes the next interval time review process (2) following the next time interval review process (1). In the next interval time review process (2), the adjusting means 123 first determines whether conditional expression (2) shown in FIG. 6 is satisfied. That is, the adjusting means 123 determines whether the ratio of the total time (process switching average time x n) due to process switching performed due to reaching the maximum CPU usage time to the base interval time is equal to or greater than the threshold value. do. Here, in conditional expression 2 and calculation expression 3, which will be described later, n is the number of times 138 of previous CPU resource allocation was aborted.

次に調整手段123は、条件式2が成立しない場合、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間を、最終的な次回のインターバル時間に決定する。一方、調整手段123は、条件式2が成立する場合、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間が、更に長くなるように調整する。具体的には、調整手段123は、図7に示す計算式(3)に従って、次回のインターバル時間を計算する。即ち、調整手段123は、次回のインターバル時間見直し処理(1)で決定した次回のインターバル時間に、ベースインターバル時間に対する最大CPU使用時間に達したことが原因で行われたプロセス切替による総時間の割合を乗じた値に、更に閾値133で除算した値を、最終的な次回のインターバル時間とする。 Next, if conditional expression 2 does not hold, the adjusting means 123 determines the next interval time determined in the next interval time review process (1) as the final next interval time. On the other hand, when conditional expression 2 is satisfied, the adjusting means 123 adjusts the next interval time determined in the next interval time review process (1) so that it becomes even longer. Specifically, the adjusting means 123 calculates the next interval time according to formula (3) shown in FIG. That is, the adjusting means 123 determines, in the next interval time determined in the next interval time review process (1), the proportion of the total time due to process switching that was performed due to reaching the maximum CPU usage time with respect to the base interval time. The value obtained by multiplying the value by the threshold value 133 is set as the final next interval time.

調整手段123は、最終的な次回のインターバル時間を決定すると、その最終的な次回のインターバル時間を、ディスパッチング情報113の次回のインターバル時間134に設定する。また調整手段123は、次回のインターバル時間134に設定したインターバル時間をワークロード定義111に記載されるワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロードクラス毎の最大CPU使用時間135をディスパッチング情報113に設定する。そして、調整手段123は、更新後のディスパッチング情報113を記憶装置110に書き戻す。 After determining the final next interval time, the adjusting means 123 sets the final next interval time as the next interval time 134 of the dispatching information 113. Further, the adjustment means 123 calculates the maximum CPU usage for each workload class by distributing the interval time set as the next interval time 134 according to the CPU usage time distribution ratio for each workload class described in the workload definition 111. A time 135 is set in the dispatching information 113. Then, the adjusting means 123 writes back the updated dispatching information 113 to the storage device 110.

図8は、本実施形態に係るCPUリソース管理装置100の動作を示すフローチャートである。以下、図8を参照して、本実施形態に係るCPUリソース管理装置100の動作について説明する。 FIG. 8 is a flowchart showing the operation of the CPU resource management device 100 according to this embodiment. The operation of the CPU resource management device 100 according to this embodiment will be described below with reference to FIG. 8.

CPUリソース管理装置100は、起動すると、先ず初期化手段121が動作して初期化を行い(ステップS1)、その後に実行制御手段122が1つのインターバルによってプロセスの実行制御を行う(ステップS2)。また実行制御手段122によって1つのインターバルが終了する毎に、調整手段123は、可及的速やかに、前回のインターバルの状況に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を調整する(ステップS3)。そして再び、実行制御手段122は、調整手段123の処理が終了すると、可及的速やかに、調整後のインターバル時間およびワークロードクラス毎のCPU使用時間に基づくインターバルを開始してプロセスの実行制御を行う(ステップS2)。このステップS2、S3のループは、システムの運用が停止されるまで継続して実行される。 When the CPU resource management device 100 is started, the initialization means 121 operates to perform initialization (step S1), and then the execution control means 122 controls the execution of processes at one interval (step S2). Furthermore, each time one interval is ended by the execution control means 122, the adjustment means 123 adjusts the next interval time and the maximum CPU usage time for each workload class as soon as possible based on the situation of the previous interval. (Step S3). Once the processing of the adjustment means 123 is finished, the execution control means 122 again starts an interval based on the adjusted interval time and the CPU usage time for each workload class to control the execution of the process. (Step S2). This loop of steps S2 and S3 is continuously executed until the system operation is stopped.

ステップS1の初期化では、初期化手段121は、前述したように記憶装置1100上のワークロード定義111およびディスパッチング情報113を初期化する。 In the initialization of step S1, the initialization means 121 initializes the workload definition 111 and dispatching information 113 on the storage device 1100 as described above.

ステップS2の実行制御では、実行制御手段122は、ディスパッチング情報113に従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行する。具体的には、実行制御手段122は、インターバルを開始すると、インターバルの開始後のCPU使用時間が次回のワークロードクラス毎の最大CPU使用時間135以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行する。また実行制御手段122は、インターバルの開始後のCPU使用時間が上記最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了する。また実行制御手段122は、インターバル終了時、インターバルの開始から終了までに上記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数とインターバルの開始から終了までの時間である総割り当て時間とを、前回のCPUリソース割り当て打ち切り回数138と前回の総割り当て時間137とに設定する。 In the execution control in step S2, the execution control means 122 executes the processes of each workload class queued in the executable process queue 112 according to the dispatching information 113. Specifically, when an interval is started, the execution control means 122 allocates CPU resources to a process belonging to a workload class whose CPU usage time after the start of the interval is less than or equal to the next maximum CPU usage time of 135 for each workload class. Assign and execute. Furthermore, the execution control unit 122 ends the interval when there is no longer a process belonging to the workload class whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time. Furthermore, at the end of the interval, the execution control means 122 determines the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time between the start and end of the interval, and the time from the start to the end of the interval. The total allocation time is set to the previous CPU resource allocation abort count 138 and the previous total allocation time 137.

ステップS3の調整では、調整手段123は、ディスパッチング情報113の前回の総割り当て時間137および前回のCPUリソース割り当て打ち切り回数138に基づいて、前述した次回のインターバル時間見直し処理(1)および次回のインターバル時間見直し処理(2)によって次回のインターバル時間134を決定し、また決定後の次回のインターバル時間に基づいて次回のワークロードクラス毎の最大CPU使用時間135を決定する。 In the adjustment in step S3, the adjusting means 123 performs the above-described next interval time review process (1) and The next interval time 134 is determined by the time review process (2), and the next maximum CPU usage time 135 for each workload class is determined based on the determined next interval time.

次に本実施形態に係るCPUリソース管理装置100の効果を説明する。 Next, the effects of the CPU resource management device 100 according to this embodiment will be explained.

例えば、a、b、cの3つのワークロードクラスがあり、そのCPUリソース配分比を4:3:3とし、インターバル時間およびベースインターバル時間を100msとすると、そのインターバルでは、図9の上段に示すように、ワークロードクラスa、b、cに属する各プロセスに、それぞれ最大40ms、30ms、30msのCPU使用時間が割り当てられることになる。しかし、ワークロードクラスa、bが低負荷、ワークロードクラスcが高負荷な場合、例えば図9の中段に示すように、ワークロードクラスa、bに割り当てられた最大CPU使用時間に余剰が生じる一方、ワークロードクラスcでは最大CPU使用時間に達したことが原因でCPUリソース割り当ての打ち切りが生じる。 For example, if there are three workload classes a, b, and c, and the CPU resource allocation ratio is 4:3:3, and the interval time and base interval time are 100 ms, then the Thus, each process belonging to workload classes a, b, and c is allocated a maximum CPU usage time of 40 ms, 30 ms, and 30 ms, respectively. However, if workload classes a and b have a low load and workload class c has a high load, there will be a surplus in the maximum CPU usage time allocated to workload classes a and b, for example, as shown in the middle part of Figure 9. On the other hand, in workload class c, CPU resource allocation is discontinued because the maximum CPU usage time has been reached.

図9の例では、低負荷なワークロードクラスa、bは、それぞれ30ms、20msしか使用せず、それぞれ最大CPU使用時間のうちの10msは未使用である。一方、高負荷なワークロードクラスでは、最大CPU使用時間の30msを全て使った後、CPUリソースの割り当てを打ち切られている。その結果、総割り当て時間は、30+20+30=80msとなっている。 In the example of FIG. 9, the low-load workload classes a and b use only 30 ms and 20 ms, respectively, and 10 ms of the maximum CPU usage time is unused. On the other hand, in a high-load workload class, CPU resource allocation is terminated after the maximum CPU usage time of 30 ms is used. As a result, the total allocated time is 30+20+30=80ms.

このようなインターバルの実行後に行われる調整手段123による次回のインターバル時間見直し処理(1)では、前回の総割り当て時間である80msがベースインターバル時間である100msより小さく、且つ、CPUリソースの割り当てが打ち切られたワークロードクラスcが存在するため、図4の判定ルールから次回のインターバル時間を前回のインターバル時間から変更すると判断する。そして、調整手段123は、図5の計算式1の右辺の前回のインターバル時間に100ms、ベースインターバル時間に100ms、前回の総割り当て時間に80msを代入することにより、次回のインターバル時間として125msを計算する。次に調整手段123は、次回のインターバル時間見直し処理(2)における図6の条件式が成立するか否かを判断するが、ここでは成立しなかったと仮定すると、次回のインターバル時間は最終的に125msに決定される。 In the next interval time review process (1) performed by the adjusting means 123 after execution of such an interval, if the previous total allocation time of 80 ms is smaller than the base interval time of 100 ms, and the CPU resource allocation is terminated. Since the workload class c exists, it is determined based on the determination rule in FIG. 4 that the next interval time should be changed from the previous interval time. Then, the adjusting means 123 calculates 125 ms as the next interval time by substituting 100 ms for the previous interval time, 100 ms for the base interval time, and 80 ms for the previous total allocated time on the right side of formula 1 in FIG. do. Next, the adjustment means 123 determines whether the conditional expression of FIG. 6 in the next interval time review process (2) is satisfied or not, but assuming that it is not satisfied here, the next interval time will be It is determined to be 125ms.

次に調整手段123は、次回のインターバル時間である125msを配分比に従って配分することにより、次回のワークロードクラス毎の最大CPU使用時間として、図9に示すように、ワークロードクラスa、b、cにそれぞれ50ms、38ms、38msを割り当てる。そして、実行制御手段122は、次回のインターバル時間である125ms、次回のワークロードクラスa、b、cの最大CPU使用時間である50ms、38ms、38msの条件の下で、次のインターバルの実行を開始する。 Next, the adjusting means 123 allocates the next interval time of 125 ms according to the allocation ratio, so that the next maximum CPU usage time for each workload class is set as the maximum CPU usage time for workload classes a, b, Assign 50ms, 38ms, and 38ms to c, respectively. Then, the execution control means 122 executes the next interval under the conditions of the next interval time of 125 ms and the next maximum CPU usage time of workload classes a, b, and c of 50 ms, 38 ms, and 38 ms. Start.

ワークロードクラスa、b、cの負荷状況に変化がなければ、次回のインターバルにおいて、ワークロードクラスa、bは最大CPU使用時間の50ms、38msの全てを使わず、一部は未使用になる。一方、ワークロードクラスcは、最大CPU使用時間の38msを全て使用することになる。その結果、次回のインターバルにおいて予想される実際に使用するCPU使用時間は、図9に示すように、ワークロードクラスaは37ms(30×125/100)、ワークロードクラスbは25ms(20×125/100)、ワークロードクラスcは最大CPU使用時間の38msとなり、その合計(即ち、総割り当て時間)は100msとなる。換言すれば、調整手段123は、前回のインターバルの総割り当て時間をもとに、次回のインターバルの総割り当て時間がベースインターバル時間となるように、インターバル時間を長く設定し、これをもとに、各ワークロードクラスの最大CPU使用時間を決定していることになる。 If there is no change in the load status of workload classes a, b, and c, in the next interval, workload classes a and b will not use all of the maximum CPU usage time of 50ms and 38ms, and some of them will remain unused. . On the other hand, workload class c uses the entire maximum CPU usage time of 38 ms. As a result, the expected actual CPU usage time for the next interval is 37ms (30x125/100) for workload class a and 25ms (20x125/100) for workload class b, as shown in Figure 9. /100), workload class c has a maximum CPU usage time of 38 ms, and the total (that is, total allocated time) is 100 ms. In other words, the adjusting means 123 sets the interval time longer based on the total allocated time of the previous interval so that the total allocated time of the next interval becomes the base interval time, and based on this, This means determining the maximum CPU usage time for each workload class.

前回および今回のインターバルにおけるプロセス切替回数は共に3回であるため、前回と今回のインターバルを合わせると、80ms+100ms=180msの期間で合計6回のプロセス切替が行われることになり、単位時間当たりのプロセス切替回数は、6/180=0.0333となる。 The number of process switches in the previous and current intervals is 3, so if you combine the previous and current intervals, a total of 6 process switches will be performed in a period of 80ms + 100ms = 180ms, and the number of processes per unit time will be 3. The number of switching times is 6/180=0.0333.

一方、次回のインターバル時間の調整を行わず、インターバル時間を100msに固定すると、図9の下段に破線で示すように、次回のインターバルにおける総割り当て時間は前回のインターバルと同じく80msとなる。そのため、前回と今回のインターバルを合わせると、80ms+80ms=160msの期間で合計6回のプロセス切替が行われることになり、単位時間当たりのプロセス切替回数は、6/160=0.0375(>0.333)となる。 On the other hand, if the next interval time is not adjusted and the interval time is fixed at 100 ms, the total allocated time for the next interval will be 80 ms, the same as the previous interval, as shown by the broken line in the lower part of FIG. Therefore, combining the previous and current intervals, a total of 6 process switches will be performed in a period of 80ms + 80ms = 160ms, and the number of process switches per unit time is 6/160 = 0.0375 (>0. 333).

上記のように各ワークロードクラスのCPU使用状況に応じて、動的に次回のインターバル時間を調整することにより、単位時間当たりのプロセス切替回数を低減することができる。その結果、プロセス切替のオーバヘッドが削減され、システム全体のスループットが向上する。 By dynamically adjusting the next interval time according to the CPU usage status of each workload class as described above, it is possible to reduce the number of process switching times per unit time. As a result, the overhead of process switching is reduced and the throughput of the entire system is improved.

しかし、次回のインターバル時間がベースインターバル時間より長くなると、各ワークロードクラスがCPUリソースを割り当てられるまでの待ち時間が長くなるため、応答時間が延びてしまうという副作用が生じる。そのため、調整手段123は、図4の判定ルールおよび図5の計算式1に従い、前回の総割り当て時間がベースインターバルより長い場合には、次回のインターバル時間を前回のインターバル時間よりも短い時間に変更することにより、上記副作用を抑えている。 However, if the next interval time is longer than the base interval time, the waiting time until CPU resources are allocated to each workload class becomes longer, resulting in a side effect of longer response time. Therefore, according to the determination rule in FIG. 4 and calculation formula 1 in FIG. 5, if the previous total allocation time is longer than the base interval, the adjustment means 123 changes the next interval time to a time shorter than the previous interval time. By doing so, the above side effects are suppressed.

また、ワークロードクラス数が増大するほどにインターバル内でのプロセス切替回数が増大するため、プロセス切替によるオーバヘッドが増大する。そのため、調整手段123は、図6の条件式に基づいて、プロセス切替によるオーバヘッドが閾値以上となる場合、次回のインターバル時間を更に長くすることにより、スループットの低下を防止している。 Furthermore, as the number of workload classes increases, the number of process switching within an interval increases, so the overhead due to process switching increases. Therefore, based on the conditional expression in FIG. 6, the adjustment unit 123 prevents the throughput from decreasing by further lengthening the next interval time when the overhead due to process switching exceeds the threshold value.

以上の説明では、ディスパッチング情報113は、前回のインターバル時間136および前回の総割り当て時間137を記憶するように構成されていた。しかし、ディスパッチング情報113は、直前の複数回分のインターバル時間および総割り当て時間の履歴を記憶するように構成されていてもよい。また調整手段123は、計算式1の右辺における前回のインターバル時間および前回の総割り当て時間として、ディスパッチング情報113に記憶された直前の複数回分のインターバル時間および総割り当て時間の平均値を使用するようにしてもよい。 In the above description, the dispatching information 113 was configured to store the previous interval time 136 and the previous total allocation time 137. However, the dispatching information 113 may be configured to store a history of the interval time and total allocated time for the previous multiple times. Further, the adjusting means 123 uses the average value of the previous interval time and total allocated time stored in the dispatching information 113 as the previous interval time and the previous total allocated time on the right side of calculation formula 1. You can also do this.

[第2の実施形態]
図10は、本発明の第2の実施形態に係るCPUリソース管理装置200のブロック図である。図10を参照すると、CPUリソース管理装置200は、記憶装置210と、この記憶装置210に接続された複数のCPU220-0~220-mとから構成されている。
[Second embodiment]
FIG. 10 is a block diagram of a CPU resource management device 200 according to the second embodiment of the present invention. Referring to FIG. 10, the CPU resource management device 200 includes a storage device 210 and a plurality of CPUs 220-0 to 220-m connected to the storage device 210.

記憶装置210は、複数のCPU220-0~220-mで共用されるハードディスクやメモリなどから構成され、CPU220-0~220-mで実行される各種処理に必要な処理情報およびプログラム214-0~214-1を記憶するように構成されている。プログラム214-0~214-1は、CPU220-0~220-mに読み込まれて実行されることにより各種処理部を実現するプログラムであり、図示しない通信インターフェース部などのデータ入出力機能を介して外部装置(図示せず)や記憶媒体(図示せず)から予め読み込まれて記憶装置210に保存される。記憶装置210に記憶される処理情報には、ワークロード定義211、実行可能プロセスキュー212、および、CPU220-1~220-mに1対1に対応するm個のディスパッチング情報213-1~213-mがある。これらは、図1を参照して説明したワークロード定義111、実行可能プロセスキュー112、および、ディスパッチング情報113と同様に構成されている。 The storage device 210 is composed of a hard disk, memory, etc. shared by a plurality of CPUs 220-0 to 220-m, and stores processing information and programs 214-0 to 214-0 necessary for various processes executed by the CPUs 220-0 to 220-m. 214-1. The programs 214-0 to 214-1 are programs that implement various processing units by being read and executed by the CPUs 220-0 to 220-m, and are implemented through data input/output functions such as a communication interface unit (not shown). The information is read in advance from an external device (not shown) or a storage medium (not shown) and stored in the storage device 210. The processing information stored in the storage device 210 includes a workload definition 211, an executable process queue 212, and m pieces of dispatching information 213-1 to 213 that correspond one-to-one to the CPUs 220-1 to 220-m. - There is m. These are configured similarly to the workload definition 111, executable process queue 112, and dispatching information 113 described with reference to FIG.

CPU220-0は、演算処理装置とその周辺回路とから構成され、記憶装置210からプログラム214-0を読み込んで実行することにより、ハードウェアとプログラム214-0とを協働させて各種処理部を実現するように構成されている。CPU220-0で実現される処理部には、初期化手段221と調整手段223とがある。これらは、図1を参照して説明した初期化手段121、調整手段123と同様に構成されている。即ち、初期化手段221は、ワークロード定義211およびディスパッチング情報213-1~213-mを初期化するように構成されている。また調整手段223は、ディスパッチング情報213-1~213-mに記憶された前回のインターバルにおける総割り当て時間およびCPUリソース割り当て打ち切り回数に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を決定してディスパッチング情報213-1~213-mを更新するように構成されている。 The CPU 220-0 is composed of an arithmetic processing unit and its peripheral circuits, and by reading and executing the program 214-0 from the storage device 210, the CPU 220-0 causes the hardware and the program 214-0 to work together to operate various processing units. It is configured to accomplish this. The processing section implemented by the CPU 220-0 includes an initialization means 221 and an adjustment means 223. These are configured similarly to the initialization means 121 and adjustment means 123 described with reference to FIG. That is, the initialization means 221 is configured to initialize the workload definition 211 and the dispatching information 213-1 to 213-m. Further, the adjusting means 223 determines the next interval time and the maximum CPU usage time for each workload class based on the total allocation time and the number of aborts of CPU resource allocation in the previous interval stored in the dispatching information 213-1 to 213-m. is configured to update the dispatching information 213-1 to 213-m.

CPU220-1~220-mは、演算処理装置とその周辺回路とから構成され、記憶装置210~プログラム214-1を読み込んで実行することにより、ハードウェアとプログラム214-1とを協働させて各種処理部を実現するように構成されている。CPU220-1~220-mで実現される処理部には、実行制御手段222-1~222-mがある。これらは、図1を参照して説明した実行制御手段122と同様に構成されている。即ち、実行制御手段222-1~222-mは、対応するディスパッチング情報213-1~213-mに従って、実行可能プロセスキュー112にキューイングされている各ワークロードクラスのプロセスを実行するように構成されている。 The CPUs 220-1 to 220-m are composed of an arithmetic processing unit and its peripheral circuits, and read and execute the storage device 210 to the program 214-1, thereby causing the hardware and the program 214-1 to cooperate. It is configured to implement various processing units. The processing units realized by the CPUs 220-1 to 220-m include execution control means 222-1 to 222-m. These are configured similarly to the execution control means 122 described with reference to FIG. That is, the execution control means 222-1 to 222-m execute the processes of each workload class queued in the executable process queue 112 according to the corresponding dispatching information 213-1 to 213-m. It is configured.

次に、図8を借用して、本実施形態に係るCPUリソース管理装置200の動作について説明する。 Next, referring to FIG. 8, the operation of the CPU resource management device 200 according to this embodiment will be described.

CPUリソース管理装置200は、起動すると、先ず初期化手段221が動作してワークロード定義211および各ディスパッチング情報213-11~213-mの初期化を行う(ステップS1)。次に、各実行制御手段222-1~222-mが、対応するディスパッチング情報213-1~213-mに従って、インターバルを開始し、実行可能プロセスキュー212に格納されたプロセスをCPU220-1~220-m上で実行する制御を行う(ステップS2)。また何れかの実行制御手段222-i(iは1からmの何れか)によってインターバルが終了する毎に、調整手段223は、可及的速やかに、その実行制御手段222-iに対応するディスパッチング情報213-iに記憶された前回のインターバルの状況(前回の総割り当て時間、前回のCPUリソース割り当て打ち切り回数)に基づいて次回のインターバル時間およびワークロードクラス毎の最大CPU使用時間を調整する(ステップS3)。そして再び、実行制御手段222-iは、可及的速やかに、調整後のインターバル時間およびワークロードクラス毎のCPU使用時間が記憶されたディスパッチング情報213-iに基づくインターバルを開始してプロセスの実行制御を行う(ステップS2)。このステップS2、S3のループは、システムの運用が停止されるまで継続して実行される。 When the CPU resource management device 200 is started, the initialization means 221 first operates to initialize the workload definition 211 and each dispatching information 213-11 to 213-m (step S1). Next, each execution control means 222-1 to 222-m starts an interval according to the corresponding dispatching information 213-1 to 213-m, and transfers the processes stored in the executable process queue 212 to the CPUs 220-1 to 213-m. 220-m (step S2). Further, each time an interval is ended by any execution control means 222-i (i is any one from 1 to m), the adjustment means 223 immediately adjusts the dispatch corresponding to that execution control means 222-i. The next interval time and the maximum CPU usage time for each workload class are adjusted based on the previous interval status (previous total allocation time, previous CPU resource allocation abort count) stored in the processing information 213-i. Step S3). Then, again, the execution control means 222-i starts an interval based on the dispatching information 213-i in which the adjusted interval time and CPU usage time for each workload class are stored, and starts the process. Execution control is performed (step S2). This loop of steps S2 and S3 is continuously executed until the system operation is stopped.

このように本実施形態に係るCPUリソース管理装置200によれば、第1の実施形態に係るCPUリソース管理装置100と同様の理由により、プロセス切替のオーバヘッドが削減され、システム全体のスループットが向上する。 As described above, according to the CPU resource management device 200 according to the present embodiment, the overhead of process switching is reduced and the throughput of the entire system is improved for the same reason as the CPU resource management device 100 according to the first embodiment. .

また本実施形態に係るCPUリソース管理装置200によれば、複数のCPU22-1~220-mが互いに並行して複数の実行制御手段222-1~222-mを実行するため、単位時間当たりのプロセス実行回数が増大し、システム全体のスループットが向上する。 Further, according to the CPU resource management device 200 according to the present embodiment, since the plurality of CPUs 22-1 to 220-m execute the plurality of execution control means 222-1 to 222-m in parallel with each other, The number of process executions increases and the overall system throughput improves.

以上の説明では、CPU220-0は実行制御手段を備えていないが、CPU220-1~220-m上の実行制御手段と同様な実行制御手段をCPU220-0に備えるようにしてもよい。また以上の説明では、CPU220-1~220-mは調整手段を備えていないが、CPU220-0上の調整手段と同様な調整手段を各CPU220-1~220-mに備え、CPU220-i(iは1からmの何れか)は、そのCPU220-i上の実行制御手段の処理が終了したときに、そのCPU220-i上の調整手段が調整処理を行い、その後にそのCPU220-i上の実行制御手段が次のインターバルを開始するように構成してもよい。 In the above description, the CPU 220-0 is not equipped with an execution control means, but the CPU 220-0 may be equipped with an execution control means similar to the execution control means on the CPUs 220-1 to 220-m. Furthermore, in the above explanation, although the CPUs 220-1 to 220-m are not equipped with adjustment means, each CPU 220-1 to 220-m is equipped with an adjustment means similar to the adjustment means on the CPU 220-0, and the CPU 220-i ( i is any one from 1 to m), when the processing of the execution control means on the CPU 220-i is completed, the adjustment means on the CPU 220-i performs adjustment processing, and then the adjustment means on the CPU 220-i The execution control means may be arranged to start the next interval.

[第3の実施形態]
図11は、本発明の第3の実施形態に係るCPUリソース管理装置300のブロック図である。図11を参照すると、CPUリソース管理装置300は、記憶装置310と、この記憶装置310に接続されたプロセッサ320とから構成されている。
[Third embodiment]
FIG. 11 is a block diagram of a CPU resource management device 300 according to the third embodiment of the present invention. Referring to FIG. 11, the CPU resource management device 300 includes a storage device 310 and a processor 320 connected to the storage device 310.

記憶装置310は、ワークロード定義311と実行可能プロセスキュー312とディスパッチング情報313とを記憶するように構成されている。ワークロード定義311は、ワークロードクラス毎のCPU使用時間の配分比を表す情報を記憶する。実行可能プロセスキュー312は、何れかのワークロードクラスに属する複数のプロセスを記憶する。ディスパッチング情報313は、ワークロードクラス毎の最大CPU使用時間、ワークロードクラス毎の最大CPU使用時間の和であるインターバル時間、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数、インターバルの開始から終了までの時間である総割り当て時間、ベースインターバル時間を記憶する。 Storage device 310 is configured to store workload definitions 311, executable process queues 312, and dispatching information 313. The workload definition 311 stores information representing the distribution ratio of CPU usage time for each workload class. The executable process queue 312 stores a plurality of processes belonging to any workload class. The dispatching information 313 includes the maximum CPU usage time for each workload class, the interval time that is the sum of the maximum CPU usage time for each workload class, and the fact that the maximum CPU usage time was reached between the start and end of the interval. The number of times CPU resource allocation has been terminated, the total allocation time that is the time from the start to the end of the interval, and the base interval time are stored.

プロセッサ320は、1以上のCPUを含んで構成されている。またプロセッサ320は、実行制御手段321と調整手段322とを備えている。 Processor 320 includes one or more CPUs. The processor 320 also includes an execution control means 321 and an adjustment means 322.

実行制御手段321は、ディスパッチング情報313に従ってインターバルを開始すると、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了するように構成されている。また実行制御手段321は、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と、インターバルの開始から終了までの時間である総割り当て時間とをディスパッチング情報313に記憶するように構成されている。 When starting an interval according to the dispatching information 313, the execution control means 321 allocates CPU resources to a process belonging to a workload class whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time, executes the process, and starts the interval. The interval is configured to end when there is no longer a process belonging to a workload class whose subsequent CPU usage time is less than or equal to the maximum CPU usage time. The execution control means 321 also determines the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time from the start to the end of the interval, and the total allocation time that is the time from the start to the end of the interval. is configured to be stored in the dispatching information 313.

調整手段322は、ディスパッチング情報313に記憶された総割り当て時間がベースインターバル時間より短く、且つ、ディスパッチング情報313に記憶されたCPUリソース割り当ての打ち切り回数が1以上の場合、ディスパッチング情報313に記憶されたインターバル時間をより長い時間に変更するように構成されている。また調整手段322は、ディスパッチング情報313に記憶されたワークロードクラス毎の最大CPU使用時間を、上記より長い時間に変更した後のインターバル時間をワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロード毎の最大CPU使用時間に変更するように構成されている。また調整手段は、変更後のディスパッチング情報313に従って実行制御手段321に次回のインターバルを開始させるように構成されている。 When the total allocation time stored in the dispatching information 313 is shorter than the base interval time and the number of times of aborting CPU resource allocation stored in the dispatching information 313 is 1 or more, the adjustment means 322 adjusts the dispatching information 313 to the dispatching information 313. The stored interval time is configured to be changed to a longer time. The adjusting means 322 also distributes the interval time after changing the maximum CPU usage time for each workload class stored in the dispatching information 313 to a longer time according to the CPU usage time distribution ratio for each workload class. The CPU usage time is changed to the maximum CPU usage time calculated for each workload. Further, the adjustment means is configured to cause the execution control means 321 to start the next interval according to the changed dispatching information 313.

このように構成されたCPUリソース管理装置300は以下のように動作する。即ち、実行制御手段321は、ディスパッチング情報313に従ってインターバルを開始すると、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、インターバルの開始後のCPU使用時間が最大CPU使用時間以下であるワークロードクラスに属するプロセスが存在しなくなった時点でインターバルを終了する。また実行制御手段321は、インターバルの開始から終了までに最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と、インターバルの開始から終了までの時間である総割り当て時間とをディスパッチング情報313に記憶する。 The CPU resource management device 300 configured in this manner operates as follows. That is, when the execution control unit 321 starts an interval according to the dispatching information 313, it allocates CPU resources to a process belonging to a workload class whose CPU usage time after the start of the interval is less than or equal to the maximum CPU usage time, and executes the process. The interval ends when there are no more processes belonging to the workload class whose CPU usage time after the start of is less than or equal to the maximum CPU usage time. The execution control means 321 also determines the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time from the start to the end of the interval, and the total allocation time that is the time from the start to the end of the interval. is stored in the dispatching information 313.

次に調整手段322は、ディスパッチング情報313に記憶された総割り当て時間がベースインターバル時間より短く、且つ、ディスパッチング情報313に記憶されたCPUリソース割り当ての打ち切り回数が1以上の場合、ディスパッチング情報313に記憶されたインターバル時間をより長い時間に変更する。また調整手段322は、ディスパッチング情報313に記憶されたワークロードクラス毎の最大CPU使用時間を、上記より長い時間に変更した後のインターバル時間をワークロードクラス毎のCPU使用時間の配分比に従って配分して計算したワークロード毎の最大CPU使用時間に変更する。また調整手段は、変更後のディスパッチング情報313に従って実行制御手段321に次回のインターバルを開始させる。 Next, when the total allocation time stored in the dispatching information 313 is shorter than the base interval time and the number of times of aborting the CPU resource allocation stored in the dispatching information 313 is 1 or more, the adjustment means 322 adjusts the dispatching information The interval time stored in 313 is changed to a longer time. The adjusting means 322 also distributes the interval time after changing the maximum CPU usage time for each workload class stored in the dispatching information 313 to a longer time according to the CPU usage time distribution ratio for each workload class. Change it to the maximum CPU usage time calculated for each workload. The adjustment means also causes the execution control means 321 to start the next interval according to the changed dispatching information 313.

以上のように構成され動作するCPUリソース管理装置300によれば、コンピュータシステムのスループットを改善することができる。その理由は、前回のインターバルが、最大CPU使用時間のCPUリソースを必要としないワークロードクラスが存在したことによりベースインターバルよりも短時間で終了し、かつ、最大CPU使用時間以上のCPUリソースを必要としたワークロードクラスが存在していた場合、次回のインターバルを前回のインターバルよりも長い時間に変更し、その変更に合わせてワークロードクラス毎の最大CPU使用時間も変更するため、各ワークロードクラスの負荷が前回と同様であれば、次回の総割り当て時間が前回の総割り当て時間よりも長くなり、単位時間当たりのプロセス切替回数が低減し、その結果、プロセス切替のオーバヘッドが削減されるためである。 According to the CPU resource management device 300 configured and operated as described above, the throughput of the computer system can be improved. The reason for this is that the previous interval ended in a shorter time than the base interval due to the existence of a workload class that did not require CPU resources for the maximum CPU usage time, and it also required CPU resources for more than the maximum CPU usage time. If a workload class exists, the next interval will be changed to a longer time than the previous interval, and the maximum CPU usage time for each workload class will also be changed accordingly. If the load of be.

以上、上記各実施形態を参照して本発明を説明したが、本発明は、上述した実施形態に限定されるものではない。本発明の構成や詳細には、本発明の範囲内で当業者が理解しうる様々な変更をすることができる。 Although the present invention has been described above with reference to the embodiments described above, the present invention is not limited to the embodiments described above. The configuration and details of the present invention may be modified in various ways within the scope of the present invention by those skilled in the art.

本発明は、予め決められたCPUリソースの利用割合に従って、各ワークロードで使用するCPUリソースの配分を行うCPUリソース管理といった用途に適用できる。 The present invention can be applied to applications such as CPU resource management, which allocates CPU resources used by each workload according to a predetermined CPU resource utilization ratio.

100…CPUリソース管理装置
110…記憶装置
111…ワークロード定義
112…実行可能プロセスキュー
113…ディスパッチング情報
114…プログラム
120…CPU
121…初期化手段
122…実行制御手段
123…調整手段
131…ベースインターバル時間
132…プロセス切替平均時間
133…閾値
134…次回のインターバル時間
135…次回のワークロードクラス毎の最大CPU使用時間
136…前回のインターバル時間
137…前回の総割り当て時間
138…前回のCPUリソース割り当て打ち切り回数
200…CPUリソース管理装置
210…記憶装置
211…ワークロード定義
212…実行可能プロセスキュー
213-1~213-m…ディスパッチング情報
214-0~214-1…プログラム
220-0~220-m…CPU
221…初期化手段
222-1~222-m…実行制御手段
223…調整手段
300…CPUリソース管理装置
310…記憶装置
311…ワークロード定義
312…実行可能プロセスキュー
313…ディスパッチング情報
320…プロセッサ
321…実行制御手段
322…調整手段

100...CPU resource management device 110...Storage device 111...Workload definition 112...Executable process queue 113...Dispatching information 114...Program 120...CPU
121...Initialization means 122...Execution control means 123...Adjustment means 131...Base interval time 132...Average process switching time 133...Threshold value 134...Next interval time 135...Next maximum CPU usage time for each workload class 136...Previous time Interval time 137...Previous total allocation time 138...Previous CPU resource allocation abort count 200...CPU resource management device 210...Storage device 211...Workload definition 212...Executable process queues 213-1 to 213-m...Dispatching Information 214-0~214-1...Program 220-0~220-m...CPU
221...Initialization means 222-1 to 222-m...Execution control means 223...Adjustment means 300...CPU resource management device 310...Storage device 311...Workload definition 312...Executable process queue 313...Dispatching information 320...Processor 321 ...Execution control means 322...Adjustment means

Claims (9)

プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたCPUリソース管理装置であって、
前記プロセッサは、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する実行制御手段と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する調整手段と、
を備えるCPUリソース管理装置。
A CPU resource management device comprising a storage device that stores a process, and a processor that executes the process,
The processor includes:
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. Execution control means for recording the number of times CPU resource allocation is aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval. and,
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and adjustment means for determining the next maximum CPU usage time for each workload class based on the distribution ratio of CPU usage time for each workload class;
A CPU resource management device comprising:
前記調整手段は、前記総割り当て時間がベースインターバル時間より長い場合、次回のインターバル時間を前回のインターバル時間より短い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
請求項1に記載のCPUリソース管理装置。
When the total allocation time is longer than the base interval time, the adjustment means determines the next interval time to be shorter than the previous interval time, and adjusts the next interval time and the CPU usage time for each workload class. determining the next maximum CPU usage time for each workload class based on the distribution ratio;
The CPU resource management device according to claim 1.
前記調整手段は、前記総割り当て時間に対する前記ベースインターバル時間の比を前回のインターバル時間に乗じることにより、次回のインターバル時間を計算する、
請求項1または2に記載のCPUリソース管理装置。
The adjustment means calculates the next interval time by multiplying the previous interval time by a ratio of the base interval time to the total allocated time.
The CPU resource management device according to claim 1 or 2.
前記調整手段は、前記総割り当て時間に対する前記ベースインターバル時間の比を前回のインターバル時間に乗じて得られる値を計算し、ベースインターバル時間に対する前記CPUリソース割り当ての打ち切りによるプロセス切替にかかった総時間の割合が閾値を超えていれば、前記値に前記割合を乗じて得られる値をさらに前記閾値で除算した値を、次回のインターバル時間として計算する、
請求項1または2に記載のCPUリソース管理装置。
The adjustment means calculates a value obtained by multiplying the previous interval time by the ratio of the base interval time to the total allocation time, and calculates the total time taken for process switching due to the termination of the CPU resource allocation with respect to the base interval time. If the ratio exceeds the threshold, the value obtained by multiplying the value by the ratio is further divided by the threshold, and the value is calculated as the next interval time.
The CPU resource management device according to claim 1 or 2.
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータが実行するCPUリソース管理方法であって、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録し、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
CPUリソース管理方法。
A CPU resource management method executed by a computer including a storage device that stores a process and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. and record the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
CPU resource management method.
前記総割り当て時間がベースインターバル時間より長い場合、次回のインターバル時間を前回のインターバル時間より短い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する、
請求項5に記載のCPUリソース管理方法。
If the total allocation time is longer than the base interval time, the next interval time is determined to be shorter than the previous interval time, and based on the next interval time and the distribution ratio of CPU usage time for each workload class. to determine the next maximum CPU usage time for each workload class.
The CPU resource management method according to claim 5.
前記総割り当て時間に対する前記ベースインターバル時間の比を前回のインターバル時間に乗じることにより、次回のインターバル時間を計算する、
請求項5または6に記載のCPUリソース管理方法。
calculating the next interval time by multiplying the previous interval time by the ratio of the base interval time to the total allocated time;
The CPU resource management method according to claim 5 or 6.
前記総割り当て時間に対する前記ベースインターバル時間の比を前回のインターバル時間に乗じて得られる値を計算し、ベースインターバル時間に対する前記CPUリソース割り当ての打ち切りによるプロセス切替にかかった総時間の割合が閾値を超えていれば、前記値に前記割合を乗じて得られる値をさらに前記閾値で除算した値を、次回のインターバル時間として計算する、
請求項5または6に記載のCPUリソース管理方法。
A value obtained by multiplying the previous interval time by the ratio of the base interval time to the total allocation time is calculated, and the ratio of the total time taken for process switching due to the termination of the CPU resource allocation to the base interval time exceeds a threshold value. If so, calculate the value obtained by multiplying the value by the ratio and further dividing the value by the threshold value as the next interval time.
The CPU resource management method according to claim 5 or 6.
プロセスを格納する記憶装置と、前記プロセスが実行されるプロセッサと、を備えたコンピュータに、
インターバルを開始すると、CPU使用時間が最大CPU使用時間以下である条件を満たすワークロードクラスに属するプロセスにCPUリソースを割り当てて実行し、前記条件を満たすワークロードクラスに属するプロセスが存在しなくなった時点で前記インターバルを終了し、前記最大CPU使用時間に達したことが原因で行われたCPUリソース割り当ての打ち切り回数と前記インターバルの開始から終了までの時間である総割り当て時間とを記録する処理と、
前記総割り当て時間がベースインターバル時間より短く、且つ、前記CPUリソース割り当ての打ち切り回数が1以上の場合、次回のインターバル時間を前回のインターバル時間より長い時間に決定し、且つ、前記次回のインターバル時間とワークロードクラス毎のCPU使用時間の配分比とに基づいて次回のワークロードクラス毎の最大CPU使用時間を決定する処理と、
を行わせるためのプログラム。
A computer including a storage device that stores a process, and a processor that executes the process,
When an interval starts, CPU resources are allocated and executed to processes belonging to a workload class that satisfies the condition that the CPU usage time is less than or equal to the maximum CPU usage time, and when there are no more processes that belong to a workload class that satisfies the condition. terminating the interval and recording the number of times CPU resource allocation was aborted due to reaching the maximum CPU usage time and the total allocation time that is the time from the start to the end of the interval;
If the total allocation time is shorter than the base interval time and the number of times the CPU resource allocation is aborted is 1 or more, the next interval time is determined to be longer than the previous interval time, and determining the next maximum CPU usage time for each workload class based on the CPU usage time distribution ratio for each workload class;
A program to do this.
JP2019222164A 2019-12-09 2019-12-09 CPU resource management device Active JP7355456B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019222164A JP7355456B2 (en) 2019-12-09 2019-12-09 CPU resource management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019222164A JP7355456B2 (en) 2019-12-09 2019-12-09 CPU resource management device

Publications (2)

Publication Number Publication Date
JP2021092904A JP2021092904A (en) 2021-06-17
JP7355456B2 true JP7355456B2 (en) 2023-10-03

Family

ID=76312421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019222164A Active JP7355456B2 (en) 2019-12-09 2019-12-09 CPU resource management device

Country Status (1)

Country Link
JP (1) JP7355456B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025143752A1 (en) * 2023-12-29 2025-07-03 삼성전자 주식회사 Electronic device and secure resource restriction method using same

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008225641A (en) 2007-03-09 2008-09-25 Nec Corp Computer system, interrupt control method and program

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6211941A (en) * 1985-07-10 1987-01-20 Nec Corp Multiplex processing control system
JPH04336334A (en) * 1991-05-13 1992-11-24 Kobe Nippon Denki Software Kk Time slice value setting system
JPH05241860A (en) * 1992-02-26 1993-09-21 Kobe Nippon Denki Software Kk Time slice optimization system
JPH08147178A (en) * 1994-11-24 1996-06-07 Hitachi Ltd Shared resource access method and shared resource access device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008225641A (en) 2007-03-09 2008-09-25 Nec Corp Computer system, interrupt control method and program

Also Published As

Publication number Publication date
JP2021092904A (en) 2021-06-17

Similar Documents

Publication Publication Date Title
EP0384635B1 (en) Adaptive job scheduling for multiprocessing systems
US6560628B1 (en) Apparatus, method, and recording medium for scheduling execution using time slot data
US7191446B2 (en) Method for resource management in a real-time embedded system
US6016503A (en) Methods, systems and computer program products for preemptive avoidance of constraints for shared resources
KR101651871B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
JPH09120389A (en) Method and device for job scheduling of cluster type computer
US20080098395A1 (en) System and method of expediting certain jobs in a computer processing system
US20080235695A1 (en) Resource allocation system for jobs, resource allocation method and resource allocation program for jobs
CN111930516B (en) Load balancing method and related device
US7096471B2 (en) Apparatus for resource management in a real-time embedded system
CN111580949B (en) Automatic regulating method for network packet receiving mode
CN112214299A (en) Multi-core processor and task scheduling method and device thereof
JP7355456B2 (en) CPU resource management device
WO2023165485A1 (en) Scheduling method and computer system
CN107589993A (en) A kind of dynamic priority scheduling algorithm based on linux real time operating systems
CN111143063A (en) Task resource reservation method and device
CN112395063B (en) Dynamic multithreading scheduling method and system
CN111314249B (en) Method and server for avoiding data packet loss of 5G data forwarding plane
JP2022550064A (en) Shared Resource Allocation in Multithreaded Microprocessors
US11275621B2 (en) Device and method for selecting tasks and/or processor cores to execute processing jobs that run a machine
CN110213178B (en) Traffic management method, integrated chip, and device
US20030023660A1 (en) Real-time embedded resource management system
JP2021060923A (en) Vehicle control device
EP1594048A2 (en) Thread selection unit and method for a multithreaded processor
EP1262871A2 (en) Real-time embedded resource management system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221102

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230711

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: 20230822

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230914

R151 Written notification of patent or utility model registration

Ref document number: 7355456

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151