[go: up one dir, main page]

JPH0612395A - Task allocating method in multiprocessor system - Google Patents

Task allocating method in multiprocessor system

Info

Publication number
JPH0612395A
JPH0612395A JP17061092A JP17061092A JPH0612395A JP H0612395 A JPH0612395 A JP H0612395A JP 17061092 A JP17061092 A JP 17061092A JP 17061092 A JP17061092 A JP 17061092A JP H0612395 A JPH0612395 A JP H0612395A
Authority
JP
Japan
Prior art keywords
task
cpu
processor
access
hit rate
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.)
Withdrawn
Application number
JP17061092A
Other languages
Japanese (ja)
Inventor
Miyuki Enokida
幸 榎田
Shigeo Suzuki
茂夫 鈴木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP17061092A priority Critical patent/JPH0612395A/en
Publication of JPH0612395A publication Critical patent/JPH0612395A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

PURPOSE:To determine a processor to which a generated task is allocated so that the processing efficiency by the processor is good when the generated task is allocated to the processor. CONSTITUTION:When a cache memory 9 is accessed while a CPU 8 performs processing, an access counter 10 counts the frequency of access. Further, a hit counter 11 counts the frequency of the presence of desired information in the cache memory 9 at the time of access. The rate of the presence of the desired information in the cache memory 9 is obtained from the values of the access counter 10 and hit counter 11. The above-mentioned procedure is performed for all CPUs 8 constituting the system and the task which is newly generated is allocated to the CPU 8 which has the lowest rate.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、例えばCPUの動作状
態を考慮してタスクの割り付けを行なうマルチプロセサ
システムに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a multiprocessor system for allocating tasks in consideration of the operating state of a CPU.

【0002】[0002]

【従来の技術】従来、複数のCPUを有するコンピユー
タシステム(以下マルチプロセサシステムと呼ぶ)で
は、1つのマスタとなるCPUとそれに従属するスレー
ブのCPUとから構成されている場合には、各CPUの
処理内容が決められていた。また、各CPUが同格の場
合には、空いているCPUがあれば新たに実行すべきタ
スクをそこに割り付けていた。このとき、もし全CPU
が処理中であれば、新規に処理すべきタスクの優先順位
と実行中のタスクの優先順位との比較結果から実行タス
クを切り替えたり、比較したタスクの優先順位が同じ場
合には、強制的にいずれかのCPUに割り当て、タイム
シェア方式により複数のタスクを切り替えながら実行す
る様に構成されていた。
2. Description of the Related Art Conventionally, in a computer system having a plurality of CPUs (hereinafter referred to as "multiprocessor system"), when each CPU is composed of one master CPU and slave CPUs subordinate thereto, the processing of each CPU is performed. The content was decided. Further, when the CPUs are of the same rank, if there is a vacant CPU, a task to be newly executed is assigned thereto. At this time, if all CPU
If is being processed, the execution task is switched from the comparison result of the priority of the task to be newly processed and the priority of the task being executed, or if the compared tasks have the same priority, it is forcibly forced. It is configured to be assigned to one of the CPUs and execute while switching a plurality of tasks by a time sharing method.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来例のマスタスレーブ構成のマルチプロセサシステムで
は、あるタスクを実行する場合に、処理内容によるCP
Uの割り当てのために、空いているCPUがあったとし
ても、必ず特定のCPUで実行せねばならないことがあ
る。例えばインタラプト処理のようなタスクの場合に
は、スレーブCPUが空いていても必ずマスタCPUで
処理せねばならず、マスタCPUの負荷が増して、シス
テム全体のスループットが落ちると言う欠点があった。
However, in the multiprocessor system of the master-slave configuration of the above conventional example, when a certain task is executed, the CP depending on the processing content is used.
Due to the allocation of U, even if there is a vacant CPU, it may be necessary to execute it on a specific CPU without fail. For example, in the case of a task such as interrupt processing, there is a drawback that the master CPU must always perform processing even if the slave CPU is free, which increases the load on the master CPU and reduces the overall system throughput.

【0004】一方、各CPUが同格なマルチプロセサシ
ステムにおいて、全CPUが処理を行なっている時に別
のタスクの実行を新たに要求された場合には、実行中の
タスクの優先順位と新規のタスクの優先順位とが同じで
あると、例えば各CPUについているデバイス番号の順
序といった所定の規則に従ってCPUを割り当てる。新
規のタスクは割り当てられたCPU上で既に実行してい
るタスクとタイムシェアして実行される。このため、C
PUの動作状態に関係なく割り当ててしまい、タイムシ
ェア方式によるタスク制御を行なうので、新規タスクの
CPUへの割り付けは処理効率についての考慮がなく、
非効率的な割り当てがなされる得るという欠点があっ
た。
On the other hand, in a multiprocessor system in which each CPU has the same rank, when execution of another task is newly requested while all CPUs are performing processing, the priority order of the task being executed and the new task If the priorities are the same, the CPUs are assigned according to a predetermined rule such as the order of device numbers of each CPU. The new task is executed by time-sharing with the task already executed on the assigned CPU. Therefore, C
Since it is assigned regardless of the operating state of the PU and task control is performed by the time sharing method, the assignment of the new task to the CPU does not consider the processing efficiency.
There was the drawback that inefficient allocation could be done.

【0005】本発明は上記従来例に鑑みてなされたもの
で、CPUの動作状態を参照して、CPUを効率よく使
用できる様にタスクの割りつけを決定できるタスク割り
付け方法を提供することを目的とする。
The present invention has been made in view of the above conventional example, and an object of the present invention is to provide a task allocation method capable of determining task allocation so that the CPU can be used efficiently by referring to the operating state of the CPU. And

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、本発明のマルチプロセサシステムにおけるタスク割
り付け方法は次のような構成からなる。
In order to achieve the above object, a task allocation method in a multiprocessor system of the present invention has the following configuration.

【0007】システムを構成するプロセサ各々について
対となるキャッシュ記憶を備えたマルチプロセサシステ
ムにおいて発生したタスクを前記プロセサに割りつける
タスク割り付け方法であって、前記各プロセサが、前記
対となるキャッシュ記憶へアクセスした回数を数える第
1の計数行程と、前記アクセスにより所望される情報
が、前記対となるキャッシュ記憶に存在している回数を
数える第2の計数行程と、前記第1の計数工程による回
数と前記第2の計数行程による回数とを基に、所望の情
報がキャッシュ記憶に存在しているヒット率を算出する
算出行程と、前記ヒット率を基に前記発生したタスクを
実行するプロセサを選択する選択行程とを備える。
A task allocation method for allocating a task generated in a multiprocessor system having a paired cache memory for each processor constituting the system to the processor, wherein each processor accesses the paired cache memory. A first counting step for counting the number of times, a second counting step for counting the number of times that the information desired by the access exists in the paired cache memory, and a number for the first counting step. Based on the number of times of the second counting step, a calculation step for calculating a hit rate in which desired information exists in the cache memory and a processor for executing the generated task based on the hit rate are selected. And a selection process.

【0008】[0008]

【作用】上記構成により、マルチプロセサシステムを構
成する各プロセサがキャッシュメモリをアクセスした際
の、所望の情報がキャッシュメモリ上に存在している率
を算出し、新たに発生したタスクを割りつけるプロセサ
をその率に応じて決定する。
With the above configuration, a processor that allocates a newly generated task by calculating the rate at which desired information exists in the cache memory when each processor that constitutes the multiprocessor system accesses the cache memory is calculated. Determine according to the rate.

【0009】[0009]

【実施例】【Example】

[実施例1]本発明の第1の実施例の構成を図1に示
す。本実施例では、説明を簡単にするために、CPU部
を2個持ったマルチプロセサシステムを説明する。
[Embodiment 1] FIG. 1 shows the configuration of the first embodiment of the present invention. In this embodiment, a multiprocessor system having two CPU sections will be described for the sake of simplicity.

【0010】<構成>図中1はシステム内のCPUやメ
モリ等の資源を接続するためのシステムバスであり、2
はCPU部A、3はCPU部Bである。4は各CPU部
から共通にアクセスできるメモリ部、5はコマンド等を
入力するためのキーボード、6は同じく入力のためのマ
ウス、7はプログラムやデータを格納するためのディス
ク、15は表示部である。CPU部AとCPU部Bとは
同じ構成をしており、図中、同じ構成要素には同じ番号
をつけてある。CPU部Aについてその構成を説明す
る。
<Structure> In the figure, 1 is a system bus for connecting resources such as CPU and memory in the system, and 2
Is a CPU unit A, and 3 is a CPU unit B. 4 is a memory unit that can be accessed in common by each CPU unit, 5 is a keyboard for inputting commands, 6 is a mouse for inputting, 7 is a disk for storing programs and data, and 15 is a display unit. is there. The CPU section A and the CPU section B have the same configuration, and the same components are designated by the same numbers in the drawings. The configuration of the CPU unit A will be described.

【0011】CPU部Aは、CPU8と、メモリアクセ
スを高速に行なうためにCPU8のローカルなデータを
格納しておくキャッシュメモリ9と、CPU8からのメ
モリアクセス信号16によってキャッシュメモリへのア
クセス回数をカウントするアクセスカウンタ10と、C
PU8からのメモリアクセス要求に対してキャッシュメ
モリ9内に該当データがあったことを意味するヒット信
号12をとり、キャッシュ・ヒット回数をカウントする
ヒットカウンタ11とから構成される。カウンタ10の
値とカウンタ11の値とはシステムバス1上にマッピン
グされ、各CPUからアクセスできる様にされている。
キャッシュメモリ9は、CPU8からのメモリアクセス
要求に対してデータが存在していればヒット信号12を
出し、その値をCPU1に出力する。もし存在していな
ければキャッシュメモリ9はヒット信号12を出さず、
メモリ4またはディスク7から該当するデータをキャッ
シュメモリ9にローディングし、CPU8に求められた
データを返す。またアクセスカウンタ10とヒットカウ
ンタ11とは、CPUに新しいタスクを割り付けた時に
共に0にクリアされ、図示していない各CPU部のタイ
マ等の手段により、所定時間経過ごとに0クリアされ
る。
The CPU section A counts the number of accesses to the cache memory by a CPU 8, a cache memory 9 for storing local data of the CPU 8 for high-speed memory access, and a memory access signal 16 from the CPU 8. Access counter 10 and C
In response to a memory access request from the PU 8, a hit signal 12 indicating that there is corresponding data in the cache memory 9 is taken, and a hit counter 11 for counting the number of cache hits is configured. The value of the counter 10 and the value of the counter 11 are mapped on the system bus 1 so that each CPU can access them.
The cache memory 9 issues a hit signal 12 if data exists in response to a memory access request from the CPU 8 and outputs the value to the CPU 1. If it does not exist, the cache memory 9 does not output the hit signal 12,
The corresponding data is loaded from the memory 4 or the disk 7 into the cache memory 9, and the requested data is returned to the CPU 8. The access counter 10 and the hit counter 11 are both cleared to 0 when a new task is assigned to the CPU, and are cleared to 0 each time a predetermined time elapses by means such as a timer of each CPU unit (not shown).

【0012】<タスクの割り付け>以上のような構成の
マルチプロセサシステムにおいて、CPU部Aでタスク
Aが、CPU部BでタスクBが実行されている時に、キ
ーボード5やマウス6からの入力でユーザが要求によ
り、あるいは、図示しない外部からの割込みにより新た
にタスクCを実行しなければならない場合を考える。
<Assignment of Tasks> In the multiprocessor system having the above-mentioned configuration, when the task A is executed by the CPU A and the task B is executed by the CPU B, the user can input by the keyboard 5 or the mouse 6. Consider a case in which task C must be newly executed by a request or by an external interrupt (not shown).

【0013】図2にタスクAとタスクBの各カウンタの
変化例を示す。図2によれば、20は、時刻t1 におけ
るCPU部Aのアクセスカウンタ10が100、ヒット
カウンタ11が50であることを示し、ヒット率は50
/100=50%であることが分かる。同様にCPU部
Bのヒット率は50/150≒33%である。更に時間
が経過し、新たなタスクCの実行要求が発生した時の処
理を、図6のフローチャートを参照して説明する。
FIG. 2 shows an example of changes in the counters of task A and task B. According to FIG. 2, 20 indicates that the access counter 10 and the hit counter 11 of the CPU unit A at time t 1 are 100 and 50, respectively, and the hit rate is 50.
It can be seen that / 100 = 50%. Similarly, the hit rate of the CPU section B is 50 / 150≈33%. The processing when a further time elapses and a new task C execution request is generated will be described with reference to the flowchart of FIG.

【0014】時刻t2 にタスクCの実行要求が発生する
と、まずその時点で遊んでいるCPUの有無をテスト
し、空いているCPUがあればそのCPUで新たに発生
したタスクを実行する。すべてのCPU(この場合CP
U部AとCPU部B)で何らかのタスクが処理されてい
るなら、それらの中から最適なCPUを選び出さねばな
らない。
When a task C execution request is issued at time t 2 , the presence / absence of a CPU that is idle at that time is tested, and if there is a free CPU, the newly generated task is executed by that CPU. All CPUs (in this case CP
If some tasks are processed in U section A and CPU section B), the optimum CPU must be selected from them.

【0015】まず、CPU部AのCPU8がアクセスカ
ウンタ10とヒットカウンタ11の値を読み(S601
・S602)、ヒット率を計算する(S603)。CP
U部Aでのキャッシュ・ヒット率は表より150/20
0=75%となる。この値はキャッシュメモリ9に格納
しておき、次にCPU部Bについてヒット率を計算する
(S604−NO)。CPU部Aと同じ要領で計算する
と、CPU部2のキャッシュヒット率は270/300
=90%となり、これもキャッシュメモリ9に格納して
おく。これですべてのCPUについてヒット率の計算が
済んだ(S604−YES)。次に各CPU部のヒット
率75%と90%とを比較し、小さいヒット率の方を新
規タスクを割り当てるCPUと決定する(S605)。
最後に小さいヒット率のCPUすなわちCPU部Aにタ
スクCを割り付ける(S606)。これは、キャッシュ
ヒット率の高い方では、キャッシュメモリへの外部の記
憶装置からの読み込みが少なく、より高い効率でCPU
が稼働している。一方ヒット率の低い方ではキャッシュ
メモリへの外部記憶からのロードがより頻繁であるた
め、複数のタスクをタイムシェアして実行する際のオー
バーヘッドがヒット率のより高いものほどには全体の処
理効率に影響を与えない。このため、高効率の方を優先
して処理を進められるように、ヒット率の低いCPUへ
と新たなタスクを割りつける。
First, the CPU 8 of the CPU section A reads the values of the access counter 10 and the hit counter 11 (S601).
-S602), the hit rate is calculated (S603). CP
The cache hit rate in U part A is 150/20 from the table
0 = 75%. This value is stored in the cache memory 9, and then the hit rate is calculated for the CPU B (S604-NO). When calculated in the same manner as the CPU unit A, the cache hit rate of the CPU unit 2 is 270/300.
= 90%, which is also stored in the cache memory 9. This completes the calculation of the hit rate for all CPUs (S604-YES). Next, the hit rates of 75% and 90% of each CPU unit are compared, and the smaller hit rate is determined as the CPU to which the new task is assigned (S605).
Finally, the task C is assigned to the CPU having a small hit rate, that is, the CPU unit A (S606). This means that if the cache hit rate is higher, the read from the external storage device to the cache memory is less and the CPU is more efficient.
Is running. On the other hand, when the hit rate is low, the load from the external storage to the cache memory is more frequent, so the overhead when executing multiple tasks by time sharing is higher the overall processing efficiency when the hit rate is higher. Does not affect For this reason, a new task is assigned to a CPU with a low hit rate so that processing with higher efficiency can be prioritized.

【0016】これにより、CPU部AはタスクAとタス
クCを各タスクの優先順位によりタイムシェア方式によ
り実行し、CPU部BはそのままタスクBを実行する。
As a result, the CPU unit A executes the tasks A and C by the time-sharing method according to the priority of each task, and the CPU unit B executes the task B as it is.

【0017】[0017]

【他の実施例】第1の実施例では、各CPU部がタスク
を1つずつ実行している場合を説明したが、本実施例で
は、各CPU部が既に複数のタスクを実行している場合
を考えてみる。この場合には、CPU部AでタスクAと
タスクBとが、CPU部BでタスクCとタスクDとが実
行されているものとし、ここにタスクEの実行要求が発
生した場合を説明する。
Other Embodiments In the first embodiment, the case where each CPU unit executes one task at a time has been described, but in this embodiment, each CPU unit has already executed a plurality of tasks. Consider the case. In this case, it is assumed that the task A and the task B are being executed in the CPU unit A, and the task C and the task D are being executed in the CPU unit B, and a case in which an execution request for the task E is generated will be described.

【0018】[実施例2]第2の実施例では、各CPU
部で現在いくつのタスクが実行中であるかを意識しない
で、各PCU部ごとのキャッシュ・ヒット率に従って、
どのCPUにタスクEを割り付けるかを決定する方法を
説明する。この場合は、第1の実施例と同様に、図3の
表に示す様に各CPU部毎のメモリアクセス回数と、キ
ャッシュ・ヒット回数とを図1に示す構成で記憶してい
けば良く、またタスクを割りつけるCPU部を決定する
方法も第1の実施例に示した方式で決定すれば良い。
[Second Embodiment] In the second embodiment, each CPU is
According to the cache hit rate of each PCU part, without being aware of how many tasks are currently being executed in each part.
A method of determining which CPU the task E is assigned to will be described. In this case, as in the first embodiment, as shown in the table of FIG. 3, the number of memory accesses for each CPU unit and the number of cache hits may be stored in the configuration shown in FIG. Further, the method of determining the CPU unit to which the task is allocated may be determined by the method shown in the first embodiment.

【0019】図3ではCPU部AとCPU部Bとについ
てアクセスカウンタとヒットカウンタとが記録されてお
り、ヒット率は実施例1と同じ手順で導くことができ、
タスクの割り付け先はCPU部Aと決まる。
In FIG. 3, an access counter and a hit counter are recorded for the CPU section A and the CPU section B, and the hit rate can be derived by the same procedure as in the first embodiment.
The task allocation destination is determined to be the CPU unit A.

【0020】[実施例3]第3の実施例では、各タスク
毎のキャッシュ・ヒット率を計算し、それから新しいタ
スクをどのCPU部に割り付けるかの方法を説明する。
図4に本実施例の構成図を示す。図4中で図1と同じ動
作をする構成要素には同じ番号をつけてある。30のカ
ウンタ制御部は、各CPU部にあるメモリアクセス回数
用カウンタであるアクセスカウンタ10と、キャッシュ
・ヒットの回数用カウンタであるヒットカウンタ11と
から出力されるカウント情報を各々信号線33・信号線
34から入力し、各CPU部のカウント情報を記憶す
る。さらに各CPUから、各CPUで実行タスクを切り
替えたことを知らせる信号35も入力する。カウンタメ
モリ32は、各CPUで実行中の全タスクのメモリアク
セス回数とキャッシュヒット回数を蓄積するためのメモ
リである。
[Embodiment 3] In a third embodiment, a method of calculating a cache hit ratio for each task and assigning a new task to which CPU unit will be described.
FIG. 4 shows a block diagram of this embodiment. In FIG. 4, components having the same operations as in FIG. 1 are given the same numbers. The counter control unit 30 stores the count information output from the access counter 10 which is a memory access number counter and the hit counter 11 which is a cache hit number counter in each CPU unit on a signal line 33 and a signal, respectively. Input from line 34, and count information of each CPU unit is stored. Further, a signal 35 notifying that the execution task has been switched in each CPU is also input from each CPU. The counter memory 32 is a memory for accumulating the number of memory accesses and the number of cache hits of all tasks being executed by each CPU.

【0021】以下、詳細な説明をするが、説明のため、
unix等のOSで用いられているタスクを識別するた
めのユニークな識別子(以下タスクIDと呼ぶ)を用い
てタスクを識別する。実行中の4タスクについて、タス
クAは100、タスクBは102、タスクCは101、
タスクDは103とする。カウンタコントローラ31
は、システム起動時にはすべてのCPUについて、各C
PUからカウンタ情報が入力された時にはそのCPUに
ついて、アクセスカウンタ10、ヒットカウンタ11を
0クリアする。タスクAがCPU1で実行され、所定時
間経過すると、CPU1はカウンタコントローラ31に
対して自分のCPU番号と実行中のタスクID、カウン
ト情報であるアクセスカウンタ10とヒットカウンタ1
1の値を送る。タスクB・C・Dについても同様な処理
を行う。そうすると、カウンタコントローラ31は、カ
ウンタメモリ32上に図5に示すような、或る時刻にお
けるカウンタを記録したテーブル情報を作成する。図4
のアクセスカウンタ10、ヒットカウンタ11のフィー
ルドの意味は第1の実施例と同じである。ここで図4の
状態で、タスクEの実行要求が発生したとする。そうす
ると、カウンタコントローラは各タスク毎にキャッシュ
・ヒット率を計算する。すなわち、 タスク100: 60/100=60% … CPU部
A タスク102:140/200=70% … CPU部
A タスク101:240/300=80% … CPU部
B タスク103: 60/200=30% … CPU部
B を求める。ここで、4つのキャッシュ・ヒット率の中で
1番高いもの、この場合タスク101の80%を見つ
け、効率の良いタスクを先に実行するという観点から、
タスク101はCPU部Bで実行しているので、CPU
部AにタスクEを割り付ける旨を判断し、タスクEをC
PU部Aに割り付ける。これは、実施例1の手順をCP
U単位からタスク単位へと変更したものである。従っ
て、図6のフローチャートのステップS605を「ヒッ
ト率の高いタスクを実行しているCPUを順に除外し
て、最後に残ったCPUを選ぶ」とすれば、本実施例の
適用できる。
A detailed description will be given below.
A task is identified by using a unique identifier (hereinafter referred to as a task ID) for identifying a task used in an OS such as Unix. Of the four tasks being executed, task A is 100, task B is 102, task C is 101,
The task D is 103. Counter controller 31
C is for all CPUs at system startup.
When the counter information is input from the PU, the access counter 10 and the hit counter 11 of the CPU are cleared to 0. When the task A is executed by the CPU 1 and a predetermined time elapses, the CPU 1 tells the counter controller 31 its own CPU number, the task ID being executed, the access counter 10 and the hit counter 1 which are count information.
Send a value of 1. Similar processing is performed for tasks B, C, and D. Then, the counter controller 31 creates table information in which the counters at a certain time are recorded in the counter memory 32, as shown in FIG. Figure 4
The fields of the access counter 10 and the hit counter 11 are the same as those in the first embodiment. Here, in the state of FIG. 4, it is assumed that an execution request for task E is issued. Then, the counter controller calculates the cache hit rate for each task. That is, task 100: 60/100 = 60% ... CPU part A task 102: 140/200 = 70% ... CPU part A task 101: 240/300 = 80% ... CPU part B task 103: 60/200 = 30% ... Find the CPU section B. Here, from the perspective of finding the highest cache hit rate among the four cache hit rates, in this case 80% of the tasks 101, and executing the efficient task first,
Since the task 101 is executed by the CPU part B, the CPU
Judge that task E is to be assigned to part A, and assign task E to C
Assign to PU unit A. This is the CP of the procedure of the first embodiment.
This is a change from the U unit to the task unit. Therefore, if step S605 of the flowchart of FIG. 6 is set to "exclude CPUs executing a task with a high hit rate in order and select the last remaining CPU", this embodiment can be applied.

【0022】こうして実現されたタスク割り付け方法で
は、各CPUが実行中のタスクの実行状態として、CP
Uとキャッシュ間のキャッシュ・ヒット率をモニタする
手順を設けることにより、別タスクの実行要求が発生し
た時に、各CPUで実行中のタスクの優先順位が同じ場
合には、キャッシュ・ヒット率の一番低いCPUに今回
のタスクを割り付けることに、キャッシュ・ヒット率の
高いタスクはそのまま高速に処理を続けることができ、
キャッシュ・ヒット率の低いCPUでタイムシェア方式
等により処理することにより、このキャッシュ・ヒット
率の低いタスクは、もともとキャッシュメモリにあまり
ヒットしないメモリ・アクセスをしているためにタスク
スイッチによるキャッシュ・ヒット率の低下が少なく、
効率良くCPU等の資源を割り付けができる。また、キ
ャッシュ・ヒット率を求めるためのハード規模も小さく
すむ。
In the task allocation method realized in this way, the CP is set as the execution state of the task being executed by each CPU.
By providing a procedure for monitoring the cache hit ratio between U and the cache, when the execution priority of the task being executed by each CPU is the same when another task execution request occurs, By allocating this task to the lowest CPU, the task with high cache hit rate can continue processing at high speed,
By processing by a CPU with a low cache hit rate by the time-share method, the task with a low cache hit rate originally makes a memory access that does not hit the cache memory so much that a cache hit by a task switch occurs. The decrease in the rate is small,
Resources such as CPU can be efficiently allocated. Also, the hardware scale for obtaining the cache hit rate can be reduced.

【0023】これまでの説明では、CPUのタイマ等に
より所定の単位時間を測定し、その単位時間内のキャッ
シュ・ヒット率を計算する様に説明してきたが、そのタ
スクの開始から終了まで通したキャッシュ・ヒット率を
求める方式でも良い。例えば、大容量の画像データを順
次処理して行くようなタスクの場合には、そのタスク全
体としてみればキャッシュ・ヒット率は小さいものと考
えられるし、また元々時間のかかる処理であるため、他
のタスクとタイムシェアして実行しても構わない。
In the above description, the timer unit of the CPU is used to measure a predetermined unit time and the cache hit ratio within the unit time is calculated. However, the task is passed from the start to the end. A method of obtaining the cache hit rate may be used. For example, in the case of a task that sequentially processes a large amount of image data, the cache hit rate is considered to be small for the task as a whole, and since it is a time-consuming process, You can share it with other tasks in time.

【0024】さらに、キャッシュ・ヒット率を第1・第
2の実施例ではCPU部A2で、第3の実施例ではカウ
ンタ制御部30で求めていたが、これに限るものでもな
い。
Further, the cache hit rate is calculated by the CPU A2 in the first and second embodiments and by the counter controller 30 in the third embodiment, but it is not limited to this.

【0025】また、これまでの実施例の説明ではCPU
部は2個で説明したが、これに限るものでもなく、更に
多くのCPUを持った装置であっても良い。また、各C
PU上で実行しているタスク数が同じ場合を説明した
が、これに限るものでもなく、空いているCPUがあれ
ば、そのCPUに割り付けたりすることは容易に考えら
れる。また、これまではキャッシュ・ヒット率の高いタ
スクを優先的に実行する様に説明したが、これに限るも
のでもなく、キャッシュが余りヒットしないタスクは時
間がかかるためにそれを優先して実行するという、これ
まで説明した実施例とは逆の制御方式も容易に考えられ
る。
In the above description of the embodiments, the CPU
Although two units have been described, the present invention is not limited to this, and a device having more CPUs may be used. Also, each C
Although the case where the number of tasks being executed on the PU is the same has been described, the present invention is not limited to this, and if there is a vacant CPU, it can be easily assigned to that CPU. Also, it has been explained that the task with a high cache hit rate is executed preferentially, but it is not limited to this, and the task that does not hit the cache too much takes time, so it is executed with priority. That is, a control method opposite to the above-described embodiments can be easily considered.

【0026】尚、本発明は、複数の機器から構成される
システムに適用しても1つの機器から成る装置に適用し
ても良い。また、本発明は、システム或は装置にプログ
ラムを供給することによって達成される場合にも適用で
きることはいうまでもない。
The present invention may be applied to a system composed of a plurality of devices or an apparatus composed of a single device. Further, it goes without saying that the present invention can be applied to the case where it is achieved by supplying a program to a system or an apparatus.

【0027】[0027]

【発明の効果】以上説明した様に本発明に係るタスク割
り付け方法は、CPUの動作状態を参照して、CPUを
効率よく使用できる様にタスクの割りつけを決定でき
る。
As described above, the task allocation method according to the present invention can determine the task allocation so that the CPU can be used efficiently by referring to the operating state of the CPU.

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

【図1】第1の実施例のブロック図である。FIG. 1 is a block diagram of a first embodiment.

【図2】第1の実施例のキャッシュヒット率を算出する
ための表である。
FIG. 2 is a table for calculating a cache hit rate in the first embodiment.

【図3】第2の実施例のキャッシュヒット率を算出する
ための表である。
FIG. 3 is a table for calculating a cache hit rate in the second embodiment.

【図4】第3の実施例のブロック図である。FIG. 4 is a block diagram of a third embodiment.

【図5】第3の実施例のキャッシュヒット率を算出する
ための表である。
FIG. 5 is a table for calculating a cache hit rate according to the third embodiment.

【図6】第1の実施例のフローチャートである。FIG. 6 is a flowchart of the first embodiment.

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 システムを構成するプロセサ各々につい
て対となるキャッシュ記憶を備えたマルチプロセサシス
テムにおいて発生したタスクを前記プロセサに割りつけ
るタスク割り付け方法であって、 前記各プロセサが、前記対となるキャッシュ記憶へアク
セスした回数を数える第1の計数行程と、 前記アクセスにより所望される情報が、前記対となるキ
ャッシュ記憶に存在している回数を数える第2の計数行
程と、 前記第1の計数工程による回数と前記第2の計数行程に
よる回数とを基に、所望の情報がキャッシュ記憶に存在
しているヒット率を算出する算出行程と、 前記ヒット率を基に前記発生したタスクを実行するプロ
セサを選択する選択行程と、 を備えることを特徴とするタスク割り付け方法。
1. A task allocation method for allocating to a processor a task generated in a multiprocessor system having a paired cache storage for each processor constituting the system, wherein each processor has the paired cache storage. A first counting step of counting the number of times of access to the second counting step, a second counting step of counting the number of times that the information desired by the access exists in the paired cache memory, and the first counting step. A calculation process for calculating a hit rate at which desired information exists in the cache memory based on the number of times and the number of times by the second counting process, and a processor for executing the generated task based on the hit ratio. A task allocation method comprising: a selection process to be selected.
【請求項2】 前記算出行程はタスクごとに前記ヒット
率を算出することを特徴とする請求項1項記載のタスク
割り付け方法。
2. The task allocation method according to claim 1, wherein the hit ratio is calculated for each task in the calculation step.
【請求項3】 前記選択行程は、前記各プロセサにおい
て前記ヒット率の最も高いタスクのうち、前記ヒット率
が最も低いタスクを実行するプロセサを選択することを
特徴とする請求項2項記載のタスク割り付け方法。
3. The task according to claim 2, wherein the selection step selects a processor that executes a task with the lowest hit rate among tasks with the highest hit rate in each of the processors. Allocation method.
【請求項4】 前記算出行程はプロセサごとに前記ヒッ
ト率を算出することを特徴とする請求項1項記載のタス
ク割り付け方法。
4. The task allocation method according to claim 1, wherein the calculation step calculates the hit rate for each processor.
【請求項5】 前記選択行程は前記ヒット率が最も低い
プロセサを選択することを特徴とする請求項4項記載の
タスク割り付け方法。
5. The task allocation method according to claim 4, wherein the processor having the lowest hit rate is selected in the selection step.
【請求項6】 前記ヒット率の算出はタスクの開始から
終了までの時間内のアクセスを対象としてなされること
を特徴とする請求項1項記載のタスク割り付け方法。
6. The task allocation method according to claim 1, wherein the calculation of the hit ratio is performed for access within a time from the start to the end of the task.
【請求項7】 前記ヒット率の算出は適当に選ばれた一
定の時間内のアクセスを対象としてなされることを特徴
とする請求項1項記載のタスク割り付け方法。
7. The task allocation method according to claim 1, wherein the hit ratio is calculated for an access selected within a certain period of time.
JP17061092A 1992-06-29 1992-06-29 Task allocating method in multiprocessor system Withdrawn JPH0612395A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17061092A JPH0612395A (en) 1992-06-29 1992-06-29 Task allocating method in multiprocessor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17061092A JPH0612395A (en) 1992-06-29 1992-06-29 Task allocating method in multiprocessor system

Publications (1)

Publication Number Publication Date
JPH0612395A true JPH0612395A (en) 1994-01-21

Family

ID=15908050

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17061092A Withdrawn JPH0612395A (en) 1992-06-29 1992-06-29 Task allocating method in multiprocessor system

Country Status (1)

Country Link
JP (1) JPH0612395A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005092862A (en) * 2003-08-11 2005-04-07 Hitachi Ltd Load balancing method and client / server system
US7512753B2 (en) 2003-02-18 2009-03-31 Nec Corporation Disk array control apparatus and method
JP2009193093A (en) * 2008-02-12 2009-08-27 Fujitsu Ltd Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method
JP2009277243A (en) * 2009-07-21 2009-11-26 Panasonic Corp Compiler device and operating system
JP2012043232A (en) * 2010-08-20 2012-03-01 Nippon Telegr & Teleph Corp <Ntt> Program execution device and program execution method
WO2014141419A1 (en) * 2013-03-14 2014-09-18 株式会社日立製作所 Virtual computer system and scheduling method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512753B2 (en) 2003-02-18 2009-03-31 Nec Corporation Disk array control apparatus and method
JP2005092862A (en) * 2003-08-11 2005-04-07 Hitachi Ltd Load balancing method and client / server system
JP2009193093A (en) * 2008-02-12 2009-08-27 Fujitsu Ltd Memory shared data processing system, memory access amount measuring apparatus, and memory access amount measuring method
JP2009277243A (en) * 2009-07-21 2009-11-26 Panasonic Corp Compiler device and operating system
JP2012043232A (en) * 2010-08-20 2012-03-01 Nippon Telegr & Teleph Corp <Ntt> Program execution device and program execution method
WO2014141419A1 (en) * 2013-03-14 2014-09-18 株式会社日立製作所 Virtual computer system and scheduling method
US9740528B2 (en) 2013-03-14 2017-08-22 Hitachi, Ltd. Virtual computer system and scheduling method

Similar Documents

Publication Publication Date Title
US9400686B2 (en) Process grouping for improved cache and memory affinity
US8271989B2 (en) Method and apparatus for virtual processor dispatching to a partition based on shared memory pages
TWI235952B (en) Thread dispatch mechanism and method for multiprocessor computer systems
JP2682770B2 (en) CPU control method for virtual computer system
US5784698A (en) Dynamic memory allocation that enalbes efficient use of buffer pool memory segments
KR101651871B1 (en) Job Allocation Method on Multi-core System and Apparatus thereof
US10484236B2 (en) Performance of multi-processor computer systems
US20030172234A1 (en) System and method for dynamic processor core and cache partitioning on large-scale multithreaded, multiprocessor integrated circuits
US9852008B2 (en) Computer-readable recording medium storing execution information notification program, information processing apparatus, and information processing system
JPH0673108B2 (en) How to restrict guest behavior to system resources allocated to guests
CN102804149A (en) Multi-core processor system, arbitration circuit control method, and arbitration circuit control program
KR20100074920A (en) Apparatus and method for load balancing in multi-core system
US9189279B2 (en) Assignment method and multi-core processor system
JP5178778B2 (en) Virtual machine and CPU allocation method
JPH06243112A (en) Multiprocessor equipment
WO2010089808A1 (en) Virtual computer allocation method, allocation program, and information processing device having a virtual computer environment
JPH0612395A (en) Task allocating method in multiprocessor system
JPH0991257A (en) Cpu management system
JP3227069B2 (en) I / O processing system
JPH10187469A (en) Process dispatch method for multiprocessor
Sodan et al. LOMARC: lookahead matchmaking for multiresource coscheduling on hyperthreaded CPUs
JP2025016067A (en) Allocation control program, allocation control method, and information processing device
JPS6236260B2 (en)
JPH0877029A (en) Processing request execution order control method based on load factor
JPS6323588B2 (en)

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990831