JP5347451B2 - Multiprocessor system, conflict avoidance program, and conflict avoidance method - Google Patents

Multiprocessor system, conflict avoidance program, and conflict avoidance method Download PDF

Info

Publication number
JP5347451B2
JP5347451B2 JP2008300896A JP2008300896A JP5347451B2 JP 5347451 B2 JP5347451 B2 JP 5347451B2 JP 2008300896 A JP2008300896 A JP 2008300896A JP 2008300896 A JP2008300896 A JP 2008300896A JP 5347451 B2 JP5347451 B2 JP 5347451B2
Authority
JP
Japan
Prior art keywords
resource
waiting time
avoidance target
avoidance
conflict
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
JP2008300896A
Other languages
Japanese (ja)
Other versions
JP2010128664A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2008300896A priority Critical patent/JP5347451B2/en
Publication of JP2010128664A publication Critical patent/JP2010128664A/en
Application granted granted Critical
Publication of JP5347451B2 publication Critical patent/JP5347451B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Multi Processors (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a multiprocessor system, a contention avoidance program and a contention avoidance method, allowing scheduling for avoiding resource contention to a process of using a resource after detecting the resource that is a factor of the resource contention. <P>SOLUTION: The multiprocessor system 100 includes: a contention detection part 12 for detecting the resource contention based on a request for a lock and/or a latency time after the request of the lock to the resource used by another process operating on another CPU when one process operating on one CPU of a plurality of CPUs uses the resource; an avoidance target specification part 13 for specifying the resource of a detected contention target as an avoidance target; and an execution CPU determination part 7 for determining whether or not each process is a process using the resource of the avoidance target when uprising of each process, and allocating the one CPU of the plurality of CPUs to each uprising process. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

この発明は、複数のプロセッサによる並列処理を実行するマルチプロセッサを搭載したマルチプロセッサシステム、競合回避プログラム及び競合回避方法に関する。   The present invention relates to a multiprocessor system equipped with a multiprocessor that executes parallel processing by a plurality of processors, a conflict avoidance program, and a conflict avoidance method.

近年のサーバ製品等においては、複数のCPUを使って並列処理を実行するマルチプロセッサシステムが一般的になりつつある。これらのシステムでは、運用に必要な多数のプロセスが、次々に交代しながら各CPU(central processing unit:中央処理装置)の実行権を握る動作(スケジューリング)がOS(operating system)によって繰返されている。
また、各プロセスは、マルチプロセッサ上で処理を実行する過程において、様々なリソース(メモリ、ディスク、ネットワーク又はバッファ等)を必要とする。
In recent server products and the like, multiprocessor systems that perform parallel processing using a plurality of CPUs are becoming common. In these systems, an OS (operating system) repeats an operation (scheduling) in which a large number of processes necessary for operation take turns and each CPU (central processing unit) has an execution right. .
Each process requires various resources (a memory, a disk, a network, a buffer, etc.) in the process of executing processing on the multiprocessor.

また、休止していたプロセスを起床させる場合には、メモリのキャッシュの有効性を考慮して、前回実行していたCPUにおける実行を優先し、各CPUに対する待ちキューの数に顕著な差がある場合には、各CPUの負荷が均等になるように、繋ぐキューを変更して選択するものである。   In addition, when waking up a process that has been paused, in consideration of the effectiveness of the memory cache, priority is given to execution in the CPU that was previously executed, and there is a significant difference in the number of wait queues for each CPU. In this case, the queues to be connected are changed and selected so that the load on each CPU becomes equal.

例えば、従来のマルチプロセッサシステム用のスケジューリング方法は、マルチプロセッサシステム上で動くプロセスについて、その処理時間等をもとに決定した「処理特性」なる基準を用いてスケジューリングを行なう方式が開示されている。特に、この従来のマルチプロセッサシステム用のスケジューリング方法は、プロセス毎にあらかじめ処理特性を定めておき、運用中に計測したプロセスの処理時間が処理特性をオーバーする傾向が見られた場合には、該当プロセスを停止するか、若しくは該当プロセスに関するスケジューリングのアルゴリズムを変更するという方式が提唱されている(例えば、特許文献1参照)。   For example, as a conventional scheduling method for a multiprocessor system, a method is disclosed in which a process running on a multiprocessor system is scheduled using a criterion of “processing characteristics” determined based on the processing time and the like. . In particular, this conventional scheduling method for a multiprocessor system determines the processing characteristics in advance for each process, and is applicable when the processing time of the process measured during operation tends to exceed the processing characteristics. A method of stopping a process or changing a scheduling algorithm related to the process has been proposed (see, for example, Patent Document 1).

また、従来の共有リソースの競合検出方法は、マルチスレッド競合を検知した時点で割込みを発生させ、プロセスの停止(休止)や他プロセススイッチングを行なうことで、競合を回避する方法が開示されている(例えば、特許文献2参照)。
特開平6−119300号公報 特開2004−252670号公報
In addition, a conventional shared resource conflict detection method is disclosed in which an interrupt is generated when multi-thread conflict is detected, and a process is stopped (suspended) or other process switching is performed to avoid the conflict. (For example, refer to Patent Document 2).
JP-A-6-119300 JP 2004-252670 A

しかしながら、従来のマルチプロセッサシステム用のスケジューリング方法は、どのリソースに関するリソース競合が遅延に影響しているかを特定できないまま、単に処理時間を超過したことに基づき、他のスケジューリングアルゴリズムに変更するものであり、リソース競合が解消される保障がないという課題があった。
また、従来の共有リソースの競合回避方法は、割込み処理やプロセス切替えを実行する度に生じるオーバーヘッドの影響が大きくなる可能性が高いという課題があった。
However, the scheduling method for the conventional multiprocessor system is to change to another scheduling algorithm based on simply exceeding the processing time without specifying which resource contention affects the delay. There was a problem that there was no guarantee that resource competition would be resolved.
Further, the conventional shared resource conflict avoidance method has a problem that there is a high possibility that the influence of overhead generated every time interrupt processing or process switching is executed becomes large.

特に、従来のマルチプロセッサシステム用のスケジューリング方法及び共有リソースの競合回避方法は、競合を検出した時点において、プロセスの停止や休止を行なうことにより、場当たり的にリソース競合を回避しているのみで、同種のリソース競合がすぐに発生する可能性が高く、恒久的な対策にならないという課題があった。   In particular, the conventional scheduling method and shared resource conflict avoidance method for a multiprocessor system only avoids resource conflict on an ad hoc basis by stopping or halting a process when a conflict is detected. There is a high possibility that the same type of resource competition will occur immediately, and there is a problem that it is not a permanent countermeasure.

この発明に係るマルチプロセッサシステムは、複数のプロセッサのうち一のプロセッサ上で動作する一のプロセスがリソースを使用している場合に、他のプロセッサ上で動作する他のプロセスが当該使用されているリソースに対するロックの要求及び/又はロックの要求後の待ち時間に基づいて、リソースの競合を検知する競合検知部と、前記検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する回避対象特定部と、各プロセスの起床にあたり、当該各プロセスが前記回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、前記起床される各プロセスに対して、前記複数のプロセッサのうち、一のプロセッサを割り当てる実行CPU決定部と、前記待ち時間に基づき、リソース毎に当該待ち時間を積算する合計待ち時間算出部と、リソース毎のテーブルを有し、当該各テーブルのリソースに対応するプロセッサ情報及び待ち時間情報を格納する情報格納部と、を備え、前記回避対象特定部が、前記合計待ち時間算出部によるリソース毎の積算結果に基づき、合計待ち時間が所定の基準値を超えたリソースを回避対象のリソースとして特定し、前記実行プロセッサ決定部は、前記特定された回避対象のリソースに基づき、前記起床されるプロセスが使用するリソースに対して当該プロセスが回避対象のリソースを使用するプロセスであるかを判断し、当該起床されるプロセスが回避対象のリソースを使用する場合に、当該回避対象のリソースに対応する待ち時間のうち、前記情報格納部に格納される所定の待ち時間に対応するプロセッサを、当該起床されるプロセスに対して割り当てるものである。
In the multiprocessor system according to the present invention, when one process operating on one processor among a plurality of processors uses resources, the other process operating on the other processor is used. Based on the lock request for the resource and / or the waiting time after the lock request, a conflict detection unit that detects a resource conflict and a resource that is a conflict target in the detected resource conflict should avoid resource conflict. The avoidance target identifying unit that is identified as a target, and whether each process is a process that uses the avoidance target resource upon wakeup of each process, and for each process that is woken up based on the determination result Te, among the plurality of processors, and executing CPU determining unit for assigning the one processor, when the waiting The basis, the total waiting time calculating unit for accumulating the waiting time for each resource has a table for each resource, an information storage unit for storing processor information and latency information corresponding to the resource of the respective table, the The avoidance target specifying unit specifies a resource having a total waiting time exceeding a predetermined reference value as a avoidance target resource based on an accumulation result for each resource by the total waiting time calculating unit, and the execution processor determining unit Determines whether the process is a process that uses the avoidance resource for the resource used by the process to be woken up based on the identified avoidance target resource, and the process to be woken up is avoided When the target resource is used, the waiting time corresponding to the resource to be avoided is stored in the information storage unit. The processor corresponding to a predetermined waiting time, which is allocated shall for the process to be the wake-up.

この発明は、上述のような課題を解決するためになされたもので、第1の目的は、リソース競合の要因となるリソースを検出したうえで、そのリソースを使用するプロセスに対して、リソース競合を回避するスケジューリングを行なうことができるマルチプロセッサシステム、競合回避プログラム及び競合回避方法を提供するものである。   The present invention has been made in order to solve the above-described problems. A first object of the present invention is to detect a resource that causes resource competition, and then perform resource competition for a process that uses the resource. The present invention provides a multiprocessor system, a contention avoidance program, and a contention avoidance method capable of performing scheduling for avoiding the above.

また、第2の目的は、リソース競合の対象であるリソースを予想して事前にスケジューリングで回避することにより、リソース競合自体を回避することができ、オーバーヘッドになり得る割込み処理やプロセススイッチングを発生させずに、効率の良いシステムの運用を行なうことができるマルチプロセッサシステム、競合回避プログラム及び競合回避方法を提供するものである。   The second purpose is to anticipate resources that are subject to resource contention and avoid them by scheduling in advance, thereby avoiding resource contention itself and generating interrupt processing and process switching that can be overhead. The present invention provides a multiprocessor system, a conflict avoidance program, and a conflict avoidance method capable of operating a system efficiently.

また、第3の目的は、定期的に収集した情報に基づき、プロセスの起床時において、リソース競合を回避するようにスケジューリングすることにより、リソース競合に対する恒久的な対策を実施することができるマルチプロセッサシステム、競合回避プログラム及び競合回避方法を提供するものである。   A third object of the present invention is to provide a multiprocessor capable of implementing permanent countermeasures against resource contention by scheduling so as to avoid resource contention when a process wakes up based on information collected periodically. A system, a conflict avoidance program, and a conflict avoidance method are provided.

開示のマルチプロセッサシステムは、リソースの開放待ちに伴う処理(ビジーウェイトによるCPUの占有や、タスク切り替え処理)を削減し、その分のCPU資源を別のプロセスの処理に割り当てることができ、システムの処理効率を向上させることができるという効果を奏する。   The disclosed multiprocessor system can reduce processing associated with waiting for resources to be released (CPU occupancy due to busy waits and task switching processing), and can allocate the corresponding CPU resources to processing of another process. There is an effect that the processing efficiency can be improved.

ここで、本発明は多くの異なる形態で実施可能である。したがって、下記の各実施形態の記載内容のみで解釈すべきではない。また、各実施形態の全体を通して同じ要素には同じ符号を付けている。   Here, the present invention can be implemented in many different forms. Therefore, it should not be interpreted only by the description of the following embodiments. In addition, the same reference numerals are given to the same elements throughout the embodiments.

各実施形態では、主にシステムについて説明するが、いわゆる当業者であれば明らかな通り、本発明はコンピュータで使用可能なプログラム、方法としても実施できる。また、本発明は、ハードウェア、ソフトウェア、又は、ソフトウェア及びハードウェアの実施形態で実施可能である。プログラムは、ハードディスク、CD−ROM、DVD−ROM、光記憶装置又は磁気記憶装置等の任意のコンピュータ可読媒体に記録できる。さらに、プログラムはネットワークを介した他のコンピュータに記録することができる。   In each embodiment, the system will be mainly described. However, as will be apparent to those skilled in the art, the present invention can also be implemented as a program and method usable on a computer. In addition, the present invention can be implemented in hardware, software, or software and hardware embodiments. The program can be recorded on any computer-readable medium such as a hard disk, CD-ROM, DVD-ROM, optical storage device, or magnetic storage device. Furthermore, the program can be recorded on another computer via a network.

(本発明の第1の実施形態)
図1は第1の実施形態に係るマルチプロセッサシステムの主要な構成を示す概略図、図2(a)はプロセス実行格納部に記録される情報の一例を示す説明図、図2(b)はリソース排他情報格納部に記録される情報の一例を示す説明図、図2(c)はCPUプロセス情報格納部に記録される情報の一例を示す説明図、図3はマルチプロセッサシステムにおける競合回避前のプロセス稼動例を示す説明図、図4はリソース排他情報格納部及びCPUプロセス情報格納部の更新手順を示すシーケンス図、図5はプロセス実行格納部の更新手順を示すシーケンス図、図6はマルチプロセッサシステムにおける競合回避後のプロセス稼動例を示す説明図、図7(a)はプロセス実行格納部に記録される情報の他の例を示す説明図、図7(b)はリソース排他情報格納部に記録される情報の他の例を示す説明図、図7(c)はCPUプロセス情報格納部に記録される情報の他の例を示す説明図、図8はマルチプロセッサシステムにおけるプロセス起床時の競合回避の手順を示すフローチャートである。
(First embodiment of the present invention)
FIG. 1 is a schematic diagram illustrating the main configuration of the multiprocessor system according to the first embodiment, FIG. 2A is an explanatory diagram illustrating an example of information recorded in a process execution storage unit, and FIG. FIG. 2C is an explanatory diagram showing an example of information recorded in the CPU process information storage unit, and FIG. 3 is a diagram before conflict avoidance in the multiprocessor system. FIG. 4 is a sequence diagram showing the update procedure of the resource exclusive information storage unit and the CPU process information storage unit, FIG. 5 is a sequence diagram showing the update procedure of the process execution storage unit, and FIG. FIG. 7A is an explanatory diagram showing another example of information recorded in the process execution storage unit, and FIG. 7B is a resource example. 7 is an explanatory diagram showing another example of information recorded in the exclusive information storage unit, FIG. 7C is an explanatory diagram showing another example of information recorded in the CPU process information storage unit, and FIG. It is a flowchart which shows the procedure of the conflict avoidance at the time of process wakeup.

図1において、マルチプロセッサシステム100は、従来のマルチプロセッサシステムと同様の構成要素である、プロセス起床部1、待ちキュー2、実行キュー3、実行キュー接続部4及びプロセッサ(CPU)5を備えている。   In FIG. 1, a multiprocessor system 100 includes a process wake-up unit 1, a wait queue 2, an execution queue 3, an execution queue connection unit 4, and a processor (CPU) 5, which are the same components as those of a conventional multiprocessor system. Yes.

プロセス起床部1は、プロセッサ5上で動作しているプロセスによるリソースの開放に基づき、後述する実行CPU決定部7に対して、休止したプロセス(以下、休止プロセス6と称す)の起床を行なうように通知する。
待ちキュー2は、CPUが割り当てられていないプロセスのデータを先入れ先出し(FIFO:First In First Out)のリスト構造で保持するものである。
The process wake-up unit 1 wakes up the paused process (hereinafter referred to as the dormant process 6) to the execution CPU determination unit 7 to be described later based on the release of resources by the process operating on the processor 5. Notify
The waiting queue 2 holds data of a process to which a CPU is not assigned in a first-in first-out (FIFO) list structure.

実行キュー3は、プロセスのデータを先入れ先出し(FIFO)のリスト構造で保持するものであり、保持するプロセスがCPUの実行権を獲得すると、対応するCPUにプロセスのデータを送り出す。   The execution queue 3 holds process data in a first-in first-out (FIFO) list structure. When the holding process acquires the execution right of the CPU, the process data is sent to the corresponding CPU.

実行キュー接続部4は、後述する実行CPU決定部7によるCPUの割り当て結果に基づき、待ちキュー2から起床対象であるプロセスのデータを読出し、割り当てられたCPUの実行キュー3に、該当する休止プロセス6を繋ぐものである。   The execution queue connection unit 4 reads the data of the process to be woken up from the waiting queue 2 based on the CPU allocation result by the execution CPU determination unit 7 to be described later, and applies the corresponding pause process to the execution queue 3 of the allocated CPU. 6 is connected.

また、マルチプロセッサシステム100は、従来のマルチプロセッサシステムの構成要素である実行CPU決定部に対して、後述する新たな機能を追加した実行CPU決定部7を備えている。   In addition, the multiprocessor system 100 includes an execution CPU determination unit 7 in which a new function to be described later is added to the execution CPU determination unit that is a component of the conventional multiprocessor system.

実行CPU決定部7は、各プロセスの起床にあたり、起床されるプロセスが使用するリソースに対して、後述するソース排他情報格納部11に格納される、リソース識別情報及び回避対象情報に基づき、当該プロセスが回避対象のリソースを使用するプロセスであるかを判定する。   The execution CPU determination unit 7 wakes up each process based on resource identification information and avoidance target information stored in the source exclusive information storage unit 11 described later for the resources used by the process to be woken up. Is a process that uses the resource to be avoided.

また、実行CPU決定部7は、起床されるプロセスが回避対象のリソースを使用する場合に、後述するCPUプロセス情報格納部14に格納される、当該回避対象のリソースに対応するテーブルにおける待ち時間情報のうち、最短の待ち時間に対応するCPUを、当該起床されるプロセスに対して割り当てる。すなわち、実行CPU決定部7は、判定結果に基づき、起床させる各プロセスに対して、複数のCPUのうち、一のCPUを割り当てる。   In addition, when the process to be woken up uses the avoidance target resource, the execution CPU determination unit 7 stores the waiting time information in the table corresponding to the avoidance target resource, which is stored in the CPU process information storage unit 14 to be described later. Among them, the CPU corresponding to the shortest waiting time is assigned to the process to be woken up. That is, the execution CPU determination unit 7 assigns one CPU among a plurality of CPUs to each process to wake up based on the determination result.

また、マルチプロセッサシステム100は、従来のマルチプロセッサシステムに対して、新たに追加した構成要素である、プロセス実行格納部8、排他情報収集部9、合計待ち時間算出部10、リソース排他情報格納部11、競合検知部12、回避対象特定部13及びCPUプロセス情報格納部14を備えている。   The multiprocessor system 100 is a process execution storage unit 8, an exclusive information collection unit 9, a total waiting time calculation unit 10, a resource exclusive information storage unit that are newly added components to the conventional multiprocessor system. 11, a conflict detection unit 12, an avoidance target identification unit 13, and a CPU process information storage unit 14.

プロセス実行格納部8は、例えば、図2(a)に示すように、各プロセスが、一のCPUの実行権を占有して動作し、任意のリソースを使用する場合に、当該各プロセスを識別する情報(以下、プロセスIDと称す)、当該各プロセスを動作させるCPUを識別する情報(以下、CPUIDと称す)、当該各プロセスが使用するリソースを識別する情報(以下、リソースIDと称す)、及び、当該各プロセスがリソースのロックを要求してロックを獲得するまでの待ち時間の情報(以下、待ち時間情報と称す)を格納する。なお、CPUID及びプロセスIDは、メモリ内に保持されているプロセス情報から取得することが可能である。また、リソースIDとしては、例えば、リソース名、識別番号、又はリソースに対応する排他変数等が挙げられる。   For example, as shown in FIG. 2A, the process execution storage unit 8 identifies each process when the process operates with the execution right of one CPU and uses any resource. Information (hereinafter referred to as a process ID), information for identifying a CPU that operates each process (hereinafter referred to as a CPU ID), information for identifying a resource used by each process (hereinafter referred to as a resource ID), In addition, information on a waiting time until each process requests a resource lock and acquires the lock (hereinafter referred to as wait time information) is stored. Note that the CPU ID and process ID can be obtained from the process information held in the memory. Examples of the resource ID include a resource name, an identification number, or an exclusive variable corresponding to the resource.

排他情報収集部9は、プロセス実行格納部8にリアルタイムに記録される情報(CPUID、プロセスID、リソースID、待ち時間情報)を定期的に監視しており、一定周期における所定の期間内で記録された情報を、後述するリソース排他情報格納部11及びCPUプロセス情報格納部14におけるテーブルの所定の欄に更新する。   The exclusive information collection unit 9 periodically monitors information (CPUID, process ID, resource ID, waiting time information) recorded in real time in the process execution storage unit 8 and records it within a predetermined period in a fixed period. The updated information is updated in a predetermined column of a table in the resource exclusion information storage unit 11 and the CPU process information storage unit 14 to be described later.

なお、プロセス実行格納部8に、新規のリソースIDが記録された場合には、後述するリソース排他情報格納部11のテーブルに新規の欄を作成して所定の情報を記録し、後述するCPUプロセス情報格納部14に新規のテーブルを作成して所定の情報を記録する。また、プロセス実行格納部8に、リソースIDとプロセスIDとの新規の組み合わせが記録された場合には、後述するCPUプロセス情報格納部14のテーブルに新規の欄を作成して所定の情報を記録する。   When a new resource ID is recorded in the process execution storage unit 8, a new field is created in a table of the resource exclusive information storage unit 11 described later to record predetermined information, and a CPU process described later A new table is created in the information storage unit 14 and predetermined information is recorded. When a new combination of resource ID and process ID is recorded in the process execution storage unit 8, a new column is created in a table of a CPU process information storage unit 14 to be described later and predetermined information is recorded. To do.

合計待ち時間算出部10は、排他情報収集部9からのリソースID及び待ち時間情報に基づき、リソースIDのリソース毎に待ち時間を積算した合計の待ち時間(以下、合計待ち時間と称す)を算出し、リソース排他情報格納部11に更新(新規は記録)する。   The total waiting time calculation unit 10 calculates a total waiting time (hereinafter referred to as a total waiting time) obtained by integrating the waiting time for each resource of the resource ID based on the resource ID and the waiting time information from the exclusive information collecting unit 9. Then, the resource exclusive information storage unit 11 is updated (newly recorded).

リソース排他情報格納部11は、例えば、図2(b)に示すように、合計待ち時間の情報(以下、合計待ち時間情報と称す)、当該合計待ち時間が所定の基準値を超えたリソースに対して回避対象のリソースとして識別する情報(以下、回避対象情報と称す)、及び、当該回避対象のリソースに対応する合計待ち時間を対象値とする対象値の情報(以下、対象値情報と称す)を、リソースIDのリソース毎に対応付けて格納する。なお、所定の基準値は、システム環境によってチューニングされ、例えば、リアルタイム性が要求されるマルチプロセッサシステム100においては、msec〜μsec単位での設定が想定される。   For example, as shown in FIG. 2B, the resource exclusion information storage unit 11 stores information on total waiting time (hereinafter referred to as total waiting time information), and resources whose total waiting time exceeds a predetermined reference value. On the other hand, information that is identified as an avoidance target resource (hereinafter referred to as avoidance target information), and target value information (hereinafter referred to as target value information) whose target value is the total waiting time corresponding to the avoidance target resource. ) Are stored in association with each resource of the resource ID. The predetermined reference value is tuned according to the system environment. For example, in the multiprocessor system 100 that requires real-time performance, a setting in units of msec to μsec is assumed.

競合検知部12は、リソース排他情報格納部11に記録される合計待ち時間情報に基づき、合計待ち時間が所定の基準値を超えたことを検知して、回避対象特定部13に検知結果を出力する。すなわち、競合検知部12は、複数のCPUによるリソース競合を検知する。   The conflict detection unit 12 detects that the total waiting time exceeds a predetermined reference value based on the total waiting time information recorded in the resource exclusion information storage unit 11, and outputs the detection result to the avoidance target specifying unit 13. To do. That is, the conflict detection unit 12 detects resource conflicts by a plurality of CPUs.

回避対象特定部13は、リソース排他情報格納部11のリソースIDにおける、合計待ち時間が所定の基準値を超えたリソースに対して、回避対象情報を記録し、合計待ち時間を対象値情報として記録する。すなわち、回避対象特定部13は、競合検知部12により検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する。   The avoidance target identification unit 13 records the avoidance target information for the resource whose total waiting time exceeds a predetermined reference value in the resource ID of the resource exclusion information storage unit 11, and records the total waiting time as target value information. To do. That is, the avoidance target identification unit 13 identifies a resource that is a competition target in the resource conflict detected by the conflict detection unit 12 as an avoidance target that should avoid the resource conflict.

なお、本実施形態においては、回避対象のリソースを一つとし、リソース排他情報格納部11の回避対象及び対象値の欄に対して初期段階で情報を記録する場合であり、合計待ち時間が所定の基準値を超えたリソースが複数存在する場合には、合計待ち時間が最長である一のリソースに対して、回避対象情報及び対象値情報を記録する。   In the present embodiment, there is one resource to be avoided, and information is recorded in the initial stage for the avoidance target and target value fields of the resource exclusion information storage unit 11, and the total waiting time is predetermined. When there are a plurality of resources exceeding the reference value, the avoidance target information and the target value information are recorded for the one resource having the longest total waiting time.

また、リソース排他情報格納部11の回避対象及び対象値の欄に記録された情報は、回避対象のリソースを使用するプロセスが、その後、他のリソースを使用することになり、当該他のリソースの合計待ち時間が、当該回避対象のリソースの対象値を超えるまでは、保持するものである。   In addition, the information recorded in the avoidance target and target value fields of the resource exclusion information storage unit 11 indicates that the process using the avoidance target resource will later use another resource, and the other resource's This is held until the total waiting time exceeds the target value of the resource to be avoided.

CPUプロセス情報格納部14は、例えば、図2(c)に示すように、リソースIDのリソース毎にテーブルを有し、当該各テーブルのリソースIDに対応する、CPUID、プロセスID及び待ち時間情報を格納する。   For example, as shown in FIG. 2C, the CPU process information storage unit 14 has a table for each resource of the resource ID, and stores the CPU ID, process ID, and waiting time information corresponding to the resource ID of each table. Store.

つぎに、本実施形態に係るマルチプロセッサシステム100における、リソース競合を回避する処理手順について説明する。
なお、以下の説明においては、本実施形態に係るマルチプロセッサシステム100として、計3個のプロセッサ5(CPU#0、CPU#1、CPU#2)を搭載した場合について説明するが、このプロセッサの個数に限られるものではない。
Next, a processing procedure for avoiding resource contention in the multiprocessor system 100 according to the present embodiment will be described.
In the following description, a case where a total of three processors 5 (CPU # 0, CPU # 1, CPU # 2) are mounted as the multiprocessor system 100 according to the present embodiment will be described. It is not limited to the number.

まず、回避対象情報がリソース排他情報格納部11に未設定の場合であり、本発明によるリソース競合の回避が機能する前における、一般的なプロセスの運用について説明する。   First, the operation of a general process when the avoidance target information is not set in the resource exclusion information storage unit 11 and before the avoidance of resource conflict according to the present invention functions will be described.

マルチプロセッサシステム100は、各CPU上において、一のプロセスが、一定期間、CPUの実行権を占有し、処理が一段落した時点で、他のプロセスに切り替わるというように、様々なプロセスが切り換わりながら、複数のCPUによる並列処理が行なわれる。   In the multiprocessor system 100, various processes are switched such that one process occupies the execution right of the CPU for a certain period of time on each CPU and the process is switched to another process when the process is completed. Parallel processing by a plurality of CPUs is performed.

また、処理が一段落したプロセスは、消滅又は休止状態に遷移するのであるが、休止状態に遷移した休止プロセス6は、やがて他のプロセスから起床され、CPU毎に用意された実行キュー3に繋がれて、実行待ち状態に遷移する。   In addition, the process that has finished processing is extinguished or transitions to a dormant state. However, the dormant process 6 that has transitioned to the dormant state is eventually woken up from another process and connected to the execution queue 3 prepared for each CPU. Transition to the execution wait state.

そして、実行キュー3に繋がれたプロセスは、スケジューリングの契機が巡ってくると、実行キュー3から取り出され、該当するCPUの実行権を再び獲得する。一般的には、このような一連の操作のことを、プロセススケジューリングと称し、主にOSのスケジューラ機能が実現している。   The process connected to the execution queue 3 is taken out from the execution queue 3 when the timing of scheduling comes and acquires the execution right of the corresponding CPU again. In general, such a series of operations is referred to as process scheduling, and mainly implements an OS scheduler function.

なお、異なるCPU上のプロセスが、同一のリソースを同時期に必要とした場合には、プロセス間で排他処理を行なう必要が生じる。
この排他処理として、本実施形態に係るマルチプロセッサシステム100においては、以下に示すようなスピンロックの仕組みを採用している。
When processes on different CPUs require the same resource at the same time, it is necessary to perform exclusive processing between the processes.
As the exclusive processing, the multiprocessor system 100 according to the present embodiment employs the following spin lock mechanism.

まず、各プロセスは、CPU上で動作中であり、リソースを必要とした時点において、スピンロック関数を呼び出す。
このスピンロック関数では、リソースを必要としたプロセスが、グローバルな(どのプロセスからも参照可能な)排他フラグを参照し、現時点において、リソースを獲得しているプロセスの有無をチェックする。
First, each process is running on the CPU and calls a spin lock function when resources are required.
In this spin lock function, a process that requires a resource refers to a global (can be referred to from any process) exclusive flag and checks whether there is a process that has acquired the resource at the present time.

そして、排他フラグがオフである(そのリソースを獲得しているプロセスが他に存在しない)ならば、リソースを必要としたプロセスは、自プロセスに対応する排他フラグをオンにしてリソースを使用し始める。   If the exclusion flag is off (no other process has acquired the resource), the process that needs the resource turns on the exclusion flag corresponding to its own process and starts using the resource. .

また、排他フラグがオンである(そのリソースを獲得しているプロセスが他に存在する)ならば、リソースを必要としたプロセスは、ループ処理等でCPUを空転させながら、排他フラグの参照を繰り返す。また、リソースを必要としたプロセスは、他のプロセスからリソースが開放され、排他フラグがオフに変わったことを確認すると、自プロセスに対応する排他フラグをオンにしてリソースを使用し始める。   If the exclusive flag is on (there is another process that has acquired the resource), the process that needs the resource repeats the reference of the exclusive flag while idling the CPU by loop processing or the like. . Further, when it is confirmed that the resource is released from another process and the exclusive flag is turned off, the process that needs the resource starts using the resource with the exclusive flag corresponding to the self process turned on.

なお、本実施形態に係るマルチプロセッサシステム100においては、排他処理として、スピンロックを用いる場合について説明するが、スピンロックに限られるものではなく、例えば、ミューテックス(Mutex)やセマフォ(Semaphore)等が挙げられる。このミューテックスは、スピンロックと同様に、待ち時間中のプロセスが、CPUの実行権を保持したままの方式である。   In the multiprocessor system 100 according to the present embodiment, the case where spin lock is used as exclusive processing will be described. However, the present invention is not limited to spin lock, and examples include mutex and semaphore. Can be mentioned. This mutex is a method in which a waiting process keeps the execution right of the CPU as in the case of spin lock.

これに対し、セマフォは、リソースの要求時に、そのリソースを獲得しているプロセスが他に存在する場合において、一旦、CPUの実行権を別のプロセスに明け渡し、リソースの要求を行なったプロセスを休止状態に強制的に遷移する点で、スピンロックと異なっている。また、セマフォは、所望のリソースが開放される契機により、休止プロセス6が、再び起床され、CPUの実行権を再獲得し、所望のリソースを使用可能とする方式である。   On the other hand, when there is another process that has acquired the resource when the resource is requested, the semaphore temporarily transfers the CPU execution right to another process and pauses the process that requested the resource. It differs from spinlock in that it is forced to transition to a state. The semaphore is a method in which the hibernation process 6 is woken up again when the desired resource is released, re-acquires the right to execute the CPU, and the desired resource can be used.

なお、スピンロックは、プロセスが待ち時間中にループ処理によりビジーウェイトを行なうために、リソース競合が激しくてリソースの確保までの期間が長時間になるような状況下においては、CPU資源を多大に浪費することになり非効率である。   Note that the spin lock is a busy wait process by the loop processing during the waiting time. Therefore, in a situation where resource competition is intense and the period until the resource is secured becomes long, the CPU resource is greatly increased. It is wasted and inefficient.

また、セマフォは、プロセスの休止、停止及び起床といった操作に、タスクスイッチングに伴う処理的なオーバーヘッドが伴うために、リソース競合が頻繁に起きる状況下では、その分、プロセス切替えに伴うオーバーヘッドも増加して非効率にならざるを得ない。特に、昨今のマルチプロセッサシステムでは、搭載するプロセッサの数の増加に伴い、リソース競合による非効率性は無視できないものとなっている。   In addition, semaphores involve processing overhead associated with task switching for operations such as process pause, stop, and wake-up, so in situations where resource contention frequently occurs, the overhead associated with process switching increases accordingly. And must be inefficient. In particular, in recent multiprocessor systems, the inefficiency due to resource competition cannot be ignored as the number of installed processors increases.

このため、本実施形態に係るマルチプロセッサシステム100においては、スピンロック等の排他処理を有効に機能させるために、後述する新たな処理を追加したものである。
ここで、新たに追加した処理を説明するにあたり、例えば、図3に示すような、各プロセスによるCPUの実行権の獲得状態及びリソースの占有状態を想定する。
For this reason, in the multiprocessor system 100 according to the present embodiment, a new process to be described later is added in order to make the exclusive process such as the spin lock function effectively.
Here, in describing the newly added processing, for example, as shown in FIG. 3, it is assumed that a CPU execution right acquisition state and a resource occupation state by each process are assumed.

なお、図3においては、ある一定の期間(ここでは、時刻T1〜T4の範囲)内で、CPU#0上ではプロセスD、プロセスC及びプロセスGが順に実行され、CPU#1上ではプロセスB及びプロセスFが順に実行され、CPU#2上ではプロセスA及びプロセスEが順に実行されている場合を想定する。   In FIG. 3, process D, process C, and process G are executed in sequence on CPU # 0 within a certain period (here, the range of times T1 to T4), and process B is executed on CPU # 1. And process F are executed in order, and process A and process E are executed in sequence on CPU # 2.

また、図3においては、各プロセスによる処理の過程において、プロセスA、プロセスB及びプロセスCはリソースαを使用し、プロセスF及びプロセスGはリソースβを使用し、プロセスD及びプロセスEはリソースγを使用する場合を想定する。
特に、プロセスBに関してその動きを説明すると、プロセスBは、CPU#1上で動作しており、時刻T2の時点で、リソースαのロック取得要求を出している。
In FIG. 3, in the course of processing by each process, the process A, the process B, and the process C use the resource α, the process F and the process G use the resource β, and the process D and the process E use the resource γ. Assume that is used.
In particular, the movement of the process B will be described. The process B is operating on the CPU # 1, and issues a lock acquisition request for the resource α at the time T2.

しかしながら、時刻T2の時点で、リソースαはプロセスAにより既に使用されているために、プロセスBは「待ち」状態になる。なお、本実施形態においては、排他処理として、スピンロックを採用しているため、この「待ち」状態の間に、プロセスBは空転しながらCPUを浪費し続ける。
やがて、プロセスAが時刻T3の時点でリソースαのロックを開放すると、プロセスBはリソースαのロックを取得でき、プロセスBはリソースαの使用が可能になる。
However, at time T2, since the resource α is already used by the process A, the process B enters a “waiting” state. In this embodiment, since the spin lock is adopted as the exclusive processing, the process B keeps wasting the CPU while idling during the “waiting” state.
Eventually, when the process A releases the lock of the resource α at the time T3, the process B can acquire the lock of the resource α, and the process B can use the resource α.

以上のような、各プロセスによるCPUの実行権の獲得状態及びリソースの占有状態に対して、マルチプロセッサシステム100のOSは、各CPU上でプロセスが実行権を握り、動作中に任意のリソースを使用する度に、そのプロセスに対応したCPUID、リソースID及び待ち時間情報を、プロセス実行格納部8にリアルタイムに記録していく。   With respect to the CPU execution right acquisition state and the resource occupancy state by each process as described above, the OS of the multiprocessor system 100 allows the process to execute the execution right on each CPU and allocate any resource during operation. Each time it is used, the CPU ID, resource ID, and waiting time information corresponding to the process are recorded in the process execution storage unit 8 in real time.

すなわち、図3に示す時刻T1〜T4の期間内においては、図2(a)に示すように、CPUID、リソースID及び待ち時間情報が、プロセス実行格納部8に記録されることになる。   That is, during the period from time T1 to time T4 shown in FIG. 3, the CPU ID, resource ID, and waiting time information are recorded in the process execution storage unit 8, as shown in FIG.

なお、図2(a)において、太線枠で囲まれた行は、図3に示すプロセスBが、CPU上を動作中に、時刻T3のタイミングで記録されたデータである。また、待ち時間情報の「135」は、ロック取得要求時である時刻T2からロック取得時である時刻T3までの時間(T3−T2の差分)が、135msecであることを示している。   In FIG. 2A, the line surrounded by a thick line frame is data recorded at the time T3 while the process B shown in FIG. 3 is operating on the CPU. The waiting time information “135” indicates that the time from the time T2 at the time of lock acquisition request to the time T3 at the time of lock acquisition (difference between T3 and T2) is 135 msec.

また、図3に示すプロセスA、プロセスD、プロセスE及びプロセスFについては、待ち時間情報が「15」又は「25」の短時間であるために、ロック取得要求時において、所望のリソースを使用しているプロセスが他に存在せず、リソースのロックをすぐに取得でき、空転時間を除く、走行時間のみであったことを示している。   For process A, process D, process E, and process F shown in FIG. 3, since the waiting time information is a short time of “15” or “25”, a desired resource is used when a lock acquisition request is made. This indicates that there is no other process, the resource lock can be acquired immediately, and only the running time, excluding the idling time.

そして、排他情報収集部9は、図4に示すように、プロセス実行格納部8にリアルタイムに記録される情報を定期的に監視しており(ステップS101)、一定周期における所定の期間内で記録された情報を、CPUプロセス情報格納部14に更新する(ステップS102)。   Then, as shown in FIG. 4, the exclusive information collection unit 9 periodically monitors information recorded in real time in the process execution storage unit 8 (step S101), and records it within a predetermined period in a fixed period. The updated information is updated in the CPU process information storage unit 14 (step S102).

また、排他情報収集部9は、一定周期における所定の期間内で記録された情報を、合計待ち時間算出部10を介して、リソース排他情報格納部11に更新する(ステップS103)。なお、合計待ち時間算出部10は、排他情報収集部9からのリソースID及び待ち時間情報に基づき、合計待ち時間を算出し、リソース排他情報格納部11に更新する。   In addition, the exclusive information collection unit 9 updates the information recorded within a predetermined period in a certain period to the resource exclusive information storage unit 11 via the total waiting time calculation unit 10 (step S103). The total waiting time calculating unit 10 calculates the total waiting time based on the resource ID and the waiting time information from the exclusive information collecting unit 9 and updates the resource waiting time to the resource exclusive information storage unit 11.

すなわち、図2(a)に示す情報においては、図2(b)に示すように、リソースID及び合計待ち時間情報が、リソース排他情報格納部11に記録される。また、図2(a)に示す情報においては、図2(c)に示すように、リソースID、プロセスID及び待ち時間情報が、CPUプロセス情報格納部14に記録される。   That is, in the information shown in FIG. 2A, as shown in FIG. 2B, the resource ID and the total waiting time information are recorded in the resource exclusive information storage unit 11. In the information shown in FIG. 2A, the resource ID, process ID, and waiting time information are recorded in the CPU process information storage unit 14, as shown in FIG.

そして、競合検知部12は、リソース排他情報格納部11に記録される合計待ち時間情報を参照し(ステップS104)、合計待ち時間が所定の基準値を超えたことを検知して、回避対象特定部13に検知結果を出力する(ステップS105)。   Then, the conflict detection unit 12 refers to the total waiting time information recorded in the resource exclusion information storage unit 11 (step S104), detects that the total waiting time exceeds a predetermined reference value, and specifies an avoidance target. The detection result is output to the unit 13 (step S105).

なお、所定の基準値を、例えば、200msecに設定している場合には、図2(b)において、リソースID「α」に対応する合計待ち時間情報が「360」msecであり、所定の基準値を上回り、リソースαがリソース競合の回避対象となる。   When the predetermined reference value is set to 200 msec, for example, in FIG. 2B, the total waiting time information corresponding to the resource ID “α” is “360” msec. Exceeding the value, the resource α becomes a target for avoiding resource contention.

回避対象特定部13は、リソース排他情報格納部11における、合計待ち時間が所定の基準値を超えたリソースに対して、リソース競合の回避対象として回避対象情報を記録し、合計待ち時間を対象値情報として記録する(ステップS106)。   The avoidance target specifying unit 13 records the avoidance target information as an avoidance target of resource contention for the resource whose total waiting time exceeds a predetermined reference value in the resource exclusion information storage unit 11, and sets the total waiting time as the target value. Information is recorded (step S106).

すなわち、図2(a)に示す情報においては、図2(b)に示すように、リソースID「α」に対応する、回避対象情報の欄にマーキングされ、対象値情報の欄に合計待ち時間情報「360」がコピーされる。
そして、CPU上で動作した図3に示すプロセスA〜Gは、目的の処理をそれぞれ終えると、他のプロセスにCPUの実行権を譲り渡した後に、休止プロセス6となる。
That is, in the information shown in FIG. 2A, as shown in FIG. 2B, the avoidance target information column corresponding to the resource ID “α” is marked, and the total waiting time is shown in the target value information column. Information “360” is copied.
Then, when the processes A to G shown in FIG. 3 operating on the CPU finish the target processing, the execution right of the CPU is handed over to other processes, and then the process is suspended.

以下、回避対象情報がリソース排他情報格納部11に設定された場合であり、本発明によるリソース競合の回避が機能する場合について、図5を用いて説明する。
まず、プロセス起床部1は、任意のイベントの契機により、他のプロセスからの命令に基づき、実行CPU決定部7を起動して、実行キュー3の接続要求を送信する(ステップS201)。
実行CPU決定部7は、リソース排他情報格納部11を参照し(ステップS202)、回避対象のリソース(ここでは、リソースα)を認識する(ステップS203)。
Hereinafter, the case where the avoidance target information is set in the resource exclusion information storage unit 11 and the resource conflict avoidance according to the present invention functions will be described with reference to FIG.
First, the process wake-up unit 1 activates the execution CPU determination unit 7 and transmits a connection request for the execution queue 3 on the basis of an instruction from another process in response to an arbitrary event (step S201).
The execution CPU determination unit 7 refers to the resource exclusion information storage unit 11 (step S202), and recognizes the avoidance target resource (here, resource α) (step S203).

つぎに、実行CPU決定部7は、CPUプロセス情報格納部14における回避対象のリソース(ここでは、リソースα)に対応するテーブルを参照する(ステップS204)。   Next, the execution CPU determination unit 7 refers to the table corresponding to the avoidance target resource (resource α in this case) in the CPU process information storage unit 14 (step S204).

そして、実行CPU決定部7は、これから起床させるプロセスが、回避対象のリソース(ここでは、リソースα)を使用するプロセス(ここでは、プロセスA、プロセスB又はプロセスC)であるか否かを判断する。   Then, the execution CPU determination unit 7 determines whether or not the process to be woken up is a process (here, the process A, the process B, or the process C) that uses the resource to be avoided (here, the resource α). To do.

ここで、例えば、起床させるプロセスがプロセスD〜Gである場合には、実行CPU決定部7は、回避対象のリソースαに無関係なプロセスであると判断して、既存のスケジューリング方法に従うように、実行キュー接続部4に通知する(キュー接続要求を行なう)。   Here, for example, when the processes to wake up are processes D to G, the execution CPU determination unit 7 determines that the process is irrelevant to the resource α to be avoided and follows the existing scheduling method. The execution queue connection unit 4 is notified (a queue connection request is made).

なお、既存のスケジューリング方法によれば、通常、起床させるプロセスは、前回動作したCPUの実行キュー3に再び繋がれる。ただし、各CPUの実行キュー3上のプロセス数に極端な偏りがある場合には、既存のロードバランシング機能に従い、実行キュー3の偏りを減らすように、実行キュー3に待機中のプロセス数が少ない他のCPUの実行キュー3に接続される場合もある。   According to the existing scheduling method, the process to wake up is normally reconnected to the execution queue 3 of the CPU that operated last time. However, when the number of processes on the execution queue 3 of each CPU is extremely uneven, the number of processes waiting in the execution queue 3 is small so as to reduce the unevenness of the execution queue 3 according to the existing load balancing function. In some cases, it is connected to the execution queue 3 of another CPU.

また、起床させるプロセスがプロセスA〜Cである場合には、実行CPU決定部7は、回避対象のリソースαに関連するプロセスであると判断する。そして、実行CPU決定部7は、CPUプロセス情報格納部14における回避対象のリソースαに対応するテーブルのうち、待ち時間情報が15msecと最も短いプロセスAが動作するCPU#2に対して、前回、CPU#2で動作していないプロセスB及びプロセスCを集約させるように働く(ステップS205)。   When the processes to wake up are processes A to C, the execution CPU determination unit 7 determines that the process is related to the resource α to be avoided. Then, the execution CPU determination unit 7 performs the previous processing on the CPU # 2 in which the process A having the shortest waiting time information of 15 msec in the table corresponding to the resource α to be avoided in the CPU process information storage unit 14 operates. The process B and the process C not operating on the CPU # 2 are aggregated (step S205).

すなわち、起床させるプロセスがプロセスAである場合には、前回と同様に、CPU#2の実行キュー3に繋ぐように、実行キュー接続部4に通知する。また、起床させるプロセスがプロセスB及びプロセスCである場合にも、プロセスAと同じCPU#2の実行キュー3に繋ぐように、実行キュー接続部4に通知する(ステップS206)。   That is, when the process to wake up is the process A, the execution queue connection unit 4 is notified so as to be connected to the execution queue 3 of the CPU # 2 as in the previous case. Also, when the processes to wake up are the process B and the process C, the execution queue connection unit 4 is notified so as to connect to the execution queue 3 of the same CPU # 2 as the process A (step S206).

そして、実行キュー接続部4は、待ちキュー2のデータを参照し、所定の休止プロセス6(ここでは、プロセスB)を起床させ、実行キュー3(ここでは、CPU#2の実行キュー3)に接続する(ステップS207)。   Then, the execution queue connection unit 4 refers to the data in the waiting queue 2, wakes up a predetermined pause process 6 (here, process B), and enters the execution queue 3 (here, execution queue 3 of CPU # 2). Connect (step S207).

起床したプロセス(ここでは、プロセスB)は、実行キュー3上で待機し(ステップS208)、CPU(ここでは、CPU#2)の実行権を獲得すると(ステップS209)、リソース(ここでは、リソースα)に対してロック取得要求を送信する(ステップS210)。また、リソース(ここでは、リソースα)は、ロックを取得できたことを送信する(ステップS211)。   The process that wakes up (here, process B) waits on the execution queue 3 (step S208), and acquires the execution right of the CPU (here, CPU # 2) (step S209). A lock acquisition request is transmitted to α) (step S210). Also, the resource (here, resource α) transmits that the lock has been acquired (step S211).

そして、プロセス(ここでは、プロセスB)は、メモリに対して、プロセス情報にあるCPUID及びプロセスIDを要求し(ステップS212)、CPUID(ここでは、CPU#2)及びプロセスID(ここでは、B)を取得する(ステップS213)。   The process (here, process B) requests the CPU ID and process ID in the process information from the memory (step S212), and the CPU ID (here, CPU # 2) and process ID (here, B). ) Is acquired (step S213).

プロセス(ここでは、プロセスB)は、所定の処理に対してリソース(ここでは、リソースα)を使用し(ステップS214)、所定の処理が完了すると、リソース(ここでは、リソースα)に対してロック解除要求を送信する(ステップS215)。また、リソース(ここでは、リソースα)は、ロックを解除したことを送信する(ステップS216)。   The process (here, process B) uses a resource (here, resource α) for a predetermined process (step S214). When the predetermined process is completed, the process (here, resource α) is performed. An unlock request is transmitted (step S215). Further, the resource (here, resource α) transmits that the lock has been released (step S216).

そして、プロセス(ここでは、プロセスB)は、自プロセス(ここでは、プロセスB)の情報(CPUID、プロセスID、リソースID、待ち時間情報)を、プロセス実行格納部8に記録する(ステップS217)。
そして、プロセス(ここでは、プロセスB)は、プロセスを終了し(ステップS218)、休止状態になる。
Then, the process (here, process B) records the information (CPUID, process ID, resource ID, waiting time information) of its own process (here, process B) in the process execution storage unit 8 (step S217). .
Then, the process (here, process B) ends the process (step S218) and enters a dormant state.

したがって、例えば、図6に示すように、これ以降(図5の時刻T4以降)の時刻である時刻T4から時刻T5までの期間内において、リソース競合の回避が必要なリソースαを使用するプロセスA、プロセスB及びプロセスCは、CPU#2に全て集約され動作することになる。また、プロセスD、プロセスG及びプロセスFは、前回と同様のCPU(CPU#0又はCPU#1)上で動作し、プロセスEは、既存のロードバランス機能により、前回のCPU#2からCPU#1に移動され、CPU#1上で動作することになる。   Therefore, for example, as shown in FIG. 6, in the period from time T4 to time T5, which is a time after this (after time T4 in FIG. 5), a process A that uses a resource α that needs to avoid resource contention. Process B and Process C are all integrated and operated by CPU # 2. The process D, the process G, and the process F operate on the same CPU (CPU # 0 or CPU # 1) as the previous time, and the process E changes from the previous CPU # 2 to the CPU # by the existing load balance function. 1 to operate on CPU # 1.

このように、本実施形態に係るマルチプロセッサシステム100は、リソース競合の回避操作により、リソース競合の回避が必要なリソース(ここでは、リソースα)を使用するプロセス(ここでは、プロセスB及びプロセスC)に対して、リソース要求の直後に、リソース(ここでは、リソースα)を獲得させることが可能となり、これまで発生していた待ち時間が大幅に削減できるという作用効果を奏する。また、これに伴う、CPU資源の空きに対して、他のプロセス(ここでは、プロセスH、プロセスI及びプロセスJ)に割り当てることが可能となる。   As described above, the multiprocessor system 100 according to the present embodiment uses processes (here, process B and process C) that use resources (here, resource α) that need to avoid resource contention by the resource contention avoidance operation. ), The resource (here, resource α) can be acquired immediately after the resource request, and the waiting time that has occurred can be greatly reduced. Moreover, it becomes possible to allocate the CPU resource vacancy associated therewith to other processes (here, process H, process I and process J).

ここで、その後、現在のリソース競合の回避対象であるリソース(以下、現回避対象リソースと称す)以外のリソース(以下、回避対象候補リソースと称す)に関するリソース競合が激しくなり、回避対象候補リソースのリソースIDに対応する合計待ち時間情報が、所定の基準値を超過した場合を考える。
回避対象候補リソースを使用するプロセスを起床する場合には、当然ながら、CPUの集約対象となるが、以下の処理を行なうものとする。
Here, after that, resource contention related to resources (hereinafter referred to as avoidance target resources) other than the resources that are currently targeted for avoiding resource conflicts (hereinafter referred to as current avoidance target resources) becomes intense, and the avoidance target candidate resources Consider a case where the total waiting time information corresponding to the resource ID exceeds a predetermined reference value.
When a process using the avoidance target candidate resource is woken up, of course, it is a CPU aggregation target, but the following processing is performed.

まず、回避対象候補リソースを使用するプロセスとして、現回避対象リソースを使用していたプロセスが含まれていた場合には、実行CPU決定部7が、回避対象候補リソースに対応する合計待ち時間情報と、リソース競合の回避対象として以前の設定時にコピーした現回避対象リソースの対象値情報とを比較する。   First, when a process using the current avoidance target resource is included as a process using the avoidance target candidate resource, the execution CPU determination unit 7 sets the total waiting time information corresponding to the avoidance target candidate resource and Compare the target value information of the current avoidance target resource copied during the previous setting as the avoidance target of resource conflict.

そして、回避対象候補リソースに対応する合計待ち時間情報が、現回避対象リソースに対応する対象値情報を上回る場合には、現回避対象リソースを使用していたプロセスに対しても、再度の実行キュー3の移動対象となり、CPUプロセス情報格納部14における回避対象候補リソースに対応するテーブルのうち、最短の待ち時間情報に対応するプロセスが動作しているCPUに集約される。   When the total waiting time information corresponding to the avoidance target resource exceeds the target value information corresponding to the current avoidance target resource, the execution queue is re-executed even for the process using the current avoidance target resource. Among the tables corresponding to the avoidance target candidate resources in the CPU process information storage unit 14, the processes corresponding to the shortest waiting time information are collected in the CPU that is operating.

この場合には、実行CPU決定部7が回避対象特定部13に判定結果を出力し、回避対象特定部13が、リソース排他情報格納部11における、現回避対象リソースに対応する回避対象情報及び対象値情報を削除し、回避対象候補リソースに対応する回避対象情報及び対象値情報に所定の情報を記録することになる。   In this case, the execution CPU determination unit 7 outputs the determination result to the avoidance target specifying unit 13, and the avoidance target specifying unit 13 in the resource exclusion information storage unit 11 avoids the avoidance target information and the target corresponding to the current avoidance target resource. The value information is deleted, and predetermined information is recorded in the avoidance target information and target value information corresponding to the avoidance target candidate resource.

これに対し、回避対象候補リソースに対応する合計待ち時間情報が、現回避対象リソースに対応する対象値情報を下回る場合には、現回避対象リソースを使用していたプロセスに対して、回避対象候補リソースに関するCPUの集約対象から外される。すなわち、現回避対象リソースを使用していたプロセスは、現回避対象リソースに関するリソース競合の回避時に集約されたCPU上で動作を継続することなる。   On the other hand, when the total waiting time information corresponding to the avoidance target resource is lower than the target value information corresponding to the current avoidance target resource, the avoidance candidate for the process using the current avoidance target resource Removed from CPU aggregation target for resources. In other words, the process that is using the current avoidance target resource continues to operate on the CPU that is aggregated when avoiding resource contention regarding the current avoidance target resource.

具体的には、図7(b)に示すように、リソース競合の回避の効果により、リソースαに対応する合計待ち時間が「360」から「40」に短縮され、リソースδに対応する合計待ち時間「240」が所定の基準値「200」を超過していることが分かる。   Specifically, as shown in FIG. 7B, due to the effect of avoiding resource contention, the total waiting time corresponding to the resource α is shortened from “360” to “40”, and the total waiting time corresponding to the resource δ. It can be seen that the time “240” exceeds the predetermined reference value “200”.

この場合に、リソースαに対応する対象値情報「360」と、リソースδに対応する合計待ち時間情報「240」とを比較すると、リソースαに対応する対象値情報がリソースδに対応する合計待ち時間情報を上回っているために、過去のスケジューリングを優先し、今回はリソースδを基準としたCPUの集約は行なわないことになる。   In this case, when the target value information “360” corresponding to the resource α is compared with the total waiting time information “240” corresponding to the resource δ, the target value information corresponding to the resource α is the total waiting time corresponding to the resource δ. Since it exceeds the time information, the past scheduling is prioritized, and the CPU is not aggregated based on the resource δ this time.

以下、これまで説明してきた処理について、図8に示すフローチャートを用いて説明する。
まず、プロセス起床部1は、任意のイベントの契機により、他のプロセスからの命令に基づき、実行CPU決定部7を起動して、実行キュー3の接続要求を送信する(ステップS1)。
実行CPU決定部7は、リソース排他情報格納部11を参照し(ステップS2)、所定の基準値を超えるリソースが存在するか否かを判断する(ステップS3)。
Hereinafter, the process described so far will be described with reference to the flowchart shown in FIG.
First, the process wake-up unit 1 activates the execution CPU determination unit 7 and transmits a connection request for the execution queue 3 based on an instruction from another process at an event trigger (step S1).
The execution CPU determination unit 7 refers to the resource exclusion information storage unit 11 (step S2), and determines whether there is a resource exceeding a predetermined reference value (step S3).

ステップS3において、所定の基準値を超えるリソースが存在しないと判断した場合には、実行CPU決定部7は、前回と同じCPUの実行キュー3への接続依頼を、実行キュー接続部4に送信する(ステップS4)。すなわち、実行CPU決定部7は、既存のスケジューリング方法に従うように、実行キュー接続部4に通知する(キュー接続要求を行なう)。   If it is determined in step S3 that there is no resource exceeding the predetermined reference value, the execution CPU determination unit 7 transmits a connection request to the execution queue 3 of the same CPU as the previous time to the execution queue connection unit 4. (Step S4). That is, the execution CPU determination unit 7 notifies the execution queue connection unit 4 (makes a queue connection request) so as to follow the existing scheduling method.

実行キュー接続部4は、指定された実行キュー3に休止プロセス6を起床させて接続し(ステップS5)、このプロセスは実行キュー3上で待機し、その後、CPUの実行権を獲得することになる。なお、以降の処理については、図5に示すステップS210〜ステップS218とほぼ同様(プロセスB、リソースα及びCPU#1に限定しない)であるので、説明を省略する。   The execution queue connection unit 4 wakes up and connects the pause process 6 to the designated execution queue 3 (step S5), this process waits on the execution queue 3, and then acquires the execution right of the CPU. Become. Since the subsequent processing is almost the same as Step S210 to Step S218 shown in FIG. 5 (not limited to the process B, resource α, and CPU # 1), description thereof will be omitted.

また、ステップS3において、所定の基準値を超えるリソースが存在すると判断した場合には、実行CPU決定部7は、CPUプロセス情報格納部14における超過しているリソースに対応するテーブルを参照する(ステップS6)。   If it is determined in step S3 that there is a resource exceeding the predetermined reference value, the execution CPU determination unit 7 refers to a table corresponding to the excess resource in the CPU process information storage unit 14 (step S3). S6).

そして、実行CPU決定部7は、これから起床させるプロセスが、超過しているリソースを使用するプロセスであるか否かを判断する(ステップS7)。
ステップS7において、超過しているリソースを使用するプロセスでないと判断した場合には、前述したステップS4に進む。
Then, the execution CPU determination unit 7 determines whether or not the process to be woken up is a process that uses an excess resource (step S7).
If it is determined in step S7 that the process does not use the excess resource, the process proceeds to step S4 described above.

また、ステップS7において、超過しているリソースを使用するプロセスであると判断した場合には、実行CPU決定部7は、参照したリソースのテーブルにあるプロセスにより過去に使用されたリソースが、現在の回避対象であるか否かを判断する(ステップS8)。   If it is determined in step S7 that the process uses the excess resource, the execution CPU determination unit 7 determines that the resource used in the past by the process in the referenced resource table is the current one. It is determined whether it is an avoidance target (step S8).

ステップS8において、回避対象でないと判断した場合には、実行CPU決定部7は、CPUプロセス情報格納部14における回避対象のリソースに対応するテーブルのうち、待ち時間情報が最短であるプロセスが動作するCPUに集約させることを決定し、その実行キュー3への接続依頼を実行キュー接続部4に送信する(ステップS9)。   If it is determined in step S8 that it is not an avoidance target, the execution CPU determination unit 7 operates the process with the shortest waiting time information in the table corresponding to the avoidance target resource in the CPU process information storage unit 14. The CPU decides to consolidate and sends a connection request to the execution queue 3 to the execution queue connection unit 4 (step S9).

また、ステップS8において、回避対象であると判断した場合には、実行CPU決定部7は、過去にリソース競合したことで現在の回避対象であるリソース(現回避対象リソース)の対象値情報と、現在競合しているリソース(回避対象候補リソース)の合計待ち時間情報とを比較する(ステップS10)。   If it is determined in step S8 that the target is an avoidance target, the execution CPU determination unit 7 includes target value information of a resource (current avoidance target resource) that is a current avoidance target due to resource competition in the past, The total waiting time information of currently competing resources (avoidance target candidate resources) is compared (step S10).

そして、実行CPU決定部7は、回避対象候補リソースの合計待ち時間が、現回避対象リソースの対象値以上であるか否かを判断する(ステップS11)。
ステップS11において、回避対象候補リソースの合計待ち時間が、現回避対象リソースの対象値以上でないと判断した場合には、前述したステップS4に進む。
Then, the execution CPU determination unit 7 determines whether or not the total waiting time of the avoidance target candidate resource is equal to or greater than the target value of the current avoidance target resource (step S11).
If it is determined in step S11 that the total waiting time of the avoidance target candidate resource is not equal to or greater than the target value of the current avoidance target resource, the process proceeds to step S4 described above.

ステップS11において、回避対象候補リソースの合計待ち時間が、現回避対象リソースの対象値以上であると判断した場合には、前述したステップS9に進む。なお、この場合には、実行CPU決定部7が回避対象特定部13に判定結果を出力し、回避対象特定部13が、リソース排他情報格納部11における、現回避対象リソースに対応する回避対象情報及び対象値情報を削除し、回避対象候補リソースに対応する回避対象情報及び対象値情報に所定の情報を記録することになる。   If it is determined in step S11 that the total waiting time of the avoidance target candidate resource is equal to or greater than the target value of the current avoidance target resource, the process proceeds to step S9 described above. In this case, the execution CPU determination unit 7 outputs a determination result to the avoidance target specifying unit 13, and the avoidance target specifying unit 13 in the resource exclusion information storage unit 11 avoids the avoidance target information corresponding to the current avoidance target resource. The target value information is deleted, and predetermined information is recorded in the avoidance target information and target value information corresponding to the avoidance target candidate resource.

以上のように、本実施形態に係るマルチプロセッサシステム100は、リソースの開放待ちに伴う処理を削減し、その分のCPU資源を別のプロセスの処理に割り当てることができ、システムの処理効率を向上させることができるという作用効果を奏する。   As described above, the multiprocessor system 100 according to the present embodiment can reduce processing associated with resource release waiting, and can allocate the CPU resources accordingly to processing of another process, improving the processing efficiency of the system. The effect that it can be made is produced.

また、本実施形態に係るマルチプロセッサシステム100は、プロセスが次にCPUの実行権を握る前の段階、つまり、プロセス起床され実行キュー3で待ち状態に入る時点において、リソース競合を予測した回避操作(実行キュー移動等)を事前に行なうために、恒久的な競合回避が望めるうえに、プロセス動作中に割込み等で強制タスクスイッチングを行なう必要も無く、オーバーヘッドによる処理能力の低下を最小限に抑制することができるという作用効果を奏する。   In addition, the multiprocessor system 100 according to the present embodiment enables the avoidance operation in which resource contention is predicted at the stage before the process next acquires the execution right of the CPU, that is, at the time when the process wakes up and enters the wait state in the execution queue 3 (Execution queue movement, etc.) can be performed in advance, and it is possible to avoid permanent conflicts. In addition, there is no need to perform forced task switching by interrupts during process operation, minimizing processing capacity degradation due to overhead. There is an effect that it can be performed.

また、本実施形態に係るマルチプロセッサシステム100は、CPUの浪費に関係するリソースを特定したうえで、そのリソースを使用するプロセスをターゲットとしたリソース競合の回避が行なえるため、競合対象であるリソースと無関係なプロセスへの影響を抑制することができるという作用効果を奏する。   Further, since the multiprocessor system 100 according to the present embodiment can identify a resource related to CPU waste and avoid resource conflict targeting a process that uses the resource, the resource that is the target of competition There is an effect that the influence on the process unrelated to the process can be suppressed.

なお、本実施形態に係るマルチプロセッサシステム100においては、リソース排他情報格納部11におけるリソース競合の回避対象とするリソースの設定を一つにしているが、これに限られるものではない。   In the multiprocessor system 100 according to the present embodiment, the resource exclusion target in the resource exclusion information storage unit 11 is set to one resource, but the present invention is not limited to this.

例えば、マルチプロセッサシステム100に使用されるリソースの数に応じて、所定の数以下のリソースを回避対象とし、回避対象情報を記録し、合計待ち時間を対象値情報として記録してもよい。   For example, depending on the number of resources used in the multiprocessor system 100, a predetermined number of resources or less may be targeted for avoidance, the avoidance target information may be recorded, and the total waiting time may be recorded as target value information.

この場合に、新たに発生した回避対象となるべきリソース(回避対象候補リソース)をリソース排他情報格納部11に記録することにより、回避対象が所定の数を超えることになるときは、リソース排他情報格納部11に記録されている回避対象のリソース(現回避対象リソース)に対応する対象値のうちの最小の対象値と、回避対象候補リソースに対応する合計待ち時間とを比較する。   In this case, when the resource to be avoided (candidate resource to be avoided) newly recorded is recorded in the resource exclusion information storage unit 11 and the avoidance target exceeds a predetermined number, the resource exclusion information The minimum target value among the target values corresponding to the avoidance target resource (current avoidance target resource) recorded in the storage unit 11 is compared with the total waiting time corresponding to the avoidance target candidate resource.

そして、回避対象候補リソースに対応する合計待ち時間が、現回避対象リソースに対応する対象値のうちの最小の対象値を超えている場合に、当該最小の対象値情報及び対応する回避対象情報を削除し、回避対象候補リソースに対応する回避対象情報及び対象値情報に所定の情報を記録することになる。   When the total waiting time corresponding to the avoidance target candidate resource exceeds the minimum target value among the target values corresponding to the current avoidance target resource, the minimum target value information and the corresponding avoidance target information are The predetermined information is recorded in the avoidance target information and target value information corresponding to the avoidance target candidate resource.

また、本実施形態に係るマルチプロセッサシステム100においては、実行CPU決定部7により、各プロセスの起床にあたり、当該各プロセスが回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、起床される各プロセスに対して、複数のCPUのうち、一のCPUを割り当てるものであるが、実行CPU決定部7の替わりに回避対象特定部13に、当該機能を持たせてもよい。   In the multiprocessor system 100 according to the present embodiment, the execution CPU determination unit 7 determines whether each process is a process that uses a resource to be avoided when the process is woken up. Based on this, one CPU among a plurality of CPUs is assigned to each process to be woken up. However, the avoidance target specifying unit 13 may have the function instead of the execution CPU determining unit 7. .

(本発明の第2の実施形態)
図9は第2の実施形態に係るマルチプロセッサシステムの主要な構成を示す概略図、図10(a)はプロセス実行格納部に記録される情報の一例を示す説明図、図10(b)はリソース排他情報格納部に記録される情報の一例を示す説明図、図10(c)はCPUプロセス情報格納部に記録される情報の一例を示す説明図である。図9及び図10において、図1〜図8と同じ符号は、同一又は相当部分を示し、その説明を省略する。
(Second embodiment of the present invention)
FIG. 9 is a schematic diagram showing the main configuration of the multiprocessor system according to the second embodiment, FIG. 10A is an explanatory diagram showing an example of information recorded in the process execution storage unit, and FIG. FIG. 10C is an explanatory diagram illustrating an example of information recorded in the CPU process information storage unit. 9 and 10, the same reference numerals as those in FIGS. 1 to 8 denote the same or corresponding parts, and the description thereof is omitted.

平均待ち時間算出部10aは、排他情報収集部9からのリソースID及び待ち時間情報に基づき、リソースIDのリソース毎に合計待ち時間を算出し、リソースIDにおけるリソース毎の個数を積算して各リソースの使用回数を算出する。また、平均待ち時間算出部10aは、合計待ち時間に対して使用回数を除算した平均の待ち時間(以下、平均待ち時間と称す)を算出して、リソースIDのリソース毎に当該平均待ち時間及び使用回数をリソース排他情報格納部11aに更新(新規は記録)する。   The average waiting time calculating unit 10a calculates a total waiting time for each resource of the resource ID based on the resource ID and the waiting time information from the exclusive information collecting unit 9, and adds the number of each resource in the resource ID to each resource. Calculate the number of uses of. In addition, the average waiting time calculating unit 10a calculates an average waiting time (hereinafter referred to as an average waiting time) obtained by dividing the number of times of use with respect to the total waiting time, and calculates the average waiting time for each resource of the resource ID. The number of uses is updated (newly recorded) in the resource exclusion information storage unit 11a.

リソース排他情報格納部11aは、例えば、図10(b)に示すように、平均待ち時間の情報(以下、平均待ち時間情報と称す)、使用回数の情報、当該平均待ち時間が所定の基準値を超えたリソースに対して回避対象のリソースとして識別する情報(以下、回避対象情報と称す)、及び、当該回避対象のリソースに対応する平均待ち時間を対象値とする対象値の情報(以下、対象値情報と称す)を、リソースIDのリソース毎に対応付けて格納する。なお、所定の基準値は、システム環境によってチューニングされ、例えば、リアルタイム性が要求されるマルチプロセッサシステム100においては、msec〜μsec単位での設定が想定される。   For example, as shown in FIG. 10B, the resource exclusion information storage unit 11a has information on average waiting time (hereinafter referred to as average waiting time information), information on the number of uses, and the average waiting time being a predetermined reference value. Information that identifies a resource that has been exceeded as a avoidance target resource (hereinafter referred to as avoidance target information), and target value information that has an average waiting time corresponding to the avoidance target resource as a target value (hereinafter, Are stored in association with each resource of the resource ID. The predetermined reference value is tuned according to the system environment. For example, in the multiprocessor system 100 that requires real-time performance, a setting in units of msec to μsec is assumed.

例えば、基準値を100msecに設定した場合に、図10(a)(図2(a))に示す情報においては、リソースαが時刻T1から時刻T4までの間に3回使用され、合計待ち時間が360msecであることから、平均待ち時間は120msecとなり、基準値を上回っているために、リソースαがリソース競合の回避対象となる。   For example, when the reference value is set to 100 msec, in the information shown in FIG. 10A (FIG. 2A), the resource α is used three times from time T1 to time T4, and the total waiting time Is 360 msec, the average waiting time is 120 msec, which exceeds the reference value, so that the resource α is a target for avoiding resource contention.

競合検知部12aは、リソース排他情報格納部11aに記録される平均待ち時間情報に基づき、平均待ち時間が所定の基準値を超えたことを検知して、回避対象特定部13aに検知結果を出力する。   The conflict detection unit 12a detects that the average waiting time exceeds a predetermined reference value based on the average waiting time information recorded in the resource exclusion information storage unit 11a, and outputs the detection result to the avoidance target specifying unit 13a. To do.

回避対象特定部13aは、リソース排他情報格納部11aのリソースIDにおける、平均待ち時間が所定の基準値を超えたリソースに対して、回避対象情報を記録し、平均待ち時間を対象値情報として記録する。   The avoidance target specifying unit 13a records avoidance target information for the resource whose average waiting time exceeds a predetermined reference value in the resource ID of the resource exclusion information storage unit 11a, and records the average waiting time as target value information. To do.

なお、本実施形態においては、回避対象のリソースを一つとし、リソース排他情報格納部11aの回避対象及び対象値の欄に対して初期段階で情報を記録する場合であり、平均待ち時間が所定の基準値を超えたリソースが複数存在する場合には、平均待ち時間が最長である一のリソースに対して、回避対象情報及び対象値情報を記録する。   In this embodiment, there is one resource to be avoided, and information is recorded in the initial stage for the avoidance target and target value columns of the resource exclusion information storage unit 11a, and the average waiting time is predetermined. When there are a plurality of resources exceeding the reference value, the avoidance target information and the target value information are recorded for the one resource having the longest average waiting time.

また、リソース排他情報格納部11aの回避対象及び対象値の欄に記録された情報は、回避対象のリソースを使用するプロセスが、その後、他のリソースを使用することになり、当該他のリソースの平均待ち時間が、当該回避対象のリソースの対象値を超えるまでは、保持するものである。   In addition, the information recorded in the avoidance target and target value fields of the resource exclusion information storage unit 11a indicates that the process using the avoidance target resource then uses another resource, and the other resource's This is held until the average waiting time exceeds the target value of the resource to be avoided.

なお、この第2の実施形態に係るマルチプロセッサシステム100においては、合計待ち時間算出部10の替わりに、平均待ち時間算出部10aを備えているところのみが第1の実施形態と異なるところであり、平均待ち時間算出部10aによる作用効果以外は、第1の実施形態と同様の作用効果を奏する。   The multiprocessor system 100 according to the second embodiment differs from the first embodiment only in that an average waiting time calculation unit 10a is provided instead of the total waiting time calculation unit 10. Except for the operational effects of the average waiting time calculation unit 10a, the same operational effects as those of the first embodiment are obtained.

前述した第1の実施形態においては、あるリソースに関して、通常はリソース開放の待ち時間が短いのであるが、特定の監視周期にだけ突発的に長い待ち時間が発生し、合計待ち時間が基準値を超えた場合に、このリソースがリソース競合の回避対象となるのであるが、処理効率の向上は僅かである。   In the first embodiment described above, the waiting time for resource release is usually short for a certain resource, but a long waiting time occurs suddenly only in a specific monitoring period, and the total waiting time becomes the reference value. If it exceeds, this resource becomes a target for avoiding resource contention, but the improvement in processing efficiency is slight.

これに対し、本実施形態においては、リソース排他情報格納部11aに平均待ち時間情報を保持させ、この平均待ち時間情報に基づき、リソース競合の回避対象のリソースを特定する。これにより、本実施形態に係るマルチプロセッサシステム100は、正確な競合状態をリアルタイムに把握し、リソース開放の待ち時間に毎回比較的長い時間がかかるリソースを優先して、リソース競合の回避対象とするように制御することができ、第1の実施形態と比較して、一層の処理効率の向上を図ることができるという作用効果を奏する。   On the other hand, in the present embodiment, the resource exclusion information storage unit 11a holds the average waiting time information, and the resource that is the resource conflict avoidance target is specified based on the average waiting time information. As a result, the multiprocessor system 100 according to the present embodiment grasps an accurate contention state in real time, gives priority to a resource that takes a relatively long time for the waiting time for resource release, and makes it a target for avoiding resource contention. As compared with the first embodiment, there is an effect that the processing efficiency can be further improved.

(本発明の第3の実施形態)
図11は第3の実施形態に係るマルチプロセッサシステムのプロセス実行格納部の更新手順を示すシーケンス図、図12は第3の実施形態に係るマルチプロセッサシステムにおけるプロセス起床時の競合回避の手順を示すフローチャートである。図11及び図12において、図1〜図10と同じ符号は、同一又は相当部分を示し、その説明を省略する。
(Third embodiment of the present invention)
FIG. 11 is a sequence diagram showing a procedure for updating the process execution storage unit of the multiprocessor system according to the third embodiment. FIG. 12 shows a procedure for avoiding contention when the process wakes up in the multiprocessor system according to the third embodiment. It is a flowchart. 11 and 12, the same reference numerals as those in FIGS. 1 to 10 denote the same or corresponding parts, and the description thereof is omitted.

本実施形態においては、前提条件として、マルチプロセッサシステム100の利用者がシステムコール(sched-setaffinity等)等を使用して、一部のプロセスを動作させるCPUを固定で割り付け運用している場合を想定する。例えば、プロセスBがCPU#1で固定に動作するように割り付け設定を行なう場合には、メモリ内に存在するプロセス情報には、プロセスBがCPU#1に割り付いたことを示すフラグが記録されている。   In the present embodiment, as a precondition, a user of the multiprocessor system 100 uses a system call (sched-setaffinity, etc.) or the like to allocate and operate CPUs that operate some processes in a fixed manner. Suppose. For example, when the allocation setting is performed so that the process B is fixedly operated by the CPU # 1, a flag indicating that the process B is allocated to the CPU # 1 is recorded in the process information existing in the memory. ing.

なお、図11は、図5におけるステップS204とステップS205との間に、新たなステップS204aを追加したものであり、図12は、図8におけるステップS11とステップS9との間に、新たなステップS11aを追加したものである。   11 is obtained by adding a new step S204a between step S204 and step S205 in FIG. 5. FIG. 12 shows a new step between step S11 and step S9 in FIG. S11a is added.

このステップS204a及びS11aにおいて、実行CPU決定部7は、メモリ内のプロセス情報を参照し、回避対象のリソースに対応するCPUのうち、最短の待ち時間に対応するCPU以外のCPUが、特定のプロセスを動作させるCPUとして固定で割り付けられているか否かを判断する。そして、実行CPU決定部7は、固定で割り付けられていると判断した場合には、最短の待ち時間に対応するCPUの替わりに、固定で割り付けられたCPUを、起床されるプロセスに対して割り当てる。また、実行CPU決定部7は、固定で割り付けられていないと判断した場合には、最短の待ち時間に対応するCPUを、起床されるプロセスに対して割り当てる。   In steps S204a and S11a, the execution CPU determination unit 7 refers to the process information in the memory, and CPUs other than the CPU corresponding to the shortest waiting time among CPUs corresponding to the resources to be avoided are specified processes. It is determined whether or not the CPU is fixed and assigned. If the execution CPU determining unit 7 determines that the fixed allocation is performed, the fixed CPU is allocated to the process to be woken up instead of the CPU corresponding to the shortest waiting time. . If the execution CPU determination unit 7 determines that the fixed CPU is not allocated, the CPU corresponding to the shortest waiting time is allocated to the process to be woken up.

なお、この第3の実施形態に係るマルチプロセッサシステム100においては、一部のプロセスを動作させるCPUを固定で割り付け運用しているところのみが第1の実施形態と異なるところであり、この運用による作用効果以外は、第1の実施形態と同様の作用効果を奏する。   Note that the multiprocessor system 100 according to the third embodiment differs from the first embodiment only in that CPUs for operating some processes are fixedly allocated and operated. Except for the effects, the same effects as those of the first embodiment are obtained.

前述した第1の実施形態においては、リソースαを使用するプロセスA〜Cのうち、待ち時間が最も短いプロセスAが動作するCPU#2に、他のプロセス(プロセスB、プロセスC)を集約するように、CPU#2の実行キュー3に対して、プロセスAの他に、プロセスB及びプロセスCも接続していた。
これに対し、本実施形態においては、プロセスBが固定に割り付けられているCPU#1に、他のプロセス(プロセスB、プロセスC)を集約するように動作する。
In the first embodiment described above, the other processes (process B and process C) are aggregated in the CPU # 2 in which the process A with the shortest waiting time among the processes A to C using the resource α is operating. As described above, in addition to the process A, the process B and the process C are connected to the execution queue 3 of the CPU # 2.
On the other hand, in the present embodiment, the operation is performed so that the other processes (process B and process C) are concentrated on the CPU # 1 to which the process B is fixedly assigned.

すなわち、起床させるプロセスが、プロセスBである場合には、前回と同じCPU#1の実行キュー3にプロセスBが接続され、起床させるプロセスが、プロセスA又はプロセスCである場合にも、プロセスBと同じCPU#1の実行キュー3にプロセスA又はプロセスCが接続される。なお、回避対象のリソースαに直接関係しない他のプロセスの起床に関しては、前述した第1の実施形態と同様に、既存のスケジューリング動作に従うことになる。   That is, when the process to be woken up is process B, process B is connected to the execution queue 3 of the same CPU # 1 as the previous time, and the process to be woken up is process A or process C. Process A or Process C is connected to the execution queue 3 of the same CPU # 1. As for the wake-up of other processes not directly related to the avoidance target resource α, the existing scheduling operation is followed as in the first embodiment described above.

これにより、本実施形態に係るマルチプロセッサシステム100においては、動作CPUが固定されているプロセスが存在する場合であっても、CPUの固定動作に極力影響を与えることなく、リソース開放の待ち状態を回避し、待ち時間の削減を実現して、システムの処理効率を向上させることができるという作用効果を奏する。また、本実施形態に係るマルチプロセッサシステム100おいては、即時性等を考慮した、よりきめ細かい運用設計に反映可能なプロセスの運用を実現することができるという作用効果を奏する。   As a result, in the multiprocessor system 100 according to the present embodiment, even when there is a process in which the operating CPU is fixed, the waiting state for resource release is maintained without affecting the fixed operation of the CPU as much as possible. This avoids the waiting time and achieves the effect of reducing the waiting time and improving the processing efficiency of the system. In addition, the multiprocessor system 100 according to the present embodiment has an effect that it is possible to realize operation of a process that can be reflected in a more detailed operation design in consideration of immediacy.

第1の実施形態に係るマルチプロセッサシステムの主要な構成を示す概略図である。It is the schematic which shows the main structures of the multiprocessor system which concerns on 1st Embodiment. (a)はプロセス実行格納部に記録される情報の一例を示す説明図であり、(b)はリソース排他情報格納部に記録される情報の一例を示す説明図であり、(c)はCPUプロセス情報格納部に記録される情報の一例を示す説明図である。(A) is explanatory drawing which shows an example of the information recorded on a process execution storage part, (b) is explanatory drawing which shows an example of the information recorded on a resource exclusive information storage part, (c) is CPU It is explanatory drawing which shows an example of the information recorded on a process information storage part. マルチプロセッサシステムにおける競合回避前のプロセス稼動例を示す説明図である。It is explanatory drawing which shows the process operation example before the conflict avoidance in a multiprocessor system. リソース排他情報格納部及びCPUプロセス情報格納部の更新手順を示すシーケンス図である。It is a sequence diagram which shows the update procedure of a resource exclusive information storage part and a CPU process information storage part. プロセス実行格納部の更新手順を示すシーケンス図である。It is a sequence diagram which shows the update procedure of a process execution storage part. マルチプロセッサシステムにおける競合回避後のプロセス稼動例を示す説明図である。It is explanatory drawing which shows the process operation example after the conflict avoidance in a multiprocessor system. (a)はプロセス実行格納部に記録される情報の他の例を示す説明図であり、(b)はリソース排他情報格納部に記録される情報の他の例を示す説明図であり、(c)はCPUプロセス情報格納部に記録される情報の他の例を示す説明図である。(A) is explanatory drawing which shows the other example of the information recorded on a process execution storage part, (b) is explanatory drawing which shows the other example of the information recorded on a resource exclusive information storage part, ( (c) is explanatory drawing which shows the other example of the information recorded on CPU process information storage part. マルチプロセッサシステムにおけるプロセス起床時の競合回避の手順を示すフローチャートである。It is a flowchart which shows the procedure of the conflict avoidance at the time of process wakeup in a multiprocessor system. 第2の実施形態に係るマルチプロセッサシステムの主要な構成を示す概略図である。It is the schematic which shows the main structures of the multiprocessor system which concerns on 2nd Embodiment. (a)はプロセス実行格納部に記録される情報の一例を示す説明図であり、(b)はリソース排他情報格納部に記録される情報の一例を示す説明図であり、(c)はCPUプロセス情報格納部に記録される情報の一例を示す説明図である。(A) is explanatory drawing which shows an example of the information recorded on a process execution storage part, (b) is explanatory drawing which shows an example of the information recorded on a resource exclusive information storage part, (c) is CPU It is explanatory drawing which shows an example of the information recorded on a process information storage part. 第3の実施形態に係るマルチプロセッサシステムのプロセス実行格納部の更新手順を示すシーケンス図であるIt is a sequence diagram which shows the update procedure of the process execution storage part of the multiprocessor system which concerns on 3rd Embodiment. 第3の実施形態に係るマルチプロセッサシステムにおけるプロセス起床時の競合回避の手順を示すフローチャートである。10 is a flowchart illustrating a procedure for avoiding contention when waking up a process in a multiprocessor system according to a third embodiment.

符号の説明Explanation of symbols

1 プロセス起床部
2 待ちキュー
3 実行キュー
4 実行キュー接続部
5 プロセッサ
6 休止プロセス
7 実行CPU決定部
8 プロセス実行格納部
9 排他情報収集部
10 合計待ち時間算出部
10a 平均待ち時間算出部
11,11a リソース排他情報格納部
12,12a 競合検知部
13,13a 回避対象特定部
14 CPUプロセス情報格納部
100 マルチプロセッサシステム
DESCRIPTION OF SYMBOLS 1 Process wake-up part 2 Wait queue 3 Execution queue 4 Execution queue connection part 5 Processor 6 Pause process 7 Execution CPU determination part 8 Process execution storage part 9 Exclusive information collection part 10 Total waiting time calculation part 10a Average waiting time calculation part 11, 11a Resource exclusion information storage unit 12, 12a Conflict detection unit 13, 13a Avoidance target identification unit 14 CPU process information storage unit 100 Multiprocessor system

Claims (5)

複数のプロセッサのうち一のプロセッサの実行権を占有して動作するプロセスが、任意のリソースを使用し、当該複数のプロセッサによる並列処理を実行するマルチプロセッサを備えたマルチプロセッサシステムにおいて、
前記複数のプロセッサのうち一のプロセッサ上で動作する一のプロセスがリソースを使用している場合に、他のプロセッサ上で動作する他のプロセスが当該使用されているリソースに対するロックの要求及び/又はロックの要求後の待ち時間に基づいて、リソースの競合を検知する競合検知部と、
前記検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する回避対象特定部と、
各プロセスの起床にあたり、当該各プロセスが前記回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、前記起床される各プロセスに対して、前記複数のプロセッサのうち、一のプロセッサを割り当てる実行プロセッサ決定部と、
前記待ち時間に基づき、リソース毎に当該待ち時間を積算する合計待ち時間算出部と、
リソース毎のテーブルを有し、当該各テーブルのリソースに対応するプロセッサ情報及び待ち時間情報を格納する情報格納部と、
を備え、
前記回避対象特定部が、前記合計待ち時間算出部によるリソース毎の積算結果に基づき、合計待ち時間が所定の基準値を超えたリソースを回避対象のリソースとして特定し、
前記実行プロセッサ決定部は、前記特定された回避対象のリソースに基づき、前記起床されるプロセスが使用するリソースに対して当該プロセスが回避対象のリソースを使用するプロセスであるかを判断し、当該起床されるプロセスが回避対象のリソースを使用する場合に、当該回避対象のリソースに対応する待ち時間のうち、前記情報格納部に格納される所定の待ち時間に対応するプロセッサを、当該起床されるプロセスに対して割り当てることを特徴とするマルチプロセッサシステム。
In a multiprocessor system including a multiprocessor in which a process that occupies the execution right of one of a plurality of processors uses an arbitrary resource and performs parallel processing by the plurality of processors,
When one process operating on one of the plurality of processors uses a resource, another process operating on another processor requests a lock on the resource being used and / or A contention detection unit that detects resource contention based on the waiting time after a lock request;
An avoidance target identifying unit that identifies a resource that is a conflict target in the detected resource conflict as an avoidance target to avoid resource conflict;
When each process is woken up, it is determined whether each process is a process that uses the avoidance target resource, and one of the plurality of processors is selected for each process to be woken up based on the determination result. An execution processor determination unit to which
Based on the waiting time, a total waiting time calculating unit that accumulates the waiting time for each resource;
An information storage unit having a table for each resource and storing processor information and waiting time information corresponding to the resource of each table;
With
The avoidance target specifying unit specifies a resource whose total waiting time exceeds a predetermined reference value as a resource to be avoided based on the accumulation result for each resource by the total waiting time calculating unit,
The execution processor determination unit determines whether the process is a process using the avoidance target resource with respect to the resource used by the process to be woken up based on the identified avoidance target resource. When the process to be avoided uses the avoidance target resource, the process corresponding to the predetermined waiting time stored in the information storage unit among the waiting time corresponding to the avoidance target resource A multiprocessor system characterized by assigning to
複数のプロセッサのうち一のプロセッサの実行権を占有して動作するプロセスが、任意のリソースを使用し、当該複数のプロセッサによる並列処理を実行するマルチプロセッサを備えたマルチプロセッサシステムにおいて、
前記複数のプロセッサのうち一のプロセッサ上で動作する一のプロセスがリソースを使用している場合に、他のプロセッサ上で動作する他のプロセスが当該使用されているリソースに対するロックの要求及び/又はロックの要求後の待ち時間に基づいて、リソースの競合を検知する競合検知部と、
前記検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する回避対象特定部と、
各プロセスの起床にあたり、当該各プロセスが前記回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、前記起床される各プロセスに対して、前記複数のプロセッサのうち、一のプロセッサを割り当てる実行プロセッサ決定部と、
前記待ち時間に基づき、リソース毎に当該待ち時間の平均時間を算出する平均待ち時間算出部と、
リソース毎のテーブルを有し、当該各テーブルのリソースに対応するプロセッサ情報及び待ち時間情報を格納する情報格納部と、
を備え、
前記回避対象特定部が、前記平均待ち時間算出部によるリソース毎の算出結果に基づき、平均待ち時間が所定の基準値を超えたリソース回避対象のリソースとして特定し、
前記実行プロセッサ決定部は、前記特定された回避対象のリソースに基づき、前記起床されるプロセスが使用するリソースに対して当該プロセスが回避対象のリソースを使用するプロセスであるかを判断し、当該起床されるプロセスが回避対象のリソースを使用する場合に、当該回避対象のリソースに対応する待ち時間のうち、前記情報格納部に格納される所定の待ち時間に対応するプロセッサを、当該起床されるプロセスに対して割り当てることを特徴とするマルチプロセッサシステム。
In a multiprocessor system including a multiprocessor in which a process that occupies the execution right of one of a plurality of processors uses an arbitrary resource and performs parallel processing by the plurality of processors,
When one process operating on one of the plurality of processors uses a resource, another process operating on another processor requests a lock on the resource being used and / or A contention detection unit that detects resource contention based on the waiting time after a lock request;
An avoidance target identifying unit that identifies a resource that is a conflict target in the detected resource conflict as an avoidance target to avoid resource conflict;
When each process is woken up, it is determined whether each process is a process that uses the avoidance target resource, and one of the plurality of processors is selected for each process to be woken up based on the determination result. An execution processor determination unit to which
Based on the waiting time, an average waiting time calculating unit that calculates an average time of the waiting time for each resource ;
An information storage unit having a table for each resource and storing processor information and waiting time information corresponding to the resource of each table;
With
Based on the calculation result for each resource by the average waiting time calculating unit, the avoidance target specifying unit specifies a resource whose average waiting time exceeds a predetermined reference value as a resource to be avoided,
The execution processor determining unit, based on the prior SL avoidance of resource identified, it is determined whether the process that the process uses the avoidance of resources to the resource used by a process to be the wake-up, the When the process to be woken up uses the avoidance target resource, the processor corresponding to the predetermined waiting time stored in the information storage unit among the waiting time corresponding to the avoidance target resource is woken up. A multiprocessor system characterized by assigning to a process.
前記請求項1又は2に記載のマルチプロセッサシステムにおいて、
前記回避対象のリソースを使用するプロセスを動作させるプロセッサのうち、前記所定の待ち時間に対応するプロセッサ以外のプロセッサが、特定のプロセスを動作させるプロセッサとして固定で割り付けられている場合であり、前記起床されるプロセスが回避対象のリソースを使用する場合に、前記実行プロセッサ決定部は、前記所定の待ち時間に対応するプロセッサの替わりに、前記固定で割り付けられたプロセッサを、前記起床されるプロセスに対して割り当てることを特徴とするマルチプロセッサシステム。
In the multiprocessor system according to claim 1 or 2 ,
Among the processors that operate the process that uses the resource to be avoided, a processor other than the processor that corresponds to the predetermined waiting time is fixedly assigned as a processor that operates the specific process, and When the process to be used uses a resource to be avoided, the execution processor determination unit replaces the processor corresponding to the predetermined waiting time with the fixedly allocated processor for the process to be woken up. Multiprocessor system characterized by assigning
複数のプロセッサのうち一のプロセッサの実行権を占有して動作するプロセスが、任意のリソースを使用し、当該複数のプロセッサによる並列処理を実行するマルチプロセッサと、リソース毎のテーブルを有し、当該各テーブルのリソースに対応するプロセッサ情報及び待ち時間情報を格納する情報格納部と、を備えたマルチプロセッサシステムの競合回避方法であって、
前記複数のプロセッサのうち一のプロセッサ上で動作する一のプロセスがリソースを使用している場合に、他のプロセッサ上で動作する他のプロセスが当該使用されているリソースに対するロックの要求及び/又はロックの要求後の待ち時間に基づき、リソース毎に当該待ち時間を積算する合計待ち時間算出ステップと、
前記合計待ち時間算出ステップによるリソース毎の積算結果に基づいて、リソースの競合を検知する競合検知ステップと、
前記検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する回避対象特定ステップと、
各プロセスの起床にあたり、当該各プロセスが前記回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、前記起床される各プロセスに対して、前記複数のプロセッサのうち、一のプロセッサを割り当てる実行プロセッサ決定ステップと
含み、
前記回避対象特定ステップが、前記合計待ち時間算出ステップによるリソース毎の積算結果に基づき、合計待ち時間が所定の基準値を超えたリソースを回避対象のリソースとして特定し、
前記実行プロセッサ決定ステップは、前記特定された回避対象のリソースに基づき、前記起床されるプロセスが使用するリソースに対して当該プロセスが回避対象のリソースを使用するプロセスであるかを判断し、当該起床されるプロセスが回避対象のリソースを使用する場合に、当該回避対象のリソースに対応する待ち時間のうち、前記情報格納部に格納される所定の待ち時間に対応するプロセッサを、当該起床されるプロセスに対して割り当てることを特徴とする競合回避方法。
A process that occupies the execution right of one processor among a plurality of processors uses an arbitrary resource, has a multiprocessor that executes parallel processing by the plurality of processors, a table for each resource, and An information storage unit that stores processor information and waiting time information corresponding to resources of each table, and a conflict avoidance method for a multiprocessor system,
When one process operating on one of the plurality of processors uses a resource, another process operating on another processor requests a lock on the resource being used and / or Based on the waiting time after requesting the lock, a total waiting time calculating step for accumulating the waiting time for each resource,
Based on the integration result for each resource by the total waiting time calculation step , a conflict detection step of detecting resource conflict,
An avoidance target identifying step for identifying a resource that is a conflict target in the detected resource conflict as an avoidance target to avoid resource conflict;
When each process is woken up, it is determined whether each process is a process that uses the avoidance target resource, and one of the plurality of processors is selected for each process to be woken up based on the determination result. and the execution processor determining step of assigning a processor,
It includes,
The avoidance target specifying step specifies a resource whose total waiting time exceeds a predetermined reference value as a resource to be avoided based on the accumulation result for each resource by the total waiting time calculating step,
The execution processor determination step determines whether the process is a process using the avoidance target resource with respect to the resource used by the process to be woken up based on the identified avoidance target resource, and When the process to be avoided uses the avoidance target resource, the process corresponding to the predetermined waiting time stored in the information storage unit among the waiting time corresponding to the avoidance target resource Conflict avoidance method characterized by assigning to
複数のプロセッサのうち一のプロセッサの実行権を占有して動作するプロセスが、任意のリソースを使用し、当該複数のプロセッサによる並列処理を実行するマルチプロセッサと、リソース毎のテーブルを有し、当該各テーブルのリソースに対応するプロセッサ情報及び待ち時間情報を格納する情報格納部と、を備えたマルチプロセッサシステムの競合回避方法であって、
前記複数のプロセッサのうち一のプロセッサ上で動作する一のプロセスがリソースを使用している場合に、他のプロセッサ上で動作する他のプロセスが当該使用されているリソースに対するロックの要求及び/又はロックの要求後の待ち時間に基づき、リソース毎に当該待ち時間の平均時間を算出する平均待ち時間算出ステップと、
前記平均待ち時間算出ステップによるリソース毎の算出結果に基づいて、リソースの競合を検知する競合検知ステップと、
前記検知したリソース競合における競合対象であるリソースを、リソース競合を回避すべき回避対象として特定する回避対象特定ステップと、
各プロセスの起床にあたり、当該各プロセスが前記回避対象のリソースを使用するプロセスであるかを判定し、当該判定結果に基づき、前記起床される各プロセスに対して、前記複数のプロセッサのうち、一のプロセッサを割り当てる実行プロセッサ決定ステップと
含み、
前記回避対象特定ステップが、前記平均待ち時間算出ステップによるリソース毎の算出結果に基づき、平均待ち時間が所定の基準値を超えたリソースを回避対象のリソースとして特定し、
前記実行プロセッサ決定ステップは、前記特定された回避対象のリソースに基づき、前記起床されるプロセスが使用するリソースに対して当該プロセスが回避対象のリソースを使用するプロセスであるかを判断し、当該起床されるプロセスが回避対象のリソースを使用する場合に、当該回避対象のリソースに対応する待ち時間のうち、前記情報格納部に格納される所定の待ち時間に対応するプロセッサを、当該起床されるプロセスに対して割り当てることを特徴とする競合回避方法。
A process that occupies the execution right of one processor among a plurality of processors uses an arbitrary resource, has a multiprocessor that executes parallel processing by the plurality of processors, a table for each resource, and An information storage unit that stores processor information and waiting time information corresponding to resources of each table, and a conflict avoidance method for a multiprocessor system,
When one process operating on one of the plurality of processors uses a resource, another process operating on another processor requests a lock on the resource being used and / or An average waiting time calculating step for calculating an average time of the waiting time for each resource based on the waiting time after the request for the lock ;
Based on the calculation result for each resource by the average waiting time calculation step , a conflict detection step of detecting resource conflict;
An avoidance target identifying step for identifying a resource that is a conflict target in the detected resource conflict as an avoidance target to avoid resource conflict;
When each process is woken up, it is determined whether each process is a process that uses the avoidance target resource, and one of the plurality of processors is selected for each process to be woken up based on the determination result. and the execution processor determining step of assigning a processor,
It includes,
The avoidance target specifying step specifies a resource whose average waiting time exceeds a predetermined reference value as a avoidance target resource based on a calculation result for each resource by the average waiting time calculating step,
The execution processor determination step determines whether the process is a process using the avoidance target resource with respect to the resource used by the process to be woken up based on the identified avoidance target resource, and When a process to be avoided uses a resource to be avoided, a process corresponding to a predetermined waiting time stored in the information storage unit among the waiting times corresponding to the resource to be avoided is set as the process to be woken up. Conflict avoidance method characterized by assigning to
JP2008300896A 2008-11-26 2008-11-26 Multiprocessor system, conflict avoidance program, and conflict avoidance method Expired - Fee Related JP5347451B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008300896A JP5347451B2 (en) 2008-11-26 2008-11-26 Multiprocessor system, conflict avoidance program, and conflict avoidance method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008300896A JP5347451B2 (en) 2008-11-26 2008-11-26 Multiprocessor system, conflict avoidance program, and conflict avoidance method

Publications (2)

Publication Number Publication Date
JP2010128664A JP2010128664A (en) 2010-06-10
JP5347451B2 true JP5347451B2 (en) 2013-11-20

Family

ID=42329026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008300896A Expired - Fee Related JP5347451B2 (en) 2008-11-26 2008-11-26 Multiprocessor system, conflict avoidance program, and conflict avoidance method

Country Status (1)

Country Link
JP (1) JP5347451B2 (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8453150B2 (en) * 2010-06-08 2013-05-28 Advanced Micro Devices, Inc. Multithread application-aware memory scheduling scheme for multi-core processors
JP5655403B2 (en) * 2010-07-13 2015-01-21 富士通株式会社 Multi-core processor system, schedule management program, and computer-readable recording medium recording the program
WO2012032572A1 (en) * 2010-09-08 2012-03-15 株式会社日立製作所 Computing device
JP5150699B2 (en) * 2010-10-05 2013-02-20 株式会社バッファロー Failover information management apparatus, storage processing apparatus, and failover control method
JP5492066B2 (en) * 2010-12-20 2014-05-14 株式会社東芝 Workflow processing system
JP2013149108A (en) * 2012-01-19 2013-08-01 Canon Inc Information processing apparatus, control method therefor, and program
JP6252259B2 (en) * 2014-03-07 2017-12-27 株式会社デンソー Electronic control unit
JP6251417B2 (en) 2014-10-27 2017-12-20 株式会社日立製作所 Storage system and storage control method
US10585800B2 (en) 2017-06-16 2020-03-10 International Business Machines Corporation Reducing cache transfer overhead in a system
CN109783241A (en) * 2018-12-03 2019-05-21 惠州市德赛西威汽车电子股份有限公司 A kind of resource that seizing system seizes collision detection method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02122365A (en) * 1988-10-31 1990-05-10 Hitachi Ltd Processor assignment system
JP2769367B2 (en) * 1989-09-28 1998-06-25 株式会社日立製作所 Multiprocessor scheduling method
JPH1063516A (en) * 1996-08-20 1998-03-06 Nec Corp Method and device for bottleneck detection
JP4453823B2 (en) * 2004-05-31 2010-04-21 日本電気株式会社 Performance bottleneck analysis system and performance bottleneck analysis method

Also Published As

Publication number Publication date
JP2010128664A (en) 2010-06-10

Similar Documents

Publication Publication Date Title
JP5347451B2 (en) Multiprocessor system, conflict avoidance program, and conflict avoidance method
US9823946B2 (en) Processor and program execution method capable of efficient program execution
KR101686010B1 (en) Apparatus for fair scheduling of synchronization in realtime multi-core systems and method of the same
US9588809B2 (en) Resource-based scheduler
US7318128B1 (en) Methods and apparatus for selecting processes for execution
CN108920267B (en) Task processing device
US9448864B2 (en) Method and apparatus for processing message between processors
US9858115B2 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core processor system and related non-transitory computer readable medium
EP1916601A2 (en) Multiprocessor system
US8056083B2 (en) Dividing a computer job into micro-jobs for execution
JP2010271930A (en) Multi-core processor system
JP2009541848A (en) Method, system and apparatus for scheduling computer microjobs to run uninterrupted
JP2011059777A (en) Task scheduling method and multi-core system
US8892819B2 (en) Multi-core system and external input/output bus control method
US20130097382A1 (en) Multi-core processor system, computer product, and control method
JP2008090546A (en) Multiprocessor system
JP5605131B2 (en) Job scheduling program, method, and apparatus
JPWO2009150815A1 (en) Multiprocessor system
JP2013218744A (en) Resource-based scheduler
US9367349B2 (en) Multi-core system and scheduling method
JP2006146758A (en) Computer system
JP2013152636A (en) Information processing device and task scheduling method
JP2005149312A (en) Task management system
JP2008225641A (en) Computer system, interrupt control method and program
JPWO2011161831A1 (en) Multiprocessor system and scheduling method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110808

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121017

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130319

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130520

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130805

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees