JP2010170409A - Arithmetic control unit, microprocessor and apparatus - Google Patents
Arithmetic control unit, microprocessor and apparatus Download PDFInfo
- Publication number
- JP2010170409A JP2010170409A JP2009013325A JP2009013325A JP2010170409A JP 2010170409 A JP2010170409 A JP 2010170409A JP 2009013325 A JP2009013325 A JP 2009013325A JP 2009013325 A JP2009013325 A JP 2009013325A JP 2010170409 A JP2010170409 A JP 2010170409A
- Authority
- JP
- Japan
- Prior art keywords
- arithmetic
- unit
- calculation
- microprocessor
- context information
- 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.)
- Pending
Links
Images
Abstract
Description
本発明は、マイクロプロセッサにおける並列処理実行方式に関し、特に処理切替え時間と並列処理の待ち合わせ時間における消費電力の小さなマイクロプロセッサに関する。 The present invention relates to a parallel processing execution method in a microprocessor, and more particularly to a microprocessor with low power consumption in a process switching time and a waiting time for parallel processing.
マイクロプロセッサは、家電機器にも組込まれるようになり、前述のような家電機器の消費電力を下げるため、複数の演算装置を内蔵するものが一般的となっている。今後、さらに、マイクロプロセッサに搭載される演算装置の数は増大する見込みである。 Microprocessors are also incorporated into home appliances, and in general, a microprocessor incorporates a plurality of arithmetic units in order to reduce the power consumption of home appliances as described above. In the future, the number of arithmetic devices mounted on the microprocessor is expected to increase.
前述したマイクロプロセッサは、インターネット通信、及びデジタルメディア処理など、複数の演算処理を同時に実行することが求められている。このため、マイクロプロセッサは、前述したような複数の演算処理を同時に実行するために、OS(Operating System)又はハイパーバイザといった、複数の処理の実行時間を割り当てるスケジューラ機能を備えたソフトウェアを用いて管理されている。 The aforementioned microprocessor is required to simultaneously execute a plurality of arithmetic processes such as Internet communication and digital media processing. For this reason, in order to simultaneously execute a plurality of arithmetic processes as described above, the microprocessor is managed using software having a scheduler function that allocates an execution time of a plurality of processes, such as an OS (Operating System) or a hypervisor. Has been.
前述したソフトウェアが実行する処理として、排他的に実行される演算の制御処理、及び複数の演算を並列的に実行するための制御処理がある(例えば、非特許文献1参照)。 As processing executed by the above-described software, there are control processing for operations executed exclusively and control processing for executing a plurality of operations in parallel (see, for example, Non-Patent Document 1).
排他的に実行される演算の制御処理は、排他的に実行される演算を管理するための管理変数であるロック変数を用いて行われる。具体的には、演算装置がメモリ上のロック変数を取得する。演算装置が実行する演算は、当該ロック変数が解放されるまで、排他的に実行される。つまり、当該演算が使用するリソースが独占されることになる。なお、ロック変数の取得については、図12を用いて後述する。 Control processing of operations executed exclusively is performed using a lock variable that is a management variable for managing operations executed exclusively. Specifically, the arithmetic device acquires a lock variable on the memory. Arithmetic operations executed by the arithmetic unit are executed exclusively until the lock variable is released. That is, the resource used by the operation is monopolized. The acquisition of the lock variable will be described later with reference to FIG.
また、複数の演算を並列的に実行するための制御処理は、前述のソフトウェアが各演算装置に実行させる演算と、当該演算の実行時間とに基づいて、演算装置に前述の演算を実行させる。このとき、現在行っている演算から、他の演算を実行するときに、演算装置は、初期化を実行し、その後、次に実行される演算に切り替えるための処理を実行する。
しかし、前述の排他的に実行される演算の制御処理は、次のような問題がある。 However, the above-described operation control process executed exclusively has the following problems.
つまり、プロセッサが第1の演算装置と第2の演算装置とを備え、第1の演算装置が排他的な演算を実行しているときに、第2の演算装置が排他的な演算を実行しようとすると、すでに、第1の演算装置がロック変数を取得しているため、第2の演算装置は、ロック変数と取得できない。このとき、第2の演算装置は、ロック変数を取得するまで、メモリにアクセスをし続ける。これによって、第2の演算装置は、余分な演算を実行するため、余分な電力を消費する問題がある。 In other words, when the processor includes the first arithmetic device and the second arithmetic device, and the first arithmetic device is executing an exclusive operation, the second arithmetic device will execute the exclusive operation. Then, since the first arithmetic unit has already acquired the lock variable, the second arithmetic unit cannot acquire the lock variable. At this time, the second arithmetic unit continues to access the memory until the lock variable is acquired. As a result, the second arithmetic unit performs an extra operation, and thus has a problem of consuming extra power.
また、前述の複数の演算を並列的に実行するための制御処理は、次のような問題がある。 Further, the control processing for executing the above-described plurality of operations in parallel has the following problems.
つまり、演算装置が第1の演算を実行し、第2の演算に切り替えるときに、演算装置は、第1の演算から第2の演算へ切り替える時に、管理処理を実行する必要があり、このため、演算装置の負荷が大きくなる問題がある。 That is, when the arithmetic device executes the first operation and switches to the second operation, the arithmetic device needs to execute the management process when switching from the first operation to the second operation. There is a problem that the load on the arithmetic unit becomes large.
特に、マイクロプロセッサが内蔵する演算装置が増加するほど、前述した問題は重大となる。また、高速化及び不揮発化されたメモリにおいては、レスポンスタイム及び省電力性が重要になり、前述した問題は重大となる。 In particular, the problem described above becomes more serious as the number of arithmetic units built in the microprocessor increases. In addition, in a memory that has been speeded up and nonvolatileized, response time and power saving are important, and the above-described problems become serious.
本発明は、かかる問題点を鑑みてなされたものである。 The present invention has been made in view of such problems.
本発明の代表的な一例を示せば以下の通りである。すなわち、マイクロプロセッサと、前記マイクロプロセッサに接続されたメモリとを備える機器に備わる演算制御装置であって、前記マイクロプロセッサは、複数の演算部を備え、前記メモリは、前記複数の演算部が読み書き可能な共有記憶領域を含み、前記演算制御装置は、前記共有記憶領域への書き込みができるか否かを検出する書込検出部を備え、前記演算部が前記共有記憶領域に書き込みができない場合、前記共有記憶領域を監視し、前記演算部の稼動を停止することを特徴とする。 A typical example of the present invention is as follows. That is, an arithmetic control device provided in a device including a microprocessor and a memory connected to the microprocessor, wherein the microprocessor includes a plurality of arithmetic units, and the memory is read and written by the plurality of arithmetic units. Including a possible shared storage area, the arithmetic control device includes a write detection unit that detects whether or not writing to the shared storage area is possible, and when the arithmetic unit is unable to write to the shared storage area, The shared storage area is monitored, and the operation of the arithmetic unit is stopped.
本発明によれば、プロセッサが同期待ちループによって消費する電力を減少させ、演算装置の演算の切り替えを高速化できる。 According to the present invention, it is possible to reduce the power consumed by the processor by the synchronization waiting loop, and to speed up the switching of the calculation of the calculation device.
[第1の実施形態]
本発明の第1の実施形態では、前述の排他的に実行される作業の制御処理に関する発明について説明する。
[First Embodiment]
In the first embodiment of the present invention, an invention relating to the above-described work control process executed exclusively will be described.
まず、従来技術について説明する。 First, the prior art will be described.
図11は、従来のマイクロプロセッサを備えた機器の装置構成を示すブロック図である。 FIG. 11 is a block diagram showing a device configuration of a device including a conventional microprocessor.
機器101は、マイクロプロセッサ102、メモリ103を備える。
The
マイクロプロセッサ102とメモリ103とは、メモリアクセスバス107を介して接続される。
The
マイクロプロセッサ102は、演算装置1(105)、演算装置2(106)、及びクロック112を備える。
The
クロック112は、同期回路が動作するために必要なクロックを生成する回路であり、水晶発振器などから構成される。
The
演算装置1(105)及び演算装置2(106)は、クロック112から供給されるクロックを元に演算を実行する論理回路である。演算装置1(105)及び演算装置2(106)は、実行中の演算の途中経過を、それぞれ、コンテキスト情報1108及びコンテキスト情報1110として管理している。以下、演算装置1(105)、演算装置2(106)を区別しない場合、演算装置1(105)、2(106)と記載する。
The arithmetic device 1 (105) and the arithmetic device 2 (106) are logic circuits that execute arithmetic operations based on the clock supplied from the
メモリアクセスバス107は、演算装置1(105)、2(106)とメモリ103との間のアクセスを仲介するバスである。
The
メモリ103は、マイクロプロセッサ102が演算を実行するために必要な全てのデータを格納する記憶領域である。メモリ103は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュ(Flash Memory)、又はHDD(Hard Disk Drive)から構成される。メモリ103は、主記憶領域1126を含む。
The
主記憶領域1126は、マイクロプロセッサ102が演算を実行するために必要なデータを格納する。
The
主記憶領域1126は、プロセス情報格納領域1118、作業キュー1122、プロセスメモリ領域1128、及びカーネルメモリ領域1130を含む。
The
プロセスメモリ領域1128は、演算装置1(105)、2(106)が実行する処理に必要とするメモリ領域であり、各々の演算処理(プロセス)に分割された領域ごとに管理されている。
The
カーネルメモリ領域1130は、機器101の管理、及びマイクロプロセッサ102の演算を制御するために必要なメモリ領域である。カーネルメモリ領域1130は、スケジューラ1101及びロック変数116を含む。
The
スケジューラ1101は、演算装置1(105)、2(106)が実行する演算を管理するソフトウェアである。スケジューラ1101は、プロセス情報格納領域1118及び作業キュー1122を更新し、演算の順序を管理する。
The scheduler 1101 is software for managing calculations executed by the calculation devices 1 (105) and 2 (106). The scheduler 1101 updates the process
ロック変数116は、演算装置1(105)、2(106)が実行する演算のなかで、排他的に行わなければならない部分が、正しく排他的に演算が実行されるように管理するための管理変数である。具体的には、ロック変数116の値が「0x1」のとき、ロック変数116はロックされていない状態を示す。つまり、排他的な処理が実行されていないことを示す。ロック変数116の値が「0x0」のとき、ロックされた状態を示し、ロックが開放されるまで、ロックすることはできない。つまり、排他的な処理が実行されていることを示す。
The
プロセス情報格納領域1118は、演算装置1(105)、2(106)が実行した演算の結果を格納する領域である。具体的には、機器101が備える演算装置の数より多い演算が並列して実行される場合、演算装置1(105)、2(106)は、スケジューラ1101の指示に従って、処理を実行し、処理結果が格納されるコンテキスト情報1108、1110をプロセス情報格納領域1118にコンテキスト情報1124として保存し、スケジューラ1101から指示された演算を順々に実行する。
The process
作業キュー1122は、演算装置1(105)、2(106)が実行する演算の一覧を格納する領域である。スケジューラ1101が、次に実行する処理を把握するために参照する。
The
図12は、従来技術における、排他的な演算が実行されるときの処理を説明するシーケンス図である。 FIG. 12 is a sequence diagram for explaining a process when an exclusive operation is executed in the prior art.
演算装置1(105)及び演算装置2(106)が排他的な処理を同時に実行するときのシーケンスを示している。 The sequence when the computing device 1 (105) and the computing device 2 (106) execute exclusive processing simultaneously is shown.
はじめに、ロック変数116の値は「0x1」であり、ロックされていない状態にある(状態1201)。
First, the value of the
演算装置2(106)が、排他的な演算を実行するため、ロック変数116に対しロック取得を実行し、ロック取得に成功する(ステップ1205)。この場合、ロック変数116はロックされていない状態であるため、演算装置2(106)は、ロック取得を成功する。これによって、ロック変数116の値は、「0x0」となり、ロックされた状態となる(状態1202)。
The arithmetic device 2 (106) executes lock acquisition for the lock variable 116 in order to execute exclusive operation, and succeeds in acquiring the lock (step 1205). In this case, since the
ここで、ロック取得の方法として、例えば、スワップ命令を用いる方法が考えられる。具体的には、演算装置2(106)が保持する変数「1」とロック変数116が保持する変数「0」とを入れ替えることによって、演算装置2(106)がロックを取得する。つまり、ロック変数116の値が「0x0」から「0x1」になる。スワップ命令を用いた方法では、ロック取得と、ロック取得の検出とを同時に実行することができる。なお、ロック取得の方法は、前述の方法に限定されず、他の方法であってもよい。
Here, as a method for acquiring the lock, for example, a method using a swap instruction can be considered. Specifically, by replacing the variable “1” held by the arithmetic device 2 (106) with the variable “0” held by the
前述した状態において、演算装置1(105)は、排他的な演算を実行するため、ロック変数116に対してロック取得を実行した場合、ロック変数116の値はすでに「0x0」であるため、ロック取得に失敗する(ステップ1206)。つまり、前述したスワップ命令を用いた方法では、演算装置1(105)が保持する変数とロック変数116が保持する変数は、ともに「0x0」であるため、互いの変数を入れ替えても、入れ替え後に保持される変数は変わらない。したがって、演算装置1(105)は、ロック取得を失敗したことがわかる。演算装置1(105)は、ロック取得に成功するまでロック取得の処理を実行する。
In the state described above, since the arithmetic device 1 (105) executes exclusive operation, when the lock acquisition is executed for the
なお、図12に示す例では、演算装置1(105)は、実際には、ロック変数116に何度もアクセスすることなく、演算装置1(105)が備えるキャッシュメモリを参照し、キャッシュメモリ上に読み出されたロック変数116のキャッシュと、メモリ103上のロック変数116とが異なるか否かを、メモリアクセスバス107を介して監視している。つまり、演算装置1(105)は、メモリアクセスバス107の監視処理を実行している。
In the example shown in FIG. 12, the arithmetic device 1 (105) actually refers to the cache memory included in the arithmetic device 1 (105) without accessing the lock variable 116 many times, It is monitored via the
演算装置2(106)が、ロック変数116によって保護された演算を終了し、ロック変数116を開放する(ステップ1207)。これによって、ロック変数116の値は「0x1」に書き換えられ、ロックされていない状態となる(状態1203)。
The computing device 2 (106) ends the computation protected by the
演算装置1(105)は、ロック変数116の値が「0x1」になったことを検出し(ステップ1208)、キャッシュを無効化する。そして、演算装置1(105)は、ロック取得を実行し、ロック取得が成功する(ステップ1209)。
The arithmetic unit 1 (105) detects that the value of the
これによって、ロック変数116の値が「0x0」となり、再びロックされた状態となる(状態1204)。
As a result, the value of the
次に、図1〜図3を用いて、本発明の第1の実施形態を説明する。 Next, the 1st Embodiment of this invention is described using FIGS. 1-3.
図1は、本発明の第1の実施形態のマイクロプロセッサを備える機器101の装置構成の一例を示すブロック図である。以下、図11の従来の機器の装置構成との差異を中心に説明する。
FIG. 1 is a block diagram illustrating an example of a device configuration of a
図11の機器101と比較して、本発明における機器101は、演算装置1(105)及び演算装置2(106)がそれぞれクロック112及びクロック113を備える。
Compared with the
また、本発明における機器101は、新たに、演算装置処理制御部114を備える。
In addition, the
演算装置処理制御部114は、変更監視命令受信部104、書込メモリ監視部115、クロック制御部132及びメモリ(図示省略)を備える。変更監視命令受信部104、書込メモリ監視部115、及びクロック制御部132は、バス(図示省略)を介してメモリ(図示省略)と接続されている。また、メモリ(図示省略)は、監視情報テーブル131を含む。
The arithmetic device
変更監視命令受信部104は、演算装置1(105)、2(106)と接続されている。変更監視命令受信部104は、演算装置1(105)又は演算装置2(106)から発行される変更監視命令を受信し、受信した変更監視命令に基づいて監視情報テーブル131を更新する。 The change monitoring command receiving unit 104 is connected to the arithmetic devices 1 (105) and 2 (106). The change monitoring command receiving unit 104 receives a change monitoring command issued from the arithmetic device 1 (105) or the arithmetic device 2 (106), and updates the monitoring information table 131 based on the received change monitoring command.
クロック制御部132は、クロック112、113と接続されている。クロック制御部132は、監視情報テーブル131から定期的に情報を取得し、取得された情報に応じて、クロック112、113に動作クロックの制御指示を送信する。
The clock control unit 132 is connected to the
なお、クロック制御部132が監視情報テーブル131から定期的に情報を取得するタイミングとしては、例えば、メモリアクセスバスのクロックと同期させる場合、クロック112、113に同期させる場合が考えられる。また、クロック制御部132を他の装置と同期させ、当該他の装置の動作タイミングにおいて、監視情報テーブル131の情報が取得されてもよい。
Note that the timing at which the clock control unit 132 periodically acquires information from the monitoring information table 131 may be, for example, when synchronized with the clock of the memory access bus or when synchronized with the
これによって、本発明におけるクロック112、113は、クロック制御部132から送信される制御指示に基づいて、演算装置1(105)又は演算装置2(106)に対し、クロックを供給、又は供給を中断することができる。クロック112、113は、クロックを発生する水晶発振器で構成されてもよいが、マイクロプロセッサ102の外部に配置された水晶発振器から供給されるクロックを、演算装置1(105)、2(106)に適した周波数に調整する機能を備えた論理回路であってもよい。
As a result, the
書込メモリ監視部115は、メモリアクセスバス107と接続され、メモリアクセスバス107上を流れる、演算装置からメモリ103へ送信されるアクセス信号を監視し、監視情報テーブル131の内容にしたがって、演算装置1(105)又は演算装置2(106)がメモリ103に格納された情報の書き換えを検出し、監視情報テーブル131を更新する。
The write
監視情報テーブル131は、演算装置1(105)、2(106)を制御するために必要な情報を格納する。詳細については、図2を用いて後述する。 The monitoring information table 131 stores information necessary for controlling the arithmetic devices 1 (105) and 2 (106). Details will be described later with reference to FIG.
図2は、本発明の第1の実施形態の監視情報テーブル131の一例を示す説明図である。 FIG. 2 is an explanatory diagram illustrating an example of the monitoring information table 131 according to the first embodiment of this invention.
監視情報テーブル131は、クロック制御部132が、クロック112、113を制御するために必要な情報を格納し、変更監視命令受信部104、書込メモリ監視部115によって更新される。また、監視情報テーブル131のエントリは、演算装置から指示を受信したときに作成される。
The monitoring information table 131 stores information necessary for the clock control unit 132 to control the
監視情報テーブル131は、監視空間201、監視アドレス202、値203、呼出演算装置204、及びクロック状態205を含む。
The monitoring information table 131 includes a
監視空間201は、監視されているアドレスが属するメモリアドレスの、アドレス空間を示す情報を格納する。図2に示す例では、エントリ206の監視空間201は、カーネルのアドレス空間であることが分かる。
The
監視アドレス202は、書込メモリ監視部115が監視しているメモリ103上のアドレスを格納する。具体的には、ロック変数116が配置されているメモリ上のアドレスを格納している。
The
値203は、監視する値を格納する。これによって、書込メモリ監視部115は、監視アドレス202に対応するアドレスに格納されたデータが値203に格納された値であるか否かを判定する。具体的には、書込メモリ監視部115は、ロック変数116が「1」であるか否かを監視する。なお、同時に排他的な演算を行うことができる機器101においては、例えば、「2」などの値203を監視してもよい。
A
図2に示す例では、エントリ206の監視アドレス202は「0xAAAAAAAA」であり、値203は「1」であることが分かる。この場合、書込メモリ監視部115は、監視アドレス202が「0xAAAAAAAA」に格納されているデータが「1」であるか否かを監視する。
In the example illustrated in FIG. 2, the
呼出演算装置204は、監視を指示した演算装置を識別するための情報を格納する。図2に示す例では、エントリ206の呼出演算装置204に「演算装置1」が格納されていることが分かる。
The
クロック状態205は、監視を指示した演算装置の現在の動作状態を示す情報を格納する。図2に示す例では、エントリ206のクロック状態205は、「クロック停止」であることが分かる。 The clock state 205 stores information indicating the current operation state of the arithmetic device that has instructed monitoring. In the example shown in FIG. 2, it can be seen that the clock state 205 of the entry 206 is “clock stopped”.
図3は、本発明の第1の実施形態における、演算装置1(105)、2(106)が排他的な演算を実行するときの処理を説明するシーケンス図である。 FIG. 3 is a sequence diagram illustrating processing when the computing devices 1 (105) and 2 (106) execute exclusive computations in the first embodiment of the present invention.
まず、ロック変数116の値は「0x1」であるため、ロックされていない状態にある(状態301)。
First, since the value of the
演算装置2(106)が、ロック変数116によって保護された演算を実行するため、ロック変数116に対しロック取得を実行し、ロック取得に成功する(ステップ306)。これによって、ロック変数116の値は「0x0」となり、ロックされた状態となる(状態302)。
Since the arithmetic device 2 (106) executes the operation protected by the
前述した状態において、演算装置1(105)は、ロック変数116によって保護された演算を実行するため、ロック変数116に対してロック取得を実行するが、ロック変数116の値は「0x0」であるため、ロック取得に失敗する(ステップ307)。
In the state described above, the arithmetic device 1 (105) executes lock acquisition for the lock variable 116 in order to execute the operation protected by the
ロック取得に失敗した演算装置1(105)は、ロック取得を再度実行せずに、演算装置処理制御部114に対し、ロック変数116の値を監視するように指示する変更監視命令を送信する(ステップ308)。
The arithmetic device 1 (105) that has failed to acquire the lock transmits a change monitoring instruction that instructs the arithmetic device
変更監視命令を受信した演算装置処理制御部114は、監視情報テーブル131にエントリを作成し、作成されたエントリに必要な情報を格納する。このとき、監視情報テーブル131には、監視空間201、監視アドレス202、値203、呼出演算装置204、及びクロック状態205全ての情報が格納される。ただし、クロック状態205には、「クロック供給」が格納される。演算装置処理制御部114は、監視情報テーブル131に基づいて、メモリアクセスバス107の監視を開始し、さらに、演算装置1(105)へのクロック供給を停止するために、クロック供給停止指示をクロック113に送信する(ステップ309)。
Receiving the change monitoring command, the arithmetic device
クロック供給停止指示を受信したクロック113は、演算装置1(105)へのクロックの供給を停止する(ステップ310)。これによって、演算装置1(105)は、省電力状態になる(状態305)。ここで、クロック供給の再開による復旧を考慮し、演算装置1(105)への電力の供給は停止されていない。
The
演算装置2(106)がロック変数116によって保護された演算を終了し、ロック変数116を開放する(ステップ311)。これによって、ロック変数116の値が「0x1」となり、ロックされていない状態になる(状態303)。
The computing device 2 (106) finishes the computation protected by the
演算装置処理制御部114は、ロックが開放されたこと、つまり、ロック変数116の値が「0x1」になったことを検出する(ステップ312)。
The arithmetic device
ロック開放の検出方法は、書込メモリ監視部115が、メモリアクセスバスを流れる、演算装置2(106)からメモリ103に送信されるアクセス信号に設定されたアドレスを監視し、当該アドレスが監視アドレス202と一致するか否かを判定し、当該アドレスが監視アドレス202と一致した場合、さらに、当該アドレスに対応するデータが値203と一致するか否かを判定する方法が考えられる。演算装置処理制御部114は、当該アドレスに対応するデータが値203と一致する場合、ロックが開放されたと判定する。
In the unlock detection method, the write
次に、ロック開放を検出した書込メモリ監視部115は、監視情報テーブル131のクロック状態205を「クロック供給」に変更し、当該変更に基づいて、クロック制御部132がクロック113にクロック供給開始時指示を送信し、その後、監視情報テーブル131の対応するエントリを削除する(ステップ313)。
Next, the write
クロック供給再開指示を受信したクロック113は、演算装置1(105)に対し、クロック供給を再開する(ステップ314)。これによって、演算装置1(105)は省電力状態を終了して、再び演算を開始する。
The
演算を再開した演算装置1(105)は、ロック変数116に対し、ロック取得を実行し、ロック取得に成功する(ステップ315)。これによって、ロック変数116の値が「0x0」となり、再び、ロックされた状態になる(状態304)。
The computing device 1 (105) that has resumed computation executes lock acquisition for the
以上のように、第1の実施形態によれば、演算装置1(105)がロック取得に失敗した場合、演算装置1(105)が演算装置処理制御部114に監視命令を送信し、ロック開放が検出されるまでの間、演算装置1(105)は状態305のように省電力状態となるため、ロック開放までの間の消費電力を抑えることができる。
As described above, according to the first embodiment, when the arithmetic device 1 (105) fails to acquire the lock, the arithmetic device 1 (105) transmits a monitoring command to the arithmetic device
本発明の第1の実施形態は前述した形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更が可能であることは言うまでもない。 It goes without saying that the first embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the invention.
例えば、ステップ309において、演算装置処理制御部114がクロック113へクロック供給停止指示を送信していたが、演算装置1(105)が演算装置処理制御部114に変更監視命令を送信した後に、自らクロックの供給を停止する形態であってもよい。これによって、演算装置処理制御部114を、より簡素に作ることができる。
For example, in
また、第1の実施形態では、クロックの供給を停止することによって、省電力状態305を実現していたが、クロックの速度を落とす形態、又は、演算装置1(105)の電源の供給を停止する形態であってもよい。電力供給を停止する形態では、演算装置処理制御部114は、クロック制御部132の代わりに、演算装置1(105)、2(106)への電力の供給を制御する電力制御部を備える。
In the first embodiment, the
図4は、本発明の第1の実施形態のマイクロプロセッサを備える機器の装置構成の変形例を示すブロック図である。 FIG. 4 is a block diagram illustrating a modification of the device configuration of the device including the microprocessor according to the first embodiment of this invention.
図1に示す例では、演算装置処理制御部114を一つ備えるマイクロプロセッサ102を説明したが、図4に示すように、演算装置1(105)、2(106)が、それぞれ演算装置処理制御部114を備えるマイクロプロセッサ102であってもよい。また、演算装置が演算装置処理制御部114を含む形態であってもよい。これによって、演算装置1(105)及び演算装置2(106)のモジュール化が容易となる。なお、前述したような機器101における、演算装置処理制御部114、各演算装置1(105)、2(106)、及びクロック112、113の接続並びに処理は、図1及び図3に示したものと同様のものである。
In the example illustrated in FIG. 1, the
[第2の実施形態]
本発明の第2の実施形態では、前述の排他的に実行される作業の制御処理に関する発明について説明する。
[Second Embodiment]
In the second embodiment of the present invention, an invention related to the above-described work control process executed exclusively will be described.
図5及び図6を用いて本発明の第2の実施形態を説明する。 A second embodiment of the present invention will be described with reference to FIGS.
図5は、本発明の第2の実施形態のマイクロプロセッサを備える機器の装置構成の一例を示すブロック図である。以下、第1の実施形態との差異を中心に説明する。 FIG. 5 is a block diagram illustrating an example of a device configuration of a device including the microprocessor according to the second embodiment of this invention. Hereinafter, the difference from the first embodiment will be mainly described.
図5に示す機器101は、演算装置1(105)及び演算装置2(106)のそれぞれに、演算装置処理制御部514が接続されている。
In the
演算装置処理制御部514は、実行演算監視部503、書込メモリ監視部115、監視情報テーブル131、及びクロック制御部132を備える。書込メモリ監視部115、監視情報テーブル131、及びクロック制御部132は、第1の実施形態と同一の構成である。
The arithmetic device
実行演算監視部503は、実行演算監視部503は、演算装置処理制御部514に接続された演算装置1(105)、演算装置2(106)が実行している演算の内容を読み出し、演算装置1(105)、2(106)の動作を監視する。
The execution
また、実行演算監視部503は、演算装置1(105)、2(106)が実行している演算の内容が、一定のパターンであるか否かを判定することによって、クロック112、113にクロック供給の停止を指示する。
In addition, the execution
ここで、一定のパターンとしては、例えば、演算装置2(106)がロック取得に成功している状態における、演算装置1(105)の待ち処理などが考えられる。待ち処理は、演算装置2(106)がロック取得に成功している状態において、演算装置1(105)がロック取得を失敗した場合、演算装置1(105)がメモリアクセスバス107を監視し、メモリ103のロック変数116の値が特定の値(この場合は、「1」)になるまで、待ち続けるループ処理を示す。実行演算監視部503は、当該ループ処理を検出することによって、一定のパターンか否かを判定することができる。
Here, for example, a waiting process of the arithmetic device 1 (105) in a state where the arithmetic device 2 (106) has succeeded in acquiring the lock can be considered as the fixed pattern. In the wait process, when the arithmetic device 2 (106) succeeds in acquiring the lock and the arithmetic device 1 (105) fails to acquire the lock, the arithmetic device 1 (105) monitors the
第1の実施形態と比較して、演算装置処理制御部514は、演算装置1(105)、2(106)を監視し、実行されている演算が一定のパターンであることを検出した場合、クロック112、113にクロック供給の停止を指示する点が異なる。
Compared to the first embodiment, the arithmetic device
図6は、本発明の第2の実施形態における、演算装置が排他的な演算を実行するときの処理を説明するシーケンス図である。以下、第1の実施形態との差異を中心に説明する。 FIG. 6 is a sequence diagram illustrating a process when the arithmetic device executes an exclusive operation in the second embodiment of the present invention. Hereinafter, the difference from the first embodiment will be mainly described.
演算装置2(106)がロック取得に成功している(ステップ606)場合において、演算装置1(105)がロック変数116に対しロック取得に失敗し、ロック変数116の値が「1」に変更されるのを待つ処理を実行する(ステップ607)。
When the arithmetic device 2 (106) succeeds in acquiring the lock (step 606), the arithmetic device 1 (105) fails to acquire the lock for the
演算装置1(105)を監視している演算装置処理制御部514は、演算装置1(105)が待ち処理を実行していることを検出する(ステップ608)。待ち処理を検出した演算装置処理制御部514は、監視情報テーブル131にエントリを作成し、作成されたエントリに情報を格納し、クロック制御部132が監視情報テーブル131に基づいて、クロック113にクロック供給停止指示を送信する(ステップ609)。
The arithmetic device
ステップ610〜ステップ615、及び状態601〜状態604は第1の実施形態と同一のものである。
なお、ステップ602において、演算装置処理制御部514は、ループ処理が確実に発生することを検出した場合、クロック113にクロック供給停止指示を送信する形態であってもよい。
Note that, in
以上のように、本発明の第2の実施形態によれば、待ち処理を検出した演算装置処理制御部514からの指示によって、演算装置1(105)は状態605に示すように省電力状態となり、消費電力を抑えることができる。また、演算装置1(105)、2(106)が特別な命令を指示する必要がなく、消費電力を抑えることができる。また、本発明の第1の実施形態と同様に、本発明の第2の実施形態は、前述した形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更が可能である。
As described above, according to the second embodiment of the present invention, the arithmetic device 1 (105) enters the power saving state as indicated by the
[第3の実施形態]
本発明の第3の実施形態では、前述の複数の演算を並列的に実行するための制御処理に関する発明について説明する。
[Third Embodiment]
In the third embodiment of the present invention, an invention related to control processing for executing the above-described plurality of operations in parallel will be described.
まず、従来技術について説明する。 First, the prior art will be described.
図13は、従来技術における、複数の演算を並列的に実行するマイクロプロセッサの処理を説明するシーケンス図である。 FIG. 13 is a sequence diagram for explaining processing of a microprocessor that executes a plurality of operations in parallel in the prior art.
機器101の装置構成は、図11と同一のものである。ここで、「U1」、「U2」、「U3」、及び「U4」は演算の種類を示し、また、「K」は初期化処理及び演算の切り替え処理を示す。ただし、演算「U1」、「U2」、「U3」、及び「U4」は、それぞれ、所定の実行単位に区分けされ、当該実行単位ごとに演算装置1(105)、2(106)が演算を実行する。所定の実行単位としては、スレッド又はタスク等様々な実行単位が考えられる。状態1301〜状態1311は、実行単位で各演算が実行されている状態を示す。
The device configuration of the
以下の説明では、タスク単位で演算が実行される場合について説明する。 In the following description, a case where an operation is performed in units of tasks will be described.
まず、演算装置1(105)と演算装置2(106)とが初期化され、演算装置1(105)上においてスケジューラ1101が実行される。演算装置1(105)上で実行されているスケジューラ1101は、演算装置2(106)を初期化し、演算装置2(106)上においてスケジューラ1101が実行される。演算装置2(106)上で実行されるスケジューラ1101は、作業キュー122を参照し、実行する演算を検索する(ステップ1312)。 First, the arithmetic device 1 (105) and the arithmetic device 2 (106) are initialized, and the scheduler 1101 is executed on the arithmetic device 1 (105). The scheduler 1101 executed on the arithmetic device 1 (105) initializes the arithmetic device 2 (106), and the scheduler 1101 is executed on the arithmetic device 2 (106). The scheduler 1101 executed on the arithmetic device 2 (106) refers to the work queue 122 and searches for an operation to be executed (step 1312).
次に、演算装置1(105)上において実行されるスケジューラ1101は、演算「U1」を作業キュー122に登録する(ステップ1313)
演算装置2(106)上において実行されるスケジューラ1101は、作業キュー1122から演算「U1」に関する情報を取得して、演算「U1」の実行を開始する(ステップ1314)。
Next, the scheduler 1101 executed on the computing device 1 (105) registers the computation “U1” in the work queue 122 (step 1313).
The scheduler 1101 executed on the arithmetic device 2 (106) acquires information related to the operation “U1” from the
演算装置1(105)上において実行されるスケジューラ1101は、演算「U2」、「U3」、及び「U4」を作業キュー1122に登録する(ステップ1315)。 The scheduler 1101 executed on the computing device 1 (105) registers the computations “U2”, “U3”, and “U4” in the work queue 1122 (step 1315).
次に、演算装置1(105)上で実行されるスケジューラ1101は、作業キュー1122から演算「U2」に関する情報を取得し、演算「U2」の実行を開始する(ステップ1316)。
Next, the scheduler 1101 executed on the arithmetic device 1 (105) acquires information related to the operation “U2” from the
演算装置1(105)、2(106)上で実行されるスケジューラ1101は、取得された各演算の実行時間を予め割り当てており、演算装置1(105)、2(106)は、各演算に割り当てられた実行時間が過ぎるか、又は演算が休止、若しくは終了すると、演算の実行を中断し、スケジューラ1101を呼び出す。 The scheduler 1101 executed on the arithmetic devices 1 (105) and 2 (106) pre-allocates the execution time of each acquired operation, and the arithmetic devices 1 (105) and 2 (106) When the assigned execution time has passed or the operation is paused or terminated, the execution of the operation is interrupted and the scheduler 1101 is called.
演算「U1」を実行している演算装置2(106)は、実行中の演算「U1」を中断し、スケジューラ1101を呼び出す。呼び出されたスケジューラ1101は、演算装置2(106)が保持する、演算「U1」の検算結果を格納するコンテキスト情報1110をメモリ103のプロセス情報格納領域1118に、コンテキスト情報1124として保存し、さらに演算「K」にかんするコンテキスト情報1124を読み出す(ステップ1317)。さらに、スケジューラ1101は、初期化処理を実行し、演算「K」の結果をコンテキスト情報1124としてプロセス情報格納領域1118に保存し、作業キュー1122から演算「U3」に関する情報を取得し、演算「U3」の実行を開始する(ステップ1318)。
The arithmetic device 2 (106) executing the operation “U1” interrupts the operation “U1” being executed and calls the scheduler 1101. The called scheduler 1101 stores the
以下、ステップ1319〜ステップ1324も同様の処理が実行される。
Thereafter, the same processing is executed in
従来の処理において、演算が切り替えられる時には常にスケジューラ1101が読み出されるため、演算装置1(105)、2(106)は、初期化処理の実行と、当該初期化処理の結果を格納するコンテキスト情報1108、1110の退避処理及び取得処理の負荷が大きいという問題があった。
In the conventional processing, since the scheduler 1101 is read whenever the operation is switched, the arithmetic devices 1 (105) and 2 (106) execute the initialization process and the
また、各演算装置1(105)、2(106)上で実行されるスケジューラ1101が作業キュー1122にアクセスする場合における排他制御が必要となるため、オーバヘッドが大きくなる問題もある。また、演算「U1」〜「U4」が必要とするコンテキスト情報1124のサイズは、それぞれ異なるにもかかわらず、従来の方法では、全ての情報を退避、及び取得しなければならない問題がある。
Further, since exclusive control is required when the scheduler 1101 executed on each of the arithmetic devices 1 (105) and 2 (106) accesses the
次に、図7〜図10を用いて、本発明の第3の実施形態を説明する。 Next, a third embodiment of the present invention will be described with reference to FIGS.
図7は、本発明の第3の実施形態のマイクロプロセッサを備える機器の装置構成の一例を示すブロック図である。以下、図11の従来の機器の装置構成との差異を中心に説明する。 FIG. 7 is a block diagram illustrating an example of a device configuration of a device including the microprocessor according to the third embodiment of this invention. Hereinafter, the difference from the apparatus configuration of the conventional device in FIG. 11 will be mainly described.
図11の機器101と比較して、本発明における機器101は、演算装置1(105)及び演算装置2(106)がそれぞれクロック112及びクロック113を備える。
Compared with the
また、本発明における機器101は、新たに、演算装置処理制御部714を備える。
In addition, the
演算装置処理制御部714は、書込メモリ監視/スケジューラ部723、クロック制御部732及びメモリ(図示省略)を備える。書込メモリ監視/スケジューラ部723、及びクロック制御部732は、バス(図示省略)を介してメモリ(図示省略)と接続されている。また、メモリ(図示省略)は、演算装置管理テーブル716を含む。
The arithmetic device
書込メモリ監視/スケジューラ部723は、演算装置管理テーブル716とプロセス管理領域715とに基づいて、メモリ103への書き込みの監視、並びに、演算装置1(105)、2(206)への演算の割り当て、及び演算の切り替え、プロセス情報、並びに作業キュー722の管理をする。
The write memory monitoring /
演算装置管理テーブル716は、演算装置1(105)、2(106)のクロックを制御するために必要な情報を格納する。演算装置管理テーブル716は、書込メモリ監視/スケジューラ部723、及びクロック制御部732によって更新される。また、演算装置管理テーブル716は、マイクロプロセッサ102が備える演算装置の数に等しいエントリを持つ固定長の記憶領域である。詳細については、図9を用いて後述する。
The arithmetic device management table 716 stores information necessary for controlling the clocks of the arithmetic devices 1 (105) and 2 (106). The arithmetic device management table 716 is updated by the write memory monitoring /
クロック制御部732は、第1の実施形態と同一のものである。 The clock control unit 732 is the same as that in the first embodiment.
また、本発明における機器101は、主記憶領域1126とは別に、メモリ103にプロセス管理領域715備える。プロセス管理領域715は、演算装置1(105)、2(106)が実行する演算の情報及び演算の結果を格納する領域である。
Further, the
プロセス管理領域715は、書込メモリ監視/スケジューラ部723によって、参照され、また、更新される。図11及び図13に示し従来技術では、カーネルメモリ領域1130(OS)がプロセス情報格納領域1118及び作業キュー1122を管理していたが、第3の実施形態では、演算装置処理制御部714が、プロセス情報格納領域1118及び作業キュー1122を管理している。
The
これによって、演算装置処理制御部714が各プロセスを管理することができ、演算装置1(105)、2(106)の負荷が低減できる。
Accordingly, the arithmetic device
プロセス管理領域715は、プロセス情報格納領域1118、及び作業キュー722を含む。
The
プロセス情報格納領域1118は、図11に示すものと同一のものである。
The process
作業キュー722は、演算装置1(105)、2(106)が実行する演算の一覧を格納する領域である。詳細については、図8を用いて後述する。
The
図8は、本発明の第3の実施形態における作業キュー722の一例を示す説明図である。
FIG. 8 is an explanatory diagram illustrating an example of the
作業キュー722は、プロセスID801、状態802、及び割当演算装置803を含む。演算装置1(105)、2(106)が演算装置処理制御部714に、新規に演算を登録することによって、当該作業キュー722のエントリが作成され、また、該当するエントリの演算が終了すると、当該エントリが削除される。図8に示す例では、エントリ806〜809が作成されている。
The
プロセスID801は、実行される演算を識別するための識別子を格納する。図8に示す例では、エントリ806のプロセスID801は、「U1」であり、エントリ807のプロセスID801は、「U2」であり、エントリ808のプロセスID801は、「U3」であり、エントリ809のプロセスID801は、「U4」である。
The
状態802は、プロセスID801に対応する演算の状態に関する情報を格納する。例えば、エントリ806の状態802は、処理が実行されたことを示す「実行済」が格納されている。前述したように、一つの演算は所定の実行単位に分割されており、状態802が「実行済」の場合、実行単位の一つが実行されたことを示している。同様に、エントリ807の状態802は、「実行中」であり、現在、演算が実行中であることを示す。エントリ808及びエントリ809の状態802は、「実行待ち」であり、これから実行されることを示している。
The
なお、状態802が「実行済」の演算は、状態802が「実行中」エントリより演算の実行回数が1回多く、また、状態802が「実行待ち」の演算は、状態802が「実行中」エントリより演算の実行回数が1回少ない。
Note that an operation whose
図9は、本発明の第3の実施形態の演算装置管理テーブル716の一例を示す説明図である。 FIG. 9 is an explanatory diagram illustrating an example of the arithmetic device management table 716 according to the third embodiment of this invention.
演算装置管理テーブル716は、演算装置901、監視空間902、監視アドレス903、値904、実行タスク905、実行中断時刻906、及びクロック状態907を含む。
The arithmetic device management table 716 includes an
監視空間902、監視アドレス903、値904、及びクロック状態907は、図2の監視アドレス202、監視空間201、値203、及びクロック状態205と同一のものである。
The
演算装置901は、機器101が備える演算装置を識別するための識別子を格納する。
図9に示す例では、エントリ908の演算装置901は、「演算装置1」であり、エントリ909の演算装置901は、「演算装置2」である。
The
In the example illustrated in FIG. 9, the
実行タスク905は、演算装置901に該当する演算装置が実行している演算を識別するための情報を格納する。具体的には、実行されている演算を示すプロセスID801が格納される。図9に示す例では、エントリ908の実行タスク905は、「U2」であり、エントリ909の実行タスク905は、「U1」である。
The
実行中断時刻906は、実行タスク905に該当する演算の実行時間の終了時刻を格納する。当該時間を過ぎると、演算装置1(105)、2(106)では、演算の切替処理が実行される。図9に示す例では、エントリ908の実行中断時刻906は、「0x12345678」であり、エントリ909の実行中断時刻906は、「0x1224567」である。なお、ここでいう時刻は機器内の時刻である。ただし、本発明はこれに限定されず、時刻は、機器外の時刻であってもよい。
The
図10は、本発明の第3の実施形態における、複数の演算を並列的に実行するマイクロプロセッサの処理を説明するシーケンス図である。以下、図13との差異を中心に説明する。 FIG. 10 is a sequence diagram illustrating the processing of the microprocessor that executes a plurality of operations in parallel according to the third embodiment of the present invention. Hereinafter, the difference from FIG. 13 will be mainly described.
まず、演算装置1(105)と演算装置2(106)とが初期化が実行される。演算装置1(105)は、演算装置処理制御部714を初期化し(ステップ1009)、初期化された演算装置処理制御部714に演算「U1」を登録し、さらに、演算装置処理制御部714が登録された演算「U1」を作業キュー722に登録する(ステップ1010)。このとき、演算装置管理テーブル716にエントリが作成される。具体的には、プロセスID801に「U1」が格納され、状態802に「実行待ち」が格納され、割当演算装置803に「未割り当て」が格納される。
First, the arithmetic device 1 (105) and the arithmetic device 2 (106) are initialized. The arithmetic device 1 (105) initializes the arithmetic device processing control unit 714 (step 1009), registers the operation “U1” in the initialized arithmetic device
次に、演算装置処理制御部714は、演算装置管理テーブル716の実行タスク905が未指定であることを確認することで、演算装置2(106)が演算を実行していないことを確認すると、演算装置2(106)を初期化し、初期化された演算装置2(106)に演算「U1」の実行指示を送信する(ステップ1012)。
Next, when the arithmetic device
実行指示を受信した演算装置2(106)は、演算「U1」の演算を実行する(状態1005)。このとき、プロセスID801が「U1」のエントリの状態802に「実行中」が格納され、割当演算装置803に「演算装置2」が格納される。
Receiving the execution instruction, the arithmetic device 2 (106) executes the operation “U1” (state 1005). At this time, “in execution” is stored in the
演算装置1(105)は、演算「U2」、「U3」及び「U4」を演算装置処理制御部714に登録する(ステップ1013)。 The arithmetic device 1 (105) registers the arithmetic operations “U2”, “U3”, and “U4” in the arithmetic device processing control unit 714 (step 1013).
全ての演算を登録した演算装置1(105)は、初期化処理の終了の通知と演算処理開始の指示とを演算装置処理制御部714に送信する(ステップ1014)。 Arithmetic device 1 (105) that has registered all the arithmetic operations transmits a notification of completion of initialization processing and an instruction to start arithmetic processing to arithmetic device processing control unit 714 (step 1014).
演算装置処理制御部714は、演算装置1(105)に演算「U2」の実行指示を送信し(ステップ1015)、実行指示を受信した演算装置1(105)は、演算「U2」の演算を実行する(状態1002)。
The arithmetic device
演算装置処理制御部714は、作業キュー722の実行中断時刻906を参照し、演算装置2に次の演算を実行させるため、演算「U3」の実行指示を送信する(ステップ1016)。実行指示を受信した演算装置2(106)は、演算「U1」の演算結果をコンテキスト情報1124としてプロセス管理領域715に保存し、次に、プロセス管理領域715から演算「U3」の情報を取得し、演算「U3」の演算を実行する(状態1006)。
The arithmetic device
演算装置処理制御部714は、作業キュー722の実行中断時刻906を参照し、演算装置1に次の演算を実行させるため、演算「U4」の実行指示を送信する(ステップ1017)。実行指示を受信した演算装置2(106)は、演算「U2」の演算結果をコンテキスト情報1124としてプロセス管理領域715に保存し、次に、プロセス管理領域715から演算「U4」の情報を取得し、演算「U4」の演算を実行する(状態1003)。
The arithmetic device
以下、ステップ1018〜ステップ1020も同様の処理が実行される。つまり、演算装置処理制御部714は、演算装置管理テーブル716及び作業キュー722を参照し、演算装置1(105)、2(106)に演算の実行指示を送信する。演算の実行指示を受信した演算装置1(105)、2(106)は、実行指示を受信する前に実行していた演算の結果をコンテキスト情報1124としてプロセス管理領域715に保存し、実行指示に従って、次の演算の情報をプロセス管理領域715から取得し、演算を実行する。
Thereafter, the same processing is executed in
以上のように、本発明の第3の実施形態によれば、実行される演算が切り替えるときに、演算装置1(105)、2(106)は、初期化処理、及び、次に実行する演算の決定等の演算を実行する必要がなく、実行される演算をすぐに切り替えることができる。また、演算「K」を実行する必要がないため、演算「K」に関するコンテキスト情報1124の読み出し、及び、書き出しをする必要がないため、演算装置1(105)、2(106)の演算効率が増し、また、消費電力を抑えることができる。
As described above, according to the third embodiment of the present invention, when the operation to be executed is switched, the arithmetic devices 1 (105) and 2 (106) perform the initialization process and the operation to be executed next. It is not necessary to execute an operation such as determining the above, and the operation to be executed can be switched immediately. Further, since it is not necessary to perform the operation “K”, it is not necessary to read out and write out the
なお、本発明の第3の実施形態は、前述した形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更が可能である。 Note that the third embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the scope of the invention.
例えば、演算装置処理制御部714は、演算装置1(105)、2(106)が実行する演算を切り替えるときに、切り換えに必要なコンテキスト情報の一部を復元し、演算を実行をさせることができる。復元されていない残りのコンテキスト情報は、演算装置の実行と並行して、演算装置処理制御部714が復元することができる。また、コンテキスト情報の復元処理中に、演算装置1(105)、2(106)が、復元が完了していないコンテキスト情報を必要とした場合、当該コンテキスト情報が復元されるまで、又は、コンテキストスイッチが完了するまで、演算の実行を一時中止し、当該演算装置1(105)、2(106)へのクロック供給を停止することもできる。
For example, the arithmetic device
また、演算装置1(105)、2(106)が利用したコテキスト情報を、演算装置処理制御部714が監視し、利用中のコンテキスト情報だけを退避復元することもできる。
Also, the arithmetic device
101 機器
102 マイクロプロセッサ
103 メモリ
104 変更監視命令受信部
105 演算装置1
106 演算装置2
107 メモリアクセスバス
112 クロック
113 クロック
114 演算装置処理制御部
115 書込メモリ監視部
116 ロック変数
131 監視情報テーブル
132 クロック制御部
305 省電力状態
503 実行演算監視部
514 演算装置処理制御部
605 省電力状態
714 演算装置処理制御部
715 プロセス管理領域
716 演算装置管理テーブル
722 作業キュー
723 書込メモリ監視/スケジューラ部
1001 初期化実行時間
1002〜1008 演算「U2」〜「U4」実行時間
1101 スケジューラ
1108 コンテキスト情報
1110 コンテキスト情報
1118 プロセス情報格納領域
1122 作業キュー
1124 コンテキスト情報
1126 主記憶領域
1128 プロセスメモリ領域
1130 カーネルメモリ領域
1301、1303、1305、1306、1308、1310 スケジューラ実行時間
1302、1304、1307、1309、1311 演算「U2」〜「U4」実行時間
101
106
107
Claims (24)
前記マイクロプロセッサは、複数の演算部を備え、
前記メモリは、前記複数の演算部が読み書き可能な共有記憶領域を含み、
前記演算制御装置は、
前記共有記憶領域への書き込みができるか否かを検出する書込検出部を備え、
前記演算部が前記共有記憶領域に書き込みができない場合、前記共有記憶領域を監視し、前記演算部の稼動を停止することを特徴とする演算制御装置。 An arithmetic control device provided in a device including a microprocessor and a memory connected to the microprocessor,
The microprocessor includes a plurality of arithmetic units,
The memory includes a shared storage area that can be read and written by the plurality of arithmetic units,
The arithmetic and control unit is
A write detection unit for detecting whether or not writing to the shared storage area is possible;
An arithmetic control apparatus, wherein when the arithmetic unit cannot write in the shared storage area, the arithmetic unit monitors the shared storage area and stops the operation of the arithmetic unit.
前記演算部から送信される、前記共有記憶領域の監視を要求する監視命令に基づいて、前記共有記憶領域の監視を開始することを特徴とする請求項1に記載の演算制御装置。 A receiving unit for receiving a command transmitted from the arithmetic unit;
The arithmetic control device according to claim 1, wherein monitoring of the shared storage area is started based on a monitoring instruction that requests monitoring of the shared storage area transmitted from the arithmetic unit.
前記演算制御装置の前記実行演算検出部が、前記演算部が前記共有記憶領域への書き込みを失敗したことを検出した場合、前記演算制御装置は、前記共有記憶領域の監視を開始することを特徴とする請求項1に記載の演算制御装置。 An execution calculation detection unit for detecting a calculation executed by the calculation unit;
When the execution calculation detection unit of the calculation control device detects that the calculation unit has failed to write to the shared storage area, the calculation control device starts monitoring the shared storage area. The arithmetic and control unit according to claim 1.
前記演算部へのクロックの供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項2又は3に記載の演算制御装置。 A clock control unit for controlling supply of a clock to the arithmetic unit;
4. The arithmetic control device according to claim 2, wherein the operation of the arithmetic unit is stopped by stopping supply of a clock to the arithmetic unit. 5.
前記演算部への電源の供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項2又は3に記載の演算制御装置。 A power control unit that controls supply of power to the arithmetic unit;
The arithmetic control device according to claim 2, wherein the operation of the arithmetic unit is stopped by stopping the supply of power to the arithmetic unit.
前記マイクロプロセッサは、複数の演算部を備え、
前記メモリは、前記演算部が実行する処理に関する情報と、前記処理の結果とを格納するプロセス管理領域を含み、
前記プロセス管理領域は、前記処理の結果を含むコンテキスト情報が格納され、
前記演算制御装置は、
前記演算部に実行させる前記処理の割り当てと、前記処理の実行時間とを設定するスケジューラ部を備え、
前記演算部に第1の処理の実行命令を送信し、
前記第1の処理の終了前に次に実行する第2の処理の実行命令を前記演算部に送信することを特徴とする演算制御装置。 An arithmetic control device provided in a device including a microprocessor and a memory connected to the microprocessor,
The microprocessor includes a plurality of arithmetic units,
The memory includes a process management area for storing information on processing executed by the arithmetic unit and a result of the processing.
In the process management area, context information including a result of the processing is stored,
The arithmetic and control unit is
A scheduler unit that sets the allocation of the process to be executed by the arithmetic unit and the execution time of the process;
Transmitting an execution instruction of the first process to the arithmetic unit;
An arithmetic control apparatus, wherein an execution command for a second process to be executed next is transmitted to the arithmetic unit before the end of the first process.
前記読み出された部分コンテキスト情報に基づいて前記演算部が前記第2の演算を実行している時に、残りの前記コンテキスト情報を前記演算部が読み出すことを特徴とする請求項6に記載の演算制御装置。 When the calculation unit switches from the first process to the second process, the calculation unit reads partial context information that is part of the context information related to the second process,
The calculation according to claim 6, wherein when the calculation unit is executing the second calculation based on the read partial context information, the calculation unit reads the remaining context information. Control device.
前記演算部が前記未完了コンテキスト情報にアクセスしたことを検出した場合に、前記演算部の稼動を停止し、
前記未完了コンテキスト情報を全て、前記演算部が読み出した後に、前記演算部の稼働を再開することを特徴とする請求項7に記載の演算制御装置。 An access detection unit that detects that the calculation unit has accessed uncompleted context information, which is the context information that has not been read to the calculation unit;
When the operation unit detects that the incomplete context information has been accessed, the operation of the operation unit is stopped,
The arithmetic control device according to claim 7, wherein after the arithmetic unit reads all the incomplete context information, the operation of the arithmetic unit is resumed.
前記演算部へのクロックの供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項8に記載の演算制御装置。 A clock control unit for controlling supply of a clock to the arithmetic unit;
The arithmetic control device according to claim 8, wherein the operation of the arithmetic unit is stopped by stopping the supply of a clock to the arithmetic unit.
前記演算部への電源の供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項8に記載の演算制御装置。 A power control unit that controls supply of power to the arithmetic unit;
The calculation control device according to claim 8, wherein the operation of the calculation unit is stopped by stopping the supply of power to the calculation unit.
前記演算部が第1の処理から第2の処理に切り替える時に、前記第1の処理に関するコンテキスト情報のうち、実際にアクセスされたコンテキスト情報のみを前記プロセス管理領域に保存し、
前記演算部が前記第1の処理を実行するため、前記第1の処理に関するコンテキスト情報を前記プロセス管理領域から読み出す場合、前記実際にアクセスされたコンテキスト情報を前記演算部が読み出し、
実際に読み出されていない前記コンテキスト情報へのアクセスがあった時に、前記演算部が初期化を実行することを特徴とする請求項6に記載の演算制御装置。 Of the context information, comprising an access information extraction unit that extracts information that the operation unit is actually accessing,
When the arithmetic unit switches from the first process to the second process, only the context information that is actually accessed among the context information related to the first process is stored in the process management area,
When the context information related to the first process is read from the process management area in order for the calculation unit to execute the first process, the calculation unit reads the actually accessed context information.
The arithmetic control device according to claim 6, wherein the arithmetic unit executes initialization when there is access to the context information that is not actually read.
前記マイクロプロセッサは、複数の演算部と演算制御部とを備え、
前記メモリは、前記複数の演算部が読み書き可能な共有記憶領域を含み、
前記演算制御部は、前記共有記憶領域への書き込みができるか否かを検出する書込検出手段を備え、
前記演算制御部は、前記演算部が前記共有記憶領域に書き込みができない場合、前記共有記憶領域を監視し、前記演算部の稼動を停止することを特徴とするマイクロプロセッサ。 A microprocessor that is connected to a memory and performs arithmetic processing,
The microprocessor includes a plurality of calculation units and a calculation control unit,
The memory includes a shared storage area that can be read and written by the plurality of arithmetic units,
The arithmetic control unit includes a writing detection means for detecting whether or not writing to the shared storage area is possible,
The microprocessor is characterized in that, when the arithmetic unit cannot write to the shared storage area, the arithmetic control unit monitors the shared storage area and stops the operation of the arithmetic unit.
前記演算部から送信される命令を受信する命令受信手段を備え、
前記演算部から送信される、前記共有記憶領域の監視を要求する監視命令に基づいて、前記共有記憶領域の監視を開始することを特徴とする請求項12に記載のマイクロプロセッサ。 The arithmetic control unit is
Comprising command receiving means for receiving a command transmitted from the arithmetic unit;
The microprocessor according to claim 12, wherein monitoring of the shared storage area is started based on a monitoring instruction that requests monitoring of the shared storage area transmitted from the arithmetic unit.
前記演算部が実行する演算を検出する実行演算検出手段を備え、
前記演算制御部の前記実行演算検出手段が、前記演算部が前記共有記憶領域に書き込みに失敗したことを検出した場合、前記演算制御部は、前記共有記憶領域の監視を開始することを特徴とする請求項12に記載のマイクロプロセッサ。 The arithmetic control unit is
An execution calculation detecting means for detecting a calculation executed by the calculation unit;
When the execution calculation detection unit of the calculation control unit detects that the calculation unit has failed to write to the shared storage area, the calculation control unit starts monitoring the shared storage area. The microprocessor according to claim 12.
前記演算部へのクロックの供給を制御するクロック制御手段を備え、
前記演算部へのクロックの供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項13又は14に記載のマイクロプロセッサ。 The arithmetic control unit is
Clock control means for controlling the supply of the clock to the arithmetic unit;
15. The microprocessor according to claim 13, wherein the operation of the arithmetic unit is stopped by stopping the supply of the clock to the arithmetic unit.
前記演算部への電力の供給を制御する電力制御手段を備え、
前記演算部への電源の供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項13又は14に記載のマイクロプロセッサ。 The arithmetic control unit is
Power control means for controlling the supply of power to the arithmetic unit,
15. The microprocessor according to claim 13, wherein the operation of the arithmetic unit is stopped by stopping the supply of power to the arithmetic unit.
前記マイクロプロセッサは、少なくとも一つ演算部と演算制御部とを備え、
前記メモリは、前記演算部が実行する処理に関する情報と、前記処理の結果とを格納するプロセス管理領域を含み、
前記プロセス管理領域は、前記処理の結果を含むコンテキスト情報が格納され、
前記演算制御部は、
前記演算部に実行させる前記処理の割り当てと、前記処理の実行時間とを設定するスケジューラ手段を備え、
前記演算部に第1の処理の実行命令を送信し、
前記第1の処理の終了前に次に実行する第2の処理の実行命令を前記演算部に送信することを特徴とするマイクロプロセッサ。 A microprocessor that is connected to a memory and performs arithmetic processing,
The microprocessor includes at least one calculation unit and a calculation control unit,
The memory includes a process management area for storing information on processing executed by the arithmetic unit and a result of the processing.
In the process management area, context information including a result of the processing is stored,
The arithmetic control unit is
Scheduler means for setting the allocation of the process to be executed by the arithmetic unit and the execution time of the process;
Transmitting an execution instruction of the first process to the arithmetic unit;
A microprocessor that transmits an execution instruction of a second process to be executed next before the end of the first process to the arithmetic unit.
前記演算部が第1の処理から第2の処理に切り替える時に、前記第2の処理に関するコンテキスト情報の一部である部分コンテキスト情報を前記演算部が読み出し、
前記読み出された部分コンテキスト情報に基づいて前記演算部が前記第2の演算を実行している時に、残りの前記コンテキスト情報を前記演算部が読み出すこと特徴とする請求項17に記載のマイクロプロセッサ。 The arithmetic control unit is
When the calculation unit switches from the first process to the second process, the calculation unit reads partial context information that is part of the context information related to the second process,
18. The microprocessor according to claim 17, wherein when the calculation unit is executing the second calculation based on the read partial context information, the calculation unit reads the remaining context information. .
前記演算部への読み出しが完了していない前記コンテキスト情報である、未完了コンテキスト情報に前記演算部がアクセスしたことを検出するアクセス検出手段を備え、
前記演算部が前記未完了コンテキスト情報にアクセスしたことを検出した場合に、前記演算部の稼動を停止し、
前記未完了コンテキスト情報を全て、前記演算部が読み出した後に、前記演算部の稼働を再開することを特徴とする請求項18に記載のマイクロプロセッサ。 The arithmetic control unit is
An access detecting means for detecting that the computing unit has accessed uncompleted context information, which is the context information that has not been read to the computing unit;
When the operation unit detects that the incomplete context information has been accessed, the operation of the operation unit is stopped,
19. The microprocessor according to claim 18, wherein after the arithmetic unit reads all the incomplete context information, operation of the arithmetic unit is resumed.
前記演算部へのクロックの供給を制御するクロック制御手段を備え、
前記演算部へのクロックの供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項19に記載のマイクロプロセッサ。 The arithmetic control unit is
Clock control means for controlling the supply of the clock to the arithmetic unit;
The microprocessor according to claim 19, wherein the operation of the arithmetic unit is stopped by stopping the supply of a clock to the arithmetic unit.
前記演算部への電力の供給を制御する電力制御手段を備え、
前記演算部への電源の供給を停止することによって、前記演算部の稼動を停止することを特徴とする請求項19に記載のマイクロプロセッサ。 The arithmetic control unit is
Power control means for controlling the supply of power to the arithmetic unit,
The microprocessor according to claim 19, wherein the operation of the arithmetic unit is stopped by stopping the supply of power to the arithmetic unit.
前記マイクロプロセッサは、
前記演算部が第1の処理から第2の処理に切り替える時に、前記第1の処理に関するコンテキスト情報のうち、実際にアクセスされたコンテキスト情報のみを前記プロセス管理領域に保存し、
前記演算部が前記第1の処理を実行するため、前記第1の処理に関するコンテキスト情報を前記プロセス管理領域から読み出す場合、前記実際にアクセスされたコンテキスト情報を前記演算部が読み出し、
実際に読み出されていない前記コンテキスト情報へのアクセスがあった時に、初期化を実行することを特徴とする請求項17に記載のマイクロプロセッサ。 The calculation control unit includes an access information extraction unit that extracts information that the calculation unit actually accesses from the context information,
The microprocessor is
When the arithmetic unit switches from the first process to the second process, only the context information that is actually accessed among the context information related to the first process is stored in the process management area,
When the context information related to the first process is read from the process management area in order for the calculation unit to execute the first process, the calculation unit reads the actually accessed context information.
18. The microprocessor according to claim 17, wherein initialization is performed when there is access to the context information that has not been actually read.
請求項1から11のいずれか一つに記載の演算制御装置を備えることを特徴とする機器。 A device comprising a microprocessor and a memory connected to the microprocessor,
An apparatus comprising the arithmetic and control unit according to claim 1.
前記マイクロプロセッサは、請求項12から22のいずれか一つに記載の演算制御部を備えることを特徴とする機器。 A device comprising a microprocessor and a memory connected to the microprocessor,
The said microprocessor is provided with the calculation control part as described in any one of Claim 12 to 22. The apparatus characterized by the above-mentioned.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009013325A JP2010170409A (en) | 2009-01-23 | 2009-01-23 | Arithmetic control unit, microprocessor and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009013325A JP2010170409A (en) | 2009-01-23 | 2009-01-23 | Arithmetic control unit, microprocessor and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010170409A true JP2010170409A (en) | 2010-08-05 |
Family
ID=42702494
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009013325A Pending JP2010170409A (en) | 2009-01-23 | 2009-01-23 | Arithmetic control unit, microprocessor and apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010170409A (en) |
-
2009
- 2009-01-23 JP JP2009013325A patent/JP2010170409A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5212360B2 (en) | Control program, control system, and control method | |
US10318311B2 (en) | Memory allocation techniques at partially-offloaded virtualization managers | |
US9335998B2 (en) | Multi-core processor system, monitoring control method, and computer product | |
CN109564523B (en) | Reducing performance variability using opportunistic hypervisors | |
US20060085794A1 (en) | Information processing system, information processing method, and program | |
TWI390410B (en) | Operating system transfer and launch without performing post | |
US9632842B2 (en) | Exclusive access control method prohibiting attempt to access a shared resource based on average number of attempts and predetermined threshold | |
JP2010044770A (en) | Queued lock using monitor-memory wait | |
TW200941340A (en) | A method and apparatus for suspending execution of a thread until a specified memory access occurs | |
JP2006031691A (en) | Compare and exchange operation using sleep-wakeup mechanism | |
JP6111181B2 (en) | Computer control method and computer | |
WO2008101386A1 (en) | Method of recovering single core exception in multi-core system | |
JP2007219581A (en) | Memory controller, and electronic equipment mounted therewith | |
WO2012143844A1 (en) | Virtual machine high availability | |
US20130311751A1 (en) | System and data loading method | |
WO2009122694A1 (en) | Cache memory device, cache memory system, and processor system | |
JP5716824B2 (en) | Multi-core processor system | |
JP4653838B2 (en) | Arithmetic processing device, control method of arithmetic processing device, and control program | |
JP4253796B2 (en) | Computer and control method | |
KR100994723B1 (en) | selective suspend resume method of reducing initial driving time in system, and computer readable medium thereof | |
JP2009175960A (en) | Virtual multiprocessor system | |
US20220318053A1 (en) | Method of supporting persistence and computing device | |
JP6073710B2 (en) | Information processing apparatus, automatic recovery method from startup failure, and automatic recovery program from startup failure | |
JP5557612B2 (en) | Computer and transfer program | |
JP2010170409A (en) | Arithmetic control unit, microprocessor and apparatus |