JP2019003415A - Information processing device, information processing method, and information processing program - Google Patents

Information processing device, information processing method, and information processing program Download PDF

Info

Publication number
JP2019003415A
JP2019003415A JP2017117703A JP2017117703A JP2019003415A JP 2019003415 A JP2019003415 A JP 2019003415A JP 2017117703 A JP2017117703 A JP 2017117703A JP 2017117703 A JP2017117703 A JP 2017117703A JP 2019003415 A JP2019003415 A JP 2019003415A
Authority
JP
Japan
Prior art keywords
task
counter
execution
value
processor
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.)
Granted
Application number
JP2017117703A
Other languages
Japanese (ja)
Other versions
JP6962717B2 (en
Inventor
岳大 柳
Takehiro Yanagi
岳大 柳
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.)
NEC Platforms Ltd
NEC Corp
Original Assignee
NEC Platforms Ltd
NEC Corp
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 NEC Platforms Ltd, NEC Corp filed Critical NEC Platforms Ltd
Priority to JP2017117703A priority Critical patent/JP6962717B2/en
Publication of JP2019003415A publication Critical patent/JP2019003415A/en
Application granted granted Critical
Publication of JP6962717B2 publication Critical patent/JP6962717B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To provide an information processing device and the like that can prevent deadlock from occurring by unrequired exclusive control during the execution of a task.SOLUTION: An information processing device comprises: initialization means for, for each lock information created in order to exclude resources accessing during the execution of a task, creating counters corresponding to each of the processors capable of executing the task, and initializing the counter values; and execution means for, as to the execution of the processing occupying the resources during the task, when the counter values of the processors assigned to executing the task are initial values, obtaining the lock information and executing the processing by counting up the counter values of the processors, and for, when the counter values of the processors are not initial values, executing the processing by counting up the counter values of the processors without obtaining the lock information.SELECTED DRAWING: Figure 1

Description

本発明は、スピンロックによる排他制御を行う情報処理装置、情報処理方法および情報処理プログラムに関する。   The present invention relates to an information processing apparatus, an information processing method, and an information processing program that perform exclusive control by spin lock.

ソフトウェアにおける最小の実行単位であるタスクと、そのタスクの実行中に発生する割り込みとの間の排他制御の方式として、一般に、スピンロック(Spinlock)が用いられる。スピンロックでは、1つの資源に対して1つのロック変数がメモリに用意される(スピンロック初期化)。そして、タスクを実行するCPU(Central Processing Unit)またはCPUコアのうち、ロック変数を取得(スピンロック取得)できたCPUまたはCPUコアのみが、資源にアクセス可能となる。   As a method of exclusive control between a task, which is the minimum execution unit in software, and an interrupt that occurs during the execution of the task, a spin lock (Spinlock) is generally used. In the spin lock, one lock variable is prepared in the memory for one resource (spin lock initialization). Of the CPU (Central Processing Unit) or CPU core that executes the task, only the CPU or CPU core that can acquire the lock variable (acquire spin lock) can access the resource.

CPUまたはCPUコアは、資源へのアクセスが完了した際にロック変数を解放する(スピンロック解放)。これにより、他のCPUまたはCPUコアが、資源にアクセス可能となる。CPUまたはCPUコアは、他のCPUまたはCPUコアが資源にアクセスしている場合、ロック変数を取得できるまでループしながらその資源が解放されるのを待ち続ける。なお、以降の説明では、ロック変数の取得または解放を、それぞれスピンロックの取得または解放とも表記する。   The CPU or CPU core releases the lock variable when the access to the resource is completed (spin lock release). As a result, other CPUs or CPU cores can access the resources. If another CPU or CPU core is accessing the resource, the CPU or CPU core keeps waiting until the resource is released while looping until the lock variable can be acquired. In the following description, acquisition or release of a lock variable is also expressed as acquisition or release of a spin lock, respectively.

図15は、関数A、Bの処理について説明する図である。図15に示すように、関数A、Bにおいて、それぞれ処理A、Bは、排他が必要な処理であるため、その処理A、Bの前後に、それぞれスピンロックの取得と解放が行われる。   FIG. 15 is a diagram for explaining the processing of the functions A and B. As shown in FIG. 15, in the functions A and B, since the processes A and B are processes that need to be excluded, the spin lock is acquired and released before and after the processes A and B, respectively.

図16は、関数A、Bの処理の実行について説明する図である。図16において、矢印tで示す方向は、各関数の実行中の時間経過を示す。関数Aの実行中に関数Bが実行された場合、関数Bにおけるスピンロックの取得は、関数Aにおいて取得されたスピンロックが解放されるまでの間、ループしながら待機される。よって、同じスピンロックを取得する処理が、同時に複数実行されることはない。また、スピンロックを取得して処理を実行しているCPUまたはCPUコアでは、他のタスクや割り込みは実行されない。   FIG. 16 is a diagram for explaining the execution of the functions A and B. In FIG. 16, the direction indicated by the arrow t indicates the passage of time during the execution of each function. When the function B is executed during the execution of the function A, the acquisition of the spin lock in the function B waits while looping until the spin lock acquired in the function A is released. Therefore, a plurality of processes for acquiring the same spin lock are not executed simultaneously. In addition, other tasks and interrupts are not executed in the CPU or CPU core that is executing processing by acquiring the spin lock.

ここで、特許文献1には、共有リソースに対する排他制御を確実に実行しながら、排他制御によるマイクロコントローラの処理負荷を低減し、処理性能を効率的に利用できる電子制御装置が開示されている。   Here, Patent Document 1 discloses an electronic control device that can reduce the processing load of a microcontroller by exclusive control and efficiently use processing performance while reliably executing exclusive control on a shared resource.

特開2016−081204JP2006-081204

図17は、あるソフトウェアに含まれるタスク1の実行中にデッドロックが発生する例について説明する図である。タスク1には、関数A、Bが含まれる。関数Aでは、スピンロックが取得された後、関数Bの呼び出しが行われる。関数Bの呼び出しが行われると、関数Bでは、スピンロックを取得する処理が実行される。このとき、関数Aによってスピンロックは取得されているので、タスク1内で、同じスピンロックを多重に取得する処理が発生し、デッドロックによりソフトウェアの実行が停止する。このように、あるタスク内で発生するデッドロックを、自己デッドロックとも称する。   FIG. 17 is a diagram illustrating an example in which a deadlock occurs during execution of task 1 included in a certain software. Task 1 includes functions A and B. In the function A, after the spin lock is acquired, the function B is called. When the function B is called, the function B executes a process for acquiring a spin lock. At this time, since the spin lock has been acquired by the function A, processing for acquiring the same spin lock multiple times occurs in the task 1, and execution of software stops due to deadlock. Thus, a deadlock that occurs in a certain task is also referred to as a self deadlock.

ソフトウェアの構造の変更により、関数のコールツリーが変わると、上述のように、同じスピンロックを多重に取得する処理の発生により、デッドロックが発生し、ソフトウェアの実行が停止するおそれがあるという課題がある。   If the function call tree changes due to a change in the structure of the software, as described above, a deadlock may occur due to the occurrence of processing to acquire the same spin lock multiple times, and there is a possibility that execution of the software may stop There is.

特許文献1には、演算処理の実行順序を変更することにより排他制御に関わる処理時間を短くすることは開示されているが、不要な排他制御によるデッドロックの発生を防ぐ技術は開示されていない。   Patent Document 1 discloses that the processing time for exclusive control is shortened by changing the execution order of arithmetic processing, but does not disclose a technique for preventing the occurrence of deadlock due to unnecessary exclusive control. .

本発明は、上記課題を鑑みてなされたものであり、タスク実行中の不要な排他制御によるデッドロックの発生を防ぐことができる情報処理装置等を提供することを主要な目的とする。   The present invention has been made in view of the above problems, and has as its main object to provide an information processing apparatus and the like that can prevent the occurrence of deadlock due to unnecessary exclusive control during task execution.

本発明の一態様に係る情報処理装置は、タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化する初期化手段と、前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する実行手段とを備える。   The information processing apparatus according to an aspect of the present invention creates a counter corresponding to each processor capable of executing the task for each lock information created to exclude resources accessed during the execution of the task, In the execution of the initialization unit that initializes the value of the counter and the processing dedicated to the resource in the task, when the value of the counter of the processor assigned to the execution of the task is an initial value, the lock information And the process is executed by counting up the counter value of the processor. If the counter value of the processor is not the initial value, the counter value of the processor is counted up without acquiring the lock information. And executing means for executing the processing.

本発明の一態様に係る情報処理方法は、タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化し、前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する。   An information processing method according to an aspect of the present invention creates a counter corresponding to each processor capable of executing a task for each lock information created to exclude resources accessed during the execution of the task, When the counter value of the processor assigned to execute the task is an initial value in the execution of the process dedicated to the resource in the task, the counter value is acquired and the lock information is acquired. The processor counter is incremented to execute the process. When the processor counter is not the initial value, the processor counter is incremented without acquiring the lock information. Run.

本発明の一態様に係る情報処理プログラムは、タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化する処理と、前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する処理とを、コンピュータに実行させる。   An information processing program according to an aspect of the present invention creates a counter corresponding to each processor capable of executing the task for each lock information created to exclude resources accessed during execution of the task, The lock information is acquired when the counter value of the processor to which the execution of the task is assigned is the initial value in the process of initializing the value of the counter and the process dedicated to the resource in the task. At the same time, the value of the counter of the processor is counted up and the process is executed. If the value of the counter of the processor is not the initial value, the value of the counter of the processor is counted up without acquiring the lock information. The computer executes the process for executing the process.

本発明によれば、タスク実行中の不要な排他制御によるデッドロックの発生を防ぐことができるという効果が得られる。   According to the present invention, it is possible to prevent the occurrence of deadlock due to unnecessary exclusive control during task execution.

本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 1st Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置の構成を模式的に示す図である。It is a figure which shows typically the structure of the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置の構成を機能単位に示す機能ブロック図である。It is a functional block diagram which shows the structure of the information processing apparatus which concerns on the 2nd Embodiment of this invention in a functional unit. 本発明の各実施形態に示す情報処理装置を実現するコンピュータ装置のハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of the computer apparatus which implement | achieves the information processing apparatus shown to each embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置によるスピンロックの初期化処理を説明するフローチャートである。It is a flowchart explaining the initialization process of the spin lock by the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置により作成されたカウンタの例を示す図である。It is a figure which shows the example of the counter produced by the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置によるスピンロック取得処理を説明するフローチャートである。It is a flowchart explaining the spin lock acquisition process by the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置によるスピンロック解放処理を説明するフローチャートである。It is a flowchart explaining the spin lock release process by the information processing apparatus which concerns on the 2nd Embodiment of this invention. 本発明の第2の実施形態に係る情報処理装置において作成されるスピンロックとカウンタの構成を模式的に示す図である。It is a figure which shows typically the structure of the spin lock and counter produced in the information processing apparatus which concerns on the 2nd Embodiment of this invention. タスクTにおける処理の流れを説明する図である。FIG. 4 is a diagram for explaining a flow of processing in a task T. 関数Aにおけるスピンロック取得処理の実行前と実行後の各コアの各カウンタの値を例示する図である。It is a figure which illustrates the value of each counter of each core before execution of a spin lock acquisition process in function A, and after execution. 関数Bにおけるスピンロック取得処理の実行前と実行後の各コアの各カウンタの値を例示する図である。It is a figure which illustrates the value of each counter of each core before execution after execution of a spin lock acquisition process in function B. 関数Bにおけるスピンロック解放処理の実行前と実行後の各コアの各カウンタの値を例示する図である。It is a figure which illustrates the value of each counter of each core before execution of a spin lock release process in function B, and after execution. 関数Aにおけるスピンロック解放処理の実行前と実行後の各コアの各カウンタの値を例示する図である。It is a figure which illustrates the value of each counter of each core before execution of a spin lock release process in function A and after execution. 関数A、Bの処理について説明する図である。It is a figure explaining processing of functions A and B. 関数A、Bの処理の実行について説明する図である。It is a figure explaining execution of processing of functions A and B. デッドロックが発生する例について説明する図である。It is a figure explaining the example which a deadlock generate | occur | produces.

以下、本発明の実施形態について図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

第1の実施形態
図1は、本発明の第1の実施形態に係る情報処理装置100の構成を示す図である。図1に示すように、情報処理装置100は、初期化部110および実行部120を備える。
First Embodiment FIG. 1 is a diagram showing a configuration of an information processing apparatus 100 according to a first embodiment of the present invention. As illustrated in FIG. 1, the information processing apparatus 100 includes an initialization unit 110 and an execution unit 120.

初期化部110は、タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、タスクを実行可能なプロセッサ(コア)にそれぞれ対応するカウンタを作成し、そのカウンタの値を初期化する。   The initialization unit 110 creates a counter corresponding to each processor (core) capable of executing a task for each lock information created to exclude resources accessed during the execution of the task, and sets the value of the counter. initialize.

実行部120は、タスクにおける資源を専有する処理の実行において、そのタスクの実行を割り当てられているプロセッサのカウンタの値が初期値である場合、ロック情報を取得すると共にプロセッサのカウンタの値をカウントアップして処理を実行し、プロセッサのカウンタの値が初期値でない場合、ロック情報を取得せずにプロセッサのカウンタの値をカウントアップして処理を実行する。   The execution unit 120 acquires lock information and counts the value of the processor counter when the value of the counter of the processor to which the execution of the task is assigned is an initial value in the execution of the process dedicated to resources in the task. If the processor counter value is not the initial value, the processor counter value is counted up and the process is executed without acquiring lock information.

なお、初期化部110および実行部120は、それぞれ一例として、以降の実施形態において説明するスピンロック初期化部220およびタスク実行部230により実現される。   Note that the initialization unit 110 and the execution unit 120 are realized as an example by a spin lock initialization unit 220 and a task execution unit 230 described in the following embodiments, respectively.

上記構成を採用することにより、本第1の実施形態によれば、タスク実行中にそのタスク内でロック情報を取得している場合は、多重にロック情報を取得することなく処理を実行できるので、タスク実行中の不要な排他制御によるデッドロックの発生を防ぐことができるという効果が得られる。   By adopting the above configuration, according to the first embodiment, when lock information is acquired in a task during task execution, processing can be executed without acquiring multiple lock information. Thus, it is possible to prevent the occurrence of deadlock due to unnecessary exclusive control during task execution.

第2の実施形態
図2は、本発明の第2の実施形態に係る情報処理装置200の構成を模式的に示す図である。図2に示すように、情報処理装置200は、CPU501を備える。CPU501は、番号1乃至Nの複数のプロセッサ(以降、「コア」とも称する)が動作するマルチコア構成を有する。
Second Embodiment FIG. 2 is a diagram schematically showing a configuration of an information processing apparatus 200 according to a second embodiment of the present invention. As illustrated in FIG. 2, the information processing apparatus 200 includes a CPU 501. The CPU 501 has a multi-core configuration in which a plurality of processors numbered 1 to N (hereinafter also referred to as “cores”) operate.

ソフトウェア520は、ユーザ等により作成されたソフトウェアであるとする。OS(Operating System)530は、情報処理装置200の動作を制御する。ソフトウェア520およびOS530は、例えば後述する情報処理装置200の記憶装置等に格納されていてもよい。ソフトウェア520は、OS530上で、番号1乃至Nのコア(以降、「コア1乃至コアN」とも称する)を含むCPU501により実行される。   The software 520 is assumed to be software created by a user or the like. An OS (Operating System) 530 controls the operation of the information processing apparatus 200. The software 520 and the OS 530 may be stored in, for example, a storage device of the information processing apparatus 200 described later. The software 520 is executed on the OS 530 by the CPU 501 including cores numbered 1 to N (hereinafter also referred to as “core 1 to core N”).

図3は、図2に示した情報処理装置200の構成を機能単位に示す機能ブロック図である。図3に示すように、情報処理装置200は、スピンロック初期化部220、タスク実行部230およびカウンタ記憶部240を備える。   FIG. 3 is a functional block diagram showing the configuration of the information processing apparatus 200 shown in FIG. 2 in functional units. As illustrated in FIG. 3, the information processing apparatus 200 includes a spin lock initialization unit 220, a task execution unit 230, and a counter storage unit 240.

タスク実行部230は、スピンロック取得部231、処理部232、スピンロック解放部233およびコア番号記憶部234を備える。タスク実行部230は、ソフトウェア520に含まれるプログラムの最小の実行単位であるタスクを実行する機能を有する。   The task execution unit 230 includes a spin lock acquisition unit 231, a processing unit 232, a spin lock release unit 233, and a core number storage unit 234. The task execution unit 230 has a function of executing a task that is a minimum execution unit of a program included in the software 520.

図4は、本実施形態および他の実施形態に示す情報処理装置を実現するコンピュータ装置500のハードウェア構成の一例を示す図である。情報処理装置の各構成要素は、例えば図4に示すようなコンピュータ装置500とソフトウェアとの任意の組み合わせにより実現することができる。   FIG. 4 is a diagram illustrating an example of a hardware configuration of a computer apparatus 500 that realizes the information processing apparatus according to the present embodiment and the other embodiments. Each component of the information processing apparatus can be realized by any combination of a computer apparatus 500 and software as shown in FIG. 4, for example.

図4に示すように、コンピュータ装置500は、CPU501、ROM(Read Only Memory)502、RAM(Random Access Memory)503、記憶装置505、ドライブ装置507、通信インタフェース508、入出力インタフェース510およびバス511を備える。   As shown in FIG. 4, the computer device 500 includes a CPU 501, a ROM (Read Only Memory) 502, a RAM (Random Access Memory) 503, a storage device 505, a drive device 507, a communication interface 508, an input / output interface 510, and a bus 511. Prepare.

記憶装置505は、プログラム504を格納する。プログラム504には、図2に示した、作成されたソフトウェア520や、OS530等が含まれる。ドライブ装置507は、記録媒体506の読み書きを行う。通信インタフェース508は、ネットワーク509と接続する。入出力インタフェース510は、データの入出力を行う。バス511は、各構成要素を接続する。   The storage device 505 stores a program 504. The program 504 includes the created software 520 and the OS 530 shown in FIG. The drive device 507 reads and writes the recording medium 506. The communication interface 508 is connected to the network 509. The input / output interface 510 performs data input / output. A bus 511 connects each component.

CPU501は、図2に示したように、マルチコア構成を有する。CPU501は、RAM503を用いてプログラム504を実行する。プログラム504は、ROM502に記憶されていてもよい。また、プログラム504は、記録媒体506に記録され、ドライブ装置507によって読み出されてもよいし、外部装置からネットワーク509を介して送信されてもよい。通信インタフェース508は、ネットワーク509を介して外部装置とデータをやり取りする。入出力インタフェース510は、周辺機器(キーボード、マウス、表示装置など)とデータをやり取りする。通信インタフェース508および入出力インタフェース510は、データを取得または出力する手段として機能することができる。出力情報などのデータは、記憶装置505に記憶されていてもよいし、プログラム504に含まれていてもよい。   As shown in FIG. 2, the CPU 501 has a multi-core configuration. The CPU 501 executes the program 504 using the RAM 503. The program 504 may be stored in the ROM 502. The program 504 may be recorded on the recording medium 506 and read by the drive device 507, or may be transmitted from the external device via the network 509. A communication interface 508 exchanges data with an external device via the network 509. The input / output interface 510 exchanges data with peripheral devices (keyboard, mouse, display device, etc.). The communication interface 508 and the input / output interface 510 can function as means for acquiring or outputting data. Data such as output information may be stored in the storage device 505 or may be included in the program 504.

図2に示したソフトウェア520は、OS530上でCPU501により実行される際に、プログラムの最小の実行単位であるタスクを生成する。ソフトウェア520は、タスク生成時に、そのタスクで実行する関数と実行優先度を指定する。実行優先度は、例えば0以上の数字であり、数字が小さいほど優先度が高いように設定されてもよい。OS530は、作成されたタスクごとに、そのタスクを実行するコアを指定する。タスクは、OS530により指定されたコア1乃至コアNのいずれかにより実行される。   When the software 520 illustrated in FIG. 2 is executed by the CPU 501 on the OS 530, the software 520 generates a task that is a minimum execution unit of the program. The software 520 designates a function to be executed by the task and an execution priority when the task is generated. The execution priority is a number greater than or equal to 0, for example, and may be set such that the lower the number, the higher the priority. For each created task, the OS 530 designates a core that executes the task. The task is executed by any one of the cores 1 to N designated by the OS 530.

図3に示したスピンロック初期化部220、およびタスク実行部230のスピンロック取得部231、処理部232およびスピンロック解放部233は、例えば、ソフトウェア520(プログラムコード)を、CPU501のコア1乃至コアNのいずれかが、情報処理装置200のRAM503に読み出して実行することにより、実現される。また、図3に示したカウンタ記憶部240、およびコア番号記憶部234は、例えばRAM503により実現されてもよい。   The spin lock initialization unit 220 and the spin lock acquisition unit 231, the processing unit 232, and the spin lock release unit 233 of the task execution unit 230 illustrated in FIG. 3, for example, receive software 520 (program code) from the cores 1 to 1 of the CPU 501. Any one of the cores N is realized by reading into the RAM 503 of the information processing apparatus 200 and executing it. Further, the counter storage unit 240 and the core number storage unit 234 illustrated in FIG. 3 may be realized by the RAM 503, for example.

タスク実行部230は、OS530上で、スピンロックにより排他制御を行いながらタスクを実行する。   The task execution unit 230 executes the task on the OS 530 while performing exclusive control by spin lock.

スピンロックによる排他制御では、タスク実行部230によるタスクの実行中にアクセスされる資源を排他するためのロック情報が作成される。資源を排他するためのロック情報を作成することを、スピンロックを作成(または初期化)する、とも称する。スピンロック(ロック情報)を取得できたコアのみが、資源にアクセスできる。   In exclusive control using spin lock, lock information for exclusive use of resources accessed during task execution by the task execution unit 230 is created. Creating lock information to exclude resources is also referred to as creating (or initializing) a spin lock. Only the core that can acquire the spin lock (lock information) can access the resource.

図5は、情報処理装置200におけるタスク実行部230のスピンロック初期化部220によるスピンロックの初期化処理を説明するフローチャートである。図5を参照して、スピンロック初期化部220によるスピンロックの初期化処理について説明する。なお、タスク実行中、OS530によりそのタスクの実行を割り当てられているコアの番号は、コア番号記憶部234に記憶されているとする。   FIG. 5 is a flowchart for explaining spin lock initialization processing by the spin lock initialization unit 220 of the task execution unit 230 in the information processing apparatus 200. With reference to FIG. 5, a spin lock initialization process by the spin lock initialization unit 220 will be described. It is assumed that the core number assigned to the execution of the task by the OS 530 is stored in the core number storage unit 234 during the task execution.

スピンロック初期化部220は、タスクで資源にアクセスする前に、スピンロックを初期化する(ステップS110)。   The spin lock initialization unit 220 initializes the spin lock before accessing the resource by the task (step S110).

続いて、スピンロック初期化部220は、動作中のCPUのコアのそれぞれに対応するカウンタを作成し、それぞれを0で初期化して、カウンタ記憶部240に格納する(ステップS120)。カウンタは、0以上の整数を示す値を有する。図6は、スピンロック初期化部220により作成されたカウンタの例を示す図である。図6に示すように、例えば、スピンロック初期化部220は、RAM503のアドレス1乃至Nに、それぞれコア1乃至Nの初期値0のカウンタを作成する。   Subsequently, the spin lock initialization unit 220 creates counters corresponding to each of the operating CPU cores, initializes them to 0, and stores them in the counter storage unit 240 (step S120). The counter has a value indicating an integer of 0 or more. FIG. 6 is a diagram illustrating an example of a counter created by the spin lock initialization unit 220. As illustrated in FIG. 6, for example, the spin lock initialization unit 220 creates counters of initial values 0 of the cores 1 to N at addresses 1 to N of the RAM 503, respectively.

図7は、タスク実行部230のスピンロック取得部231によるスピンロック取得処理を説明するフローチャートである。   FIG. 7 is a flowchart for explaining spin lock acquisition processing by the spin lock acquisition unit 231 of the task execution unit 230.

タスク実行部230は、タスク実行中に、ある資源を専有する処理(処理Eと称する)を実行する際、スピンロック取得部231において、図7に示すスピンロック取得処理を実行する。   The task execution unit 230 executes a spin lock acquisition process shown in FIG. 7 in the spin lock acquisition unit 231 when executing a process exclusive to a certain resource (referred to as process E) during task execution.

スピンロック取得部231は、自タスクが動作中のコアの番号をコア番号記憶部234から取得する(ステップS210)。スピンロック取得部231は、カウンタ記憶部240に記憶される、取得した番号のコアのカウンタ値を判定する。   The spin lock acquisition unit 231 acquires the number of the core in which the own task is operating from the core number storage unit 234 (step S210). The spin lock acquisition unit 231 determines the counter value of the acquired core number stored in the counter storage unit 240.

スピンロック取得部231は、カウンタ値が「0」(初期値)の場合(ステップS220においてYes)、スピンロックを取得する(ステップS230)。そして、スピンロック取得部231は、カウンタ記憶部240に記憶される、動作中のコアのカウンタ値に「1」を加算(カウントアップ)する(ステップS240)。   When the counter value is “0” (initial value) (Yes in Step S220), the spin lock acquisition unit 231 acquires the spin lock (Step S230). Then, the spin lock acquisition unit 231 adds (counts up) “1” to the counter value of the operating core stored in the counter storage unit 240 (step S240).

一方、スピンロック取得部231は、カウンタ値が「0」でない場合(ステップS220においてNo)、スピンロックを取得せずに、カウンタ記憶部240に記憶される、動作中のコアのカウンタ値に「1」を加算する。   On the other hand, when the counter value is not “0” (No in step S220), the spin lock acquisition unit 231 does not acquire the spin lock and stores the counter value of the operating core in the counter storage unit 240 as “ Add 1 ”.

処理S220においてカウンタ値が「0」の場合、スピンロック取得部231がスピンロックを取得してカウンタ値に「1」を加算した後、処理部232は、処理Eを実行する。処理S220においてカウンタ値が0でない場合、すでに同じスピンロックが取得されているので、スピンロック取得部231はスピンロックの取得処理を行わずにカウンタ値に「1」を加算した後、処理部232は、処理Eを実行する。   When the counter value is “0” in the process S220, the spin lock acquisition unit 231 acquires the spin lock and adds “1” to the counter value, and then the processing unit 232 executes the process E. If the counter value is not 0 in step S220, the same spin lock has already been acquired. Therefore, the spin lock acquisition unit 231 adds “1” to the counter value without performing the spin lock acquisition process, and then the processing unit 232 Performs process E.

図8は、タスク実行部230のスピンロック解放部233によるスピンロック解放処理を説明するフローチャートである。図8を参照して、スピンロック解放部233によるスピンロック解放処理を説明する。   FIG. 8 is a flowchart for explaining spin lock release processing by the spin lock release unit 233 of the task execution unit 230. With reference to FIG. 8, the spin lock releasing process by the spin lock releasing unit 233 will be described.

処理部232による排他した資源へのアクセスが完了すると、スピンロック解放部233は、自タスクが動作中のコアの番号を、コア番号記憶部234から取得する(ステップS310)。   When the access to the exclusive resource by the processing unit 232 is completed, the spin lock releasing unit 233 acquires the core number in which the task is operating from the core number storage unit 234 (step S310).

続いて、スピンロック解放部233は、取得した番号のコアのカウンタ値をカウンタ記憶部240から読み出し、判定する。カウンタ値が「0」の場合(ステップS320においてYes)、スピンロック解放部233は、処理を終了する。これは、スピンロック未取得時に、スピンロック解放処理が実行された場合を考慮した処理である。   Subsequently, the spin lock release unit 233 reads out the counter value of the acquired core number from the counter storage unit 240 and makes a determination. If the counter value is “0” (Yes in step S320), the spin lock releasing unit 233 ends the process. This is a process considering the case where the spin lock release process is executed when the spin lock is not acquired.

カウンタ値が「0」でない場合(ステップS320においてNo)、スピンロック解放部233は、カウンタ記憶部240に記憶される、動作中のコアのカウンタ値から「1」を減算(カウントダウン)し(ステップS330)、再度、カウンタ値を判定する(ステップS340)。   When the counter value is not “0” (No in Step S320), the spin lock release unit 233 subtracts (counts down) “1” from the counter value of the active core stored in the counter storage unit 240 (Step S320). (S330), the counter value is determined again (step S340).

カウンタ値が「0」である場合(ステップS340においてYes)、スピンロック解放部233は、スピンロックを解放する(ステップS350)。一方、カウンタ値が「0」でない場合は、スピンロック解放部233は、スピンロックの解放を行わない。その後、タスク実行部230によりタスクの実行が継続される。   When the counter value is “0” (Yes in Step S340), the spin lock release unit 233 releases the spin lock (Step S350). On the other hand, when the counter value is not “0”, the spin lock release unit 233 does not release the spin lock. Thereafter, the task execution unit 230 continues the execution of the task.

ここで、図9は、情報処理装置200において作成されるスピンロックとカウンタの構成を、模式的に示す図である。必要なスピンロックの数がM個(Mは整数)の場合、M個のスピンロックが、OS530により作成される。図9では、例えば、スピンロック1、スピンロックMは、それぞれ、資源1、資源2を排他するために作成されたスピンロックである。スピンロックが作成されるごとに、ソフトウェア520により、コア1乃至コアNにそれぞれ対応するカウンタが作成される。
[具体例]
上述した動作を、具体例を用いて説明する。図10は、タスクTにおける処理の流れを説明する図である。図10において矢印tで示す方向は、関数実行中の時間経過を示すとする。タスクTは、関数A、Bを含む。関数A、Bは、ともにアクセスする資源の排他制御が必要な処理を含む。
Here, FIG. 9 is a diagram schematically illustrating the configuration of the spin lock and the counter created in the information processing apparatus 200. When the number of necessary spin locks is M (M is an integer), M spin locks are created by the OS 530. In FIG. 9, for example, spin lock 1 and spin lock M are spin locks created to exclude resource 1 and resource 2, respectively. Each time a spin lock is created, the software 520 creates counters corresponding to the cores 1 to N, respectively.
[Concrete example]
The operation described above will be described using a specific example. FIG. 10 is a diagram illustrating the flow of processing in task T. In FIG. 10, the direction indicated by the arrow t indicates the passage of time during function execution. The task T includes functions A and B. Functions A and B include processes that require exclusive control of resources that are accessed together.

関数Aにおいて、スピンロックが取得された後、関数Bの呼び出しが行われる。関数Bが呼び出されると、関数Bにおいても、再度スピンロックの取得が行われる。このため、図10の流れの場合、関数Bにおけるスピンロック取得時に自己デッドロックが発生する。しかし、関数Bにおけるスピンロック取得は、関数Aでスピンロックを取得中に実行されるので、関数Bにおけるスピンロックの取得と解放は、不要な処理であると考えられる。   In the function A, after the spin lock is acquired, the function B is called. When the function B is called, the spin lock is again acquired in the function B. For this reason, in the case of the flow of FIG. 10, a self deadlock occurs when the spin lock in the function B is acquired. However, since the spin lock acquisition in the function B is executed while the spin lock is acquired in the function A, the acquisition and release of the spin lock in the function B is considered to be an unnecessary process.

そこで、本実施形態では、上記のように不要と考えられるスピンロックの取得処理と解放処理を行わないように、以下に示すように、スピンロックの初期化、取得および解放の各処理を行うことを説明する。   Therefore, in the present embodiment, the spin lock initialization, acquisition, and release processes are performed as described below so that the spin lock acquisition process and the release process that are considered unnecessary as described above are not performed. Will be explained.

ここでは、図10に示すタスクTが、コア1乃至コアNのうち、コア1において実行される例について説明する。このとき、情報処理装置200のコア番号記憶部234には、タスクTの実行を割り当てられたコアの番号として「1」が記憶されているとする。   Here, an example in which the task T illustrated in FIG. 10 is executed in the core 1 among the cores 1 to N will be described. At this time, it is assumed that “1” is stored in the core number storage unit 234 of the information processing apparatus 200 as the number of the core assigned to execute the task T.

また、タスクTの実行前に、図5に示したように、スピンロック初期化部220により、スピンロックの初期化と、コア1乃至コアNの各カウンタの作成が行われているとする。図11は、図10に示す関数Aにおけるスピンロック取得処理の実行前と実行後の、コア1乃至コアNの各カウンタの値を例示する図である。関数Aにおけるスピンロック取得処理の実行前は、コア1を含むすべてのコアのカウンタ値は「0」である。これらのカウンタが、情報処理装置200のカウンタ記憶部240に記憶されているとする。   Further, it is assumed that before the task T is executed, as shown in FIG. 5, the spin lock initialization unit 220 initializes the spin lock and creates the counters of the cores 1 to N. FIG. 11 is a diagram illustrating the values of the counters of the cores 1 to N before and after the execution of the spin lock acquisition process in the function A shown in FIG. Before the execution of the spin lock acquisition process in the function A, the counter values of all the cores including the core 1 are “0”. Assume that these counters are stored in the counter storage unit 240 of the information processing apparatus 200.

タスクTにおける関数Aの実行にあたり、スピンロック取得部231は、アクセスする資源を排他するため、図7に示すスピンロック取得処理を実行する。すなわち、処理S210に示すように、スピンロック取得部231は、タスクTが動作中のコアの番号を取得する。ここでは、スピンロック取得部231は、「1」を取得する。   In executing the function A in the task T, the spin lock acquisition unit 231 executes a spin lock acquisition process shown in FIG. 7 in order to exclude resources to be accessed. That is, as shown in process S210, the spin lock acquisition unit 231 acquires the number of the core in which the task T is operating. Here, the spin lock acquisition unit 231 acquires “1”.

続いて、処理S210に示すように、スピンロック取得部231は、カウンタ記憶部240に記憶される、コア1のカウンタ値を判定すると、コア1のカウンタ値は「0」である。したがって、スピンロック取得部231は、処理S230に示すようにスピンロックを取得すると共に、コア1のカウンタ値に「1」を加算する。これにより、図11に示すように、関数Aのスピンロック取得処理実行後のコア1のカウンタ値は、「1」となる。   Subsequently, as illustrated in process S <b> 210, when the spin lock acquisition unit 231 determines the counter value of the core 1 stored in the counter storage unit 240, the counter value of the core 1 is “0”. Therefore, the spin lock acquisition unit 231 acquires the spin lock as shown in the process S230 and adds “1” to the counter value of the core 1. As a result, as shown in FIG. 11, the counter value of the core 1 after execution of the spin lock acquisition process of the function A becomes “1”.

スピンロック取得後、図10に示すように、関数Aでは、関数Bの呼び出しが行われる。図12は、関数Bにおけるスピンロック取得処理の実行前と実行後の、コア1乃至コアNの各カウンタの値を例示する図である。図12に示すように、関数Bのスピンロック取得処理の実行前のコア1のカウンタ値は「1」である。この状態で、関数Bが実行されると、スピンロック取得部231は、図7に示すスピンロック取得処理を実行する。   After the spin lock is acquired, the function A is called in the function A as shown in FIG. FIG. 12 is a diagram illustrating the values of the counters of the cores 1 to N before and after the execution of the spin lock acquisition process in the function B. As shown in FIG. 12, the counter value of the core 1 before the execution of the spin lock acquisition process of the function B is “1”. When the function B is executed in this state, the spin lock acquisition unit 231 executes the spin lock acquisition process shown in FIG.

処理S210で取得されるコアの番号は「1」であり、このときのコア1のカウンタ値は、図12に示すように「1」である。したがって、処理S220においてカウンタ値は0でないので、スピンロック取得部231は、スピンロックの取得は行わず、カウンタに「1」を加算する。これにより、コア1のカウンタ値は、「2」になる。このように、関数Aにより取得されているスピンロックと同じスピンロックの取得処理を、関数Bでは行われないので、自己デッドロックは発生しない。   The core number acquired in step S210 is “1”, and the counter value of the core 1 at this time is “1” as shown in FIG. Accordingly, since the counter value is not 0 in the process S220, the spin lock acquisition unit 231 does not acquire the spin lock and adds “1” to the counter. As a result, the counter value of the core 1 becomes “2”. Thus, since the same spinlock acquisition process as that acquired by the function A is not performed in the function B, no self deadlock occurs.

関数Bでは、スピンロックの取得は行わずに、処理Bが処理部232により実行される。処理Bにおいて、資源へのアクセスが完了すると、スピンロック解放部233は、図8に示すスピンロック解放処理を実行する。図13は、図10に示す関数Bにおけるスピンロック解放処理の実行前と実行後の、コア1乃至コアNの各カウンタの値を例示する図である。図13に示すように、関数Bのスピンロック解放処理の実行前のコア1のカウンタ値は「2」である。   In the function B, the process B is executed by the processing unit 232 without acquiring the spin lock. In the process B, when the access to the resource is completed, the spin lock release unit 233 executes the spin lock release process shown in FIG. FIG. 13 is a diagram illustrating the values of the counters of the cores 1 to N before and after the execution of the spin lock release process in the function B shown in FIG. As shown in FIG. 13, the counter value of the core 1 before the execution of the spin lock release process of the function B is “2”.

処理S310で取得されるコアの番号は「1」であり、このときのコア1のカウンタ値は、図13に示すように「2」である。したがって、処理S320においてカウンタ値は「0」でないので、スピンロック解放部233は、処理S330に示すように、動作中のコアのカウンタ値から「1」を減算する。これにより、コア1のカウンタ値は、「1」になる。   The core number acquired in step S310 is “1”, and the counter value of the core 1 at this time is “2” as shown in FIG. Therefore, since the counter value is not “0” in the process S320, the spin lock releasing unit 233 subtracts “1” from the counter value of the operating core as shown in the process S330. As a result, the counter value of the core 1 becomes “1”.

処理S340においても、コア1のカウンタ値は「0」ではないので、スピンロック解放部233は、スピンロックの解放を行わない。   Also in the process S340, since the counter value of the core 1 is not “0”, the spin lock release unit 233 does not release the spin lock.

続いて、図10に示すタスクTでは、関数Aの実行に戻り、関数Aにおける処理Aが処理部232により実行される。その後、スピンロック解放部233は、スピンロック解放処理を実行する。   Subsequently, in the task T illustrated in FIG. 10, the process A is returned to the execution of the function A, and the processing A in the function A is executed by the processing unit 232. Thereafter, the spin lock release unit 233 executes a spin lock release process.

図14は、図10に示す関数Aにおけるスピンロック解放処理の実行前と実行後の、コア1乃至コアNの各カウンタの値を例示する図である。図14に示すように、関数Aのスピンロック解放処理の実行前のコア1のカウンタ値は「1」である。   FIG. 14 is a diagram illustrating the values of the counters of the cores 1 to N before and after the execution of the spin lock release process in the function A shown in FIG. As shown in FIG. 14, the counter value of the core 1 before the execution of the spin lock release process of the function A is “1”.

処理S310で取得されるコアの番号は「1」であり、このときのコア1のカウンタ値は、図14に示すように「1」である。したがって、処理S320においてカウンタ値は「0」でないので、スピンロック解放部233は、処理S330に示すように、動作中のコアのカウンタ値から「1」を減算する。これにより、コア1のカウンタ値は、「0」になる。よって、処理S350に示すように、スピンロック解放部233は、スピンロックを解放する。   The core number acquired in step S310 is “1”, and the counter value of the core 1 at this time is “1” as shown in FIG. Therefore, since the counter value is not “0” in the process S320, the spin lock releasing unit 233 subtracts “1” from the counter value of the operating core as shown in the process S330. As a result, the counter value of the core 1 becomes “0”. Therefore, as shown in process S350, the spin lock releasing unit 233 releases the spin lock.

これにより、排他される資源にアクセスする処理が完了し、引き続いて、関数Aにおける処理が実行される。   Thereby, the process for accessing the exclusive resource is completed, and the process in the function A is subsequently executed.

以上のように、本第2の実施形態によれば、スピンロック初期化部220は、スピンロックの作成ごとに、各コアに対応するカウンタを作成してその値を初期化する。タスク実行部230は、タスク実行中に、資源を専有する処理を実行する際、そのタスクが動作中のコアのカウンタの値が「0」でない場合、スピンロックを取得せずにカウンタの値をカウントアップして、上記処理を実行する。   As described above, according to the second embodiment, the spin lock initialization unit 220 creates a counter corresponding to each core and initializes the value every time a spin lock is created. When executing a process that occupies resources during task execution, if the value of the counter of the core in which the task is operating is not “0”, the task execution unit 230 obtains the value of the counter without acquiring a spin lock. Count up and execute the above process.

上記構成を採用することにより、本第2の実施形態によれば、カウンタの値が「0」でないとき、すなわち、タスクが動作しているコアで、すでにそのタスクにおいてスピンロックが取得されているときは、多重にスピンロックを取得することなく、処理を進める。これにより、タスク実行中の不要な排他制御によるデッドロックの発生を防ぐことができるという効果が得られる。   By adopting the above configuration, according to the second embodiment, when the counter value is not “0”, that is, in the core where the task is operating, the spin lock has already been acquired in the task. In some cases, the process proceeds without acquiring multiple spin locks. As a result, it is possible to prevent the occurrence of deadlock due to unnecessary exclusive control during task execution.

また、上記デッドロックを防ぐことができるので、ソフトウェアの変更等により関数のコールツリーが変更されたとしても、排他制御の有無の再確認や修正が不要となるという効果が得られる。   In addition, since the deadlock can be prevented, even if the call tree of the function is changed due to a software change or the like, there is an effect that it is unnecessary to reconfirm or correct the presence or absence of exclusive control.

なお、スピンロックのカウンタをコアごとに用意しているので、異なるコアでスピンロックによる排他制御が必要な処理を実行する場合は、コアごとにスピンロックの取得が行われる。   Since a spin lock counter is prepared for each core, when a process that requires exclusive control by spin lock is executed in a different core, the spin lock is acquired for each core.

上記各実施形態における情報処理装置の実現方法には様々な変形例がある。例えば、情報処理装置は、複数の装置の組み合わせにより実現することができる。   There are various modifications to the method for realizing the information processing apparatus in each of the above embodiments. For example, the information processing apparatus can be realized by a combination of a plurality of apparatuses.

また、情報処理装置におけるスピンロック初期化部220、スピンロック取得部231、処理部232およびスピンロック解放部233は、上述したように、例えば、プログラム制御に従って処理を実行するCPU501によって実現されてもよい。   Further, as described above, the spin lock initialization unit 220, the spin lock acquisition unit 231, the processing unit 232, and the spin lock release unit 233 in the information processing apparatus may be realized by the CPU 501 that executes processing according to program control, for example. Good.

また、これらの機能を実現するように動作させるプログラムを記録媒体506に記録させ、その記録媒体506に記録されたプログラムをコードとして読み出し、コンピュータにおいて実行する処理方法も各実施形態の範疇に含まれる。すなわち、コンピュータ読取可能な記録媒体506も各実施形態の範囲に含まれる。また、上述のプログラムが記録された記録媒体506はもちろん、そのプログラム自体も各実施形態に含まれる。   Also, the category of each embodiment includes a processing method in which a program for operating these functions is recorded in the recording medium 506, the program recorded in the recording medium 506 is read as a code, and executed in a computer. . That is, a computer-readable recording medium 506 is also included in the scope of each embodiment. In addition to the recording medium 506 on which the above-described program is recorded, the program itself is included in each embodiment.

以上、上述した実施形態を参照して本発明を説明した。しかしながら、本発明は、上述した実施形態には限定されない。即ち、本発明は、本発明のスコープ内において、種々の上記開示要素の多様な組み合わせ乃至選択など、当業者が理解し得る様々な態様を適用することができる。   The present invention has been described above with reference to the above-described embodiment. However, the present invention is not limited to the above-described embodiment. That is, the present invention can apply various modes that can be understood by those skilled in the art, such as various combinations and selections of the various disclosed elements, within the scope of the present invention.

100、200 情報処理装置
110 初期化部
120 実行部
220 スピンロック初期化部
230 タスク実行部
231 スピンロック取得部
232 処理部
233 スピンロック解放部
234 コア番号記憶部
240 カウンタ記憶部
500 コンピュータ装置
504 プログラム
505 記憶装置
506 記録媒体
507 ドライブ装置
508 通信インタフェース
509 ネットワーク
510 入出力インタフェース
511 バス
100, 200 Information processing device 110 Initialization unit 120 Execution unit 220 Spin lock initialization unit 230 Task execution unit 231 Spin lock acquisition unit 232 Processing unit 233 Spin lock release unit 234 Core number storage unit 240 Counter storage unit 500 Computer device 504 Program 505 Storage device 506 Recording medium 507 Drive device 508 Communication interface 509 Network 510 Input / output interface 511 Bus

Claims (9)

タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化する初期化手段と、
前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する実行手段と
を備えた情報処理装置。
For each lock information created to exclude resources to be accessed during the execution of a task, an initialization unit that creates a counter corresponding to each processor capable of executing the task and initializes the value of the counter;
In the execution of the process dedicated to the resource in the task, if the value of the counter of the processor assigned to the execution of the task is an initial value, the lock information is acquired and the value of the counter of the processor is counted Execution means for executing the processing by counting up the counter value of the processor without acquiring the lock information when the counter value of the processor is not an initial value. Information processing equipment.
前記実行手段は、前記タスクにおける前記資源を専有する処理の実行において、前記資源に対するアクセスが完了すると、前記タスクの実行を割り当てられている前記プロセッサのカウンタの値をカウントダウンし、該カウントダウンしたカウンタの値が初期値である場合、前記ロック情報を解放して、前記タスクの実行を継続する
請求項1記載の情報処理装置。
The execution means counts down the value of the counter of the processor to which the execution of the task is assigned when the access to the resource is completed in the execution of the process dedicated to the resource in the task. The information processing apparatus according to claim 1, wherein when the value is an initial value, the lock information is released and the execution of the task is continued.
前記実行手段は、前記カウントダウンしたカウンタの値が初期値でない場合、前記ロック情報を解放せずに、前記タスクの実行を継続する
請求項2記載の情報処理装置。
The information processing apparatus according to claim 2, wherein the execution unit continues the execution of the task without releasing the lock information when a value of the counted down counter is not an initial value.
タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化し、
前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する
情報処理方法。
For each lock information created to exclude resources accessed during task execution, create a counter corresponding to each processor capable of executing the task, initialize the value of the counter,
In the execution of the process dedicated to the resource in the task, if the value of the counter of the processor assigned to the execution of the task is an initial value, the lock information is acquired and the value of the counter of the processor is counted An information processing method for executing the processing by counting up the value of the counter of the processor without acquiring the lock information when the value of the counter of the processor is not an initial value.
前記タスクにおける前記資源を専有する処理の実行において、前記資源に対するアクセスが完了すると、前記タスクの実行を割り当てられている前記プロセッサのカウンタの値をカウントダウンし、該カウントダウンしたカウンタの値が初期値である場合、前記ロック情報を解放して、前記タスクの実行を継続する
請求項4記載の情報処理方法。
In the execution of the process dedicated to the resource in the task, when access to the resource is completed, the value of the counter of the processor assigned to execute the task is counted down, and the value of the counter that has been counted down is the initial value. The information processing method according to claim 4, wherein if there is, the lock information is released and the execution of the task is continued.
前記カウントダウンしたカウンタの値が初期値でない場合、前記ロック情報を解放せずに、前記タスクの実行を継続する
請求項5記載の情報処理方法。
The information processing method according to claim 5, wherein when the counted down counter value is not an initial value, the execution of the task is continued without releasing the lock information.
タスクの実行中にアクセスする資源を排他するために作成されるロック情報ごとに、前記タスクを実行可能なプロセッサにそれぞれ対応するカウンタを作成し、当該カウンタの値を初期化する処理と、
前記タスクにおける前記資源を専有する処理の実行において、当該タスクの実行を割り当てられている前記プロセッサのカウンタの値が初期値である場合、前記ロック情報を取得すると共に当該プロセッサのカウンタの値をカウントアップして前記処理を実行し、前記プロセッサのカウンタの値が初期値でない場合、前記ロック情報を取得せずに前記プロセッサのカウンタの値をカウントアップして前記処理を実行する処理とを、
コンピュータに実行させる情報処理プログラム。
For each lock information created to exclude resources to be accessed during the execution of a task, a process corresponding to each processor capable of executing the task is created, and a process for initializing the value of the counter;
In the execution of the process dedicated to the resource in the task, if the value of the counter of the processor assigned to the execution of the task is an initial value, the lock information is acquired and the value of the counter of the processor is counted And executing the process by counting up the value of the processor counter without obtaining the lock information when the counter value of the processor is not an initial value.
An information processing program to be executed by a computer.
前記タスクにおける前記資源を専有する処理の実行において、前記資源に対するアクセスが完了すると、前記タスクの実行を割り当てられている前記プロセッサのカウンタの値をカウントダウンし、該カウントダウンしたカウンタの値が初期値である場合、前記ロック情報を解放して、前記タスクの実行を継続する処理を、
コンピュータに実行させる請求項7記載の情報処理プログラム。
In the execution of the process dedicated to the resource in the task, when access to the resource is completed, the value of the counter of the processor assigned to execute the task is counted down, and the value of the counter that has been counted down is the initial value. If there is, processing to release the lock information and continue execution of the task,
The information processing program according to claim 7, which is executed by a computer.
前記タスクにおける前記資源を専有する処理の実行において、前記資源に対するアクセスが完了すると、前記タスクの実行を割り当てられている前記プロセッサのカウンタの値をカウントダウンし、前記カウントダウンしたカウンタの値が初期値でない場合、前記ロック情報を解放せずに、前記タスクの実行を継続する
コンピュータに実行させる請求項8記載の情報処理プログラム。
In the execution of the process dedicated to the resource in the task, when the access to the resource is completed, the value of the counter of the processor assigned to execute the task is counted down, and the value of the counter that has been counted down is not the initial value The information processing program according to claim 8, wherein the computer executes the task without releasing the lock information.
JP2017117703A 2017-06-15 2017-06-15 Information processing equipment, information processing methods and information processing programs Active JP6962717B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017117703A JP6962717B2 (en) 2017-06-15 2017-06-15 Information processing equipment, information processing methods and information processing programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017117703A JP6962717B2 (en) 2017-06-15 2017-06-15 Information processing equipment, information processing methods and information processing programs

Publications (2)

Publication Number Publication Date
JP2019003415A true JP2019003415A (en) 2019-01-10
JP6962717B2 JP6962717B2 (en) 2021-11-05

Family

ID=65006012

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017117703A Active JP6962717B2 (en) 2017-06-15 2017-06-15 Information processing equipment, information processing methods and information processing programs

Country Status (1)

Country Link
JP (1) JP6962717B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04127260A (en) * 1990-09-18 1992-04-28 Toshiba Corp Exclusive control circuit for multiprocessor system
JPH05210559A (en) * 1991-12-06 1993-08-20 Nec Corp Deadlock evading process system
JPH07200321A (en) * 1993-12-31 1995-08-04 Nec Corp Integrated exclusive control system
JP2010108179A (en) * 2008-10-29 2010-05-13 Kyocera Corp Electronic apparatus
WO2012046300A1 (en) * 2010-10-05 2012-04-12 富士通株式会社 Information processing device, information processing program, and information processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04127260A (en) * 1990-09-18 1992-04-28 Toshiba Corp Exclusive control circuit for multiprocessor system
JPH05210559A (en) * 1991-12-06 1993-08-20 Nec Corp Deadlock evading process system
JPH07200321A (en) * 1993-12-31 1995-08-04 Nec Corp Integrated exclusive control system
JP2010108179A (en) * 2008-10-29 2010-05-13 Kyocera Corp Electronic apparatus
WO2012046300A1 (en) * 2010-10-05 2012-04-12 富士通株式会社 Information processing device, information processing program, and information processing method

Also Published As

Publication number Publication date
JP6962717B2 (en) 2021-11-05

Similar Documents

Publication Publication Date Title
US10891158B2 (en) Task scheduling method and apparatus
CN109669772B (en) Parallel execution method and equipment of computational graph
CN106569891B (en) Method and device for scheduling and executing tasks in storage system
US9563474B2 (en) Methods for managing threads within an application and devices thereof
KR101618476B1 (en) Distributed resource management in a portable computing device
EP3230860B1 (en) Technologies for efficient synchronization barriers with work stealing support
CN110678847A (en) Continuous analysis task for GPU task scheduling
WO2015101091A1 (en) Distributed resource scheduling method and device
CN102567090B (en) The method and system of execution thread is created in computer processor
EP3113020A1 (en) Data processing device and method for processing serial tasks
US20200226227A1 (en) Mapping software constructs to synchronous digital circuits that do not deadlock
US6295602B1 (en) Event-driven serialization of access to shared resources
CN112182452A (en) Page component rendering processing method, device, equipment and computer readable medium
CN113485840A (en) Multi-task parallel processing device and method based on Go language
JP7122299B2 (en) Methods, apparatus, devices and storage media for performing processing tasks
CN112153114A (en) Method, system, equipment and medium for time-sharing access to shared device
CN112068960A (en) CPU resource allocation method, device, storage medium and equipment
JP6962717B2 (en) Information processing equipment, information processing methods and information processing programs
JP2017062540A (en) Uni-directional inter-operating-system communication system, and program
CN113806055A (en) Lightweight task scheduling method, system, device and storage medium
US11474868B1 (en) Sharded polling system
CN115904644A (en) Task scheduling method, electronic device and computer program product
KR20180082560A (en) Method and apparatus for time-based scheduling of tasks
JP6462521B2 (en) An API that prevents a normal part failure from propagating to a safety part and its processing part
EP3495960A1 (en) Program, apparatus, and method for communicating data between parallel processor cores

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200515

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210519

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210615

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210707

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210720

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210901

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210921

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211014

R150 Certificate of patent or registration of utility model

Ref document number: 6962717

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150