JP5166211B2 - Device using non-volatile memory as main memory - Google Patents

Device using non-volatile memory as main memory Download PDF

Info

Publication number
JP5166211B2
JP5166211B2 JP2008279770A JP2008279770A JP5166211B2 JP 5166211 B2 JP5166211 B2 JP 5166211B2 JP 2008279770 A JP2008279770 A JP 2008279770A JP 2008279770 A JP2008279770 A JP 2008279770A JP 5166211 B2 JP5166211 B2 JP 5166211B2
Authority
JP
Japan
Prior art keywords
power supply
memory
nonvolatile memory
information
storage area
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.)
Expired - Fee Related
Application number
JP2008279770A
Other languages
Japanese (ja)
Other versions
JP2010108253A (en
JP2010108253A5 (en
Inventor
慎也 井口
靖 永井
啓太郎 岡崎
猛 朝日
尊之 河原
秀行 松岡
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2008279770A priority Critical patent/JP5166211B2/en
Publication of JP2010108253A publication Critical patent/JP2010108253A/en
Publication of JP2010108253A5 publication Critical patent/JP2010108253A5/ja
Application granted granted Critical
Publication of JP5166211B2 publication Critical patent/JP5166211B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Description

本発明は、携帯電話、カーナビ、TV等の組込み機器、及びそれらを用いたシステムに関する。   The present invention relates to an embedded device such as a mobile phone, a car navigation system, and a TV, and a system using them.

近年、不揮発性メモリの高性能化、大容量化、及びビット単価の低下に伴い、従来、揮発性メモリで構成された主記憶部、ストレージ(HDD等)のキャッシュメモリの不揮発化が進んでいる。不揮発性メモリは、電源が供給されていなくとも記憶内容を保持できるため、低消費電力な機器開発に非常に有効であり、特に、携帯端末への搭載を目指した開発が進んでいる。   2. Description of the Related Art In recent years, with increasing performance and capacity of non-volatile memories and lowering of the unit price of bits, non-volatility of cache memories of main storage units and storage (HDD, etc.) composed of volatile memories has been progressing. . The nonvolatile memory can hold the stored contents even when power is not supplied, and thus is very effective for developing a device with low power consumption. In particular, development aimed at mounting on a portable terminal is progressing.

将来的には、キャッシュメモリ、メインメモリ、及びストレージのすべてに適用可能な、低コスト且つ高性能なユニバーサルメモリと呼ばれる単一の不揮発性メモリが実現され様々な機器に搭載されると言われている。   In the future, it is said that a single nonvolatile memory called universal memory with low cost and high performance that can be applied to all of cache memory, main memory, and storage will be realized and installed in various devices. Yes.

このような中、不揮発性メモリのみで構成されたシステムの検討も進んでおり、Flashメモリを用いてメインメモリを構成したシステム(例えば、特許文献1参照)、並びに、ROM領域、ランダムアクセス領域、及びストレージ領域の三つの領域に区切られた強磁性体メモリを利用するシステム(例えば、特許文献2参照)がある。   Under such circumstances, a study of a system composed only of a non-volatile memory is also proceeding, a system in which a main memory is configured using a flash memory (see, for example, Patent Document 1), a ROM area, a random access area, In addition, there is a system (for example, see Patent Document 2) that uses a ferromagnetic memory divided into three areas of a storage area.

また、システムの主記憶領域が揮発部と不揮発部とで構成され、電源遮断時において処理を継続するために必要な情報を不揮発部に格納し、復帰時において不揮発部に格納されている情報を揮発部に転送することによって、迅速な復帰を実現するシステムも提案されている(例えば、特許文献3)。
特開平5−334168号公報 米国特許第6449683B1号明細書 特開2004−36246号公報
In addition, the main storage area of the system is composed of a volatile part and a non-volatile part. Information necessary to continue the process when the power is shut off is stored in the non-volatile part. There has also been proposed a system that realizes quick recovery by transferring to a volatile unit (for example, Patent Document 3).
JP-A-5-334168 US Pat. No. 6,449,683 B1 JP 2004-36246 A

しかし、前述した従来技術では、メモリが不揮発性メモリのみから構成されても、突発的な電源遮断が発生した場合、メモリ素子へ書き込み中のデータ、I/Oアクセス処理、又はプロセッサ内のレジスタ等の内容消失などで不正な状態になり、電源復帰時に正常にシステムが動作できない。   However, in the above-described prior art, even if the memory is composed only of a nonvolatile memory, if a sudden power interruption occurs, data being written to the memory element, I / O access processing, a register in the processor, or the like The system will not operate properly when the power is restored.

さらに、前述した従来技術では、揮発メモリ及び不揮発メモリから構成される混在メモリを主記憶部とした場合、システムを休止するためのデータの退避に時間がかかる。   Further, in the above-described conventional technology, when a mixed memory composed of a volatile memory and a nonvolatile memory is used as a main storage unit, it takes time to save data for suspending the system.

本発明の代表的な一例を示せば以下の通りである。すなわち、プロセッサと、一以上の不揮発性メモリと、周辺回路とを備える不揮発性メモリを主記憶に用いた装置であって、前記装置は、前記装置の電源が異常に遮断されたか否かを検出する電源異常遮断判定部と、前記装置の電源が異常遮断されたことを示す情報を格納する電源異常終了通知レジスタとを備え、前記周辺回路は、電源回路を含み、前記不揮発性メモリは、オペレーティングシステム、ソフトウェア及びデバイスドライバを格納し、前記オペレーティングシステムは、前記電源異常遮断判定部を含み、前記電源異常遮断判定部は、前記装置の電源投入時に、前記電源異常終了通知レジスタを参照し、前記電源異常終了通知レジスタが前記装置の電源が異常に遮断されたことを示す情報を格納しており、前記プロセッサが不揮発性のプロセッサでない場合、前記装置の電源が遮断される前に実行されていたプロセスを再起動し、前記デバイスドライバを確認し、前記電源異常終了通知レジスタが前記装置の電源が異常に遮断されたことを示す情報を格納しており、前記プロセッサが不揮発性のプロセッサである場合、前記装置の電源が遮断される前に実行されていたプロセスを、前記プロセスが中断された処理から再開し、前記デバイスドライバを確認することを特徴とする。   A typical example of the present invention is as follows. That is, a device using a nonvolatile memory including a processor, one or more nonvolatile memories, and a peripheral circuit as a main memory, and the device detects whether or not the power supply of the device is abnormally cut off. And a power supply abnormal end notification register for storing information indicating that the power supply of the device has been cut off abnormally, the peripheral circuit includes a power supply circuit, and the non-volatile memory is an operating system. A system, software, and a device driver are stored, and the operating system includes the power supply abnormality interruption determination unit, and the power supply abnormality interruption determination unit refers to the power supply abnormality end notification register when the apparatus is turned on. The power failure end notification register stores information indicating that the power supply of the device is abnormally shut down, and the processor is If the processor is not a compatible processor, restart the process that was being executed before the device was turned off, check the device driver, and the power failure termination notification register was turned off abnormally. If the processor is a non-volatile processor, the process executed before the power of the device is shut down is restarted from the process where the process was interrupted, It is characterized by checking a device driver.

本発明によれば、突発的な電源遮断からの復帰、及びシステムの休止における処理を高速且つ確実にできる。   ADVANTAGE OF THE INVENTION According to this invention, the process in the recovery | restoration from a sudden power shutdown and a system stop can be performed at high speed and reliably.

[実施形態]
まず、本発明の実施形態の概要について説明する。
[Embodiment]
First, the outline | summary of embodiment of this invention is demonstrated.

第1に、プロセッサ、揮発性メモリ、不揮発性メモリ、及び周辺回路を備えるハードウェアにおいて、少なくとも電源回路、プロセッサ、又は不揮発性メモリのいずれかが、電源瞬断判定機能と電源瞬断通知レジスタと備える。   First, in hardware including a processor, a volatile memory, a nonvolatile memory, and a peripheral circuit, at least one of the power supply circuit, the processor, or the nonvolatile memory includes a power supply interruption determination function and a power supply interruption notification register. Prepare.

これによって、OSは、ハードウェアに電源が投入されたとき、電源瞬断通知レジスタが設定されているか否かを判定し、設定されていれば電源瞬断からの復帰と判定して、復旧処理を実行する。復旧処理において、OSは、プロセッサが揮発性であるか否かを判定し、プロセッサが揮発性の場合、電源遮断前に実行していたプロセスを再起動する。プロセッサが不揮発性の場合、プロセッサが保持するプロセスに関する情報に基づいて、OSは処理を再開する。次に、OSは、各デバイスドライバの状態を判定し、処理の再開が可能か否かを判定して、処理の再開が不可能な場合、呼び出し元プロセスへ通知し、エラー処理を実行する。   As a result, when the power is turned on to the hardware, the OS determines whether or not the power supply interruption notification register is set. If the power supply is set, the OS determines that the power supply is recovered from the power supply interruption. Execute. In the recovery process, the OS determines whether or not the processor is volatile. If the processor is volatile, the OS restarts the process that was being executed before the power was shut down. If the processor is non-volatile, the OS resumes processing based on information about the process held by the processor. Next, the OS determines the state of each device driver, determines whether or not the process can be restarted. If the process cannot be restarted, the OS notifies the caller process and executes error processing.

第2に、主記憶領域を複数の揮発性メモリと不揮発性メモリとから構成するハードウェアにおいて、論理アドレスと物理アドレスとからなる仮想記憶をサポートし、各メモリ空間が一定サイズのページで管理されるシステムを想定する。   Secondly, in hardware in which the main storage area is composed of a plurality of volatile memories and nonvolatile memories, virtual memory consisting of logical addresses and physical addresses is supported, and each memory space is managed by pages of a certain size. System.

ユーザインタフェース系のプロセスからバックグラウンド系のプロセスへ切り替わる場合、又は論理物理アドレス変換が発生した場合、OSは、低速な不揮発性メモリ、又は揮発性メモリ上のページの優先度を判定し、優先度に基づいて入れ替えフラグを設定し、システムのアイドル時に入れ替えを実行する。   When switching from a user interface process to a background process, or when logical-physical address conversion occurs, the OS determines the priority of a page on a low-speed nonvolatile memory or volatile memory, and the priority Based on the above, the replacement flag is set, and the replacement is executed when the system is idle.

さらに、揮発性メモリには更新されないプロセスのコード領域と定数とが配置され、不揮発性メモリには更新されるデータが優先的に配置されることによって、システムの電源が突発的に遮断された場合、OSは、揮発性メモリのデータが消失しても、プロセスのコード部、又は定数部をストレージから読み出し、不揮発メモリが保持するデータを用いて復帰処理を実行する。   Furthermore, when the code area and constants of processes that are not updated are allocated in the volatile memory, and the data to be updated is preferentially allocated in the nonvolatile memory, the system power supply is suddenly shut down. Even if the data in the volatile memory is lost, the OS reads the code part or constant part of the process from the storage, and executes the recovery process using the data held in the nonvolatile memory.

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

図1は、本発明の実施形態の組込み機器の構成を説明するブロック図である。   FIG. 1 is a block diagram illustrating the configuration of an embedded device according to an embodiment of the present invention.

本組込み機器は、プロセッサ104、不揮発性メモリ101、及び周辺回路102を備え、これらは互いにバスによって接続されている。   This embedded device includes a processor 104, a nonvolatile memory 101, and a peripheral circuit 102, which are connected to each other by a bus.

プロセッサ104は、レジスタ、及び命令実行部等を備える。本実施形態において、プロセッサ104は、瞬断判定レジスタA121を含む。   The processor 104 includes a register, an instruction execution unit, and the like. In the present embodiment, the processor 104 includes an instantaneous interruption determination register A121.

瞬断判定レジスタA121は、電源が突発的に遮断されたか否かを示す情報を格納し、プロセッサ104内の電圧が不安定になった場合などに設定される。また、瞬断判定レジスタA121は、OS107がクリアする。   The instantaneous interruption determination register A121 stores information indicating whether or not the power supply is suddenly cut off, and is set when the voltage in the processor 104 becomes unstable. Further, the OS 107 clears the instantaneous interruption determination register A121.

不揮発性メモリ101は、瞬断判定レジスタB116、書込残チェックカウンタ117、正常終了レジスタ124、及びデータ記録部123を含む。   The nonvolatile memory 101 includes an instantaneous interruption determination register B116, a remaining write check counter 117, a normal end register 124, and a data recording unit 123.

瞬断判定レジスタB116は、電源が突発的に遮断されたか否かを示す情報を格納する。例えば、不揮発性メモリ101の電圧が不安定になったとき、不揮発性メモリ101へ電源投入されたとき、又は正常終了レジスタ124が設定されていなかったときに、瞬断判定レジスタB116が設定される。   The instantaneous interruption determination register B116 stores information indicating whether or not the power supply is suddenly cut off. For example, when the voltage of the nonvolatile memory 101 becomes unstable, when power is turned on to the nonvolatile memory 101, or when the normal end register 124 is not set, the instantaneous interruption determination register B116 is set. .

書込残チェックカウンタ117は、不揮発性メモリ101が受け取ったデータのうち、メモリへの書き込みが終了していない領域の数を示す情報を格納する。領域としては、例えば、メモリセル単位、ビット単位、バイト単位、又はブロック単位などが考えられる。不揮発性メモリ101によっては、書き込みデータを受け取ってからメモリセルへ書き込みが終了するまで時間がかかるため、書き込みの処理中に、電源遮断された場合、メモリセルへ書き込めなかったデータが消失する。書込残チェックカウンタ117は、前述したような異常が発生したことを検出するためのものである。   The remaining write check counter 117 stores information indicating the number of areas in the data received by the nonvolatile memory 101 that have not been written to the memory. As the region, for example, a memory cell unit, a bit unit, a byte unit, or a block unit can be considered. Depending on the non-volatile memory 101, it takes time until the writing to the memory cell is completed after receiving the write data. Therefore, when the power is shut off during the writing process, the data that could not be written to the memory cell is lost. The remaining write check counter 117 is for detecting that the above-described abnormality has occurred.

正常終了レジスタ124は、突発的な電源遮断(瞬断)か、又は正常に電源遮断した後からの復帰かを示す情報を格納する。正常終了レジスタ124は、システムが正常に終了するときにプロセッサ104、又はOS107が設定する。不揮発性メモリ101が起動すると内部制御回路(図示省力)が正常終了レジスタ124をチェックし、正常終了レジスタ124が設定されていれば瞬断判定レジスタB116を設定し、正常終了レジスタ124が設定されていなければ瞬断判定レジスタB116を設定する。   The normal end register 124 stores information indicating whether the power supply is suddenly shut down (instantaneous power interruption) or a recovery after the power supply is normally shut down. The normal end register 124 is set by the processor 104 or the OS 107 when the system ends normally. When the nonvolatile memory 101 is activated, the internal control circuit (labor saving in the figure) checks the normal end register 124. If the normal end register 124 is set, the instantaneous interruption determination register B116 is set, and the normal end register 124 is set. If not, the instantaneous interruption determination register B116 is set.

データ記録部123は、実際にデータが格納される不揮発性メモリ101の領域を示す。例えば、メモリセル等で構成される。本実施形態では、データ記録部123がROM(Read Only Memory)領域119、主記憶領域113、及びストレージ領域114、に分割されている。   The data recording unit 123 indicates an area of the nonvolatile memory 101 in which data is actually stored. For example, it is composed of memory cells or the like. In the present embodiment, the data recording unit 123 is divided into a ROM (Read Only Memory) area 119, a main storage area 113, and a storage area 114.

ROM領域119は、ROMとして利用する領域であり、OS107、実行プログラムコード等、通常動作で更新が発生しないデータを格納する領域である。図1に示す例では、OS107、基本アプリ群108が格納されている。   The ROM area 119 is an area used as a ROM, and is an area for storing data such as the OS 107, execution program code, etc. that do not update during normal operation. In the example illustrated in FIG. 1, the OS 107 and the basic application group 108 are stored.

OS107は、OS本体を示し、通常動作では更新が発生しない実行コード等のデータを格納する。本実施形態において、OS107は、周辺回路102などのハードウェアを制御するプログラム群であるデバイスドライバ126、及び電源復帰処理を実行する機能である電源復帰処理機能111を含む。   An OS 107 indicates the OS main body, and stores data such as an execution code that does not occur during normal operation. In the present embodiment, the OS 107 includes a device driver 126 that is a program group that controls hardware such as the peripheral circuit 102, and a power recovery processing function 111 that is a function of executing power recovery processing.

電源復帰処理機能111は、システムが起動したときに、瞬断判断レジスタ(A121、B116、C122)を読み出し、再起動か、又は電源断からの復旧か、の判定処理を実行する。   When the system is activated, the power recovery processing function 111 reads the instantaneous interruption determination register (A121, B116, C122), and executes a determination process of whether to restart or to recover from the power interruption.

基本アプリ群108は、OS107、及び機器で恒常的に利用されるソフトウェア群を格納する。例えば、デバイスドライバ、GUIプログラム、Webブラウザ等である。   The basic application group 108 stores the OS 107 and a software group that is constantly used by the device. For example, a device driver, a GUI program, a web browser, and the like.

主記憶領域113は、通常動作時に更新されるデータが格納され、本実施形態において、主記憶領域113は、OS管理情報103とプロセス115とを格納する。   The main storage area 113 stores data updated during normal operation. In the present embodiment, the main storage area 113 stores the OS management information 103 and the process 115.

OS管理情報103は、更新が発生するOS107の各種管理情報を格納し、具体的には、電源断検出先指定データ120、起動識別フラグ112、プロセス管理表106、論理物理変換テーブル105、ファイルシステム/データベース管理110、及びプロセス115を含む。   The OS management information 103 stores various types of management information of the OS 107 that is updated. Specifically, the power-off detection destination designation data 120, the activation identification flag 112, the process management table 106, the logical physical conversion table 105, the file system. / Database management 110 and process 115.

電源断検出先指定データ120は、電源遮断の原因を検出する手段を指定するデータを格納する。つまり、システムが備えるレジスタ(瞬断判定レジスタ等)又はデータのうち、いずれを読み出すかを示すデータが格納される。これによって、瞬断判定のためのデータの読み出し先を指定するフラグが設定される。電源断検出先指定データ120は、システムに当初から設定されている値である。なお、電源断検出先指定データ120は、ユーザが指定してもよい。   The power-off detection destination designation data 120 stores data for designating means for detecting the cause of power-off. That is, data indicating which of the registers (instant interruption determination register or the like) or data provided in the system is to be read is stored. As a result, a flag for designating the data reading destination for instantaneous interruption determination is set. The power-off detection destination designation data 120 is a value set in the system from the beginning. The power-off detection destination designation data 120 may be designated by the user.

起動識別フラグ112は、再起動か、又は電源断からの復旧かを示す情報を格納し、OS107が動作再開時に動作再開の理由を判断するために、電源復帰処理機能111から参照される。具体的には、起動識別フラグ112が「0」の場合、再起動のフラグが設定され、起動識別フラグ112が「1」の場合、電源断復帰のフラグが設定される。   The activation identification flag 112 stores information indicating whether it is a restart or a recovery from a power failure, and is referred to by the power recovery processing function 111 in order for the OS 107 to determine the reason for the operation resumption when the operation is resumed. Specifically, when the activation identification flag 112 is “0”, a restart flag is set, and when the activation identification flag 112 is “1”, a power-off recovery flag is set.

プロセス管理表106は、システム上に存在する全プロセスを管理するための情報を格納する。   The process management table 106 stores information for managing all processes existing on the system.

論理物理変換テーブル105は、システムが論理アドレスと物理アドレスとを利用する場合、その対応付けを管理するための情報を格納する。   The logical-physical conversion table 105 stores information for managing the correspondence when the system uses a logical address and a physical address.

ファイルシステム/データベース管理110は、ストレージ領域114に格納されるファイル又はデータベース(DB)の管理情報を格納する。   The file system / database management 110 stores management information of files or databases (DB) stored in the storage area 114.

プロセス115は、OS107が実行する個々のプログラムを格納する。例えば、アプリケーション、又は通信ミドルウェア等である。   The process 115 stores individual programs executed by the OS 107. For example, an application or communication middleware.

ストレージ領域114は、ファイル形式のデータ、及び各種退避データを格納する。図1に示す例では、プログラム、動画、静止画、及び音楽などのファイル形式のデータ群である各種ファイル125と、プロセスが実行中で発生した一時情報、及び実行優先度の低いページデータ等の退避データ109を格納する。   The storage area 114 stores file format data and various saved data. In the example shown in FIG. 1, various files 125 that are data groups of file formats such as programs, moving images, still images, and music, temporary information generated during the execution of the process, page data with low execution priority, and the like The save data 109 is stored.

周辺回路102は、キー、タッチパネル、ディスプレイ、マイク、スピーカー、及びネットワーク接続機能など各種周辺機能と電源回路118とを備える。   The peripheral circuit 102 includes various peripheral functions such as a key, a touch panel, a display, a microphone, a speaker, and a network connection function, and a power supply circuit 118.

電源回路118は、各機器の電源を管理し、本実施形態では、瞬断判定レジスタC122を含む。   The power supply circuit 118 manages the power supply of each device, and includes an instantaneous interruption determination register C122 in this embodiment.

瞬断判定レジスタC122は、電源が突発的に遮断されたか否かを示す情報を格納する。瞬断判定レジスタC122は、電源回路118で異常を検出されたときに設定され、また、OS107がクリアする。   The instantaneous interruption determination register C122 stores information indicating whether or not the power supply is suddenly cut off. The instantaneous interruption determination register C122 is set when an abnormality is detected by the power supply circuit 118, and the OS 107 is cleared.

なお、本実施形態において、本組込機器は、全ての瞬断レジスタ(A121、B116、C122)を備える場合を想定している。なお、いずれかの瞬断レジスタ(A121、B116、C122)のみを備える形態であってもよい。   In the present embodiment, it is assumed that the embedded device includes all instantaneous interruption registers (A121, B116, C122). In addition, the form provided only with one of the instantaneous interruption registers | resistors (A121, B116, C122) may be sufficient.

図2Aは、本発明の実施形態におけるプロセス管理表106が含む基本データ206の一例を示す図である。基本データ206は、各プロセスの基本属性を管理する。   FIG. 2A is a diagram illustrating an example of basic data 206 included in the process management table 106 according to the embodiment of this invention. The basic data 206 manages basic attributes of each process.

基本データ206は、プロセスID201、セグメント202、及びステート205を含む。   The basic data 206 includes a process ID 201, a segment 202, and a state 205.

プロセスID201は、プロセスを識別するための識別子を格納する。   The process ID 201 stores an identifier for identifying a process.

セグメント202は、プロセスID201に対応するプロセスが格納されているメモリ上の領域を特定するための情報を格納し、さらに、コード領域203、及びデータ領域204を含む。   The segment 202 stores information for specifying an area on a memory in which a process corresponding to the process ID 201 is stored, and further includes a code area 203 and a data area 204.

コード領域203は、プロセスID201に対応するプロセスの実行コードの格納場所を示す情報を格納する。   The code area 203 stores information indicating the storage location of the execution code of the process corresponding to the process ID 201.

データ領域204は、プロセスID201に対応するプロセスが格納されている場所を示す情報を格納する。   The data area 204 stores information indicating a location where a process corresponding to the process ID 201 is stored.

ステート205は、プロセスの状態を示す情報が格納される。例えば、プロセッサ104がプロセスID201に対応するプロセスを実行している場合「実行中」が格納され、プロセッサ104がプロセスID201に対応するプロセスを実行待ちしている場合「待機中」が格納され、プロセッサ104がプロセスID201に対応するプロセスを、他のプロセス又はI/Oの応答待ちをしている場合「応答待ち」を格納する。   The state 205 stores information indicating the process state. For example, “in execution” is stored when the processor 104 is executing a process corresponding to the process ID 201, and “waiting” is stored when the processor 104 is waiting to execute a process corresponding to the process ID 201. If the process 104 is waiting for a response corresponding to the process ID 201 to another process or I / O, “wait for response” is stored.

図2Bは、本発明の実施形態におけるプロセスタイプ定義表218の一例を示す図である。   FIG. 2B is a diagram showing an example of the process type definition table 218 according to the embodiment of this invention.

プロセスタイプ定義表218は、プロセスの種別、及びプロセスの実行の優先順位を定義し、プロセス管理表106が含む拡張データ207の総合優先度209を算出するときに用いられる。   The process type definition table 218 defines process types and process execution priorities, and is used when calculating the overall priority 209 of the extended data 207 included in the process management table 106.

プロセスタイプ定義表218は、プロセスタイプ227及び優先度228を含む。   The process type definition table 218 includes a process type 227 and a priority 228.

プロセスタイプ227は、プロセスの種別を示す情報を格納する。例えば、ユーザインタフェース系プロセスの場合、「UI」が格納され、バックグランドにおいて動作するサーバ機能を提供するプロセスの場合、「サービス」が格納され、その他のプロセスの場合、「通常」が格納される。   The process type 227 stores information indicating the type of process. For example, in the case of a user interface system process, “UI” is stored, in the case of a process providing a server function that operates in the background, “service” is stored, and in the case of other processes, “normal” is stored. .

優先度228は、プロセスタイプ227に対応するプロセスの優先度を格納する。優先度の値を大きいプロセスから優先的に実行される。   The priority 228 stores the priority of the process corresponding to the process type 227. The priority value is executed preferentially from a large process.

図2Cは、本発明の実施形態におけるプロセス管理表106が含む拡張データ207の一例を示す図である。拡張データ207は、プロセスの実行優先度の判定に必要な情報を管理する。   FIG. 2C is a diagram illustrating an example of the extended data 207 included in the process management table 106 according to the embodiment of this invention. The extended data 207 manages information necessary for determining the execution priority of the process.

拡張データ207は、プロセスID208、総合優先度209、プロセスタイプ210、及び利用頻度211を含む。   The extended data 207 includes a process ID 208, an overall priority 209, a process type 210, and a usage frequency 211.

プロセスID208は、プロセスID201と同一のものである。   The process ID 208 is the same as the process ID 201.

総合優先度209は、OS107が実際に扱うプロセスの優先度を格納する。総合優先度209が大きいプロセスから優先的に実行される。総合優先度209は、プロセスタイプ210と利用頻度211とから算出される。例えば、プロセスタイプ210に対応するプロセスをプロセスタイプ定義表218から検索し、検索された優先度228と利用頻度211の値を用いて、平均値、最大値、又は最小値等を求めて算出される。   The overall priority 209 stores the priority of the process actually handled by the OS 107. Processes with a higher overall priority 209 are executed preferentially. The general priority 209 is calculated from the process type 210 and the usage frequency 211. For example, a process corresponding to the process type 210 is searched from the process type definition table 218, and an average value, a maximum value, a minimum value, or the like is calculated by using the searched priority 228 and usage frequency 211 values. The

また、同一のページに複数のプロセスがアクセスする場合、総合優先度209は、例えば、複数のプロセスの各優先度228の平均値、最大値、又は最小値等を求めて算出される。また、総合優先度209は、論理物理変換テーブル105が含む拡張データ(図8B参照)の総合優先度813に反映される。   Further, when a plurality of processes access the same page, the total priority 209 is calculated, for example, by obtaining an average value, a maximum value, a minimum value, or the like of each priority 228 of the plurality of processes. The overall priority 209 is reflected in the overall priority 813 of the extension data (see FIG. 8B) included in the logical-physical conversion table 105.

利用頻度211は、システムの各状態の利用頻度を格納する。具体的には、利用頻度211は、起動直後212、復帰直後213、及び通常動作時214の3種類を含む。   The usage frequency 211 stores the usage frequency of each state of the system. Specifically, the usage frequency 211 includes three types: immediately after startup 212, immediately after return 213, and during normal operation 214.

起動直後212は、システムの起動直後にプロセスが起動された回数を格納する。起動直後212は、システムの起動直後にプロセスが起動されたときに値が「1」加算される。システムの起動直後の判定は、例えば、システムを起動してからユーザが操作するための画面が表示されるまでの時間をシステム起動直後と定義することによって可能である。   Immediately after the activation 212 stores the number of times the process has been activated immediately after the activation of the system. Immediately after starting 212, a value of “1” is added when a process is started immediately after starting the system. The determination immediately after the system is started can be made, for example, by defining the time from when the system is started to when the screen for user operation is displayed as immediately after the system is started.

復帰直後213は、システムが電源瞬断から復帰した直後にプロセスが起動された回数を格納する。復帰直後213は、システムが電源瞬断から復帰した直後にプロセスが起動されたときに値が「1」加算される。復帰直後か否かの判定は、起動直後212と同様である。   Immediately after recovery 213 stores the number of times the process has been started immediately after the system has recovered from a power interruption. Immediately after the return 213, a value of “1” is added when the process is started immediately after the system recovers from a power interruption. The determination as to whether or not it is immediately after return is the same as that immediately after startup 212.

通常動作時214は、前述の二つの状態以外にプロセスが起動された回数を格納する。通常動作時214は、前述の二つの状態以外にプロセスが起動されたときに値が「1」加算される。   In the normal operation 214, the number of times the process has been started is stored in addition to the above two states. During normal operation 214, a value of “1” is added when a process is started in addition to the two states described above.

なお、優先度設定項目については、前述したもの以外に、プロセス実行時間、プロセスの規模、又はユーザ指定優先度等、さまざまな判定基準が考えられる。   In addition to the items described above, various determination criteria such as process execution time, process scale, or user-specified priority can be considered for the priority setting items.

図2Dは、本発明の実施形態におけるプロセス管理表106が含む格納先管理データ215の一例を示す図である。格納先管理データ215は、複数の種類のメモリを用いて組込機器が構成されている場合、いずれのメモリのどの領域にプロセスが格納されているかを管理する。   FIG. 2D is a diagram illustrating an example of the storage location management data 215 included in the process management table 106 according to the embodiment of this invention. The storage location management data 215 manages in which area of which memory a process is stored when an embedded device is configured using a plurality of types of memory.

格納先管理データ215は、OS107がデータの退避、又は入れ替えなどを実行するときに参照される。   The storage destination management data 215 is referred to when the OS 107 executes data saving or replacement.

格納先管理データ215は、プロセスID216、及びセグメント219を含む。   The storage location management data 215 includes a process ID 216 and a segment 219.

プロセスID216は、プロセスID201と同一のものである。   The process ID 216 is the same as the process ID 201.

セグメント219は、プロセスID216に対応するプロセスの実行コードがメモリ上のいずれの領域に格納されているかを示す情報を格納する。セグメント219は、さらにコード領域229、及びデータ領域220を含む。   The segment 219 stores information indicating in which area on the memory the execution code of the process corresponding to the process ID 216 is stored. The segment 219 further includes a code area 229 and a data area 220.

コード領域229は、プロセスID216に対応するプロセスの実行コードが格納されているメモリを特定するための示す情報を格納する。   The code area 229 stores information indicating the memory in which the execution code of the process corresponding to the process ID 216 is stored.

データ領域220は、プロセスID216に対応するプロセスがいずれのメモリに格納されているかを示す情報を格納する。データ領域220は、さらに、定数221、及び更新発生部222を含む。   The data area 220 stores information indicating in which memory the process corresponding to the process ID 216 is stored. The data area 220 further includes a constant 221 and an update generation unit 222.

定数221は、プロセスに当初より埋め込まれている基本パラメータである。図2Dに示す例において、定数221には、メモリタイプID223(図2E参照)が格納されている。   The constant 221 is a basic parameter embedded in the process from the beginning. In the example shown in FIG. 2D, the constant 221 stores the memory type ID 223 (see FIG. 2E).

更新発生部222は、更新されるプロセスが格納されているメモリを特定するための情報を格納する。図2Dに示す例において、更新発生部222には、メモリタイプID223(図2E参照)が格納されている。   The update generation unit 222 stores information for specifying the memory in which the process to be updated is stored. In the example shown in FIG. 2D, the update generation unit 222 stores a memory type ID 223 (see FIG. 2E).

図2Eは、本発明の実施形態におけるメモリタイプ定義表217の一例を示す図である。メモリタイプ定義表217は、本組込機器を構成する各メモリの属性が定義する。   FIG. 2E is a diagram showing an example of the memory type definition table 217 in the embodiment of the present invention. The memory type definition table 217 defines the attributes of each memory constituting this embedded device.

メモリタイプ定義表217は、メモリタイプID223、タイプ224、Read速度225、及びWrite速度226を含む。   The memory type definition table 217 includes a memory type ID 223, a type 224, a read speed 225, and a write speed 226.

メモリタイプID223は、メモリを識別するための識別子を格納する。   The memory type ID 223 stores an identifier for identifying the memory.

タイプ224は、メモリタイプID223に対応するメモリの種別を格納する。具体的には、メモリが揮発性か不揮発性かを示す情報を格納する。   The type 224 stores a memory type corresponding to the memory type ID 223. Specifically, information indicating whether the memory is volatile or nonvolatile is stored.

Read速度225は、メモリタイプID223に対応するメモリの単位読み込み時間を示し、値が小さいほど早いことを示す。   The Read speed 225 indicates the unit reading time of the memory corresponding to the memory type ID 223, and indicates that the smaller the value, the faster.

Write速度226は、メモリの単位書き込み時間を示し、値が小さいほど早いことを示す。   The write speed 226 indicates the unit writing time of the memory, and indicates that the smaller the value, the faster.

なお、Read速度225及びWrite速度226は、メモリを設置した時に決定される値である。   The Read speed 225 and the Write speed 226 are values determined when the memory is installed.

図3は、本発明の実施形態における起動識別フラグ112の設定処理を説明するフローチャートである。   FIG. 3 is a flowchart illustrating the setting process of the activation identification flag 112 according to the embodiment of this invention.

当該処理は、システムが起動したときに実行され、OS107が起動理由判定に利用する起動識別フラグ112を設定する処理である。なお、ハードウェア起動理由としては、システム再起動、電源異常からの復帰、スリープ状態からの復帰などが考えられる。   This process is executed when the system is booted, and is a process for setting the boot identification flag 112 that the OS 107 uses for boot reason determination. Note that reasons for hardware activation include system restart, recovery from power failure, and return from sleep state.

まず、システムに電源が投入され、プロセッサ104、周辺回路、不揮発性メモリ101へ電力供給が開始される(ステップ301)。   First, power is turned on to the system, and power supply to the processor 104, peripheral circuits, and nonvolatile memory 101 is started (step 301).

OS107は、電源断検出先指定データ120が「0」であるか否かを判定する(ステップ302)。   The OS 107 determines whether or not the power-off detection destination designation data 120 is “0” (step 302).

電源断検出先指定データ120が「0」であると判定された場合、OS107は、電源回路118が含む瞬断判定レジスタC122を読み出し、読み出された瞬断判定レジスタC122を起動識別フラグ112に設定し(ステップ303)、処理を終了する。   When it is determined that the power-off detection destination designation data 120 is “0”, the OS 107 reads the instantaneous interruption determination register C122 included in the power supply circuit 118, and the read instantaneous interruption determination register C122 is used as the activation identification flag 112. Setting is made (step 303), and the process is terminated.

電源断検出先指定データ120が「0」でないと判定された場合、OS107は、電源断検出先指定データ120が「1」であるか否かを判定する(ステップ304)。   When it is determined that the power-off detection destination designation data 120 is not “0”, the OS 107 determines whether or not the power-off detection destination designation data 120 is “1” (step 304).

電源断検出先指定データ120が「1」であると判定された場合、OS107は、不揮発性メモリ101が含む瞬断判定レジスタB116を読み出し、読み出された瞬断判定レジスタB116を起動識別フラグ112に設定し(ステップ305)、処理を終了する。   When it is determined that the power-off detection destination designation data 120 is “1”, the OS 107 reads the instantaneous interruption determination register B116 included in the nonvolatile memory 101, and uses the read instantaneous interruption determination register B116 as the activation identification flag 112. (Step 305), and the process ends.

電源断検出先指定データ120が「1」でないと判定された場合、OS107は、電源断検出先指定データ120が「2」であるか否かを判定する(ステップ306)。   When it is determined that the power-off detection destination designation data 120 is not “1”, the OS 107 determines whether the power-off detection destination designation data 120 is “2” (step 306).

電源断検出先指定データ120が「2」であると判定された場合、OS107は、プロセッサ104が含む瞬断判定レジスタA121を読み出し、読み出された瞬断判定レジスタA121を起動識別フラグ112に設定し(ステップ307)、処理を終了する。   When it is determined that the power-off detection destination designation data 120 is “2”, the OS 107 reads the instantaneous interruption determination register A121 included in the processor 104 and sets the read instantaneous interruption determination register A121 in the activation identification flag 112. (Step 307), and the process ends.

電源断検出先指定データ120が「2」でないと判定された場合、OS107は、電源断検出先指定データ120が「3」であるか否かを判定する(ステップ308)。   If it is determined that the power-off detection destination designation data 120 is not “2”, the OS 107 determines whether the power-off detection destination designation data 120 is “3” (step 308).

電源断検出先指定データ120が「3」でないと判定された場合、OS107は、処理を終了する。   When it is determined that the power-off detection destination designation data 120 is not “3”, the OS 107 ends the process.

電源断検出先指定データ120が「3」であると判定された場合、OS107は、書込残チェックカウンタ117を読み出す(ステップ309)。   When it is determined that the power-off detection destination designation data 120 is “3”, the OS 107 reads the remaining write check counter 117 (step 309).

次に、OS107は、書込残チェックカウンタ117が「0」であるか否かを判定する(ステップ310)。   Next, the OS 107 determines whether or not the remaining write check counter 117 is “0” (step 310).

書込残チェックカウンタ117が「0」でないと判定された場合、OS107は、起動識別フラグ112に「1」を設定し(ステップ311)、処理を終了する。   When it is determined that the remaining write check counter 117 is not “0”, the OS 107 sets “1” in the activation identification flag 112 (step 311) and ends the process.

書込残チェックカウンタ117が「0」であると判定された場合、OS107は、起動識別フラグ112に「0」を設定し(ステップ312)、処理を終了する。   When it is determined that the remaining write check counter 117 is “0”, the OS 107 sets “0” in the activation identification flag 112 (step 312), and ends the process.

なお、電源断検出先指定データ120に格納されるデータは、情報の読み出し先(例えば、瞬断判定レジスタA121等)を指定するものであれば、どのようなデータであってもよい。本実施形態では、「0」〜「3」の値が格納され、当該値に対応する読み出し先から、OS107が情報を取得する。   The data stored in the power-off detection destination designation data 120 may be any data as long as it specifies the information reading destination (for example, the instantaneous interruption determination register A121). In this embodiment, values “0” to “3” are stored, and the OS 107 acquires information from a read destination corresponding to the value.

図4は、本発明の実施形態においてOS107が起動され、処理を開始するまでの流れを説明するフローチャートである。   FIG. 4 is a flowchart for explaining the flow from the start of the OS 107 to the start of processing in the embodiment of the present invention.

当該処理では、OS107が起動したときに実行される電源復帰処理機能111が、起動識別フラグ112を参照し、起動の理由を判定し、判定結果に基づいて処理を再開する。   In this process, the power recovery processing function 111 that is executed when the OS 107 is activated refers to the activation identification flag 112, determines the reason for activation, and resumes the process based on the determination result.

電源復帰処理機能111は、起動識別フラグ112を確認する(ステップ401)。   The power recovery processing function 111 confirms the activation identification flag 112 (step 401).

次に、電源復帰処理機能111は、起動識別フラグ112が「1」であるか否かを判定する(ステップ402)。   Next, the power recovery processing function 111 determines whether or not the activation identification flag 112 is “1” (step 402).

起動識別フラグ112が「1」であると判定された場合、電源復帰処理機能111は、プロセッサ104が不揮発性であるか否かを判定する(ステップ403)。   When it is determined that the activation identification flag 112 is “1”, the power recovery processing function 111 determines whether or not the processor 104 is nonvolatile (step 403).

ここで、不揮発性のプロセッサ104とは、不揮発性の素子でレジスタが構成されたプロセッサ104を意味する。したがって、不揮発性のプロセッサ104は、電源が遮断された後もレジスタを保持することができる。   Here, the non-volatile processor 104 means the processor 104 in which a register is configured with non-volatile elements. Therefore, the nonvolatile processor 104 can retain the register even after the power is turned off.

ステップ403において、プロセッサ104が揮発性の場合、電源が遮断される前にプロセッサ104が保持するレジスタがクリアされている。したがって、OS107がプロセスを再開するために、電源が切られる前のレジスタが保持していた情報を取得する必要がある。一方、不揮発性のプロセッサ104の場合、電源が切られる前のレジスタが保持されている。したがって、OS107がプロセスを再開するために、電源が切られる前のレジスタを取得する必要がない。   In step 403, if the processor 104 is volatile, the register held by the processor 104 is cleared before the power is turned off. Therefore, in order for the OS 107 to restart the process, it is necessary to acquire information held in the register before the power is turned off. On the other hand, in the case of the nonvolatile processor 104, the register before the power is turned off is held. Therefore, in order for the OS 107 to restart the process, it is not necessary to acquire a register before the power is turned off.

前述した理由によって、ステップ403では、プロセッサ104が揮発性であるか否かの判定がされる。なお、プロセッサ104が不揮発性であるか否かは、プロセッサ104が保持する、当該プロセッサの識別情報をOS107が参照することによって判定される。   For the reasons described above, in step 403, it is determined whether the processor 104 is volatile. Whether or not the processor 104 is nonvolatile is determined by referring to the identification information of the processor held by the processor 104 by the OS 107.

プロセッサ104が不揮発性であると判定された場合、電源復帰処理機能111は、ステップ405へ進む。   If it is determined that the processor 104 is non-volatile, the power recovery processing function 111 proceeds to step 405.

プロセッサ104が不揮発性でないと判定された場合、電源復帰処理機能111は、プロセス管理表106を参照し、ステート205が「実行中」であるプロセスを再起動する(ステップ404)。   When it is determined that the processor 104 is not nonvolatile, the power recovery processing function 111 refers to the process management table 106 and restarts the process whose state 205 is “executing” (step 404).

次に、電源復帰処理機能111は、全てのデバイスドライバ126の状態を確認したか否かを判定する(ステップ405)。   Next, the power recovery processing function 111 determines whether or not the states of all device drivers 126 have been confirmed (step 405).

全てのデバイスドライバ126の状態を確認したと判定された場合、電源復帰処理機能111は、処理を終了する。   When it is determined that the states of all the device drivers 126 have been confirmed, the power recovery processing function 111 ends the processing.

全てのデバイスドライバ126の状態を確認していないと判定された場合、電源復帰処理機能111は、デバイスドライバ126の状態を確認する(ステップ406)。確認される内容としては、例えば、ハードウェアとデータの授受とが中断していないか、又は、破壊されていないか等である。   When it is determined that the states of all device drivers 126 have not been confirmed, the power recovery processing function 111 confirms the states of the device drivers 126 (step 406). The content to be confirmed is, for example, whether the hardware and data exchange have not been interrupted or destroyed.

電源復帰処理機能111は、中断された処理が再開できるか否かを判定する(ステップ407)。例えば、ハードウェアに対して一括して発行されるべきコマンド及びデータの発行途中に、電源が遮断され場合、中断処理が再開できないと判定される。   The power recovery processing function 111 determines whether or not the interrupted processing can be resumed (step 407). For example, if the power is shut off during the issuance of commands and data that should be issued to the hardware in a batch, it is determined that the interruption process cannot be resumed.

中断処理が再開できないと判定された場合、電源復帰処理機能111は、呼び出し元のプロセスへ異常終了通知を送信する(ステップ408)。通知を受けたプロセスについては、当該プロセスの処理のリトライなどエラー復旧処理が実行される。   When it is determined that the interruption process cannot be resumed, the power recovery processing function 111 transmits an abnormal termination notification to the calling process (step 408). For the notified process, an error recovery process such as retry of the process is executed.

中断処理が再開できると判定された場合、電源復帰処理機能111は、ステップ405に戻る。   When it is determined that the interruption process can be resumed, the power recovery processing function 111 returns to step 405.

ステップ402において、起動識別フラグ112が「1」でないと判定された場合、電源復帰処理機能111は、システムを初期化する(ステップ409)。   If it is determined in step 402 that the activation identification flag 112 is not “1”, the power recovery processing function 111 initializes the system (step 409).

電源復帰処理機能111は、起動識別フラグ112に「1」を設定し、処理を終了する(410)。   The power recovery processing function 111 sets “1” in the activation identification flag 112 and ends the processing (410).

以上、図3及び図4の処理によって、システムの電源が投入されたとき、OS107が正常な電源の投入か、又は電源瞬断等の異常からの復帰かを判定できるため、OS107は、復帰時に迅速にエラー復旧処理を実行し、システムの動作を再開させることができる。   As described above, when the system power is turned on by the processing of FIGS. 3 and 4, it can be determined whether the OS 107 is normally turned on or has returned from an abnormality such as an instantaneous power interruption. Error recovery processing can be executed quickly and system operation can be resumed.

図5は、本発明の実施形態における利用頻度211の更新処理を説明するフローチャートである。   FIG. 5 is a flowchart for explaining the update processing of the usage frequency 211 in the embodiment of the present invention.

当該処理は、プロセスが起動したときにOS107によって実行される。   This process is executed by the OS 107 when the process is activated.

まず、プロセスが起動される(ステップ501)。   First, the process is started (step 501).

OS107は、プロセスの起動タイミングがシステム起動直後であるか否かを判定する(ステップ502)。当該判定は、例えば、システムが起動してからユーザが操作するための画面が表示されるまでに、プロセスが起動されたか否かが判定される。   The OS 107 determines whether or not the process activation timing is immediately after the system activation (step 502). In the determination, for example, it is determined whether or not a process has been started from when the system is started to when a screen for a user to operate is displayed.

プロセスの起動タイミングがシステム起動直後であると判定された場合、OS107は、起動されたプロセスのプロセスID208と一致するエントリの起動直後212の値を「1」加算し(ステップ503)、処理を終了する。   If it is determined that the process activation timing is immediately after system activation, the OS 107 adds “1” to the value immediately after activation of the entry that matches the process ID 208 of the activated process (step 503), and ends the process. To do.

プロセスの起動タイミングがシステム起動直後でないと判定された場合、OS107は、プロセスの起動タイミングがシステム復帰直後であるか否かを判定する(ステップ504)。当該判定も、ステップ502と同様に、一定のタイミングにおいてプロセスが起動されたか否かが判定される。   If it is determined that the process activation timing is not immediately after system startup, the OS 107 determines whether or not the process activation timing is immediately after system recovery (step 504). In this determination, as in step 502, it is determined whether or not the process has been started at a certain timing.

プロセスの起動タイミングがシステム復帰直後であると判定された場合、OS107は、起動されたプロセスのプロセスID208と一致するエントリの復帰直後213の値を「1」加算し(ステップ505)、処理を終了する。   If it is determined that the process activation timing is immediately after the system is restored, the OS 107 adds “1” to the value 213 immediately after the restoration of the entry that matches the process ID 208 of the activated process (step 505), and ends the process. To do.

プロセスの起動タイミングがシステム復帰直後でないと判定された場合、OS107は、プロセスの起動タイミングがシステム通常動作時であるか否かを判定する(ステップ506)。   When it is determined that the process activation timing is not immediately after the system recovery, the OS 107 determines whether or not the process activation timing is the system normal operation time (step 506).

プロセスの起動タイミングがシステム通常動作時であると判定された場合、OS107は、起動されたプロセスのプロセスID208と一致するエントリの通常動作時214の値を「1」加算し(ステップ507)、処理を終了する。   When it is determined that the process activation timing is during the normal system operation, the OS 107 adds “1” to the normal operation 214 value of the entry that matches the process ID 208 of the activated process (step 507). Exit.

プロセスの起動タイミングがシステム通常動作時でないと判定された場合、OS107は、処理を終了する。   If it is determined that the process activation timing is not during normal system operation, the OS 107 ends the process.

以上のように、本願発明の組込み機器におけるシステムは、図3に示すように予めシステムが起動したときに確認する瞬断判定レジスタ(A121、B116、C122)を指定しておき、OS107は、指定された瞬断判定レジスタ(A121、B116、C122)を読み出し、読み出された瞬断判定レジスタを起動識別フラグ112に設定する。この処理によって、OS107は、電源瞬断からの復帰であるか否かを判定できる。また、OS107は、システム起動時に、起動識別フラグ112を参照し、電源瞬断の場合、復旧処理を実行する。   As described above, the system in the embedded device according to the present invention designates the instantaneous interruption determination register (A121, B116, C122) to be confirmed when the system is activated in advance as shown in FIG. The read instantaneous interruption determination register (A121, B116, C122) is read, and the read instantaneous interruption determination register is set in the activation identification flag 112. With this process, the OS 107 can determine whether or not the power supply is restored from a power interruption. Further, the OS 107 refers to the activation identification flag 112 when the system is activated, and executes a recovery process in the case of an instantaneous power interruption.

これによって、電源復帰時に正常にシステムが動作することができる。   As a result, the system can operate normally when power is restored.

次に、プロセス管理表(206、207、215)に基づいて、メモリに格納されるデータの格納場所を動的に変化させる処理について説明する。   Next, processing for dynamically changing the storage location of data stored in the memory based on the process management table (206, 207, 215) will be described.

当該処理、図1で示す単一の不揮発性メモリ搭載する組込み機器だけでなく、特に、図6に示すように複数種類の不揮発性メモリを搭載する組込み機器、又は、図7に示すように不揮発性メモリと揮発性メモリとを搭載する組込み機器に最適である。まず、図6及び図7の組込み機器のシステム構成を説明する。   This process is not limited to the embedded device having the single nonvolatile memory shown in FIG. 1, but in particular, the embedded device having a plurality of types of nonvolatile memories as shown in FIG. 6, or the nonvolatile device as shown in FIG. It is most suitable for embedded devices equipped with volatile memory and volatile memory. First, the system configuration of the embedded device shown in FIGS. 6 and 7 will be described.

図6は、本発明の実施形態の組込み機器の構成の一例を説明するブロック図である。   FIG. 6 is a block diagram illustrating an example of the configuration of the embedded device according to the embodiment of this invention.

図1に示す組込み機器の構成と比べ、図6に示す組込み機器の構成は、特性の異なる複数種類の不揮発性メモリを搭載する。不揮発性メモリの特性は、例えば、読み出し及び書き込みが高速な高性能メモリ、又は、読み出しが高速で書き込みが低速な低性能メモリなどである。以下、図1との差異を中心に説明する。   Compared with the configuration of the embedded device shown in FIG. 1, the configuration of the embedded device shown in FIG. 6 includes a plurality of types of nonvolatile memories having different characteristics. The characteristics of the nonvolatile memory are, for example, a high-performance memory that reads and writes at high speed, or a low-performance memory that reads at high speed and writes slowly. Hereinafter, the difference from FIG. 1 will be mainly described.

プロセッサ104は、新たにメモリ管理ユニット607を含む。   The processor 104 newly includes a memory management unit 607.

メモリ管理ユニット607は、TLB(Table Lookup Buffer)614を含む。メモリ管理ユニット607は、TLB614を用いて、範囲626に示すような論理アドレス空間628と物理アドレス空間627との変換を実行する。   The memory management unit 607 includes a TLB (Table Lookup Buffer) 614. The memory management unit 607 uses the TLB 614 to perform conversion between the logical address space 628 and the physical address space 627 as indicated by the range 626.

TLB614は、論理物理変換テーブル105のうち、範囲626に示すような利用頻度が高い論理アドレス及び物理アドレスの対応情報を保持する。通常、TLB614によって保持されていないアドレスへアクセスされた場合、論理物理変換テーブル105にアクセスする必要があり、アドレス変換処理の時間がかかるが、TLB614がアクセス先のアドレス情報を保持することによって、メモリ管理ユニット607の変換処理を高速化することができる。   The TLB 614 holds correspondence information between logical addresses and physical addresses having a high use frequency as shown in the range 626 in the logical-physical conversion table 105. Normally, when an address that is not held by the TLB 614 is accessed, it is necessary to access the logical-physical translation table 105, and it takes time for the address translation processing. However, the TLB 614 holds the address information of the access destination, The conversion process of the management unit 607 can be speeded up.

TLB614によって保持されていないアドレスへアクセスされた場合を、TLBミスと呼ぶ。   A case where an address not held by the TLB 614 is accessed is called a TLB miss.

また、論理アドレス空間628及び物理アドレス空間627は、一定サイズの領域単位であるページ毎に対応付けされる。一般的に、ページのサイズは、4kバイト程度であることが多い。以下、論理アドレス空間628におけるページを論理ページ623と呼び、また、物理アドレス空間627におけるページを物理ページ621と呼ぶ。ただし、論理ページ623は1〜nまでの数だけ存在し、また、物理ページ621は1〜mまでの数だけ存在する。   Further, the logical address space 628 and the physical address space 627 are associated with each page, which is an area unit of a certain size. In general, the page size is often about 4 kbytes. Hereinafter, a page in the logical address space 628 is referred to as a logical page 623, and a page in the physical address space 627 is referred to as a physical page 621. However, there are as many logical pages 623 as 1 to n, and there are as many physical pages 621 as 1 to m.

図6に示す組込み機器の構成は、不揮発性メモリA601、不揮発性メモリB630、不揮発性メモリC616、及びストレージ602を備える。   The configuration of the embedded device shown in FIG. 6 includes a nonvolatile memory A 601, a nonvolatile memory B 630, a nonvolatile memory C 616, and a storage 602.

ROM領域119は、不揮発性メモリA601に構成される。不揮発性メモリA601としては、例えば、ROM、又はNOR型メモリ等が考えられる。   The ROM area 119 is configured in the nonvolatile memory A601. As the non-volatile memory A601, for example, a ROM or a NOR type memory can be considered.

主記憶領域113は、不揮発性メモリB630と不揮発性メモリC616に構成される。不揮発性メモリB630は、例えば、SP−RAMなどの高速ランダムアクセス可能なメモリが考えられる。また、不揮発性メモリC616は、NOR型メモリなどの不揮発性メモリB630より書き込み速度が遅く、ランダム読み出しが可能なメモリが考えられる。   The main storage area 113 is configured by a nonvolatile memory B630 and a nonvolatile memory C616. As the nonvolatile memory B630, for example, a memory capable of high-speed random access such as SP-RAM can be considered. Further, the non-volatile memory C616 may be a memory that is slower in writing speed than the non-volatile memory B630 such as a NOR type memory and can perform random reading.

不揮発性メモリB630は、論理物理変換テーブル105を含む。論理物理変換テーブル105は、仮想アドレスをサポートしているシステムにおける論理アドレスと物理アドレスとの対応、及び各アドレス空間(物理アドレス空間627及び論理アドレス空間628)におけるページの属性を管理する。   The nonvolatile memory B 630 includes a logical / physical conversion table 105. The logical-physical translation table 105 manages the correspondence between logical addresses and physical addresses in a system that supports virtual addresses, and page attributes in each address space (physical address space 627 and logical address space 628).

ここで、本実施形態では、メモリ特性に応じて、分散させてプロセスのコード、データを格納する。例えば、優先度が高いプロセスの更新が発生するデータ領域が不揮発性メモリB630に格納され、優先度が低いプロセスのデータ領域、当該プロセスのコード部、及びデータ領域内の定数部分が不揮発性メモリC616に格納される方法が考えられる。つまり、更新の頻度の高いデータは書き込み及び読み出しが高速な不揮発性メモリ(この場合は、不揮発性メモリB630)に格納され、更新の頻度が低いデータは読み出しが高速で、かつ、書き込みが低速な不揮発性メモリ(この場合は、不揮発性メモリC616)に格納される。   In this embodiment, process codes and data are stored in a distributed manner in accordance with memory characteristics. For example, a data area in which a process update with a high priority occurs is stored in the nonvolatile memory B 630, and a data area of a process with a low priority, a code part of the process, and a constant part in the data area are stored in the nonvolatile memory C616. Can be stored in That is, data with a high update frequency is stored in a non-volatile memory (in this case, the non-volatile memory B 630) that is written and read at high speed, and data with a low update frequency is read at a high speed and written at a low speed. It is stored in a nonvolatile memory (in this case, the nonvolatile memory C616).

一般的に、不揮発性メモリB630のような高性能メモリは価格が高く、不揮発性メモリC616のような低性能メモリは価格が安く、このような組込み機器の構成にすることによって、組込機器の製造コストを抑えることができる。   In general, a high-performance memory such as the non-volatile memory B630 is expensive, and a low-performance memory such as the non-volatile memory C616 is low in price. Manufacturing cost can be reduced.

ストレージ602に格納されるデータは、図1におけるストレージ領域114と同一のものである。また、本実施形態におけるストレージ602は、HDD、又はFlashメモリ等が考えられる。   Data stored in the storage 602 is the same as the storage area 114 in FIG. Further, the storage 602 in the present embodiment may be an HDD, a flash memory, or the like.

なお、不揮発性メモリとストレージの組み合わせは一例であり、その他の組み合わせでもよい。   The combination of the nonvolatile memory and the storage is an example, and other combinations may be used.

図7は、本発明の実施形態の組込み機器の構成の一例を説明するブロック図である。   FIG. 7 is a block diagram illustrating an example of the configuration of the embedded device according to the embodiment of this invention.

図6と比較して、図7の組込み機器のシステムは、不揮発性メモリC616の代わりに、揮発性メモリ701を備える。揮発性メモリ701に格納されるデータは、不揮発性メモリC616と同一のものである。   Compared to FIG. 6, the system of the embedded device of FIG. 7 includes a volatile memory 701 instead of the nonvolatile memory C616. The data stored in the volatile memory 701 is the same as that of the nonvolatile memory C616.

揮発性メモリ701に格納されるデータは、システムの電源が遮断されたときに失われるが、ストレージ602に格納されるデータを読み出すことによって復元することができる。   Data stored in the volatile memory 701 is lost when the system is powered off, but can be restored by reading the data stored in the storage 602.

以下、図6及び図7を例に具体的な処理について説明する。なお、図1においても、プロセッサ104がメモリ管理ユニット607論理物理変換テーブルを含む場合は同様の処理を行うことができる。   Hereinafter, specific processing will be described with reference to FIGS. 6 and 7 as an example. Also in FIG. 1, when the processor 104 includes the memory management unit 607 logical-physical conversion table, the same processing can be performed.

図8Aは、本発明の実施形態における論理物理変換テーブル105が含む基本データ801の一例を示す図である。   FIG. 8A is a diagram illustrating an example of basic data 801 included in the logical-physical conversion table 105 according to the embodiment of this invention.

基本データ801は、各ページ(物理ページ621及び論理ページ623)の基本情報を管理する。   The basic data 801 manages basic information of each page (physical page 621 and logical page 623).

基本データ801は、ページID803、論理アドレス804、物理アドレス805、及び属性811を含む。   The basic data 801 includes a page ID 803, a logical address 804, a physical address 805, and an attribute 811.

ページID803は、各ページ(物理ページ621及び論理ページ623)を識別するための識別子を格納する。   The page ID 803 stores an identifier for identifying each page (physical page 621 and logical page 623).

論理アドレス804は、各ページ(物理ページ621及び論理ページ623)に対応する論理アドレスを格納する。   The logical address 804 stores a logical address corresponding to each page (physical page 621 and logical page 623).

物理アドレス805は、各ページ(物理ページ621及び論理ページ623)に対応する物理アドレスを格納する。なお、メモリ上に対応するデータが存在しない場合、物理アドレス805には、「0xffffff」が格納される。ただし、実アドレスとして無効な値であれば、どのような値であってもよい。   The physical address 805 stores a physical address corresponding to each page (physical page 621 and logical page 623). If there is no corresponding data on the memory, “0xffffff” is stored in the physical address 805. However, any value may be used as long as it is an invalid value as a real address.

属性811は、各ページ(物理ページ621及び論理ページ623)の属性が格納される。属性811は、さらに、書き込み許可806、アクセス可能プロセス807、メモリID808、及びストレージへ退避809を含む。   The attribute 811 stores the attribute of each page (physical page 621 and logical page 623). The attribute 811 further includes a write permission 806, an accessible process 807, a memory ID 808, and a save to storage 809.

書き込み許可806は、ページID803に対応するページ(物理ページ621及び論理ページ623)に書き込みが許可されているか否かを示す値を格納する。例えば、各ページ(物理ページ621及び論理ページ623)に書き込みが許可されている場合、「y」が格納され、各ページ(物理ページ621及び論理ページ623)に書き込みが許可されていない場合、「n」が格納される。   The write permission 806 stores a value indicating whether or not writing is permitted to the page (physical page 621 and logical page 623) corresponding to the page ID 803. For example, when writing is permitted for each page (physical page 621 and logical page 623), “y” is stored, and when writing is not permitted for each page (physical page 621 and logical page 623), “ n "is stored.

アクセス可能プロセス807は、ページID803に対応するページ(物理ページ621及び論理ページ623)にアクセスが可能なプロセスの一覧を格納する。   The accessible process 807 stores a list of processes that can access the page (physical page 621 and logical page 623) corresponding to the page ID 803.

メモリID808は、ページID803に対応するページ(物理ページ621及び論理ページ623)が存在するメモリを識別する識別子を格納する。メモリID808は、メモリタイプID223と同一のものである。   The memory ID 808 stores an identifier for identifying a memory in which a page (physical page 621 and logical page 623) corresponding to the page ID 803 exists. The memory ID 808 is the same as the memory type ID 223.

ストレージへ退避809は、ページID803に対応するページ(物理ページ621及び論理ページ623)に格納されている情報がストレージ602に退避しているか否かを示す情報を格納する。例えば、ページID803に対応するページ(物理ページ621及び論理ページ623)に格納されている情報がストレージ602に退避している場合、「y」が格納され、ページID803に対応するページ(物理ページ621及び論理ページ623)に格納されている情報がストレージ602に退避していない場合、「n」が格納される。   The save to storage 809 stores information indicating whether the information stored in the page (physical page 621 and logical page 623) corresponding to the page ID 803 has been saved to the storage 602. For example, when information stored in the page corresponding to the page ID 803 (physical page 621 and logical page 623) is saved in the storage 602, “y” is stored and the page corresponding to the page ID 803 (physical page 621). When the information stored in the logical page 623) is not saved in the storage 602, “n” is stored.

図8Bは、本発明の実施形態における論理物理変換テーブル105が含む拡張データ802の一例を示す図である。   FIG. 8B is a diagram illustrating an example of the extended data 802 included in the logical-physical conversion table 105 according to the embodiment of this invention.

拡張データ802は、各ページ(物理ページ621及び論理ページ623)の入れ替え処理に参照される情報を管理する。   The extended data 802 manages information that is referred to in the process of replacing each page (physical page 621 and logical page 623).

拡張データ802は、ページID812、総合優先度813、及び入替フラグ810を含む。   The extended data 802 includes a page ID 812, a general priority 813, and a replacement flag 810.

ページID812は、ページID803と同一のものである。   The page ID 812 is the same as the page ID 803.

総合優先度813は、総合優先度209と同一のものである。ページ(物理ページ621及び論理ページ623)の総合優先度813は、プロセスの相互優先度209によって決定される。つまり、ページID812に対応するページには、当該総合優先度813に対応するプロセスが格納されていることを示している。   The general priority 813 is the same as the general priority 209. The overall priority 813 of the page (physical page 621 and logical page 623) is determined by the mutual priority 209 of the process. That is, the page corresponding to the page ID 812 indicates that the process corresponding to the general priority 813 is stored.

入替フラグ810は、ページを入れ替えるか否かを示す値、及び、入れ替えられるページのペアを識別する値を格納する。具体的には、ページが入れ替えられる場合は、「0」以上の値が格納され、ページが入れ替えられない場合は、「−1」が格納される。また、入れ替えられるページの入替フラグ810は、入れ替え元のページと入れ替え先のページとに同一の値が格納される。なお、入替フラグ810は、OS107が割り振る。   The replacement flag 810 stores a value indicating whether to replace pages and a value for identifying a pair of pages to be replaced. Specifically, when the page is replaced, a value of “0” or more is stored, and when the page is not replaced, “−1” is stored. Further, the replacement flag 810 of the page to be replaced stores the same value in the replacement source page and the replacement destination page. The replacement flag 810 is assigned by the OS 107.

図9A、図9B及び図9Cは、本発明のシステム起動及び処理の再開の流れを説明するフローチャートである。   FIG. 9A, FIG. 9B, and FIG. 9C are flowcharts for explaining the flow of system activation and process restart according to the present invention.

電源復帰処理機能111は、起動識別フラグを確認する(ステップ901)。   The power recovery processing function 111 confirms the activation identification flag (step 901).

電源復帰処理機能111は、起動識別フラグ112が「1」であるか否かを判定する(ステップ902)。   The power recovery processing function 111 determines whether or not the activation identification flag 112 is “1” (step 902).

起動識別フラグ112が「1」であると判定された場合、電源復帰処理機能111は、プロセス管理表106に含まれる拡張データ207を参照し、起動直後212の値が大きい順にプロセス管理表106のエントリを並び替える(ステップ903)。   When it is determined that the activation identification flag 112 is “1”, the power recovery processing function 111 refers to the extended data 207 included in the process management table 106 and sets the values in the process management table 106 in descending order of the value 212 immediately after activation. The entries are rearranged (step 903).

電源復帰処理機能111は、プロセッサ104が不揮発性であるか否かを判定する(ステップ904)。   The power recovery processing function 111 determines whether the processor 104 is non-volatile (step 904).

プロセッサ104が不揮発性でないと判定された場合、電源復帰処理機能111は、プロセス管理表106の各データを参照し、全てのエントリについて処理が終了したか否かを判定する(ステップ905)。   When it is determined that the processor 104 is not nonvolatile, the power recovery processing function 111 refers to each data in the process management table 106 and determines whether or not processing has been completed for all entries (step 905).

全てのエントリについて処理が終了したと判定された場合、電源復帰処理機能111は、ステップ916に進む。   When it is determined that the processing has been completed for all entries, the power recovery processing function 111 proceeds to step 916.

全てのエントリについて処理が終了していないと判定された場合、電源復帰処理機能111は、プロセス管理表106から一つエントリを読み出し、当該エントリのプロセスID201に対応するプロセスの情報が、全て不揮発性メモリに格納されているか否かを判定する(ステップ906)。   When it is determined that the processing has not been completed for all entries, the power recovery processing function 111 reads one entry from the process management table 106, and the process information corresponding to the process ID 201 of the entry is all non-volatile. It is determined whether it is stored in the memory (step 906).

プロセスID201に対応するプロセスの情報が、全て不揮発性メモリに格納されていると判定された場合、電源復帰処理機能111は、不揮発性メモリに格納されている情報に基づいて、プロセスID201に対応するプロセスのステート205が「実行中」であるプロセスを再起動し(ステップ907)、ステップ905に戻る。   When it is determined that all the process information corresponding to the process ID 201 is stored in the nonvolatile memory, the power recovery processing function 111 corresponds to the process ID 201 based on the information stored in the nonvolatile memory. A process whose process state 205 is “executing” is restarted (step 907), and the process returns to step 905.

プロセスID201に対応するプロセスの情報が、不揮発性メモリ以外にも格納されていると判定された場合、電源復帰処理機能111は、プロセスID201に対応するプロセスの一部の情報が不揮発性メモリに格納されているか否かを判定する(ステップ908)。   When it is determined that the process information corresponding to the process ID 201 is stored in addition to the nonvolatile memory, the power recovery processing function 111 stores part of the information corresponding to the process ID 201 in the nonvolatile memory. It is determined whether it has been performed (step 908).

プロセスID201に対応するプロセスの一部の情報が不揮発性メモリに格納されていると判定された場合、電源復帰処理機能111は、プロセスID201に対応するプロセスの情報のうち不揮発性メモリに格納されていない情報をストレージ602から読み出し、不揮発性メモリに格納されている情報及び読み出された情報に基づいて、プロセスを再起動し(ステップ909)、ステップ905に戻る。   When it is determined that a part of the process information corresponding to the process ID 201 is stored in the nonvolatile memory, the power recovery processing function 111 is stored in the nonvolatile memory among the process information corresponding to the process ID 201. Information is read from the storage 602, the process is restarted based on the information stored in the nonvolatile memory and the read information (step 909), and the process returns to step 905.

プロセスID201に対応するプロセスの全ての情報が不揮発性メモリに格納されていないと判定された場合、電源復帰処理機能111は、プロセスID201に対応するプロセスの全ての情報をストレージ602から読み出し、読み出された情報に基づいてプロセスを再起動し(ステップ921)、ステップ905に戻る。   When it is determined that not all the information of the process corresponding to the process ID 201 is stored in the nonvolatile memory, the power recovery processing function 111 reads all the information of the process corresponding to the process ID 201 from the storage 602 and reads The process is restarted based on the information (step 921), and the process returns to step 905.

ステップ904において、プロセッサ104が不揮発性であると判定された場合、電源復帰処理機能111は、プロセス管理表106の各データを参照し、全てのエントリについて処理が終了したか否かを判定する(ステップ910)。プロセッサ104が不揮発性の場合、プロセッサ104は保持する情報については復旧できるため、ステップ910以下の処理において、メモリに格納されている情報の異常が発生した部分について、改めてストレージ602から必要な情報を読み出す処理が実行される。   If it is determined in step 904 that the processor 104 is non-volatile, the power recovery processing function 111 refers to each data in the process management table 106 and determines whether or not processing has been completed for all entries ( Step 910). When the processor 104 is nonvolatile, the processor 104 can recover the stored information. Therefore, in the processing from step 910 onward, the necessary information from the storage 602 is newly obtained for the portion where the abnormality of the information stored in the memory has occurred. A reading process is executed.

全てのエントリについて処理が終了したと判定された場合、電源復帰処理機能111は、ステップ916に進む。   When it is determined that the processing has been completed for all entries, the power recovery processing function 111 proceeds to step 916.

全てのエントリについて処理が終了していないと判定された場合、電源復帰処理機能111は、プロセス管理表106から一つエントリを読み出し、当該エントリのプロセスID201に対応するプロセスの情報が、全て不揮発性メモリに格納されているか否かを判定する(ステップ911)。   When it is determined that the processing has not been completed for all entries, the power recovery processing function 111 reads one entry from the process management table 106, and the process information corresponding to the process ID 201 of the entry is all non-volatile. It is determined whether it is stored in the memory (step 911).

プロセスID201に対応するプロセスの情報が、全て不揮発性メモリに格納されていると判定された場合、電源復帰処理機能111は、不揮発性メモリに格納される情報に基づいて、プロセスID201に対応するプロセスを再開し(ステップ912)、ステップ910に戻る。   When it is determined that all the process information corresponding to the process ID 201 is stored in the nonvolatile memory, the power recovery processing function 111 performs the process corresponding to the process ID 201 based on the information stored in the nonvolatile memory. Is resumed (step 912), and the process returns to step 910.

プロセスID201に対応するプロセスの情報が不揮発性メモリ以外にも格納されていると判定された場合、電源復帰処理機能111は、プロセスID201に対応するプロセスのデータ領域220の更新部のみの情報がメモリに格納されているか否かを判定する(ステップ913)。   When it is determined that the process information corresponding to the process ID 201 is stored in a memory other than the nonvolatile memory, the power recovery processing function 111 stores only information on the update unit of the data area 220 of the process corresponding to the process ID 201 in the memory. (Step 913).

プロセスID201に対応するプロセスのデータ領域220の更新部のみの情報がメモリに格納されていると判定された場合、電源復帰処理機能111は、プロセスID201に対応するプロセスのコード部及び定数221をストレージ602から読み出し、メモリに格納された情報と読み出された情報に基づいて、中断されていたプロセスを再開し(ステップ914)、ステップ910に戻る。   When it is determined that the information of only the update part of the data area 220 of the process corresponding to the process ID 201 is stored in the memory, the power recovery processing function 111 stores the code part of the process corresponding to the process ID 201 and the constant 221. Based on the information read from 602 and stored in the memory and the read information, the suspended process is resumed (step 914), and the process returns to step 910.

プロセスID201に対応するプロセスのデータ領域220の更新部以外の情報がメモリに格納されていると判定された場合、プロセスID201に対応するプロセスの全ての情報をストレージ602から読み出し、読み出された情報に基づいてプロセスを再起動し(ステップ915)、ステップ910に戻る。   When it is determined that information other than the update part of the data area 220 of the process corresponding to the process ID 201 is stored in the memory, all information of the process corresponding to the process ID 201 is read from the storage 602, and the read information And restart the process (step 915) and return to step 910.

ステップ902において、確認された起動識別フラグ112が「1」でないと判定された場合、電源復帰処理機能111は、システムを初期化し(ステップ919)、起動識別フラグに「1」を設定し(ステップ920)、ステップ916に進む。   When it is determined in step 902 that the confirmed activation identification flag 112 is not “1”, the power recovery processing function 111 initializes the system (step 919) and sets “1” in the activation identification flag (step 919). 920), the process proceeds to step 916.

電源復帰処理機能111は、全てのデバイスドライバの状態を確認し(ステップ916)、中断処理が再開できるか否かを判定する(ステップ917)。なお、ステップ916及びステップ917は、ステップ406及びステップ407と同様の処理である。   The power recovery processing function 111 checks the status of all device drivers (step 916), and determines whether the interruption processing can be resumed (step 917). Steps 916 and 917 are the same processing as steps 406 and 407.

中断処理が再開できないと判定された場合、電源復帰処理機能111は、呼び出し元のプロセスへ異常終了通知を送信し(ステップ918)、処理を終了する。   When it is determined that the interruption process cannot be resumed, the power recovery processing function 111 transmits an abnormal termination notification to the calling process (step 918) and ends the process.

中断処理が再開できると判定された場合、電源復帰処理機能111は、処理を終了する。   When it is determined that the interruption process can be resumed, the power recovery processing function 111 ends the process.

図10A、図10B及び図10Cは、本発明の実施形態において、複数メモリが存在する組込機器の構成におけるプロセス、及びページ入れ替え処理を説明するフローチャートである。   FIG. 10A, FIG. 10B, and FIG. 10C are flowcharts for explaining a process and a page replacement process in the configuration of an embedded device having a plurality of memories in the embodiment of the present invention.

当該処理が実行されるタイミングは、TLBミスが発生したとき、又はUIプロセスからバックグラウンドプロセスへ処理が切り替えられるときが考えられる。以下の説明において処理のきっかけとなるプロセスを「プロセスA」と呼ぶ。   The timing at which the process is executed may be when a TLB miss occurs or when the process is switched from the UI process to the background process. In the following description, a process that triggers processing is referred to as “process A”.

OS107は、システムがアイドル状態であるか否かを判定する(ステップ1001)。   The OS 107 determines whether or not the system is in an idle state (step 1001).

システムがアイドル状態であると判定された場合、OS107は、論理物理変換テーブル105からページ一覧を取得し、取得されたページが割り当てられるメモリの性能が高い順に、取得されたページ一覧のエントリを並び替え、さらに、各メモリに格納されるページの総合優先度813が小さい順に、当該メモリに格納されるページ一覧のエントリを並び替える(ステップ1002)。なお、メモリの性能は、メモリID808に基づいて、メモリタイプ定義表217を参照して判定される。   When it is determined that the system is in an idle state, the OS 107 acquires a page list from the logical-physical conversion table 105, and arranges the acquired page list entries in descending order of memory performance to which the acquired page is allocated. In addition, the entries in the page list stored in the memory are rearranged in the order of decreasing overall priority 813 of the pages stored in each memory (step 1002). Note that the performance of the memory is determined with reference to the memory type definition table 217 based on the memory ID 808.

OS107は、取得されたページ一覧の全てのエントリについて処理が終了したか否かを判定する(ステップ1003)。   The OS 107 determines whether or not processing has been completed for all entries in the acquired page list (step 1003).

取得されたページ一覧の全てのエントリについて処理が終了していると判定された場合、OS107は、処理を終了する。   When it is determined that the processing has been completed for all entries in the acquired page list, the OS 107 ends the processing.

取得されたページ一覧の全てのエントリについて処理が終了していないと判定された場合、OS107は、ステップ1002で並べ替えられたエントリを上から順に読み出し、読み出されたページと他のページの総合優先度813を比較し、総合優先度813の小さいページが高性能メモリに格納され、総合優先度813の大きいページが低性能メモリに格納されているか否かを判定する(ステップ1004)。   If it is determined that the processing has not been completed for all entries in the acquired page list, the OS 107 reads the entries rearranged in step 1002 in order from the top, and combines the read page and other pages. The priority levels 813 are compared, and it is determined whether a page with a low overall priority level 813 is stored in the high performance memory and a page with a high overall priority level 813 is stored in the low performance memory (step 1004).

総合優先度813の小さいページが高性能メモリに格納され、総合優先度813の大きいページが低性能メモリに格納されていないと判定された場合、OS107は、ステップ1003に戻る。   If it is determined that a page with a low overall priority 813 is stored in the high performance memory and a page with a high overall priority 813 is not stored in the low performance memory, the OS 107 returns to step 1003.

総合優先度813の小さいページが高性能メモリに格納され、総合優先度813の大きいページが低性能メモリに格納されていると判定された場合、OS107は、総合優先度813の小さいページ及び総合優先度813の大きいページの入替フラグ810に同一の値を設定し(ステップ1005)、ステップ1003に戻る。なお、複数のページの組が存在する場合、入替フラグ810の値は、ページの組が増える毎に1加算した値が設定される方法が考えられる。ただし、入れ替えられるページを識別できればどのような値であってもよい。   If it is determined that a page with a low overall priority 813 is stored in the high performance memory and a page with a high overall priority 813 is stored in the low performance memory, the OS 107 determines that the page with the low overall priority 813 and the overall priority are stored. The same value is set in the replacement flag 810 of the large page having the degree 813 (step 1005), and the process returns to step 1003. When there are a plurality of page pairs, a method may be considered in which the value of the replacement flag 810 is set to a value obtained by adding 1 each time the page pair increases. However, any value may be used as long as the page to be replaced can be identified.

ステップ1001において、システムがアイドル状態でないと判定された場合、OS107は、プロセスAについてのアクセスにおいて、TLBミスが発生したか否かを判定する(ステップ1006)。   When it is determined in step 1001 that the system is not in the idle state, the OS 107 determines whether or not a TLB miss has occurred in access to the process A (step 1006).

プロセスAについてのアクセスにおいて、TLBミスが発生したと判定された場合、OS107は、論理物理変換テーブル105から、当該プロセスAのアクセス対象のページに関する情報を取得し、取得された情報をTLB714に格納する(ステップ1007)。   When it is determined that a TLB miss has occurred in the access to the process A, the OS 107 acquires information regarding the page to be accessed by the process A from the logical-physical conversion table 105, and stores the acquired information in the TLB 714. (Step 1007).

OS107は、プロセスAの総合優先度813より低い総合優先度813のページを、入替対象ページ一覧として論理物理変換テーブル105から取得する(ステップ1008)。   The OS 107 acquires a page having a general priority 813 lower than the general priority 813 of the process A from the logical physical conversion table 105 as a replacement target page list (step 1008).

OS107は、入替対象ページが存在するか否かを判定する(ステップ1009)。   The OS 107 determines whether or not a replacement target page exists (step 1009).

入替対象ページが存在すると判定された場合、OS107は、取得された入替対象ページが割り当てられているメモリの性能の高い順に、取得された入替対象ページ一覧のエントリを並び替え、さらに、各メモリに格納されるページの総合優先度813の小さい順に、取得された入替対象ページ一覧のエントリを並び替える(ステップ1010)。   When it is determined that there is a replacement target page, the OS 107 rearranges the acquired replacement target page list entries in descending order of the performance of the memory to which the acquired replacement target page is allocated, and further stores each page in each memory. The entries of the acquired replacement target page list are rearranged in the order of the total priority 813 of the stored pages (step 1010).

OS107は、性能が高いメモリから順に、当該メモリの空き領域を検索する(ステップ1011)。   The OS 107 searches for free areas in the memory in descending order of performance (step 1011).

OS107は、ステップ1011における検索の結果、空き領域が存在するか否かを判定する(ステップ1012)。   The OS 107 determines whether a free area exists as a result of the search in step 1011 (step 1012).

空き領域が存在しないと判定された場合、OS107は、並び替えられた結果の最上位のページをストレージ602へ退避させ、空き領域を確保し(ステップ1014)、ステップ1015に進む。   If it is determined that there is no free area, the OS 107 saves the top page of the rearranged result to the storage 602, secures a free area (step 1014), and proceeds to step 1015.

空き領域が存在すると判定された場合、又はステップ1014において空き領域が確保された場合、OS107は、プロセスAのアクセス対象のページを当該空き領域に格納し(ステップ1015)、処理を終了する。   If it is determined that there is a free area, or if a free area is secured in step 1014, the OS 107 stores the page to be accessed by process A in the free area (step 1015), and ends the process.

ステップ1009において、入替対象ページが存在しないと判定された場合、OS107は、論理物理変換テーブル105からプロセスAの総合優先度813の次に大きい総合優先度813のページを取得する(ステップ1016)。   If it is determined in step 1009 that there is no replacement target page, the OS 107 acquires a page with the overall priority 813 that is the next higher than the overall priority 813 of the process A from the logical-physical conversion table 105 (step 1016).

OS107は、取得されたページをストレージ602に退避させ、空き領域を確保する(ステップ1017)。   The OS 107 saves the acquired page in the storage 602 and secures a free area (step 1017).

OS107は、確保された空き領域にプロセスAのアクセス対象のページを格納する(ステップ1018)。   The OS 107 stores the page to be accessed by the process A in the reserved free space (step 1018).

ステップ1006において、プロセスAについてのアクセスにおいて、TLBミスが発生していないと判定された場合、OS107は、UIプロセスからバックグラウンドプロセスへ切り替えであるか否かを判定する(ステップ1019)。   If it is determined in step 1006 that a TLB miss has not occurred in access to the process A, the OS 107 determines whether or not the UI process is switched to the background process (step 1019).

UIプロセスからバックグラウンドプロセスへ切り替えでないと判定された場合、OS107は、処理を終了する。   If it is determined that switching from the UI process to the background process is not performed, the OS 107 ends the process.

UIプロセスからバックグラウンドプロセスへ切り替えであると判定された場合、OS107は、論理物理変換テーブル105の各入替フラグ810を参照し、入替フラグ810が設定されている全てのページについて入替処理が実行されたか否かを判定する(ステップ1020)。   When it is determined that the switching is from the UI process to the background process, the OS 107 refers to each replacement flag 810 of the logical-physical conversion table 105, and replacement processing is executed for all pages for which the replacement flag 810 is set. It is determined whether or not (step 1020).

入替フラグ810が設定されている全てのページについて入替処理が実行されたと判定された場合、OS107は、処理を終了する。   When it is determined that the replacement process has been executed for all pages for which the replacement flag 810 is set, the OS 107 ends the process.

入替フラグ810が設定されている全てのページについて入替処理を実行していないと判定された場合、OS107は、入替フラグ810が設定されたページの入替処理を実行し(1021)、ステップ1020に戻る。   If it is determined that the replacement process has not been executed for all the pages for which the replacement flag 810 is set, the OS 107 executes the replacement process for the page for which the replacement flag 810 is set (1021), and returns to Step 1020. .

なお、プロセッサ104がマルチタスクで動作し、同時並行で実行される処理の負荷が増大する場合、OS107は、ステップ1020、及びステップ1021の処理を中断する。   Note that when the processor 104 operates in multitasking and the load of processing to be executed in parallel increases, the OS 107 interrupts the processing of step 1020 and step 1021.

従来は、ユーザ操作時においてもページの入れ替えが実行されたため、ユーザ操作中にアイコンの移動など動画像表示がフリーズする場合があった。本発明は、以上の処理によって、UIプロセスからバックグランドプロセスへ切り替えられるときに、ページの入れ替えの処理を実行するため、ユーザ操作に影響を与えないタイミングで、不揮発性メモリへ重要かつ更新が頻発するデータを優先的に順次配置することができる。したがって、揮発領域に存在する重要データの量を削減できるため、システム休止時のデータ退避処理時間を削減できる。   Conventionally, since page replacement is performed even during a user operation, the moving image display such as moving an icon may freeze during the user operation. In the present invention, when switching from the UI process to the background process by the above process, the page replacement process is executed. Therefore, the nonvolatile memory is frequently and frequently updated at a timing that does not affect the user operation. The data to be processed can be arranged sequentially with priority. Therefore, since the amount of important data existing in the volatile area can be reduced, it is possible to reduce the data save processing time when the system is paused.

本発明の実施形態の組込み機器の構成を説明するブロック図である。It is a block diagram explaining the structure of the embedded device of embodiment of this invention. 本発明の実施形態におけるプロセス管理表が含む基本データの一例を示す図である。It is a figure which shows an example of the basic data which the process management table | surface in embodiment of this invention contains. 本発明の実施形態におけるプロセスタイプ定義表の一例を示す図である。It is a figure which shows an example of the process type definition table | surface in embodiment of this invention. 本発明の実施形態におけるプロセス管理表が含む拡張データの一例を示す図である。It is a figure which shows an example of the extension data which the process management table | surface in embodiment of this invention contains. 本発明の実施形態におけるプロセス管理表が含む格納先管理データの一例を示す図である。It is a figure which shows an example of the storage location management data which the process management table | surface in embodiment of this invention contains. 本発明の実施形態におけるメモリタイプ定義表の一例を示す図である。It is a figure which shows an example of the memory type definition table | surface in embodiment of this invention. 本発明の実施形態における起動識別フラグの設定処理を説明するフローチャートである。It is a flowchart explaining the setting process of the starting identification flag in embodiment of this invention. 本発明の実施形態においてOSが起動され、処理を開始するまでの流れを説明するフローチャートである。It is a flowchart explaining the flow until OS starts in the embodiment of this invention until it starts a process. 本発明の実施形態における利用頻度の更新処理を説明するフローチャートである。It is a flowchart explaining the update process of the usage frequency in embodiment of this invention. 本発明の実施形態の組込み機器の構成の一例を説明するブロック図である。It is a block diagram explaining an example of a structure of the embedded apparatus of embodiment of this invention. 本発明の実施形態の組込み機器の構成の一例を説明するブロック図である。It is a block diagram explaining an example of a structure of the embedded apparatus of embodiment of this invention. 本発明の実施形態における論理物理変換テーブルが含む基本データの一例を示す図である。It is a figure which shows an example of the basic data which the logical physical conversion table in embodiment of this invention contains. 本発明の実施形態における論理物理変換テーブルが含む拡張データの一例を示す図である。It is a figure which shows an example of the extension data which the logical physical conversion table in embodiment of this invention contains. 本発明のシステム起動及び処理の再開の流れを説明するフローチャートである。It is a flowchart explaining the flow of the system starting of this invention, and the restart of a process. 本発明のシステム起動及び処理の再開の流れを説明するフローチャートである。It is a flowchart explaining the flow of the system starting of this invention, and the restart of a process. 本発明のシステム起動及び処理の再開の流れを説明するフローチャートである。It is a flowchart explaining the flow of the system starting of this invention, and the restart of a process. 本発明の実施形態において、複数メモリが存在する組込機器の構成におけるプロセス、及びページ入れ替え処理を説明するフローチャートである。In the embodiment of the present invention, it is a flowchart for explaining a process in the configuration of an embedded device having a plurality of memories, and a page replacement process. 本発明の実施形態において、複数メモリが存在する組込機器の構成におけるプロセス、及びページ入れ替え処理を説明するフローチャートである。In the embodiment of the present invention, it is a flowchart for explaining a process in the configuration of an embedded device having a plurality of memories, and a page replacement process. 本発明の実施形態において、複数メモリが存在する組込機器の構成におけるプロセス、及びページ入れ替え処理を説明するフローチャートである。In the embodiment of the present invention, it is a flowchart for explaining a process in the configuration of an embedded device having a plurality of memories, and a page replacement process.

符号の説明Explanation of symbols

101 不揮発性メモリ
102 周辺回路
103 OS管理情報
104 プロセッサ
105 論理物理変換テーブル
106 プロセス管理表
107 OS
108 基本アプリ群
109 対退避データ
110 ファイルシステム/データベース管理
111 電源復帰処理機能
112 起動識別フラグ
113 主記憶領域
114 ストレージ領域
115 プロセス
116 瞬断判定レジスタB
117 書込残チェックカウンタ
118 電源回路
119 ROM領域
120 電源断検出先指定データ
121 瞬断判定レジスタA
122 瞬断判定レジスタC
123 データ記録部
124 正常終了レジスタ
125 各種ファイル
126 デバイスドライバ
601 不揮発性メモリA
602 ストレージ
607 メモリ管理ユニット
614 TLB
616 不揮発性メモリC
621 物理ページ
623 論理ページ
624 範囲
626 範囲
627 物理アドレス空間
628 論理アドレス空間
630 不揮発性メモリB
701 揮発性メモリ
714 TLB
101 Non-volatile memory 102 Peripheral circuit 103 OS management information 104 Processor 105 Logical physical conversion table 106 Process management table 107 OS
108 Basic application group 109 Anti-save data 110 File system / database management 111 Power recovery processing function 112 Start identification flag 113 Main storage area 114 Storage area 115 Process 116 Instantaneous interruption determination register B
117 Remaining write check counter 118 Power supply circuit 119 ROM area 120 Power interruption detection destination designation data 121 Instantaneous interruption determination register A
122 Instantaneous interruption judgment register C
123 Data recording unit 124 Normal end register 125 Various files 126 Device driver 601 Non-volatile memory A
602 Storage 607 Memory management unit 614 TLB
616 Nonvolatile memory C
621 Physical page 623 Logical page 624 Range 626 Range 627 Physical address space 628 Logical address space 630 Non-volatile memory B
701 Volatile memory 714 TLB

Claims (13)

プロセッサと、一以上の不揮発性メモリと、周辺回路とを備える不揮発性メモリを主記憶に用いた装置であって、
前記装置は、前記装置の電源が異常に遮断されたか否かを検出する電源異常遮断判定部と、前記装置の電源が異常遮断されたことを示す情報を格納する電源異常終了通知レジスタとを備え、
前記周辺回路は、電源回路を含み、
前記不揮発性メモリは、オペレーティングシステム、ソフトウェア及びデバイスドライバを格納し、
前記オペレーティングシステムは、前記電源異常遮断判定部を含み、
前記電源異常遮断判定部は、
前記装置の電源投入時に、前記電源異常終了通知レジスタを参照し、
前記電源異常終了通知レジスタが前記装置の電源が異常に遮断されたことを示す情報を格納しており、前記プロセッサが不揮発性のプロセッサでない場合、前記装置の電源が遮断される前に実行されていたプロセスを再起動し、前記デバイスドライバを確認し、
前記電源異常終了通知レジスタが前記装置の電源が異常に遮断されたことを示す情報を格納しており、前記プロセッサが不揮発性のプロセッサである場合、前記装置の電源が遮断される前に実行されていたプロセスを、前記プロセスが中断された処理から再開し、前記デバイスドライバを確認することを特徴とする不揮発性メモリを主記憶に用いた装置。
A device using a nonvolatile memory including a processor, one or more nonvolatile memories, and a peripheral circuit as a main memory,
The apparatus includes a power supply abnormality interruption determination unit that detects whether or not the power supply of the apparatus is abnormally interrupted, and a power supply abnormality end notification register that stores information indicating that the power supply of the apparatus is abnormally interrupted. ,
The peripheral circuit includes a power supply circuit,
The non-volatile memory stores an operating system, software, and device drivers;
The operating system includes the power supply abnormality interruption determination unit,
The power supply abnormality interruption determination unit
When powering on the device, refer to the power supply abnormal end notification register,
The power supply abnormal end notification register stores information indicating that the power supply of the apparatus is abnormally cut off. If the processor is not a non-volatile processor, it is executed before the power supply of the apparatus is cut off. Restart the process, check the device driver,
If the power supply abnormal end notification register stores information indicating that the power supply of the apparatus is abnormally shut down, and the processor is a non-volatile processor, it is executed before the power supply of the apparatus is shut down. An apparatus using a non-volatile memory as a main memory, wherein a process that has been interrupted is resumed from a process in which the process is interrupted, and the device driver is confirmed.
前記装置が受信したデータは所定の単位毎に前記不揮発性メモリに書き込まれ、  The data received by the device is written into the non-volatile memory every predetermined unit,
前記装置は、  The device is
受信したデータを所定の単位毎に前記不揮発性メモリに書き込み、  Write the received data to the non-volatile memory for each predetermined unit,
前記装置が受信したデータのうち前記不揮発性メモリに書き込まれていないデータの単位の有無を示す書込残情報を備え、  It comprises write remaining information indicating the presence or absence of a unit of data that has not been written to the nonvolatile memory among the data received by the device,
前記電源異常遮断判定部は、  The power supply abnormality interruption determination unit
前記装置の電源投入時に前記書込残情報を参照し、  Refer to the remaining write information when the device is turned on,
前記書込残情報が前記未書込のデータの単位があることを示す場合、前記装置の電源が異常に遮断されたと判定し、前記装置の電源が異常に遮断されたことを示す情報を、前記電源異常終了通知レジスタに格納することを特徴とする請求項1に記載の不揮発性メモリを主記憶に用いた装置。  When the remaining write information indicates that there is a unit of unwritten data, it is determined that the power supply of the device is abnormally cut off, and information indicating that the power supply of the device is abnormally cut off, The device using the nonvolatile memory according to claim 1, wherein the device is stored in the power supply abnormal end notification register.
前記プロセッサ、前記不揮発性メモリ、及び前記周辺回路のそれぞれが、前記電源異常終了通知レジスタを備え、  Each of the processor, the nonvolatile memory, and the peripheral circuit includes the power supply abnormal end notification register,
前記電源異常遮断判定部は、前記装置の電源投入時に、前記プロセッサ、不揮発性メモリ、及び周辺回路が備える各電源異常終了通知レジスタを、順次、参照することを特徴とする請求項1又は請求項2に記載の不揮発性メモリを主記憶に用いた装置。  The power supply abnormality interruption determination unit sequentially refers to each of the power supply abnormality end notification registers included in the processor, the nonvolatile memory, and the peripheral circuit when the apparatus is turned on. A device using the nonvolatile memory described in 2 as main memory.
前記装置は、前記プロセッサ、不揮発性メモリ、及び周辺回路が備える電源異常終了通知レジスタの読み出し先を指定する電源断検出先指定情報を保持し、  The apparatus retains power-off detection destination designation information for designating a reading destination of a power supply abnormal end notification register included in the processor, nonvolatile memory, and peripheral circuit,
前記電源異常遮断判定部は、前記装置の電源投入時に、前記電源検出先情報に基づいて、指定された読み出し先の前記電源異常終了通知レジスタを参照することを特徴とする請求項3に記載の不揮発性メモリを主記憶に用いた装置。  The said power supply abnormality interruption | blocking determination part refers to the said power supply abnormality completion notification register of the designated reading destination based on the said power supply detection destination information at the time of power activation of the said apparatus. A device that uses a non-volatile memory as its main memory.
前記装置は、  The device is
さらに、一以上の揮発性メモリ、及び不揮発性記憶媒体を備え、  Furthermore, it comprises one or more volatile memories and a non-volatile storage medium,
前記オペレーティングシステムを管理する情報、及び前記プロセスに関する情報を管理する主記憶部は、前記不揮発性メモリ及び前記揮発性メモリから構成され、  Information for managing the operating system and a main storage unit for managing information related to the process are composed of the nonvolatile memory and the volatile memory,
前記プロセスに関する情報のうち、更新頻度の高い情報が前記不揮発性メモリに格納され、更新頻度の低い情報が前記揮発性メモリに格納され、  Of the information related to the process, information with high update frequency is stored in the nonvolatile memory, information with low update frequency is stored in the volatile memory,
前記不揮発性記憶媒体は、前記プロセスに関する情報を格納し、  The nonvolatile storage medium stores information regarding the process,
前記電源異常遮断判定部は、  The power supply abnormality interruption determination unit
前記装置の電源投入時に、前記揮発性メモリに格納される前記プロセスに関する情報を、前記不揮発性記憶媒体から読み出し、  When the device is turned on, information related to the process stored in the volatile memory is read from the nonvolatile storage medium,
前記読み出されたプロセスに関する情報と、前記不揮発メモリに格納されている情報とに基づいて、前記装置の電源が遮断される前に実行されていたプロセスを、前記プロセスが中断された処理から再開することを特徴とする請求項1から請求項4の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  Based on the information on the read process and the information stored in the nonvolatile memory, the process executed before the power of the device is shut down is restarted from the process at which the process was interrupted. An apparatus using the nonvolatile memory according to at least one of claims 1 to 4 as a main memory.
前記装置は、  The device is
さらに、一以上の揮発性メモリ、及び不揮発性記憶媒体を備え、  Furthermore, it comprises one or more volatile memories and a non-volatile storage medium,
前記オペレーティングシステムを管理する情報、及び前記プロセスに関する情報を管理する主記憶部は、前記不揮発性メモリ及び前記揮発性メモリから構成され、  Information for managing the operating system and a main storage unit for managing information related to the process are composed of the nonvolatile memory and the volatile memory,
前記不揮発性メモリ又は前記揮発性メモリの物理記憶領域に論理記憶領域が作成され、  A logical storage area is created in a physical storage area of the nonvolatile memory or the volatile memory,
前記物理記憶領域は、複数の物理的な単位記憶領域に区分され、  The physical storage area is divided into a plurality of physical unit storage areas,
前記論理記憶領域は、複数の論理的な単位記憶領域に区分され、  The logical storage area is divided into a plurality of logical unit storage areas,
前記プロセスに関する情報のうち、更新頻度の高い情報が前記不揮発性メモリに格納され、更新頻度の低い情報が前記揮発性メモリに格納され、  Of the information related to the process, information with high update frequency is stored in the nonvolatile memory, information with low update frequency is stored in the volatile memory,
前記不揮発性記憶媒体は、前記プロセスに関する情報を格納し、  The nonvolatile storage medium stores information regarding the process,
前記不揮発性メモリは、前記プロセスと、前記プロセスを実行する順位を示すプロセスの優先度とを管理するプロセス管理表、並びに前記物理的な単位記憶領域と前記論理な単位記憶領域との対応を管理する論理物理変換テーブルを備え、  The nonvolatile memory manages a process management table for managing the process and a priority of the process indicating the order of execution of the process, and a correspondence between the physical unit storage area and the logical unit storage area Logical to physical conversion table
前記論理物理変換テーブルは、前記不揮発性メモリ又は前記揮発性メモリにおける前記論理的な単位記憶領域のアドレス及び前記物理的な単位記憶領域のアドレス、前記論理的な記憶領域の優先度、並びに、前記不揮発性メモリ及び前記揮発性メモリの性能を示すメモリ性能情報を含み、  The logical-physical conversion table includes an address of the logical unit storage area and an address of the physical unit storage area in the nonvolatile memory or the volatile memory, a priority of the logical storage area, and the Including memory performance information indicating the performance of the non-volatile memory and the volatile memory,
前記オペレーティングシステムは、  The operating system is
実行される前記プロセスが切り替えられる時に、前記論理的な単位記憶領域の優先度、及び前記メモリ性能情報を参照し、  When the process to be executed is switched, refer to the priority of the logical unit storage area and the memory performance information,
前記メモリ性能情報が低性能である前記不揮発性メモリ又は前記揮発性メモリの前記論理的な単位記憶領域の優先度が大きい第1の論理的な単位記憶領域に第1のプロセスが格納され、前記メモリ性能情報が高性能である前記不揮発性メモリ又は前記揮発性メモリの前記論理的な単位記憶領域の優先度が小さい第2の論理的な単位記憶領域に第2のプロセスが格納される場合、前記第1の論理的な単位記憶領域と、前記第2の論理的な単位記憶領域とを入れ替えることを特徴とする請求項1から請求項5の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  A first process is stored in a first logical unit storage area having a high priority of the logical unit storage area of the nonvolatile memory or the volatile memory in which the memory performance information is low performance, When the second process is stored in a second logical unit storage area having a low priority of the logical unit storage area of the nonvolatile memory or the volatile memory having high memory performance information, 6. The nonvolatile memory according to claim 1, wherein the first logical unit storage area and the second logical unit storage area are interchanged. Equipment used for.
前記論理的な単位記憶領域の優先度は、  The priority of the logical unit storage area is:
前記プロセスの優先度が大きい場合に、大きく設定され、  When the priority of the process is large, it is set large,
前記プロセスの優先度が小さい場合に、小さく設定されることを特徴とする請求項6に記載の不揮発性メモリを主記憶に用いた装置。  The apparatus using the nonvolatile memory according to claim 6, wherein the non-volatile memory is set to be small when the priority of the process is low.
前記プロセス管理表は、ユーザ操作に関する前記プロセスか、又は、バックグランドで実行される前記プロセスかを示す前記プロセスの属性、及び特定のタイミングにおいて前記プロセスが実行される頻度を示す利用頻度を含み、  The process management table includes an attribute of the process indicating whether the process is related to a user operation or the process executed in the background, and a usage frequency indicating a frequency at which the process is executed at a specific timing.
前記プロセスの優先度は、前記プロセスの属性、及び前記利用頻度に基づいて、算出されることを特徴とする請求項6又は請求項7に記載の不揮発性メモリを主記憶に用いた装置。  The apparatus using the nonvolatile memory according to claim 6 or 7, wherein the priority of the process is calculated based on an attribute of the process and the use frequency.
前記オペレーティングシステムは、前記ユーザ操作に関するプロセスから、前記バックグランドで実行されるプロセスに切り替えられる時に、前記第1のプロセスが格納されている第1の論理的な単位記憶領域と、前記第2のプロセスが格納されている第2の論理的な単位記憶領域とを入れ替えることを特徴とする請求項6から請求項8の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  When the operating system is switched from the process related to the user operation to the process executed in the background, the first logical unit storage area in which the first process is stored, and the second 9. The apparatus using the nonvolatile memory as at least one of claims 6 to 8, wherein the second logical unit storage area in which the process is stored is replaced. 前記プロセッサは、前記論理物理変換テーブルのうち前記利用頻度が高い前記プロセスが格納される前記論理的な単位記憶領域に関する情報をキャッシュし、  The processor caches information on the logical unit storage area in which the processes with high usage frequency are stored in the logical-physical conversion table,
前記オペレーティングシステムは、前記プロセッサがキャッシュする論理的な単位記憶領域以外の領域へのアクセスが発生した時に、前記第1の論理的な単位記憶領域と、前記第2の論理的な単位記憶領域とを入れ替えることを特徴とする請求項6から請求項9の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  When the operating system accesses an area other than the logical unit storage area cached by the processor, the operating system includes the first logical unit storage area, the second logical unit storage area, 10. A device using the non-volatile memory according to claim 6 as main memory.
前記プロセッサが、前記電源異常終了通知レジスタを備えることを特徴とする請求項1又は請求項2に記載の不揮発性メモリを主記憶に用いた装置。  The apparatus using the nonvolatile memory according to claim 1 or 2, wherein the processor includes the power supply abnormal end notification register. 前記不揮発性メモリが、前記電源異常終了通知レジスタを備えることを特徴とする請求項1、請求項2又は請求項11の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  12. The apparatus using the nonvolatile memory according to claim 1, 2 or 11, wherein the nonvolatile memory includes the power supply abnormal end notification register. 前記電源回路が、前記電源異常終了通知レジスタを備えることを特徴とする請求項1、請求項2、請求項11又は請求項12の少なくともいずれかに記載の不揮発性メモリを主記憶に用いた装置。  The apparatus using the nonvolatile memory according to at least one of claims 1, 2, 11, and 12, wherein the power supply circuit includes the power supply abnormal end notification register. .
JP2008279770A 2008-10-30 2008-10-30 Device using non-volatile memory as main memory Expired - Fee Related JP5166211B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008279770A JP5166211B2 (en) 2008-10-30 2008-10-30 Device using non-volatile memory as main memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008279770A JP5166211B2 (en) 2008-10-30 2008-10-30 Device using non-volatile memory as main memory

Publications (3)

Publication Number Publication Date
JP2010108253A JP2010108253A (en) 2010-05-13
JP2010108253A5 JP2010108253A5 (en) 2011-03-10
JP5166211B2 true JP5166211B2 (en) 2013-03-21

Family

ID=42297643

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008279770A Expired - Fee Related JP5166211B2 (en) 2008-10-30 2008-10-30 Device using non-volatile memory as main memory

Country Status (1)

Country Link
JP (1) JP5166211B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436598B2 (en) 2011-03-04 2016-09-06 Renesas Electronics Corporation Semiconductor device with nonvolatile memory prevented from malfunctioning caused by momentary power interruption
JP6007529B2 (en) * 2012-03-14 2016-10-12 富士ゼロックス株式会社 Image forming apparatus, information processing apparatus, and program
US9195585B2 (en) 2013-01-23 2015-11-24 Vmware, Inc. Techniques for allocating and surfacing host-side storage capacity to virtual machines
JP2014212425A (en) * 2013-04-18 2014-11-13 株式会社日立国際電気 Radio communication terminal and radio communication start timing control method of radio communication terminal
US9959203B2 (en) * 2014-06-23 2018-05-01 Google Llc Managing storage devices
CN109144214B (en) * 2018-08-06 2022-05-03 交叉信息核心技术研究院(西安)有限公司 Energy management system, method, electronic device, device and nonvolatile processor

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63153652A (en) * 1986-12-17 1988-06-27 Hitachi Ltd Semiconductor integrated circuit
JPH04359305A (en) * 1991-06-05 1992-12-11 Hitachi Ltd Personal computer
FR2691556B1 (en) * 1992-05-25 1994-08-26 Hewlett Packard Co Method and device for starting a computer at a scheduled time.
JPH096749A (en) * 1995-06-15 1997-01-10 Hitachi Ltd Digital signal processor
JPH11231963A (en) * 1998-02-12 1999-08-27 Sanyo Electric Co Ltd Microcomputer
JP2008134785A (en) * 2006-11-28 2008-06-12 Sharp Corp Memory controller

Also Published As

Publication number Publication date
JP2010108253A (en) 2010-05-13

Similar Documents

Publication Publication Date Title
US8621144B2 (en) Accelerated resume from hibernation in a cached disk system
JP4281421B2 (en) Information processing system, control method therefor, and computer program
KR100843543B1 (en) System comprising flash memory device and data recovery method thereof
KR101044220B1 (en) Non-volatile memory cache performance improvement
JP5636034B2 (en) Mediation of mount times for data usage
JP4902501B2 (en) Power control method, computer system, and program
US20150331624A1 (en) Host-controlled flash translation layer snapshot
US20150039837A1 (en) System and method for tiered caching and storage allocation
JP5166211B2 (en) Device using non-volatile memory as main memory
JP4808275B2 (en) Network boot system
US20070130442A1 (en) Apparatus and Methods Using Invalidity Indicators for Buffered Memory
JPH077317B2 (en) System restart device
JP5290287B2 (en) Network boot system
CN111338561B (en) Memory controller and memory page management method
JP5445463B2 (en) Computer system, data storage method and program
US20100205391A1 (en) Memory system and managing method therefor
US20140297927A1 (en) Information processing apparatus, information processing method, and recording medium
KR20140147017A (en) System and method for recovering from an unexpected shutdown in a write-back caching environment
CN111796882A (en) Electronic equipment system processing method and device and electronic equipment
CN113127263A (en) Kernel crash recovery method, device, equipment and storage medium
KR102123701B1 (en) Network boot system
US20140289486A1 (en) Information processing apparatus, information processing method, and recording medium
JP2002258971A (en) Method for restarting computer system
JP2003203007A (en) Nonvolatile area control method for memory of mobile phone
JP4711191B2 (en) Method of using online expansion memory, program and information processing apparatus

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110125

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110125

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120309

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: 20121211

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121220

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20151228

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees