WO2007049543A1 - Calculating apparatus - Google Patents

Calculating apparatus Download PDF

Info

Publication number
WO2007049543A1
WO2007049543A1 PCT/JP2006/321033 JP2006321033W WO2007049543A1 WO 2007049543 A1 WO2007049543 A1 WO 2007049543A1 JP 2006321033 W JP2006321033 W JP 2006321033W WO 2007049543 A1 WO2007049543 A1 WO 2007049543A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
processing
processing unit
bus
unit
Prior art date
Application number
PCT/JP2006/321033
Other languages
French (fr)
Japanese (ja)
Inventor
Yasunori Sakakibara
Shinichi Iwamoto
Takayuki Sugawara
Original Assignee
Sonac Incorporated
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 Sonac Incorporated filed Critical Sonac Incorporated
Publication of WO2007049543A1 publication Critical patent/WO2007049543A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals

Definitions

  • the present invention relates to an arithmetic device including a plurality of processing units that execute a program.
  • Non-Patent Document 1 describes a multiprocessor system equipped with a plurality of processors.
  • FIG. 8 is a configuration diagram of the multiprocessor system described in Non-Patent Document 1, in which a plurality of processors and memories are connected via a bus.
  • a plurality of processors share memory with one operating system, and a program (hereinafter referred to as an application program) according to the operating system capability processing purpose (Non-Patent Document 1). , It is broken down into threads or processes) and assigned to each processor.
  • each processor executes both the operating system and each task of the application program, and the entire execution time of the processor cannot be allocated to the execution of the application program, and memory is not allocated.
  • the operation of the operating system may be affected by the execution of the application program.
  • Patent Document 1 describes a configuration that reduces overhead such as task management and scheduling in each processor.
  • FIG. 9 is a configuration diagram of the multiprocessor system described in Patent Document IV.
  • the state management unit is connected to a plurality of processors. According to Patent Document 1, the state management unit manages the free state of each processor and notifies each processor, and a processor in which a new task has occurred causes the other free state processor to execute the task. A new task is started immediately.
  • the state management unit is realized by a combinational circuit.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 2004-86921
  • Non-Patent Document 1 "Interface Extra Number Microprocessor 'Introduction to Architecture", CQ Publishing , August 2004, p. 231 -p. 233
  • the state management unit is a hardware block, and not all the management functions of the multiple processors can be realized! This part needs to be executed by the processor, leading to a reduction in the execution time of the application program.
  • the processor itself in which a new task has occurred that causes a free processor to execute a new task.
  • it is difficult to cope with changes in the processing contents of the state management unit after designing hardware blocks.
  • the present invention solves the above-described problem, and the processing unit that executes the application program does not need to execute processing other than the application program such as task management.
  • the purpose is to provide a computing device that can flexibly cope with changes in content.
  • control means for assigning the tasks constituting the application program to each processing means based on the status of each processing means held by the status notification means, and the control means It is characterized by having a plurality of processing means for executing the assigned task and outputting a state relating to the execution of the task, and a state notifying means for maintaining the state output by the processing means.
  • the control means allocates the area of the second storage means and the hardware resource for input / output to the requested processing means based on the request from the processing means, and the processing means is the first assigned the control means power. It is also preferable to access only the storage area of 2 and Z or the hard resource for I / O.
  • control means and the first storage means are connected to the first bus, the plurality of processing means and the second storage means are connected to the second bus, the first bus and the second bus It is also preferable to have bus conversion means for connecting the bus and preventing access from the processing means to the first storage means.
  • control means and the first storage means are connected to the first bus, the plurality of processing means are connected to the second bus, and the second storage means is connected to the first node and the second bus. It is also preferable that they are connected.
  • control means By realizing the operation of the control means by a program, the operation of the control means can be easily changed, and it is possible to easily cope with a change in the processing contents. In addition, it is difficult for a hardware block by a program, and even a complicated control operation can be realized. Furthermore, the processing means does not need to perform tasks other than task management and execution of the application program, thereby improving the execution speed.
  • control means manages access to the storage means and hardware resources for input / output by the processing means, thereby preventing problems caused by a plurality of processing means accessing the same resource. Can do. Furthermore, by separating the first storage means used by the control means from the second storage means that can be accessed by the processing means etc., the operation of the processing means is prevented from affecting the operation of the control means. Can do.
  • FIG. 1 is a block diagram of a first embodiment of an arithmetic device according to the present invention.
  • FIG. 2 is a block diagram of a second embodiment of the arithmetic device according to the present invention.
  • FIG. 3 is a block diagram of a third embodiment of the arithmetic device according to the present invention.
  • FIG. 4 is a diagram illustrating a relationship between an application program executed by a processing unit and a task.
  • FIG. 5 is a process flow diagram of task management in the control unit.
  • FIG. 6 is a process flow diagram of task switching by the control unit.
  • FIG. 7 is a processing flowchart of memory management in a control unit.
  • FIG. 8 is a configuration diagram of a conventional multiprocessor system.
  • FIG. 9 is another configuration diagram of a multiprocessor system according to the prior art.
  • FIG. 1 is a block diagram of a first embodiment of an arithmetic device according to the present invention.
  • the arithmetic device includes a control unit 1, a nonvolatile memory 2, a memory 3, a plurality of processing units 4, a shared memory 5, and a status notification unit 6.
  • the control unit 1, the nonvolatile memory 2, the memory 3, each processing unit 4, and the shared memory 5 are connected to each other via a bus 8.
  • Each processing unit 4 and the status notification unit 6 are connected by a line 71, and the status notification unit 6 and the control unit 1 are connected by a line 72.
  • the control unit 1 is, for example, a processor having a RISC (Reduced Instruction Set Computer) core and executing a control unit program stored in the non-volatile memory 2 and managing tasks of application programs.
  • RISC Reduced Instruction Set Computer
  • the processing unit 4 is a processor that executes an application program.
  • the application program is a program for executing a desired purpose such as image data processing and communication data processing, as described above.
  • the application program is executed by the control unit 1 and the application by the processing unit 4. It is clearly distinguished from the control unit program, which is a program that implements various control processes for executing the Chillon program.
  • the type of processor used in the processing unit 4 is an array in which RISC cores or a plurality of processor elements are arranged in a matrix, and the processing contents in the processor elements and the connection configuration between the processor elements are changed according to the program to be executed.
  • the type, such as the type, is arbitrary.
  • the processing unit 4 notifies the status of the task execution status in the processing unit 4 such as a free state, a processing state, and a suspended state through a line 71. Notify Part 6.
  • a detailed identifier is assigned to each state as necessary, and the processing unit 4 notifies the state notification unit 6 of the detailed identifier together with the state. The detailed identifier will be described later.
  • the non-volatile memory 2 is a non-volatile memory storing a control unit program, and the processing unit 4 does not access it.
  • Non-volatile memory includes ROM, EEPROM, flash memory, etc. If a rewritable memory such as flash memory is used, the control program can be changed easily.
  • the memory 3 is a readable / writable memory used as an area for storing various data when the control unit 1 executes the control unit program, and the processing unit 4 does not access it.
  • the shared memory 5 is a readable / writable memory that stores an application program executed by the processing unit 4 and is also used as an area for storing various data when the application program is executed. Can also be used.
  • the status notification unit 6 holds the status of the processing unit 4 output to the line 71 by the processing unit 4 together with the detailed identifier.
  • the control unit 1 can access the status notification unit 6 through the line 72, and recognizes the status and detailed identifier of the processing unit 4 by accessing the status notification unit 6. It is also possible to adopt a configuration in which the status notification unit 6 issues an interrupt to the control unit 1 when the status of the processing unit 4 changes.
  • the status notification unit 6 is also connected to the bus 8, and the signal transmission / reception between the control unit 1 and the status notification unit 6 is performed by the bus 8, or only the interrupt notification to the processing unit 4 is performed on the line 72. It is also possible to adopt a configuration in which 1 checks the status of the processing unit 4 to the status notification unit 6 through the bus 8 when an interrupt occurs.
  • FIG. 4 is a diagram showing the relationship between application programs executed by the processing unit 4 and tasks. Part of the processing of the application program is called a task, and the application program consists of multiple tasks.
  • task A is executed first, and task B or task C is selectively executed according to the end result of task A.
  • Task D is executed after task B or C ends, and tasks E, F, and G are executed after task D ends.
  • Tasks E, F and G can be executed simultaneously or one by one. In any case, task H will be executed after all tasks E, F, and G are finished.
  • a basic block is a unit of a control flow graph. There is only one instruction to be executed first and one instruction to be executed last, and it is possible to branch to another basic block without going through the instruction to be executed last.
  • the instruction power to be executed first without stopping can be executed in a straight line up to the instruction to be executed last, and is normally recognized by the compiler in the process.
  • the control unit 1 recognizes the tasks constituting the application program and adds the recognized tasks to the task queue.
  • a method for adding tasks to the task queue in the control unit 1 for example, a task table is provided in the application program, and the control unit 1 reads the task table included in the application program, and all the tasks constituting the application program are read.
  • the application program has a structure capable of recognizing each task as if it contains information indicating the position of each task in the shared memory.
  • control unit 1 performs task management and input / output management with respect to the shared memory and the outside so that the plurality of processing units 4 execute the application program.
  • Task management is classified into task assignment and task switching. Each of these controls is realized by a control unit program.
  • Task assignment means control processing for grasping the processing amount of a task in the task queue, determining the processing unit 4 to execute the task, and causing the determined processing unit 4 to execute the task.
  • the processing amount of the task is large.
  • one task can be divided and assigned to a plurality of processing units 4.
  • the control unit 1 can easily divide the task into a plurality of processing units 4. Can be executed. The control unit 1 notifies the processing unit 4 determined by the bus 8 of the task to be processed in order to cause the determined processing unit 4 to execute the assigned task.
  • the control unit 1 first assigns and executes task A to an arbitrary processing unit 4.
  • the control unit 1 can execute the task A by writing the task A to be executed in the processing unit 4, or the processing unit 4 can specify the address of the shared memory 5 in which the part corresponding to the task A of the application program is stored. This can be done by notifying the processing unit 4 and acquiring the necessary application program from the shared memory 5.
  • the processing unit 4 When the processing unit 4 executing the task A finishes the execution of the task A, the processing unit 4 changes the state from the processing state to the empty state, and sets the detailed identifier # 1 or # 2 in the processing result. Outputs accordingly.
  • the control unit 1 recognizes the end of processing in the processing unit 4 executing the task A through the status notification unit 6, and the force task C whose task to be executed next is the task B by the value of the detailed identifier. Recognize whether or not there is a task to be executed by assigning it to the processing unit 4 that is in a free state. Note that task B or C, which is the next task after task A, has already been added to the task queue by any of the methods described above.
  • task D is executed and the state power of processing unit 4 is changed from the processing state to the free state, and there are three or more processing units 4 that are free at that time Assigns tasks E, F, and G to each of the three processing units 4 and executes them. If there are two or less, only a part of the tasks, for example, only task E is assigned and executed, and the processing unit being processed Each time 4 changes to a free state, the remaining tasks are executed. Finally, task H is executed when execution of tasks E, F, and G is completed.
  • FIG. 5 is a process flow diagram of task management in the control unit 1.
  • the control unit 1 grasps the necessary resources for the tasks existing in the task queue (S51), reads the status of each processing unit 4 held by the status notification unit 6 (S52), and exists in the task queue according to the scheduling rule.
  • the task that can be assigned to the processing unit 4 and the processing unit 4 that is the assignment destination, that is, the task execution schedule is determined (S53). Subsequently, when the execution-target processing unit 4 is ready to be executed by the execution-target processing unit 4, the task assigned to the processing unit 1 is executed. (S54)
  • control unit 1 performs task execution control on the processing unit 4 by writing the task portion of the application program to be executed in the processing unit 4, as described above. It is also possible to notify the processing unit 4 of the address of the shared memory 5 in which the necessary application program is stored, and the processing unit 4 acquires the necessary application program from the shared memory 5.
  • the control unit 1 can also divide a task and cause a plurality of processing units 4 to execute it.
  • FIG. 6 is a process flow diagram of task switching by the control unit 1.
  • the state notification unit 6 that holds various states output by the processing unit 4 is omitted from FIG.
  • the control unit 1 issues a suspension request to the processing unit 4 executing the low-priority task. (S61).
  • the processing unit 4 Upon receiving the suspension request, the processing unit 4 saves the content, which is information necessary for restarting the task currently being executed, in the shared memory 5, interrupts the processing, and interrupts the status notification unit 6 via the line 71. State is output (S62).
  • control unit 1 confirms the interruption of the process via the status notification unit 6, and then the processing unit that has issued the interruption request.
  • the processing unit 4 is instructed to execute the high priority task that has occurred.
  • the processing unit 4 instructed to start starts processing the high priority task, and outputs an empty state to the state notification unit 6 through the line 71 when the execution is completed (S63).
  • the control unit 1 After confirming the end of processing via the status notification unit 6, the control unit 1 issues a task restart instruction to the processing unit 4, and the processing unit 4 that has received the task restart instruction reads the shared memory 5 force context, Is resumed (S64).
  • the interruption request made by the control unit 1 includes information specifying the storage location of the context, or the processing unit 4 that interrupted the processing of the low-priority task, the status location stored by the processing unit 4 6 is notified to the control unit 1 and the control unit 1 notifies the processing unit 4 of the location of the context that is saved in response to the restart instruction.
  • the processing unit 4 for restarting the task can be different.
  • control unit 1 determines the priority of each task.
  • the task that has read the power application program and found it first is given a higher priority.
  • priorities are assigned in the order of tasks E, F, and G.
  • the compiler can recognize the number of operation data, the number of loops, etc., and can prioritize at the compilation stage.
  • the priority can be determined in units of application programs. Of course it is possible.
  • FIG. 7 is a process flow diagram of shared memory management in the control unit 1. Note that I / O management is the same by simply replacing the memory with hardware resources for I / O. Memory and I / O management manages access to hardware resources (not shown) for input / output to / from shared memory 5 and external devices (not shown). This is necessary in order to prevent harmful effects caused by accessing the data, for example, the loss of data caused by one processing unit 4 writing other data at the same position as the data written by another processing unit 4.
  • the control unit 1 manages the allocation area of the shared memory 5 to each processing unit 4, and from the processing unit 4
  • the allocation status of the shared memory 5 is confirmed (S71), and the area requested from the unallocated area is allocated to the processing unit 4 that made the memory request. Hit (S72).
  • the processing unit 4 that has received the allocation of the area of the shared memory 5 and the allocation of the hardware resource for Z or I / O accesses only the area or the hardware resource, and accesses the other area or the hardware resource. do not do.
  • the processing unit 4 finishes using the allocated memory area, the processing unit 4 notifies the control unit 1 of a memory release request via the status notification unit 6.
  • FIG. 2 is a block diagram of a second embodiment of the arithmetic device according to the present invention.
  • the same components as those described in the first embodiment are assigned the same reference numerals, and description thereof is omitted.
  • the processing unit 4 and the shared memory 5 are connected to the bus 81
  • the control unit 1 the nonvolatile memory 2 and the memory 3 are connected to the nose 82
  • the bus 81 and the bus 82 are connected to the nose connection unit 9. ing.
  • the node connection unit 9 has a function of restricting the processing unit 4 from accessing the memory 3 and the nonvolatile memory 2.
  • the processing unit 4 destroys the control program or is stored in the memory 3. Yes Control unit 1 is prevented from overwriting control data saved.
  • FIG. 3 is a block diagram of a third embodiment of the arithmetic device according to the present invention.
  • the processing unit 4 is connected to the bus 81
  • the control unit 1 the nonvolatile memory 2 and the memory 3 are connected to the bus 82
  • the shared memory 5 is connected to the bus 81 and the bus 82.
  • the control unit 1 is connected to each processing unit 4 through a line 73.
  • control unit 1 notifies the processing unit 4 of various controls for the processing unit 4 using the line 73.
  • the shared memory 5 is a 2-port memory, for example, and both the bus 81 and the bus 82 can be accessed, so that the bus connected to the processing unit 4 can be connected to the nonvolatile memory 2 and the memory 3 etc. It is completely separated and access from the processing unit 4 to the nonvolatile memory 2 and the memory 3 is completely prevented.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)

Abstract

A calculating apparatus wherein processing parts, which executes application programs, do not need to execute any processings other than the application programs, such as a task management, and further can flexibly cope with any changes in the contents of various processings after a designing. The calculating apparatus comprises a control means that reads and executes a program, thereby assigning, based on the statuses of a plurality of processing means held by a status notifying means, tasks constituting the application programs to the respective processing means; the plurality of processing means that execute the respective tasks assigned by the control means and output the statuses related to the executions of the tasks; and the status notifying means that holds the statuses outputted by the processing means.

Description

明 細 書  Specification
演算装置  Arithmetic unit
技術分野  Technical field
[0001] 本発明は、プログラムの実行を行う処理部を複数備えた演算装置に関する。  [0001] The present invention relates to an arithmetic device including a plurality of processing units that execute a program.
背景技術  Background art
[0002] データの、 目的に応じた処理を高速に実行するために、各種方式が提案され実現 されている。例えば、非特許文献 1には複数のプロセッサを搭載するマルチプロセッ サシステムついて記載がされている。図 8は、非特許文献 1に記載のマルチプロセッ サシステムの構成図であり、複数のプロセッサとメモリがバスを介して接続している。 非特許文献 1によると、複数のプロセッサが 1つのオペレーティングシステムとメモリの 共有を行い、オペレーティングシステム力 処理目的に応じたプログラム(以下、ァプ リケーシヨンプログラムと呼ぶ。)をタスク (非特許文献 1ではスレッド又はプロセス)に 分解して、各プロセッサへの割当てを行っている。  [0002] Various methods have been proposed and implemented in order to execute processing according to the purpose of data at high speed. For example, Non-Patent Document 1 describes a multiprocessor system equipped with a plurality of processors. FIG. 8 is a configuration diagram of the multiprocessor system described in Non-Patent Document 1, in which a plurality of processors and memories are connected via a bus. According to Non-Patent Document 1, a plurality of processors share memory with one operating system, and a program (hereinafter referred to as an application program) according to the operating system capability processing purpose (Non-Patent Document 1). , It is broken down into threads or processes) and assigned to each processor.
[0003] 即ち、各プロセッサは、オペレーティングシステムと、アプリケーションプログラムの 各タスクの両方を実行することとなり、プロセッサの実行時間の総てをアプリケーショ ンプログラムの実行に割り当てることはできず、また、メモリを共有するために、アプリ ケーシヨンプログラムの実行によりオペレーティングシステムの動作に影響を与える可 能性もある。  That is, each processor executes both the operating system and each task of the application program, and the entire execution time of the processor cannot be allocated to the execution of the application program, and memory is not allocated. In order to share, the operation of the operating system may be affected by the execution of the application program.
[0004] このため、特許文献 1には各プロセッサでのタスク管理やスケジューリングといった オーバーヘッドを少なくする構成が記載されて 、る。図 9は特許文献丄に記載のマル チプロセッサシステムの構成図であり、図 8の構成にカ卩え、状態管理部が複数のプロ セッサと接続している。特許文献 1によると、状態管理部が各プロセッサの空き状態の 管理をして各プロセッサに通知し、新たなタスクが発生したプロセッサは、そのタスク を他の空き状態のプロセッサに実行させることで、新たなタスクを直ちに開始させてい る。特許文献 1によると状態管理部は組合せ回路により実現している。 [0004] For this reason, Patent Document 1 describes a configuration that reduces overhead such as task management and scheduling in each processor. FIG. 9 is a configuration diagram of the multiprocessor system described in Patent Document IV. In addition to the configuration of FIG. 8, the state management unit is connected to a plurality of processors. According to Patent Document 1, the state management unit manages the free state of each processor and notifies each processor, and a processor in which a new task has occurred causes the other free state processor to execute the task. A new task is started immediately. According to Patent Document 1, the state management unit is realized by a combinational circuit.
[0005] 特許文献 1 :特開 2004— 86921号公報 Patent Document 1: Japanese Patent Application Laid-Open No. 2004-86921
非特許文献 1 : "Interface増刊 マイクロプロセッサ 'アーキテクチャ入門"、 CQ出版 社、 2004年 8月号、 p. 231 -p. 233 Non-Patent Document 1: "Interface Extra Number Microprocessor 'Introduction to Architecture", CQ Publishing , August 2004, p. 231 -p. 233
発明の開示  Disclosure of the invention
[0006] 上述したように、複数のプロセッサへのタスクの割当て処理等をオペレーティングシ ステムに行わせる構成では、アプリケーションプログラムの実行時間が減少し、また、 アプリケーションプログラムの動作がオペレーティングシステムの動作に影響を与え 得るという問題がある。例えば、オペレーティングシステムが破壊された場合にはシス テムが完全に停止してしまうことになる。  [0006] As described above, in the configuration in which the operating system performs task assignment processing to a plurality of processors, the execution time of the application program decreases, and the operation of the application program affects the operation of the operating system. There is a problem that can be given. For example, if the operating system is destroyed, the system will stop completely.
[0007] 一方、特許文献 1に記載の構成では、状態管理部がハードウェアブロックであり、複 数プロセッサの管理機能の総てを実現できるわけではなぐハードウェアブロックで実 現できな!/、部分につ!、てはプロセッサで実行する必要があり、アプリケーションプログ ラムの実行時間の減少につながる。例えば、特許文献 1において、空き状態のプロセ ッサに新たなタスクを実行させるのは新たなタスクが発生したプロセッサ自身である。 また、ハードウェアブロック設計後の、状態管理部の処理内容の変更には対応困難 である。  [0007] On the other hand, in the configuration described in Patent Document 1, the state management unit is a hardware block, and not all the management functions of the multiple processors can be realized! This part needs to be executed by the processor, leading to a reduction in the execution time of the application program. For example, in Patent Document 1, it is the processor itself in which a new task has occurred that causes a free processor to execute a new task. In addition, it is difficult to cope with changes in the processing contents of the state management unit after designing hardware blocks.
[0008] 従って、本発明は、上述した問題を解決し、アプリケーションプログラムの実行を行 う処理部においては、タスク管理といった、アプリケーションプログラム以外の処理を 実行する必要がなぐまた、設計後の各種処理内容の変更にも柔軟に対応可能な演 算装置を提供することを目的とする。  [0008] Therefore, the present invention solves the above-described problem, and the processing unit that executes the application program does not need to execute processing other than the application program such as task management. The purpose is to provide a computing device that can flexibly cope with changes in content.
[0009] 本発明における演算装置によれば、  [0009] According to the arithmetic device of the present invention,
制御手段用のプログラムを読み込んで実行することで、状態通知手段が保持する各 処理手段の状態に基づき、アプリケーションプログラムを構成するタスクの各処理手 段への割当てを行う制御手段と、制御手段に割り当てられたタスクを実行し、タスクの 実行に関する状態を出力する、複数の処理手段と、処理手段が出力する状態を保 持する状態通知手段とを有することを特徴とする。  By reading and executing the program for the control means, the control means for assigning the tasks constituting the application program to each processing means based on the status of each processing means held by the status notification means, and the control means It is characterized by having a plurality of processing means for executing the assigned task and outputting a state relating to the execution of the task, and a state notifying means for maintaining the state output by the processing means.
[0010] 本発明の演算装置における他の実施形態によれば、  [0010] According to another embodiment of the arithmetic device of the present invention,
制御手段のみが使用する第 1の記憶手段と、制御手段及び処理手段が使用する第 2の記憶手段とを有することも好ま ヽ。  It is also preferable to have a first storage means used only by the control means and a second storage means used by the control means and the processing means.
[0011] また、本発明の演算装置における他の実施形態によれば、 制御手段は、処理手段からの要求に基づき第 2の記憶手段の領域及び Z又は入出 力のためのハードウェア資源を、要求した処理手段に割当て、処理手段は、制御手 段力 割り当てられた第 2の記憶手段の領域及び Z又は入出力のためのハードゥエ ァ資源のみにアクセスすることも好まし 、。 [0011] Further, according to another embodiment of the arithmetic device of the present invention, The control means allocates the area of the second storage means and the hardware resource for input / output to the requested processing means based on the request from the processing means, and the processing means is the first assigned the control means power. It is also preferable to access only the storage area of 2 and Z or the hard resource for I / O.
[0012] 更に、本発明の演算装置における他の実施形態によれば、  Furthermore, according to another embodiment of the arithmetic device of the present invention,
制御手段と、第 1の記憶手段とは第 1のバスに接続し、複数の処理手段と、第 2の記 憶手段とは第 2のノ スに接続し、第 1のバスと第 2のバスを接続し、処理手段から第 1 の記憶手段へのアクセスを防ぐバス変換手段を有することも好ましい。  The control means and the first storage means are connected to the first bus, the plurality of processing means and the second storage means are connected to the second bus, the first bus and the second bus It is also preferable to have bus conversion means for connecting the bus and preventing access from the processing means to the first storage means.
[0013] 更に、本発明の演算装置における他の実施形態によれば、  Furthermore, according to another embodiment of the arithmetic device of the present invention,
制御手段と、第 1の記憶手段とは第 1のバスに接続し、複数の処理手段は第 2のバス に接続し、第 2の記憶手段は、第 1のノ スと第 2のバスに接続していることも好ましい。  The control means and the first storage means are connected to the first bus, the plurality of processing means are connected to the second bus, and the second storage means is connected to the first node and the second bus. It is also preferable that they are connected.
[0014] 制御手段の動作をプログラムにより実現することで、制御手段の動作を容易に変更 することができ、処理内容の変更等に容易に対応可能となる。また、プログラムにより ハードウェアブロックでは難し 、複雑な制御動作であっても実現することができる。更 に、処理手段ではタスク管理と 、つたアプリケーションプログラムの実行以外の処理 を行う必要がなくなり、実行速度が向上する。  [0014] By realizing the operation of the control means by a program, the operation of the control means can be easily changed, and it is possible to easily cope with a change in the processing contents. In addition, it is difficult for a hardware block by a program, and even a complicated control operation can be realized. Furthermore, the processing means does not need to perform tasks other than task management and execution of the application program, thereby improving the execution speed.
[0015] また、制御手段が、処理手段による記憶手段や入出力のためのハードウェア資源 へのアクセスを管理することで、複数の処理手段が同一資源にアクセスすることによ る不具合を防ぐことができる。更に、制御手段が使用する第 1の記憶手段を、処理手 段等がアクセスできる第 2の記憶手段と分離することで、処理手段の動作により制御 手段の動作に影響を与えることを防止することができる。  [0015] In addition, the control means manages access to the storage means and hardware resources for input / output by the processing means, thereby preventing problems caused by a plurality of processing means accessing the same resource. Can do. Furthermore, by separating the first storage means used by the control means from the second storage means that can be accessed by the processing means etc., the operation of the processing means is prevented from affecting the operation of the control means. Can do.
図面の簡単な説明  Brief Description of Drawings
[0016] [図 1]本発明による演算装置の第 1実施形態のブロック図である。 FIG. 1 is a block diagram of a first embodiment of an arithmetic device according to the present invention.
[図 2]本発明による演算装置の第 2実施形態のブロック図である。  FIG. 2 is a block diagram of a second embodiment of the arithmetic device according to the present invention.
[図 3]本発明による演算装置の第 3実施形態のブロック図である。  FIG. 3 is a block diagram of a third embodiment of the arithmetic device according to the present invention.
[図 4]処理部が実行するアプリケーションプログラムとタスクの関係を示す図である。  FIG. 4 is a diagram illustrating a relationship between an application program executed by a processing unit and a task.
[図 5]制御部におけるタスク管理の処理フロー図である。  FIG. 5 is a process flow diagram of task management in the control unit.
[図 6]制御部によるタスク切替の処理フロー図である。 [図 7]制御部におけるメモリ管理の処理フロー図である。 FIG. 6 is a process flow diagram of task switching by the control unit. FIG. 7 is a processing flowchart of memory management in a control unit.
[図 8]従来技術によるマルチプロセッサシステムの構成図である。  FIG. 8 is a configuration diagram of a conventional multiprocessor system.
[図 9]従来技術によるマルチプロセッサシステムの他の構成図である。  FIG. 9 is another configuration diagram of a multiprocessor system according to the prior art.
発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION
[0017] 本発明を実施するための最良の実施形態について、以下では図面を用いて詳細 に説明する。尚、本発明は以下の実施形態に限定されるものではない。  The best mode for carrying out the present invention will be described in detail below with reference to the drawings. The present invention is not limited to the following embodiment.
[0018] 図 1は、本発明による演算装置の第 1実施形態のブロック図である。図 1によると、 演算装置は、制御部 1と、不揮発性メモリ 2と、メモリ 3と、複数の処理部 4と、共有メモ リ 5と、状態通知部 6とを備えている。制御部 1と、不揮発性メモリ 2と、メモリ 3と、各処 理部 4と、共有メモリ 5とはバス 8により相互に接続している。また、各処理部 4と状態 通知部 6は、ライン 71により接続し、状態通知部 6と制御部 1はライン 72により接続し ている。  FIG. 1 is a block diagram of a first embodiment of an arithmetic device according to the present invention. According to FIG. 1, the arithmetic device includes a control unit 1, a nonvolatile memory 2, a memory 3, a plurality of processing units 4, a shared memory 5, and a status notification unit 6. The control unit 1, the nonvolatile memory 2, the memory 3, each processing unit 4, and the shared memory 5 are connected to each other via a bus 8. Each processing unit 4 and the status notification unit 6 are connected by a line 71, and the status notification unit 6 and the control unit 1 are connected by a line 72.
[0019] 制御部 1は、例えば、 RISC (Reduced Instruction Set Computer)コアを有 し、不揮発性メモリ 2に格納されて 、る制御部用プログラムを実行するプロセッサであ り、アプリケーションプログラムのタスクの管理を行い、状態通知部 6が保持する各処 理部 4の状態に基づき各タスクを実行させる処理部 4を決定し、決定した処理部 4に 対して、バス 8経由で、タスクを実行させるためのアプリケーションプログラムのロード 制御を行う。また、共有メモリの管理、及び、図示しない外部との入出力のためのハ 一ドウエア資源の管理も行う。  The control unit 1 is, for example, a processor having a RISC (Reduced Instruction Set Computer) core and executing a control unit program stored in the non-volatile memory 2 and managing tasks of application programs. To determine the processing unit 4 to execute each task based on the status of each processing unit 4 held by the status notification unit 6, and execute the task to the determined processing unit 4 via the bus 8. Controls the loading of application programs. It also manages shared memory and hardware resources for external input / output (not shown).
[0020] 処理部 4は、アプリケーションプログラムを実行するプロセッサである。ここで、アプリ ケーシヨンプログラムとは、上述したように、画像データ処理、通信データ処理等の所 望の目的を実行するためのプログラムであり、制御部 1で実行され、処理部 4でアプリ ケーシヨンプログラムを実行させるための各種制御処理を実現するプログラムである 制御部用プログラムと明確に区別される。処理部 4に用いられるプロセッサの種別は 、 RISCコアや、複数のプロセッサエレメントを行列状に配置して、実行するプログラム に応じてプロセッサエレメントでの処理内容及びプロセッサエレメント間の接続構成を 変更するアレイ型等、その種別は任意である。処理部 4は、例えば、空き状態、処理 状態、中断状態といった処理部 4での、タスクの実行状態をライン 71により状態通知 部 6に通知する。尚、各状態には詳細識別子が必要に応じて付与され、処理部 4は、 詳細識別子を状態と共に状態通知部 6に通知する。詳細識別子については後述す る。 The processing unit 4 is a processor that executes an application program. Here, the application program is a program for executing a desired purpose such as image data processing and communication data processing, as described above. The application program is executed by the control unit 1 and the application by the processing unit 4. It is clearly distinguished from the control unit program, which is a program that implements various control processes for executing the Chillon program. The type of processor used in the processing unit 4 is an array in which RISC cores or a plurality of processor elements are arranged in a matrix, and the processing contents in the processor elements and the connection configuration between the processor elements are changed according to the program to be executed. The type, such as the type, is arbitrary. For example, the processing unit 4 notifies the status of the task execution status in the processing unit 4 such as a free state, a processing state, and a suspended state through a line 71. Notify Part 6. A detailed identifier is assigned to each state as necessary, and the processing unit 4 notifies the state notification unit 6 of the detailed identifier together with the state. The detailed identifier will be described later.
[0021] 不揮発性メモリ 2は、制御部用プログラムを格納している不揮発性のメモリであり、 処理部 4はアクセスしない。不揮発性のメモリとしては、 ROM、 EEPROM、フラッシ ュメモリ等があり、フラッシュメモリ等の書換え可能なメモリを使用すれば、制御用プロ グラムの変更を簡易に行える。  The non-volatile memory 2 is a non-volatile memory storing a control unit program, and the processing unit 4 does not access it. Non-volatile memory includes ROM, EEPROM, flash memory, etc. If a rewritable memory such as flash memory is used, the control program can be changed easily.
[0022] メモリ 3は、制御部 1が制御部用プログラムを実行するときの、各種データ等を保存 する領域として使用する読み書き可能なメモリであり、処理部 4はアクセスしない。  The memory 3 is a readable / writable memory used as an area for storing various data when the control unit 1 executes the control unit program, and the processing unit 4 does not access it.
[0023] 共有メモリ 5は、処理部 4が実行するアプリケーションプログラムを格納すると共に、 アプリケーションプログラムを実行するときの、各種データ等を保存する領域としても 使用する読み書き可能なメモリであり、制御部 1も使用可能である。  The shared memory 5 is a readable / writable memory that stores an application program executed by the processing unit 4 and is also used as an area for storing various data when the application program is executed. Can also be used.
[0024] 状態通知部 6は、処理部 4がライン 71に出力する処理部 4の状態を、詳細識別子と 共に保持する。制御部 1は、ライン 72により状態通知部 6にアクセス可能であり、状態 通知部 6にアクセスすることで処理部 4の状態及び詳細識別子を認識する。また、状 態通知部 6が処理部 4の状態変更時に制御部 1に割り込みをかけて通知する構成と することも可能である。また、状態通知部 6もバス 8に接続し、制御部 1と状態通知部 6 の信号の送受信をバス 8により行う構成とすることも、ライン 72で処理部 4に割り込み 通知のみ行い、制御部 1が割り込み発生時にバス 8を通して状態通知部 6に処理部 4 の状態確認を行う構成とすることも可能である。  [0024] The status notification unit 6 holds the status of the processing unit 4 output to the line 71 by the processing unit 4 together with the detailed identifier. The control unit 1 can access the status notification unit 6 through the line 72, and recognizes the status and detailed identifier of the processing unit 4 by accessing the status notification unit 6. It is also possible to adopt a configuration in which the status notification unit 6 issues an interrupt to the control unit 1 when the status of the processing unit 4 changes. In addition, the status notification unit 6 is also connected to the bus 8, and the signal transmission / reception between the control unit 1 and the status notification unit 6 is performed by the bus 8, or only the interrupt notification to the processing unit 4 is performed on the line 72. It is also possible to adopt a configuration in which 1 checks the status of the processing unit 4 to the status notification unit 6 through the bus 8 when an interrupt occurs.
[0025] 図 4は、処理部 4が実行するアプリケーションプログラムとタスクの関係を示す図であ る。アプリケーションプログラムの処理の一部をタスクと呼び、アプリケーションプログラ ムは複数のタスクにより構成される。図 4では、タスク Aがまず実行され、タスク Aの終 了結果により、タスク B又はタスク Cが選択的に実行される。タスク B又は Cの終了後 にタスク Dが実行され、タスク Dの終了後にタスク E、 F及び Gが実行される。タスク E、 F及び Gは同時に実行することも、 1つずつ実行することも可能である。いずれの方法 にしろ、タスク Hは、タスク E、 F、 Gの総てが終了した後にその実行が開始される。  FIG. 4 is a diagram showing the relationship between application programs executed by the processing unit 4 and tasks. Part of the processing of the application program is called a task, and the application program consists of multiple tasks. In Fig. 4, task A is executed first, and task B or task C is selectively executed according to the end result of task A. Task D is executed after task B or C ends, and tasks E, F, and G are executed after task D ends. Tasks E, F and G can be executed simultaneously or one by one. In any case, task H will be executed after all tasks E, F, and G are finished.
[0026] 上述したように、アプリケーションプログラムを構成するタスクは、 1つのみが実行さ れている場合も、複数が同時に実行される場合もあり、また、各タスクの処理量もそれ ぞれ異なる。 [0026] As described above, only one task constituting the application program is executed. In some cases, multiple tasks are executed at the same time, and the amount of processing for each task is different.
[0027] タスクをどのように設定するかは、コンノイラ又は制御手段による設計事項であるが 、 1つ以上の基本ブロックを 1つのタスクとすることができる。基本ブロックは、制御フロ 一グラフの単位であり、その最初に実行する命令及び最後に実行する命令はただ 1 つであり、最後に実行する命令を経由することなく他の基本ブロックに分岐したり、停 止したりすることがなぐ最初に実行する命令力 最後に実行する命令まで 1直線に 実行することができ、コンパイラが通常その処理の中で認識するものである。  [0027] How to set a task is a design matter by a coniler or control means, but one or more basic blocks can be set as one task. A basic block is a unit of a control flow graph. There is only one instruction to be executed first and one instruction to be executed last, and it is possible to branch to another basic block without going through the instruction to be executed last. The instruction power to be executed first without stopping can be executed in a straight line up to the instruction to be executed last, and is normally recognized by the compiler in the process.
[0028] 制御部 1は、アプリケーションプログラムを構成するタスクを認識して、認識したタス クをタスクキュー追加する。制御部 1におけるタスクのタスクキューへの追加方法とし ては、例えば、アプリケーションプログラムにタスクテーブルを設けておき、制御部 1が アプリケーションプログラムに含まれるタスクテーブルを読み込み、アプリケーションプ ログラムを構成する全タスクを事前にタスクキューに追加する方法がある。この場合は 、全タスクの認識が事前に可能であるため、後述するタスクのスケジューリングを効果 的に行うことができる。また、アプリケーションプログラムのエントリタスク、即ち、最初 に実行すべきタスクを読み込んで、エントリタスクの次に実行する可能性のあるタスク を認識してタスクキューに追加し、タスクの終了により次に実行するタスクが確定した 段階で、確定したタスクの次に実行する可能性のあるタスクをタスクキューに追加する と共に、実行する必要がなくなったタスクをタスクキューから削除することを繰り返す方 法もある。この場合には、アプリケーションプログラムは、各タスクの共有メモリでの位 置を示す情報を含むと ヽつた様に、各タスクを認識できる構造を有して ヽる。  [0028] The control unit 1 recognizes the tasks constituting the application program and adds the recognized tasks to the task queue. As a method for adding tasks to the task queue in the control unit 1, for example, a task table is provided in the application program, and the control unit 1 reads the task table included in the application program, and all the tasks constituting the application program are read. There is a way to add to the task queue in advance. In this case, since all tasks can be recognized in advance, task scheduling described later can be performed effectively. Also, it reads the application program entry task, that is, the task to be executed first, recognizes the task that may be executed next to the entry task, adds it to the task queue, and executes it when the task ends. When a task is finalized, there is a method of repeatedly adding a task that may be executed next to the finalized task to the task queue and deleting a task that no longer needs to be executed from the task queue. In this case, the application program has a structure capable of recognizing each task as if it contains information indicating the position of each task in the shared memory.
[0029] 制御部 1は、上記タスクキューへのタスクの追加と並行して、アプリケーションプログ ラムを複数ある処理部 4で実行させるため、タスク管理並びに共有メモリ及び外部と の入出力管理を行う。尚、タスク管理は、タスク割当及びタスク切替に分類される。こ れら各制御は、制御部用プログラムにより実現される。  [0029] In parallel with the addition of the task to the task queue, the control unit 1 performs task management and input / output management with respect to the shared memory and the outside so that the plurality of processing units 4 execute the application program. Task management is classified into task assignment and task switching. Each of these controls is realized by a control unit program.
[0030] タスク割当は、タスクキュー内のタスクの処理量を把握して、タスクを実行する処理 部 4を決定し、決定した処理部 4に対してタスクを実行させる制御処理を意味する。こ のとき、 1つのタスクを 1つの処理部 4に割り当てること以外に、タスクの処理量が大き い場合には、 1つのタスクを分割して複数の処理部 4に割り当てることも可能である。 例えば、タスクが複数の基本ブロックで構成されている場合であって、タスク内に基本 ブロックを示す情報を含めておくことで制御部 1は、タスクを容易に分割して複数の処 理部 4に実行させることができる。制御部 1は、決定した処理部 4に対して、割り当て たタスクを実行させるために、バス 8により決定した処理部 4に対して処理すべきタス クを通知する。 [0030] Task assignment means control processing for grasping the processing amount of a task in the task queue, determining the processing unit 4 to execute the task, and causing the determined processing unit 4 to execute the task. At this time, in addition to assigning one task to one processing unit 4, the processing amount of the task is large. In such a case, one task can be divided and assigned to a plurality of processing units 4. For example, when a task is composed of a plurality of basic blocks, by including information indicating the basic block in the task, the control unit 1 can easily divide the task into a plurality of processing units 4. Can be executed. The control unit 1 notifies the processing unit 4 determined by the bus 8 of the task to be processed in order to cause the determined processing unit 4 to execute the assigned task.
[0031] 続いて、図 4のアプリケーションプログラムを例にして、制御部 1でのタスク管理処理 を説明する。制御部 1は、まず、タスク Aを任意の処理部 4に割当て実行させる。制御 部 1は、処理部 4に実行すべきタスク Aを書き込むことにより実行させることも、処理部 4に対してアプリケーションプログラムのタスク Aに相当する部分が格納されている共 有メモリ 5のアドレスを通知し、処理部 4に共有メモリ 5から必要なアプリケーションプロ グラムを取得させることにより行うことも可能である。  Next, task management processing in the control unit 1 will be described using the application program of FIG. 4 as an example. The control unit 1 first assigns and executes task A to an arbitrary processing unit 4. The control unit 1 can execute the task A by writing the task A to be executed in the processing unit 4, or the processing unit 4 can specify the address of the shared memory 5 in which the part corresponding to the task A of the application program is stored. This can be done by notifying the processing unit 4 and acquiring the necessary application program from the shared memory 5.
[0032] タスク Aを実行している処理部 4は、タスク Aの実行を終了した場合、その状態を処 理状態から空き状態に変更すると共に、詳細識別子 # 1又は # 2を、処理結果に応 じて出力する。制御部 1は、状態通知部 6を通してタスク Aを実行している処理部 4で の処理終了を認識し、また、詳細識別子の値により次に実行するタスクがタスク Bであ る力タスク Cであるかを認識し、実行すべきタスクを、空き状態である処理部 4に割り 当てて実行させる。尚、タスク Aの次のタスクであるタスク B又は Cは、上述したいずれ の方法でも既にタスクキューに追加されて 、るため、タスク Aを実行して 、るときに、 空き状態である処理部 4が存在するときは、予めタスク B及び Cを空き状態である処理 部 4に割当て、また割り当てた処理部 4に予めアプリケーションプログラムの該当部分 をロードさせておくことも可能である。予めロードさせた場合には、制御部 1は、タスク Aの実行の終了に伴 、、次に実行するタスクをロードして 、る処理部 4に対して実行 開始のトリガを与える。  [0032] When the processing unit 4 executing the task A finishes the execution of the task A, the processing unit 4 changes the state from the processing state to the empty state, and sets the detailed identifier # 1 or # 2 in the processing result. Outputs accordingly. The control unit 1 recognizes the end of processing in the processing unit 4 executing the task A through the status notification unit 6, and the force task C whose task to be executed next is the task B by the value of the detailed identifier. Recognize whether or not there is a task to be executed by assigning it to the processing unit 4 that is in a free state. Note that task B or C, which is the next task after task A, has already been added to the task queue by any of the methods described above. Therefore, when task A is executed, When 4 exists, it is possible to assign tasks B and C in advance to the processing unit 4 that is free, and load the assigned processing unit 4 in advance to the corresponding part of the application program. When it is loaded in advance, the control unit 1 loads the next task to be executed when the execution of the task A is finished, and gives the execution start trigger to the processing unit 4.
[0033] また、タスク Dを実行して 、る処理部 4の状態力 処理状態から空き状態に変更とな つた場合であって、そのときに空き状態である処理部 4が 3つ以上ある場合は、 3つの 処理部 4それぞれにタスク E、 F、 Gを割当て実行させる。 2つ以下である場合には、 一部のタスクのみ、例えば、タスク Eのみを割り当てて実行させ、処理中である処理部 4が空き状態に変化するたびに残りのタスクを実行させる。最後に、タスク E、 F、 G総 ての実行が終了したときに、タスク Hを実行させる。 [0033] In addition, when task D is executed and the state power of processing unit 4 is changed from the processing state to the free state, and there are three or more processing units 4 that are free at that time Assigns tasks E, F, and G to each of the three processing units 4 and executes them. If there are two or less, only a part of the tasks, for example, only task E is assigned and executed, and the processing unit being processed Each time 4 changes to a free state, the remaining tasks are executed. Finally, task H is executed when execution of tasks E, F, and G is completed.
[0034] 図 5は、制御部 1におけるタスク管理の処理フロー図である。制御部 1は、タスクキュ 一に存在するタスクについて必要なリソースを把握し (S51)、状態通知部 6が保持す る各処理部 4の状態を読み取り (S52)、スケジューリングルールに従いタスクキュー に存在するタスクのうち、処理部 4への割当てが可能なタスクと割当先の処理部 4、即 ち、タスク実行のスケジュールを決定する(S53)。続いて、実行先の処理部 4が決定 されたタスクにっ 、て、その実行先の処理部 4での実行が可能な状態となった場合に は、その処理部 1に割り当てたタスクを実行させる(S54)。  FIG. 5 is a process flow diagram of task management in the control unit 1. The control unit 1 grasps the necessary resources for the tasks existing in the task queue (S51), reads the status of each processing unit 4 held by the status notification unit 6 (S52), and exists in the task queue according to the scheduling rule. Among the tasks, the task that can be assigned to the processing unit 4 and the processing unit 4 that is the assignment destination, that is, the task execution schedule is determined (S53). Subsequently, when the execution-target processing unit 4 is ready to be executed by the execution-target processing unit 4, the task assigned to the processing unit 1 is executed. (S54)
[0035] 制御部 1の、処理部 4に対するタスクの実行制御は、上述したように、制御部 1が、 処理部 4に実行すべきアプリケーションプログラムのそのタスク部分を書き込むことに より行うことも、処理部 4に対して、必要なアプリケーションプログラムが格納されてい る共有メモリ 5のアドレスを通知し、処理部 4が共有メモリ 5から必要なアプリケーション プログラムを取得することにより行うことも可能である。また、制御部 1は、タスクを分割 して複数の処理部 4に実行させることも可能である。  [0035] As described above, the control unit 1 performs task execution control on the processing unit 4 by writing the task portion of the application program to be executed in the processing unit 4, as described above. It is also possible to notify the processing unit 4 of the address of the shared memory 5 in which the necessary application program is stored, and the processing unit 4 acquires the necessary application program from the shared memory 5. The control unit 1 can also divide a task and cause a plurality of processing units 4 to execute it.
[0036] 図 6は、制御部 1によるタスク切替の処理フロー図である。尚、簡単のため処理部 4 が出力する各種状態を保持する状態通知部 6は図 6から省略している。制御部 1は、 高優先タスクを実行する必要が生じた場合であって、空き状態の処理部 4がな 、場 合、優先度の低いタスクを実行している処理部 4に中断要求を行う(S61)。中断要求 を受けた処理部 4は、実行中のタスクを後に再開するために必要な情報であるコンテ タストを共有メモリ 5に保存し、処理を中断してライン 71により状態通知部 6へ中断状 態を出力する(S62)。 FIG. 6 is a process flow diagram of task switching by the control unit 1. For simplicity, the state notification unit 6 that holds various states output by the processing unit 4 is omitted from FIG. When the high-priority task needs to be executed and the processing unit 4 is not available, the control unit 1 issues a suspension request to the processing unit 4 executing the low-priority task. (S61). Upon receiving the suspension request, the processing unit 4 saves the content, which is information necessary for restarting the task currently being executed, in the shared memory 5, interrupts the processing, and interrupts the status notification unit 6 via the line 71. State is output (S62).
[0037] 制御部 1は、状態通知部 6経由で処理の中断を確認後、中断要求を行った処理部  [0037] The control unit 1 confirms the interruption of the process via the status notification unit 6, and then the processing unit that has issued the interruption request.
4に、発生した高優先度のタスクの実行を指示する。実行指示された処理部 4は、高 優先度タスクの処理を開始し、実行終了したときにライン 71により状態通知部 6へ空 き状態を出力する(S63)。制御部 1は、状態通知部 6経由で処理の終了を確認後、 処理部 4にタスク再開指示を行い、タスク再開指示を受けた処理部 4は、共有メモリ 5 力 コンテクストを読出し、中断したタスクを再開する(S64)。 [0038] 尚、制御部 1が行う中断要求に、コンテクストの保存位置を指定する情報を含め、或 いは、低優先タスクの処理を中断した処理部 4が保存したコンテクストの位置を状態 通知部 6経由で制御部 1に通知し、制御部 1が再開指示にお 、て保存されて 、るコ ンテクストの位置を処理部 4に通知することで、タスクを中断した処理部 4と、中断した タスクを再開する処理部 4とを異なるものにすることができる。 4 is instructed to execute the high priority task that has occurred. The processing unit 4 instructed to start starts processing the high priority task, and outputs an empty state to the state notification unit 6 through the line 71 when the execution is completed (S63). After confirming the end of processing via the status notification unit 6, the control unit 1 issues a task restart instruction to the processing unit 4, and the processing unit 4 that has received the task restart instruction reads the shared memory 5 force context, Is resumed (S64). [0038] It should be noted that the interruption request made by the control unit 1 includes information specifying the storage location of the context, or the processing unit 4 that interrupted the processing of the low-priority task, the status location stored by the processing unit 4 6 is notified to the control unit 1 and the control unit 1 notifies the processing unit 4 of the location of the context that is saved in response to the restart instruction. The processing unit 4 for restarting the task can be different.
[0039] 制御部 1が各タスクの優先度をどのように判断するかには種々の方法がある力 ァ プリケーシヨンプログラムを読み込んで先に見つ力つたタスクを、より高い優先度とす る方法がある。例えば、図 4に示すアプリケーションプログラムにおいて、タスク E、 F、 Gの順に読み込んだ場合には、タスク E、 F、 Gの順で優先度の割当を行なう。この場 合は、コンパイラがアプリケーションプログラムをコンノィルする際に、演算データ数 やループ回数等を認識してコンパイルの段階で優先度の順序付けを行なうことが可 能となる。  [0039] There are various methods for how the control unit 1 determines the priority of each task. The task that has read the power application program and found it first is given a higher priority. There is a way. For example, in the application program shown in FIG. 4, when tasks E, F, and G are read in this order, priorities are assigned in the order of tasks E, F, and G. In this case, when compiling the application program, the compiler can recognize the number of operation data, the number of loops, etc., and can prioritize at the compilation stage.
[0040] また、タスクの処理量が大きい程、優先度を高くする方法もある。例えば、図 4に示 すアプリケーションプログラムにおいて、タスク Fがタスク E、 Gの 2倍の処理量であり、 処理部 4が 2つある場合に、まず、タスク Fとタスク Eを処理部 4に割当て実行させ、次 にタスク Fとタスク Gを処理部 4に割当て実行させるのではなぐまずタスク Fを分割し て 2つの処理部 4に実行させて、その後タスク E及び Gを実行させる。  There is also a method of increasing the priority as the processing amount of the task increases. For example, in the application program shown in Fig. 4, when task F has twice the processing amount of tasks E and G and there are two processing units 4, task F and task E are first assigned to processing unit 4. Instead of allocating task F and task G to processing unit 4 and then executing them, first divide task F into two processing units 4 and then execute tasks E and G.
[0041] また、本発明による演算装置では、複数の処理部 4を使用することで、複数のアプリ ケーシヨンプログラムを同時に実行することができる力、アプリケーションプログラム単 位で優先度を判断することも当然可能である。  [0041] Further, in the arithmetic device according to the present invention, by using a plurality of processing units 4, the ability to execute a plurality of application programs at the same time, the priority can be determined in units of application programs. Of course it is possible.
[0042] 図 7は、制御部 1における共有メモリ管理の処理フロー図である。尚、入出力管理に ついてもメモリを入出力のためのハードウェア資源と読み替えるだけで同じものである 。メモリ及び入出力管理は、共有メモリ 5や、図示しない外部装置との入出力のため の、図示しないハードウェア資源へのアクセスを管理して、個々の処理部 4が独立し て共有メモリ 5等にアクセスすることによる弊害、例えば、ある処理部 4が他の処理部 4 が書き込んだデータと同じ位置に他のデータを書き込むことによるデータの消失を防 ぐために必要となる。  FIG. 7 is a process flow diagram of shared memory management in the control unit 1. Note that I / O management is the same by simply replacing the memory with hardware resources for I / O. Memory and I / O management manages access to hardware resources (not shown) for input / output to / from shared memory 5 and external devices (not shown). This is necessary in order to prevent harmful effects caused by accessing the data, for example, the loss of data caused by one processing unit 4 writing other data at the same position as the data written by another processing unit 4.
[0043] 制御部 1は、共有メモリ 5の各処理部 4への割当領域を管理しており、処理部 4から 、状態通知部 6経由でメモリ要求があった場合には、共有メモリ 5の割当状況を確認( S71)し、未割当の領域から要求された領域を、メモリ要求を行った処理部 4に割り当 てる(S72)。共有メモリ 5の領域の割当及び Z又は入出力のためのハードウェア資源 の割当を受けた処理部 4は、その領域又はハードウェア資源のみにアクセスし、その 他の領域やノヽードウエア資源にはアクセスしない。処理部 4は、割り当てられたメモリ 領域等の使用を終了した場合にはメモリ開放要求を、状態通知部 6経由で制御部 1 に通知する。 [0043] The control unit 1 manages the allocation area of the shared memory 5 to each processing unit 4, and from the processing unit 4 When there is a memory request via the status notification unit 6, the allocation status of the shared memory 5 is confirmed (S71), and the area requested from the unallocated area is allocated to the processing unit 4 that made the memory request. Hit (S72). The processing unit 4 that has received the allocation of the area of the shared memory 5 and the allocation of the hardware resource for Z or I / O accesses only the area or the hardware resource, and accesses the other area or the hardware resource. do not do. When the processing unit 4 finishes using the allocated memory area, the processing unit 4 notifies the control unit 1 of a memory release request via the status notification unit 6.
[0044] 図 2は、本発明による演算装置の第 2実施形態のブロック図である。以後の説明に おいては、第 1実施形態で説明したのと同じ構成要素には同じ符号を付与して説明 は省略する。図 2によると、処理部 4及び共有メモリ 5はバス 81に、制御部 1、不揮発 性メモリ 2及びメモリ 3はノ ス 82に接続し、バス 81とバス 82はノ ス接続部 9により接続 されている。  FIG. 2 is a block diagram of a second embodiment of the arithmetic device according to the present invention. In the following description, the same components as those described in the first embodiment are assigned the same reference numerals, and description thereof is omitted. According to FIG. 2, the processing unit 4 and the shared memory 5 are connected to the bus 81, the control unit 1, the nonvolatile memory 2 and the memory 3 are connected to the nose 82, and the bus 81 and the bus 82 are connected to the nose connection unit 9. ing.
[0045] ノ ス接続部 9は、処理部 4がメモリ 3及び不揮発性メモリ 2にアクセスすることを制限 する機能を有し、処理部 4が制御用プログラムを破壊したり、メモリ 3に保存されている 制御部 1が保存した制御用データの上書きをしたりすることを防ぐ。また、バス 81とバ ス 82の変 能を設けることで、それぞれ異なるノ スプロトコルの使用が可能になる  The node connection unit 9 has a function of restricting the processing unit 4 from accessing the memory 3 and the nonvolatile memory 2. The processing unit 4 destroys the control program or is stored in the memory 3. Yes Control unit 1 is prevented from overwriting control data saved. In addition, it is possible to use different nose protocols by providing bus 81 and bus 82 functions.
[0046] 図 3は、本発明による演算装置の第 3実施形態のブロック図である。図 3によると、 処理部 4はバス 81に、制御部 1、不揮発性メモリ 2及びメモリ 3はバス 82に接続し、共 有メモリ 5はバス 81及びバス 82に接続している。また、制御部 1は、ライン 73により各 処理部 4と接続している。 FIG. 3 is a block diagram of a third embodiment of the arithmetic device according to the present invention. According to FIG. 3, the processing unit 4 is connected to the bus 81, the control unit 1, the nonvolatile memory 2 and the memory 3 are connected to the bus 82, and the shared memory 5 is connected to the bus 81 and the bus 82. The control unit 1 is connected to each processing unit 4 through a line 73.
[0047] 本実施形態において、制御部 1は、処理部 4に対する各種制御を、ライン 73を用い て処理部 4に通知する。また、共有メモリ 5を、例えば 2ポートメモリとし、バス 81及び バス 82の両方力もアクセス可能とすることで、処理部 4が接続するバスを、不揮発性 メモリ 2及びメモリ 3等が接続するバス力も完全に分離し、不揮発性メモリ 2及びメモリ 3に対する、処理部 4からのアクセスを完全に防止する。  In the present embodiment, the control unit 1 notifies the processing unit 4 of various controls for the processing unit 4 using the line 73. In addition, the shared memory 5 is a 2-port memory, for example, and both the bus 81 and the bus 82 can be accessed, so that the bus connected to the processing unit 4 can be connected to the nonvolatile memory 2 and the memory 3 etc. It is completely separated and access from the processing unit 4 to the nonvolatile memory 2 and the memory 3 is completely prevented.

Claims

請求の範囲 The scope of the claims
[1] 制御手段用のプログラムを読み込んで実行することで、状態通知手段が保持する 各処理手段の状態に基づき、アプリケーションプログラムを構成するタスクの各処理 手段への割当てを行う制御手段と、  [1] By reading and executing the program for the control means, the control means for assigning the tasks constituting the application program to each processing means based on the status of each processing means held by the status notification means;
制御手段に割り当てられたタスクを実行し、タスクの実行に関する状態を出力する、 複数の処理手段と、  A plurality of processing means for executing a task assigned to the control means and outputting a status relating to the execution of the task;
処理手段が出力する状態を保持する状態通知手段と、  State notification means for holding the state output by the processing means;
を有することを特徴とする演算装置。  An arithmetic device comprising:
[2] 制御手段のみが使用する第 1の記憶手段と、  [2] first storage means used only by the control means;
制御手段及び処理手段が使用する第 2の記憶手段と、  Second storage means used by the control means and the processing means;
を有することを特徴とする請求項 1に記載の演算装置。  The arithmetic device according to claim 1, comprising:
[3] 制御手段は、処理手段からの要求に基づき第 2の記憶手段の領域及び Z又は入 出力のためのハードウェア資源を、要求した処理手段に割当て、 [3] Based on the request from the processing means, the control means allocates the area of the second storage means and hardware resources for Z or I / O to the requested processing means,
処理手段は、制御手段から割り当てられた第 2の記憶手段の領域及び Z又は入出 力のためのハードウェア資源のみにアクセスすること、  The processing means accesses only the area of the second storage means allocated by the control means and the hardware resources for Z or I / O,
を特徴とする請求項 2に記載の演算装置。  The arithmetic unit according to claim 2, wherein:
[4] 制御手段と、第 1の記憶手段とは第 1のバスに接続し、 [4] The control means and the first storage means are connected to the first bus,
複数の処理手段と、第 2の記憶手段とは第 2のバスに接続し、  The plurality of processing means and the second storage means are connected to the second bus,
第 1のバスと第 2のノ スを接続し、処理手段から第 1の記憶手段へのアクセスを防ぐ バス変換手段を有すること、  Having bus conversion means for connecting the first bus and the second node and preventing access from the processing means to the first storage means;
を特徴とする請求項 2に記載の演算装置。  The arithmetic unit according to claim 2, wherein:
[5] 制御手段と、第 1の記憶手段とは第 1のバスに接続し、 [5] The control means and the first storage means are connected to the first bus,
複数の処理手段は第 2のバスに接続し、  The plurality of processing means are connected to the second bus,
第 2の記憶手段は、第 1のバスと第 2のバスに接続して 、ること、  The second storage means is connected to the first bus and the second bus;
を特徴とする請求項 2に記載の演算装置。  The arithmetic unit according to claim 2, wherein:
PCT/JP2006/321033 2005-10-27 2006-10-23 Calculating apparatus WO2007049543A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2005-312661 2005-10-27
JP2005312661A JP4017005B2 (en) 2005-10-27 2005-10-27 Arithmetic unit

Publications (1)

Publication Number Publication Date
WO2007049543A1 true WO2007049543A1 (en) 2007-05-03

Family

ID=37967655

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/321033 WO2007049543A1 (en) 2005-10-27 2006-10-23 Calculating apparatus

Country Status (2)

Country Link
JP (1) JP4017005B2 (en)
WO (1) WO2007049543A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130103829A1 (en) * 2010-05-14 2013-04-25 International Business Machines Corporation Computer system, method, and program

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2015015756A1 (en) * 2013-08-02 2017-03-02 日本電気株式会社 Power saving control system, control device, control method and control program for non-volatile memory mounted server
JP7124592B2 (en) * 2018-09-21 2022-08-24 日本電気株式会社 Job execution system and job execution method

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0423159A (en) * 1990-05-18 1992-01-27 Mitsubishi Electric Corp Shared memory device
JPH0512173A (en) * 1991-07-08 1993-01-22 Canon Inc Information processor
JPH06266680A (en) * 1991-09-27 1994-09-22 Sun Microsyst Inc Interface between bus and connecting method of bus
JPH07319840A (en) * 1994-05-27 1995-12-08 Fuji Xerox Co Ltd Multi-cpu device
JP2002342295A (en) * 2001-05-16 2002-11-29 Nec Corp Multiprocessor system
JP2004171234A (en) * 2002-11-19 2004-06-17 Toshiba Corp Task allocation method in multiprocessor system, task allocation program and multiprocessor system
JP2004341725A (en) * 2003-05-14 2004-12-02 Hitachi Ltd Control method for computer, computer, storage controller, program and recording medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0423159A (en) * 1990-05-18 1992-01-27 Mitsubishi Electric Corp Shared memory device
JPH0512173A (en) * 1991-07-08 1993-01-22 Canon Inc Information processor
JPH06266680A (en) * 1991-09-27 1994-09-22 Sun Microsyst Inc Interface between bus and connecting method of bus
JPH07319840A (en) * 1994-05-27 1995-12-08 Fuji Xerox Co Ltd Multi-cpu device
JP2002342295A (en) * 2001-05-16 2002-11-29 Nec Corp Multiprocessor system
JP2004171234A (en) * 2002-11-19 2004-06-17 Toshiba Corp Task allocation method in multiprocessor system, task allocation program and multiprocessor system
JP2004341725A (en) * 2003-05-14 2004-12-02 Hitachi Ltd Control method for computer, computer, storage controller, program and recording medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AMANO H.: "Heiretsu Computer", KABUSHIKI KAISHA SHOWA KODO, 5 June 1996 (1996-06-05), pages 15 - 18, XP003011665 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130103829A1 (en) * 2010-05-14 2013-04-25 International Business Machines Corporation Computer system, method, and program
US9794138B2 (en) * 2010-05-14 2017-10-17 International Business Machines Corporation Computer system, method, and program

Also Published As

Publication number Publication date
JP4017005B2 (en) 2007-12-05
JP2007122337A (en) 2007-05-17

Similar Documents

Publication Publication Date Title
JP6294586B2 (en) Execution management system combining instruction threads and management method
EP3425502A1 (en) Task scheduling method and device
JP4947441B2 (en) Multiprocessor system, system configuration method in multiprocessor system, and program thereof
JP6296678B2 (en) Method and apparatus for ensuring real-time performance of soft real-time operating system
JP2005056067A (en) Dma transfer controller
KR100791296B1 (en) Apparatus and method for providing cooperative scheduling on multi-core system
WO2007001014A1 (en) Information terminal, computer resource management method, and virtual machine execution switching method
KR101150661B1 (en) Information processing device and memory area management method
JP2007188523A (en) Task execution method and multiprocessor system
JP4017005B2 (en) Arithmetic unit
CN108958903B (en) Embedded multi-core central processor task scheduling method and device
JP5158576B2 (en) I / O control system, I / O control method, and I / O control program
JP2009175960A (en) Virtual multiprocessor system
JP3893136B2 (en) Embedded computer control program, recording medium recording the program, and embedded system
JP2008225641A (en) Computer system, interrupt control method and program
JP2007141155A (en) Multi-core control method in multi-core processor
US9619277B2 (en) Computer with plurality of processors sharing process queue, and process dispatch processing method
JP5540799B2 (en) Data input / output control method, data input / output control program, and data input / output control device
JP6364827B2 (en) Information processing apparatus, resource access method thereof, and resource access program
WO2019188177A1 (en) Information processing device
JP2003186686A (en) Resource control apparatus, method and recording medium
JP7188472B2 (en) Computer, scheduling method and program
JP6358330B2 (en) Information processing apparatus, information processing system, memory management method, and memory management program
JP2010026575A (en) Scheduling method, scheduling device, and multiprocessor system
JP2009193260A (en) Storage system, storage device, priority control device, and priority control method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06822053

Country of ref document: EP

Kind code of ref document: A1