JP2014085908A - Information processor, starting method, and program - Google Patents

Information processor, starting method, and program Download PDF

Info

Publication number
JP2014085908A
JP2014085908A JP2012235482A JP2012235482A JP2014085908A JP 2014085908 A JP2014085908 A JP 2014085908A JP 2012235482 A JP2012235482 A JP 2012235482A JP 2012235482 A JP2012235482 A JP 2012235482A JP 2014085908 A JP2014085908 A JP 2014085908A
Authority
JP
Japan
Prior art keywords
area
kernel
volatile memory
information
initialization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012235482A
Other languages
Japanese (ja)
Other versions
JP6080491B2 (en
Inventor
Kensuke Kato
謙介 加藤
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.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2012235482A priority Critical patent/JP6080491B2/en
Priority to US14/061,218 priority patent/US9904559B2/en
Publication of JP2014085908A publication Critical patent/JP2014085908A/en
Application granted granted Critical
Publication of JP6080491B2 publication Critical patent/JP6080491B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve a problem where the startup time is long because a hibernation start by a kernel function requires processing time involved in a normal start sequence.SOLUTION: In performing hibernation start processing, an information processor suppresses the size of a memory management area to a size required for kernel initialization; enables the use of a work area by reading work area data; and reads compressed data to the work area in parallel with hardware initialization. After the kernel initialization, it expands the compressed data.

Description

本発明は、ハイバネーション機構を有する情報処理装置を高速起動する技術に関する。   The present invention relates to a technique for rapidly starting an information processing apparatus having a hibernation mechanism.

近年、情報処理装置において待機状態の消費電力を低減することができるハイバネーションが注目されている。ハイバネーションとは、システム中断機構である。システムが起動している状態でメモリやCPUレジスタ、デバイスの情報(以下、ハイバネーションイメージと称す)をハードディスクなどの不揮発性記憶装置に退避する。その後電源を切っても、次回起動時は退避させたハイバネーションイメージを読み込むことで以前と同じ状態に復帰する(以下、ハイバネーション起動と称す)。ハイバネーションは、システムの起動時間の短縮を目的として用いられることもある。   In recent years, hibernation that can reduce power consumption in a standby state in an information processing apparatus has attracted attention. Hibernation is a system interruption mechanism. While the system is activated, memory, CPU register, and device information (hereinafter referred to as a hibernation image) is saved in a non-volatile storage device such as a hard disk. Even if the power is turned off, the hibernation image is restored to the same state as before by reading the saved hibernation image at the next startup (hereinafter referred to as hibernation startup). Hibernation is sometimes used for the purpose of shortening the startup time of the system.

ハイバネーションによるシステムの起動方式は大きく2種類に分類される。BIOS機能もしくはブートローダ機能により復帰を行う方式と、オペレーティングシステムのカーネル機能により復帰を行う方式が存在する。   There are two main types of system activation methods by hibernation. There are a method of performing recovery using a BIOS function or a boot loader function, and a method of performing recovery using a kernel function of an operating system.

カーネル機能によるハイバネーション起動では、カーネルの初期化を行った後に、予め不揮発性記憶装置に記憶されたハイバネーションイメージを読み込むことで、ハイバネーション移行前の状態を復元する。BIOSによるハイバネーションと比較すると、通常の起動シーケンスを実行することでデバイスの初期化を行う為、汎用性に優れている。   In the hibernation activation by the kernel function, after the kernel is initialized, the hibernation image stored in advance in the nonvolatile storage device is read to restore the state before the hibernation transition. Compared with BIOS hibernation, the device is initialized by executing a normal startup sequence, which is superior in versatility.

ここで、カーネル機能によるハイバネーションは、BIOSやブートローダによるハイバネーションと比較すると、起動シーケンスに伴う処理時間を要することから、起動時間が長い。そこで、特許文献1のように、ハイバネーションイメージ全体を圧縮して不揮発性記憶装置に退避させる手法がある。   Here, the hibernation by the kernel function requires a longer processing time than the hibernation by the BIOS or the boot loader, so that the startup time is long. Therefore, as in Patent Document 1, there is a method of compressing the entire hibernation image and saving it in a nonvolatile storage device.

特開2001−022464号公報JP 2001-022464 A

DMAコントローラ(ダイレクトメモリアクセスコントローラ)を用いると、CPUによる特定の処理と並行して記憶装置間で情報を読み書きすることができる。そこで、ハイバネーション起動にDMACを組み込むことができると、カーネル初期化と並行してハイバネーションイメージを読み込むことが可能となり、ハイバネーション起動時間を短縮することができる。ただし、Linux(登録商標)などの複雑なメモリ管理機構を備えたカーネル上では、DMAコントローラはカーネルが指定する不特定の領域やカーネルが管理する領域にアクセスし難いため、メモリ領域の任意のアドレスにデータを書き込むことが難しい。そのため、従来のハイバネーション起動方式では、カーネル初期化とDMACで並行してハイバネーションイメージを読み込むことが困難である。   When a DMA controller (direct memory access controller) is used, information can be read and written between storage devices in parallel with specific processing by the CPU. Therefore, if the DMAC can be incorporated in the hibernation activation, the hibernation image can be read in parallel with the kernel initialization, and the hibernation activation time can be shortened. However, on a kernel having a complicated memory management mechanism such as Linux (registered trademark), it is difficult for the DMA controller to access an unspecified area specified by the kernel or an area managed by the kernel. It is difficult to write data in Therefore, in the conventional hibernation activation method, it is difficult to read the hibernation image in parallel with kernel initialization and DMAC.

例えば、特許文献1のようにハイバネーションイメージを圧縮する技術を利用して、カーネル初期化と並行して圧縮データの読み込みを実現するには、読み込み先となる領域が必要になるが、この領域は、カーネル初期化時の空き領域から単純に確保することは難しい。なぜなら、伸張後のデータはハイバネーション移行前と同一のアドレスに配置する必要があり、この伸張先が圧縮データの読み込み先と衝突してしまう可能性があるためである。   For example, in order to realize the reading of compressed data in parallel with the kernel initialization using the technology for compressing the hibernation image as in Patent Document 1, an area to be read is necessary. It is difficult to simply secure from the free space at the time of kernel initialization. This is because the decompressed data must be arranged at the same address as before the hibernation transition, and this decompression destination may collide with the read destination of the compressed data.

上述の課題を達成するために、本発明に係る情報処理装置は、揮発性メモリと、前記揮発性メモリの使用中の領域のデータを圧縮する圧縮手段と、前記圧縮データと前記揮発性メモリの未使用領域のアドレスを含む領域情報とをハイバネーションイメージとして保持する不揮発性メモリと、前記揮発性メモリの少なくとも一部を利用して行われるカーネルの初期化と並行して、前記不揮発性メモリに保持されている前記圧縮データを、前記領域情報に基づいて前記未使用領域の少なくとも一部に読み込む読み込み手段と、前記圧縮データを前記揮発性メモリに伸張する伸張手段と、前記伸張手段により伸張したデータに基づいてシステムを起動させる起動手段とを有することを特徴とする。   In order to achieve the above-described problems, an information processing apparatus according to the present invention includes a volatile memory, a compression unit that compresses data in an area in use of the volatile memory, the compressed data, and the volatile memory. A non-volatile memory that holds area information including addresses of unused areas as a hibernation image, and is held in the non-volatile memory in parallel with a kernel initialization performed using at least a part of the volatile memory. Reading means for reading the compressed data into at least a part of the unused area based on the area information, decompressing means for decompressing the compressed data to the volatile memory, and data decompressed by the decompressing means And starting means for starting the system based on the above.

本発明によれば、カーネルの初期化と並行して圧縮データを先読みしつつ、読み込んだ圧縮データを効率的に伸張することができるので、より高速な起動が可能になる。   According to the present invention, it is possible to efficiently decompress the read compressed data while pre-reading the compressed data in parallel with the initialization of the kernel, so that faster startup is possible.

情報処理装置の構成を示す概略図である。It is the schematic which shows the structure of information processing apparatus. 本発明のハイバネーション機構の機能構成を示す概略図である。It is the schematic which shows the function structure of the hibernation mechanism of this invention. ハイバネーションイメージの生成処理を示すフローチャートである。It is a flowchart which shows the production | generation process of a hibernation image. ハイバネーションイメージのフォーマットを示す図である。It is a figure which shows the format of a hibernation image. ハイバネーションイメージの作業領域データのフォーマットを示す図である。It is a figure which shows the format of the work area data of a hibernation image. ハイバネーションイメージの非圧縮データのフォーマットを示す図である。It is a figure which shows the format of the uncompressed data of a hibernation image. ハイバネーションイメージの圧縮データのフォーマットを示す図である。It is a figure which shows the format of the compression data of a hibernation image. システムの起動処理を示すフローチャートである。It is a flowchart which shows the starting process of a system. カーネルとDMAコントローラのアクセス領域の差異について示す図である。It is a figure which shows about the difference of the access area of a kernel and a DMA controller. ハイバネーションイメージの復帰処理を示すフローチャートである。It is a flowchart which shows the return process of a hibernation image. ハイバネーション起動時の仮想メモリについて示す図である。It is a figure shown about the virtual memory at the time of hibernation starting.

図1に情報処理装置100の概略構成を示す。CPU101や、ダイレクトメモリアクセスコントローラ(以下、DMACと称す)102は、DRAM(DDRSDRAMなどを含む)を備える揮発性メモリ103に対してデータを読み書きする。なお、DMAC102はダイレクトメモリアクセスによって揮発性メモリ103、不揮発性記憶装置105、デバイス106にアクセスできる。入出力制御部(以下、I/Oコントローラと称す)104は、CPU101やDMAC102などの要求に基づいて、不揮発性メモリとしての不揮発性記憶装置(フラッシュメモリ、HDD、SSDなど)105に対する読み書きを行う。デバイス106は、CPU101によって初期化される周辺機器であって、PCI接続のグラフィックボードやUSB接続のスキャナ、プリンタなど様々な機器をデバイス106として用いることができる。デバイス106は其々、自身の状態を保持するステータスレジスタや処理に用いる値(画像処理のパラメータに対応する値や、処理モードを示す値)を保持するコンフィギュレーションレジスタを備える。なお、デバイス106は複数あってもよい。   FIG. 1 shows a schematic configuration of the information processing apparatus 100. The CPU 101 and the direct memory access controller (hereinafter referred to as DMAC) 102 read / write data from / to the volatile memory 103 including a DRAM (including a DDR SDRAM). The DMAC 102 can access the volatile memory 103, the nonvolatile storage device 105, and the device 106 by direct memory access. An input / output control unit (hereinafter referred to as an I / O controller) 104 reads / writes data in / from a nonvolatile storage device (flash memory, HDD, SSD, etc.) 105 as a nonvolatile memory based on a request from the CPU 101 or the DMAC 102. . The device 106 is a peripheral device that is initialized by the CPU 101, and various devices such as a PCI-connected graphic board, a USB-connected scanner, and a printer can be used as the device 106. The device 106 includes a status register that holds its own state and a configuration register that holds values used for processing (values corresponding to image processing parameters and values indicating processing modes). Note that there may be a plurality of devices 106.

CPU101は不揮発性記憶装置105に含まれるプログラムをメモリ103に展開し、メモリ103からプログラムをフェッチして後述の処理を実行する。   The CPU 101 expands the program included in the nonvolatile storage device 105 in the memory 103, fetches the program from the memory 103, and executes processing described later.

ハイバネーションとは、システムの状態の保存と、保存したシステムの状態を復元する技術であり、保存・復元されるシステムの状態を示すデータをハイバネーションイメージと呼称する(ハイバネーションイメージのフォーマットは後述する)。なお、ハイバネーションイメージは、不揮発性記憶装置105に保存される。   Hibernation is a technique for saving the system state and restoring the saved system state, and data indicating the saved and restored system state is called a hibernation image (the format of the hibernation image will be described later). The hibernation image is stored in the nonvolatile storage device 105.

ここで、一般的なハイバネーション処理の流れを示す。ユーザ(又はユーザアプリケーション)がシステム中断を要求すると、メモリ103に書き込まれているデータ及び、その他のデバイス106の状態を表すデータ、CPU101のレジスタ値をもとにハイバネーションイメージが生成され、それが不揮発性記憶装置105へ書き込まれる。情報処理装置の電源を切り、再び起動すると、カーネルの初期化が開始される。カーネルの初期化直後に、ハイバネーションイメージが不揮発性記憶装置105からメモリ103へ読み込まれ、システム中断直前の状態に戻る。以下の説明では、ハイバネーションイメージを用いた起動シーケンスをハイバネーション起動と称す。   Here, the flow of a general hibernation process is shown. When a user (or user application) requests a system interruption, a hibernation image is generated based on the data written in the memory 103, the data indicating the state of the other device 106, and the register value of the CPU 101. Is written to the volatile storage device 105. When the information processing apparatus is turned off and restarted, kernel initialization is started. Immediately after the initialization of the kernel, the hibernation image is read from the nonvolatile storage device 105 to the memory 103, and the state immediately before the system interruption is restored. In the following description, the activation sequence using the hibernation image is referred to as hibernation activation.

本実施形態では、Linux(登録商標)のバージョン2.6.18を従来手法として、ハイバネーション起動の高速化について説明する。   In this embodiment, the speedup of hibernation activation will be described using Linux (registered trademark) version 2.6.18 as a conventional method.

Linux(登録商標)では、メモリ管理をページ単位で行う。以下で述べる領域は、ひとつまたは複数のページから構成されるメモリの範囲を意味する。   In Linux (registered trademark), memory management is performed in units of pages. The area described below means a memory range composed of one or a plurality of pages.

図2は、本実施形態のハイバネーション機構の構成を示す図である。状態201a〜201dはそれぞれ同一メモリの異なる状態を示す。詳細には、状態200aはハイバネーションイメージ生成時の状態であり、状態200bはカーネル初期化時の状態、状態200cはカーネル初期化後の状態、状態200dはハイバネーション起動後の状態を示す。   FIG. 2 is a diagram illustrating a configuration of the hibernation mechanism according to the present embodiment. States 201a-201d show different states of the same memory. Specifically, the state 200a is a state at the time of hibernation image generation, the state 200b is a state at the time of kernel initialization, the state 200c is a state after the kernel initialization, and the state 200d is a state after the hibernation is activated.

204は圧縮部である。メモリ201aにおける使用中領域をページごとに圧縮し、ハイバネーションイメージの一部として不揮発性記憶装置202へ出力する。ただし、ページによっては圧縮率が低く、圧縮を行わない方が望ましいページも存在する。そのため、圧縮率の低いページであれば、非圧縮のままハイバネーションイメージの一部として不揮発性記憶装置202へ出力する。ただし、ハイバネーション処理を行うための変数を格納する領域(以下、ハイバネーション処理用領域と称す)は、ハイバネーションイメージに含めない。ハイバネーション処理用領域は、システムが再起動されてもアドレス値が変わらないようにするため、ハイバネーション起動時にカーネル管理となる領域(後述)から静的に確保する。   Reference numeral 204 denotes a compression unit. The used area in the memory 201a is compressed page by page, and is output to the nonvolatile storage device 202 as a part of the hibernation image. However, some pages have a low compression ratio, and it is desirable that compression is not performed. Therefore, if the page has a low compression rate, it is output to the nonvolatile storage device 202 as a part of the hibernation image without being compressed. However, an area for storing a variable for performing hibernation processing (hereinafter referred to as a hibernation processing area) is not included in the hibernation image. In order to prevent the address value from changing even when the system is restarted, the hibernation processing area is statically secured from an area (described later) that is used for kernel management when hibernation starts.

203は作業領域データ生成部(領域情報生成部)である。本実施形態では、カーネル初期化中に全圧縮データの読み込みを試みるため、その読み込みのための領域をハイバネーションイメージ生成時に未使用領域から確保する。そこで、作業領域データ生成部203では、メモリ201aにおける未使用領域のアドレスを収集し、この情報をページ変換テーブルにまとめ、ハイバネーションイメージの一部として不揮発性記憶装置202へ出力する。このページ変換テーブルのデータを作業領域データ(又は領域情報)と称し、そのデータが示す領域を作業領域と称す。   Reference numeral 203 denotes a work area data generation unit (area information generation unit). In this embodiment, since all compressed data is read during kernel initialization, an area for the reading is secured from an unused area when the hibernation image is generated. Therefore, the work area data generation unit 203 collects addresses of unused areas in the memory 201a, collects this information in a page conversion table, and outputs it to the nonvolatile storage device 202 as a part of the hibernation image. The data of the page conversion table is called work area data (or area information), and the area indicated by the data is called a work area.

205はメモリ制限部であり、206はメモリ初期化機構である。メモリ制限部205はメモリ初期化機構206に対してオペレーティングシステムが管理するメモリ領域の制限を指示し、メモリ初期化機構206はこの情報をもとにメモリ201bの初期化を行う。この制限により、メモリ201bはカーネル管理領域とカーネル管理外領域に分かれる。この制限の目的は、意図的にカーネル管理外領域を作りだすことで、カーネルの初期化処理と並行してカーネル管理外領域にデータの読み込みを可能にすることにある。   Reference numeral 205 denotes a memory restriction unit, and 206 denotes a memory initialization mechanism. The memory restriction unit 205 instructs the memory initialization mechanism 206 to restrict the memory area managed by the operating system, and the memory initialization mechanism 206 initializes the memory 201b based on this information. Due to this limitation, the memory 201b is divided into a kernel management area and a non-kernel management area. The purpose of this restriction is to allow data to be read into the non-kernel management area in parallel with the initialization process of the kernel by intentionally creating a non-kernel management area.

207はカーネル初期化機構である。メモリ201bのメモリ初期化機構206によって初期化されたカーネル管理領域の範囲でカーネルの初期化を行う。   Reference numeral 207 denotes a kernel initialization mechanism. The kernel is initialized within the range of the kernel management area initialized by the memory initialization mechanism 206 of the memory 201b.

208は作業領域有効化部である。まず、メモリ201bのカーネル管理外領域に、作業領域データ生成部203で生成した作業領域データを読み込む。そして、この情報の一部を現在使用されているページ変換テーブルに上書きすることで、圧縮データを格納するための作業領域を確保して使用可能にする。   Reference numeral 208 denotes a work area validation unit. First, the work area data generated by the work area data generation unit 203 is read into a non-kernel management area of the memory 201b. A part of this information is overwritten on the currently used page conversion table, so that a work area for storing the compressed data can be secured and used.

209は初期化時データ読み込み部(第1読み込み部)であり、210はDMACである。初期化時データ読み込み部209は、DMAC210を用いることでカーネル初期化機構207による初期化処理と並行し、不揮発性記憶装置202に保存されたハイバネーションイメージを作業領域へ順に読み込む。ただし、非圧縮データはハイバネーションイメージ生成時にそのデータが元々存在していた領域に読み込む。   Reference numeral 209 denotes an initialization data reading unit (first reading unit), and 210 denotes a DMAC. The initialization data reading unit 209 uses the DMAC 210 to read hibernation images stored in the nonvolatile storage device 202 sequentially into the work area in parallel with the initialization process by the kernel initialization mechanism 207. However, uncompressed data is read into the area where the data originally existed when the hibernation image was generated.

211は初期化後データ読み込み部である。まず、初期化時データ読み込み部209が非圧縮データ以外の読み込みを完了していない場合は、該当データの読み込みを完了させる。212は伸張部である。メモリ201cに読み込まれた圧縮データを、ハイバネーションイメージ生成時にそのデータが元々存在していたメモリ201cの領域へ伸張する。この伸張部212による伸張と並行して、初期化後データ読み込み部211(第2読み込み部)は、DMAC210を用いて、非圧縮データをハイバネーションイメージ生成時にそのデータが元々存在していたメモリ201cの領域へ読み込む。初期化後データ読み込み部211では、カーネル管理領域及びカーネル管理外領域を区別する必要はない。これらの操作により、メモリ201cをメモリ201aと同様の状態に復元する(ハイバネーション処理用領域を除く)。以下の説明では、初期化後データ読み込み部211の処理を、メモリ復帰処理と称す。   Reference numeral 211 denotes a data reading unit after initialization. First, when the initialization data reading unit 209 has not finished reading data other than uncompressed data, reading of the corresponding data is completed. Reference numeral 212 denotes an expansion unit. The compressed data read into the memory 201c is expanded to the area of the memory 201c where the data originally existed when the hibernation image was generated. In parallel with the decompression by the decompression unit 212, the post-initialization data reading unit 211 (second reading unit) uses the DMAC 210 to store uncompressed data in the memory 201c in which the data originally existed when the hibernation image was generated. Read into the area. The post-initialization data reading unit 211 need not distinguish between the kernel management area and the non-kernel management area. By these operations, the memory 201c is restored to the same state as the memory 201a (excluding the hibernation processing area). In the following description, the process of the post-initialization data reading unit 211 is referred to as a memory restoration process.

また、作業領域データ生成部203及び圧縮部204、メモリ制限部205、メモリ初期化機構206、カーネル初期化機構207、作業領域有効化部208、初期化時データ読み込み部209、初期化後データ読み込み部211、伸張部212は、不揮発性記憶装置に格納されているプログラムに基づいて処理される。   In addition, the work area data generation unit 203 and the compression unit 204, the memory restriction unit 205, the memory initialization mechanism 206, the kernel initialization mechanism 207, the work area validation unit 208, the initialization data reading unit 209, and the initialization data reading The unit 211 and the decompressing unit 212 are processed based on a program stored in the nonvolatile storage device.

次に、本実施形態におけるハイバネーションイメージ生成の流れを示す。   Next, the flow of hibernation image generation in the present embodiment will be shown.

図3は、ユーザ(又はユーザアプリケーション)がシステム中断状態への移行を要求してからシステムが停止するまでのCPU101の処理の流れを示したフローチャートである。まず概略を説明すると、ステップS300でCPU101がプロセススケジューラを停止し、ステップS301でCPU101が各デバイスを停止しCPU101への割り込みを制限し、ステップS302でCPU101がCPUレジスタの退避を行う。そして、ステップS303でCPU101がハイバネーションイメージを生成して出力し、ステップS304でCPU101がシステムの停止を行う。   FIG. 3 is a flowchart showing the processing flow of the CPU 101 from when the user (or user application) requests to enter the system interruption state until the system stops. First, the outline will be described. In step S300, the CPU 101 stops the process scheduler. In step S301, the CPU 101 stops each device and restricts interrupts to the CPU 101. In step S302, the CPU 101 saves the CPU register. In step S303, the CPU 101 generates and outputs a hibernation image. In step S304, the CPU 101 stops the system.

以下の説明では、ステップS300及びステップS301、ステップS302をシステム中断処理と称して図3のフローチャートの詳細を説明する。ステップS300では、CPU101がすべてのプロセスを停止すると、これ以降はプロセスの処理によるメモリ内容の変更が発生しない。ステップS301では、CPU101が各デバイスの状態をメモリ内に保存し、これ以降のデバイスへのアクセスを無効にする。ステップS302では、CPU101がCPUレジスタの内容をメモリ上に保存する。このシステム中断処理により、システムの状態を表す全ての情報がメモリに保存される。よって、このメモリ内容を不揮発性記憶装置に保存しておき、必要に応じてこれをメモリに読み出し、保存した各デバイスやCPUレジスタの状態を再設定し、割り込み及びプロセススケジューラを再開することで、システムの状態を復元することができる。   In the following description, step S300, step S301, and step S302 are referred to as system interruption processing, and the details of the flowchart of FIG. 3 will be described. In step S300, when the CPU 101 stops all processes, the memory contents are not changed by process processing thereafter. In step S301, the CPU 101 stores the state of each device in the memory, and invalidates access to the subsequent devices. In step S302, the CPU 101 saves the contents of the CPU register on the memory. By this system interruption process, all information representing the system state is stored in the memory. Therefore, save this memory content in a nonvolatile storage device, read it to the memory as necessary, reset the state of each saved device and CPU register, restart the interrupt and process scheduler, The system state can be restored.

ステップS303では、CPU101がシステム中断処理によりシステムの状態が保持されているメモリ領域から、ハイバネーションイメージを生成し不揮発性記憶装置へ出力する。図4は、ハイバネーションイメージのフォーマットを示した図である。ヘッダ400は、ハイバネーションイメージに関する情報であり、有効なハイバネーションイメージであるかどうかを示す識別子及び非圧縮データのサイズ、圧縮データのサイズを含む。作業領域データ401は、ページ変換テーブルのデータを格納する。圧縮データ403は、圧縮したページ及び圧縮後のサイズ、伸張先アドレスを格納する。非圧縮データ404は非圧縮のページを格納し、非圧縮データアドレス402は非圧縮データ404の読み込み先アドレスを格納する。   In step S303, the CPU 101 generates a hibernation image from the memory area where the system state is held by the system interruption process, and outputs the hibernation image to the nonvolatile storage device. FIG. 4 is a diagram showing the format of the hibernation image. The header 400 is information regarding the hibernation image, and includes an identifier indicating whether the image is a valid hibernation image, the size of uncompressed data, and the size of compressed data. The work area data 401 stores page conversion table data. The compressed data 403 stores a compressed page, a size after compression, and an expansion destination address. Uncompressed data 404 stores an uncompressed page, and uncompressed data address 402 stores a read destination address of uncompressed data 404.

次に、作業領域データ401のフォーマットについて示す。   Next, the format of the work area data 401 is shown.

作業領域データ401は、ハイバネーション起動時にハイバネーションイメージの読み込み先となる作業領域を示すデータであり、ページ変換テーブルとして格納する。このように格納することで、物理メモリ上では不連続な未使用ページを、仮想メモリ上では連続した領域として扱うことが可能になる。ページ変換テーブルは、1個以上の変換用ページによって段階的に構成される。以下の説明では、1段階目の変換用ページをページグローバルディレクトリと称し、2段階目以降の変換用ページをページテーブルと称す。   The work area data 401 is data indicating a work area into which a hibernation image is read when hibernation is activated, and is stored as a page conversion table. By storing in this way, discontinuous unused pages on the physical memory can be handled as a continuous area on the virtual memory. The page conversion table is composed of one or more conversion pages in stages. In the following description, the first conversion page is referred to as a page global directory, and the second and subsequent conversion pages are referred to as page tables.

図5は、作業領域データ401のフォーマットを示した図である。ページグローバルディレクトリ500の作業領域に該当する項目には、ページテーブル501a、501b、…、501cの物理メモリアドレス及び状態フラグを記載する。そして、ページ変換テーブルとしての段階に応じ、1段階目の変換用ページから順に並べて連結する。   FIG. 5 is a diagram showing the format of the work area data 401. In the items corresponding to the work area of the page global directory 500, the physical memory addresses and status flags of the page tables 501a, 501b,. Then, according to the stage as the page conversion table, they are arranged and connected in order from the first stage conversion page.

さらに、作業領域データ401のページ変換テーブルは、ハイバネーションイメージ生成時のカーネル管理領域のマッピング情報も含める。この情報は、ハイバネーション起動時に、圧縮データの伸張先へアクセスするために用いる。   Furthermore, the page conversion table of the work area data 401 includes mapping information of the kernel management area when the hibernation image is generated. This information is used to access the decompression destination of the compressed data when hibernation is activated.

次に、非圧縮データアドレス402及び非圧縮データ404のフォーマットについて示す。   Next, the formats of the uncompressed data address 402 and the uncompressed data 404 are shown.

非圧縮データアドレス402と、非圧縮データ404は対応関係にあり、非圧縮データ404のN番目に格納されたデータの配置先は、非圧縮データアドレス402のN番目に格納されたアドレスとなる。図6は、この対応関係を示した図である。N番目に格納された非圧縮ページアドレス600と、同じくN番目に格納された非圧縮ページ601は対応関係にある。非圧縮データアドレス402の情報の個数と、非圧縮データ404の情報の個数は、それぞれ等しい。   The non-compressed data address 402 and the non-compressed data 404 are in a correspondence relationship, and the location where the Nth stored data of the uncompressed data 404 is the Nth stored address of the uncompressed data address 402. FIG. 6 is a diagram showing this correspondence. The non-compressed page address 600 stored in the Nth and the non-compressed page 601 stored in the Nth are in a correspondence relationship. The number of information of the uncompressed data address 402 is equal to the number of information of the uncompressed data 404.

非圧縮データ404は、カーネル管理外領域に復帰させる非圧縮データ404a及び、カーネル管理領域に復帰させる非圧縮データ404bの2種類のデータを含む。このように分割する理由は、カーネル初期化時に読み込み可能なハイバネーションイメージが、先頭のヘッダ400から非圧縮データ404aまでに限定され、非圧縮データ404bはカーネル初期化後にしか読み込むことができないためである。そのため、非圧縮データ404aは、非圧縮データ404bより前方に配置する。   The uncompressed data 404 includes two types of data: uncompressed data 404a that is restored to the non-kernel management area and uncompressed data 404b that is restored to the kernel management area. The reason for this division is that the hibernation image that can be read at the time of kernel initialization is limited to the header 400 to the non-compressed data 404a, and the non-compressed data 404b can be read only after the kernel initialization. . For this reason, the uncompressed data 404a is arranged in front of the uncompressed data 404b.

最後に、圧縮データ403のフォーマットについて示す。   Finally, the format of the compressed data 403 will be described.

図7は、圧縮データ403のフォーマットを示した図である。圧縮はページ単位で行う。700は1ページ分のデータを圧縮した際に生成する情報を示しており、圧縮ページサイズ701及び圧縮ページアドレス702、圧縮ページ703を含む。これらの情報をもとに、1ページ分のデータをメモリに復元することができる。   FIG. 7 is a diagram showing the format of the compressed data 403. Compression is performed in units of pages. Reference numeral 700 denotes information generated when one page of data is compressed, and includes a compressed page size 701, a compressed page address 702, and a compressed page 703. Based on these pieces of information, data for one page can be restored to the memory.

例えば、アドレスサイズが32bitのCPUでは、圧縮ページサイズ701を12Bit、圧縮ページアドレス702を20bit(4GB分のページを指定可能なサイズ)とする。この場合、圧縮ページ703は、12bitで表現可能な4096byte未満でなければならない。圧縮後のサイズが4096byte以上のものは、圧縮前のページを非圧縮データ404に格納する。   For example, in a CPU having an address size of 32 bits, the compressed page size 701 is set to 12 bits, and the compressed page address 702 is set to 20 bits (size that can specify a page of 4 GB). In this case, the compressed page 703 must be less than 4096 bytes that can be expressed in 12 bits. When the size after compression is 4096 bytes or more, the page before compression is stored in the uncompressed data 404.

ここからは、圧縮データ403及び非圧縮データ404へ格納するページについて示す。   Hereafter, pages stored in the compressed data 403 and the uncompressed data 404 are shown.

圧縮データ403のサイズは、上限となるサイズを予めユーザ(又はユーザアプリケーション)が指定してもよい。また、作業領域には、圧縮データ403だけでなく非圧縮データアドレス402及び、圧縮データ伸張時のスタックも格納する。そのため、圧縮データ403のサイズは、作業領域サイズからこれらのサイズを除いた値より小さくなければならない。圧縮データ403のサイズが上限に達しこれ以上ページを格納できない場合、未格納のページを非圧縮データ404へ格納する。   The size of the compressed data 403 may be specified in advance by the user (or user application) as an upper limit size. In the work area, not only the compressed data 403 but also the non-compressed data address 402 and the stack at the time of decompressing the compressed data are stored. Therefore, the size of the compressed data 403 must be smaller than the value obtained by removing these sizes from the work area size. When the size of the compressed data 403 reaches the upper limit and no more pages can be stored, an unstored page is stored in the uncompressed data 404.

以上により生成されるハイバネーションイメージは、不揮発性記憶装置を有効にした後、指定の領域へ、ファイルシステムに依存しない型式で、物理的に連続した状態で格納する。   After the non-volatile storage device is enabled, the hibernation image generated as described above is stored in a specified area in a physically continuous state in a format independent of the file system.

新たに、本実施形態におけるハイバネーション起動の流れを示す。   A flow of hibernation activation in the present embodiment is newly shown.

情報処理装置がONになると、BIOS及び、必要に応じブートローダが処理を行い、カーネル初期化を開始する。   When the information processing apparatus is turned on, the BIOS and the boot loader perform processing as necessary, and kernel initialization is started.

図8は、本実施形態における、カーネル初期化の開始からハイバネーションイメージを復元するまでを示したフローチャートである。まず、概略を説明すると、ステップS800では、DMAC102が不揮発性記憶装置の所定領域の情報を読み込み、CPU101が読み込んだ情報に有効なハイバネーションイメージが存在するかどうかを確認する。ステップS801では、CPU101がメモリ管理機構の初期化を行う。ステップS802では、CPU101が割り込み機構の初期化を行う。ステップS803では、CPU101がハイバネーションイメージの並行読み込みを開始する。ステップS804では、CPU101がその他機能の初期化を行い、並行してDMAC102が非圧縮データアドレス402及び圧縮データ403、非圧縮データ404aを順に読み込む。ステップS805では、CPU101とDMAC102がメモリ復帰処理及びその準備を行う。   FIG. 8 is a flowchart showing the process from the start of kernel initialization to the restoration of the hibernation image in this embodiment. First, in brief, in step S800, the DMAC 102 reads information on a predetermined area of the nonvolatile storage device, and checks whether or not a valid hibernation image exists in the information read by the CPU 101. In step S801, the CPU 101 initializes the memory management mechanism. In step S802, the CPU 101 initializes the interrupt mechanism. In step S803, the CPU 101 starts parallel reading of the hibernation image. In step S804, the CPU 101 initializes other functions, and in parallel, the DMAC 102 reads the uncompressed data address 402, the compressed data 403, and the uncompressed data 404a in order. In step S805, the CPU 101 and the DMAC 102 perform memory restoration processing and preparation.

次に、図8のフローチャートの詳細を説明する。ステップS800では、CPU101がDMAC102及びI/Oコントローラ104を初期化し、DMAC102が不揮発性記憶装置の所定の領域に保存されたハイバネーションイメージのヘッダ400をメモリ103へ読み込む。ヘッダ400に含まれる識別子が有効であることをもって、ハイバネーションイメージが不揮発性記憶装置に格納されているとCPU101によって判定する。なお、図8は、不揮発性記憶装置にハイバネーションイメージが存在する場合の処理を示すフローチャートであり、不揮発性記憶装置にハイバネーションイメージが格納されていないと判断した場合、システムを通常起動する処理(不図示)を行う。   Next, details of the flowchart of FIG. 8 will be described. In step S <b> 800, the CPU 101 initializes the DMAC 102 and the I / O controller 104, and the DMAC 102 reads the hibernation image header 400 stored in a predetermined area of the nonvolatile storage device into the memory 103. If the identifier included in the header 400 is valid, the CPU 101 determines that the hibernation image is stored in the nonvolatile storage device. FIG. 8 is a flowchart showing processing when a hibernation image exists in the non-volatile storage device. When it is determined that the hibernation image is not stored in the non-volatile storage device, processing for normally starting the system (not possible) (Shown).

ステップS801では、CPU101がカーネルの管理するメモリの範囲を指定の大きさに制限し、メモリ管理機構の初期化を行う。具体的には、メモリマップを変更することで、カーネル管理領域の範囲を制限する。この制限サイズは、カーネル初期化処理に要求される必要最低限のメモリの大きさから決定され、制限サイズは少なくともカーネル初期化に必要なサイズ以上を確保する。この処理により、カーネル管理領域とカーネル管理外領域の2種類の領域をメモリに確保する。この制限は、メモリ復帰処理を完了することで解除される。   In step S801, the CPU 101 limits the memory range managed by the kernel to a specified size, and initializes the memory management mechanism. Specifically, the range of the kernel management area is limited by changing the memory map. This limit size is determined from the minimum necessary memory size required for the kernel initialization process, and the limit size secures at least a size necessary for kernel initialization. With this process, two types of areas, a kernel management area and a non-kernel management area, are secured in the memory. This restriction is removed by completing the memory restoration process.

さらにステップS801では、CPU101がカーネル管理領域へアクセスするためのページ変換テーブルを生成する。このページ変換テーブルのページグローバルディレクトリをカーネルPGD(Page Global Directory)と称す。また、作業領域データ401のページ変換テーブルをメモリに読み込む。このページ変換テーブルのページグローバルディレクトリをハイバネーションPGDと称す。そして、ハイバネーションPGDの作業領域に関する情報を、カーネルPGDのカーネル初期化では利用されない領域に上書きすることで、作業領域を使用可能にする。   In step S801, the CPU 101 generates a page conversion table for accessing the kernel management area. The page global directory of this page conversion table is referred to as a kernel PGD (Page Global Directory). Further, the page conversion table of the work area data 401 is read into the memory. The page global directory of this page conversion table is referred to as hibernation PGD. The work area can be used by overwriting information related to the work area of the hibernation PGD into an area not used in kernel initialization of the kernel PGD.

ただし、メモリに読み込まれた作業領域データ401のページ変換テーブルは、カーネル初期化用のデータ及び圧縮データ、非圧縮データ、伸張後のデータによって上書きされてはならない。そこで、作業領域データ401におけるページグローバルディレクトリは常に1つであるため、ハイバネーション処理用領域に読み込む。これにより、上書きを防ぐことができる。しかし、作業領域データ401におけるページテーブルは、その数が固定ではないため保持するための領域をカーネル管理領域に予約しておくことが難しい。そこで、カーネル管理領域に各ページテーブルを読み込み、次に、カーネル管理外領域を一時的にカーネルから使用可能にし、カーネル管理外領域の予め決めてある領域に各ページテーブルを移動する。   However, the page conversion table of the work area data 401 read into the memory must not be overwritten with kernel initialization data, compressed data, uncompressed data, and decompressed data. Therefore, since there is always one page global directory in the work area data 401, it is read into the hibernation processing area. Thereby, overwriting can be prevented. However, since the number of page tables in the work area data 401 is not fixed, it is difficult to reserve an area for holding in the kernel management area. Therefore, each page table is read into the kernel management area, and then the non-kernel management area is temporarily made available from the kernel, and each page table is moved to a predetermined area of the kernel management area.

ステップS803では、並行読み込みを行うための手段として、DMAC102を用いる。DMACでは、仮想アドレスではなく物理アドレスを指定する必要がある。そのため、ページ変換テーブルを用いて、作業領域の読み込み先となる仮想アドレスを物理アドレスに変換し、DMAC102に指定する。   In step S803, the DMAC 102 is used as a means for performing parallel reading. In the DMAC, it is necessary to specify a physical address instead of a virtual address. Therefore, using the page conversion table, the virtual address that is the reading destination of the work area is converted into a physical address and specified in the DMAC 102.

図9は、カーネル初期化時の並行読み込みについて示した図である。900はメモリであり、カーネル管理領域900aとカーネル管理外領域900bを有する。901はCPU101によって実行されているカーネルであり、カーネル管理領域900aにのみアクセスする。902はDMAC、903は不揮発性記憶装置であり、DMAC902はステップS804におけるカーネル初期化中に、非圧縮データアドレス402及び圧縮データ403を、カーネル管理外領域900bの作業領域の先頭から順に読み込む。上記データを全て読み込んだ場合、次に非圧縮データ404aを、非圧縮データアドレスに従って読み込む。非圧縮データ404aのページは、前述の通り、作業領域を除く領域及びカーネル管理外領域900bへ復帰するため、作業領域及びカーネル管理領域を上書きすることはない。   FIG. 9 is a diagram showing parallel reading at the time of kernel initialization. A memory 900 includes a kernel management area 900a and a non-kernel management area 900b. Reference numeral 901 denotes a kernel executed by the CPU 101, which accesses only the kernel management area 900a. Reference numeral 902 denotes a DMAC, and reference numeral 903 denotes a non-volatile storage device. The DMAC 902 reads the uncompressed data address 402 and the compressed data 403 in order from the beginning of the work area of the non-kernel management area 900b during the kernel initialization in step S804. When all the data is read, next, the uncompressed data 404a is read according to the uncompressed data address. As described above, the page of the non-compressed data 404a returns to the area excluding the work area and the non-kernel management area 900b, so that the work area and the kernel management area are not overwritten.

DMACは、データ転送に用いるパラメータ(転送元アドレス、転送先アドレス、データサイズ)をCPUにより指定すると、不揮発性記憶装置からメモリへCPUとは非同期に転送を行う。DMACは一度に転送可能なサイズが決められているため、特定サイズの転送ごとに、CPUにより再び新たなパラメータを指定する必要がある。そこで本実施形態では、DMAC102の転送完了割り込みを利用し、次に読むべきデータを指定して新たな読み込みを実行する。また、タイマを利用して一定時間ごとに割り込みを発生させ、CPU101がDMAC102の読み込み状況を確認し、読み込みが完了していれば次に読むべきデータを指定して新たな読み込みを実行するようにしてもよい。   When the DMAC specifies parameters (transfer source address, transfer destination address, data size) used for data transfer by the CPU, the DMAC transfers data from the nonvolatile storage device to the memory asynchronously with the CPU. Since the DMAC has a size that can be transferred at a time, it is necessary to designate a new parameter again by the CPU for each transfer of a specific size. Therefore, in the present embodiment, the transfer completion interrupt of the DMAC 102 is used to specify data to be read next and execute a new read. In addition, an interrupt is generated at regular intervals using a timer, and the CPU 101 confirms the reading status of the DMAC 102, and if reading is completed, designates data to be read next and executes a new reading. May be.

DMAC102によるカーネル初期化時の並行読み込みは、非圧縮データアドレス402及び圧縮データ403、非圧縮データ404aを読み込み終えるか、カーネルの初期化終了後に圧縮データが伸張される直前まで継続して行う。   The parallel reading at the time of kernel initialization by the DMAC 102 is continuously performed until the uncompressed data address 402, the compressed data 403, and the uncompressed data 404a are read, or until the compressed data is decompressed after the initialization of the kernel.

図10は、ステップS805の詳細であり、本実施形態におけるハイバネーションイメージ復帰処理の流れである。ステップS1000でCPU101がプロセススケジューラを停止し、ステップS1001でCPU101が各デバイスを停止し割り込みを制限する。また、ステップS1002でCPU101が仮想メモリをカーネルPGDからハイバネーションPGDへ切り替え、ステップS1003でCPU101がスタックを切り替え、ステップS1004でCPU101がDMAC102による並行読み込みを停止し、ステップS1005でCPU101とDMAC102によってメモリの復帰を行う。   FIG. 10 shows details of step S805, which is a flow of hibernation image restoration processing in the present embodiment. In step S1000, the CPU 101 stops the process scheduler, and in step S1001, the CPU 101 stops each device and restricts interrupts. In step S1002, the CPU 101 switches the virtual memory from the kernel PGD to the hibernation PGD. In step S1003, the CPU 101 switches the stack. In step S1004, the CPU 101 stops parallel reading by the DMAC 102. In step S1005, the CPU 101 and the DMAC 102 restore the memory. I do.

なお、ステップS1002では、ページ変換テーブルの切り替えを行う。x86環境では、CPUレジスタCR3の値をカーネルPGDのアドレスからハイバネーションPGDのアドレスに書き換えることで、切り替えが完了する。この処理を行う理由は2点ある。1点目は、カーネルPGDはメモリ制限が反映されたマッピングであり、伸張先へアクセスするには不十分なためである。ハイバネーションPGDはメモリ制限前のマッピングであるため、このページ変換テーブルに切り替えることで全ての伸張先へアクセスすることができるようになる。2点目は、メモリ復帰処理時にカーネルPGDが書き変わるためである。前述の通り、ハイバネーションPGDはハイバネーション処理用領域に確保するため、メモリ復帰処理時に書き変わることはない。   In step S1002, the page conversion table is switched. In the x86 environment, the switching is completed by rewriting the value of the CPU register CR3 from the address of the kernel PGD to the address of the hibernation PGD. There are two reasons for this process. The first point is that the kernel PGD is a mapping that reflects memory limitations and is insufficient for accessing the decompression destination. Since the hibernation PGD is a mapping before the memory limit, it is possible to access all the expansion destinations by switching to this page conversion table. The second point is that the kernel PGD is rewritten during the memory restoration process. As described above, the hibernation PGD is secured in the hibernation processing area, so that it is not rewritten during the memory restoration process.

図11は、本実施形態をx86環境に適用した場合の、ハイバネーション起動時の仮想メモリの一例を示した図である。1100はCPUレジスタCR3であり、1101はカーネルPGD、1102はハイバネーションPGDである。1103aはメモリ制限されたカーネル管理領域のマッピング情報であり、1103bはメモリ制限されていないカーネル管理領域のマッピング情報、1104は作業領域のマッピング情報である。ステップS1001以前におけるCPUレジスタCR3である1100はカーネルPGD1101を示し、ステップS1002によりCPUレジスタCR3である1100はハイバネーションPGD1102を示すようになる。   FIG. 11 is a diagram showing an example of a virtual memory at the time of hibernation activation when the present embodiment is applied to an x86 environment. 1100 is a CPU register CR3, 1101 is a kernel PGD, 1102 is a hibernation PGD. Reference numeral 1103a denotes mapping information of the kernel management area where the memory is restricted. Reference numeral 1103b denotes mapping information of the kernel management area where the memory is not restricted. Reference numeral 1104 denotes mapping information of the work area. The CPU register CR3 1100 before step S1001 indicates the kernel PGD 1101, and the CPU register CR3 1100 indicates the hibernation PGD 1102 by step S1002.

また、図10のステップS1003では、スタックの使用先を切り替えている。これは、メモリ復帰処理時に従来のスタックの内容が書き換えられてしまうためである。また、切り替え先のスタックも上書きを防ぐ必要があるため、作業領域の末尾を指定する。なお、スタックの復帰はS1006で行う。   In step S1003 of FIG. 10, the stack usage destination is switched. This is because the contents of the conventional stack are rewritten during the memory restoration process. In addition, since the stack at the switching destination needs to be prevented from being overwritten, the end of the work area is designated. Note that the stack is restored in S1006.

また、図10のステップS1004では、動作中のDMAC102が停止するまで待機を行っているが、既にDMAC102による並行読み込みが完了している場合、待機は行わなくてもよい。   Further, in step S1004 in FIG. 10, the standby is performed until the DMAC 102 in operation is stopped. However, when the parallel reading by the DMAC 102 has already been completed, the standby may not be performed.

また、図10のステップS1005では、非圧縮データアドレス402及び圧縮データ403が全て読み込まれていない場合は読み込みを完了させる。そして、圧縮データをページ毎に伸張し、伸張と並行して非圧縮データを読み込む。割り込みは既に停止しているため、ここでは、各ページを伸張するループ処理の中でDMACの完了を逐次チェックする。データの読み込み先は、カーネル初期化時の並行読み込み時と同じである。圧縮ページ703の伸張は、圧縮ページサイズ701及び圧縮ページアドレス702に応じて行う。圧縮ページアドレス702は、作業領域以外を指し示すため、未伸張の圧縮データを上書きすることはない。以上の処理を、全ての圧縮データの伸張と全ての非圧縮データの読み込みの両方が完了するまで繰り返す。   Also, in step S1005 in FIG. 10, when all the uncompressed data address 402 and the compressed data 403 are not read, the reading is completed. Then, the compressed data is expanded for each page, and uncompressed data is read in parallel with the expansion. Since the interruption has already stopped, the completion of DMAC is sequentially checked in the loop processing for expanding each page. The data reading destination is the same as the parallel reading at the time of kernel initialization. The compressed page 703 is expanded according to the compressed page size 701 and the compressed page address 702. Since the compressed page address 702 indicates a region other than the work area, uncompressed compressed data is not overwritten. The above processing is repeated until both decompression of all compressed data and reading of all uncompressed data are completed.

以上の処理により、メモリは、ハイバネーション処理用領域を除き、ステップS301直後と同様の状態へ復帰される。また、メモリを復帰した後は、CPU101の処理によって一般的なハイバネーション起動のようにCPUレジスタ値の復帰及び、各デバイス情報の復帰、割り込みの再開、プロセススケジューラの再開を行い、ハイバネーション起動を完了させる。   With the above processing, the memory is returned to the same state as that immediately after step S301 except for the hibernation processing area. After the memory is restored, the CPU register value is restored, each device information is restored, the interrupt is resumed, and the process scheduler is resumed by the processing of the CPU 101 to complete the hibernation activation. .

以上のように本実施形態では、ハイバネーションイメージを利用してシステムを再び起動する際に、カーネルによる初期化と並行して圧縮データを読み込み、伸張と並行して非圧縮データを読み込むことにより、従来の方法と比べて高速にシステムを復元することができる。   As described above, in the present embodiment, when the system is restarted using the hibernation image, the compressed data is read in parallel with the initialization by the kernel, and the uncompressed data is read in parallel with the expansion. Compared with this method, the system can be restored at high speed.

なお、初期化時データ読み込み部(第1読み込み部)209と初期化後データ読み込み部(第2読み込み部)211とは一体的な構成であってもよい、その場合はDMACとして一体的に構成することが好ましい。   Note that the initialization data reading unit (first reading unit) 209 and the post-initialization data reading unit (second reading unit) 211 may be integrated, in which case the DMAC is configured integrally. It is preferable to do.

また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が、コンピュータが読み取り可能なプログラムを読み出して実行する処理である。
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or apparatus reads the computer. This is a process of reading and executing a possible program.

Claims (17)

揮発性メモリと、
前記揮発性メモリに保持されている少なくとも一部のデータを圧縮データに圧縮する圧縮手段と、
前記圧縮手段により圧縮された圧縮データと前記揮発性メモリの未使用領域のアドレスを含む領域情報とをハイバネーションイメージとして保持する不揮発性メモリと、
前記揮発性メモリの少なくとも一部を利用して行われるカーネルの初期化と並行して、前記不揮発性メモリに保持されている前記圧縮データを、前記領域情報に基づいて前記未使用領域の少なくとも一部に読み込む読み込み手段と、
前記揮発性メモリに読み込んだ圧縮データを伸張する伸張手段と、
前記伸張手段により伸張したデータに基づいてシステムを起動させる起動手段とを有することを特徴とする情報処理装置。
Volatile memory,
Compression means for compressing at least a portion of data held in the volatile memory into compressed data;
A non-volatile memory that holds compressed data compressed by the compression means and area information including an address of an unused area of the volatile memory as a hibernation image;
In parallel with the kernel initialization performed using at least a part of the volatile memory, the compressed data held in the nonvolatile memory is converted into at least one of the unused areas based on the area information. Reading means to read
Decompression means for decompressing the compressed data read into the volatile memory;
An information processing apparatus comprising: an activation unit that activates a system based on data decompressed by the decompression unit.
前記揮発性メモリに、前記カーネルの初期化に利用するカーネル管理領域と前記カーネルの初期化に利用しないカーネル管理外領域を割り当てるメモリ管理手段をさらに有することを特徴とする請求項1に記載の情報処理装置。   The information according to claim 1, further comprising memory management means for allocating a kernel management area used for initialization of the kernel and a non-kernel management area not used for initialization of the kernel to the volatile memory. Processing equipment. 前記不揮発性メモリに前記ハイバネーションイメージが退避されていない場合は通常起動を行う通常起動手段をさらに有することを特徴とする請求項1又は2に記載の情報処理装置。   The information processing apparatus according to claim 1, further comprising a normal activation unit that performs normal activation when the hibernation image is not saved in the nonvolatile memory. 前記不揮発性メモリに前記ハイバネーションイメージを退避させる退避手段をさらに有することを特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, further comprising a saving unit that saves the hibernation image in the nonvolatile memory. 前記退避手段は、前記領域情報を格納する領域と前記領域情報の示す領域とを、前記ハイバネーションイメージを保持する領域として割り当てないことを特徴とする請求項4に記載の情報処理装置。   The information processing apparatus according to claim 4, wherein the saving unit does not assign an area for storing the area information and an area indicated by the area information as an area for holding the hibernation image. 前記退避手段は、ファイルシステムに依存しない型式のファイルのハイバネーションイメージを前記不揮発性メモリに退避することを特徴とする請求項4又は5に記載の情報処理装置。   6. The information processing apparatus according to claim 4, wherein the saving unit saves a hibernation image of a file type independent of a file system in the nonvolatile memory. 前記圧縮手段は、前記揮発性メモリの一部のデータを圧縮しないことを特徴とする請求項1乃至6のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the compression unit does not compress a part of the data in the volatile memory. 前記メモリ管理手段は、前記カーネル管理領域のサイズを、前記カーネルの初期化に必要なサイズ以上とすることを特徴とする請求項2に記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the memory management unit sets the size of the kernel management area to be equal to or larger than a size necessary for initialization of the kernel. 前記読み込み手段は、DMACを用い、前記不揮発性メモリに保持されている前記圧縮データを、前記領域情報の示す領域に読み込むことを特徴とする請求項1乃至8のいずれか1項に記載の情報処理装置。   The information according to any one of claims 1 to 8, wherein the reading means uses DMAC to read the compressed data held in the nonvolatile memory into an area indicated by the area information. Processing equipment. 前記伸張手段は、前記不揮発性メモリに保持されている全ての前記圧縮データの読み込みが完了していない場合は、全ての前記圧縮データを前記揮発性メモリに読み込むことを特徴とする請求項1乃至9のいずれか1項に記載の情報処理装置。   The decompression unit reads all the compressed data into the volatile memory when reading of all the compressed data held in the nonvolatile memory is not completed. The information processing apparatus according to any one of 9. 前記起動手段は前記揮発性メモリを、前記ハイバネーションイメージを生成する前の状態に復元することで前記システムを起動することを特徴とする請求項1乃至10のいずれか1項に記載の情報処理装置。   The information processing apparatus according to any one of claims 1 to 10, wherein the activation unit activates the system by restoring the volatile memory to a state before the hibernation image is generated. . 前記不揮発性メモリが保持している領域情報を前記揮発性メモリに読み込み、当該領域情報に基づいて前記揮発性メモリに作業領域を確保にする作業領域有効化手段をさらに備えることを特徴とする請求項1乃至11のいずれか1項に記載の情報処理装置。   The system further comprises work area validation means for reading area information held in the nonvolatile memory into the volatile memory and securing a work area in the volatile memory based on the area information. Item 12. The information processing apparatus according to any one of Items 1 to 11. 前記作業領域有効化手段は、前記圧縮データと前記圧縮データの伸張後のデータとが書き込まれない前記揮発性メモリの領域に、前記領域情報を読み込むことを特徴とする請求項12に記載の情報処理装置。   13. The information according to claim 12, wherein the work area validation unit reads the area information into an area of the volatile memory in which the compressed data and the decompressed data of the compressed data are not written. Processing equipment. 前記領域情報を生成する領域情報生成手段をさらに備えることを特徴とする請求項2に記載の情報処理装置。   The information processing apparatus according to claim 2, further comprising region information generation means for generating the region information. 前記領域情報生成手段は、ハイバネーションイメージ生成時に使用中の領域と、起動時に前記領域情報を格納する領域と、起動時に前記カーネル管理領域に割り当てられる領域と、を前記領域情報の示す領域に含めないように生成することを特徴とする請求項14に記載の情報処理装置。   The area information generation means does not include an area in use at the time of hibernation image generation, an area for storing the area information at startup, and an area allocated to the kernel management area at startup in the area indicated by the area information. The information processing apparatus according to claim 14, wherein the information processing apparatus is generated as described above. 揮発性メモリと、領域情報と圧縮データとを含むハイバネーションイメージを保持する不揮発性メモリと、を有する情報処理装置の起動方法であって、
前記揮発性メモリに展開するカーネルの初期化と並行して、前記不揮発性メモリに保持されている圧縮データを、前記領域情報に基づいて前記揮発性メモリの領域で前記カーネルの初期化に利用しない領域へ読み込む初期化時データ読み込み工程と、
前記カーネルの初期化の後に、前記揮発性メモリに読み込んだ圧縮データを伸張し、伸張したデータに基づいてシステムを起動させる起動工程とを有することを特徴とする起動方法。
An information processing apparatus startup method comprising: a volatile memory; and a non-volatile memory that holds a hibernation image including area information and compressed data.
In parallel with the initialization of the kernel expanded in the volatile memory, the compressed data held in the nonvolatile memory is not used for the initialization of the kernel in the area of the volatile memory based on the area information. Initialization data reading process to read into the area,
A booting method comprising: a booting step of decompressing the compressed data read into the volatile memory after the kernel initialization and booting the system based on the decompressed data.
揮発性メモリと、領域情報と圧縮データをと含むハイバネーションイメージを保持する不揮発性メモリと、を備えるコンピュータを、
前記揮発性メモリに展開するカーネルの初期化と並行して、前記不揮発性メモリに保持されている圧縮データを、前記領域情報に基づいて前記揮発性メモリの領域で前記カーネルの初期化に利用しない領域へ読み込む初期化時データ読み込み工程と、
前記カーネルの初期化の後に、前記揮発性メモリに読み込んだ圧縮データを伸張し、伸張したデータに基づいてシステムを起動させる起動工程とを実行させることを特徴とするプログラム。
A computer comprising: a volatile memory; and a non-volatile memory that holds a hibernation image including area information and compressed data.
In parallel with the initialization of the kernel expanded in the volatile memory, the compressed data held in the nonvolatile memory is not used for the initialization of the kernel in the area of the volatile memory based on the area information. Initialization data reading process to read into the area,
A program that, after initialization of the kernel, decompresses the compressed data read into the volatile memory, and executes a startup step of starting the system based on the decompressed data.
JP2012235482A 2012-10-25 2012-10-25 Information processing apparatus, activation method, and program Active JP6080491B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2012235482A JP6080491B2 (en) 2012-10-25 2012-10-25 Information processing apparatus, activation method, and program
US14/061,218 US9904559B2 (en) 2012-10-25 2013-10-23 Information processing apparatus and activation method therefor for processing data of a hibernation image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012235482A JP6080491B2 (en) 2012-10-25 2012-10-25 Information processing apparatus, activation method, and program

Publications (2)

Publication Number Publication Date
JP2014085908A true JP2014085908A (en) 2014-05-12
JP6080491B2 JP6080491B2 (en) 2017-02-15

Family

ID=50788900

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012235482A Active JP6080491B2 (en) 2012-10-25 2012-10-25 Information processing apparatus, activation method, and program

Country Status (1)

Country Link
JP (1) JP6080491B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020138669A1 (en) * 2001-03-21 2002-09-26 Kadatch Andrew V. Hibernation of computer systems
JP2005258642A (en) * 2004-03-10 2005-09-22 Yamaha Corp Embedded information processor
US20110107020A1 (en) * 2009-10-30 2011-05-05 Duan Binghua Hibernation solution for embedded devices and systems
JP2012068797A (en) * 2010-09-22 2012-04-05 Canon Inc Start-up acceleration method, information processing apparatus and program
JP2012252576A (en) * 2011-06-03 2012-12-20 Canon Inc Information processing device, start method and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020138669A1 (en) * 2001-03-21 2002-09-26 Kadatch Andrew V. Hibernation of computer systems
JP2005258642A (en) * 2004-03-10 2005-09-22 Yamaha Corp Embedded information processor
US20110107020A1 (en) * 2009-10-30 2011-05-05 Duan Binghua Hibernation solution for embedded devices and systems
JP2012068797A (en) * 2010-09-22 2012-04-05 Canon Inc Start-up acceleration method, information processing apparatus and program
JP2012252576A (en) * 2011-06-03 2012-12-20 Canon Inc Information processing device, start method and program

Also Published As

Publication number Publication date
JP6080491B2 (en) 2017-02-15

Similar Documents

Publication Publication Date Title
KR101636870B1 (en) Method and apparatus for generating minimal boot image
US20120311240A1 (en) Information processing apparatus, information processing method, and storage medium
JP6399916B2 (en) Information processing apparatus and control method thereof
JP5860543B2 (en) Boot data loading
CN110704161B (en) Virtual machine creation method and device and computer equipment
JP2010055184A (en) Information processor and memory management method
US20130179670A1 (en) Booting method of multimedia device and multimedia device
WO2020119213A1 (en) Methods for generating and loading mirror file, and device
US10185573B2 (en) Caching based operating system installation
JP5683186B2 (en) Start-up acceleration method, information processing apparatus, and program
JP6080492B2 (en) Information processing apparatus, activation method, and program
US10936045B2 (en) Update memory management information to boot an electronic device from a reduced power mode
CN113127263B (en) Kernel crash recovery method, device, equipment and storage medium
WO2014063329A1 (en) Flash sharing method, controller and system
US9904559B2 (en) Information processing apparatus and activation method therefor for processing data of a hibernation image
WO2000054133A1 (en) Information processor, method for saving/loading data, and information recorded medium
KR100994723B1 (en) selective suspend resume method of reducing initial driving time in system, and computer readable medium thereof
JP6080491B2 (en) Information processing apparatus, activation method, and program
JP6080490B2 (en) Information processing apparatus, activation method, and program
CN110647428B (en) Mirror image file manufacturing and recovering method, processor and embedded system
JP2004078604A (en) Information processing method and program for executing the same method and recording medium
CN111597076A (en) Method and device for operating data and method and device for managing persistent skip list
KR101888781B1 (en) Persistent dynamic random access memory storage using non-volatile ram and operating method therefof
KR20140018134A (en) Fast booting method of operating system from off state
JP2013246646A (en) Information processor and data reading method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151026

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160728

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160809

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161007

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170117

R151 Written notification of patent or utility model registration

Ref document number: 6080491

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151