JP2015075836A - Execution method of virtual machine, computer program and information processing apparatus - Google Patents

Execution method of virtual machine, computer program and information processing apparatus Download PDF

Info

Publication number
JP2015075836A
JP2015075836A JP2013210409A JP2013210409A JP2015075836A JP 2015075836 A JP2015075836 A JP 2015075836A JP 2013210409 A JP2013210409 A JP 2013210409A JP 2013210409 A JP2013210409 A JP 2013210409A JP 2015075836 A JP2015075836 A JP 2015075836A
Authority
JP
Japan
Prior art keywords
time
virtual machine
application
system clock
java
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2013210409A
Other languages
Japanese (ja)
Other versions
JP6149671B2 (en
Inventor
山田 智博
Tomohiro Yamada
智博 山田
裕也 本多
Yuya Honda
裕也 本多
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.)
Sumitomo Electric Networks Inc
Original Assignee
Sumitomo Electric Networks Inc
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 Sumitomo Electric Networks Inc filed Critical Sumitomo Electric Networks Inc
Priority to JP2013210409A priority Critical patent/JP6149671B2/en
Publication of JP2015075836A publication Critical patent/JP2015075836A/en
Application granted granted Critical
Publication of JP6149671B2 publication Critical patent/JP6149671B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an execution method of a virtual machine capable of preventing an application that is executed on the virtual machine, from falling into an execution stop state even in the case where a time that the virtual machine references is changed, a computer program and an information processing apparatus.SOLUTION: In the case where each of a Web server 14 and a time synchronization application 15 operating on an operation system 11 including a system clock for counting a time sets the time of the system clock 111 by receiving a setting request of a time from a Web browser of a PC connected to a home gateway 5 or by being temporally synchronized with an NTP server connected to the Internet, Java VM 13 is re-activated for executing on the operating system 11 a Java application 12 to which a thread requesting execution of processing (e.g., Threada. sleep) corresponding to a time defining the time of the system clock 111 as a reference belongs.

Description

本発明は、オペレーティングシステム上の仮想マシンでアプリケーションを実行する情報処理装置における仮想マシンの実行方法、コンピュータプログラム及び情報処理装置に関する。   The present invention relates to a virtual machine execution method, a computer program, and an information processing apparatus in an information processing apparatus that executes an application in a virtual machine on an operating system.

近年、画像、音声、動画像等のマルチメディアデータを利用した拡張性の高いサービスを実現する手法として、サン・マイクロシステムズ社が提唱したオブジェクト指向型言語であるJava(登録商標)環境が普及している。   In recent years, the Java (registered trademark) environment, which is an object-oriented language proposed by Sun Microsystems, has become widespread as a method for realizing highly extensible services using multimedia data such as images, sounds, and moving images. ing.

Java環境では、Java言語で記述されたソースコードに基づく中間コードで構成されたJavaアプリからの要求に応じて、例えばインターネットなどの通信媒体を介して画像データがダウンロードされ、ダウンロードされた画像がJavaアプリで用いられる。   In the Java environment, image data is downloaded via a communication medium such as the Internet in response to a request from a Java application configured with an intermediate code based on a source code described in the Java language, and the downloaded image is downloaded to the Java environment. Used in apps.

Javaアプリは、1又は複数のプロセスとして並列的に実行されるようになっており、各プロセスで生成されて実行可能となったスレッドは、JavaVMによってCPU資源が割り当てられて実行される。例えば、特定のスレッドに所定時間だけ待機する処理要求が含まれていた場合、所定時間が経過すれば、その特定のスレッドが実行可能となる(特許文献1参照)。   The Java application is executed in parallel as one or a plurality of processes, and a thread generated and executable in each process is assigned with a CPU resource and executed by the Java VM. For example, when a processing request for waiting for a predetermined time is included in a specific thread, the specific thread can be executed when the predetermined time elapses (see Patent Document 1).

特開2010−015291号公報JP 2010-015291 A

しかしながら、上述の特定のスレッドの待機中に、JavaVMが参照する時刻が変更されて変更直後に参照される時刻が変更直前に参照される時刻より前の時刻になった場合、待機の終了時刻の到来が遅れるために、そのスレッドが実行可能となるのを待ち受けている他のスレッドも待ち受け状態が継続されて、Javaアプリ全体が実質的に停止状態に陥ることがあった。   However, if the time referred to by the Java VM is changed while the specific thread is waiting, and the time referred to immediately after the change is earlier than the time referred to immediately before the change, the waiting end time Due to the delay in arrival, other threads waiting for the thread to become executable may continue to be in a standby state, and the entire Java application may be substantially stopped.

本発明は斯かる事情に鑑みてなされたものであり、その目的とするところは、仮想マシンが参照する時刻が変更された場合であっても、仮想マシン上で実行されるアプリケーションが実行停止状態に陥るのを防止することが可能な仮想マシンの実行方法、コンピュータプログラム及び情報処理装置を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to stop execution of an application executed on a virtual machine even when the time referred to by the virtual machine is changed. An object of the present invention is to provide a virtual machine execution method, a computer program, and an information processing apparatus that can prevent the user from falling into a computer.

本発明に係る仮想マシンの実行方法は、時刻を計時するシステム時計を有するオペレーティングシステム上でアプリケーションを実行する仮想マシンを備え、前記アプリケーションに属するスレッドが、前記システム時計の時刻を基準とする時間に応じた処理の実行を前記仮想マシンに要求する情報処理装置における前記仮想マシンの実行方法において、前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行し、前記時刻設定アプリケーションが前記時刻を設定した場合、前記仮想マシンを再起動させることを特徴とする。   An execution method of a virtual machine according to the present invention includes a virtual machine that executes an application on an operating system having a system clock that measures time, and a thread belonging to the application has a time based on the time of the system clock. In the virtual machine execution method in the information processing apparatus that requests the virtual machine to execute a corresponding process, a time setting application for setting the time of the system clock is executed on the operating system, and the time setting application is When the time is set, the virtual machine is restarted.

本発明に係る仮想マシンの実行方法は、前記仮想マシンは、JavaVMであることを特徴とする。   The virtual machine execution method according to the present invention is characterized in that the virtual machine is a Java VM.

本発明に係る仮想マシンの実行方法は、前記処理は、Thread.sleepであることを特徴とする。   In the virtual machine execution method according to the present invention, the process is performed by thread. It is a sleep.

本発明に係る仮想マシンの実行方法は、前記情報処理装置をインターネットに接続するためのインタフェースを用意し、前記時刻設定アプリケーションは、前記時刻を前記インターネットに接続されたNTPサーバに同期させて設定することを特徴とする。   The virtual machine execution method according to the present invention provides an interface for connecting the information processing apparatus to the Internet, and the time setting application sets the time in synchronization with an NTP server connected to the Internet. It is characterized by that.

本発明に係る仮想マシンの実行方法は、前記情報処理装置をネットワークに接続するためのインタフェースを用意し、前記時刻設定アプリケーションは、前記インタフェースを介してウェブブラウザからアクセスされるウェブアプリケーションであり、該ウェブアプリケーションは、前記ウェブブラウザからの時刻の設定要求を受け付けて前記時刻を設定することを特徴とする。   The virtual machine execution method according to the present invention provides an interface for connecting the information processing apparatus to a network, and the time setting application is a web application accessed from a web browser via the interface, The web application receives the time setting request from the web browser and sets the time.

本発明に係る仮想マシンの実行方法は、前記仮想マシンが再起動した場合、前記ウェブアプリケーションは、前記ウェブブラウザに所定の情報を送信することを特徴とする。   The virtual machine execution method according to the present invention is characterized in that, when the virtual machine is restarted, the web application transmits predetermined information to the web browser.

本発明に係る仮想マシンの実行方法は、前記情報処理装置に光源を接続するためのインタフェースを用意し、前記光源の点灯を制御する光源制御アプリケーションを前記オペレーティングシステム上で実行し、前記仮想マシンが再起動した場合、前記光源制御アプリケーションは、前記光源を点灯又は点滅させることを特徴とする。   An execution method of a virtual machine according to the present invention provides an interface for connecting a light source to the information processing apparatus, executes a light source control application for controlling lighting of the light source on the operating system, and the virtual machine When restarting, the light source control application turns on or blinks the light source.

本発明に係るコンピュータプログラムは、時刻を計時するシステム時計を有するオペレーティングシステムを備えるコンピュータに、前記システム時計の時刻を基準とする時間に応じた処理の実行を要求するスレッドが属するアプリケーションを前記オペレーティングシステム上の仮想マシン上で実行させるコンピュータプログラムにおいて、コンピュータに、前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行させるステップと、前記時刻設定アプリケーションが前記時刻を設定した場合、コンピュータに、前記仮想マシンを再起動させるステップとを実行させることを特徴とする。   The computer program according to the present invention provides an operating system to which an application to which a thread that requests execution of processing according to time based on the time of the system clock belongs to a computer having an operating system having a system clock for measuring time. In the computer program to be executed on the upper virtual machine, the step of causing the computer to execute a time setting application for setting the time of the system clock on the operating system, and when the time setting application sets the time, the computer And a step of restarting the virtual machine.

本発明に係る情報処理装置は、時刻を計時するシステム時計を有するオペレーティングシステム上でアプリケーションを実行する仮想マシンを備え、前記アプリケーションに属するスレッドが、前記システム時計の時刻を基準とする時間に応じた処理の実行を前記仮想マシンに要求する情報処理装置において、前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行する手段と、前記時刻設定アプリケーションが前記時刻を設定した場合、前記仮想マシンを再起動させる手段とを備えることを特徴とする。   An information processing apparatus according to the present invention includes a virtual machine that executes an application on an operating system having a system clock that measures time, and a thread belonging to the application responds to a time based on the time of the system clock. In the information processing apparatus that requests the virtual machine to execute processing, a means for executing a time setting application for setting the time of the system clock on the operating system, and when the time setting application sets the time, Means for restarting the virtual machine.

本発明にあっては、時刻を計時するシステム時計を有するオペレーティングシステム上で動作する時刻設定アプリケーションが、システム時計の時刻を設定した場合、システム時計の時刻(即ち、システム時計が計時する時刻)を基準とする時間に応じた処理の実行を要求するスレッドが属するアプリケーションをオペレーティングシステム上で実行する仮想マシンを再起動させる。
つまり、仮想マシンがオペレーティングシステムを介してシステム時計の時刻を参照しており、仮想マシンがスレッドから要求された処理を実行する上で基準となる時刻が変更された場合に、仮想マシンが再起動してアプリケーションの実行が初期化される。
In the present invention, when a time setting application operating on an operating system having a system clock for measuring time sets the time of the system clock, the time of the system clock (that is, the time measured by the system clock) is set. A virtual machine that executes on the operating system an application to which a thread that requests execution of processing according to a reference time belongs is restarted.
In other words, if the virtual machine refers to the time of the system clock via the operating system and the virtual machine changes the reference time for executing the processing requested by the thread, the virtual machine is restarted Then, the execution of the application is initialized.

本発明にあっては、アプリケーションを実行する仮想マシンがJavaVMであり、システム時計の時刻が変更された場合であっても、JavaVMが実行するJavaアプリが実行停止状態となることが防止される。   In the present invention, even if the virtual machine that executes the application is the Java VM and the time of the system clock is changed, the Java application that is executed by the Java VM is prevented from being stopped.

本発明にあっては、システム時計の時刻を基準とする時間に応じた処理がThread.sleep関数であり、システム時計の時刻が設定されて変更された場合であっても、関数から要求された時間以上にスレッドの停止が長くなることが防止される。   In the present invention, the processing according to the time based on the time of the system clock is Thread. Even if it is a sleep function and the time of the system clock is set and changed, it is possible to prevent the thread from being stopped longer than the time requested by the function.

本発明にあっては、時刻設定アプリケーションにより、システム時計の時刻をインターネットに接続されたNTPサーバに同期させる。
これにより、システム時計の時刻がNTPサーバに同期したときに、JavaVMが再起動する。
In the present invention, the time of the system clock is synchronized with the NTP server connected to the Internet by the time setting application.
Thereby, when the time of the system clock is synchronized with the NTP server, the Java VM is restarted.

本発明にあっては、ネットワークに接続するためのインタフェースを介してウェブブラウザからアクセスされるウェブアプリケーションがウェブブラウザからの時刻の設定要求を受け付けて、システム時計の時刻を設定する。
これにより、システム時計の時刻が、ウェブブラウザからの要求によって設定されたときに、JavaVMが再起動する。
In the present invention, a web application accessed from a web browser via an interface for connecting to a network receives a time setting request from the web browser and sets the time of the system clock.
Thereby, when the time of the system clock is set by a request from the web browser, the Java VM is restarted.

本発明にあっては、仮想マシンが再起動した場合、前記ウェブアプリケーションが、自身にアクセスするウェブブラウザに所定の情報を送信する。
これにより、ウェブブラウザを操作する使用者に対して、仮想マシンが再起動した旨が報知される。
In the present invention, when the virtual machine is restarted, the web application transmits predetermined information to a web browser that accesses the virtual machine.
This notifies the user who operates the web browser that the virtual machine has been restarted.

本発明にあっては、仮想マシンが再起動した場合、オペレーティングシステム上で動作する光源制御アプリケーションによって、所定のインタフェースに接続された光源を点灯又は点滅させる。
これにより、光源の周囲に居る使用者に対して、仮想マシンが再起動した旨が報知される。
In the present invention, when the virtual machine is restarted, the light source connected to the predetermined interface is turned on or blinked by the light source control application operating on the operating system.
This notifies the user around the light source that the virtual machine has been restarted.

本発明によれば、仮想マシンがオペレーティングシステムを介してシステム時計の時刻を参照しており、仮想マシンがスレッドから要求された処理を実行する上で基準となる時刻が変更された場合に、仮想マシンが再起動してアプリケーションの実行が初期化される。
従って、仮想マシンが参照する時刻が変更された場合であっても、仮想マシン上で実行されるアプリケーションが実行停止状態に陥るのを防止することが可能となる。
According to the present invention, when the virtual machine refers to the time of the system clock via the operating system and the virtual machine changes the reference time for executing the processing requested by the thread, the virtual machine The machine restarts and application execution is initialized.
Therefore, even when the time referred to by the virtual machine is changed, it is possible to prevent the application executed on the virtual machine from entering an execution stop state.

本発明に係る情報処理装置を備えるホームエネルギーマネジメントシステムの構成を示すブロック図である。It is a block diagram which shows the structure of a home energy management system provided with the information processing apparatus which concerns on this invention. 情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of information processing apparatus. Javaアプリに属するスレッドのソースコードの例示図である。It is an illustration figure of the source code of the thread which belongs to a Java application. Webサーバによってシステム時計の時刻を設定するCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which sets the time of a system clock by a Web server. 時刻同期アプリによってシステム時計の時刻を設定するCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which sets the time of a system clock by a time synchronization application. アプリケーション管理部によってJavaVMを再起動させるCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which restarts JavaVM by an application management part. LED制御アプリによってLEDを点滅させるCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which blinks LED by LED control application.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
図1は、本発明に係る情報処理装置を備えるホームエネルギーマネジメントシステム(Home Energy Management System ;以下、HEMSという)の構成を示すブロック図である。図中1は情報処理装置であり、情報処理装置1は、NTP(Network Time Protocol )サーバ3が接続されたインターネット4に、ブロードバンドルータの機能を有するホームゲートウェイ5を介して接続される。ホームゲートウェイ5には、パーソナルコンピュータ(以下、PCという)2が接続されている。PC2は、例えばインターネット4に接続されるものであってもよいし、無線通信回線(不図示)を介して接続されるスマートフォン等の携帯電話であってもよい。
Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof.
FIG. 1 is a block diagram showing a configuration of a home energy management system (Home Energy Management System; hereinafter referred to as HEMS) including an information processing apparatus according to the present invention. In the figure, reference numeral 1 denotes an information processing apparatus. The information processing apparatus 1 is connected to the Internet 4 to which an NTP (Network Time Protocol) server 3 is connected via a home gateway 5 having a broadband router function. A personal computer (hereinafter referred to as a PC) 2 is connected to the home gateway 5. For example, the PC 2 may be connected to the Internet 4 or may be a mobile phone such as a smartphone connected via a wireless communication line (not shown).

情報処理装置1には、後述するUSBインタフェース22,22によってUSB無線トランスミッタ/レシーバ(以下、USBT/Rと称し、図ではT/Rで示す)6,6が接続されている。USBT/R6,6の夫々と、分電盤7及び窓8に配されたセンサ9,9とは、無線による通信が可能に構成されている。分電盤7に配されたセンサ9は、家庭の使用電力を検出したり、電力回路を開閉したりするものである。また、窓8に配されたセンサ9は、窓8の周囲の明るさを検出したり、室内への人の侵入を検出したりするものである。   Connected to the information processing apparatus 1 are USB wireless transmitter / receivers (hereinafter referred to as USB T / R, indicated by T / R in the figure) 6 and 6 by USB interfaces 22 and 22 described later. Each of the USBT / Rs 6 and 6 and the sensors 9 and 9 disposed on the distribution board 7 and the window 8 are configured to be able to perform wireless communication. A sensor 9 disposed on the distribution board 7 detects household power consumption and opens and closes a power circuit. The sensor 9 disposed in the window 8 detects the brightness around the window 8 and detects the intrusion of a person into the room.

上述したHEMSの構成において、情報処理装置1は、USBT/R6,6によってセンサ9,9の夫々から電力データ及び照度データを収集して使用電力量の集計を行うと共に、図示しない室内照明の輝度を照度データに応じて制御する。情報処理装置1は、また、ホームサーバの機能を備えており、例えば、PC2に搭載されたブラウザからアクセスされた場合、アクセス元のブラウザに家庭の使用電力量のグラフを表示させたり、ブラウザからの制御によって室内の電気製品の電源をオンオフさせたりすることができる。更に、窓8から人が侵入した場合、図示しない携帯電話に発報することもできる。   In the HEMS configuration described above, the information processing apparatus 1 collects power data and illuminance data from the sensors 9 and 9 by the USBT / Rs 6 and 6 and totals the amount of power used. Is controlled according to the illuminance data. The information processing apparatus 1 also has a home server function. For example, when accessed from a browser installed in the PC 2, the home power consumption graph is displayed on the browser of the access source, or from the browser. The power of indoor electric products can be turned on and off by the control. Further, when a person enters through the window 8, it can be notified to a mobile phone (not shown).

次に、情報処理装置1の主要部の構成及び機能について説明する。
図2は、情報処理装置1の構成を示すブロック図である。情報処理装置1は、ソフトウェア(以下、S/Wという)による機能ブロックを実現するCPU10と、該CPU10の周辺ハードウェア(以下、H/Wという)20とを備える。
Next, the configuration and function of the main part of the information processing apparatus 1 will be described.
FIG. 2 is a block diagram illustrating a configuration of the information processing apparatus 1. The information processing apparatus 1 includes a CPU 10 that implements a functional block using software (hereinafter referred to as S / W) and peripheral hardware (hereinafter referred to as H / W) 20 of the CPU 10.

S/Wによる機能ブロックは、Linux(登録商標)等のオペレーティングシステム(Operating System ;以下、OSという)11と、Javaアプリ12を実行する仮想マシンとしてのJavaVM(Java Virtual Machine )13と、サーバS/Wであるウェブサーバ(以下、Webサーバという)14と、NTPサーバ3に時刻同期するための時刻同期アプリケーション(以下、時刻同期アプリという)15と、後述するLED23の点消灯を制御するLED制御アプリケーション(光源制御アプリケーション;以下、LED制御アプリという)16とを含んで構成されている。   The functional blocks based on S / W include an operating system (hereinafter referred to as OS) 11 such as Linux (registered trademark), a Java VM (Java Virtual Machine) 13 as a virtual machine that executes the Java application 12, and a server S. / W web server (hereinafter referred to as Web server) 14, time synchronization application (hereinafter referred to as time synchronization application) 15 for time synchronization with NTP server 3, and LED control for controlling turning on / off of LED 23 described later Application (light source control application; hereinafter referred to as LED control application) 16.

OS11は、Linuxに限定されず、Windows(登録商標)等の他のOSであってもよい。仮想マシンはJavaVM13に限定されず、例えばマイクロソフト社によるドットネットフレームワーク(.Net Framework )等の他の仮想マシンであってもよい。   The OS 11 is not limited to Linux, and may be another OS such as Windows (registered trademark). The virtual machine is not limited to the Java VM 13 and may be another virtual machine such as a dot net framework (.Net Framework) by Microsoft Corporation.

JavaVM13及びLED制御アプリ16は、CPU10が実行するOS11上で動作する。Webサーバ14及び時刻同期アプリ15は、後述するシステム時計111の時刻を設定する時刻設定アプリケーションとして、CPU10が実行するOS11上で動作する。   The Java VM 13 and the LED control application 16 operate on the OS 11 executed by the CPU 10. The Web server 14 and the time synchronization application 15 operate on the OS 11 executed by the CPU 10 as a time setting application for setting the time of a system clock 111 to be described later.

周辺H/W20は、ホームゲートウェイ5に接続するためのイーサネットインタフェース(インターネット又はネットワークに接続するためのインタフェース;以下、イーサネットI/Fという;イーサネットは登録商標)21と、USBT/R6,6に接続するためのUSBインタフェース(以下、USBI/Fという)22,22と、使用者に所定の報知を行うためのLED(光源を接続するためのインタフェースを含む光源)23とを含んで構成されている。LED23は、周辺H/Wから信号ケーブルを介して外部に接続されていてもよい。イーサネットI/F21、USBI/F22,22及びLED23は、OS11に組み込まれた夫々のデバイスドライバを介してOS11から操作される。   The peripheral H / W 20 is connected to an Ethernet interface (interface for connecting to the Internet or a network; hereinafter referred to as Ethernet I / F; Ethernet is a registered trademark) 21 and USBT / R 6 and 6 to connect to the home gateway 5. USB interfaces (hereinafter referred to as USB I / F) 22 and 22 and LEDs (light sources including an interface for connecting a light source) 23 for performing predetermined notification to the user are configured. . The LED 23 may be connected to the outside from the peripheral H / W via a signal cable. The Ethernet I / F 21, USB I / Fs 22 and 22, and the LED 23 are operated from the OS 11 via respective device drivers incorporated in the OS 11.

OS11は、周辺H/W20に含まれる図示しないリアルタイムクロックから起動時に取得した時刻情報に基づいて時刻を計時するシステム時計111と、OS11上で動作する各アプリケーションの起動、停止、再起動等を管理するアプリケーション管理部112とを含んでなる。各アプリケーションによるシステム時計111からの時刻の読み出しは、OS11に対するシステムコールによって行う。即ち、OS11は、時刻情報を取得するシステムコールがあった場合、システム時計111が計時する時刻を読み出してシステムコールのリターン値に設定する。   The OS 11 manages a system clock 111 that measures time based on time information acquired at the time of startup from a real time clock (not shown) included in the peripheral H / W 20, and activation, stop, restart, and the like of each application that operates on the OS 11. Application management unit 112. Reading of the time from the system clock 111 by each application is performed by a system call to the OS 11. That is, when there is a system call for acquiring time information, the OS 11 reads the time counted by the system clock 111 and sets it as the return value of the system call.

Javaアプリ12は、上述したHEMSのホームサーバの機能を実現するものであり、USBT/R6,6及びUSBI/F22,22を介してセンサ9,9と通信すると共に、ホームゲートウェイ5を介してPC2と通信する。Javaアプリ12は、Java言語で記述されたソースコードに基づく中間コードで構成されたアプリケーションである。   The Java application 12 realizes the function of the above-described HEMS home server. The Java application 12 communicates with the sensors 9 and 9 via the USBT / Rs 6 and 6 and the USB I / Fs 22 and 22, and the PC 2 via the home gateway 5. Communicate with. The Java application 12 is an application configured with an intermediate code based on a source code described in the Java language.

図3は、Javaアプリ12に属するスレッドのソースコードの例示図である。Java言語で記述されたソースコードは、予めコンパイルされ、中間コードに変換されて実機に実装される。図中Thread.sleep(5000)は、スリープ関数である。スリープ関数は、「システム時計111の時刻を基準とする時間に応じた処理の実行をJavaVM13に要求する」関数の1つである。Thread.sleep(5000)は、この関数をコールしたスレッドを5000ms間停止(以下、スリープという)させることを要求するものである。   FIG. 3 is an exemplary diagram of source code of threads belonging to the Java application 12. The source code written in the Java language is compiled in advance, converted into intermediate code, and mounted on the actual machine. In the figure, Thread. sleep (5000) is a sleep function. The sleep function is one of the functions “requests the Java VM 13 to execute processing according to the time based on the time of the system clock 111”. Thread. The sleep (5000) requests that the thread that has called this function be stopped for 5000 ms (hereinafter referred to as sleep).

「システム時計111の時刻を基準とする時間に応じた処理の実行をJavaVM13に要求する」関数は、Thread.sleep()に限定されるものではなく、例えばThread.join()、Object.wait()等のタイムアウトのパラメータを伴う他の関数であってもよい。   The “request Java VM 13 to execute processing according to the time based on the time of the system clock 111” function is a thread. It is not limited to sleep (). For example, Thread. join (), Object. Another function with a timeout parameter such as wait () may be used.

図2に戻って、JavaVM13は、Javaアプリ12を構成する中間コードを逐次解釈し、CPU10が実行可能な機械語に変換して実行する。JavaVM13のこの機能によって、特定のOSやプロセッサに依存することなく、いかなるプラットフォームであってもJavaアプリ12が実行可能な環境が実現される。   Returning to FIG. 2, the Java VM 13 sequentially interprets the intermediate code constituting the Java application 12, converts it into a machine language that can be executed by the CPU 10, and executes it. This function of the Java VM 13 realizes an environment in which the Java application 12 can be executed on any platform without depending on a specific OS or processor.

JavaVM13は、Javaアプリ12からシステム時計111の時刻を基準とする時間に応じた処理の実行を要求された場合に、要求された処理の実行に係る時刻を記憶するための時刻情報記憶部131を含んでなる。例えばThread.sleep(t)がコールされた場合、JavaVM13は、システム時計111から時刻を読み出し、読み出した時刻に時間t(ms)を加算した時刻を時刻情報記憶部131に記憶し、記憶した時刻が到来した時に、Thread.sleep(t)をコールしたスレッドの実行を再開する。   When the Java VM 13 requests the Java application 12 to execute a process according to the time based on the time of the system clock 111, the Java VM 13 stores a time information storage unit 131 for storing the time related to the execution of the requested process. Comprising. For example, Thread. When sleep (t) is called, the Java VM 13 reads the time from the system clock 111, stores the time obtained by adding the time t (ms) to the read time in the time information storage unit 131, and the stored time has arrived. Sometimes Thread. Resume execution of the thread that called sleep (t).

Webサーバ14は、時刻設定等のWebユーザインタフェース画面を提供するプログラムが組み込まれたWebアプリケーションであり、PC2とホームゲートウェイ5及びイーサネットI/F21を介して通信する。時刻設定のプログラムは、PC2に搭載されたブラウザからのWebサーバ14へのアクセスに伴って起動され、Webサーバ14と一体となって動作する。Webサーバ14は、ブラウザから時刻の設定要求を受信してシステム時計111に時刻を設定した場合、アプリケーション管理部112にJavaVM13の再起動を要求する。   The Web server 14 is a Web application in which a program for providing a Web user interface screen such as time setting is incorporated, and communicates with the PC 2 via the home gateway 5 and the Ethernet I / F 21. The time setting program is activated when the browser installed in the PC 2 accesses the Web server 14 and operates together with the Web server 14. When the Web server 14 receives a time setting request from the browser and sets the time in the system clock 111, the Web server 14 requests the application management unit 112 to restart the Java VM 13.

時刻同期アプリ15は、設定された時刻が到来した時に、インターネット4に接続されたNTPサーバ3と、ホームゲートウェイ5及びイーサネットI/F21を介して通信し、NTPプロトコル又はSNTPプロトコルを実行してシステム時計111の時刻をNTPサーバ3の時刻に同期させた場合、アプリケーション管理部112にJavaVM13の再起動を要求する。   When the set time arrives, the time synchronization application 15 communicates with the NTP server 3 connected to the Internet 4 via the home gateway 5 and the Ethernet I / F 21, and executes the NTP protocol or the SNTP protocol. When the time of the clock 111 is synchronized with the time of the NTP server 3, the application management unit 112 is requested to restart the Java VM 13.

ここで、Webサーバ14がシステム時計に時刻を設定したり、時刻同期アプリ15がシステム時計111の時刻をNPTサーバ3の時刻に同期させたりすることによって、システム時計111の時刻が該システム時計111に対する時刻の設定又は同期が行われる直前に参照される時刻より前の時刻に変更された時に、たまたまスレッドがThread.sleep(t)をコールしてスリープ中であった場合、システム時計111の時刻が過去に遡った分だけスレッドのスリープ時間が延長されることとなる。つまり、システム時計111の時刻が変更前の時刻に追いつくまで、スリープ中のスレッドを含むJavaアプリ12が、見かけ上全く動作できない状態が長時間続く可能性がある。   Here, when the Web server 14 sets the time in the system clock, or the time synchronization application 15 synchronizes the time of the system clock 111 with the time of the NPT server 3, the time of the system clock 111 is changed to the system clock 111. When the thread is changed to a time before the time that is referenced immediately before setting or synchronization is performed, the thread happens to be threaded. When sleep (t) is called and the system is sleeping, the sleep time of the thread is extended by the amount that the time of the system clock 111 is traced back to the past. In other words, until the time of the system clock 111 catches up to the time before the change, there is a possibility that the Java application 12 including the sleeping thread may not be able to operate at all for a long time.

これとは逆にシステム時計111の時刻が該システム時計111に対する時刻の設定又は同期が行われる直前に参照される時刻より先の時刻に変更された場合は、システム時計111の時刻が進んだ分だけスレッドのスリープ時間が短縮されることとなり、スレッドの動作が不自然になる。一方、Webサーバ14によってシステム時計111の時刻が変更されて変更直後に参照される時刻が変更直前に参照される時刻より先の時刻になった後に、時刻同期アプリ15によってシステム時計111の時刻が正しく修正された場合は、結果的にシステム時計111の時刻が過去に引き戻される。よってこの場合にも、Webサーバ14によってシステム時計111の時刻が変更されて変更直後に参照される時刻が変更直前に参照される時刻より前の時刻に変更された場合と同じ問題が発生する。   On the contrary, when the time of the system clock 111 is changed to a time earlier than the time referred to immediately before the time setting or synchronization with the system clock 111 is performed, the time by which the time of the system clock 111 is advanced. As a result, the sleep time of the thread is shortened, and the operation of the thread becomes unnatural. On the other hand, after the time of the system clock 111 is changed by the Web server 14 and the time referred to immediately after the change is earlier than the time referred to immediately before the change, the time of the system clock 111 is changed by the time synchronization application 15. If correct, the time of the system clock 111 is pulled back to the past. Therefore, in this case as well, the same problem occurs when the time of the system clock 111 is changed by the Web server 14 and the time referred to immediately after the change is changed to a time before the time referred to immediately before the change.

そこで、本発明では、システム時計111の時刻が変更された場合に、JavaVM13の再起動が要求される。より好ましくは、Webサーバ14によってシステム時計111の時刻が設定されて設定直後に参照される時刻が設定直前に参照される時刻より前の時刻になった場合、及び過去の時刻を計時しているシステム時計111が時刻同期アプリ15によってNTPサーバ3に時刻同期した場合、JavaVM13の再起動が要求されるようにする。   Therefore, in the present invention, when the time of the system clock 111 is changed, restart of the Java VM 13 is requested. More preferably, when the time of the system clock 111 is set by the Web server 14 and the time referred to immediately after the setting is a time before the time referred to immediately before the setting, the past time is counted. When the system clock 111 is time-synchronized with the NTP server 3 by the time synchronization application 15, the restart of the Java VM 13 is requested.

アプリケーション管理部112は、Webサーバ14又は時刻同期アプリ15からJavaVM13の再起動を要求された場合、JavaVM13を再起動させると共に、その旨をWebサーバ14及びLED制御アプリ16に通知する。   When the restart of the Java VM 13 is requested from the Web server 14 or the time synchronization application 15, the application management unit 112 restarts the Java VM 13 and notifies the Web server 14 and the LED control application 16 to that effect.

LED制御アプリ16は、JavaVM13が再起動した旨が通知された場合、LED23を点滅させる。この場合、LED23が任意の点灯パターンで点灯するようにしてもよい。   When notified that the Java VM 13 has been restarted, the LED control application 16 causes the LED 23 to blink. In this case, the LED 23 may be lit with an arbitrary lighting pattern.

以下では、上述したS/Wの機能ブロックの動作を、それを示すフローチャートを用いて説明する。以下に示す処理は、周辺H/W20に含まれる図示しないROMに予め格納されている制御プログラムに従って、CPU10により実行される。以下に示す処理で授受される情報又は信号は、図2にて矢印付き実線で示されるものである。   Hereinafter, the operation of the above-described S / W functional block will be described with reference to a flowchart showing the operation. The processing shown below is executed by the CPU 10 in accordance with a control program stored in advance in a ROM (not shown) included in the peripheral H / W 20. Information or signals exchanged in the following processing are shown by solid lines with arrows in FIG.

先ず、Webサーバ14が介在してシステム時計111の時刻が設定される場合について説明する。
図4は、Webサーバ14によってシステム時計111の時刻を設定するCPU10の処理手順を示すフローチャートである。図4の処理は、外部のブラウザからのアクセスが可能になった場合に適時起動される。ここでは、簡単のために、Webサーバ14が時刻設定画面へのアクセスのみを受け付けるものとする。
First, a case where the time of the system clock 111 is set through the Web server 14 will be described.
FIG. 4 is a flowchart showing a processing procedure of the CPU 10 for setting the time of the system clock 111 by the Web server 14. The process of FIG. 4 is activated in a timely manner when access from an external browser becomes possible. Here, for simplicity, it is assumed that the Web server 14 only accepts access to the time setting screen.

図4の処理が起動された場合、CPU10は、例えばHTTPリクエスト等によるWebサーバ14へのアクセスが有ったか否かを判定し(S10)、アクセスが有るまで待機する(S10:NO)。アクセスが有った場合(S10:YES)、CPU10は、HTTPリクエスト等に含まれるURLが、時刻設定画面へのアクセスを示すものであるか否かを判定し(S11)、時刻設定画面へのアクセスを示すものではない場合(S11:NO)、処理をステップS10に移してWebサーバへのアクセスを待ち受ける。   When the process of FIG. 4 is started, the CPU 10 determines whether or not there is an access to the Web server 14 by, for example, an HTTP request (S10), and waits until there is an access (S10: NO). When there is access (S10: YES), the CPU 10 determines whether or not the URL included in the HTTP request or the like indicates access to the time setting screen (S11). If the access is not indicated (S11: NO), the process proceeds to step S10 to wait for access to the Web server.

URLが時刻設定画面へのアクセスを示すものである場合(S11:YES)、CPU10は、システム時計111の時刻を読み出し(S12)、読み出した時刻が表示された時刻設定画面(Webユーザインタフェース画面)を生成し(S13)、生成した画面の画面データをアクセス元のブラウザに送信する(S14)。   When the URL indicates access to the time setting screen (S11: YES), the CPU 10 reads the time of the system clock 111 (S12), and the time setting screen (Web user interface screen) on which the read time is displayed. Is generated (S13), and the screen data of the generated screen is transmitted to the access source browser (S14).

その後、CPU10は、アクセス元のブラウザから時刻の設定要求を受信したか否かを判定し(S15)、時刻の設定要求を受信するまで待機する(S15:NO)。時刻の設定要求を受信した場合(S15:YES)、CPU10は、システム時計111に対して時刻の設定要求に含まれる時刻を設定し(S16)、更にアプリケーション管理部112に対してJavaVM13の再起動を要求する(S17)。   Thereafter, the CPU 10 determines whether or not a time setting request is received from the access source browser (S15), and waits until a time setting request is received (S15: NO). When the time setting request is received (S15: YES), the CPU 10 sets the time included in the time setting request to the system clock 111 (S16), and further restarts the Java VM 13 to the application management unit 112. Is requested (S17).

ステップS16では、システム時計111の時刻が設定されて設定直後に参照される時刻が設定直前に参照される時刻より前の時刻になった場合にステップS17の処理に移るようにし、そうでない場合に図4の処理を終了することが好ましい。これにより、スリープ中のスレッドを含むJavaアプリ12が見かけ上全く動作できない状態が、長時間続くのを効果的に防止することができる。   In step S16, when the time of the system clock 111 is set and the time referred to immediately after the setting is a time before the time referred to immediately before the setting, the process proceeds to step S17. It is preferable to end the process of FIG. As a result, it is possible to effectively prevent a state in which the Java application 12 including the sleeping thread cannot operate at all for a long time.

その後、CPU10は、アプリケーション管理部112からJavaVM13の再起動通知が有ったか否かを判定し(S18)、再起動通知が有るまで待機する(S18:NO)。JavaVM13の再起動通知が有った場合(S18:YES)、CPU10は、アクセス元のブラウザに提供している時刻設定画面上に、例えばポップアップで表示される再起動の報知画面を生成し(S19)、生成した画面の画面データをアクセス元のブラウザに送信して(S20)図4の処理を終了する。   Thereafter, the CPU 10 determines whether or not there is a restart notification of the Java VM 13 from the application management unit 112 (S18), and waits until there is a restart notification (S18: NO). When there is a restart notification of the Java VM 13 (S18: YES), the CPU 10 generates a restart notification screen displayed, for example, in a pop-up on the time setting screen provided to the access source browser (S19). The screen data of the generated screen is transmitted to the access source browser (S20), and the processing of FIG.

次に、時刻同期アプリ15が介在してシステム時計111の時刻が設定される場合について説明する。
図5は、時刻同期アプリ15によってシステム時計111の時刻を設定するCPU10の処理手順を示すフローチャートである。図5の処理は、例えば1秒毎に起動されるが、これに限定されるものではない。NTPサーバ3に同期すべき時刻(より具体的には、時刻同期処理を実行すべき時刻)は、周辺H/W20に含まれる図示しないRAMに設定されているものとする。
Next, a case where the time of the system clock 111 is set through the time synchronization application 15 will be described.
FIG. 5 is a flowchart showing a processing procedure of the CPU 10 for setting the time of the system clock 111 by the time synchronization application 15. The processing in FIG. 5 is started, for example, every second, but is not limited thereto. It is assumed that the time to be synchronized with the NTP server 3 (more specifically, the time to perform the time synchronization process) is set in a RAM (not shown) included in the peripheral H / W 20.

図5の処理が起動された場合、CPU10は、システム時計111の時刻を読み出し(S21)、読み出した時刻によって、RAMに設定されているNTPサーバ3に同期すべき時刻が到来したか否かを判定し(S22)、その時刻が到来していない場合(S22:NO)、その他の処理を行わずに図5の処理を終了する。   When the process of FIG. 5 is activated, the CPU 10 reads the time of the system clock 111 (S21), and determines whether or not the time to be synchronized with the NTP server 3 set in the RAM has come by the read time. If it is determined (S22) and the time has not arrived (S22: NO), the process of FIG. 5 is terminated without performing other processes.

NTPサーバ3に同期すべき時刻が到来した場合(S22:YES)、CPU10は、NTPプロトコル(又はSNTPプロトコル)を実行して(S23)時刻合わせを行うことにより、システム時計111に対して時刻を設定し(S24)、更にアプリケーション管理部112に対してJavaVM13の再起動を要求して(S25)図5の処理を終了する。   When the time to synchronize with the NTP server 3 has arrived (S22: YES), the CPU 10 executes the NTP protocol (or SNTP protocol) (S23) to adjust the time to the system clock 111. Then, the application management unit 112 is requested to restart the Java VM 13 (S25), and the processing in FIG. 5 is terminated.

ステップS24では、システム時計111の時刻が設定されて設定直後に参照される時刻が設定直前に参照される時刻より前の時刻になった場合にステップS25の処理に移るようにし、そうでない場合に図5の処理を終了することが好ましい。これにより、スリープ中のスレッドを含むJavaアプリ12が見かけ上全く動作できない状態が、長時間続くのを効果的に防止することができる。   In step S24, when the time of the system clock 111 is set and the time referred to immediately after the setting is a time before the time referred to immediately before the setting, the process proceeds to step S25. It is preferable to end the process of FIG. As a result, it is possible to effectively prevent a state in which the Java application 12 including the sleeping thread cannot operate at all for a long time.

次に、JavaVM13を再起動させる処理について説明する。
図6は、アプリケーション管理部112によってJavaVM13を再起動させるCPU10の処理手順を示すフローチャートである。図6の処理は、JavaVM13が最初に起動された後、適時起動される。
Next, processing for restarting the Java VM 13 will be described.
FIG. 6 is a flowchart showing a processing procedure of the CPU 10 for restarting the Java VM 13 by the application management unit 112. The processing in FIG. 6 is started in a timely manner after the Java VM 13 is first started.

図6の処理が起動された場合、CPU10は、JavaVM13を再起動させる要求が有ったか否かを判定し(S31)、再起動の要求が有るまで待機する(S31:NO)。JavaVM13を再起動させる要求があった場合(S31:YES)、CPU10は、JavaVM13を再起動させる(S32;図2では矢印付きの破線で示す)。   When the processing of FIG. 6 is activated, the CPU 10 determines whether or not there is a request for restarting the Java VM 13 (S31), and waits until there is a request for restart (S31: NO). When there is a request to restart the Java VM 13 (S31: YES), the CPU 10 restarts the Java VM 13 (S32; shown by a broken line with an arrow in FIG. 2).

次いで、CPU10は、LED制御アプリ16に対してJavaVM13の再起動を通知する(S33)と共に、Webサーバ14に対してJavaVM13の再起動を通知して(S34)図6の処理を終了する。   Next, the CPU 10 notifies the LED control application 16 of the restart of the Java VM 13 (S33), and notifies the Web server 14 of the restart of the Java VM 13 (S34), and ends the processing of FIG.

最後に、LED23を点滅させる処理について説明する。
図7は、LED制御アプリ16によってLED23を点滅させるCPU10の処理手順を示すフローチャートである。図7の処理は、JavaVM13が起動しており、LED23が消灯している状態で適時起動される。
Finally, a process for blinking the LED 23 will be described.
FIG. 7 is a flowchart showing a processing procedure of the CPU 10 for causing the LED control application 16 to blink the LED 23. The processing in FIG. 7 is activated in a timely manner with the Java VM 13 activated and the LED 23 turned off.

図7の処理が起動された場合、CPU10は、アプリケーション管理部112からJavaVM13の再起動通知が有ったか否かを判定し(S41)、再起動通知が有るまで待機する(S41:NO)。JavaVM13の再起動通知が有った場合(S41:YES)、CPU10は、LED23を点滅させて(S42)図7の処理を終了する。   When the process of FIG. 7 is started, the CPU 10 determines whether or not there is a restart notification of the Java VM 13 from the application management unit 112 (S41), and waits until there is a restart notification (S41: NO). When there is a restart notification of the Java VM 13 (S41: YES), the CPU 10 causes the LED 23 to blink (S42) and ends the process of FIG.

以上のように本実施の形態によれば、時刻を計時するシステム時計111を有するオペレーティングシステム11上で動作する時刻設定アプリケーションが、システム時計111に時刻を設定した場合、システム時計111の時刻を基準とする時間に応じた処理(Thread.sleep)の実行を要求するスレッドが属するアプリケーション(Javaアプリ12)をオペレーティングシステム11上で実行する仮想マシン(JavaVM13)を再起動させる。
つまり、JavaVM13がオペレーティングシステム11を介してシステム時計111の時刻を参照しており、JavaVM13がスレッドから要求された処理を実行する上で基準となる時刻が変更された場合に、JavaVM13が再起動してJavaアプリ12の実行が初期化される。
従って、仮想マシンが参照する時刻が変更された場合であっても、仮想マシン上で実行されるアプリケーションが実行停止状態に陥るのを防止することが可能となる。
As described above, according to the present embodiment, when a time setting application operating on the operating system 11 having the system clock 111 that measures time sets the time in the system clock 111, the time of the system clock 111 is used as a reference. The virtual machine (Java VM 13) that executes on the operating system 11 the application (Java application 12) to which the thread that requests the execution of the process according to the time (Thread.sleep) to belong belongs is restarted.
In other words, when the Java VM 13 refers to the time of the system clock 111 via the operating system 11 and the Java VM 13 changes the reference time for executing the processing requested by the thread, the Java VM 13 is restarted. As a result, the execution of the Java application 12 is initialized.
Therefore, even when the time referred to by the virtual machine is changed, it is possible to prevent the application executed on the virtual machine from entering an execution stop state.

また、アプリケーションを実行する仮想マシンがJavaVM13であり、システム時計111の時刻が変更された場合であっても、JavaVM13が実行するJavaアプリ12が実行停止状態となることを防止することが可能となる。   Further, even when the virtual machine that executes the application is the Java VM 13 and the time of the system clock 111 is changed, it is possible to prevent the Java application 12 that is executed by the Java VM 13 from being stopped. .

更に、システム時計111の時刻を基準とする時間に応じた処理がThread.sleep関数であり、システム時計111の時刻が設定されて変更された場合であっても、この関数から要求された時間以上にスレッドの停止が長くなるのを防止することが可能となる。   Further, processing according to the time based on the time of the system clock 111 is Thread. Even if it is a sleep function and the time of the system clock 111 is set and changed, it is possible to prevent the thread from stopping longer than the time requested by this function.

更にまた、時刻設定アプリケーション(時刻同期アプリ15)により、システム時計111の時刻をインターネット4に接続されたNTPサーバ3に同期させる。
従って、システム時計111の時刻がNTPサーバ3に同期したときに、JavaVM13を再起動させることが可能となる。
Furthermore, the time of the system clock 111 is synchronized with the NTP server 3 connected to the Internet 4 by the time setting application (time synchronization application 15).
Accordingly, the Java VM 13 can be restarted when the time of the system clock 111 is synchronized with the NTP server 3.

更にまた、ネットワークに接続するためのイーサネットインタフェース21を介してPC2のWebブラウザからアクセスされるWebアプリケーション(Webサーバ14)がWebブラウザからの時刻の設定要求を受け付けて、システム時計111の時刻を設定する。
従って、システム時計111の時刻が、Webブラウザからの要求によって設定されたときに、JavaVM13を再起動させることが可能となる。
Furthermore, the Web application (Web server 14) accessed from the Web browser of the PC 2 via the Ethernet interface 21 for connecting to the network accepts a time setting request from the Web browser and sets the time of the system clock 111. To do.
Therefore, the Java VM 13 can be restarted when the time of the system clock 111 is set by a request from the Web browser.

更にまた、仮想マシン(JavaVM13)が再起動した場合、前記Webアプリケーション(Webサーバ14)が、自身にアクセスするWebブラウザに所定の情報(再起動の報知画面の画面データ)を送信する。
これにより、Webブラウザを操作する使用者に対して、仮想マシンが再起動した旨を報知することが可能となる。
Furthermore, when the virtual machine (Java VM 13) is restarted, the Web application (Web server 14) transmits predetermined information (screen data of a restart notification screen) to the Web browser accessing itself.
Thereby, it is possible to notify the user who operates the Web browser that the virtual machine has been restarted.

更にまた、仮想マシン(JavaVM13)が再起動した場合、オペレーティングシステム11上で動作する光源制御アプリケーション(LED制御アプリ16)によって、所定のインタフェースに接続された光源(LED23)を点灯又は点滅させる。
従って、LED23の周囲に居る使用者に対して、仮想マシンが再起動した旨を報知することが可能となる。
Furthermore, when the virtual machine (Java VM 13) is restarted, the light source (LED 23) connected to a predetermined interface is turned on or blinked by the light source control application (LED control application 16) operating on the operating system 11.
Therefore, it is possible to notify the users around the LED 23 that the virtual machine has been restarted.

今回開示された実施の形態は、全ての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上述した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。   The embodiment disclosed this time is to be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 情報処理装置
10 CPU
11 OS(オペレーティングシステム)
12 Javaアプリ(アプリケーション)
13 JavaVM(仮想マシン)
14 Webサーバ(Webアプリケーション)
15 時刻同期アプリ(時刻設定アプリケーション)
16 LED制御アプリ
21 イーサネットI/F(インターネットに接続するためのインタフェース、ネットワークに接続するためのインタフェース)
23 LED(光源)
2 PC
3 NTPサーバ
4 インターネット
5 ホームゲートウェイ
1 Information processing device 10 CPU
11 OS (Operating System)
12 Java application (application)
13 JavaVM (virtual machine)
14 Web server (Web application)
15 Time synchronization application (time setting application)
16 LED control application 21 Ethernet I / F (interface for connecting to the Internet, interface for connecting to the network)
23 LED (light source)
2 PC
3 NTP server 4 Internet 5 Home gateway

Claims (9)

時刻を計時するシステム時計を有するオペレーティングシステム上でアプリケーションを実行する仮想マシンを備え、前記アプリケーションに属するスレッドが、前記システム時計の時刻を基準とする時間に応じた処理の実行を前記仮想マシンに要求する情報処理装置における前記仮想マシンの実行方法において、
前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行し、
前記時刻設定アプリケーションが前記時刻を設定した場合、前記仮想マシンを再起動させること
を特徴とする仮想マシンの実行方法。
A virtual machine that executes an application on an operating system having a system clock that measures the time is provided, and a thread belonging to the application requests the virtual machine to execute a process according to a time based on the time of the system clock. In the method of executing the virtual machine in the information processing apparatus,
A time setting application for setting the time of the system clock is executed on the operating system;
The virtual machine execution method, wherein when the time setting application sets the time, the virtual machine is restarted.
前記仮想マシンは、JavaVMであることを特徴とする請求項1に記載の仮想マシンの実行方法。   The virtual machine execution method according to claim 1, wherein the virtual machine is a Java VM. 前記処理は、Thread.sleepであることを特徴とする請求項2に記載の仮想マシンの実行方法。   The process is the same as Thread. The virtual machine execution method according to claim 2, wherein the virtual machine execution method is a sleep. 前記情報処理装置をインターネットに接続するためのインタフェースを用意し、
前記時刻設定アプリケーションは、前記時刻を前記インターネットに接続されたNTPサーバに同期させて設定することを特徴とする請求項1から3の何れか1項に記載の仮想マシンの実行方法。
Providing an interface for connecting the information processing apparatus to the Internet;
4. The virtual machine execution method according to claim 1, wherein the time setting application sets the time in synchronization with an NTP server connected to the Internet. 5.
前記情報処理装置をネットワークに接続するためのインタフェースを用意し、
前記時刻設定アプリケーションは、前記インタフェースを介してウェブブラウザからアクセスされるウェブアプリケーションであり、
該ウェブアプリケーションは、前記ウェブブラウザからの時刻の設定要求を受け付けて前記時刻を設定すること
を特徴とする請求項1から3の何れか1項に記載の仮想マシンの実行方法。
Preparing an interface for connecting the information processing apparatus to a network;
The time setting application is a web application accessed from a web browser through the interface,
4. The virtual machine execution method according to claim 1, wherein the web application receives a time setting request from the web browser and sets the time. 5.
前記仮想マシンが再起動した場合、前記ウェブアプリケーションは、前記ウェブブラウザに所定の情報を送信することを特徴とする請求項5に記載の仮想マシンの実行方法。   The virtual machine execution method according to claim 5, wherein when the virtual machine is restarted, the web application transmits predetermined information to the web browser. 前記情報処理装置に光源を接続するためのインタフェースを用意し、
前記光源の点灯を制御する光源制御アプリケーションを前記オペレーティングシステム上で実行し、
前記仮想マシンが再起動した場合、前記光源制御アプリケーションは、前記光源を点灯又は点滅させること
を特徴とする請求項1から6の何れか1項に記載の仮想マシンの実行方法。
Preparing an interface for connecting a light source to the information processing apparatus;
A light source control application for controlling lighting of the light source is executed on the operating system;
The virtual machine execution method according to any one of claims 1 to 6, wherein when the virtual machine is restarted, the light source control application turns on or blinks the light source.
時刻を計時するシステム時計を有するオペレーティングシステムを備えるコンピュータに、前記システム時計の時刻を基準とする時間に応じた処理の実行を要求するスレッドが属するアプリケーションを前記オペレーティングシステム上の仮想マシン上で実行させるコンピュータプログラムにおいて、
コンピュータに、前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行させるステップと、
前記時刻設定アプリケーションが前記時刻を設定した場合、コンピュータに、前記仮想マシンを再起動させるステップと
を実行させることを特徴とするコンピュータプログラム。
A computer having an operating system having a system clock for measuring time is caused to execute on a virtual machine on the operating system an application to which a thread that requests execution of processing according to time based on the time of the system clock belongs. In a computer program,
Causing the computer to execute a time setting application for setting the time of the system clock on the operating system;
A computer program for causing a computer to restart the virtual machine when the time setting application sets the time.
時刻を計時するシステム時計を有するオペレーティングシステム上でアプリケーションを実行する仮想マシンを備え、前記アプリケーションに属するスレッドが、前記システム時計の時刻を基準とする時間に応じた処理の実行を前記仮想マシンに要求する情報処理装置において、
前記システム時計の時刻を設定する時刻設定アプリケーションを前記オペレーティングシステム上で実行する手段と、
前記時刻設定アプリケーションが前記時刻を設定した場合、前記仮想マシンを再起動させる手段とを備えること
を特徴とする情報処理装置。
A virtual machine that executes an application on an operating system having a system clock that measures the time is provided, and a thread belonging to the application requests the virtual machine to execute a process according to a time based on the time of the system clock. In the information processing apparatus to
Means for executing a time setting application for setting the time of the system clock on the operating system;
An information processing apparatus comprising: means for restarting the virtual machine when the time setting application sets the time.
JP2013210409A 2013-10-07 2013-10-07 Virtual machine execution method, computer program, and information processing apparatus Active JP6149671B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013210409A JP6149671B2 (en) 2013-10-07 2013-10-07 Virtual machine execution method, computer program, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013210409A JP6149671B2 (en) 2013-10-07 2013-10-07 Virtual machine execution method, computer program, and information processing apparatus

Publications (2)

Publication Number Publication Date
JP2015075836A true JP2015075836A (en) 2015-04-20
JP6149671B2 JP6149671B2 (en) 2017-06-21

Family

ID=53000671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013210409A Active JP6149671B2 (en) 2013-10-07 2013-10-07 Virtual machine execution method, computer program, and information processing apparatus

Country Status (1)

Country Link
JP (1) JP6149671B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006021489A (en) * 2004-07-09 2006-01-26 Canon Inc Printer, control method, program, and storage medium
JP2006146678A (en) * 2004-11-22 2006-06-08 Hitachi Ltd Method for controlling program in information processor, information processor and program
JP2011198013A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Information processor and method of starting information processor
JP2012027768A (en) * 2010-07-26 2012-02-09 Ricoh Co Ltd Embedded device, method for setting parameters, computer program, and recording medium
JP2012073143A (en) * 2010-09-29 2012-04-12 Mitsubishi Electric Corp Information processor
JP2012190319A (en) * 2011-03-11 2012-10-04 Fujitsu Ltd Information processing apparatus and time control method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006021489A (en) * 2004-07-09 2006-01-26 Canon Inc Printer, control method, program, and storage medium
JP2006146678A (en) * 2004-11-22 2006-06-08 Hitachi Ltd Method for controlling program in information processor, information processor and program
JP2011198013A (en) * 2010-03-19 2011-10-06 Fujitsu Ltd Information processor and method of starting information processor
JP2012027768A (en) * 2010-07-26 2012-02-09 Ricoh Co Ltd Embedded device, method for setting parameters, computer program, and recording medium
JP2012073143A (en) * 2010-09-29 2012-04-12 Mitsubishi Electric Corp Information processor
JP2012190319A (en) * 2011-03-11 2012-10-04 Fujitsu Ltd Information processing apparatus and time control method

Also Published As

Publication number Publication date
JP6149671B2 (en) 2017-06-21

Similar Documents

Publication Publication Date Title
CN105426141B (en) Information processing method and electronic device supporting the same
US20200034725A1 (en) Methods and system for managing predictive models
KR102137097B1 (en) Processing Method for periodic event and Electronic device supporting the same
RU2012128113A (en) CONTROL DEVICE FOR CHANGING IMAGES ON A SMARTPHONE DISPLAY
TWI573075B (en) Persistent and resilient worker processes
JP2014131108A5 (en)
US20200174823A1 (en) State management method and apparatus for virtual machine, and smart terminal thereof
KR102222337B1 (en) Apparatus and method for synchronizing among applications
TW201033832A (en) Programming model for synchronizing browser caches across devices and web services
JP2011134018A5 (en) Image processing system, web server, image processing method, web server control method, and program
WO2019154241A1 (en) Power consumption control method and camera device
EP2985675B1 (en) Method of controlling an electronic device according to a communication state of the electronic device
US11595889B2 (en) Determining a duty schedule for a group of lighting devices providing a similar lighting service
KR102358002B1 (en) Contents transmission controlling method and electronic device supporting the same
WO2015172283A1 (en) Method, device and mobile terminal for reducing power consumption
JP6088531B2 (en) Event service for local client applications through a local server
JP6149671B2 (en) Virtual machine execution method, computer program, and information processing apparatus
WO2016008256A1 (en) Method for terminal to update operating system, terminal and system
EP3054709B1 (en) Electronic apparatus and short-range communication method thereof
CN116610508A (en) Heat dissipation test method and device, electronic equipment and storage medium
CN112839065A (en) Information processing method and device, first equipment and storage medium
WO2022089216A1 (en) Interface display method and electronic device
KR102303707B1 (en) Electronic device and operation method of thereof
CN115987786A (en) Configuration change method, system, terminal equipment and storage medium
JP6515052B2 (en) Communication apparatus, communication system, communication method and program

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20160629

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20160629

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160719

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170419

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170425

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170508

R150 Certificate of patent or registration of utility model

Ref document number: 6149671

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250