JP2015225474A - Information processing device and timer setting method - Google Patents
Information processing device and timer setting method Download PDFInfo
- Publication number
- JP2015225474A JP2015225474A JP2014109550A JP2014109550A JP2015225474A JP 2015225474 A JP2015225474 A JP 2015225474A JP 2014109550 A JP2014109550 A JP 2014109550A JP 2014109550 A JP2014109550 A JP 2014109550A JP 2015225474 A JP2015225474 A JP 2015225474A
- Authority
- JP
- Japan
- Prior art keywords
- information
- time
- hardware
- processor
- memory
- 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
Links
Images
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
本発明は、設定された時刻に割り込みを生成するハードウエアのタイマ設定技術に関する。 The present invention relates to a hardware timer setting technique for generating an interrupt at a set time.
設定された時刻に割り込みを生成するハードウエアは、ハードウエアタイマと呼ばれる。ハードウエアタイマに対する時刻の設定は、例えば、アプリケーションプログラムのプロセスがタイマ機能を利用するためのシステムコールを発行し、OS(Operating System)がハードウエアタイマのコンパレータ値を設定することによって行われる。 Hardware that generates an interrupt at a set time is called a hardware timer. The time setting for the hardware timer is performed by, for example, issuing a system call for the application program process to use the timer function, and the OS (Operating System) setting the comparator value of the hardware timer.
ハードウエアタイマを設定する処理は、CPU(Central Processing Unit)が低速なI/O(Input/Output)のチップセットにアクセスする処理を含むため、時間がかかる。そして、ハードウエアタイマを設定する処理に時間がかかると、アプリケーションプログラムを実行するCPUがシステムコールから復帰するタイミングが遅れ、アプリケーションプログラムの実行速度が落ちる。これは、特にアプリケーションプログラムを高速で実行すべき場合に問題になる。従来技術は、このような問題には着目していない。 The process of setting the hardware timer takes time because it includes a process in which a CPU (Central Processing Unit) accesses a low-speed I / O (Input / Output) chipset. If it takes time to set the hardware timer, the timing at which the CPU executing the application program returns from the system call is delayed, and the execution speed of the application program decreases. This becomes a problem particularly when the application program should be executed at high speed. The prior art does not pay attention to such a problem.
従って、本発明の目的は、1つの側面では、ハードウエアタイマを設定する処理によってアプリケーションプログラムの実行速度が落ちるのを抑制するための技術を提供することである。 Accordingly, an object of the present invention, in one aspect, is to provide a technique for suppressing a decrease in the execution speed of an application program due to processing for setting a hardware timer.
本発明に係る情報処理装置は、アプリケーションプログラムを実行する第1のプロセッサと、第2のプロセッサと、メモリと、設定された時刻に割り込みを生成するハードウエアとを有する。そして、第1のプロセッサは、アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報をメモリに格納すると共に、メモリに格納された識別情報をハードウエアのタイマ設定を要することを示す情報に変更し、第2のプロセッサは、識別情報を監視し、識別情報がハードウエアのタイマ設定を要することを示す情報に変更された場合に、第1の時刻の情報をメモリから読み出し、第1の時刻の情報に基づきハードウエアのタイマ設定を行う。 An information processing apparatus according to the present invention includes a first processor that executes an application program, a second processor, a memory, and hardware that generates an interrupt at a set time. The first processor stores information on the first time received from the process of the application program in the memory, and changes the identification information stored in the memory to information indicating that a hardware timer setting is required. The second processor monitors the identification information. When the identification information is changed to information indicating that the hardware timer setting is required, the second processor reads the first time information from the memory. Set the hardware timer based on the information.
1つの側面では、ハードウエアタイマを設定する処理によってアプリケーションプログラムの実行速度が落ちるのを抑制できるようになる。 In one aspect, it is possible to suppress a decrease in the execution speed of the application program due to the process of setting the hardware timer.
図1に、本実施の形態における情報処理装置1の構成を示す。情報処理装置1は、CPU12と、メモリ13と、CPU14と、ハードウエアタイマ15とを有する。
FIG. 1 shows the configuration of the information processing apparatus 1 in the present embodiment. The information processing apparatus 1 includes a
CPU12は、例えばハードディスクドライブ(HDD:Hard Disk Drive)等に格納されたアプリケーションプログラム及びOS10のプログラムを実行することにより、アプリケーションプログラムのプロセス11と、OS10における受付部101(例えばスレッド)とを実現する。メモリ13は、フラグ131が格納される領域と、キュー132の領域とを含む。CPU14は、例えばハードディスクドライブ等に格納されたOS10のプログラムを実行することにより、OS10における設定スレッド102及び割り込みハンドラ103を実現する。ハードウエアタイマ15は、例えば、マイクロ秒の精度を有するハードウエアタイマ(例えば、高精度イベントタイマ(HPET:High Precision Event Timer))である。ハードウエアタイマ15は、例えば、CPU12及び14と比較して低速なI/Oのチップセットに組み込まれている。
For example, the
アプリケーションプログラムのプロセス11は、タイマ機能を利用するためのシステムコールを発行する。受付部101は、受け付けたシステムコールに基づき処理を行い、処理結果をキュー132に格納すると共に、フラグ131を更新する。設定スレッド102は、フラグ131が更新された場合に、キュー132に格納されたデータに基づき、ハードウエアタイマ15の設定を行う(すなわち、タイマ設定を行う)。ハードウエアタイマ15は、設定された時刻(本実施の形態においては、コンパレータ値とカウンタ値とが一致する場合)に割り込みを生成する。割り込みハンドラ103は、ハードウエアタイマ15からの割り込みにより呼び出された場合、キュー132に格納されたデータに基づき処理を実行する。
The
図2に、キュー132に格納されるデータの構造を示す。キュー132に格納されるデータは、リンクされたデータ構造(Linked Data Structure)を有する。ポインタ201は、最初に処理すべきデータ(図2の例では、データ202)を指し示す。各データは、満了時刻の情報と満了処理の情報とを含む。各データには、そのデータの次に処理すべきデータを指し示すポインタが付加される。満了時刻とは、ハードウエアタイマ15のタイムアウトの時刻であり、満了処理とは、満了時刻になった場合に割り込みハンドラ103が実行すべき処理である。満了時刻が早いデータほど先に処理される。従って図2の例では、満了時刻Aは満了時刻Bより早く、満了時刻Bは満了時刻Cより早い。
FIG. 2 shows the structure of data stored in the
次に、図3乃至図6を用いて、情報処理装置1の動作について説明する。まず、図3を用いて、受付部101が実行する処理について説明する。
Next, the operation of the information processing apparatus 1 will be described with reference to FIGS. First, processing executed by the
まず、アプリケーションプログラムのプロセス11は、タイマ機能を利用するためのシステムコールを発行する。受付部101は、アプリケーションプログラムのプロセス11からシステムコールを受け付ける(図3:ステップS1)。
First, the
受付部101は、アプリケーションプログラムのプロセス11から受け付けたシステムコールに基づき、満了時刻の情報及び満了処理の情報を含むデータを生成する(ステップS3)。
The receiving
受付部101は、ステップS3において生成されたデータを、そのデータに含まれる満了時刻の情報に従いキュー132に格納する(ステップS5)。ステップS5においては、満了時刻が早いデータほど先に処理されるように、キュー132に格納されたデータに対してポインタの再設定が行われる。
The
受付部101は、キュー132に格納されたデータについての満了時刻のうち最も早い満了時刻が、ステップS5の処理によって変化したか判断する(ステップS7)。すなわち、ステップS5において格納したデータについての満了時刻が最も早い満了時刻であるか判断する。
The accepting
最も早い満了時刻が変化していない場合(ステップS7:Noルート)、ハードウエアタイマ15の設定が行われなくてもよいので、処理を終了する。一方、最も早い満了時刻が変化した場合(ステップS7:Yesルート)、ハードウエアタイマ15の設定が行われるべきである。従って、受付部101は、メモリ13に格納されているフラグ131を更新する(ステップS9)。ステップS9においては、例えば、フラグの値(0又は1)を反転させる。そして処理を終了する。ここで、CPU12はシステムコールから復帰する。
If the earliest expiration time has not changed (step S7: No route), the
以上のようにフラグを更新することで、ハードウエアタイマ15の設定を行うべきであることをCPU14に通知できるようになる。また、以上の処理を完了すればCPU12はシステムコールから復帰し、アプリケーションプログラムを実行することができるようになる。よって、ボトルネックを解消し、アプリケーションプログラムの実行速度が落ちるのを抑制できるようになる。
By updating the flag as described above, it is possible to notify the
次に、図4を用いて、設定スレッド102が実行する処理について説明する。
Next, processing executed by the
まず、設定スレッド102は、メモリ13におけるフラグ131が更新されたか判断する(図4:ステップS11)。フラグ131が更新されていない場合(ステップS11:Noルート)、ハードウエアタイマ15の設定を行わなくてよいので、ステップS23の処理に移行する。
First, the
一方、フラグ131が更新された場合(ステップS11:Yesルート)、ハードウエアタイマ15の設定を行うため、設定スレッド102は、キュー132における先頭のデータ(すなわち、満了時刻が最も早いデータ)について、満了時刻までの残り時間を算出する(ステップS13)。ステップS13においては、残り時間とは、システム時計等から取得した現在時刻から満了時刻までの時間である。
On the other hand, when the
設定スレッド102は、ステップS13において算出された残り時間を、ハードウエアタイマ15のカウンタ値に加算すべき値に変換する(ステップS15)。
The setting
設定スレッド102は、ハードウエアタイマ15のカウンタ値を、ハードウエアタイマ15から取得する(ステップS17)。そして、設定スレッド102は、ステップS15の処理による変換後の値を、ハードウエアタイマ15から取得したカウンタ値に加えることで、ハードウエアタイマ15のコンパレータ値に設定すべき値を算出する(ステップS19)。
The setting
設定スレッド102は、ステップS19において算出された値を、ハードウエアタイマ15のコンパレータ値として設定する(ステップS21)。
The setting
設定スレッド102は、監視命令を発行し(ステップS23)、メモリ13におけるフラグ131のアドレスを登録する。監視命令とは、例えば、Intel 64 アーキテクチャにおけるmonitor命令である。
The setting
設定スレッド102は、リスケジュール要求が有るかプロセススケジューラに確認する(ステップS25)。リスケジュール要求とは、他のスレッド等が動作すべき状態である場合に出される要求である。プロセススケジューラは、CPUの使用権の割り当てを行う。
The setting
リスケジュール要求が有る場合(ステップS25:Yesルート)、設定スレッド102は、プロセススケジューラに、CPU14の使用権を、設定スレッド102から他のスレッド等に移転させる(ステップS27)。これにより、設定スレッド102がCPU14を占有するのを防ぐことができる。
When there is a reschedule request (step S25: Yes route), the setting
他のスレッド等によるCPU14の使用が完了すると、設定スレッド102は、CPU14の使用権を獲得する(ステップS29)。そしてステップS11の処理に戻る。
When the use of the
一方、リスケジュール要求が無い場合(ステップS25:Noルート)、設定スレッド102は、CPU待機命令を発行する(ステップS31)。CPU待機命令は、例えば、Intel 64 アーキテクチャにおけるmwait命令である。CPU待機命令により、設定スレッド102は、登録されたアドレスに何らかのアクセスがあるまで待機する(すなわち、フラグ131を監視しつつ休止状態に遷移する)。
On the other hand, when there is no reschedule request (step S25: No route), the setting
設定スレッド102は、フラグ131の更新又は割り込みがあった場合に、CPU待機命令から復帰する(ステップS33)。これによりフラグ131の監視は終了する。そしてステップS11の処理に戻る。
The setting
以上のような処理を実行すれば、ハードウエアタイマ15を設定する処理をCPU12から委託されたCPU14が、適切に設定を行えるようになる。また、プロセススケジューラに確認をすることで、設定スレッド102がCPU14を占有するのを防ぐことができる。なお、CPU14の使用権を移転するのは、以下のような理由による。具体的には、設定スレッド102が直接CPU待機命令を発行して待機している状態は、OS10からは設定スレッド102が走行し続けている状態であると認識される。そのため、OS10の他のスレッドが動作できない(すなわち設定スレッド102がCPU14を独占する)からである。
By executing the processing as described above, the
次に、図5を用いて、割り込みハンドラ103が実行する処理について説明する。
Next, processing executed by the interrupt
ハードウエアタイマ15は、ハードウエアタイマ15のコンパレータ値とカウンタ値とが一致する場合に割り込みを生成する。CPU14が割り込みを検出すると、割り込みハンドラ103が呼び出される。割り込みハンドラ103は、未処理のデータがキュー132に有るか判断する(図5:ステップS41)。
The
未処理のデータがキュー132に無い場合(ステップS41:Noルート)、処理を終了する。一方、未処理のデータがキュー132に有る場合(ステップS41:Yesルート)、割り込みハンドラ103は、未処理のデータのうち満了時刻が最も早いデータを特定する(ステップS43)。
If there is no unprocessed data in the queue 132 (step S41: No route), the process is terminated. On the other hand, when there is unprocessed data in the queue 132 (step S41: Yes route), the interrupt
割り込みハンドラ103は、現在時刻が、ステップS43において特定されたデータについての満了時刻を経過したか判断する(ステップS45)。現在時刻が満了時刻を経過した場合(ステップS45:Yesルート)、割り込みハンドラ103は、ステップS43において特定されたデータに含まれる満了処理の情報に基づき、満了処理を実行する(ステップS47)。そしてステップS41の処理に戻る。
The interrupt
一方、現在時刻が満了時刻を経過していない場合(ステップS45:Yesルート)、割り込みハンドラ103は、ステップS43において特定されたデータについて、満了時刻までの残り時間を算出する(ステップS49)。ステップS49においては、残り時間とは、システム時計等から取得した現在時刻から満了時刻までの時間である。
On the other hand, when the current time has not passed the expiration time (step S45: Yes route), the interrupt
割り込みハンドラ103は、ステップS49において算出された残り時間を、ハードウエアタイマ15のカウンタ値に加算すべき値に変換する(ステップS51)。
The interrupt
割り込みハンドラ103は、ハードウエアタイマ15のカウンタ値を、ハードウエアタイマ15から取得する(ステップS53)。そして、割り込みハンドラ103は、ステップS51の処理による変換後の値を、ハードウエアタイマ15から取得したカウンタ値に加えることで、ハードウエアタイマ15のコンパレータ値に設定すべき値を算出する(ステップS55)。
The interrupt
割り込みハンドラ103は、ステップS55において算出された値を、ハードウエアタイマ15のコンパレータ値として設定する(ステップS57)。そして処理を終了する。
The interrupt
以上のような処理を実行すれば、割り込みが発生した場合に割り込みハンドラ103が適切に満了処理を実行できるようになる。
By executing the processing as described above, the interrupt
図6を用いて、本実施の形態の効果について説明する。本実施の形態においては、ハードウエアタイマ15を設定する処理を、CPU12がフラグを用いてCPU14に委託する。従って、CPU12はシステムコールから早期に復帰するので、アプリケーションプログラムの実行が止まる時間を短くすることができる。また、CPU12はフラグを更新すれば(すなわち、メモリ13に1度アクセスすれば)CPU14に処理を委託できるので、CPU14に処理を委託することがアプリケーションプログラムの実行速度を落とすこともない。
The effect of this embodiment will be described with reference to FIG. In the present embodiment, the
一方、単一のCPUを利用する場合には、ハードウエアタイマ15を設定する処理が終わるまではシステムコールから復帰することができない。ハードウエアタイマ15を設定する処理のうち、ハードウエアタイマ15にアクセスする処理(例えば、ステップS17及びS21の処理)は特に時間がかかる処理であるので、アプリケーションプログラムの実行が止まる時間が長くなる。
On the other hand, when a single CPU is used, the system call cannot be restored until the processing for setting the
なお、ハードウエアタイマ15へのアクセスに時間がかかることに鑑み、CPUが有する割り込み機構(例えば、Intel 64 アーキテクチャにおけるLocal APIC Timerなど)を利用することも考えられる。例えば、割り込み機構を有するCPUを1つ用意し、そのCPUに割り込みを発生させることが考えられる。しかし、割り込みを別のCPUに発生させることができないため、アプリケーションプログラムを実行するCPUが割り込み処理(例えば、満了処理及び次の割り込みの設定処理等)を実行せざるを得ず、アプリケーションプログラムの実行速度が落ちる。
In view of the fact that it takes time to access the
また、割り込み機構を有するCPUを、アプリケーションプログラムを実行するCPUとは別に用意し、そのCPUに割り込みを発生させることも考えられる。しかし、アプリケーションプログラムを実行するCPUと、割り込みを発生させるCPUとの間の通信(例えばIPI(Inter-Processor Interrupt)等)において、種々の事前処理(例えば、割り込み先CPUの設定、相手のCPUが実行する関数、及び引数の設定など)を行うことになるため時間がかかる。 It is also conceivable that a CPU having an interrupt mechanism is prepared separately from a CPU that executes an application program and an interrupt is generated in the CPU. However, in communication (for example, IPI (Inter-Processor Interrupt), etc.) between the CPU that executes the application program and the CPU that generates an interrupt, various pre-processing (for example, setting of the interrupt destination CPU, It takes time because the function to be executed and the setting of arguments, etc., are performed.
また、本実施の形態と同様に、スレッドを新たに起動し、そのスレッドに、CPU待機命令を使用せずスピンループによりフラグを監視させ、フラグが更新された場合にハードウエアタイマ15への設定を行わせることも考えられる。しかしこのようにすると、フラグを監視する処理がCPUを占有するため他のカーネルスレッドが動作できない場合があり、また、消費電力が本実施の形態と比較して多い。
Similarly to the present embodiment, a thread is newly started, and the thread is monitored by a spin loop without using a CPU standby instruction. When the flag is updated, the setting to the
以上本発明の一実施の形態を説明したが、本発明はこれに限定されるものではない。例えば、上で説明した情報処理装置1の機能ブロック構成は実際のプログラムモジュール構成に一致しない場合もある。 Although one embodiment of the present invention has been described above, the present invention is not limited to this. For example, the functional block configuration of the information processing apparatus 1 described above may not match the actual program module configuration.
また、上で説明したデータ保持構成は一例であって、上記のような構成でなければならないわけではない。さらに、処理フローにおいても、処理結果が変わらなければ処理の順番を入れ替えることも可能である。さらに、並列に実行させるようにしても良い。 In addition, the data holding configuration described above is an example, and the above configuration is not necessarily required. Further, in the processing flow, the processing order can be changed if the processing result does not change. Further, it may be executed in parallel.
また、メモリ13上のフラグ131を介してCPU14に委託する処理は、ハードウエアタイマ15の設定に限られず、他の処理であってもよい。
Further, the processing entrusted to the
また、CPU12及び14は、マルチコアプロセッサのコアであってもよい。マルチコアプロセッサにおける複数のコアの間で、タイマ設定に関連する処理の負荷を分散できるようになる。
Further, the
以上述べた本発明の実施の形態をまとめると、以下のようになる。 The embodiment of the present invention described above is summarized as follows.
本実施の形態の第1の態様に係る情報処理装置は、(A)アプリケーションプログラムを実行する第1のプロセッサと、(B)第2のプロセッサと、(C)フラグを格納するメモリと、(D)設定された時刻に割り込みを生成するハードウエアとを有する。そして、(b1)第2のプロセッサは、フラグを監視し、(a1)第1のプロセッサは、アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報をメモリに格納すると共に、フラグを更新し、(b2)フラグが更新された場合に、第2のプロセッサは、第1の時刻の情報をメモリから読み出し、第1の時刻の情報に基づきハードウエアの設定を行う。 An information processing apparatus according to a first aspect of the present embodiment includes (A) a first processor that executes an application program, (B) a second processor, (C) a memory that stores a flag, D) Hardware that generates an interrupt at a set time. (B1) the second processor monitors the flag; (a1) the first processor stores the first time information received from the process of the application program in the memory and updates the flag; (B2) When the flag is updated, the second processor reads the first time information from the memory, and sets the hardware based on the first time information.
このようにすれば、ハードウエアを設定する処理を第2のプロセッサに実行させることができるので、第1のプロセッサはアプリケーションプログラムの実行をすぐさま再開でき、アプリケーションプログラムの実行速度が落ちるのを抑制できるようになる。また、メモリに格納されたフラグを利用するので、プロセッサ間の通信を高速化できるようになる。 In this way, the processing for setting the hardware can be executed by the second processor, so that the first processor can immediately resume the execution of the application program and can suppress the decrease in the execution speed of the application program. It becomes like this. In addition, since the flag stored in the memory is used, communication between processors can be accelerated.
また、(b3)実行すべき他の処理がある場合に、第2のプロセッサは、フラグを監視する処理から実行すべき他の処理に、第2のプロセッサの使用権を移転してもよい。このようにすれば、フラグを監視する処理が第2のプロセッサを占有するのを抑制できるようになる。 (B3) When there is another process to be executed, the second processor may transfer the right to use the second processor from the process for monitoring the flag to another process to be executed. In this way, it is possible to suppress the process of monitoring the flag from occupying the second processor.
また、(a2)第1のプロセッサは、アプリケーションプログラムのプロセスから、第1の時刻になった場合に実行すべき処理の情報を受け付け、メモリに格納し、(d1)第2のプロセッサにより設定された第1の時刻になった場合に、ハードウエアは、割り込みを生成し、(b4)割り込みが生成された場合に、第2のプロセッサは、第1の時刻になった場合に実行すべき処理の情報をメモリから取り出し、第1の時刻になった場合に実行すべき処理を実行してもよい。このようにすれば、割り込みが生成された場合に実行すべき処理を適切に行えるようになる。 Further, (a2) the first processor receives information on processing to be executed when the first time comes from the process of the application program, stores it in the memory, and (d1) is set by the second processor. When the first time is reached, the hardware generates an interrupt. (B4) When the interrupt is generated, the second processor performs processing to be executed when the first time is reached. This information may be extracted from the memory, and a process to be executed when the first time is reached may be executed. In this way, processing to be executed when an interrupt is generated can be appropriately performed.
また、上で述べたハードウエアの設定を行う処理において、(b21)第1の時刻までの時間を算出し、(b22)第1の時刻までの時間を、ハードウエアのカウンタ値に加算すべき値に変換し、(b23)ハードウエアのカウンタ値をハードウエアから取得し、(b24)ハードウエアのカウンタ値に、ハードウエアのカウンタ値に加算すべき値を加算した値である設定値を算出し、(b24)設定値を、ハードウエアのコンパレータ値に設定してもよい。このようにすれば、ハードウエアを適切に設定できるようになる。 In the hardware setting process described above, (b21) the time to the first time is calculated, and (b22) the time to the first time is added to the hardware counter value. (B23) The hardware counter value is acquired from the hardware. (B24) The setting value is calculated by adding the value to be added to the hardware counter value to the hardware counter value. (B24) The set value may be set to a hardware comparator value. In this way, the hardware can be set appropriately.
また、上で述べたハードウエアは、(d2)高精度イベントタイマであってもよい。高精度イベントタイマを使用する場合にも対処できるようになる。 Further, the hardware described above may be (d2) a high-precision event timer. Even when a high-precision event timer is used, it becomes possible to cope with it.
本実施の形態の第2の態様に係るタイマ設定方法は、アプリケーションプログラムを実行する第1のプロセッサと、第2のプロセッサと、フラグを格納するメモリと、設定された時刻に割り込みを生成するハードウエアとを有する情報処理装置により実行される。そして、本タイマ設定方法は、(E)第2のプロセッサは、フラグを監視し、(F)第1のプロセッサは、アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報をメモリに格納すると共に、フラグを更新し、(G)フラグが更新された場合に、第2のプロセッサは、第1の時刻の情報をメモリから読み出し、第1の時刻の情報に基づきハードウエアの設定を行う処理を含む。 A timer setting method according to a second aspect of the present embodiment includes a first processor that executes an application program, a second processor, a memory that stores a flag, and a hardware that generates an interrupt at a set time. Executed by an information processing apparatus having hardware. In this timer setting method, (E) the second processor monitors the flag, and (F) the first processor stores information on the first time received from the process of the application program in the memory. When the flag is updated, (G) when the flag is updated, the second processor reads the first time information from the memory, and performs hardware setting based on the first time information. Including.
以上の実施例を含む実施形態に関し、さらに以下の付記を開示する。 The following supplementary notes are further disclosed with respect to the embodiments including the above examples.
(付記1)
アプリケーションプログラムを実行する第1のプロセッサと、
第2のプロセッサと、
メモリと、
設定された時刻に割り込みを生成するハードウエアと、
を有し、
前記第1のプロセッサは、前記アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報を前記メモリに格納すると共に、前記メモリに格納された識別情報を前記ハードウエアのタイマ設定を要することを示す情報に変更し、
前記第2のプロセッサは、前記識別情報を監視し、前記識別情報が前記ハードウエアのタイマ設定を要することを示す情報に変更された場合に、前記第1の時刻の情報を前記メモリから読み出し、前記第1の時刻の情報に基づき前記ハードウエアのタイマ設定を行う
情報処理装置。
(Appendix 1)
A first processor for executing an application program;
A second processor;
Memory,
Hardware that generates an interrupt at a set time;
Have
The first processor stores information on the first time received from the process of the application program in the memory, and information indicating that the hardware timer setting is required for the identification information stored in the memory. To
The second processor monitors the identification information, and when the identification information is changed to information indicating that the hardware timer setting is required, reads the information of the first time from the memory, An information processing apparatus configured to set a timer of the hardware based on the information of the first time.
(付記2)
実行すべき他の処理がある場合に、前記第2のプロセッサは、前記識別情報を監視する処理から前記実行すべき他の処理に、前記第2のプロセッサの使用権を移転する
付記1記載の情報処理装置。
(Appendix 2)
The second processor transfers the right to use the second processor from the process of monitoring the identification information to the other process to be executed when there is another process to be executed. Information processing device.
(付記3)
前記第1のプロセッサは、前記第アプリケーションプログラムのプロセスから、前記第1の時刻になった場合に実行すべき処理の情報を受け付け、前記メモリに格納し、
前記ハードウエアは、前記第1の時刻になった場合に割り込みを生成し、
前記割り込みが生成された場合に、前記第2のプロセッサは、前記第1の時刻になった場合に実行すべき処理の情報を前記メモリから取り出し、前記第1の時刻になった場合に実行すべき処理を実行する
付記1記載の情報処理装置。
(Appendix 3)
The first processor receives information on processing to be executed when the first time comes from the process of the first application program, stores the information in the memory,
The hardware generates an interrupt when the first time is reached,
When the interrupt is generated, the second processor extracts information on processing to be executed when the first time is reached from the memory and executes the information when the first time is reached. The information processing apparatus according to appendix 1, which executes power processing.
(付記4)
前記ハードウエアのタイマ設定を行う処理において、
前記第1の時刻までの時間を算出し、
前記第1の時刻までの時間を、前記ハードウエアのカウンタ値に加算すべき値に変換し、
前記ハードウエアのカウンタ値を前記ハードウエアから取得し、
前記ハードウエアのカウンタ値に、前記ハードウエアのカウンタ値に加算すべき値を加算した値である設定値を算出し、
前記設定値を、前記ハードウエアのコンパレータ値に設定する
付記1乃至3のいずれか1つ記載の情報処理装置。
(Appendix 4)
In the process of setting the hardware timer,
Calculating the time to the first time;
Converting the time until the first time to a value to be added to the counter value of the hardware;
Obtaining the counter value of the hardware from the hardware;
A setting value that is a value obtained by adding a value to be added to the hardware counter value to the hardware counter value;
The information processing apparatus according to any one of supplementary notes 1 to 3, wherein the setting value is set to a comparator value of the hardware.
(付記5)
前記ハードウエアは、高精度イベントタイマである
付記1乃至4のいずれか1つ記載の情報処理装置。
(Appendix 5)
The information processing apparatus according to any one of appendices 1 to 4, wherein the hardware is a high-precision event timer.
(付記6)
アプリケーションプログラムを実行する第1のプロセッサと、第2のプロセッサと、メモリと、設定された時刻に割り込みを生成するハードウエアとを有する情報処理装置により実行されるタイマ設定方法であって、
前記第1のプロセッサは、前記アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報を前記メモリに格納すると共に、前記メモリに格納された識別情報を前記ハードウエアのタイマ設定を要することを示す情報に変更し、
前記第2のプロセッサは、前記識別情報を監視し、前記識別情報が前記ハードウエアのタイマ設定を要することを示す情報に変更された場合に、前記第1の時刻の情報を前記メモリから読み出し、前記第1の時刻の情報に基づき前記ハードウエアのタイマ設定を行う
処理を含むタイマ設定方法。
(Appendix 6)
A timer setting method executed by an information processing apparatus having a first processor that executes an application program, a second processor, a memory, and hardware that generates an interrupt at a set time,
The first processor stores information on the first time received from the process of the application program in the memory, and information indicating that the hardware timer setting is required for the identification information stored in the memory. To
The second processor monitors the identification information, and when the identification information is changed to information indicating that the hardware timer setting is required, reads the information of the first time from the memory, A timer setting method including a process of setting a timer of the hardware based on the information of the first time.
1 情報処理装置 10 OS
101 受付部 102 設定スレッド
103 割り込みハンドラ 11 アプリケーションプログラムのプロセス
12 CPU 13 メモリ
131 フラグ 132 キュー
14 CPU 15 ハードウエアタイマ
1
DESCRIPTION OF
Claims (5)
第2のプロセッサと、
メモリと、
設定された時刻に割り込みを生成するハードウエアと、
を有し、
前記第1のプロセッサは、前記アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報を前記メモリに格納すると共に、前記メモリに格納された識別情報を前記ハードウエアのタイマ設定を要することを示す情報に変更し、
前記第2のプロセッサは、前記識別情報を監視し、前記識別情報が前記ハードウエアのタイマ設定を要することを示す情報に変更された場合に、前記第1の時刻の情報を前記メモリから読み出し、前記第1の時刻の情報に基づき前記ハードウエアのタイマ設定を行う
情報処理装置。 A first processor for executing an application program;
A second processor;
Memory,
Hardware that generates an interrupt at a set time;
Have
The first processor stores information on the first time received from the process of the application program in the memory, and information indicating that the hardware timer setting is required for the identification information stored in the memory. To
The second processor monitors the identification information, and when the identification information is changed to information indicating that the hardware timer setting is required, reads the information of the first time from the memory, An information processing apparatus configured to set a timer of the hardware based on the information of the first time.
請求項1記載の情報処理装置。 The second processor transfers the usage right of the second processor from the process of monitoring the identification information to the other process to be executed when there is another process to be executed. Information processing device.
前記ハードウエアは、前記第1の時刻になった場合に割り込みを生成し、
前記割り込みが生成された場合に、前記第2のプロセッサは、前記第1の時刻になった場合に実行すべき処理の情報を前記メモリから取り出し、前記第1の時刻になった場合に実行すべき処理を実行する
請求項1記載の情報処理装置。 The first processor receives information on processing to be executed when the first time comes from the process of the first application program, stores the information in the memory,
The hardware generates an interrupt when the first time is reached,
When the interrupt is generated, the second processor extracts information on processing to be executed when the first time is reached from the memory and executes the information when the first time is reached. The information processing apparatus according to claim 1, which executes power processing.
前記第1の時刻までの時間を算出し、
前記第1の時刻までの時間を、前記ハードウエアのカウンタ値に加算すべき値に変換し、
前記ハードウエアのカウンタ値を前記ハードウエアから取得し、
前記ハードウエアのカウンタ値に、前記ハードウエアのカウンタ値に加算すべき値を加算した値である設定値を算出し、
前記設定値を、前記ハードウエアのコンパレータ値に設定する
請求項1乃至3のいずれか1つ記載の情報処理装置。 In the process of setting the hardware timer,
Calculating the time to the first time;
Converting the time until the first time to a value to be added to the counter value of the hardware;
Obtaining the counter value of the hardware from the hardware;
A setting value that is a value obtained by adding a value to be added to the hardware counter value to the hardware counter value;
The information processing apparatus according to claim 1, wherein the setting value is set to a comparator value of the hardware.
前記第1のプロセッサは、前記アプリケーションプログラムのプロセスから受け付けた第1の時刻の情報を前記メモリに格納すると共に、前記メモリに格納された識別情報を前記ハードウエアのタイマ設定を要することを示す情報に変更し、
前記第2のプロセッサは、前記識別情報を監視し、前記識別情報が前記ハードウエアのタイマ設定を要することを示す情報に変更された場合に、前記第1の時刻の情報を前記メモリから読み出し、前記第1の時刻の情報に基づき前記ハードウエアのタイマ設定を行う
処理を含むタイマ設定方法。 A timer setting method executed by an information processing apparatus having a first processor that executes an application program, a second processor, a memory, and hardware that generates an interrupt at a set time,
The first processor stores information on the first time received from the process of the application program in the memory, and information indicating that the hardware timer setting is required for the identification information stored in the memory. To
The second processor monitors the identification information, and when the identification information is changed to information indicating that the hardware timer setting is required, reads the information of the first time from the memory, A timer setting method including a process of setting a timer of the hardware based on the information of the first time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014109550A JP6354333B2 (en) | 2014-05-27 | 2014-05-27 | Information processing apparatus and timer setting method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014109550A JP6354333B2 (en) | 2014-05-27 | 2014-05-27 | Information processing apparatus and timer setting method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015225474A true JP2015225474A (en) | 2015-12-14 |
JP6354333B2 JP6354333B2 (en) | 2018-07-11 |
Family
ID=54842174
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014109550A Active JP6354333B2 (en) | 2014-05-27 | 2014-05-27 | Information processing apparatus and timer setting method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6354333B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019531541A (en) * | 2016-08-19 | 2019-10-31 | オラクル・インターナショナル・コーポレイション | Entropy collection from a variety of sources |
US10983823B2 (en) | 2017-01-25 | 2021-04-20 | Mitsubishi Electric Corporation | Computer apparatus, task initiation method, and computer readable medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6421635A (en) * | 1987-07-17 | 1989-01-25 | Nec Corp | Software timer management processor |
JP2001202256A (en) * | 2000-01-20 | 2001-07-27 | Denso Corp | Microcomputer |
JP2002268712A (en) * | 2001-03-12 | 2002-09-20 | Omron Corp | Controller and network system |
JP2006048241A (en) * | 2004-08-02 | 2006-02-16 | Hitachi Ltd | Built-in controller |
-
2014
- 2014-05-27 JP JP2014109550A patent/JP6354333B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6421635A (en) * | 1987-07-17 | 1989-01-25 | Nec Corp | Software timer management processor |
JP2001202256A (en) * | 2000-01-20 | 2001-07-27 | Denso Corp | Microcomputer |
JP2002268712A (en) * | 2001-03-12 | 2002-09-20 | Omron Corp | Controller and network system |
JP2006048241A (en) * | 2004-08-02 | 2006-02-16 | Hitachi Ltd | Built-in controller |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2019531541A (en) * | 2016-08-19 | 2019-10-31 | オラクル・インターナショナル・コーポレイション | Entropy collection from a variety of sources |
JP7013447B2 (en) | 2016-08-19 | 2022-01-31 | オラクル・インターナショナル・コーポレイション | Collection of entropy from a variety of sources |
JP2022028727A (en) * | 2016-08-19 | 2022-02-16 | オラクル・インターナショナル・コーポレイション | Collecting entropy from diverse sources |
JP7281523B2 (en) | 2016-08-19 | 2023-05-25 | オラクル・インターナショナル・コーポレイション | Collecting entropy from diverse sources |
US10983823B2 (en) | 2017-01-25 | 2021-04-20 | Mitsubishi Electric Corporation | Computer apparatus, task initiation method, and computer readable medium |
Also Published As
Publication number | Publication date |
---|---|
JP6354333B2 (en) | 2018-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210357214A1 (en) | Methods, apparatus, and instructions for user-level thread suspension | |
US9208113B2 (en) | Deferred inter-processor interrupts | |
JP6219445B2 (en) | Central processing unit and image processing unit synchronization mechanism | |
US11907762B2 (en) | Resource conservation for containerized systems | |
JP2015079542A (en) | Interrupt distribution scheme | |
US9842083B2 (en) | Using completion queues for RDMA event detection | |
US10489188B2 (en) | Method for reducing interrupt latency in embedded systems | |
US20210334228A1 (en) | Managing network interface controller-generated interrupts | |
JP6153991B2 (en) | Low-latency 2-level interrupt controller interface with multi-thread processor | |
TW201423361A (en) | Processor, information processing apparatus, and power consumption management method | |
JP6354333B2 (en) | Information processing apparatus and timer setting method | |
TWI512629B (en) | Apparatus and method for table driven multiple passive trip platform passive thermal management, computeing system, and computer-readable medium | |
CN110955503B (en) | Task scheduling method and device | |
US9405549B2 (en) | Deadlock avoidance method and deadlock avoidance mechanism | |
US11086658B2 (en) | System performance enhancement with SMI on multi-core systems | |
EP3855285B1 (en) | System, apparatus and method for latency monitoring and response | |
WO2020026010A2 (en) | Task execution control method, device, equipment/terminal/server and storage medium | |
US11243800B2 (en) | Efficient virtual machine memory monitoring with hyper-threading | |
US20080229310A1 (en) | Processor instruction set | |
JP6066807B2 (en) | Computer system, computer system interrupt processing program, and computer system interrupt processing method | |
JP2010140319A (en) | Semiconductor device | |
TW201428469A (en) | Priority based intelligent platform passive thermal management | |
TWI516982B (en) | Computing device and method of processing secure services for computing device | |
US20230305872A1 (en) | Efficient central processing unit overcommit for virtual machines with symmetric multi-processing | |
US20230108234A1 (en) | Synchronous labeling of operational state for workloads |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20171218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180109 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180223 |
|
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: 20180515 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180528 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6354333 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |