JP2015014966A - 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
JP2015014966A
JP2015014966A JP2013142105A JP2013142105A JP2015014966A JP 2015014966 A JP2015014966 A JP 2015014966A JP 2013142105 A JP2013142105 A JP 2013142105A JP 2013142105 A JP2013142105 A JP 2013142105A JP 2015014966 A JP2015014966 A JP 2015014966A
Authority
JP
Japan
Prior art keywords
exclusive control
notification signal
exception notification
suppression
exception
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2013142105A
Other languages
Japanese (ja)
Inventor
堀川 隆
Takashi Horikawa
隆 堀川
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 Corp
Original Assignee
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 Corp filed Critical NEC Corp
Priority to JP2013142105A priority Critical patent/JP2015014966A/en
Publication of JP2015014966A publication Critical patent/JP2015014966A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the possibility of exclusive control in a user program resulting in a delay of processing or incapability of processing when operations on a plurality of threads are executed simultaneously in parallel in a multi-processor system.SOLUTION: The present invention comprises: an exclusive control unit for setting an interrupt disable flag by detecting the start of exclusive control by a thread and clearing the interrupt disable flag by detecting the termination of exclusive control by the thread; and an exception notification signal control unit for starting, upon detection of the start of exclusive control, the suppression of an exception notification signal by an interrupt disable request in a user mode, and terminating, upon detection of the termination of exclusive control, the suppression of the exception notification signal, as well as generating, when the suppression of the exception notification signal continues beyond a prescribed time, an exception notification signal without waiting for detection of the termination of exclusive control.

Description

本発明は、ユーザモードでプロセッサが割込みを禁止する技術に関する。   The present invention relates to a technique in which a processor prohibits an interrupt in a user mode.

上記技術分野において、特許文献1には、ユーザモードにおいて割込みに対してマスクを行なった場合に、マスク可能割込み要因が発生してから所定時間長を超えると、マスク不可能割込みを発生させてスーパバイザモードに移行させ、ユーザプログラムのアボード処理を実行する技術が開示されている。また、非特許文献1および2には、マルチプロセッサシステムにおいて複数スレッドの操作が同時並行して実行しても正しく動作するプログラムを構築する技術として、ロックを使うことなく、ハードウェアとしてトランザクション機能を実装する方法が開示されている。   In the above technical field, Patent Document 1 discloses that when masking is performed for an interrupt in the user mode, a non-maskable interrupt is generated and a supervisor is generated if a predetermined time length is exceeded after a maskable interrupt factor is generated. A technique for shifting to a mode and executing an abort process of a user program is disclosed. In Non-Patent Documents 1 and 2, as a technique for constructing a program that operates correctly even when operations of a plurality of threads are simultaneously executed in a multiprocessor system, a transaction function is provided as hardware without using a lock. A method of implementation is disclosed.

特開平04−135246号公報Japanese Patent Laid-Open No. 04-135246

Intel Architecture Instruction Set Extensions Programming Reference, http://www.isus.jp/wp-content/plugins/wp-js-external-link-info/redirect.php?blog=iSUS&url=http://software.intel.com/en-us/avxIntel Architecture Instruction Set Extensions Programming Reference, http://www.isus.jp/wp-content/plugins/wp-js-external-link-info/redirect.php?blog=iSUS&url=http://software.intel. com / en-us / avx Haswell のトランザクション同期、 http://www.isus.jp/article/transactional-synchronization-in-haswellHaswell transaction synchronization, http://www.isus.jp/article/transactional-synchronization-in-haswell

ところが、上記非特許文献1および2に記載のマルチプロセッサシステムにおいて、複数スレッドの操作を同時並行すると不正な動作結果を生じる可能性のある部分を実行中に、ハードウェア割込みが発生して実行が一時中断され、さらには、割込み処理の延長としてプロセス切換えが行われてしまうと、プログラムの実行性能や正常動作に悪影響を及ぼす可能性がある。しかしながら、ユーザプログラムにおける排他制御によってプログラムの実行性能や正常動作への悪影響を回避しようにすると、上記特許文献1のようなマスク可能割込み要因の発生を監視する処理では、ユーザプログラムのミスや悪意のユーザプログラムにより処理の遅延を招くと共に、処理不能となる可能性も無くすことができなかった。   However, in the multiprocessor systems described in Non-Patent Documents 1 and 2, a hardware interrupt occurs during execution of a portion that may cause an illegal operation result when operations of a plurality of threads are performed in parallel. If the process is temporarily interrupted and the process is switched as an extension of the interrupt process, the program execution performance and normal operation may be adversely affected. However, if an attempt is made to avoid an adverse effect on the execution performance or normal operation of the program by exclusive control in the user program, in the process of monitoring the occurrence of the maskable interrupt factor as in the above-mentioned Patent Document 1, a user program error or malicious The user program causes a delay in processing, and the possibility of being incapable of processing cannot be eliminated.

本発明の目的は、上述の課題を解決する技術を提供することにある。   The objective of this invention is providing the technique which solves the above-mentioned subject.

上記目的を達成するため、本発明に係る情報処理装置は、
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御手段と、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御手段と、
を備える。
In order to achieve the above object, an information processing apparatus according to the present invention provides:
Exclusive control means for detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control means for generating the exception notification signal without waiting for detection of the end of the exclusive control;
Is provided.

上記目的を達成するため、本発明に係る情報処理方法は、
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
を含む。
In order to achieve the above object, an information processing method according to the present invention includes:
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
including.

上記目的を達成するため、本発明に係る情報処理プログラムは、
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
をコンピュータに実行させる。
In order to achieve the above object, an information processing program according to the present invention provides:
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
Is executed on the computer.

本発明によれば、ユーザプログラムにおけるスレッドの排他制御による処理の遅延や処理不能となる可能性を低減することできる。   According to the present invention, it is possible to reduce the possibility of processing delay or processing impossibility due to exclusive thread control in a user program.

本発明の第1実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on 1st Embodiment of this invention. 本発明の第2実施形態に係る情報処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the information processing apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る情報処理装置のシステム構成を示すブロック図である。It is a block diagram which shows the system configuration | structure of the information processing apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る例外抑制フラグ制御部の構成を示す図である。It is a figure which shows the structure of the exception suppression flag control part which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る例外通知信号用論理積部の真理表を示す図である。It is a figure which shows the truth table of the AND part for exception notification signals which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態において、排他制御を開始した後にタイマにあらかじめ設定されている時間が経過するよりも前に排他制御を終了した場合の、各信号の動作タイミングを示したタイミング図である。In the second embodiment of the present invention, it is a timing diagram showing the operation timing of each signal when exclusive control is terminated before the time preset in the timer elapses after exclusive control is started. . 本発明の第2実施形態において、排他制御を開始した後にタイマにあらかじめ設定されている時間が経過するよりも前に排他制御を終了しなかった場合の、各信号の動作タイミングを示したタイミング図である。In the second embodiment of the present invention, after starting exclusive control, a timing diagram showing the operation timing of each signal when exclusive control is not finished before the time preset in the timer elapses It is. 本発明の第2実施形態に係る情報処理装置における状態遷移を示す遷移図である。It is a transition diagram which shows the state transition in the information processing apparatus which concerns on 2nd Embodiment of this invention. 本発明の第3実施形態に係る情報処理装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions of the information processing apparatus which concerns on 3rd Embodiment of this invention. 本発明の第3実施形態に係る情報処理装置の排他制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the exclusive control process of the information processing apparatus which concerns on 3rd Embodiment of this invention. 本発明の第3実施形態に係る情報処理装置の例外通知処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the exception notification process of the information processing apparatus which concerns on 3rd Embodiment of this invention. 本発明の第4実施形態に係る情報処理装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the information processing apparatus which concerns on 4th Embodiment of this invention.

以下に、図面を参照して、本発明の実施の形態について例示的に詳しく説明する。ただし、以下の実施の形態に記載されている構成要素は単なる例示であり、本発明の技術範囲をそれらのみに限定する趣旨のものではない。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. However, the constituent elements described in the following embodiments are merely examples, and are not intended to limit the technical scope of the present invention only to them.

[第1実施形態]
本発明の第1実施形態としての情報処理装置100について、図1を用いて説明する。情報処理装置100は、スレッドが排他制御を行なう装置である。
[First Embodiment]
An information processing apparatus 100 as a first embodiment of the present invention will be described with reference to FIG. The information processing apparatus 100 is an apparatus in which a thread performs exclusive control.

図1に示すように、情報処理装置100は、排他制御部110と、例外通知信号制御部120と、を含む。排他制御部110は、スレッドによる排他制御の開始111を検出して割込み禁止フラグ113を設定し、スレッドによる排他制御の終了112を検出して割込み禁止フラグ113を解除する。例外通知信号制御部120は、排他制御の開始111の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号121の抑制を開始し、排他制御の終了112の検出に伴って、例外通知信号121の抑制を終了する。そして、例外通知信号制御部120は、例外通知信号121の抑制が所定時間122を超えて継続する場合には、排他制御の終了112の検出を待たずに例外通知信号121を生成する。   As illustrated in FIG. 1, the information processing apparatus 100 includes an exclusive control unit 110 and an exception notification signal control unit 120. The exclusive control unit 110 detects the start 111 of the exclusive control by the thread and sets the interrupt prohibition flag 113, detects the end 112 of the exclusive control by the thread, and cancels the interrupt prohibition flag 113. The exception notification signal control unit 120 starts suppression of the exception notification signal 121 due to the interrupt prohibition request in the user mode with the detection of the start 111 of the exclusive control, and the exception notification signal with the detection of the end 112 of the exclusive control. The suppression of 121 ends. Then, when the suppression of the exception notification signal 121 continues beyond the predetermined time 122, the exception notification signal control unit 120 generates the exception notification signal 121 without waiting for the detection of the end 112 of the exclusive control.

本実施形態によれば、マルチプロセッサシステムにおいて複数スレッドの操作を同時並行して実行する場合の、ユーザプログラムにおけるスレッドの排他制御による処理の遅延や処理不能となる可能性を低減することできる。   According to the present embodiment, it is possible to reduce the possibility of processing delay or processing impossibility due to exclusive control of threads in a user program when operations of a plurality of threads are executed in parallel in a multiprocessor system.

[第2実施形態]
次に、本発明の第2実施形態に係る情報処理装置について説明する。本実施形態に係情報処理装置においては、実行モードがユーザモードであっても、排他制御の開始から終了までの間、例外通知を抑制して割込み禁止とするが、排他制御の開始から所定時間が経過すると例外通知抑制を終了させて、例外通知信号を発生する。なお、以下の実施形態において、各信号を回路動作に整合する特定の状態(high(1)/low(0))を代表して示すが、信号の反転などの変更により種々の構成が可能であり、それらも本実施形態に含まれる。
[Second Embodiment]
Next, an information processing apparatus according to the second embodiment of the present invention will be described. In the information processing apparatus according to the present embodiment, even if the execution mode is the user mode, the exception notification is suppressed and the interrupt is prohibited from the start to the end of the exclusive control. When elapses, exception notification suppression is terminated and an exception notification signal is generated. In the following embodiments, a specific state (high (1) / low (0)) in which each signal is matched with the circuit operation is shown as a representative, but various configurations are possible by changing the signal inversion or the like. They are also included in this embodiment.

《背景技術》
以下、簡単に、本願発明の背景となる基礎技術について、簡単に説明する。
《Background Technology》
Hereinafter, the basic technology as the background of the present invention will be briefly described.

情報処理装置においてプログラムを実行するプロセッサが、周辺機器からの情報を、他の作業をしながらも取り落とすことなく受け取る技術に割込みがあり、その効果は、1)CPU資源の有効利用、2)応答性の向上。3)例外処理の効率化とされている。具体的には、プロセッサに割込み信号を入力する機能を持たる。そして、その割込み信号がアクティブに設定されると、命令実行部は実行している命令の処理完了時、その次の命令ではなく、割込み発生時に実行するようあらかじめ設定されているアドレスの命令に実行を移すように命令実行部で制御するようになっている。以降、あらかじめ設定されているアドレスから始まるプログラムを割込みハンドラと呼び、割込み信号がアクティブに設定されることにより、割込みハンドラに実行を移すことを「プロセッサが割込みを受付ける」と表現する。   There is an interruption in the technology in which a processor that executes a program in an information processing device receives information from a peripheral device without removing it while performing other work. The effects are 1) effective use of CPU resources, 2) Improved responsiveness. 3) It is considered to be efficient exception handling. Specifically, it has a function of inputting an interrupt signal to the processor. When the interrupt signal is set to active, the instruction execution unit executes the instruction at the address set in advance to be executed when the interrupt occurs instead of the next instruction when processing of the instruction being executed is completed. Is controlled by the instruction execution unit so that Hereinafter, a program starting from a preset address is referred to as an interrupt handler, and when an interrupt signal is set to be active, execution is transferred to the interrupt handler as “a processor accepts an interrupt”.

一般に、割込みハンドラの実行が完了すると、プロセッサは、割込み発生時に実行していた命令の次の命令からプログラム実行を再開することが多い。しかし、オペレーティング・システムの介入により、割込み発生時に実行していたプロセスとは別のプロセスへの切り換えが行われることもある。この場合、割込み発生時に実行していたプロセスは、オペレーティング・システムによる再度のプロセス切り換えを経て実行が再開されることになる。   In general, when execution of an interrupt handler is completed, the processor often resumes program execution from the instruction next to the instruction that was being executed when the interrupt occurred. However, due to the intervention of the operating system, switching to a process different from the process executed at the time of occurrence of the interrupt may be performed. In this case, the process executed at the time of occurrence of the interrupt is resumed after the process is switched again by the operating system.

割込みに関する技術として、割込みを受け付けると問題が生じる恐れのある場合には割込みを受付けないようにする制御も普遍的に行われている。本明細書において、割込みを受け付けない状態にプロセッサを遷移させることを割込み禁止と呼び、再び割込みを受け付ける状態に戻すことを割込み許可と呼ぶ。一般に、割込み禁止や割込み許可操作は、プロセッサが備える命令により行われる。   As a technique related to an interrupt, a control for not accepting an interrupt when there is a possibility that a problem may occur when the interrupt is accepted is universally performed. In this specification, transitioning a processor to a state where no interrupt is accepted is referred to as interrupt prohibition, and returning to an interrupt acceptance state again is referred to as interrupt permission. Generally, interrupt prohibition and interrupt permission operations are performed by instructions provided in a processor.

また、割込み以外の背景技術として、プロセッサに、ユーザモードとカーネルモードという2種類の動作モードを用意する技術がある。ユーザモードはアプリケーション・プログラム(ユーザプログラムとも称す)を実行するためのモードであり、カーネルモードはシステムの制御を行うオペレーティング・システムを実行するためのモードである。これは、仮にアプリケーション・プログラムが不正な操作を行ったとしても、影響が及ぶのはそのアプリケーションのみに限定し、システムとしてはオペレーティング・システムの制御の下で正常な動作を継続できるようにするための技術である。割込み禁止命令は、システムの制御に関する操作を行う命令であるため、ユーザモードで割込み禁止命令を実行使用とした場合には例外を発生させてオペレーティング・システムを介入させ、アプリケーション・プログラムを異常終了させるようになっている。   As background technology other than interrupts, there is a technology for preparing two types of operation modes, a user mode and a kernel mode, in a processor. The user mode is a mode for executing an application program (also referred to as a user program), and the kernel mode is a mode for executing an operating system that controls the system. This is to ensure that even if an application program performs an illegal operation, only the application is affected, and the system can continue normal operation under the control of the operating system. Technology. Since the interrupt disable instruction is an instruction that performs operations related to system control, if the interrupt disable instruction is used for execution in user mode, an exception is generated and the operating system is intervened to terminate the application program abnormally. It is like that.

一方、マルチプロセッサシステムにおいて複数スレッドの操作が同時並行して実行しても正しく動作するプログラムを構築する技術がある。最も単純な方法としては、ロックといった排他制御機構を用いて同時に実行できるスレッドを1つに限定する方法がある。また、ロックを使うことなく、ハードウェアとしてトランザクション機能を実装する方法(非特許文献1、2参照)もある。いずれにしても、複数スレッドの操作が同時並行すると不正な動作結果を生じる可能性のある部分を実行中にハードウェア割込みが発生して実行が一時中断される。さらには、割込み処理の延長としてプロセス切換えが行われてしまうと、プログラムの実行性能や正常動作に悪影響を及ぼす恐れが生じる可能性がある。ところが、排他制御におけるこのようなプログラムの実行性能や正常動作への悪影響を防ぎ、かつ、ユーザプログラムにおける排他制御による処理の遅延や処理不能となる可能性を無くす工夫はされていない。   On the other hand, there is a technique for constructing a program that operates correctly even when operations of a plurality of threads are simultaneously executed in a multiprocessor system. The simplest method is to limit the number of threads that can be executed simultaneously using an exclusive control mechanism such as a lock to one. There is also a method of implementing a transaction function as hardware without using a lock (see Non-Patent Documents 1 and 2). In any case, when an operation of a plurality of threads is performed in parallel, a hardware interrupt occurs during execution of a portion that may cause an illegal operation result, and execution is temporarily suspended. Furthermore, if process switching is performed as an extension of interrupt processing, there is a possibility that the execution performance and normal operation of the program may be adversely affected. However, no attempt has been made to prevent such an adverse effect on the execution performance and normal operation of the program in exclusive control, and to eliminate the possibility of processing delay or inability to process due to exclusive control in the user program.

本実施形態において開示される技術は、ユーザモードで実行されるアプリケーション・プログラム内であっても、割込みが発生してプログラム実行が中断するとプログラムの実行性能や正常動作に悪影響を及ぼす可能性のある排他制御区間を、割込み禁止状態で実行する。さらに、ユーザプログラムにおける排他制御によって引き起こされる処理の遅延や処理不能となる可能性を無くす。   The technology disclosed in the present embodiment may adversely affect the execution performance and normal operation of a program when an interrupt occurs and the program execution is interrupted even in an application program executed in the user mode. The exclusive control section is executed in the interrupt disabled state. Further, it eliminates the possibility of processing delay and processing inability caused by exclusive control in the user program.

《情報処理装置の機能構成》
図2Aは、本実施形態に係る情報処理装置の機能構成を示すブロック図である。
<< Functional configuration of information processing device >>
FIG. 2A is a block diagram illustrating a functional configuration of the information processing apparatus according to the present embodiment.

図2を参照すると、本実施形態の情報処理装置は、プログラムを実行するプロセッサ200とメモリ260とから構成されている。なお、この図ではプロセッサ200の数は1個であるが、情報システム内で使用されるプロセッサ200の個数は制約する要因ではないので、本実施形態を適用する情報システム内に本実施形態を適用した複数のプロセッサが存在していてもよい。したがって、本実施形態に係る情報処理装置は、1つのプロセッサの構成であっても、複数のプロセッサの構成であっても、メモリを含む構成であってもよい。   Referring to FIG. 2, the information processing apparatus according to the present embodiment includes a processor 200 that executes a program and a memory 260. In this figure, the number of processors 200 is one. However, since the number of processors 200 used in the information system is not a limiting factor, the present embodiment is applied to the information system to which the present embodiment is applied. A plurality of processors may exist. Therefore, the information processing apparatus according to the present embodiment may have a configuration of one processor, a configuration of a plurality of processors, or a configuration including a memory.

プロセッサ200は、命令実行部210、例外抑制フラグ制御部230、割込み禁止フラグ記憶部220、例外通知信号用論理積部240、および、割込み禁止用論理積部250から構成されている。命令実行部210は、実行モードフラグ記憶部211、排他制御区間実行開始検出部212、および、排他制御区間実行終了検出部213を含む。命令実行部210には、例外通知信号240aおよび割込み信号250aが入力されて、例外処理または割込み処理を行なう。例外処理または割込み処理は既存の処理であり、図2Aには、例外処理または割込み処理の記憶構成部は図示していない。   The processor 200 includes an instruction execution unit 210, an exception suppression flag control unit 230, an interrupt prohibition flag storage unit 220, an exception notification signal logical product unit 240, and an interrupt prohibition logical product unit 250. The instruction execution unit 210 includes an execution mode flag storage unit 211, an exclusive control section execution start detection unit 212, and an exclusive control section execution end detection unit 213. The instruction execution unit 210 receives the exception notification signal 240a and the interrupt signal 250a, and performs exception processing or interrupt processing. The exception process or interrupt process is an existing process, and FIG. 2A does not show the storage unit of the exception process or interrupt process.

実行モードフラグ記憶部211は、プロセッサ200をカーネルモードで動作させるか、ユーザモードで動作させるかをセットする実行モードフラグ211aを記憶する。本例では、ユーザモードの場合に実行モードフラグ211aが“high(1)”にセットされ、カーネルモードの場合に実行モードフラグ211aが“low(0)”にセットされる。   The execution mode flag storage unit 211 stores an execution mode flag 211a for setting whether to operate the processor 200 in the kernel mode or the user mode. In this example, the execution mode flag 211a is set to “high (1)” in the user mode, and the execution mode flag 211 a is set to “low (0)” in the kernel mode.

排他制御区間実行開始検出部212は、命令実行部210があらかじめ指定された排他制御区間のプログラム実行を開始したことを検出して、排他制御開始信号212aを出力する。また、排他制御区間実行終了検出部213は、命令実行部210があらかじめ指定された排他制御区間のプログラム実行を終了したことを検出して、排他制御終了信号213aを出力する。排他制御区間の指定は、機械語命令のプリフィックスによって指定する方法(非特許文献1、2参照)などの既存の技術によるものとする。   The exclusive control section execution start detection unit 212 detects that the instruction execution unit 210 has started program execution in the exclusive control section designated in advance, and outputs an exclusive control start signal 212a. Further, the exclusive control section execution end detection unit 213 detects that the instruction execution unit 210 has ended the program execution of the exclusive control section designated in advance, and outputs an exclusive control end signal 213a. The exclusive control section is specified by an existing technique such as a method of specifying by a machine language instruction prefix (see Non-Patent Documents 1 and 2).

割込み禁止フラグ記憶部220は、本例では、排他制御開始信号212aによって割込み禁止フラグ220aを“high(1)”にセットして、割込み禁止用論理積部250において割込み(図中、EXE−INTまたはINT−INT)を禁止する。しかしながら、NMI(Non-Maskable Interrupt)は、割込み禁止用論理積部250において禁止されることはない。また、割込み禁止フラグ記憶部220は、排他制御終了信号213aによって割込み禁止フラグを“low(0)”にリセットして、割込み禁止用論理積部250において割込みを許可する。このように、割込み禁止フラグが“high(1)”にセットされている排他制御区間は、プログラムの実行性能や正常動作へ悪影響を及ぼす割込みが禁止される。なお、割込み禁止フラグ記憶部220をRS(セットリセット)型のフリップフロップで構成する場合は、排他制御区間のプログラム実行を開始したことを検出して排他制御開始信号212aが“high(1)”となってフリップフロップがセットされる。そして、排他制御区間のプログラム実行を終了したことを検出して排他制御終了信号213aが“high(1)”となってフリップフロップがリセットされる。   In this example, the interrupt prohibition flag storage unit 220 sets the interrupt prohibition flag 220a to “high (1)” by the exclusive control start signal 212a, and the interrupt prohibition logical product unit 250 generates an interrupt (EXE-INT in the figure). Or INT-INT) is prohibited. However, NMI (Non-Maskable Interrupt) is not prohibited in the interrupt inhibiting logical product unit 250. Further, the interrupt prohibition flag storage unit 220 resets the interrupt prohibition flag to “low (0)” by the exclusive control end signal 213a, and permits the interrupt in the interrupt prohibition logical product unit 250. Thus, in the exclusive control section in which the interrupt prohibition flag is set to “high (1)”, interrupts that adversely affect the execution performance and normal operation of the program are prohibited. When the interrupt prohibition flag storage unit 220 is configured by an RS (set reset) type flip-flop, it is detected that the program execution in the exclusive control section is started, and the exclusive control start signal 212a is “high (1)”. The flip-flop is set. Then, when it is detected that the program execution in the exclusive control section has ended, the exclusive control end signal 213a becomes “high (1)” and the flip-flop is reset.

また、例外抑制フラグ制御部230は、排他制御開始信号212aによって例外抑制フラグ230aを“high(1)”とすると共に、タイマを起動する。かかる例外抑制フラグ230aによって、例外通知信号用論理積部240からの例外通知信号240aの出力が抑制される。例外抑制フラグ230aおよび例外抑制フラグ制御部230のタイマは、排他制御終了信号213aによって停止される。しかしながら、所定時間が経過してもタイマが排他制御終了信号213aによって停止されない場合、タイムアウトによって例外抑制フラグ230aが“low(0)”となる。この時には、例外通知信号用論理積部240の3入力である、実行モードフラグ211aが“high(1)”、割込み禁止フラグ220aが“high(1)”、かつ、例外抑制フラグ230aが“low(0)”となる。その結果、例外通知信号用論理積部240から例外通知信号240aが出力される。   Further, the exception suppression flag control unit 230 sets the exception suppression flag 230a to “high (1)” by the exclusive control start signal 212a and starts a timer. With the exception suppression flag 230a, the output of the exception notification signal 240a from the exception notification signal AND unit 240 is suppressed. The timers of the exception suppression flag 230a and the exception suppression flag control unit 230 are stopped by the exclusive control end signal 213a. However, if the timer is not stopped by the exclusive control end signal 213a even after the predetermined time has elapsed, the exception suppression flag 230a becomes “low (0)” due to timeout. At this time, the execution mode flag 211a, which is the three inputs of the exception notification signal logical product unit 240, is “high (1)”, the interrupt prohibition flag 220a is “high (1)”, and the exception suppression flag 230a is “low”. (0) ". As a result, the exception notification signal 240a is output from the exception notification signal AND unit 240.

これにより、ユーザモードで実行されるプログラム内の排他制御区間の間を割込み禁止状態にして実行することができる。また、この割込み禁止状態が、タイマにあらかじめ設定されている時間が経過しても排他制御区間終了により解除されない場合は、例外通知を発生させてカーネルモードに移行して、ユーザモードのアプリケーション・プログラムを異常終了させることができる。これにより、マルチプロセッサの複数スレッド並列処理におけるユーザモードでのスレッドによる排他制御区間開始時に、無条件で割込みを禁止すると発生する弊害を回避することができる。   As a result, it is possible to execute with the interrupt disabled state between the exclusive control sections in the program executed in the user mode. Also, if this interrupt disabled state is not canceled due to the end of the exclusive control section even after the time preset in the timer has elapsed, an exception notification is generated and the kernel mode is entered, and the user mode application program Can be terminated abnormally. As a result, it is possible to avoid the adverse effects that occur when interrupts are unconditionally prohibited at the start of an exclusive control section by threads in the user mode in multi-thread parallel processing of a multiprocessor.

《情報処理装置のシステム構成》
図2Bは、本実施形態に係る情報処理装置のシステム構成を示すブロック図である。
<< System configuration of information processing apparatus >>
FIG. 2B is a block diagram illustrating a system configuration of the information processing apparatus according to the present embodiment.

図2Bには、図2Aに図示したプロセッサ200と同様の構成を有する複数のプロセッサ200A、200Bおよび200Cが、メモリ260に接続されて、マルチプロセッサシステムを構成した例である。なお、マルチプロセッサシステムは、図2Bに限定されない。メモリが複数のメモリモジュールから構成されていても、プロセッサとメモリモジュールとの接続関係を多様に変更してもよい。   2B is an example in which a plurality of processors 200A, 200B, and 200C having the same configuration as the processor 200 illustrated in FIG. 2A are connected to the memory 260 to configure a multiprocessor system. The multiprocessor system is not limited to FIG. 2B. Even if the memory is composed of a plurality of memory modules, the connection relationship between the processor and the memory modules may be variously changed.

(例外抑制フラグ制御部)
図3は、本実施形態に係る例外抑制フラグ制御部230の構成を示す図である。
(Exception suppression flag controller)
FIG. 3 is a diagram illustrating a configuration of the exception suppression flag control unit 230 according to the present embodiment.

図3を参照すると、例外抑制フラグ制御部230は、スタート信号とクロック信号とリセット信号を入力し、設定時間経過信号として例外抑制フラグ230aを出力するタイマ330を含む。ここで、スタート信号には、排他制御区間実行開始検出部212の出力である排他制御開始信号212a、リセット信号には、排他制御区間実行終了検出部213の出力である排他制御終了信号213a、クロック信号には、プロセッサを駆動するクロック信号が接続される。   Referring to FIG. 3, the exception suppression flag control unit 230 includes a timer 330 that receives a start signal, a clock signal, and a reset signal and outputs an exception suppression flag 230a as a set time lapse signal. Here, an exclusive control start signal 212a that is the output of the exclusive control section execution start detection unit 212 is used as the start signal, and an exclusive control end signal 213a that is the output of the exclusive control section execution end detection unit 213 is used as the reset signal. A clock signal for driving the processor is connected to the signal.

また、例外抑制フラグ制御部230の出力である例外抑制フラグ230aは、反転されて、例外通知信号用論理積部240の3入力の1つの接続される。なお、タイマ330の出力である例外抑制フラグ230aは、タイマ330がタイムアウトしない場合、有効(high)のまま保たれるようになっている。なお、図3には、タイマが計測する時間の長さを設定する構成は記載されていないが、固定値を設定する場合や、命令実行部210による命令実行によって設定する場合のどちらであっても、既存技術で実現可能である。本実施形態では、簡単のため、固定値が設定されているものとする。   Further, the exception suppression flag 230a, which is the output of the exception suppression flag control unit 230, is inverted and connected to one of the three inputs of the exception notification signal logical product unit 240. The exception suppression flag 230a, which is the output of the timer 330, is kept valid (high) when the timer 330 does not time out. Note that FIG. 3 does not describe a configuration for setting the length of time measured by the timer, but either a case where a fixed value is set or a case where the instruction is executed by the instruction execution unit 210 is set. Is also possible with existing technology. In the present embodiment, for simplicity, it is assumed that a fixed value is set.

(論理積部の真理表)
図4は、本実施形態に係る例外通知信号用論理積部240の真理表を示す図である。かかる真理表に従って、入力信号に応じた出力信号である例外通知信号が決定する。なお、図4の“x”は、ON/OFF関係なしに、例外通知信号が決まる場合を表現している。
(Truth truth table)
FIG. 4 is a diagram illustrating a truth table of the exception notification signal logical product unit 240 according to the present embodiment. According to the truth table, an exception notification signal which is an output signal corresponding to the input signal is determined. Note that “x” in FIG. 4 represents a case where an exception notification signal is determined without an ON / OFF relationship.

例外通知信号用論理積部240の真理表は、実行モードフラグ211aと、割込み禁止フラグ220aと、例外抑制フラグ230aとのON/OFFの組み合わせに対応して、例外通知信号240aが決定されている。   In the truth table of the exception notification signal logical product unit 240, the exception notification signal 240a is determined in accordance with the ON / OFF combination of the execution mode flag 211a, the interrupt prohibition flag 220a, and the exception suppression flag 230a. .

《情報処理装置の動作タイミング》
以下、本実施形態におけるユーザモードにおけるスレッドの排他制御区間における、プロセッサ200の動作について具体例を用いて詳細に説明する。
<< Operation timing of information processing equipment >>
Hereinafter, the operation of the processor 200 in the thread exclusive control section in the user mode in the present embodiment will be described in detail using a specific example.

図5Aと図5Bとは、本実施形態における関連要素における各信号の動作タイミングを示したタイミング図である。なお、これらのタイミング図は、プロセッサの動作モードが常にユーザモードとなっている状況を前提としている。また、各信号は、上側のレベルが有効を示す値(high(1))、下側のレベルが無効を示す値(low(0))として図示している。   FIG. 5A and FIG. 5B are timing diagrams showing the operation timing of each signal in the related elements in the present embodiment. These timing diagrams are based on the assumption that the operation mode of the processor is always the user mode. Each signal is illustrated as a value (high (1)) indicating that the upper level is valid and a value (low (0)) indicating that the lower level is invalid.

(タイムアウトしない場合)
図5Aは、本実施形態において、排他制御を開始した後、タイマ330にあらかじめ設定されている時間が経過するよりも前に,排他制御を終了した場合の、各信号の動作タイミングを示したタイミング図である。
(If not timed out)
FIG. 5A is a timing chart showing the operation timing of each signal when the exclusive control is ended before the time preset in the timer 330 elapses after the exclusive control is started in this embodiment. FIG.

図5Aにおいて、命令実行部210の排他制御区間実行開始検出部212がスレッドによる排他制御開始の実行を検出すると、排他制御開始信号212aが“high(1)”となる。この排他制御開始信号212aにより、割込み禁止フラグ記憶部220の割込み禁止フラグ220aが有効を示す値(high)に変化する。この時、例外抑制フラグ制御部230の出力である例外抑制フラグ230aが“high(1)”であり、排他制御開始信号212aによってタイマ330による時間計測を開始する。このように、ユーザモードにおいて、排他制御開始により割込みは禁止されるが、例外通知信号240aの出力は例外抑制フラグ230aによって抑制される。   In FIG. 5A, when the exclusive control section execution start detection unit 212 of the instruction execution unit 210 detects the execution of exclusive control start by a thread, the exclusive control start signal 212a becomes “high (1)”. In response to the exclusive control start signal 212a, the interrupt prohibition flag 220a of the interrupt prohibition flag storage unit 220 changes to a value (high) indicating validity. At this time, the exception suppression flag 230a, which is the output of the exception suppression flag control unit 230, is “high (1)”, and the time measurement by the timer 330 is started by the exclusive control start signal 212a. As described above, in the user mode, the interruption is prohibited by starting the exclusive control, but the output of the exception notification signal 240a is suppressed by the exception suppression flag 230a.

図5Aのケースでは、タイマ330にあらかじめ設定されている時間が経過するよりも前に、排他制御区間実行終了検出部213がスレッドによる排他制御の終了を検出して、排他制御終了信号213aが“high(1)”となる。この排他制御終了信号213aにより、割込み禁止フラグ記憶部220の割込み禁止フラグ220aが無効を示す値(low)に変化する。また、排他制御終了信号213aによって、例外抑制フラグ制御部230のタイマ330による時間計測を停止する。タイマ330の出力である例外抑制フラグ230aは、排他制御終了信号213aによってタイマ330が時間計測を停止した場合は、有効(high)のまま保たれるようになっているので、例外通知信号240aは無効(low)のままとなる。このため、命令実行部210は例外処理を実行しない。   In the case of FIG. 5A, before the time set in advance in the timer 330 elapses, the exclusive control section execution end detection unit 213 detects the end of the exclusive control by the thread, and the exclusive control end signal 213a is “ high (1) ". In response to the exclusive control end signal 213a, the interrupt prohibition flag 220a of the interrupt prohibition flag storage unit 220 changes to a value (low) indicating invalidity. Further, the time measurement by the timer 330 of the exception suppression flag control unit 230 is stopped by the exclusive control end signal 213a. The exception suppression flag 230a, which is the output of the timer 330, is kept valid (high) when the timer 330 stops measuring time by the exclusive control end signal 213a. It remains inactive (low). For this reason, the instruction execution unit 210 does not execute exception processing.

(タイムアウトした場合)
図5Bは、本実施形態において、排他制御を開始した後、タイマ330にあらかじめ設定されている時間が経過するよりも前に排他制御を終了しなかった場合の、各信号の動作タイミングを示したタイミング図である。
(If timed out)
FIG. 5B shows the operation timing of each signal when the exclusive control is not terminated before the time preset in the timer 330 elapses after the exclusive control is started in the present embodiment. It is a timing diagram.

図5Aと同様、命令実行部210が排他制御区間実行開始検出部212がスレッドによる排他制御開始の実行を検出すると、排他制御開始信号212aが有効を示す値(high)となる。排他制御開始信号212aによって、割込み禁止フラグ記憶部220の出力である割込み禁止フラグ220aが有効を示す値(high)に変化するとともに、例外抑制フラグ制御部230のタイマ330による時間計測を開始する。   As in FIG. 5A, when the instruction execution unit 210 detects that the exclusive control section execution start detection unit 212 has executed exclusive control start by a thread, the exclusive control start signal 212a becomes a value (high) indicating validity. In response to the exclusive control start signal 212a, the interrupt prohibition flag 220a, which is an output of the interrupt prohibition flag storage unit 220, changes to a value indicating high (high), and the timer 330 of the exception suppression flag control unit 230 starts time measurement.

図5Bのケースでは、タイマ330にあらかじめ設定されている時間が経過するよりも前に、排他制御区間実行終了検出部213がスレッドによる排他制御の終了を検出しない。したがって、排他制御終了信号213aが出力されないので、割込み禁止フラグ記憶部220の割込み禁止フラグ220aは有効を示す値(high)を保つ。しかしながら、排他制御終了信号213aが出力されないまま設定時間経過に伴ってタイマ330がタイムアウトして、例外抑制フラグが無効(low)を示す値となる。その結果、例外通知信号用論理積部240の出力である例外通知信号240aが有効(high)に変化する。このため、命令実行部210は、例外処理を実行することになる。   In the case of FIG. 5B, the exclusive control section execution end detection unit 213 does not detect the end of exclusive control by the thread before the time preset in the timer 330 elapses. Therefore, since the exclusive control end signal 213a is not output, the interrupt prohibition flag 220a of the interrupt prohibition flag storage unit 220 maintains a value (high) indicating validity. However, as the set time elapses without the exclusive control end signal 213a being output, the timer 330 times out and the exception suppression flag becomes a value indicating invalid (low). As a result, the exception notification signal 240a, which is the output of the exception notification signal logical product unit 240, changes to valid (high). Therefore, the instruction execution unit 210 executes exception processing.

以上に説明した操作により、プロセッサの動作モードがユーザモードとなっているときにスレッドが並列処理時に排他制御の開始を行っても、タイマにあらかじめ設定されている時間が経過するよりも前に排他制御の終了を行えば、例外を起こすことなくプログラム実行を継続できる。このように、ユーザモードで実行されるプログラム内に、排他制御区間を設置することができる。また、排他制御を開始してから、タイマにあらかじめ設定されている時間が経過するよりも前に排他制御の終了を行わない場合は、例外通知信号を発生させてユーザプログラムを異常終了させることができる。これにより、ユーザモードでのプログラム実行時にスレッドが並列処理時に排他制御を開始した場合に、無条件で割込みを禁止すると発生する弊害を回避することができる。   As a result of the operations described above, even if the thread starts exclusive control during parallel processing when the processor operation mode is user mode, the exclusive time is exceeded before the time set in advance in the timer elapses. If control is terminated, program execution can be continued without causing an exception. Thus, an exclusive control section can be set in a program executed in the user mode. If the exclusive control is not terminated before the time preset in the timer elapses after the exclusive control is started, an exception notification signal may be generated to abnormally terminate the user program. it can. As a result, when a thread starts exclusive control during parallel processing during program execution in the user mode, it is possible to avoid the adverse effects that occur when interrupts are unconditionally prohibited.

《情報処理装置における状態遷移》
図6は、本実施形態に係る情報処理装置における状態遷移を示す遷移図である。
<< State transition in information processing equipment >>
FIG. 6 is a transition diagram showing state transition in the information processing apparatus according to the present embodiment.

カーネルモード610は、システムの制御を行うオペレーティング・システムを実行するためのモードである。ユーザモード620は、アプリケーション・プログラムを実行するためのモードである。通常、ユーザのアプリケーション・プログラムの実行を開始する場合に、カーネルモード610からユーザモード620に遷移する。一方、アプリケーション・プログラムの実行が終了すると、ユーザモード620からカーネルモード610に遷移する。なお、実際には、アプリケーション・プログラムの実行中にも、IO処理などを含む処理はカーネルモード610で実行される。カーネルモード610においては、既存の割込み禁止命令と許可命令との間、割込み禁止状態611となる。   The kernel mode 610 is a mode for executing an operating system that controls the system. The user mode 620 is a mode for executing an application program. Normally, when the execution of a user application program is started, a transition is made from the kernel mode 610 to the user mode 620. On the other hand, when the execution of the application program is finished, the mode transitions from the user mode 620 to the kernel mode 610. Actually, processing including IO processing is executed in the kernel mode 610 even during execution of the application program. In the kernel mode 610, an interrupt prohibited state 611 is set between the existing interrupt prohibited instruction and the permitted instruction.

本実施形態におけるマリチプロセッサにおける並列処理でスレッドによる排他制御が開始されると、ユーザモード620において、排他制御中の割込みを禁止する割込み禁止フラグがセットされて、割込み禁止状態621になる。所定時間内にスレッドによる排他制御が終了すると、割込み禁止状態621から戻る。しかしながら、所定時間を過ぎても排他制御が終了しないと、タイマがタイムアウトして割込み禁止状態621から例外通知信号生成状態622に遷移する。さらに、例外通知信号の生成を受けて、例外通知信号生成状態622からカーネルモード610に遷移する。   When exclusive control by a thread is started in parallel processing in the multiprocessor in this embodiment, an interrupt prohibition flag for prohibiting an interrupt during exclusive control is set in the user mode 620, and an interrupt prohibition state 621 is entered. When the exclusive control by the thread is completed within a predetermined time, the process returns from the interrupt prohibited state 621. However, if the exclusive control is not completed even after the predetermined time has elapsed, the timer times out and the interrupt disabled state 621 transitions to the exception notification signal generation state 622. Further, in response to the generation of the exception notification signal, the state transitions from the exception notification signal generation state 622 to the kernel mode 610.

カーネルモード610では、例外通知信号を受けて例外通知処理状態612に遷移し、排他制御によるタイムアウトを起こしたアプリケーション・プログラムを強制終了させて、ユーザモード時の必要なデータなどを初期化する。そして、例外処理を終了してカーネルモード610に戻り、次の処理に移行する。   In the kernel mode 610, an exception notification signal is received and a transition is made to the exception notification processing state 612. The application program that has timed out due to exclusive control is forcibly terminated, and necessary data in the user mode is initialized. Then, the exception process is terminated, the process returns to the kernel mode 610, and the process proceeds to the next process.

以上のように、本実施形態においては、例外抑制フラグを設け、ユーザモードでは排他制御が開始しても、例外抑制フラグが有効を示している間は例外処理を通知する例外通知信号を抑制する。この例外抑制フラグは、排他制御の開始が検出されてからあらかじめ定められた期間が経過しても排他制御の終了が検出されない場合に無効とすることで、排他制御が終了しないことによる問題を解消した。その結果、ユーザモードでプログラムを実行中であっても、所定期間よりも短い期間であれば例外を発生することなく、排他制御区間を設定できる。   As described above, in the present embodiment, an exception suppression flag is provided, and even if exclusive control starts in the user mode, an exception notification signal for notifying exception processing is suppressed while the exception suppression flag is valid. . This exception suppression flag is disabled when the end of exclusive control is not detected even after a predetermined period of time has elapsed since the start of exclusive control was detected, eliminating the problem of exclusive control not ending did. As a result, even when the program is being executed in the user mode, the exclusive control section can be set without causing an exception if the period is shorter than the predetermined period.

本実施形態によれば、ユーザモードでのプログラム実行時に、スレッドによる排他制御で無条件で割込みを禁止すると発生する弊害を起こすことなく、ユーザモードで実行されるプログラム内に排他制御区間を設置できる。これにより、ユーザモードで実行されるアプリケーション・プログラム内であっても、割込みが発生してプログラム実行が中断するとプログラムの実行性能や正常動作に悪影響を及ぼす可能性のある、マルチプロセッサにおけるスレッドの排他制御を割込み禁止状態で実行できる。その結果、割込みによる悪影響を防止できる。   According to the present embodiment, when a program is executed in the user mode, an exclusive control section can be set in the program executed in the user mode without causing an adverse effect that occurs when the interrupt is prohibited unconditionally by the exclusive control by the thread. . As a result, even within an application program that is executed in user mode, if an interrupt occurs and the program execution is interrupted, there is a possibility that the execution performance and normal operation of the program may be adversely affected. Control can be executed with interrupts disabled. As a result, adverse effects due to interrupts can be prevented.

[第3実施形態]
次に、本発明の第3実施形態に係る情報処理装置について説明する。本実施形態に係る情報処理装置は、上記第2実施形態と比べると、情報処理装置の排他制御に係る部分を、ハードウェア構成ではなくマイクロプログラムを含むファームウェアで実現する点で異なる。その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Third Embodiment]
Next, an information processing apparatus according to the third embodiment of the present invention will be described. The information processing apparatus according to the present embodiment is different from the second embodiment in that the portion related to exclusive control of the information processing apparatus is realized by firmware including a microprogram instead of a hardware configuration. Since other configurations and operations are the same as those of the second embodiment, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof is omitted.

《情報処理装置のハードウェア構成》
図7は、本実施形態に係る情報処理装置のハードウェア構成を示すブロック図である。なお、図7においては、MPU710、レジスタ740およびストレージ750を、簡略化のため別の構成として図示したが、実際には、これらが一体となったファームウェアとして実現され、通常のアプリケーション・プログラムとは異なる。
<< Hardware configuration of information processing equipment >>
FIG. 7 is a block diagram illustrating a hardware configuration of the information processing apparatus according to the present embodiment. In FIG. 7, the MPU 710, the register 740, and the storage 750 are illustrated as separate configurations for the sake of simplicity. However, in actuality, these are implemented as integrated firmware, which is a normal application program. Different.

図7で、MPU710は演算制御用のマルチプロセッサであり、MPU710がレジスタ740を使用しながらストレージ750に格納されたマイクロプログラムおよびモジュールを実行することで、図2Aに示された情報処理装置の各機能構成部の機能が実現される。ROM720は、初期データおよびプログラムなどの固定データを記憶する。   7, the MPU 710 is a multiprocessor for arithmetic control, and the MPU 710 executes each microprogram and module stored in the storage 750 while using the register 740, so that each of the information processing apparatuses shown in FIG. The function of the functional component is realized. The ROM 720 stores initial data and fixed data such as programs.

レジスタ740は、MPU710が一時記憶のワークエリアとして使用するレジスタである。なお、レジスタ740はメモリに確保されてもよい。レジスタ740は、本実施形態の実現に必要な情報を保持する。実行モードフラグ741は、プロセッサの実行モードがカーネルモードかユーザモードかを示すフラグである。ステータスフラグ742は、プロセッサのステータス(図6参照)を示す。排他制御実行フラグ743は、スレッドによる排他制御中にセットされるフラグである。割込み禁止フラグ744は、割込みが禁止されているか否かを示すフラグである。タイマ745は、例外抑制の時間をカウントする。タイムアウト時間746は、例外抑制を解除する時間である。例外抑制フラグ747は、排他制御の開始からタイムアウト時間746をタイマ745がカウントする間、例外通知信号の発生を抑制するためのフラグである。例外通知信号748は、排他制御の開始からタイムアウト時間746を超えてタイマ745がカウントしてタイムアウトすると、発生する例外通知の信号である。   The register 740 is a register used by the MPU 710 as a work area for temporary storage. Note that the register 740 may be secured in a memory. The register 740 holds information necessary for realizing the present embodiment. The execution mode flag 741 is a flag indicating whether the execution mode of the processor is the kernel mode or the user mode. The status flag 742 indicates the status of the processor (see FIG. 6). The exclusive control execution flag 743 is a flag that is set during exclusive control by a thread. The interrupt prohibition flag 744 is a flag indicating whether or not an interrupt is prohibited. The timer 745 counts exception suppression time. The timeout time 746 is a time for canceling exception suppression. The exception suppression flag 747 is a flag for suppressing the generation of an exception notification signal while the timer 745 counts the timeout time 746 from the start of exclusive control. The exception notification signal 748 is an exception notification signal that occurs when the timer 745 counts out after the timeout period 746 has elapsed since the start of exclusive control.

ストレージ750には、データベースや各種のパラメータ、あるいは本実施形態の実現に必要な以下のデータまたはプログラムが記憶されている。本例においては、MPU710のマイクロプロセッサが実行するマイクロプログラムが格納されている。このマイクロプログラムが、図5Aの各論理回路素子の論理をファームウェアで実現する。排他制御区間実行開始検出モジュール751は、排他制御区間実行開始検出部212の処理を実現する。排他制御区間実行終了検出モジュール752は、排他制御区間実行終了検出部213の処理を実現する。割込み禁止フラグ制御モジュール753は、割込み禁止フラグ記憶部220の処理を実現する。例外通知信号生成モジュール754は、例外抑制フラグ制御部230および例外通知信号用論理積部240の処理を実現する。例外通知信号処理モジュール755は、命令実行部210の例外通知信号処理を実現する。   The storage 750 stores a database, various parameters, or the following data or programs necessary for realizing the present embodiment. In this example, a microprogram executed by the microprocessor of the MPU 710 is stored. This microprogram implements the logic of each logic circuit element in FIG. 5A with firmware. The exclusive control section execution start detection module 751 realizes the process of the exclusive control section execution start detection unit 212. The exclusive control section execution end detection module 752 implements the processing of the exclusive control section execution end detection unit 213. The interrupt prohibition flag control module 753 implements the processing of the interrupt prohibition flag storage unit 220. The exception notification signal generation module 754 implements the processing of the exception suppression flag control unit 230 and the exception notification signal logical product unit 240. The exception notification signal processing module 755 implements exception notification signal processing of the instruction execution unit 210.

なお、ストレージ750中の各モジュールは便宜的に分けたものであって、複数のモジュールを1つの機能に合体しても1つのモジュールを複数の機能にを分離しても、さらに、モジュールの一部と一部を合体した他の機能を生成してもよい。また、図7のレジスタ740やストレージ750には、情報処理装置が有する汎用の機能や他の実現可能な機能に関連するプログラムやデータは図示されていない。   Each module in the storage 750 is divided for convenience. Even if a plurality of modules are combined into one function or one module is separated into a plurality of functions, one module is further divided. You may produce | generate the other function which united a part and part. In addition, the registers 740 and the storage 750 in FIG. 7 do not show programs and data related to general-purpose functions and other realizable functions of the information processing apparatus.

《排他制御処理》
図8は、本実施形態に係る情報処理装置の排他制御処理の手順を示すフローチャートである。なお、このフローチャートは、MPU710中のマイクロプロセッサでレジスタ740を使用して実行されるマイクロプログラムであり、図5Aの構成要素を実現する。また、図8は、図7における排他制御区間実行開始検出モジュール751、排他制御区間実行終了検出モジュール752、割込み禁止フラグ制御モジュール753、例外通知信号生成モジュール754、の全体を示している。図8は、適切に分割されてよい。
<Exclusive control processing>
FIG. 8 is a flowchart showing a procedure of exclusive control processing of the information processing apparatus according to the present embodiment. This flowchart is a microprogram executed using the register 740 by the microprocessor in the MPU 710, and implements the components shown in FIG. 5A. 8 shows the entire exclusive control section execution start detection module 751, exclusive control section execution end detection module 752, interrupt prohibition flag control module 753, and exception notification signal generation module 754 in FIG. FIG. 8 may be appropriately divided.

マイクロプロセッサは、ステップS801において、ユーザモードであるか否かを判定する。ユーザモードでない、すなわちカーネルモードであれば、カーネルモードの処理を行なう。ユーザモードであれば、マイクロプロセッサは、ステップS811において、スレッドによる排他処理の開始か否かを判定する。排他処理の開始でなければ、マイクロプロセッサは、ステップS821において、排他処理の終了か否かを判定する。排他処理の終了でなければ、マイクロプロセッサは、ステップS831において、タイマカウントか否かを判定する。   In step S801, the microprocessor determines whether the user mode is set. If the mode is not the user mode, that is, the kernel mode, the kernel mode processing is performed. If it is the user mode, the microprocessor determines in step S811 whether or not exclusive processing by the thread is started. If the exclusive process is not started, the microprocessor determines in step S821 whether or not the exclusive process is ended. If the exclusive process is not finished, the microprocessor determines in step S831 whether or not the timer count is reached.

排他処理の開始であれば、マイクロプロセッサは、ステップS813において、タイマの初期化を行ないタイマのカウントを開始する。初期化値は“0”でカウントアップしても、初期化値が“n”でカウントダウンしてもよい。本例では、初期化値が“0”の場合で説明する。次に、マイクロプロセッサは、ステップS815において、割込み禁止フラグをONにする。   If the exclusive process is started, the microprocessor initializes the timer and starts counting the timer in step S813. The initialization value may be counted up with “0” or may be counted down with the initialization value “n”. In this example, the case where the initialization value is “0” will be described. Next, in step S815, the microprocessor turns on the interrupt prohibition flag.

排他処理の終了であれば、マイクロプロセッサは、ステップS823において、タイマをクリアあるいは停止する。次に、マイクロプロセッサは、ステップS825において、割込み禁止フラグをOFFにする。   If the exclusive process is completed, the microprocessor clears or stops the timer in step S823. Next, the microprocessor turns off the interrupt prohibition flag in step S825.

タイムカウントであれば、マイクロプロセッサは、ステップS833において、タイマをカウントアップする。次に、マイクロプロセッサは、ステップS835において、タイマのカウント値が閾値Th以上か否かを判定する。カウント値が閾値Th以上でなければ処理を終了する。カウント値が閾値Th以上であれば、マイクロプロセッサは、ステップS837において、割込み禁止フラグがONか否かを判定する。割込み禁止フラグがONでなければ処理を終了する。割込み禁止フラグがONであれは、マイクロプロセッサは、ステップS839において、例外通知信号を生成してカーネルモードで処理すべくプロセッサに通知する。   If it is time count, the microprocessor counts up the timer in step S833. Next, in step S835, the microprocessor determines whether the count value of the timer is greater than or equal to the threshold value Th. If the count value is not greater than or equal to the threshold Th, the process is terminated. If the count value is equal to or greater than the threshold value Th, the microprocessor determines in step S837 whether or not the interrupt prohibition flag is ON. If the interrupt prohibition flag is not ON, the process is terminated. If the interrupt prohibition flag is ON, in step S839, the microprocessor generates an exception notification signal and notifies the processor to process in the kernel mode.

《例外通知処理》
図9は、本実施形態に係る情報処理装置の例外通知処理の手順を示すフローチャートである。なお、このフローチャートは、NMIの割込みハンドラとしてファームウェアで実行されてよい。
《Exception notification processing》
FIG. 9 is a flowchart illustrating a procedure of exception notification processing of the information processing apparatus according to the present embodiment. This flowchart may be executed by firmware as an NMI interrupt handler.

マイクロプロセッサは、ステップS901において、例外通知信号の受信か否かを判定する。例外通知信号の受信でなければ、他の処理を行なう。例外通知信号の受信であれば、マイクロプロセッサは、ステップS903において、ユーザモードからカーネルモードに移行させる。そして、カーネルモードにおいて、排他制御中であったスレッドに関連するユーサのアプリケーション・プログラムを強制的に終了させる。そして、ユーザモードにより次のアプリケーション・プログラムを実行できるように、レジスタやプロセッサ、データの初期化を行なう。そして、割込み禁止フラグをOFFにする。   In step S901, the microprocessor determines whether an exception notification signal has been received. If no exception notification signal is received, other processing is performed. If the exception notification signal is received, the microprocessor shifts from the user mode to the kernel mode in step S903. Then, in the kernel mode, the user's application program related to the thread under exclusive control is forcibly terminated. Then, registers, processors, and data are initialized so that the next application program can be executed in the user mode. Then, the interrupt prohibition flag is turned OFF.

本実施形態によれば、各処理要素をファームウェアで実現するので、ハードウェア構成に比較して処理の変更が容易であり、かつ、ソフトウェア構成に比較してアプリケーション・プログラムによる影響に無い処理を実現できる。   According to this embodiment, since each processing element is realized by firmware, processing can be easily changed compared to the hardware configuration, and processing that is not affected by the application program compared to the software configuration is realized. it can.

[第4実施形態]
次に、本発明の第4実施形態に係る情報処理装置について説明する。本実施形態に係る情報処理装置は、上記第2実施形態および第3実施形態と比べると、ユーザモードにおける排他制御の処理を割込み禁止処理に適用した例である。その他の構成および動作は、第2実施形態と同様であるため、同じ構成および動作については同じ符号を付してその詳しい説明を省略する。
[Fourth Embodiment]
Next, an information processing apparatus according to the fourth embodiment of the present invention will be described. The information processing apparatus according to the present embodiment is an example in which the exclusive control process in the user mode is applied to the interrupt prohibition process as compared with the second and third embodiments. Since other configurations and operations are the same as those of the second embodiment, the same configurations and operations are denoted by the same reference numerals, and detailed description thereof is omitted.

《情報処理装置の機能構成》
図10は、本実施形態に係る情報処理装置の機能構成を示すブロック図である。なお、図10において、図5Aと同様の構成要素には同じ参照番号を付して、説明は省略する。
<< Functional configuration of information processing device >>
FIG. 10 is a block diagram illustrating a functional configuration of the information processing apparatus according to the present embodiment. In FIG. 10, the same components as those in FIG. 5A are denoted by the same reference numerals, and description thereof is omitted.

プロセッサ1000の命令実行部1010には、割込み禁止検出部1012と、割込み許可検出部1013と、を有する。割込み禁止検出部1012は、命令実行部1010において割る込み禁止状態になったことを検出する。割込み許可検出部1013は、命令実行部1010において割る込み許可状態になったことを検出する。   The instruction execution unit 1010 of the processor 1000 includes an interrupt prohibition detection unit 1012 and an interrupt permission detection unit 1013. The interrupt prohibition detection unit 1012 detects that the instruction execution unit 1010 has entered an interrupt prohibition state. The interrupt permission detection unit 1013 detects that the instruction execution unit 1010 has entered the interrupt permission state.

本実施形態によれば、割込み禁止状態を検出してから所定時間が経過しても、割込み許可状態に復帰しない場合は、例外抑制フラグを無効にして例外通知信号を生成する。すなわち、例外抑制フラグによって、ユーザモードで割込み禁止状態となる操作を実行しても、例外抑制フラグが有効を示している間は割込み禁止を通知する例外通知信号を抑制する。この例外抑制フラグを、割込み禁止に設定されてからあらかじめ定められた期間が経過しても割込み許可操作が行われない場合に無効とする。これにより、ユーザモードでプログラムを実行中であっても、前記期間よりも短い期間であれば例外を発生することなく、割込み禁止状態に設定することを可能とする。   According to the present embodiment, if the interrupt does not return to the interrupt enabled state even after a predetermined time has elapsed since the interrupt disabled state is detected, the exception notification flag is generated by invalidating the exception suppression flag. In other words, even if an operation that disables the interrupt in the user mode is executed by the exception suppression flag, the exception notification signal that notifies the interrupt prohibition is suppressed while the exception suppression flag is valid. The exception suppression flag is invalidated when an interrupt permission operation is not performed even after a predetermined period has elapsed since the interrupt is prohibited. As a result, even when the program is being executed in the user mode, it is possible to set the interrupt disabled state without generating an exception if the period is shorter than the above period.

[他の実施形態]
なお、本発明は、ユーザモードにおける割込みを禁止することが望ましい特殊な処理を実行可能とすると共に、ユーザプログラムのミスや悪意のユーザプログラムによる悪影響を無くす発明であって、特殊な処理は、マルチプロセッサの並列処理におけるスレッドの排他処理に限定されない。
[Other Embodiments]
Note that the present invention makes it possible to execute special processing that is desirably prohibited from interruption in the user mode, and eliminates adverse effects caused by user program mistakes or malicious user programs. It is not limited to exclusive thread processing in parallel processing of processors.

また、実施形態を参照して発明を説明したが、発明は上記実施形態に限定されるものではない。発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。また、それぞれの実施形態に含まれる別々の特徴を如何様に組み合わせたシステムまたは装置も、本発明の範疇に含まれる。   Moreover, although the invention has been described with reference to the embodiments, the invention is not limited to the above embodiments. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the invention within the scope of the present invention. In addition, a system or an apparatus in which different features included in each embodiment are combined in any way is also included in the scope of the present invention.

また、本発明は、複数の機器から構成されるシステムに適用されてもよいし、単体の装置に適用されてもよい。さらに、本発明は、実施形態の機能を実現する情報処理プログラムが、システムあるいは装置に直接あるいは遠隔から供給される場合にも適用可能である。したがって、本発明の機能をコンピュータで実現するために、コンピュータにインストールされるプログラム、あるいはそのプログラムを格納した媒体、そのプログラムをダウンロードさせるWWW(World Wide Web)サーバも、本発明の範疇に含まれる。特に、少なくとも、上述した実施形態に含まれる処理ステップをコンピュータに実行させるプログラムを格納した非一時的コンピュータ可読媒体(non-transitory computer readable medium)は本発明の範疇に含まれる。   In addition, the present invention may be applied to a system composed of a plurality of devices, or may be applied to a single device. Furthermore, the present invention can also be applied to a case where an information processing program that implements the functions of the embodiments is supplied directly or remotely to a system or apparatus. Therefore, in order to realize the functions of the present invention on a computer, a program installed in the computer, a medium storing the program, and a WWW (World Wide Web) server that downloads the program are also included in the scope of the present invention. . In particular, at least a non-transitory computer readable medium storing a program for causing a computer to execute the processing steps included in the above-described embodiments is included in the scope of the present invention.

[実施形態の他の表現]
上記の実施形態の一部または全部は、以下の付記のようにも記載されうるが、以下には限られない。
(付記1)
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御手段と、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御手段と、
を備える情報処理装置。
(付記2)
前記情報処理装置はマルチプロセッサを有して、複数のスレッドによる並列処理を行ない、
前記スレッドによる排他制御は、前記スレッドによる命令実行に使用する資源の他のスレッドによる変更を回避するために実行される付記1に記載の情報処理装置。
(付記3)
前記排他制御手段は、前記スレッドによる排他制御の開始から終了までの間、割込み禁止フラグを設定する割込み禁止フラグ記憶手段を有し、
前記例外通知信号制御手段は、
実行モードがカーネルモードであるかユーザモードであるかを示す実行モードフラグ記憶手段と、前記例外通知信号の抑制を制御すると共に、前記例外通知信号の抑制が所定期間を超えた場合に前記例外通知信号の抑制を解除する抑制フラグ制御手段と、を有し、
前記実行モードフラグがユーザモードを示し、かつ、前記割込み禁止フラグが設定され、かつ、前記例外通知信号の抑制が解除された場合に、前記例外通知信号を生成する、付記1または2に記載の情報処理装置。
(付記4)
前記排他制御手段および前記例外通知信号制御手段の少なくともいずれかは、マイクロプログラムにより実現される付記1乃至3のいずれか1項に記載の情報処理装置。
(付記5)
前記例外通知信号制御手段が生成した前記例外通知信号に基づいて、実行モードをカーネルモードに移行させて、排他制御を実行中のスレッドを含むプログラムを強制的に終了させ、前記割込み禁止フラグを解除する例外通知処理手段を、さらに備える付記1乃至4のいずれか1項に記載の情報処理装置。
(付記6)
前記例外通知処理手段は、マイクロプログラムにより実現される付記5に記載の情報処理装置。
(付記7)
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
を含む情報処理方法。
(付記8)
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
をコンピュータに実行させる情報処理プログラム。
[Other expressions of embodiment]
A part or all of the above-described embodiment can be described as in the following supplementary notes, but is not limited thereto.
(Appendix 1)
Exclusive control means for detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control means for generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing apparatus comprising:
(Appendix 2)
The information processing apparatus has a multiprocessor, performs parallel processing by a plurality of threads,
The information processing apparatus according to appendix 1, wherein the exclusive control by the thread is executed to avoid a change by another thread of a resource used for instruction execution by the thread.
(Appendix 3)
The exclusive control means has an interrupt prohibition flag storage means for setting an interrupt prohibition flag from the start to the end of the exclusive control by the thread,
The exception notification signal control means includes:
Execution mode flag storage means for indicating whether the execution mode is a kernel mode or a user mode, and controlling the suppression of the exception notification signal, and the exception notification when the suppression of the exception notification signal exceeds a predetermined period Suppression flag control means for releasing the suppression of the signal,
The supplementary notification 1 or 2, wherein the exception notification signal is generated when the execution mode flag indicates a user mode, the interrupt prohibition flag is set, and the suppression of the exception notification signal is released. Information processing device.
(Appendix 4)
4. The information processing apparatus according to claim 1, wherein at least one of the exclusive control unit and the exception notification signal control unit is implemented by a microprogram.
(Appendix 5)
Based on the exception notification signal generated by the exception notification signal control means, the execution mode is shifted to the kernel mode, the program including the thread executing the exclusive control is forcibly terminated, and the interrupt prohibition flag is released. The information processing apparatus according to any one of appendices 1 to 4, further comprising an exception notification processing unit.
(Appendix 6)
The information processing apparatus according to appendix 5, wherein the exception notification processing unit is realized by a microprogram.
(Appendix 7)
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing method including:
(Appendix 8)
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing program that causes a computer to execute.

Claims (8)

スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御手段と、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御手段と、
を備える情報処理装置。
Exclusive control means for detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control means for generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing apparatus comprising:
前記情報処理装置はマルチプロセッサを有して、複数のスレッドによる並列処理を行ない、
前記スレッドによる排他制御は、前記スレッドによる命令実行に使用する資源の他のスレッドによる変更を回避するために実行される請求項1に記載の情報処理装置。
The information processing apparatus has a multiprocessor, performs parallel processing by a plurality of threads,
The information processing apparatus according to claim 1, wherein the exclusive control by the thread is executed to avoid a change by another thread of a resource used for instruction execution by the thread.
前記排他制御手段は、前記スレッドによる排他制御の開始から終了までの間、割込み禁止フラグを設定する割込み禁止フラグ記憶手段を有し、
前記例外通知信号制御手段は、
実行モードがカーネルモードであるかユーザモードであるかを示す実行モードフラグ記憶手段と、前記例外通知信号の抑制を制御すると共に、前記例外通知信号の抑制が所定期間を超えた場合に前記例外通知信号の抑制を解除する抑制フラグ制御手段と、を有し、
前記実行モードフラグがユーザモードを示し、かつ、前記割込み禁止フラグが設定され、かつ、前記例外通知信号の抑制が解除された場合に、前記例外通知信号を生成する、請求項1または2に記載の情報処理装置。
The exclusive control means has an interrupt prohibition flag storage means for setting an interrupt prohibition flag from the start to the end of the exclusive control by the thread,
The exception notification signal control means includes:
Execution mode flag storage means for indicating whether the execution mode is a kernel mode or a user mode, and controlling the suppression of the exception notification signal, and the exception notification when the suppression of the exception notification signal exceeds a predetermined period Suppression flag control means for releasing the suppression of the signal,
The exception notification signal is generated when the execution mode flag indicates a user mode, the interrupt prohibition flag is set, and the suppression of the exception notification signal is released. Information processing device.
前記排他制御手段および前記例外通知信号制御手段の少なくともいずれかは、マイクロプログラムにより実現される請求項1乃至3のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein at least one of the exclusive control unit and the exception notification signal control unit is realized by a microprogram. 前記例外通知信号制御手段が生成した前記例外通知信号に基づいて、実行モードをカーネルモードに移行させて、排他制御を実行中のスレッドを含むプログラムを強制的に終了させ、前記割込み禁止フラグを解除する例外通知処理手段を、さらに備える請求項1乃至4のいずれか1項に記載の情報処理装置。   Based on the exception notification signal generated by the exception notification signal control means, the execution mode is shifted to the kernel mode, the program including the thread executing the exclusive control is forcibly terminated, and the interrupt prohibition flag is released. The information processing apparatus according to claim 1, further comprising exception notification processing means. 前記例外通知処理手段は、マイクロプログラムにより実現される請求項5に記載の情報処理装置。   The information processing apparatus according to claim 5, wherein the exception notification processing unit is realized by a microprogram. スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
を含む情報処理方法。
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing method including:
スレッドによる排他制御の開始を検出して割込み禁止フラグを設定し、前記スレッドによる排他制御の終了を検出して割込み禁止フラグを解除する排他制御ステップと、
前記排他制御の開始の検出に伴って、ユーザモードにおける割込み禁止要求による例外通知信号の抑制を開始して、前記排他制御の終了の検出に伴って、前記例外通知信号の抑制を終了すると共に、前記例外通知信号の抑制が所定時間を超えて継続する場合には、前記排他制御の終了の検出を待たずに前記例外通知信号を生成する例外通知信号制御ステップと、
をコンピュータに実行させる情報処理プログラム。
An exclusive control step of detecting the start of exclusive control by a thread and setting an interrupt prohibition flag, detecting the end of exclusive control by the thread and releasing the interrupt prohibition flag;
Along with the detection of the start of the exclusive control, start suppression of the exception notification signal by the interrupt prohibition request in the user mode, and with the detection of the end of the exclusive control, the suppression of the exception notification signal ends. When the suppression of the exception notification signal continues beyond a predetermined time, an exception notification signal control step of generating the exception notification signal without waiting for detection of the end of the exclusive control;
An information processing program that causes a computer to execute.
JP2013142105A 2013-07-05 2013-07-05 Information processing device, information processing method, and information processing program Pending JP2015014966A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013142105A JP2015014966A (en) 2013-07-05 2013-07-05 Information processing device, information processing method, and information processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013142105A JP2015014966A (en) 2013-07-05 2013-07-05 Information processing device, information processing method, and information processing program

Publications (1)

Publication Number Publication Date
JP2015014966A true JP2015014966A (en) 2015-01-22

Family

ID=52436651

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013142105A Pending JP2015014966A (en) 2013-07-05 2013-07-05 Information processing device, information processing method, and information processing program

Country Status (1)

Country Link
JP (1) JP2015014966A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984412A (en) * 2020-08-18 2020-11-24 上海睿赛德电子科技有限公司 Method for implementing user state timer based on semaphore mechanism

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111984412A (en) * 2020-08-18 2020-11-24 上海睿赛德电子科技有限公司 Method for implementing user state timer based on semaphore mechanism

Similar Documents

Publication Publication Date Title
EP3306470B1 (en) Method and apparatus for executing non-maskable interrupt
JP5244981B2 (en) Microcomputer and operation method thereof
US9052911B2 (en) Mechanism for consistent core hang detection in a a processor core
US20100306602A1 (en) Semiconductor device and abnormality detecting method
US9298911B2 (en) Method, apparatus, system, and computer readable medium for providing apparatus security
JP2007188147A (en) Debugging support device, and program for making computer execute debug processing method
KR20200139706A (en) Exception handling in transaction
US11061840B2 (en) Managing network interface controller-generated interrupts
JP2006079345A (en) Microcomputer
RU2432601C2 (en) Method of introducing determinism among multiple clock intervals
EP3036629B1 (en) Handling time intensive instructions
JP2015014966A (en) Information processing device, information processing method, and information processing program
JP2008225807A (en) Control device, and program runaway monitoring method for the same
JP2013540329A (en) Exception control in multiprocessor systems
JP6066807B2 (en) Computer system, computer system interrupt processing program, and computer system interrupt processing method
US9778950B2 (en) Throttling circuitry
JP2010015364A (en) Multiprocessor system and information processor
JP2013109652A (en) Compiler, control method of program module generated by compiler, and control device which achieves control method
JP6073004B1 (en) Information processing device
JP5906807B2 (en) Arithmetic processing device and stall monitoring method
JP5299681B2 (en) Program inspection method
JP2017199180A (en) Image processing device
JP2018005490A (en) Electronic controller
JP2011198032A (en) Information processing apparatus
US9612834B2 (en) Processor with variable instruction atomicity