JP4127354B2 - Multiprocessor control program and multiprocessor control method - Google Patents

Multiprocessor control program and multiprocessor control method Download PDF

Info

Publication number
JP4127354B2
JP4127354B2 JP2001384027A JP2001384027A JP4127354B2 JP 4127354 B2 JP4127354 B2 JP 4127354B2 JP 2001384027 A JP2001384027 A JP 2001384027A JP 2001384027 A JP2001384027 A JP 2001384027A JP 4127354 B2 JP4127354 B2 JP 4127354B2
Authority
JP
Japan
Prior art keywords
execution
attribute
upper limit
processor
execution unit
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
JP2001384027A
Other languages
Japanese (ja)
Other versions
JP2003186856A (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
PFU Ltd
Original Assignee
Fujitsu Ltd
PFU 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, PFU Ltd filed Critical Fujitsu Ltd
Priority to JP2001384027A priority Critical patent/JP4127354B2/en
Publication of JP2003186856A publication Critical patent/JP2003186856A/en
Application granted granted Critical
Publication of JP4127354B2 publication Critical patent/JP4127354B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明はマルチプロセッサ制御プログラム及びマルチプロセッサ制御方法に関し、特に属性が付与された複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御プログラム及びマルチプロセッサ制御方法に関する。
【0002】
【従来の技術】
現在、コンピュータのデータ処理能力を向上させるための様々な技術が存在する。その技術の中にデータ処理を複数のCPU(Central Processing Unit)で分担して並列処理させることによりデータ処理能力を向上させるマルチCPUシステムがある。
【0003】
マルチCPUシステムにデータの並列処理をさせる方法として次の2通りがある。その1は、プロセスやスレッドなどのプログラムの実行単位を複数のCPUに実行させ、実行が終了したCPUに次々と実行待ちをしている実行単位を実行させる方法である。その2は、実行単位に属性を持たせ、属性ごとに実行単位を実行する複数のCPUを決めて実行単位をCPUに実行させ、実行が終了したCPUから順に、そのCPUが実行できる属性をもつ実行待ちをしている実行単位を実行させる方法である。
【0004】
図12は従来のマルチCPUシステムの動作(その1)を説明する図である。図に示すマルチCPUシステムは、4つのCPU40〜43を有する。CPU40〜43はプログラムの実行単位であるプロセス40a〜43aを実行している。また、プロセス44,45はCPU40〜43の実行待ちをしている。
【0005】
CPU41がプロセス41aの実行を終了したとすると、実行待ちをしているプロセス44がCPU41よって実行される。また、CPU42がプロセス42aの実行を終了したとすると、実行待ちをしているプロセス45がCPU42によって実行される。このように、プロセスの実行を終了しプロセスを切り離したCPUは、実行待ちをしているプロセスを順に実行していく。
【0006】
図13は従来のマルチCPUシステムの動作(その2)を説明する図である。図に示すマルチCPUシステムは、属性‘#A’を持つプロセスを実行するCPU50,51と、属性‘#B’をもつプロセスを実行するCPU52,53とを有する。CPU50,CPU51は、属性‘#A’を持つプロセス50a,51bを実行し、CPU52,CPU53は、属性‘#B’を持つプロセス52a,53aを実行している。また、属性‘#A’を持つプロセス54,55は、CPU50,51の実行待ちをしており、属性‘#B’を持つプロセス56,57は、CPU52,53の実行待ちをしている。
【0007】
CPU50がプロセス50aの実行を終了したとすると、実行待ちをしている属性‘#A’を持つプロセス54がCPU50によって実行される。また、CPU52がプロセス52aの実行を終了したとすると、実行待ちをしている属性‘#B’を持つプロセス56がCPU52によって実行される。このように、プロセスに属性を持たせ、属性ごとにプロセスを実行するCPUを決め、プロセスの実行を終了しプロセスを切り離したCPUは、決められた属性の実行待ちをしているプロセスを順に実行していく。
【0008】
【発明が解決しようとする課題】
ここで、図12において、CPU40が実行しているプロセス40aが、排他資源を利用しているとする。また、CPU41,42が実行しているプロセス41a,42aも排他資源を利用しようとしたとする。このとき、CPU41,42は、プロセス40aの排他資源の利用が終了するまで、プロセス41a,42aの実行を進めることができない(排他資源の競合)。このため、CPU43のみが、プロセス43aの実行を終了し、実行待ちのプロセス44,45を実行できる状態にあり並列動作性が低下してしまう。
【0009】
このように、実行が終了したCPUに次々と実行待ちをしている実行単位を実行させる方法では、排他資源の競合機会が増加した場合、並列動作性が低下してしまうという問題点があった。
【0010】
また、図13において、属性‘#A’を持つプロセス50a,51aの排他資源の競合が起こったとする。属性‘#B’を持つプロセス52a,53aは、CPU52,53によって実行が確保される。しかし、属性‘#B’を持つプロセス52a,53a,56,57のCPU52,53による実行が終了しても、実行待ちをしている属性‘#A’をもつプロセス54,55がCPU52,53によって実行されることはなく、CPUの使用効率が悪い。
【0011】
このように、実効単位に属性を持たせ、属性ごとに実行単位をCPUに実行させる方法では、排他資源の競合機会を減らすことはできるが、CPUの使用効率を低下させるという問題点があった。
【0012】
本発明はこのような点に鑑みてなされたものであり、プロセッサの並列動作性の低下、及び、プロセッサの使用効率の低下を抑えるマルチプロセッサ制御プログラムを提供することを目的とする。
【0013】
【課題を解決するための手段】
上記課題を解決するために、複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御プログラムにおいて、コンピュータに、いずれかのプロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、前記上限数が前記実行数より多い場合、実行単位の属性ごとに実行できるプロセッサを決めることなく、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行させ、プロセッサによって実行されている実行単位の排他資源に対する競合回数を実行単位の属性ごとに取得し、前記属性ごとに取得した競合回数に応じて、前記テーブルの前記属性に対応するプロセッサを占有できる上限数を変更する、処理を実行させることを特徴とするマルチプロセッサ制御プログラムが提供される
【0014】
このようなマルチプロセッサ制御プログラムによれば、実行単位の属性ごとに、実行単位がプロセッサを占有できる上限数を設け、実行単位の属性ごとに実行できるプロセッサを決めることなく、開放状態になったプロセッサに実行単位を実行させる。また、実行単位の排他資源に対する競合回数を実行単位の属性ごとに取得し、属性ごとに取得した競合回数に応じて、プロセッサを占有できる上限数を変更する。
【0015】
【発明の実施の形態】
以下、本発明の実施の形態を図面を参照して説明する。
図1は、本発明の原理を説明する原理図である。
【0016】
この図においてコンピュータ1は、属性取得手段10、上限数取得手段11、テーブル12、実行数取得手段13、実行手段14、属性を有する実行単位15a〜15h、及び、プロセッサ16a〜16fを有する。
【0017】
属性取得手段10は、プロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得する。
上限数取得手段11は、属性取得手段10によって取得された実行待ちをしている実行単位の属性に対応する、プロセッサを占有できる上限数をテーブル12から取得する。
【0018】
テーブル12には、実行単位の属性ごとにプロセッサを占有できる上限数が予め登録される。
実行数取得手段13は、属性取得手段10によって取得された実行待ちをしている実行単位の属性と、同じ属性を持つ実行単位を実行しているプロセッサの数である実行数を取得する。
【0019】
実行手段14は、上限数取得手段11によって取得されたプロセッサを占有できる上限数が、実行数取得手段13によって取得されたプロセッサの実行数より多い場合、処理機能が開放状態となっているプロセッサに実行待ちをしていた実行単位を実行させる。
【0020】
実行単位15a〜15hは、プロセッサによって実行されるプログラム実行単位である。実行単位15aは属性‘#1’を有する。実行単位15bは属性‘#1’を有する。実行単位15cは属性‘#2’を有する。実行単位15dは属性‘#1’を有する。実行単位15eは属性‘#2’を有する。実行単位15fは属性‘#1’を有する。実行単位15gは属性‘#1’を有する。実行単位15hは属性‘#2’を有する。
【0021】
プロセッサ16a〜16fは、実行手段14によって割り当てられる実行単位を実行する。
以下、図1の原理図の動作について説明する。
【0022】
図1に示すように、プロセッサ16aは実行単位15aを実行しているとする。プロセッサ16bは実行単位15bを実行しているとする。プロセッサ16cは実行単位15cを実行しているとする。プロセッサ16dは実行単位15dを実行しているとする。プロセッサ16eは実行単位15eを実行しているとする。プロセッサ16fは実行単位15fを実行しているとする。また、実行単位15g、15hはプロセッサ16a〜16fの実行待ちをしているとする。
【0023】
ここで、プロセッサ16bが、実行単位15bの実行を終了したとする。プロセッサ16bは、処理機能が開放状態となり、属性取得手段10は、実行待ちをしている実行単位15gの属性‘#1’を取得する。
【0024】
上限数取得手段11は、実行単位15gの属性#1に対応する、プロセッサを占有できる上限数をテーブル12から取得する。ここで、テーブル12には、属性‘#1’を有する実行単位がプロセッサを占有できる上限数は‘9999’、属性‘#2’を有する実行単位がプロセッサを占有できる上限数は‘2’と登録されているとする。これによって、上限数取得手段11は、属性‘#1’の実行単位がプロセッサを占有できる上限数‘9999’を取得する。
【0025】
ここで、上限数‘9999’は、プロセッサ16a〜16fを制限されることなく割り当てられることを示している。これは、コンピュータ1がプロセッサを6個しか搭載していないので、プロセッサを占有できる上限数は最高で‘6’であるためである。
【0026】
実行数取得手段13は、属性取得手段10によって取得された、実行待ちをしている実行単位15gの属性‘#1’と、同じ実行単位を実行しているプロセッサの実行数を取得する。プロセッサ16bは、開放状態であることを考慮して、属性‘#1’の実行単位を実行しているプロセッサは、プロセッサ16a,16d、16fの3個であり、実行数取得手段13は、実行数‘3’を取得する。
【0027】
実行手段14は、上限数取得手段11によって取得されたプロセッサを占有できる上限数‘9999’が、実行数取得手段13によって取得されたプロセッサの実行数‘3’より多いので、実行待ちをしていた実行単位15gをプロセッサ16bに実行させる。
【0028】
実行単位15gがプロセッサ16bに割り当てられたことにより、次に、図1において、実行単位15hが実行待ちの状態となる。
ここで、プロセッサ16dが、実行単位15dの実行を終了したとする。すると、プロセッサ16dは、処理機能が開放状態となり、属性取得手段10は、実行待ちをしている実行単位15hの属性‘#2’を取得する。
【0029】
上限数取得手段11は、実行単位15hの属性‘#2’に対応する、プロセッサを占有できる上限数をテーブル12から取得する。先述したように、テーブル12には、属性‘#1’を有する実行単位がプロセッサを占有できる上限数は‘9999’、属性‘#2’を有する実行単位がプロセッサを占有できる上限数は‘2’、と登録されている。これによって、上限数取得手段11は、属性‘#2’の実行単位がプロセッサを占有できる上限数‘2’を取得する。
【0030】
実行数取得手段13は、属性取得手段10によって取得された、実行待ちをしている実行単位15hの属性‘#2’と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得する。プロセッサ16dは、現在、開放状態であること、及び、先述の説明よりプロセッサ16bは、属性‘#1’の実行単位15gを実行していることを考慮して、属性‘#2’の実行単位を実行しているプロセッサは、プロセッサ16c,16eの2個であり、実行数取得手段13は、実行数‘2’を取得する。
【0031】
実行手段14は、上限数取得手段11によって取得されたプロセッサを占有できる上限数‘2’が、実行数取得手段13によって取得されたプロセッサの実行数‘2’と同数であるので、実行待ちをしていた実行単位15hをプロセッサ16dに実行させない。
【0032】
このように、実行単位の属性ごとに、プロセッサを占有できる上限数を設けて、実行単位の競合機会を抑え、実行単位の属性ごとに実行できるプロセッサを決めることなく、開放状態になったプロセッサに実行単位を実行させるようにしたので、プロセッサの並列動作性、及び、使用効率の低下を抑えることができる。
【0033】
次に、本発明の実施の形態を実現するためのハードウェア構成について説明する。
図2は、本発明の実施の形態を実現するためのコンピュータのハードウェア構成例である。
【0034】
図に示すように、コンピュータ2は、CPU20a〜20f、各CPU20a〜20fに接続されたRAM(Random Access Memory)20aa〜20af、ハードディスクドライブ(HDD:Hard Disk Drive)20g、入力インタフェース20h、キーボード20i、グラフィック処理装置20j、モニタ20k、通信インタフェース20l、及び、バス20mとから構成される。
【0035】
RAM20aa〜20afには、各CPU20a〜20fが実行するプログラムの少なくとも一部が一時的に格納される。また、RAM20aa〜20afには、各CPU20a〜20fによる処理に必要な各種データが保存される。
【0036】
HDD20gには、CPU20a〜20fの並列動作を制御するためのプログラムなどが格納される。CPU20a〜20fは、HDD20gの並列動作を制御するためのプログラムに従って、スレッドなどのプログラムの実行単位を実行する。
【0037】
入力インタフェース20hには、キーボード20iが接続されている。入力インタフェース20hは、キーボード20iから送られてくる信号を、バス20mを介してCPU20a〜20fに送信する。
【0038】
グラフィック処理装置20jには、モニタ20kが接続されている。グラフィック処理装置20jは、CPU20a〜20fからの命令に従って、画像をモニタ20kの表示画面に表示させる。
【0039】
通信インタフェース20lは、ネットワーク20nに接続されている。通信インタフェース20lは、ネットワーク20nを介して、コンピュータ2を他の装置と通信可能にする。
【0040】
バス20mは、CPU20a〜20f、HDD20g、入力インタフェース20h、グラフィック処理装置20j、及び、通信インタフェース20lを接続する。
【0041】
なお、上記説明では各CPUにRAMが接続されたハードウェア構成を示したが、CPU全体に対し1個のRAMを共有するハードウェア構成でもよく、また、CPUの数より少ない複数のRAMを用いたハードウェア構成でもよい。
【0042】
次に、本発明の実施の形態を実現するためのコンピュータの機能について説明する。
図3は、本発明の実施の形態を実現するためのコンピュータの機能ブロック図である。
【0043】
図に示すコンピュータ2は、CPU20a〜20f、属性取得部21、上限数取得部22、上限数テーブル23、実行数取得部24、CPU割り当て制御部25、カーネルA26a、カーネルB26b、競合計数部27、設定情報テーブル28、実行待ちキュー29、OS(Operating System)30a、OS30b、及び、属性を有するスレッド31a〜31jとを有する。
【0044】
属性取得部21は、CPU20a〜20fが開放状態のとき、実行待ちキュー29の先頭(詳細は後述)で実行待ちをしているスレッドの属性を取得する。
上限数取得部22は、属性取得部21によって取得された、実行待ちをしているスレッドの属性に対応する、CPUを占有できる数である上限数を上限数テーブル23から取得する。
【0045】
上限数テーブル23は、スレッドの属性ごとにCPUを占有できる上限数を登録する。
実行数取得部24は、属性取得部21によって取得された実行待ちのスレッドの属性と同じ属性をもつスレッドを実行しているCPUの数である実行数を取得する。
【0046】
CPU割り当て制御部25は、上限数取得部22によって取得された上限数が、実行数取得部24によって取得された実行数より多い場合、処理機能が開放状態となっているCPUに、実行待ちキュー29の先頭で実行待ちをしているスレッドを割り当てる。また、CPU割り当て制御部25は、上限数取得部22によって取得された上限数が、実行数取得部24によって取得された実行数以下である場合、実行待ちキュー29の先頭で実行待ちをしているスレッドを末尾で実行待ちをさせる。
【0047】
カーネルA26a、カーネルB26bは、スレッドが特定の処理を実現するときに利用するプログラムである。カーネルA26a、カーネルB26bは、排他資源であり、あるスレッドがカーネルA26a、又は、カーネルB26bを利用しているとき、他のスレッドは、カーネルA26a、カーネルB26bを利用することはできず、スレッドの競合が生じる場合がある。
【0048】
競合計数部27は、スレッドのカーネルA26a、カーネルB26bへの単位時間当たりの競合回数を属性ごとにカウントする。また、競合計数部27は、設定情報テーブル28を参照し、スレッドのカーネルA26a、カーネルB26bへの競合回数に応じた、CPUを占有できる上限数を取得して、上限数テーブル23のCPUを占有できる上限数を変更する。
【0049】
設定情報テーブル28は、スレッドの属性ごとに、カーネルA26a、カーネルB26bの競合する回数に対応した、CPUを占有できる上限数を登録する。実行待ちキュー29は、OS30a,30bから生成されたスレッドを、CPUの割り当てが必要となった順にCPU割り当て制御部25に処理されるようにスレッドを管理する。ここで、実行待ちキューの構造について説明する。図4は、実行待ちキューの構造を示した図である。図に示すように、実行待ちキュー29は、キュー管理部29aを有する。キュー管理部29aは、OS30a,30bから生成されたスレッドをCPUの割り当てが必要となった順に先頭方向へスレッドを順番に並べる。図4においては、スレッド31gが先にCPUの割り当てが必要となったスレッドであり、スレッド31hが後にCPUの割り当てが必要となったスレッドである。スレッド31gが実行待ちをしている先頭であり、スレッド31hが実行待ちをしている末尾である。
【0050】
OS30a,30bは、プログラムの実行単位であるスレッドを生成し、実行待ちキュー29に送り出す。このとき、OS30a、30bは、OS30a、30bの種別を示す‘OS#1’,‘OS#2’を、スレッドの属性として付与する。
【0051】
スレッド31a〜31jは、プログラムの実行単位である。スレッド31aは属性‘OS#2’を有する。スレッド31bは属性‘OS#1’を有する。スレッド31cは属性‘OS#1’を有する。スレッド31dは属性‘OS#2’を有する。スレッド31eは属性‘OS#1’を有する。スレッド31fは属性‘OS#1’を有する。スレッド31gは属性‘OS#2’を有する。スレッド31hは属性‘OS#1’を有する。スレッド31iは属性‘OS#2’を有する。スレッド31jは属性‘OS#1’を有する。
【0052】
ここで、スレッドの構造について説明する。図5は、スレッドの構造を示した図である。スレッド31aは、プログラム管理領域31aaとスレッド管理テーブル領域31abに分かれる。プログラム管理領域31aaは、さらにアプリケーションプログラムを格納するプログラム領域31aaaと、アプリケーションプログラムが使用するデータを格納するデータ領域31aabに分かれる。スレッド管理テーブル領域31abは、さらにスレッドの属性を格納する属性領域31abaとCPUのレジスタ値を格納するレジスタ退避域31abbとOSが使用するデータを格納するデータ領域31abcに分かれる。レジスタ退避域31abbには、例えば、スレッド31aの実行が中断されたときのCPUのレジスタ値(例えば、CPUのレジスタA・・・レジスタEの値)が格納される。そして、次回スレッド31aがCPUによって実行されるとき、レジスタ退避域31abbに格納されているレジスタ値がCPUのレジスタに展開されて実行される。
【0053】
以下に、図3に示すコンピュータの機能ブロック図の処理の流れについて説明する。
図3に示すように、CPU20aはスレッド31aを実行しているとする。CPU20bはスレッド31bを実行しているとする。CPU20cはスレッド31cを実行しているとする。CPU20dはスレッド31dを実行しているとする。CPU20eはスレッド31eを実行しているとする。CPU20fはスレッド31fを実行しているとする。また、スレッド31g、スレッド31hは、実行待ちキュー29で実行待ちをしているとする。
【0054】
ここで、CPU20bがスレッド31bの実行を終了し、切り離したとする。するとCPU20bは、処理機能が開放状態となる。図6は、CPUのスレッド処理の遷移状態を説明する図(その1)である。CPU20a,CPU20c〜20fは、スレッド31a,スレッド31c〜31fを実行し、CPU20bは、スレッドを実行していない状態(開放状態)を示す。
【0055】
CPU20bが開放状態になると、属性取得部21は、実行待ちキュー29の先頭で実行待ちをしているスレッド31gの属性‘OS#2’を取得する。
上限数取得部22は、上限数テーブル23から、実行待ちキュー29の先頭で実行待ちをしているスレッド31gの属性‘OS#2’に対応する、CPUを占有できる上限数を取得する。図7は、上限数テーブルに登録されている情報の一例を示した図である。図の上限数テーブル23には、属性‘OS#1’に対応するプロセッサを占有できる上限数として‘4’、属性‘OS#2’に対応するプロセッサを占有できる上限数として‘2’が登録されている。
【0056】
図7より、上限数取得部22は、属性‘OS#2’に対応する、CPUを占有できる上限数‘2’を取得する。
実行数取得部24は、属性取得部21によって取得された、実行待ちをしているスレッド31gの属性‘OS#2’と同じ属性をもつスレッドを実行しているCPUの数を取得する。図6において、CPU20a,20dが属性‘OS#2’を有するスレッド31a,31dを実行しているので、実行数取得部24は、実行数‘2’を取得する。
【0057】
上限数取得部22によって取得された上限数は‘2’であり、属性‘OS#2’を有するスレッドをCPUに割り当てることのできる数は最大‘2’である。実行数取得部24によって取得された実行数は‘2’であり、すでにCPUには属性‘OS#2’を有するスレッドが‘2’割り当てられている。これによって、CPU割り当て制御部25は、実行待ちをしていたスレッド31gを開放状態にあるCPU20bに実行させない。
【0058】
CPU割り当て制御部25は、実行待ちキュー29の先頭で実行待ちをしていたスレッド31gを、そのままの順番で実行待ちするように保持し、次の実行待ちをしているスレッド31hを見に行く。
【0059】
CPU20bは、まだ開放状態にあるので、属性取得部21は、実行待ちキュー29で実行待ちをしているスレッド31hの属性‘OS#1’を取得する。
上限数取得部22は、実行待ちキュー29で実行待ちをしているスレッド31hの属性‘OS#1’に対応する、CPUを占有できる上限数を上限数テーブル23から取得する。図7より、上限数取得部22は、属性‘OS#1’に対応するCPUを占有できる上限数‘4’を取得する。
【0060】
実行数取得部24は、属性取得部21によって取得された、実行待ちをしているスレッド31hの属性‘OS#1’と同じ属性をもつスレッドを実行しているCPUの数を取得する。図6において、CPU20c,20e,20fが属性‘OS#1’のスレッドを実行しているので、実行数取得部24は、実行数‘3’を取得する。
【0061】
上限数取得部22によって取得された上限数は‘4’であり、属性‘OS#1’のスレッドをCPUに割り当てることのできる数は最大‘4’である。実行数取得部24によって取得された実行数‘3’であり、スレッド31hを開放状態にあるCPU20bに割り当てることができる。図8は、CPUのスレッド処理の遷移状態を説明する図(その2)である。図に示すように、CPU20bに、スレッド31hが割り当てられる。
【0062】
次に、図3の機能ブロック図における上限数テーブル23の上限数の変更処理の流れについて説明する。
競合計数部27は、スレッド31a〜31fのカーネルA26a、カーネルB26bへの競合回数をカウントし、設定情報テーブル28を参照して、上限数テーブル23のCPUを占有できる上限数を変更する。
【0063】
図9は、設定情報テーブルに登録されている情報の一例を示した図である。図に示す設定情報テーブル28には、属性“OS#1”を有するスレッドのカーネルA26aに対する競合が1秒間に5000回以上であれば、CPUを占有できる上限数は‘2’という情報が登録されている。同様に、競合が1秒間に1000回以上5000回未満であれば上限数は‘3’、競合が1秒間に1000回未満であれば上限数は‘4’という情報が登録されている。また、属性“OS#2”を有するスレッドのカーネルB26bに対する競合が1秒間に7000回以上であれば、CPUを占有できる上限数は‘2’、競合が1秒間に5000回未満であれば上限数は‘3’という情報が登録されている。
【0064】
ここで、図3に示す属性‘OS#1’を有するスレッド31b,31c,31e,31fによるカーネルA26aへの競合が1秒間に5000回以上発生したとする。競合計数部27は、設定情報テーブル28より、属性‘OS#1’を有するスレッドの競合回数5000回以上に対応するCPU上限数‘2’を取得し、図7に示した上限数テーブル23の属性‘OS#1’に対応するCPUの上限数を‘2’に変更する。同様に、競合回数が1秒間に1000回以上5000回未満であれば、競合計数部27は、設定情報テーブル28からCPU上限数‘3’を取得し、上限数テーブル23の属性‘OS#1’に対応するCPUの上限数を‘3’に変更する。1000回未満であれば、競合計数部27は、設定情報テーブル28からCPU上限数‘4’を取得し、上限数テーブル23の属性‘OS#1’に対応するCPUの上限数を‘4’に変更する。
【0065】
同様に、競合計数部27は、カーネルB26bに対する属性‘OS#2’を有するスレッド31a,31dの競合回数をカウントし、上限数テーブル23のCPU上限数を変更する。カーネルB26bへの競合が1秒間に7000回以上であれば、競合計数部27は、設定情報テーブル28を参照して、属性‘OS#2’の競合回数7000回以上に対応するCPU上限数‘2’を取得し、上限数テーブル23の属性‘OS#2’に対応するCPU上限数を‘2’に変更する。4000回未満であれば、CPU上限数を‘3’に変更する。
【0066】
属性‘OS#2’のカーネルB26bに対する競合回数が4000回以上7000回未満であれば、競合計数部27は、上限数テーブル23のCPU上限数を変更しない。CPU上限数の変更に履歴を持たせ、CPUの上限数が頻繁に変更されることを防止する。
【0067】
次に、コンピュータ2の処理の流れについてフローチャートを用いて説明する。
図10は、コンピュータのスレッドの割り当て処理を示したフローチャートである。このフローチャートが開始されると以下の処理が行われる。
【0068】
[ステップS10]属性取得部21は、CPU20a〜20fのいずれかの処理機能が開放状態のとき、実行待ちキュー29の先頭で実行待ちをしているスレッド31gの属性を取得する。
【0069】
[ステップS11]上限数取得部22は、スレッドの属性ごとにCPU20a〜20fを占有できる上限数を登録した上限数テーブル23から、スレッド31gの属性に対応するCPU20a〜20fを占有できる上限数を取得する。
【0070】
[ステップS12]実行数取得部24は、スレッド31gと同じ属性を持つスレッドを実行しているCPU20a〜20fの実行数を取得する。
[ステップS13]CPU割り当て制御部25は、ステップS11で取得した上限数と、ステップS12で取得した実行数を比較し、上限数が、実行数より多い場合、ステップS14へ進む。上限数が、実行数以下である場合、ステップS15へ進む。
【0071】
[ステップS14]CPU割り当て制御部25は、実行待ちキュー29の先頭で実行待ちをしているスレッド31gを開放状態にあるCPU20a〜20fに実行させる。
【0072】
[ステップS15]CPU割り当て制御部25は、実行待ちキュー29の先頭で実行待ちをしているスレッド31gを実行待ちキュー29のそのままの位置で実行待ちをさせ、実行待ちキュー29の次の実行待ちをしているスレッド31hを見に行き、ステップS10に戻る。
【0073】
図11は、コンピュータのプロセッサ上限数の変更処理を示したフローチャートである。このフローチャートが開始されると以下の処理が行われる。
[ステップS20]競合計数部27は、スレッド31a〜31fのカーネルA26a、カーネルB26bへの競合回数をスレッド31a〜31fの属性ごとに取得する。
【0074】
[ステップS21]競合計数部27は、競合回数に応じてCPU20a〜20fの占有できる上限数を登録した設定情報テーブル28から、ステップS20で取得した競合回数に対応する、CPU20a〜20fを占有できる上限数を取得する。
【0075】
[ステップS22]競合計数部27は、上限数テーブル23のCPU20a〜20fを占有できる上限数を、ステップS21で取得したCPU20a〜20fを占有できる上限数に変更する。
【0076】
このように、スレッドの属性ごとに、CPUを占有できる上限を設けたので、排他資源の競合機会が増加することがなく、並列動作性の低下を抑制することができ、スレッドの属性ごとに実行できるCPUを決めることなく、開放状態になったCPUにスレッドを割り当てるようにしたのでプロセッサの使用効率の低下を抑えることができる。
【0077】
また、スレッドの排他資源であるカーネルへの競合をリアルタイムに監視し、競合回数が多い場合、スレッドのCPUを占有できる上限数を減らし、競合回数が少ない場合、スレッドのCPUを占有できる上限数を増加するようにしたので、CPUの並列動作性、使用効率を最適の状態にコントロールすることができる。また、スレッドの属性に対応したCPUの割り当て数のチューニングを不要とすることができる。
【0078】
なお、上記の説明において、CPUが実行する実行単位をスレッドとして説明したが、プロセスや、LWP(Light Weight Process)などのプログラム実行単位であってもよい。また、属性をOSの種別としたが、OS上で動作するアプリケーションの種別によって属性を付与してもよい。また、OS、アプリケーションの種別によらず、プログラムの実行単位の内容に応じたフラグや、特定の値、名前などの属性を付与してもよい。さらに、スレッドの排他資源への競合回数をカウントして、CPUを占有できる上限数を変更するようにしたが、スレッドが排他資源をロック(あるスレッドが排他資源を利用している状態)している時間を計測し、ロックした時間に応じてCPUを占有できる上限数を変更するようにしてもよい。また、競合回数のカウント、CPUを占有できる上限数の変更を一定の周期で行うようにしてもよい。
【0079】
また、上記の各コンピュータが有すべき機能の処理内容は、コンピュータで読み取り可能な記録媒体に記録されたプログラムに記述させておくことができる。このプログラムをコンピュータで実行することにより、上記処理がコンピュータで実現できる。コンピュータで読み取り可能な記録媒体としては、磁気記録装置や半導体メモリなどがある。市場に流通させる場合には、CD−ROMやフレキシブルディスクなどの可搬型記録媒体にプログラムを格納して流通させたり、ネットワークを介して接続されたコンピュータの記憶装置に格納しておき、ネットワークを通じて他のコンピュータに転送することもできる。コンピュータで実行する際には、コンピュータ内のハードディスク装置などにプログラムを格納しておき、メインメモリにロードして実行する。
【0080】
(付記1) 複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御プログラムにおいて、
コンピュータに、
プロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、
前記上限数が前記実行数より多い場合、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行させる、
処理を実行させることを特徴とするマルチプロセッサ制御プログラム。
【0081】
(付記2) プロセッサによって実行されている実行単位の排他資源に対する競合回数を前記実行単位の属性ごとに取得し、
前記属性ごとに取得した競合回数に応じて、前記テーブルの前記属性に対応するプロセッサを占有できる上限数を変更する、
処理をさらに実行させることを特徴とする付記1記載のマルチプロセッサ制御プログラム。
【0082】
(付記3) 前記実行待ちをしている実行単位はキュー構造により管理され、前記上限数が前記実行数以下の場合、前記実行待ちをしている実行単位を前記キュー構造のそのままの位置で実行待ちをさせ、前記実行待ちをしている実行単位の次に実行待ちをしている実行単位に前記処理を実行させることを特徴とする付記1記載のマルチプロセッサ制御プログラム。
【0083】
(付記4) 前記実行単位の属性はオペレーションシステムの種別であることを特徴とする付記1記載のマルチプロセッサ制御プログラム。
(付記5) 複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御方法において、
プロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、
前記上限数が前記実行数より多い場合、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行する、
ことを特徴とするマルチプロセッサ制御方法。
【0084】
(付記6) 複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御装置において、
プロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得する属性取得手段と、
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得する上限数取得手段と、
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得する実行数取得手段と、
前記上限数が前記実行数より多い場合、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行する実行手段と、
を有することを特徴とするマルチプロセッサ制御装置。
【0085】
(付記7) 複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御プログラムを記録したコンピュータ読み取り可能な記録媒体において、
コンピュータに、
プロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、
前記上限数が前記実行数より多い場合、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行させる、
処理を実行させることを特徴とするマルチプロセッサ制御プログラムを記録したコンピュータ読み取り可能な記録媒体。
【0086】
【発明の効果】
以上説明したように本発明では、コンピュータに、実行単位の属性ごとに、実行単位がプロセッサを占有できる上限数を設け、実行単位の属性ごとに実行できるプロセッサを決めることなく、開放状態になったプロセッサに実行単位を実行させる。また、実行単位の排他資源に対する競合回数を実行単位の属性ごとに取得し、属性ごとに取得した競合回数に応じて、プロセッサを占有できる上限数を変更する。これにより、プロセッサの並列動作性の低下及び使用効率の低下を抑えることができ、また、並列動作性及び使用効率を最適の状態に制御することができる。
【図面の簡単な説明】
【図1】本発明の原理を説明する原理図である。
【図2】本発明の実施の形態を実現するためのコンピュータのハードウェア構成例である。
【図3】本発明の実施の形態を実現するためのコンピュータの機能ブロック図である。
【図4】実行待ちキューの構造を示した図である。
【図5】スレッドの構造を示した図である。
【図6】CPUのスレッド処理の遷移状態を説明する図(その1)である。
【図7】上限数テーブルに登録されている情報の一例を示した図である。
【図8】CPUのスレッド処理の遷移状態を説明する図(その2)である。
【図9】設定情報テーブルに登録されている情報の一例を示した図である。
【図10】コンピュータのスレッドの割り当て処理を示したフローチャートである。
【図11】コンピュータのプロセッサ上限数の変更処理を示したフローチャートである。
【図12】従来のマルチCPUシステムの動作(その1)を説明する図である。
【図13】従来のマルチCPUシステムの動作(その2)を説明する図である。
【符号の説明】
1,2 コンピュータ
10 属性取得手段
11 上限数取得手段
12 テーブル
13 実行数取得手段
14 実行手段
15a〜15h 実行単位
16a〜16f プロセッサ
20a〜20f CPU
21 属性取得部
22 上限数取得部
23 上限数テーブル
24 実行数取得部
25 CPU割り当て制御部
26a カーネルA
26b カーネルB
27 競合計数部
28 設定情報テーブル
29 実行待ちキュー
30a,30b OS
31a〜31j スレッド
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a multiprocessor control program and a multiprocessor control method, and more particularly, to a multiprocessor control program and a multiprocessor control method for controlling a plurality of processors that execute a plurality of execution units assigned attributes.
[0002]
[Prior art]
Currently, there are various techniques for improving the data processing capability of a computer. Among such technologies, there is a multi-CPU system that improves data processing capability by sharing data processing by a plurality of CPUs (Central Processing Units) and performing parallel processing.
[0003]
There are the following two methods for causing the multi-CPU system to process data in parallel. The first is a method in which execution units of programs such as processes and threads are executed by a plurality of CPUs, and execution units waiting for execution are successively executed by CPUs that have completed execution. The second is to assign an attribute to an execution unit, determine a plurality of CPUs that execute the execution unit for each attribute, cause the CPU to execute the execution unit, and have an attribute that the CPU can execute in order from the CPU that has finished executing. This is a method for executing execution units waiting for execution.
[0004]
FIG. 12 is a diagram for explaining the operation (part 1) of the conventional multi-CPU system. The multi-CPU system shown in the figure has four CPUs 40 to 43. The CPUs 40 to 43 execute processes 40a to 43a, which are program execution units. Processes 44 and 45 are waiting for execution of CPUs 40-43.
[0005]
If the CPU 41 finishes executing the process 41a, the process 41 waiting for execution is executed by the CPU 41. If the CPU 42 finishes executing the process 42a, the CPU 42 executes the process 45 waiting for execution. In this way, the CPU that ends the execution of the process and disconnects the process sequentially executes the processes waiting for execution.
[0006]
FIG. 13 is a diagram for explaining the operation (part 2) of the conventional multi-CPU system. The multi-CPU system shown in the figure includes CPUs 50 and 51 that execute processes having an attribute “#A”, and CPUs 52 and 53 that execute processes having an attribute “#B”. The CPU 50 and CPU 51 execute processes 50a and 51b having the attribute '#A', and the CPU 52 and CPU 53 execute processes 52a and 53a having the attribute '#B'. Further, the processes 54 and 55 having the attribute “#A” are waiting for the execution of the CPUs 50 and 51, and the processes 56 and 57 having the attribute “#B” are waiting for the execution of the CPUs 52 and 53.
[0007]
If the CPU 50 finishes executing the process 50a, the CPU 50 executes the process 54 having the attribute “#A” waiting for execution. If the CPU 52 finishes executing the process 52 a, the CPU 52 executes the process 56 having the attribute “#B” waiting for execution. In this way, attributes are assigned to processes, the CPU that executes the process is determined for each attribute, and the CPU that ends the process execution and detaches the process executes the processes waiting for execution of the determined attribute in order. I will do it.
[0008]
[Problems to be solved by the invention]
Here, in FIG. 12, it is assumed that the process 40a executed by the CPU 40 uses the exclusive resource. Further, it is assumed that the processes 41a and 42a executed by the CPUs 41 and 42 also try to use exclusive resources. At this time, the CPUs 41 and 42 cannot advance the execution of the processes 41a and 42a until the use of the exclusive resources of the process 40a is completed (exclusive resource conflict). For this reason, only the CPU 43 is in a state where the execution of the process 43a is completed and the processes 44 and 45 waiting for execution can be executed, and the parallel operability deteriorates.
[0009]
As described above, in the method in which the execution units that are waiting for execution are executed one after another by the CPU that has finished executing, there is a problem in that parallel operability deteriorates when the opportunity for exclusive resource contention increases. .
[0010]
Further, in FIG. 13, it is assumed that a conflict of exclusive resources of the processes 50a and 51a having the attribute “#A” occurs. Execution of the processes 52 a and 53 a having the attribute “#B” is ensured by the CPUs 52 and 53. However, even if the execution of the processes 52a, 53a, 56, and 57 having the attribute '#B' by the CPUs 52 and 53 is completed, the processes 54 and 55 having the attribute '#A' waiting for execution remain in the CPUs 52 and 53. The CPU is not used efficiently.
[0011]
As described above, in the method in which the effective unit has an attribute and the execution unit is executed by the CPU for each attribute, the opportunity for exclusive resource contention can be reduced, but there is a problem in that the CPU usage efficiency is lowered. .
[0012]
The present invention has been made in view of these points, and an object of the present invention is to provide a multiprocessor control program that suppresses a decrease in parallel operability of processors and a decrease in use efficiency of processors.
[0013]
[Means for Solving the Problems]
  To solve the above problem,In a multiprocessor control program that controls multiple processors that execute multiple execution units, when the processing functions of any processor are in the open state, the execution unit attributes that are waiting for execution are acquired and executed by the computer. Execution of a processor that executes the execution unit having the same attribute as the acquired attribute, by acquiring the upper limit number corresponding to the acquired attribute from a table in which the upper limit number that can occupy the processor for each unit attribute is registered. When the number is acquired and the upper limit number is larger than the execution number, the execution unit waiting for execution is executed by the processor in the open state without determining a processor that can be executed for each attribute of the execution unit, and the processor For each attribute of the execution unit, obtain the number of times of contention for the exclusive resource of the execution unit executed by According to the acquired competing number, it changes the upper limit number can occupy the processor corresponding to the attribute of the table,It is characterized by having processing executedA multiprocessor control program is provided.
[0014]
  According to such a multiprocessor control program,For each attribute of the execution unit, an upper limit number that the execution unit can occupy the processor is provided, and the execution unit is executed by the processor in the open state without determining the processor that can be executed for each attribute of the execution unit. Further, the number of times of contention for the exclusive resource of the execution unit is acquired for each attribute of the execution unit, and the upper limit number that can occupy the processor is changed according to the number of times of contention acquired for each attribute.
[0015]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a principle diagram illustrating the principle of the present invention.
[0016]
In this figure, the computer 1 has attribute acquisition means 10, upper limit number acquisition means 11, table 12, execution number acquisition means 13, execution means 14, execution units 15a to 15h having attributes, and processors 16a to 16f.
[0017]
The attribute acquisition unit 10 acquires an attribute of an execution unit waiting for execution when the processing function of the processor is in an open state.
The upper limit number acquisition unit 11 acquires from the table 12 the upper limit number that can occupy the processor corresponding to the execution unit attribute waiting for execution acquired by the attribute acquisition unit 10.
[0018]
In the table 12, the upper limit number that can occupy the processor is registered in advance for each attribute of the execution unit.
The execution number acquisition unit 13 acquires the number of executions that is the number of processors that are executing execution units having the same attribute as the attribute of the execution unit waiting for execution acquired by the attribute acquisition unit 10.
[0019]
If the upper limit number that can occupy the processor acquired by the upper limit number acquisition unit 11 is greater than the execution number of the processor acquired by the execution number acquisition unit 13, the execution unit 14 determines whether the processor has an open processing function. Execute the execution unit that was waiting for execution.
[0020]
The execution units 15a to 15h are program execution units executed by the processor. The execution unit 15a has the attribute “# 1”. The execution unit 15b has the attribute “# 1”. The execution unit 15c has the attribute “# 2”. The execution unit 15d has the attribute “# 1”. The execution unit 15e has an attribute “# 2”. The execution unit 15f has an attribute “# 1”. The execution unit 15g has the attribute “# 1”. The execution unit 15h has an attribute “# 2”.
[0021]
The processors 16a to 16f execute execution units assigned by the execution means 14.
The operation of the principle diagram of FIG. 1 will be described below.
[0022]
As shown in FIG. 1, it is assumed that the processor 16a is executing the execution unit 15a. It is assumed that the processor 16b is executing the execution unit 15b. Assume that the processor 16c is executing the execution unit 15c. It is assumed that the processor 16d is executing the execution unit 15d. It is assumed that the processor 16e is executing the execution unit 15e. It is assumed that the processor 16f is executing the execution unit 15f. Further, it is assumed that the execution units 15g and 15h are waiting for execution of the processors 16a to 16f.
[0023]
Here, it is assumed that the processor 16b has finished executing the execution unit 15b. The processor 16b is in a released state, and the attribute acquisition unit 10 acquires the attribute “# 1” of the execution unit 15g waiting for execution.
[0024]
The upper limit number acquisition unit 11 acquires the upper limit number that can occupy the processor corresponding to the attribute # 1 of the execution unit 15g from the table 12. Here, in the table 12, the upper limit number that the execution unit having the attribute “# 1” can occupy the processor is “9999”, and the upper limit number that the execution unit having the attribute “# 2” can occupy the processor is “2”. Suppose that it is registered. Accordingly, the upper limit number acquisition unit 11 acquires the upper limit number “9999” that can be occupied by the execution unit of the attribute “# 1”.
[0025]
Here, the upper limit number '9999' indicates that the processors 16a to 16f can be assigned without being restricted. This is because the computer 1 has only six processors and the maximum number that can occupy the processors is ‘6’.
[0026]
The execution number acquisition unit 13 acquires the execution number of the processor executing the same execution unit as the attribute ‘# 1’ of the execution unit 15g waiting for execution acquired by the attribute acquisition unit 10. Considering that the processor 16b is in an open state, there are three processors 16a, 16d, and 16f that are executing the execution unit of the attribute “# 1”. Get the number '3'.
[0027]
The execution means 14 waits for execution because the upper limit number “9999” that can occupy the processor acquired by the upper limit number acquisition means 11 is larger than the execution number “3” of the processor acquired by the execution number acquisition means 13. The execution unit 15g is executed by the processor 16b.
[0028]
Since the execution unit 15g is assigned to the processor 16b, the execution unit 15h is in a state of waiting for execution in FIG.
Here, it is assumed that the processor 16d has finished executing the execution unit 15d. Then, the processor 16d has the processing function released, and the attribute acquisition unit 10 acquires the attribute “# 2” of the execution unit 15h waiting for execution.
[0029]
The upper limit number acquisition unit 11 acquires from the table 12 the upper limit number that can occupy the processor corresponding to the attribute “# 2” of the execution unit 15 h. As described above, the upper limit number that the execution unit having the attribute “# 1” can occupy the processor is “9999” and the upper limit number that the execution unit having the attribute “# 2” can occupy the processor is “2”. ', And registered. Accordingly, the upper limit number acquisition unit 11 acquires the upper limit number “2” that the execution unit of the attribute “# 2” can occupy the processor.
[0030]
The execution number acquisition unit 13 acquires the number of executions of the processor executing the execution unit acquired by the attribute acquisition unit 10 and having the same attribute as the attribute '# 2' of the execution unit 15h waiting for execution. . Considering that the processor 16d is currently in an open state and that the processor 16b is executing the execution unit 15g of the attribute '# 1' from the above description, the execution unit of the attribute '# 2' There are two processors 16c and 16e, and the execution number acquisition means 13 acquires the execution number '2'.
[0031]
The execution unit 14 waits for execution because the upper limit number “2” that can occupy the processor acquired by the upper limit number acquisition unit 11 is the same as the execution number “2” of the processor acquired by the execution number acquisition unit 13. The processor 16d is not allowed to execute the executed execution unit 15h.
[0032]
In this way, for each attribute of the execution unit, an upper limit number that can occupy the processor is set, the competition opportunity of the execution unit is suppressed, and the processor that has been released can be determined without determining the processor that can be executed for each attribute of the execution unit. Since execution units are executed, it is possible to suppress a decrease in processor parallel operation and usage efficiency.
[0033]
Next, a hardware configuration for realizing the embodiment of the present invention will be described.
FIG. 2 is a hardware configuration example of a computer for realizing the embodiment of the present invention.
[0034]
As shown in the figure, the computer 2 includes CPUs 20a to 20f, RAMs (Random Access Memory) 20aa to 20af connected to the CPUs 20a to 20f, a hard disk drive (HDD) 20g, an input interface 20h, a keyboard 20i, The graphics processing device 20j, the monitor 20k, the communication interface 201, and the bus 20m are included.
[0035]
The RAMs 20aa to 20af temporarily store at least part of programs executed by the CPUs 20a to 20f. The RAMs 20aa to 20af store various data necessary for processing by the CPUs 20a to 20f.
[0036]
The HDD 20g stores a program for controlling the parallel operation of the CPUs 20a to 20f. The CPUs 20a to 20f execute program execution units such as threads in accordance with a program for controlling parallel operations of the HDD 20g.
[0037]
A keyboard 20i is connected to the input interface 20h. The input interface 20h transmits a signal transmitted from the keyboard 20i to the CPUs 20a to 20f via the bus 20m.
[0038]
A monitor 20k is connected to the graphic processing device 20j. The graphic processing device 20j displays an image on the display screen of the monitor 20k in accordance with instructions from the CPUs 20a to 20f.
[0039]
The communication interface 20l is connected to the network 20n. The communication interface 201 enables the computer 2 to communicate with other devices via the network 20n.
[0040]
The bus 20m connects the CPUs 20a to 20f, the HDD 20g, the input interface 20h, the graphic processing device 20j, and the communication interface 20l.
[0041]
In the above description, a hardware configuration in which a RAM is connected to each CPU is shown. However, a hardware configuration in which one RAM is shared for the entire CPU may be used, and a plurality of RAMs smaller than the number of CPUs are used. The hardware configuration may be the same.
[0042]
Next, functions of a computer for realizing the embodiment of the present invention will be described.
FIG. 3 is a functional block diagram of a computer for realizing the embodiment of the present invention.
[0043]
The computer 2 shown in the figure includes a CPU 20a to 20f, an attribute acquisition unit 21, an upper limit number acquisition unit 22, an upper limit number table 23, an execution number acquisition unit 24, a CPU allocation control unit 25, a kernel A 26a, a kernel B 26b, a contention counting unit 27, It includes a setting information table 28, an execution waiting queue 29, an OS (Operating System) 30a, an OS 30b, and threads 31a to 31j having attributes.
[0044]
When the CPUs 20a to 20f are in an open state, the attribute acquisition unit 21 acquires the attributes of threads that are waiting for execution at the head of the execution waiting queue 29 (details will be described later).
The upper limit number acquisition unit 22 acquires, from the upper limit number table 23, the upper limit number that can be occupied by the CPU, corresponding to the attribute of the thread waiting for execution, acquired by the attribute acquisition unit 21.
[0045]
The upper limit number table 23 registers the upper limit number that can occupy the CPU for each attribute of the thread.
The execution number acquisition unit 24 acquires the number of executions, which is the number of CPUs that are executing threads having the same attribute as that of the thread waiting for execution acquired by the attribute acquisition unit 21.
[0046]
When the upper limit number acquired by the upper limit number acquisition unit 22 is larger than the execution number acquired by the execution number acquisition unit 24, the CPU allocation control unit 25 sends the waiting queue to the CPU whose processing function is open. A thread waiting for execution at the head of 29 is allocated. Further, when the upper limit number acquired by the upper limit number acquisition unit 22 is equal to or less than the execution number acquired by the execution number acquisition unit 24, the CPU allocation control unit 25 waits for execution at the head of the execution waiting queue 29. Causes the thread to wait for execution at the end.
[0047]
The kernel A 26a and the kernel B 26b are programs used when a thread realizes a specific process. The kernel A 26a and the kernel B 26b are exclusive resources, and when a certain thread uses the kernel A 26a or the kernel B 26b, other threads cannot use the kernel A 26a and the kernel B 26b, and thread contention. May occur.
[0048]
The contention counting unit 27 counts the number of times of contention per unit time for the kernel A26a and kernel B26b of the thread for each attribute. Further, the contention counting unit 27 refers to the setting information table 28, acquires the upper limit number that can occupy the CPU according to the number of times the thread competes with the kernel A26a and the kernel B26b, and occupies the CPU of the upper limit number table 23. Change the maximum number you can.
[0049]
The setting information table 28 registers the upper limit number that can occupy the CPU corresponding to the number of times the kernel A 26a and the kernel B 26b compete for each thread attribute. The execution queue 29 manages the threads generated from the OSs 30a and 30b so that the CPU allocation control unit 25 processes the threads in the order in which the CPU allocation is necessary. Here, the structure of the execution queue will be described. FIG. 4 shows the structure of the execution queue. As shown in the figure, the waiting queue 29 has a queue management unit 29a. The queue management unit 29a arranges the threads generated from the OSs 30a and 30b in order in the order in which the CPU needs to be allocated. In FIG. 4, a thread 31g is a thread that needs to be assigned a CPU first, and a thread 31h is a thread that needs to be assigned a CPU later. The thread 31g is the head waiting for execution, and the thread 31h is the tail waiting for execution.
[0050]
The OSs 30 a and 30 b generate threads that are program execution units and send them to the execution waiting queue 29. At this time, the OSs 30a and 30b assign 'OS # 1' and 'OS # 2' indicating the types of the OSs 30a and 30b as thread attributes.
[0051]
The threads 31a to 31j are program execution units. The thread 31a has the attribute “OS # 2”. The thread 31b has the attribute “OS # 1”. The thread 31c has the attribute “OS # 1”. The thread 31d has the attribute “OS # 2”. The thread 31e has the attribute “OS # 1”. The thread 31f has the attribute “OS # 1”. The thread 31g has the attribute “OS # 2”. The thread 31h has the attribute “OS # 1”. The thread 31i has the attribute “OS # 2”. The thread 31j has an attribute “OS # 1”.
[0052]
Here, the structure of the thread will be described. FIG. 5 is a diagram showing a thread structure. The thread 31a is divided into a program management area 31aa and a thread management table area 31ab. The program management area 31aa is further divided into a program area 31aaa for storing an application program and a data area 31aab for storing data used by the application program. The thread management table area 31ab is further divided into an attribute area 31aba for storing thread attributes, a register save area 31abb for storing CPU register values, and a data area 31abc for storing data used by the OS. The register save area 31abb stores, for example, CPU register values (for example, CPU register A... Register E values) when the execution of the thread 31a is interrupted. Then, when the thread 31a is executed by the CPU next time, the register value stored in the register save area 31abb is expanded into the CPU register and executed.
[0053]
The processing flow of the functional block diagram of the computer shown in FIG. 3 will be described below.
As shown in FIG. 3, it is assumed that the CPU 20a is executing a thread 31a. It is assumed that the CPU 20b is executing the thread 31b. It is assumed that the CPU 20c is executing the thread 31c. It is assumed that the CPU 20d is executing the thread 31d. It is assumed that the CPU 20e is executing the thread 31e. It is assumed that the CPU 20f is executing the thread 31f. Further, it is assumed that the thread 31g and the thread 31h are waiting for execution in the execution waiting queue 29.
[0054]
Here, it is assumed that the CPU 20b finishes executing the thread 31b and disconnects it. Then, the processing function of the CPU 20b is released. FIG. 6 is a diagram (part 1) for explaining a transition state of thread processing of the CPU. The CPU 20a and the CPUs 20c to 20f execute the thread 31a and the threads 31c to 31f, and the CPU 20b indicates a state where the thread is not executed (open state).
[0055]
When the CPU 20 b is released, the attribute acquisition unit 21 acquires the attribute “OS # 2” of the thread 31 g waiting for execution at the head of the execution queue 29.
The upper limit number acquisition unit 22 acquires from the upper limit number table 23 the upper limit number that can occupy the CPU corresponding to the attribute “OS # 2” of the thread 31g waiting for execution at the head of the execution queue 29. FIG. 7 is a diagram illustrating an example of information registered in the upper limit number table. In the upper limit number table 23 in the figure, “4” is registered as the upper limit number that can occupy the processor corresponding to the attribute “OS # 1”, and “2” is registered as the upper limit number that can occupy the processor corresponding to the attribute “OS # 2”. Has been.
[0056]
From FIG. 7, the upper limit number acquisition unit 22 acquires the upper limit number “2” that can occupy the CPU corresponding to the attribute “OS # 2”.
The execution number acquisition unit 24 acquires the number of CPUs that are executing the thread having the same attribute as the attribute “OS # 2” of the thread 31g waiting for execution, acquired by the attribute acquisition unit 21. In FIG. 6, since the CPUs 20 a and 20 d execute the threads 31 a and 31 d having the attribute “OS # 2”, the execution number acquisition unit 24 acquires the execution number “2”.
[0057]
The upper limit number acquired by the upper limit number acquisition unit 22 is “2”, and the maximum number of threads that can be assigned to the CPU having the attribute “OS # 2” is “2”. The number of executions acquired by the execution number acquisition unit 24 is “2”, and a thread having the attribute “OS # 2” is already assigned to the CPU as “2”. As a result, the CPU allocation control unit 25 does not cause the CPU 20b in the released state to execute the thread 31g waiting for execution.
[0058]
The CPU allocation control unit 25 holds the thread 31g waiting for execution at the head of the execution waiting queue 29 so as to wait for execution in the same order, and goes to see the next thread 31h waiting for execution. .
[0059]
Since the CPU 20b is still in the released state, the attribute acquisition unit 21 acquires the attribute “OS # 1” of the thread 31h waiting for execution in the execution queue 29.
The upper limit number acquisition unit 22 acquires from the upper limit number table 23 the upper limit number that can occupy the CPU corresponding to the attribute “OS # 1” of the thread 31 h waiting for execution in the execution waiting queue 29. From FIG. 7, the upper limit number acquiring unit 22 acquires the upper limit number “4” that can occupy the CPU corresponding to the attribute “OS # 1”.
[0060]
The number-of-execution acquisition unit 24 acquires the number of CPUs that are executing the thread having the same attribute as the attribute “OS # 1” of the thread 31 h that is waiting for execution, acquired by the attribute acquisition unit 21. In FIG. 6, since the CPUs 20 c, 20 e, and 20 f are executing the thread with the attribute “OS # 1”, the execution number acquisition unit 24 acquires the execution number “3”.
[0061]
The upper limit number acquired by the upper limit number acquiring unit 22 is “4”, and the maximum number of threads that can be assigned to the CPU with the attribute “OS # 1” is “4”. The number of executions '3' acquired by the execution number acquisition unit 24, and the thread 31h can be assigned to the CPU 20b in the released state. FIG. 8 is a diagram (part 2) for explaining the transition state of the thread processing of the CPU. As shown in the figure, a thread 31h is assigned to the CPU 20b.
[0062]
Next, the flow of processing for changing the upper limit number in the upper limit number table 23 in the functional block diagram of FIG. 3 will be described.
The contention counting unit 27 counts the number of times the threads 31a to 31f compete with the kernel A26a and the kernel B26b, and refers to the setting information table 28 to change the upper limit number that can occupy the CPU in the upper limit number table 23.
[0063]
FIG. 9 is a diagram illustrating an example of information registered in the setting information table. In the setting information table 28 shown in the figure, if the contention of the thread having the attribute “OS # 1” with respect to the kernel A 26a is 5000 times or more per second, information that the upper limit number that can occupy the CPU is “2” is registered. ing. Similarly, if the competition is 1000 times or more and less than 5000 times per second, the upper limit number is “3”, and if the competition is less than 1000 times per second, the upper limit number is “4”. Further, if the thread having the attribute “OS # 2” competes with the kernel B26b for 7000 times or more per second, the upper limit number that can occupy the CPU is “2”, and if the contention is less than 5000 times per second, the upper limit. The number “3” is registered.
[0064]
Here, it is assumed that the thread 31b, 31c, 31e, 31f having the attribute “OS # 1” illustrated in FIG. 3 competes with the kernel A 26a more than 5000 times per second. The contention counting unit 27 acquires from the setting information table 28 the CPU upper limit number “2” corresponding to the number of times the thread having the attribute “OS # 1” is 5000 times or more, and the upper limit number table 23 shown in FIG. The upper limit number of CPUs corresponding to the attribute “OS # 1” is changed to “2”. Similarly, if the number of times of contention is 1000 times or more and less than 5000 times per second, the contention counting unit 27 obtains the CPU upper limit number “3” from the setting information table 28 and sets the attribute “OS # 1” of the upper limit number table 23. The upper limit number of CPUs corresponding to 'is changed to' 3 '. If it is less than 1000 times, the contention counting unit 27 obtains the CPU upper limit number “4” from the setting information table 28 and sets the upper limit number of CPUs corresponding to the attribute “OS # 1” in the upper limit number table 23 to “4”. Change to
[0065]
Similarly, the contention counting unit 27 counts the number of times the threads 31 a and 31 d having the attribute “OS # 2” for the kernel B 26 b compete, and changes the CPU upper limit number in the upper limit number table 23. If the contention to the kernel B 26b is 7000 times or more per second, the contention counting unit 27 refers to the setting information table 28 and the CPU upper limit number corresponding to the contention number 7000 times or more of the attribute “OS # 2”. 2 is acquired, and the CPU upper limit number corresponding to the attribute “OS # 2” in the upper limit number table 23 is changed to “2”. If it is less than 4000 times, the CPU upper limit number is changed to '3'.
[0066]
If the number of times that the attribute “OS # 2” conflicts with the kernel B 26 b is 4000 times or more and less than 7000 times, the contention counting unit 27 does not change the CPU upper limit number in the upper limit number table 23. A history is given to the change of the upper limit number of CPUs to prevent the upper limit number of CPUs from being changed frequently.
[0067]
Next, the processing flow of the computer 2 will be described using a flowchart.
FIG. 10 is a flowchart showing the thread assignment process of the computer. When this flowchart is started, the following processing is performed.
[0068]
[Step S10] The attribute acquisition unit 21 acquires the attribute of the thread 31g waiting for execution at the head of the execution queue 29 when any of the processing functions of the CPUs 20a to 20f is in the open state.
[0069]
[Step S11] The upper limit number acquisition unit 22 acquires the upper limit number that can occupy the CPUs 20a to 20f corresponding to the attribute of the thread 31g from the upper limit number table 23 that registers the upper limit number that can occupy the CPUs 20a to 20f for each attribute of the thread. To do.
[0070]
[Step S12] The execution number acquisition unit 24 acquires the number of executions of the CPUs 20a to 20f that are executing threads having the same attribute as the thread 31g.
[Step S13] The CPU allocation control unit 25 compares the upper limit number acquired in step S11 with the execution number acquired in step S12. If the upper limit number is larger than the execution number, the process proceeds to step S14. When the upper limit number is equal to or less than the execution number, the process proceeds to step S15.
[0071]
[Step S14] The CPU allocation control unit 25 causes the CPUs 20a to 20f in the released state to execute the thread 31g waiting for execution at the head of the execution waiting queue 29.
[0072]
[Step S15] The CPU allocation control unit 25 causes the thread 31g waiting for execution at the head of the execution queue 29 to wait for execution at the same position in the execution queue 29 and waits for the next execution in the execution queue 29. Go to see the thread 31h that is doing, and return to step S10.
[0073]
FIG. 11 is a flowchart showing processing for changing the upper limit number of processors of a computer. When this flowchart is started, the following processing is performed.
[Step S20] The contention counting unit 27 acquires the number of times the threads 31a to 31f compete with the kernel A 26a and the kernel B 26b for each attribute of the threads 31a to 31f.
[0074]
[Step S21] The contention counting unit 27, from the setting information table 28 in which the upper limit number that the CPUs 20a to 20f can occupy is registered according to the number of times of competition, the upper limit that can occupy the CPUs 20a to 20f corresponding to the number of times of competition acquired in step S20. Get the number.
[0075]
[Step S22] The contention counting unit 27 changes the upper limit number that can occupy the CPUs 20a to 20f in the upper limit number table 23 to the upper limit number that can occupy the CPUs 20a to 20f acquired in Step S21.
[0076]
In this way, because there is an upper limit that can occupy the CPU for each attribute of the thread, there is no increase in exclusive resource contention opportunities, and a reduction in parallel operability can be suppressed. Since a thread is assigned to a CPU that is in an open state without deciding which CPU can be used, it is possible to suppress a decrease in processor use efficiency.
[0077]
In addition, the contention to the kernel, which is an exclusive resource of the thread, is monitored in real time, and if the number of times of contention is high, the upper limit number that can occupy the CPU of the thread is reduced. Since the number is increased, it is possible to control the parallel operability and usage efficiency of the CPU to an optimum state. Further, it is possible to eliminate the need for tuning the number of CPU allocations corresponding to thread attributes.
[0078]
In the above description, the execution unit executed by the CPU is described as a thread. However, a process execution unit such as a process or LWP (Light Weight Process) may be used. Further, although the attribute is the OS type, the attribute may be given depending on the type of application running on the OS. Further, an attribute such as a flag corresponding to the contents of the program execution unit, a specific value, or a name may be added regardless of the type of OS or application. Furthermore, the number of times the thread competes with the exclusive resource is counted, and the upper limit number that can occupy the CPU is changed. However, the thread locks the exclusive resource (a state in which a thread uses the exclusive resource). The upper limit number that can occupy the CPU may be changed according to the locked time. Further, the count of the number of times of competition and the change of the upper limit number that can occupy the CPU may be performed at a constant cycle.
[0079]
Further, the processing contents of the functions that each computer should have can be described in a program recorded on a computer-readable recording medium. By executing this program on a computer, the above processing can be realized on the computer. Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory. When distributing to the market, the program is stored and distributed on a portable recording medium such as a CD-ROM or flexible disk, or stored in a storage device of a computer connected via a network. Can also be transferred to other computers. When executed by a computer, the program is stored in a hard disk device or the like in the computer, loaded into the main memory, and executed.
[0080]
(Supplementary Note 1) In a multiprocessor control program for controlling a plurality of processors that execute a plurality of execution units,
On the computer,
When the processing function of the processor is open, get the attribute of the execution unit waiting for execution,
From the table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered, the upper limit number corresponding to the acquired attribute is acquired,
Obtain the number of executions of the processor that is executing the execution unit having the same attribute as the obtained attribute,
If the upper limit is greater than the number of executions, the released processor is caused to execute the execution unit waiting for execution;
A multiprocessor control program for executing a process.
[0081]
(Supplementary Note 2) Obtain the number of times of contention for the exclusive resource of the execution unit being executed by the processor for each attribute of the execution unit,
According to the number of conflicts acquired for each attribute, change the upper limit number that can occupy the processor corresponding to the attribute of the table,
The multiprocessor control program according to appendix 1, wherein the processing is further executed.
[0082]
(Supplementary Note 3) The execution unit waiting for execution is managed by a queue structure, and when the upper limit number is equal to or less than the execution number, the execution unit waiting for execution is executed at the position of the queue structure as it is. The multiprocessor control program according to appendix 1, wherein the processing is executed by an execution unit waiting for execution next to the execution unit waiting for execution.
[0083]
(Supplementary note 4) The multiprocessor control program according to supplementary note 1, wherein the attribute of the execution unit is a type of an operation system.
(Supplementary Note 5) In a multiprocessor control method for controlling a plurality of processors that execute a plurality of execution units,
When the processing function of the processor is open, get the attribute of the execution unit waiting for execution,
From the table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered, the upper limit number corresponding to the acquired attribute is acquired,
Obtain the number of executions of the processor that is executing the execution unit having the same attribute as the obtained attribute,
When the upper limit number is larger than the execution number, the execution unit waiting for the execution is executed to the open processor.
And a multiprocessor control method.
[0084]
(Supplementary Note 6) In a multiprocessor control device that controls a plurality of processors that execute a plurality of execution units,
Attribute acquisition means for acquiring an attribute of an execution unit waiting for execution when the processing function of the processor is in an open state;
An upper limit number acquisition unit that acquires the upper limit number corresponding to the acquired attribute from a table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered;
Execution number acquisition means for acquiring the execution number of a processor executing an execution unit having the same attribute as the acquired attribute;
When the upper limit number is larger than the execution number, execution means for executing the execution unit waiting for the execution in the open processor;
A multiprocessor control device comprising:
[0085]
(Supplementary note 7) In a computer-readable recording medium that records a multiprocessor control program for controlling a plurality of processors that execute a plurality of execution units,
On the computer,
When the processing function of the processor is open, get the attribute of the execution unit waiting for execution,
From the table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered, the upper limit number corresponding to the acquired attribute is acquired,
Obtain the number of executions of the processor that is executing the execution unit having the same attribute as the obtained attribute,
If the upper limit is greater than the number of executions, the released processor is caused to execute the execution unit waiting for execution;
A computer-readable recording medium on which a multiprocessor control program is recorded.
[0086]
【The invention's effect】
  As described above, in the present invention, the computer is provided with an upper limit number of execution units that can occupy the processor for each execution unit attribute, and the computer is in an open state without determining the processor that can be executed for each execution unit attribute. Causes the processor to execute an execution unit. Further, the number of times of contention for the exclusive resource of the execution unit is acquired for each attribute of the execution unit, and the upper limit number that can occupy the processor is changed according to the number of times of contention acquired for each attribute. This, It is possible to suppress degradation of processor parallel operation and use efficiency.In addition, parallel operability and usage efficiency can be controlled to the optimum stateThe
[Brief description of the drawings]
FIG. 1 is a principle diagram illustrating the principle of the present invention.
FIG. 2 is a hardware configuration example of a computer for realizing an embodiment of the present invention.
FIG. 3 is a functional block diagram of a computer for realizing an embodiment of the present invention.
FIG. 4 is a diagram illustrating a structure of an execution queue.
FIG. 5 is a diagram showing the structure of a thread.
FIG. 6 is a diagram (part 1) illustrating a transition state of thread processing of a CPU.
FIG. 7 is a diagram illustrating an example of information registered in an upper limit number table.
FIG. 8 is a diagram (part 2) illustrating a transition state of thread processing of a CPU.
FIG. 9 is a diagram illustrating an example of information registered in a setting information table.
FIG. 10 is a flowchart showing computer thread assignment processing;
FIG. 11 is a flowchart showing processing for changing the upper limit number of processors of a computer.
FIG. 12 is a diagram for explaining an operation (part 1) of a conventional multi-CPU system.
FIG. 13 is a diagram for explaining the operation (part 2) of the conventional multi-CPU system.
[Explanation of symbols]
1,2 computer
10 Attribute acquisition means
11 Upper limit number acquisition means
12 tables
13 Execution number acquisition means
14 Execution means
15a-15h Execution unit
16a-16f processor
20a-20f CPU
21 Attribute acquisition part
22 Upper limit number acquisition part
23 Upper limit number table
24 execution number acquisition part
25 CPU allocation controller
26a Kernel A
26b Kernel B
27 Competition counter
28 Setting information table
29 Waiting queue
30a, 30b OS
31a-31j threads

Claims (4)

複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御プログラムにおいて、
コンピュータに、
いずれかのプロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、
前記上限数が前記実行数より多い場合、実行単位の属性ごとに実行できるプロセッサを決めることなく、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行させ、
プロセッサによって実行されている実行単位の排他資源に対する競合回数を実行単位の属性ごとに取得し、
前記属性ごとに取得した競合回数に応じて、前記テーブルの前記属性に対応するプロセッサを占有できる上限数を変更する、
処理を実行させることを特徴とするマルチプロセッサ制御プログラム。
In a multiprocessor control program for controlling a plurality of processors that execute a plurality of execution units,
On the computer,
When the processing function of any processor is in the open state, get the attribute of the execution unit waiting for execution,
From the table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered, the upper limit number corresponding to the acquired attribute is acquired,
Obtain the number of executions of the processor that is executing the execution unit having the same attribute as the obtained attribute,
When the upper limit is greater than the number of executions, without determining the processor that can be executed for each attribute of the execution unit, the processor in the open state executes the execution unit waiting for execution ,
Get the number of times of contention for the exclusive resource of the execution unit being executed by the processor for each attribute of the execution unit,
According to the number of conflicts acquired for each attribute, change the upper limit number that can occupy the processor corresponding to the attribute of the table,
A multiprocessor control program for executing a process.
前記実行待ちをしている実行単位はキュー構造により管理され、前記上限数が前記実行数以下の場合、前記実行待ちをしている実行単位を前記キュー構造のそのままの位置で実行待ちをさせ、前記実行待ちをしている実行単位の次に実行待ちをしている実行単位を前記実行待ちしている実行単位とすることを特徴とする請求項1記載のマルチプロセッサ制御プログラム。The execution unit waiting for execution is managed by a queue structure, and when the upper limit number is less than or equal to the execution number, the execution unit waiting for execution is made to wait for execution at the same position of the queue structure, 2. The multiprocessor control program according to claim 1, wherein an execution unit waiting for execution next to the execution unit waiting for execution is set as the execution unit waiting for execution. 実行単位の属性はオペレーティングシステムの種別であることを特徴とする請求項1記載のマルチプロセッサ制御プログラム。The multiprocessor control program according to claim 1, wherein the attribute of the execution unit is a type of an operating system. 複数の実行単位を実行する複数のプロセッサを制御するマルチプロセッサ制御方法において、In a multiprocessor control method for controlling a plurality of processors that execute a plurality of execution units,
いずれかのプロセッサの処理機能が開放状態のとき、実行待ちをしている実行単位の属性を取得し、  When the processing function of any processor is in the open state, get the attribute of the execution unit waiting for execution,
実行単位の属性ごとにプロセッサを占有できる上限数を登録したテーブルから、前記取得した属性に対応する前記上限数を取得し、  From the table in which the upper limit number that can occupy the processor for each attribute of the execution unit is registered, the upper limit number corresponding to the acquired attribute is acquired,
前記取得した属性と同じ属性を持つ実行単位を実行しているプロセッサの実行数を取得し、  Obtain the number of executions of the processor that is executing the execution unit having the same attribute as the obtained attribute,
前記上限数が前記実行数より多い場合、実行単位の属性ごとに実行できるプロセッサを決めることなく、前記開放状態のプロセッサに前記実行待ちをしている実行単位を実行させ、  When the upper limit is greater than the number of executions, without determining the processor that can be executed for each attribute of the execution unit, the processor in the open state executes the execution unit waiting for execution,
プロセッサによって実行されている実行単位の排他資源に対する競合回数を実行単位の属性ごとに取得し、  Get the number of times of contention for the exclusive resource of the execution unit being executed by the processor for each attribute of the execution unit,
前記属性ごとに取得した競合回数に応じて、前記テーブルの前記属性に対応するプロセッサを占有できる上限数を変更する、  According to the number of conflicts acquired for each attribute, change the upper limit number that can occupy the processor corresponding to the attribute of the table,
ことを特徴とするマルチプロセッサ制御方法。  And a multiprocessor control method.
JP2001384027A 2001-12-18 2001-12-18 Multiprocessor control program and multiprocessor control method Expired - Fee Related JP4127354B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001384027A JP4127354B2 (en) 2001-12-18 2001-12-18 Multiprocessor control program and multiprocessor control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001384027A JP4127354B2 (en) 2001-12-18 2001-12-18 Multiprocessor control program and multiprocessor control method

Publications (2)

Publication Number Publication Date
JP2003186856A JP2003186856A (en) 2003-07-04
JP4127354B2 true JP4127354B2 (en) 2008-07-30

Family

ID=27593866

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001384027A Expired - Fee Related JP4127354B2 (en) 2001-12-18 2001-12-18 Multiprocessor control program and multiprocessor control method

Country Status (1)

Country Link
JP (1) JP4127354B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9170844B2 (en) * 2009-01-02 2015-10-27 International Business Machines Corporation Prioritization for conflict arbitration in transactional memory management

Also Published As

Publication number Publication date
JP2003186856A (en) 2003-07-04

Similar Documents

Publication Publication Date Title
US10545789B2 (en) Task scheduling for highly concurrent analytical and transaction workloads
US8122451B2 (en) Method and apparatus for dispatching tasks in a non-uniform memory access (NUMA) computer system
CN105579961B (en) Data processing system, operating method and hardware unit for data processing system
US5333319A (en) Virtual storage data processor with enhanced dispatching priority allocation of CPU resources
US6871264B2 (en) System and method for dynamic processor core and cache partitioning on large-scale multithreaded, multiprocessor integrated circuits
CN108549574B (en) Thread scheduling management method and device, computer equipment and storage medium
US7428629B2 (en) Memory request / grant daemons in virtual nodes for moving subdivided local memory space from VN to VN in nodes of a massively parallel computer system
US20050144332A1 (en) Autonomic input/output scheduler selector
US20080148300A1 (en) Providing Policy-Based Operating System Services in a Hypervisor on a Computing System
JPH0640324B2 (en) Multiprocessor system and process synchronization method thereof
US9632842B2 (en) Exclusive access control method prohibiting attempt to access a shared resource based on average number of attempts and predetermined threshold
JP2004252983A (en) System and method for enhancing performance of coprocessor
JP2004272894A (en) Multithread kernel of graphics processing unit
JP2007512632A (en) Managing virtual machines using activity information
JP2015504541A (en) Method, program, and computing system for dynamically optimizing memory access in a multiprocessor computing system
US7765548B2 (en) System, method and medium for using and/or providing operating system information to acquire a hybrid user/operating system lock
CN115981833A (en) Task processing method and device
Gifford et al. Dna: Dynamic resource allocation for soft real-time multicore systems
CN116225686A (en) CPU scheduling method and system for hybrid memory architecture
Wang et al. Adaptive scheduling of multiprogrammed dynamic-multithreading applications
JP3546694B2 (en) Multi-thread computer system and multi-thread execution control method
US20150212859A1 (en) Graphics processing unit controller, host system, and methods
JP4127354B2 (en) Multiprocessor control program and multiprocessor control method
JPH0612395A (en) Task allocating method in multiprocessor system
JP5243822B2 (en) Workload management in a virtualized data processing environment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070403

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070410

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070608

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070904

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20071026

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080507

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

Free format text: PAYMENT UNTIL: 20110523

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4127354

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120523

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130523

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20140523

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees