JP2010170409A - Arithmetic control unit, microprocessor and apparatus - Google Patents

Arithmetic control unit, microprocessor and apparatus Download PDF

Info

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
Application number
JP2009013325A
Other languages
Japanese (ja)
Inventor
Keitaro Okazaki
啓太郎 岡▲崎▼
Takeshi Asahi
猛 朝日
Shinya Iguchi
慎也 井口
Yasushi Nagai
靖 永井
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2009013325A priority Critical patent/JP2010170409A/en
Publication of JP2010170409A publication Critical patent/JP2010170409A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the waste of power and arithmetic capacity in the waiting time of a plurality of processor-built-in arithmetic units, which is increasingly evident with new memory emergence, and reduce a context switch load on the arithmetic units. <P>SOLUTION: An arithmetic control unit is for use in an apparatus including a microprocessor and a memory connected to the microprocessor. The microprocessor includes a plurality of arithmetic parts, and the memory includes a shared storage area that the plurality of arithmetic parts can read from/write to. The arithmetic control unit includes a writing detection part for detecting whether or not writing to the shared storage area is allowed. If the arithmetic part cannot write to the shared storage area, the shared storage area is monitored and the operation of the arithmetic part is stopped. <P>COPYRIGHT: (C)2010,JPO&INPIT

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.

また、複数の演算を並列的に実行するための制御処理は、前述のソフトウェアが各演算装置に実行させる演算と、当該演算の実行時間とに基づいて、演算装置に前述の演算を実行させる。このとき、現在行っている演算から、他の演算を実行するときに、演算装置は、初期化を実行し、その後、次に実行される演算に切り替えるための処理を実行する。
デイビッド・A・パターソン、ジョン・L・ヘネシー著、「コンピュータの構成と設計〜ハードウェアとソフトウェアのインタフェース 第3版」、2006年
In addition, the control processing for executing a plurality of operations in parallel causes the arithmetic device to execute the arithmetic operation based on the arithmetic operation that the above-described software causes each arithmetic device to execute and the execution time of the arithmetic operation. At this time, when executing another calculation from the currently performed calculation, the calculation device executes initialization and then executes a process for switching to the next calculation to be executed.
David A. Patterson, John L. Hennessy, "Computer Configuration and Design: Hardware and Software Interfaces, Third Edition", 2006

しかし、前述の排他的に実行される演算の制御処理は、次のような問題がある。   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 device 101 includes a microprocessor 102 and a memory 103.

マイクロプロセッサ102とメモリ103とは、メモリアクセスバス107を介して接続される。   The microprocessor 102 and the memory 103 are connected via a memory access bus 107.

マイクロプロセッサ102は、演算装置1(105)、演算装置2(106)、及びクロック112を備える。   The microprocessor 102 includes an arithmetic device 1 (105), an arithmetic device 2 (106), and a clock 112.

クロック112は、同期回路が動作するために必要なクロックを生成する回路であり、水晶発振器などから構成される。   The clock 112 is a circuit that generates a clock necessary for the operation of the synchronization circuit, and includes a crystal oscillator or the like.

演算装置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 clock 112. The arithmetic device 1 (105) and the arithmetic device 2 (106) manage the progress of the operation being executed as context information 1108 and context information 1110, respectively. Hereinafter, when the computing device 1 (105) and the computing device 2 (106) are not distinguished, they are referred to as computing devices 1 (105) and 2 (106).

メモリアクセスバス107は、演算装置1(105)、2(106)とメモリ103との間のアクセスを仲介するバスである。   The memory access bus 107 is a bus that mediates access between the arithmetic devices 1 (105) and 2 (106) and the memory 103.

メモリ103は、マイクロプロセッサ102が演算を実行するために必要な全てのデータを格納する記憶領域である。メモリ103は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュ(Flash Memory)、又はHDD(Hard Disk Drive)から構成される。メモリ103は、主記憶領域1126を含む。   The memory 103 is a storage area for storing all data necessary for the microprocessor 102 to execute an operation. The memory 103 includes, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a flash (Flash Memory), or an HDD (Hard Disk Drive). The memory 103 includes a main storage area 1126.

主記憶領域1126は、マイクロプロセッサ102が演算を実行するために必要なデータを格納する。   The main storage area 1126 stores data necessary for the microprocessor 102 to execute operations.

主記憶領域1126は、プロセス情報格納領域1118、作業キュー1122、プロセスメモリ領域1128、及びカーネルメモリ領域1130を含む。   The main storage area 1126 includes a process information storage area 1118, a work queue 1122, a process memory area 1128, and a kernel memory area 1130.

プロセスメモリ領域1128は、演算装置1(105)、2(106)が実行する処理に必要とするメモリ領域であり、各々の演算処理(プロセス)に分割された領域ごとに管理されている。   The process memory area 1128 is a memory area required for processing executed by the arithmetic devices 1 (105) and 2 (106), and is managed for each area divided into each arithmetic processing (process).

カーネルメモリ領域1130は、機器101の管理、及びマイクロプロセッサ102の演算を制御するために必要なメモリ領域である。カーネルメモリ領域1130は、スケジューラ1101及びロック変数116を含む。   The kernel memory area 1130 is a memory area necessary for managing the device 101 and controlling the operation of the microprocessor 102. The kernel memory area 1130 includes a scheduler 1101 and a lock variable 116.

スケジューラ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 information storage area 1118 and the work queue 1122 and manages the order of operations.

ロック変数116は、演算装置1(105)、2(106)が実行する演算のなかで、排他的に行わなければならない部分が、正しく排他的に演算が実行されるように管理するための管理変数である。具体的には、ロック変数116の値が「0x1」のとき、ロック変数116はロックされていない状態を示す。つまり、排他的な処理が実行されていないことを示す。ロック変数116の値が「0x0」のとき、ロックされた状態を示し、ロックが開放されるまで、ロックすることはできない。つまり、排他的な処理が実行されていることを示す。   The lock variable 116 is a management for managing a portion that must be exclusively executed among the operations executed by the arithmetic devices 1 (105) and 2 (106) so that the operation is executed correctly and exclusively. Is a variable. Specifically, when the value of the lock variable 116 is “0x1”, the lock variable 116 indicates a state that is not locked. That is, it indicates that exclusive processing is not executed. When the value of the lock variable 116 is “0x0”, it indicates a locked state and cannot be locked until the lock is released. That is, it indicates that exclusive processing is being executed.

プロセス情報格納領域1118は、演算装置1(105)、2(106)が実行した演算の結果を格納する領域である。具体的には、機器101が備える演算装置の数より多い演算が並列して実行される場合、演算装置1(105)、2(106)は、スケジューラ1101の指示に従って、処理を実行し、処理結果が格納されるコンテキスト情報1108、1110をプロセス情報格納領域1118にコンテキスト情報1124として保存し、スケジューラ1101から指示された演算を順々に実行する。   The process information storage area 1118 is an area for storing the results of calculations executed by the calculation devices 1 (105) and 2 (106). Specifically, when more operations than the number of arithmetic devices included in the device 101 are executed in parallel, the arithmetic devices 1 (105) and 2 (106) execute processing according to instructions of the scheduler 1101, The context information 1108 and 1110 in which the results are stored are stored as context information 1124 in the process information storage area 1118, and the operations instructed by the scheduler 1101 are executed in order.

作業キュー1122は、演算装置1(105)、2(106)が実行する演算の一覧を格納する領域である。スケジューラ1101が、次に実行する処理を把握するために参照する。   The work queue 1122 is an area for storing a list of operations executed by the arithmetic devices 1 (105) and 2 (106). The scheduler 1101 refers to the process to be executed next.

図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 lock variable 116 is “0x1”, and the lock variable 116 is not locked (state 1201).

演算装置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 lock variable 116 is not locked, the computing device 2 (106) succeeds in acquiring the lock. As a result, the value of the lock variable 116 becomes “0x0”, and the lock variable 116 is locked (state 1202).

ここで、ロック取得の方法として、例えば、スワップ命令を用いる方法が考えられる。具体的には、演算装置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 lock variable 116, the arithmetic device 2 (106) acquires the lock. That is, the value of the lock variable 116 is changed from “0x0” to “0x1”. In the method using the swap instruction, lock acquisition and lock acquisition detection can be performed simultaneously. The lock acquisition method is not limited to the above-described method, and may be another method.

前述した状態において、演算装置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 lock variable 116, the value of the lock variable 116 is already “0x0”. Acquisition fails (step 1206). That is, in the method using the swap instruction described above, the variable held by the arithmetic unit 1 (105) and the variable held by the lock variable 116 are both “0x0”. The retained variables are not changed. Therefore, it can be seen that the arithmetic device 1 (105) failed to acquire the lock. The arithmetic device 1 (105) executes a lock acquisition process until the lock acquisition is successful.

なお、図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 memory access bus 107 whether or not the cache of the lock variable 116 read out in (1) and the lock variable 116 on the memory 103 are different. In other words, the arithmetic device 1 (105) executes the monitoring process of the memory access bus 107.

演算装置2(106)が、ロック変数116によって保護された演算を終了し、ロック変数116を開放する(ステップ1207)。これによって、ロック変数116の値は「0x1」に書き換えられ、ロックされていない状態となる(状態1203)。   The computing device 2 (106) ends the computation protected by the lock variable 116, and releases the lock variable 116 (step 1207). As a result, the value of the lock variable 116 is rewritten to “0x1”, and the lock variable 116 is not locked (state 1203).

演算装置1(105)は、ロック変数116の値が「0x1」になったことを検出し(ステップ1208)、キャッシュを無効化する。そして、演算装置1(105)は、ロック取得を実行し、ロック取得が成功する(ステップ1209)。   The arithmetic unit 1 (105) detects that the value of the lock variable 116 has become “0x1” (step 1208), and invalidates the cache. Then, the arithmetic device 1 (105) executes the lock acquisition, and the lock acquisition is successful (step 1209).

これによって、ロック変数116の値が「0x0」となり、再びロックされた状態となる(状態1204)。   As a result, the value of the lock variable 116 becomes “0x0”, and the lock variable 116 is locked again (state 1204).

次に、図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 device 101 including a microprocessor according to the first 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 device 101 of FIG. 11, in the device 101 according to the present invention, the arithmetic device 1 (105) and the arithmetic device 2 (106) include the clock 112 and the clock 113, respectively.

また、本発明における機器101は、新たに、演算装置処理制御部114を備える。   In addition, the device 101 according to the present invention newly includes an arithmetic device processing control unit 114.

演算装置処理制御部114は、変更監視命令受信部104、書込メモリ監視部115、クロック制御部132及びメモリ(図示省略)を備える。変更監視命令受信部104、書込メモリ監視部115、及びクロック制御部132は、バス(図示省略)を介してメモリ(図示省略)と接続されている。また、メモリ(図示省略)は、監視情報テーブル131を含む。   The arithmetic device processing control unit 114 includes a change monitoring command receiving unit 104, a write memory monitoring unit 115, a clock control unit 132, and a memory (not shown). The change monitoring command receiving unit 104, the write memory monitoring unit 115, and the clock control unit 132 are connected to a memory (not shown) via a bus (not shown). The memory (not shown) includes a monitoring information table 131.

変更監視命令受信部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 clocks 112 and 113. The clock control unit 132 periodically acquires information from the monitoring information table 131, and transmits an operation clock control instruction to the clocks 112 and 113 according to the acquired information.

なお、クロック制御部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 clocks 112 and 113. Alternatively, the clock control unit 132 may be synchronized with another device, and the information in the monitoring information table 131 may be acquired at the operation timing of the other device.

これによって、本発明におけるクロック112、113は、クロック制御部132から送信される制御指示に基づいて、演算装置1(105)又は演算装置2(106)に対し、クロックを供給、又は供給を中断することができる。クロック112、113は、クロックを発生する水晶発振器で構成されてもよいが、マイクロプロセッサ102の外部に配置された水晶発振器から供給されるクロックを、演算装置1(105)、2(106)に適した周波数に調整する機能を備えた論理回路であってもよい。   As a result, the clocks 112 and 113 in the present invention supply the clock to the arithmetic device 1 (105) or the arithmetic device 2 (106) based on the control instruction transmitted from the clock control unit 132, or interrupt the supply. can do. The clocks 112 and 113 may be constituted by crystal oscillators that generate clocks, but clocks supplied from crystal oscillators arranged outside the microprocessor 102 are supplied to the arithmetic units 1 (105) and 2 (106). A logic circuit having a function of adjusting to an appropriate frequency may be used.

書込メモリ監視部115は、メモリアクセスバス107と接続され、メモリアクセスバス107上を流れる、演算装置からメモリ103へ送信されるアクセス信号を監視し、監視情報テーブル131の内容にしたがって、演算装置1(105)又は演算装置2(106)がメモリ103に格納された情報の書き換えを検出し、監視情報テーブル131を更新する。   The write memory monitoring unit 115 is connected to the memory access bus 107 and monitors an access signal transmitted from the arithmetic device to the memory 103 flowing on the memory access bus 107, and the arithmetic device according to the contents of the monitoring information table 131. 1 (105) or the arithmetic unit 2 (106) detects rewriting of information stored in the memory 103, and updates the monitoring information table 131.

監視情報テーブル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 clocks 112 and 113, and is updated by the change monitoring command receiving unit 104 and the write memory monitoring unit 115. An entry in the monitoring information table 131 is created when an instruction is received from the arithmetic device.

監視情報テーブル131は、監視空間201、監視アドレス202、値203、呼出演算装置204、及びクロック状態205を含む。   The monitoring information table 131 includes a monitoring space 201, a monitoring address 202, a value 203, a call calculation device 204, and a clock state 205.

監視空間201は、監視されているアドレスが属するメモリアドレスの、アドレス空間を示す情報を格納する。図2に示す例では、エントリ206の監視空間201は、カーネルのアドレス空間であることが分かる。   The monitoring space 201 stores information indicating the address space of the memory address to which the address being monitored belongs. In the example shown in FIG. 2, it can be seen that the monitoring space 201 of the entry 206 is a kernel address space.

監視アドレス202は、書込メモリ監視部115が監視しているメモリ103上のアドレスを格納する。具体的には、ロック変数116が配置されているメモリ上のアドレスを格納している。   The monitoring address 202 stores an address on the memory 103 monitored by the write memory monitoring unit 115. Specifically, the address on the memory where the lock variable 116 is arranged is stored.

値203は、監視する値を格納する。これによって、書込メモリ監視部115は、監視アドレス202に対応するアドレスに格納されたデータが値203に格納された値であるか否かを判定する。具体的には、書込メモリ監視部115は、ロック変数116が「1」であるか否かを監視する。なお、同時に排他的な演算を行うことができる機器101においては、例えば、「2」などの値203を監視してもよい。   A value 203 stores a value to be monitored. Thereby, the write memory monitoring unit 115 determines whether or not the data stored at the address corresponding to the monitoring address 202 is the value stored in the value 203. Specifically, the write memory monitoring unit 115 monitors whether or not the lock variable 116 is “1”. Note that, in the device 101 that can simultaneously perform exclusive operations, for example, a value 203 such as “2” may be monitored.

図2に示す例では、エントリ206の監視アドレス202は「0xAAAAAAAA」であり、値203は「1」であることが分かる。この場合、書込メモリ監視部115は、監視アドレス202が「0xAAAAAAAA」に格納されているデータが「1」であるか否かを監視する。   In the example illustrated in FIG. 2, the monitoring address 202 of the entry 206 is “0xAAAAAAAA”, and the value 203 is “1”. In this case, the write memory monitoring unit 115 monitors whether or not the data stored in the monitoring address 202 at “0xAAAAAAAA” is “1”.

呼出演算装置204は、監視を指示した演算装置を識別するための情報を格納する。図2に示す例では、エントリ206の呼出演算装置204に「演算装置1」が格納されていることが分かる。   The call computing device 204 stores information for identifying the computing device that has instructed monitoring. In the example shown in FIG. 2, it can be seen that “arithmetic unit 1” is stored in the call arithmetic unit 204 of the entry 206.

クロック状態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 lock variable 116 is “0x1”, the lock variable 116 is not locked (state 301).

演算装置2(106)が、ロック変数116によって保護された演算を実行するため、ロック変数116に対しロック取得を実行し、ロック取得に成功する(ステップ306)。これによって、ロック変数116の値は「0x0」となり、ロックされた状態となる(状態302)。   Since the arithmetic device 2 (106) executes the operation protected by the lock variable 116, the lock acquisition is executed for the lock variable 116, and the lock acquisition is successful (step 306). As a result, the value of the lock variable 116 becomes “0x0”, and the lock variable 116 is locked (state 302).

前述した状態において、演算装置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 lock variable 116, but the value of the lock variable 116 is “0x0”. Therefore, the lock acquisition fails (step 307).

ロック取得に失敗した演算装置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 processing control unit 114 to monitor the value of the lock variable 116 without executing lock acquisition again ( Step 308).

変更監視命令を受信した演算装置処理制御部114は、監視情報テーブル131にエントリを作成し、作成されたエントリに必要な情報を格納する。このとき、監視情報テーブル131には、監視空間201、監視アドレス202、値203、呼出演算装置204、及びクロック状態205全ての情報が格納される。ただし、クロック状態205には、「クロック供給」が格納される。演算装置処理制御部114は、監視情報テーブル131に基づいて、メモリアクセスバス107の監視を開始し、さらに、演算装置1(105)へのクロック供給を停止するために、クロック供給停止指示をクロック113に送信する(ステップ309)。   Receiving the change monitoring command, the arithmetic device processing control unit 114 creates an entry in the monitoring information table 131 and stores necessary information in the created entry. At this time, the monitoring information table 131 stores all the information of the monitoring space 201, the monitoring address 202, the value 203, the call calculation device 204, and the clock state 205. However, “clock supply” is stored in the clock state 205. The arithmetic device processing control unit 114 starts monitoring the memory access bus 107 based on the monitoring information table 131, and further issues a clock supply stop instruction to stop the clock supply to the arithmetic device 1 (105). It transmits to 113 (step 309).

クロック供給停止指示を受信したクロック113は、演算装置1(105)へのクロックの供給を停止する(ステップ310)。これによって、演算装置1(105)は、省電力状態になる(状態305)。ここで、クロック供給の再開による復旧を考慮し、演算装置1(105)への電力の供給は停止されていない。   The clock 113 that has received the clock supply stop instruction stops the supply of the clock to the arithmetic unit 1 (105) (step 310). As a result, the arithmetic device 1 (105) enters a power saving state (state 305). Here, in consideration of recovery by restarting the clock supply, the supply of power to the arithmetic device 1 (105) is not stopped.

演算装置2(106)がロック変数116によって保護された演算を終了し、ロック変数116を開放する(ステップ311)。これによって、ロック変数116の値が「0x1」となり、ロックされていない状態になる(状態303)。   The computing device 2 (106) finishes the computation protected by the lock variable 116, and releases the lock variable 116 (step 311). As a result, the value of the lock variable 116 becomes “0x1”, and the lock variable 116 is not locked (state 303).

演算装置処理制御部114は、ロックが開放されたこと、つまり、ロック変数116の値が「0x1」になったことを検出する(ステップ312)。   The arithmetic device processing control unit 114 detects that the lock has been released, that is, the value of the lock variable 116 has become “0x1” (step 312).

ロック開放の検出方法は、書込メモリ監視部115が、メモリアクセスバスを流れる、演算装置2(106)からメモリ103に送信されるアクセス信号に設定されたアドレスを監視し、当該アドレスが監視アドレス202と一致するか否かを判定し、当該アドレスが監視アドレス202と一致した場合、さらに、当該アドレスに対応するデータが値203と一致するか否かを判定する方法が考えられる。演算装置処理制御部114は、当該アドレスに対応するデータが値203と一致する場合、ロックが開放されたと判定する。   In the unlock detection method, the write memory monitoring unit 115 monitors the address set in the access signal transmitted from the arithmetic unit 2 (106) to the memory 103, which flows through the memory access bus, and the address is the monitored address. If the address matches the monitoring address 202, it is possible to further determine whether or not the data corresponding to the address matches the value 203. If the data corresponding to the address matches the value 203, the arithmetic device processing control unit 114 determines that the lock has been released.

次に、ロック開放を検出した書込メモリ監視部115は、監視情報テーブル131のクロック状態205を「クロック供給」に変更し、当該変更に基づいて、クロック制御部132がクロック113にクロック供給開始時指示を送信し、その後、監視情報テーブル131の対応するエントリを削除する(ステップ313)。   Next, the write memory monitoring unit 115 that detects unlocking changes the clock state 205 of the monitoring information table 131 to “clock supply”, and based on the change, the clock control unit 132 starts clock supply to the clock 113. The time instruction is transmitted, and then the corresponding entry in the monitoring information table 131 is deleted (step 313).

クロック供給再開指示を受信したクロック113は、演算装置1(105)に対し、クロック供給を再開する(ステップ314)。これによって、演算装置1(105)は省電力状態を終了して、再び演算を開始する。   The clock 113 that has received the clock supply restart instruction restarts clock supply to the arithmetic unit 1 (105) (step 314). Thereby, the arithmetic device 1 (105) ends the power saving state and starts the operation again.

演算を再開した演算装置1(105)は、ロック変数116に対し、ロック取得を実行し、ロック取得に成功する(ステップ315)。これによって、ロック変数116の値が「0x0」となり、再び、ロックされた状態になる(状態304)。   The computing device 1 (105) that has resumed computation executes lock acquisition for the lock variable 116 and succeeds in obtaining the lock (step 315). As a result, the value of the lock variable 116 becomes “0x0”, and the lock variable 116 is locked again (state 304).

以上のように、第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 processing control unit 114 and releases the lock. Since the computing device 1 (105) is in the power saving state as in the state 305 until power is detected, the power consumption until the lock is released can be suppressed.

本発明の第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 step 309, the arithmetic device processing control unit 114 has transmitted a clock supply stop instruction to the clock 113, but after the arithmetic device 1 (105) has transmitted a change monitoring instruction to the arithmetic device processing control unit 114, It may be a form in which the supply of the clock is stopped. Thus, the arithmetic device processing control unit 114 can be made simpler.

また、第1の実施形態では、クロックの供給を停止することによって、省電力状態305を実現していたが、クロックの速度を落とす形態、又は、演算装置1(105)の電源の供給を停止する形態であってもよい。電力供給を停止する形態では、演算装置処理制御部114は、クロック制御部132の代わりに、演算装置1(105)、2(106)への電力の供給を制御する電力制御部を備える。   In the first embodiment, the power saving state 305 is realized by stopping the clock supply. However, the clock speed is reduced, or the power supply of the arithmetic device 1 (105) is stopped. It may be a form to do. In the form of stopping the power supply, the arithmetic device processing control unit 114 includes a power control unit that controls the supply of power to the arithmetic devices 1 (105) and 2 (106) instead of the clock control unit 132.

図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 microprocessor 102 including one arithmetic device processing control unit 114 has been described. However, as illustrated in FIG. 4, the arithmetic devices 1 (105) and 2 (106) perform arithmetic device processing control, respectively. The microprocessor 102 including the unit 114 may be used. Further, the arithmetic device may include the arithmetic device processing control unit 114. This facilitates modularization of the arithmetic device 1 (105) and the arithmetic device 2 (106). The connection and processing of the arithmetic device processing control unit 114, the arithmetic devices 1 (105) and 2 (106), and the clocks 112 and 113 in the device 101 as described above are those shown in FIGS. Is the same.

[第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 device 101 shown in FIG. 5, an arithmetic device processing control unit 514 is connected to each of the arithmetic device 1 (105) and the arithmetic device 2 (106).

演算装置処理制御部514は、実行演算監視部503、書込メモリ監視部115、監視情報テーブル131、及びクロック制御部132を備える。書込メモリ監視部115、監視情報テーブル131、及びクロック制御部132は、第1の実施形態と同一の構成である。   The arithmetic device processing control unit 514 includes an execution calculation monitoring unit 503, a write memory monitoring unit 115, a monitoring information table 131, and a clock control unit 132. The write memory monitoring unit 115, the monitoring information table 131, and the clock control unit 132 have the same configuration as in the first embodiment.

実行演算監視部503は、実行演算監視部503は、演算装置処理制御部514に接続された演算装置1(105)、演算装置2(106)が実行している演算の内容を読み出し、演算装置1(105)、2(106)の動作を監視する。   The execution calculation monitoring unit 503 reads the contents of the calculation executed by the calculation device 1 (105) and the calculation device 2 (106) connected to the calculation device processing control unit 514, and the calculation device The operations of 1 (105) and 2 (106) are monitored.

また、実行演算監視部503は、演算装置1(105)、2(106)が実行している演算の内容が、一定のパターンであるか否かを判定することによって、クロック112、113にクロック供給の停止を指示する。   In addition, the execution calculation monitoring unit 503 determines whether or not the contents of the calculations executed by the calculation devices 1 (105) and 2 (106) are in a certain pattern, so that the clocks 112 and 113 are clocked. Instruct the supply to stop.

ここで、一定のパターンとしては、例えば、演算装置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 memory access bus 107, A loop process that waits until the value of the lock variable 116 in the memory 103 reaches a specific value (in this case, “1”) is shown. The execution calculation monitoring unit 503 can determine whether or not the pattern is a fixed pattern by detecting the loop process.

第1の実施形態と比較して、演算装置処理制御部514は、演算装置1(105)、2(106)を監視し、実行されている演算が一定のパターンであることを検出した場合、クロック112、113にクロック供給の停止を指示する点が異なる。   Compared to the first embodiment, the arithmetic device processing control unit 514 monitors the arithmetic devices 1 (105) and 2 (106) and detects that the operation being performed is a fixed pattern. The difference is that the clocks 112 and 113 are instructed to stop the clock supply.

図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 lock variable 116, and the value of the lock variable 116 is changed to “1”. A process of waiting for the process is executed (step 607).

演算装置1(105)を監視している演算装置処理制御部514は、演算装置1(105)が待ち処理を実行していることを検出する(ステップ608)。待ち処理を検出した演算装置処理制御部514は、監視情報テーブル131にエントリを作成し、作成されたエントリに情報を格納し、クロック制御部132が監視情報テーブル131に基づいて、クロック113にクロック供給停止指示を送信する(ステップ609)。   The arithmetic device processing control unit 514 that monitors the arithmetic device 1 (105) detects that the arithmetic device 1 (105) is executing the waiting process (step 608). The arithmetic device processing control unit 514 that has detected the waiting process creates an entry in the monitoring information table 131, stores information in the created entry, and the clock control unit 132 clocks the clock 113 based on the monitoring information table 131. A supply stop instruction is transmitted (step 609).

ステップ610〜ステップ615、及び状態601〜状態604は第1の実施形態と同一のものである。   Steps 610 to 615 and states 601 to 604 are the same as those in the first embodiment.

なお、ステップ602において、演算装置処理制御部514は、ループ処理が確実に発生することを検出した場合、クロック113にクロック供給停止指示を送信する形態であってもよい。   Note that, in step 602, the arithmetic device processing control unit 514 may transmit a clock supply stop instruction to the clock 113 when it is detected that the loop processing surely occurs.

以上のように、本発明の第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 state 605 according to the instruction from the arithmetic device processing control unit 514 that has detected the waiting process. , Can reduce power consumption. Further, it is not necessary for the arithmetic devices 1 (105) and 2 (106) to instruct a special command, and power consumption can be suppressed. Further, like the first embodiment of the present invention, the second embodiment of the present invention is not limited to the above-described embodiment, and various modifications can be made without departing from the gist thereof.

[第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 device 101 is the same as that in FIG. Here, “U 1”, “U 2”, “U 3”, and “U 4” indicate types of operations, and “K” indicates initialization processing and operation switching processing. However, the operations “U1”, “U2”, “U3”, and “U4” are each divided into predetermined execution units, and the arithmetic devices 1 (105) and 2 (106) perform operations for each execution unit. Execute. As the predetermined execution unit, various execution units such as threads or tasks can be considered. A state 1301 to a state 1311 indicate states in which each calculation is executed in units of execution.

以下の説明では、タスク単位で演算が実行される場合について説明する。   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 work queue 1122, and starts executing the operation “U1” (step 1314).

演算装置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 work queue 1122, and starts executing the operation “U2” (step 1316).

演算装置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 context information 1110 stored in the process information storage area 1118 of the memory 103 as the context information 1124 and stores the context information 1110 stored in the arithmetic unit 2 (106), which stores the verification result of the operation “U1”. The context information 1124 for “K” is read (step 1317). Furthermore, the scheduler 1101 executes initialization processing, saves the result of the operation “K” as the context information 1124 in the process information storage area 1118, acquires information about the operation “U3” from the work queue 1122, and executes the operation “U3”. "Is started (step 1318).

以下、ステップ1319〜ステップ1324も同様の処理が実行される。   Thereafter, the same processing is executed in steps 1319 to 1324.

従来の処理において、演算が切り替えられる時には常にスケジューラ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 context information 1108 stores the result of the initialization process. There is a problem that the load of the saving process and the acquisition process of 1110 is large.

また、各演算装置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 work queue 1122, there is a problem that overhead is increased. Further, although the sizes of the context information 1124 required by the operations “U1” to “U4” are different, there is a problem that all information must be saved and acquired in the conventional method.

次に、図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 device 101 of FIG. 11, in the device 101 according to the present invention, the arithmetic device 1 (105) and the arithmetic device 2 (106) include the clock 112 and the clock 113, respectively.

また、本発明における機器101は、新たに、演算装置処理制御部714を備える。   In addition, the device 101 according to the present invention newly includes an arithmetic device processing control unit 714.

演算装置処理制御部714は、書込メモリ監視/スケジューラ部723、クロック制御部732及びメモリ(図示省略)を備える。書込メモリ監視/スケジューラ部723、及びクロック制御部732は、バス(図示省略)を介してメモリ(図示省略)と接続されている。また、メモリ(図示省略)は、演算装置管理テーブル716を含む。   The arithmetic device processing control unit 714 includes a write memory monitoring / scheduler unit 723, a clock control unit 732, and a memory (not shown). The write memory monitoring / scheduler unit 723 and the clock control unit 732 are connected to a memory (not shown) via a bus (not shown). The memory (not shown) includes an arithmetic device management table 716.

書込メモリ監視/スケジューラ部723は、演算装置管理テーブル716とプロセス管理領域715とに基づいて、メモリ103への書き込みの監視、並びに、演算装置1(105)、2(206)への演算の割り当て、及び演算の切り替え、プロセス情報、並びに作業キュー722の管理をする。   The write memory monitoring / scheduler unit 723 monitors the writing to the memory 103 based on the arithmetic device management table 716 and the process management area 715 and performs arithmetic operations on the arithmetic devices 1 (105) and 2 (206). Allocation and calculation switching, process information, and work queue 722 are managed.

演算装置管理テーブル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 / scheduler unit 723 and the clock control unit 732. The arithmetic device management table 716 is a fixed-length storage area having entries equal to the number of arithmetic devices provided in the microprocessor 102. Details will be described later with reference to FIG.

クロック制御部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 device 101 according to the present invention includes a process management area 715 in the memory 103 separately from the main storage area 1126. The process management area 715 is an area for storing information on the operations executed by the arithmetic devices 1 (105) and 2 (106) and the results of the operations.

プロセス管理領域715は、書込メモリ監視/スケジューラ部723によって、参照され、また、更新される。図11及び図13に示し従来技術では、カーネルメモリ領域1130(OS)がプロセス情報格納領域1118及び作業キュー1122を管理していたが、第3の実施形態では、演算装置処理制御部714が、プロセス情報格納領域1118及び作業キュー1122を管理している。   The process management area 715 is referred to and updated by the write memory monitoring / scheduler unit 723. 11 and 13, the kernel memory area 1130 (OS) manages the process information storage area 1118 and the work queue 1122, but in the third embodiment, the arithmetic device processing control unit 714 includes: A process information storage area 1118 and a work queue 1122 are managed.

これによって、演算装置処理制御部714が各プロセスを管理することができ、演算装置1(105)、2(106)の負荷が低減できる。   Accordingly, the arithmetic device processing control unit 714 can manage each process, and the load on the arithmetic devices 1 (105) and 2 (106) can be reduced.

プロセス管理領域715は、プロセス情報格納領域1118、及び作業キュー722を含む。   The process management area 715 includes a process information storage area 1118 and a work queue 722.

プロセス情報格納領域1118は、図11に示すものと同一のものである。   The process information storage area 1118 is the same as that shown in FIG.

作業キュー722は、演算装置1(105)、2(106)が実行する演算の一覧を格納する領域である。詳細については、図8を用いて後述する。   The work queue 722 is an area for storing a list of operations executed by the arithmetic devices 1 (105) and 2 (106). Details will be described later with reference to FIG.

図8は、本発明の第3の実施形態における作業キュー722の一例を示す説明図である。   FIG. 8 is an explanatory diagram illustrating an example of the work queue 722 according to the third embodiment of this invention.

作業キュー722は、プロセスID801、状態802、及び割当演算装置803を含む。演算装置1(105)、2(106)が演算装置処理制御部714に、新規に演算を登録することによって、当該作業キュー722のエントリが作成され、また、該当するエントリの演算が終了すると、当該エントリが削除される。図8に示す例では、エントリ806〜809が作成されている。   The work queue 722 includes a process ID 801, a state 802, and an allocation calculation device 803. When the arithmetic devices 1 (105) and 2 (106) newly register the arithmetic in the arithmetic device processing control unit 714, an entry of the work queue 722 is created, and when the arithmetic operation of the corresponding entry is completed, The entry is deleted. In the example shown in FIG. 8, entries 806 to 809 are created.

プロセスID801は、実行される演算を識別するための識別子を格納する。図8に示す例では、エントリ806のプロセスID801は、「U1」であり、エントリ807のプロセスID801は、「U2」であり、エントリ808のプロセスID801は、「U3」であり、エントリ809のプロセスID801は、「U4」である。   The process ID 801 stores an identifier for identifying an operation to be executed. In the example illustrated in FIG. 8, the process ID 801 of the entry 806 is “U1”, the process ID 801 of the entry 807 is “U2”, the process ID 801 of the entry 808 is “U3”, and the process of the entry 809 The ID 801 is “U4”.

状態802は、プロセスID801に対応する演算の状態に関する情報を格納する。例えば、エントリ806の状態802は、処理が実行されたことを示す「実行済」が格納されている。前述したように、一つの演算は所定の実行単位に分割されており、状態802が「実行済」の場合、実行単位の一つが実行されたことを示している。同様に、エントリ807の状態802は、「実行中」であり、現在、演算が実行中であることを示す。エントリ808及びエントリ809の状態802は、「実行待ち」であり、これから実行されることを示している。   The state 802 stores information related to the state of calculation corresponding to the process ID 801. For example, the state 802 of the entry 806 stores “executed” indicating that the process has been executed. As described above, one operation is divided into predetermined execution units. When the state 802 is “executed”, this indicates that one of the execution units has been executed. Similarly, the state 802 of the entry 807 is “executing” and indicates that the operation is currently being executed. The state 802 of the entry 808 and the entry 809 is “waiting for execution” and indicates that it will be executed from now.

なお、状態802が「実行済」の演算は、状態802が「実行中」エントリより演算の実行回数が1回多く、また、状態802が「実行待ち」の演算は、状態802が「実行中」エントリより演算の実行回数が1回少ない。   Note that an operation whose state 802 is “executed” has one more execution than the “executing” entry in the state 802, and an operation whose state 802 is “waiting for execution” The number of executions of the operation is one less than that of the entry.

図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 arithmetic device 901, a monitoring space 902, a monitoring address 903, a value 904, an execution task 905, an execution interruption time 906, and a clock state 907.

監視空間902、監視アドレス903、値904、及びクロック状態907は、図2の監視アドレス202、監視空間201、値203、及びクロック状態205と同一のものである。   The monitoring space 902, the monitoring address 903, the value 904, and the clock state 907 are the same as the monitoring address 202, the monitoring space 201, the value 203, and the clock state 205 of FIG.

演算装置901は、機器101が備える演算装置を識別するための識別子を格納する。
図9に示す例では、エントリ908の演算装置901は、「演算装置1」であり、エントリ909の演算装置901は、「演算装置2」である。
The arithmetic device 901 stores an identifier for identifying the arithmetic device included in the device 101.
In the example illustrated in FIG. 9, the arithmetic device 901 of the entry 908 is “arithmetic device 1”, and the arithmetic device 901 of the entry 909 is “arithmetic device 2”.

実行タスク905は、演算装置901に該当する演算装置が実行している演算を識別するための情報を格納する。具体的には、実行されている演算を示すプロセスID801が格納される。図9に示す例では、エントリ908の実行タスク905は、「U2」であり、エントリ909の実行タスク905は、「U1」である。   The execution task 905 stores information for identifying an operation being executed by an arithmetic device corresponding to the arithmetic device 901. Specifically, a process ID 801 indicating the operation being performed is stored. In the example illustrated in FIG. 9, the execution task 905 of the entry 908 is “U2”, and the execution task 905 of the entry 909 is “U1”.

実行中断時刻906は、実行タスク905に該当する演算の実行時間の終了時刻を格納する。当該時間を過ぎると、演算装置1(105)、2(106)では、演算の切替処理が実行される。図9に示す例では、エントリ908の実行中断時刻906は、「0x12345678」であり、エントリ909の実行中断時刻906は、「0x1224567」である。なお、ここでいう時刻は機器内の時刻である。ただし、本発明はこれに限定されず、時刻は、機器外の時刻であってもよい。   The execution interruption time 906 stores the end time of the execution time of the operation corresponding to the execution task 905. When the time has passed, arithmetic switching processing is executed in arithmetic devices 1 (105) and 2 (106). In the example illustrated in FIG. 9, the execution suspension time 906 of the entry 908 is “0x12345678”, and the execution suspension time 906 of the entry 909 is “0x1224567”. The time here is the time in the device. However, the present invention is not limited to this, and the time may be a time outside the device.

図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 processing control unit 714, and the arithmetic device processing control unit 714 The registered operation “U1” is registered in the work queue 722 (step 1010). At this time, an entry is created in the arithmetic device management table 716. Specifically, “U1” is stored in the process ID 801, “waiting to execute” is stored in the state 802, and “unassigned” is stored in the assignment arithmetic device 803.

次に、演算装置処理制御部714は、演算装置管理テーブル716の実行タスク905が未指定であることを確認することで、演算装置2(106)が演算を実行していないことを確認すると、演算装置2(106)を初期化し、初期化された演算装置2(106)に演算「U1」の実行指示を送信する(ステップ1012)。   Next, when the arithmetic device processing control unit 714 confirms that the execution task 905 of the arithmetic device management table 716 is not specified, and confirms that the arithmetic device 2 (106) is not performing an arithmetic operation, The computing device 2 (106) is initialized, and an execution instruction for the computation “U1” is transmitted to the initialized computing device 2 (106) (step 1012).

実行指示を受信した演算装置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 state 802 of the entry whose process ID 801 is “U1”, and “arithmetic unit 2” is stored in the allocation arithmetic unit 803.

演算装置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 processing control unit 714 transmits an execution instruction for the operation “U2” to the arithmetic device 1 (105) (step 1015), and the arithmetic device 1 (105) that has received the execution instruction performs an operation for the operation “U2”. Execute (state 1002).

演算装置処理制御部714は、作業キュー722の実行中断時刻906を参照し、演算装置2に次の演算を実行させるため、演算「U3」の実行指示を送信する(ステップ1016)。実行指示を受信した演算装置2(106)は、演算「U1」の演算結果をコンテキスト情報1124としてプロセス管理領域715に保存し、次に、プロセス管理領域715から演算「U3」の情報を取得し、演算「U3」の演算を実行する(状態1006)。   The arithmetic device processing control unit 714 refers to the execution interruption time 906 in the work queue 722 and transmits an execution instruction for the operation “U3” to cause the arithmetic device 2 to execute the next operation (step 1016). Receiving the execution instruction, the arithmetic device 2 (106) stores the operation result of the operation “U1” in the process management area 715 as context information 1124, and then acquires the information of the operation “U3” from the process management area 715. Then, the calculation “U3” is executed (state 1006).

演算装置処理制御部714は、作業キュー722の実行中断時刻906を参照し、演算装置1に次の演算を実行させるため、演算「U4」の実行指示を送信する(ステップ1017)。実行指示を受信した演算装置2(106)は、演算「U2」の演算結果をコンテキスト情報1124としてプロセス管理領域715に保存し、次に、プロセス管理領域715から演算「U4」の情報を取得し、演算「U4」の演算を実行する(状態1003)。   The arithmetic device processing control unit 714 refers to the execution interruption time 906 in the work queue 722 and transmits an execution instruction for the operation “U4” to cause the arithmetic device 1 to execute the next operation (step 1017). Receiving the execution instruction, the arithmetic device 2 (106) stores the operation result of the operation “U2” in the process management area 715 as context information 1124, and then acquires the information of the operation “U4” from the process management area 715. Then, the calculation “U4” is executed (state 1003).

以下、ステップ1018〜ステップ1020も同様の処理が実行される。つまり、演算装置処理制御部714は、演算装置管理テーブル716及び作業キュー722を参照し、演算装置1(105)、2(106)に演算の実行指示を送信する。演算の実行指示を受信した演算装置1(105)、2(106)は、実行指示を受信する前に実行していた演算の結果をコンテキスト情報1124としてプロセス管理領域715に保存し、実行指示に従って、次の演算の情報をプロセス管理領域715から取得し、演算を実行する。   Thereafter, the same processing is executed in steps 1018 to 1020. That is, the arithmetic device processing control unit 714 refers to the arithmetic device management table 716 and the work queue 722 and transmits an operation execution instruction to the arithmetic devices 1 (105) and 2 (106). Receiving the operation execution instruction, the arithmetic devices 1 (105) and 2 (106) store the result of the operation executed before receiving the execution instruction as the context information 1124 in the process management area 715 and follow the execution instruction. Then, the information of the next calculation is acquired from the process management area 715, and the calculation is executed.

以上のように、本発明の第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 context information 1124 related to the operation “K”, so that the operation efficiency of the operation devices 1 (105) and 2 (106) is improved. In addition, power consumption can be reduced.

なお、本発明の第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 processing control unit 714 may restore a part of context information necessary for the switching and execute the arithmetic operation when the arithmetic devices 1 (105) and 2 (106) perform the arithmetic operation. it can. The remaining context information that has not been restored can be restored by the arithmetic device processing control unit 714 in parallel with the execution of the arithmetic device. Also, when the arithmetic devices 1 (105) and 2 (106) require context information that has not been restored during the context information restoration process, the context information is restored or the context switch Until the operation is completed, the execution of the operation can be temporarily stopped, and the clock supply to the operation devices 1 (105) and 2 (106) can be stopped.

また、演算装置1(105)、2(106)が利用したコテキスト情報を、演算装置処理制御部714が監視し、利用中のコンテキスト情報だけを退避復元することもできる。   Also, the arithmetic device processing control unit 714 can monitor the cotext information used by the arithmetic devices 1 (105) and 2 (106), and can save and restore only the context information being used.

本発明の第1の実施形態のマイクロプロセッサを備える機器の装置構成の一例を示すブロック図である。It is a block diagram which shows an example of the apparatus structure of an apparatus provided with the microprocessor of the 1st Embodiment of this invention. 本発明の第1の実施形態の監視情報テーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the monitoring information table of the 1st Embodiment of this invention. 本発明の第1の実施形態における、演算装置1(105)、2(106)が排他的な演算を実行するときの処理を説明するシーケンス図である。It is a sequence diagram explaining a process when the arithmetic devices 1 (105) and 2 (106) perform exclusive calculation in the 1st Embodiment of this invention. 本発明の第1の実施形態のマイクロプロセッサを備える機器の装置構成の変形例を示すブロック図である。It is a block diagram which shows the modification of the apparatus structure of an apparatus provided with the microprocessor of the 1st Embodiment of this invention. 本発明の第2の実施形態のマイクロプロセッサを備える機器の装置構成の一例を示すブロック図である。It is a block diagram which shows an example of the apparatus structure of an apparatus provided with the microprocessor of the 2nd Embodiment of this invention. 本発明の第2の実施形態における、演算装置が排他的な演算を実行するときの処理を説明するシーケンス図である。It is a sequence diagram explaining a process when a calculating device performs exclusive calculation in the 2nd Embodiment of this invention. 本発明の第3の実施形態のマイクロプロセッサを備える機器の装置構成の一例を示すブロック図である。It is a block diagram which shows an example of the apparatus structure of an apparatus provided with the microprocessor of the 3rd Embodiment of this invention. 本発明の第3の実施形態における作業キューの一例を示す説明図である。It is explanatory drawing which shows an example of the work queue in the 3rd Embodiment of this invention. 本発明の第3の実施形態の演算装置管理テーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the arithmetic unit management table of the 3rd Embodiment of this invention. 本発明の第3の実施形態における、複数の演算を並列的に実行するマイクロプロセッサの処理を説明するシーケンス図である。It is a sequence diagram explaining the process of the microprocessor which performs several calculation in parallel in the 3rd Embodiment of this invention. 従来のマイクロプロセッサを備えた機器の装置構成を示すブロック図である。It is a block diagram which shows the apparatus structure of the apparatus provided with the conventional microprocessor. 従来技術における、排他的な演算が実行されるときの処理を説明するシーケンス図である。It is a sequence diagram explaining a process when an exclusive calculation is performed in a prior art. 従来技術における、複数の演算を並列的に実行するマイクロプロセッサの処理を説明するシーケンス図である。It is a sequence diagram explaining the process of the microprocessor which performs several calculations in parallel in a prior art.

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 Device 102 Microprocessor 103 Memory 104 Change Monitoring Command Receiving Unit 105 Arithmetic Device 1
106 Arithmetic unit 2
107 memory access bus 112 clock 113 clock 114 arithmetic device processing control unit 115 write memory monitoring unit 116 lock variable 131 monitoring information table 132 clock control unit 305 power saving state 503 execution arithmetic monitoring unit 514 arithmetic device processing control unit 605 power saving state 714 Processing unit processing control unit 715 Processing management area 716 Processing unit management table 722 Work queue 723 Write memory monitoring / scheduler unit 1001 Initialization execution time 1002 to 1008 Operation “U2” to “U4” execution time 1101 Scheduler 1108 Context information 1110 Context information 1118 Process information storage area 1122 Work queue 1124 Context information 1126 Main storage area 1128 Process memory area 1130 Kernel memory areas 1301 and 13 03, 1305, 1306, 1308, 1310 Scheduler execution time 1302, 1304, 1307, 1309, 1311 Operation “U2” to “U4” execution time

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.
前記演算部が第1の処理から第2の処理に切り替える時に、前記第2の処理に関するコンテキスト情報の一部である部分コンテキスト情報を前記演算部が読み出し、
前記読み出された部分コンテキスト情報に基づいて前記演算部が前記第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.
JP2009013325A 2009-01-23 2009-01-23 Arithmetic control unit, microprocessor and apparatus Pending JP2010170409A (en)

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)

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