JP2014063358A - Information processor, information processing method, and program - Google Patents

Information processor, information processing method, and program Download PDF

Info

Publication number
JP2014063358A
JP2014063358A JP2012208275A JP2012208275A JP2014063358A JP 2014063358 A JP2014063358 A JP 2014063358A JP 2012208275 A JP2012208275 A JP 2012208275A JP 2012208275 A JP2012208275 A JP 2012208275A JP 2014063358 A JP2014063358 A JP 2014063358A
Authority
JP
Japan
Prior art keywords
area
memory
unit
file
information
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
JP2012208275A
Other languages
Japanese (ja)
Other versions
JP2014063358A5 (en
JP6219560B2 (en
Inventor
Satoshi Miki
聡 三木
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.)
FIXSTARS CORP
Original Assignee
FIXSTARS CORP
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by FIXSTARS CORP filed Critical FIXSTARS CORP
Priority to JP2012208275A priority Critical patent/JP6219560B2/en
Publication of JP2014063358A publication Critical patent/JP2014063358A/en
Publication of JP2014063358A5 publication Critical patent/JP2014063358A5/ja
Application granted granted Critical
Publication of JP6219560B2 publication Critical patent/JP6219560B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To enable an NV memory to be used as a main memory and a storage without discriminating between an area used as the main memory and an area used as the storage.SOLUTION: An information processor includes: an NV memory that is a nonvolatile storage medium; a file system unit that reads and writes data to and from the NV memory for each predetermined unit; and a memory management unit that allocates a predetermined area of the NV memory to a process which is requested to be executed. Thus, the NV memory can be used as a main memory and a storage without discriminating between an area used as the main memory and an area used as the storage.

Description

本発明は、不揮発性メモリを使用する情報処理装置等に関するものである。   The present invention relates to an information processing apparatus using a nonvolatile memory.

従来、いわゆるUSBメモリ(特許文献1参照)や、Flash SSD(特許文献2参照)などの不揮発性メモリ(Non−Volatile Memory、以下、適宜、NVメモリ)が開発されている。   Conventionally, a non-volatile memory (Non-Volatile Memory, hereinafter referred to as NV memory as appropriate) such as a so-called USB memory (see Patent Document 1) and Flash SSD (see Patent Document 2) has been developed.

非特許文献1:“USBメモリとは”、[online]、IT用語辞典 e-Words、[2012年8月6日検索]、インターネット[URL;http://e-words.jp/w/USBE383A1E383A2E383AA.html]Non-Patent Document 1: “What is USB Memory”, [online], IT Glossary of Terms e-Words, [Search August 6, 2012], Internet [URL: http://e-words.jp/w/USBE383A1E383A2E383AA .html] 非特許文献2:“SSDとは”、[online]、IT用語辞典 e-Words、[2012年8月6日検索]、インターネット[URL;http://e-words.jp/w/SSD.html]Non-Patent Document 2: “What is SSD?”, [Online], IT Glossary of Terms e-Words, [searched August 6, 2012], Internet [URL; http://e-words.jp/w/SSD. html]

近年、NVメモリをメインメモリとして用いる研究、およびメインメモリをストレージとして用いる研究等により、NVメモリを、メインメモリとして使用する領域と、ストレージとして使用する領域との2つの領域に分割し、それぞれの領域を、メインメモリおよびストレージとして使用することが可能となっている。NVメモリを、メインメモリおよびストレージの両方として使用することができるということは、その両方を1つに融合できることを意味する。しかしながら、従来の研究等においては、メインメモリとして使用する領域とストレージとして使用する領域とを区別することなく、NVメモリをメインメモリおよびストレージとして使用することができなかった。   In recent years, NV memory has been divided into two areas, an area used as a main memory and an area used as a storage, by research using the NV memory as a main memory and research using the main memory as a storage. The area can be used as main memory and storage. The ability to use NV memory as both main memory and storage means that both can be merged into one. However, in the conventional research and the like, the NV memory cannot be used as the main memory and storage without distinguishing between the area used as the main memory and the area used as the storage.

本第一の発明の情報処理装置は、不揮発性の記録媒体であるNVメモリと、NVメモリに対して、所定の単位でデータを読み書きするファイルシステム部と、実行が要求されたプロセスに対し、NVメモリの所定の領域を割り当てるメモリ管理部とを備える情報処理装置である。   The information processing apparatus according to the first aspect of the present invention includes an NV memory that is a non-volatile recording medium, a file system unit that reads and writes data in a predetermined unit from the NV memory, and a process that is requested to execute. An information processing apparatus includes a memory management unit that allocates a predetermined area of the NV memory.

このような構成により、メインメモリとして使用する領域とストレージとして使用する領域とを区別することなく、NVメモリをメインメモリおよびストレージとして使用することができる。   With such a configuration, the NV memory can be used as the main memory and storage without distinguishing between the area used as the main memory and the area used as the storage.

また、本第二の発明の情報処理装置は、第一の発明に対して、ファイルシステム部は、1以上のファイルを識別するファイル識別子と、ファイルに対応する1以上の論理アドレスとを有するファイル管理情報が格納されるファイル管理情報格納手段と、論理アドレスを物理アドレスに変換するための変換情報が格納される変換情報格納手段と、1以上の各ファイルに対応する1以上の各論理アドレスを、変換情報を用いて1以上の物理アドレスに変換するアドレス変換手段と、アドレス変換手段が取得した物理アドレスに対応するNVメモリの領域にファイルを書き込む書込手段と、アドレス変換手段が取得した物理アドレスに対応するNVメモリの領域からファイルを読み出す読出手段とを備える情報処理装置である。   In the information processing apparatus according to the second aspect of the present invention, in contrast to the first aspect, the file system unit is a file having a file identifier for identifying one or more files and one or more logical addresses corresponding to the files. File management information storage means for storing management information, conversion information storage means for storing conversion information for converting logical addresses into physical addresses, and one or more logical addresses corresponding to one or more files , An address conversion unit that converts the information into one or more physical addresses using the conversion information, a writing unit that writes a file in the area of the NV memory corresponding to the physical address acquired by the address conversion unit, and a physical unit acquired by the address conversion unit An information processing apparatus includes reading means for reading a file from an NV memory area corresponding to an address.

このような構成により、NVメモリに格納されているデータを、ファイルとして扱うことができる。   With such a configuration, data stored in the NV memory can be handled as a file.

また、本第三の発明の情報処理装置は、第二の発明に対して、ファイルシステム部は、NVメモリを、所定のサイズごと領域であるブロックとして管理し、メモリ管理部は、NVメモリを、所定のサイズごと領域であるページとして管理し、ブロックのサイズと、ページのサイズとが同一である情報処理装置である。   In the information processing apparatus according to the third aspect of the present invention, in contrast to the second aspect of the invention, the file system unit manages the NV memory as blocks each having a predetermined size, and the memory management unit manages the NV memory. This is an information processing apparatus that manages a page as a region for each predetermined size, and has the same block size and page size.

このような構成により、メモリの割り当て、および解放処理を効率的に行うことができる。   With such a configuration, memory allocation and release processing can be performed efficiently.

また、本第四の発明の情報処理装置は、第一から第三いずれか1つの発明に対して、メモリ管理部は、所定のタイミングで、プロセスに割り当てたNVメモリの領域を解放し、ファイルシステム部は、NVメモリの空き領域または使用領域を示す1以上の領域情報が格納される領域情報格納手段と、メモリ管理部が解放した領域を空き領域として検出し、空き領域を示す領域情報を領域情報格納手段に蓄積する領域検出手段とをさらに備え、ファイルシステム部は、領域情報が示す空き領域にデータを書込み、メモリ管理部は、領域情報が示す空き領域を実行が要求されたプロセスに対して割り当てる情報処理装置である。   In the information processing apparatus according to the fourth aspect of the present invention, in contrast to any one of the first to third aspects, the memory management unit releases the NV memory area allocated to the process at a predetermined timing, and The system unit detects area information storage means for storing one or more area information indicating a free area or a used area of the NV memory, and detects an area released by the memory management section as a free area, and stores area information indicating the free area. The file system unit writes data to the free area indicated by the area information, and the memory management unit applies the free area indicated by the area information to the process requested to be executed. It is an information processing apparatus to be assigned to.

このような構成により、解放されたNVメモリの空き領域を、ファイルシステムに空き領域として登録することができる。これにより、ファイルシステムの一貫性を保つことができる。   With such a configuration, the released NV memory free area can be registered as a free area in the file system. Thereby, the consistency of the file system can be maintained.

また、本第五の発明の情報処理装置は、第一から第四いずれか1つの発明に対して、揮発性の記録媒体である揮発性メモリをさらに具備し、メモリ管理部は、NVメモリの空き領域の有無を判断する領域判断手段と、領域判断手段が、NVメモリに空き領域がないと判断した場合に、実行が要求されたプロセスに対し、揮発性メモリ上の所定の領域を割り当てるメモリ管理手段とを具備する情報処理装置である。   The information processing apparatus according to the fifth aspect of the present invention further includes a volatile memory that is a volatile recording medium as compared with any one of the first to fourth aspects, and the memory management unit is an NV memory. An area determination unit that determines whether there is a free area, and a memory that allocates a predetermined area on the volatile memory to a process requested to be executed when the area determination unit determines that there is no free area in the NV memory. And an information processing apparatus including management means.

このような構成により、NVメモリの空き容量がない場合でも、揮発性メモリをメインメモリとして使用することができる。   With such a configuration, even when the NV memory has no free space, the volatile memory can be used as the main memory.

本発明による情報処理装置等によれば、メインメモリとして使用する領域とストレージとして使用する領域とを区別することなく、NVメモリをメインメモリおよびストレージとして使用することができる。   According to the information processing apparatus and the like according to the present invention, the NV memory can be used as the main memory and the storage without distinguishing between the area used as the main memory and the area used as the storage.

実施の形態1における情報処理装置1のブロック図Block diagram of information processing apparatus 1 according to Embodiment 1 同情報処理装置1の全体動作について説明するフローチャートA flowchart for explaining the overall operation of the information processing apparatus 1 同空き領域の検出と領域の解放処理について説明するフローチャートFlowchart explaining the detection of the free area and the area release process 同変換情報の例を示す図The figure which shows the example of the conversion information 同領域情報の例を示す図The figure which shows the example of the same area information 同ファイル管理情報の例を示す図The figure which shows the example of the same file management information 同領域情報の例を示す図The figure which shows the example of the same area information 同QEMUの起動コマンドの例を示す図The figure which shows the example of the starting command of the same QEMU 同物理アドレス空間への配置の例を示す図Diagram showing an example of placement in the same physical address space 同仮想記憶システム等の関係を示す図Diagram showing the relationship of the virtual storage system, etc. 同領域割当および解放を行ったときのスクリーンダンプを示す図A figure showing a screen dump when the same area is allocated and released 同ベンチマーク結果を示す図Figure showing the benchmark results 同性能比較結果を示す図The figure which shows the same performance comparison result 同回路構成の例を示す図Diagram showing an example of the same circuit configuration 同情報処理装置1のブロック図Block diagram of the information processing apparatus 1 上記実施の形態におけるコンピュータシステムの概観図Overview of the computer system in the above embodiment 上記実施の形態におけるコンピュータシステムのブロック図Block diagram of a computer system in the above embodiment

以下、本発明による情報処理装置等の実施形態について図面を参照して説明する。なお、実施の形態において同じ符号を付した構成要素は同様の動作を行うので、再度の説明を省略する場合がある。また、本実施の形態において説明する各情報の形式、内容などは、あくまで例示であり、各情報の持つ意味を示すことができれば、形式、内容などは問わない。   Hereinafter, embodiments of an information processing apparatus and the like according to the present invention will be described with reference to the drawings. In addition, since the component which attached | subjected the same code | symbol in embodiment performs the same operation | movement, description may be abbreviate | omitted again. In addition, the format, content, and the like of each information described in this embodiment are merely examples, and the format, content, and the like are not limited as long as the meaning of each information can be indicated.

(実施の形態1)
本実施の形態において、NVメモリを、ストレージとして使用する領域、メインメモリとして使用する領域とに分割することなく、ストレージ、およびメインメモリとして使用する情報処理装置1について説明する。なお、ここで、ストレージとは、いわゆる2次記憶装置や、補助記憶装置と呼ばれる記憶装置のことである。また、メインメモリとは、いわゆる1次記憶装置や、主記憶装置と呼ばれる記憶装置のことである。
(Embodiment 1)
In the present embodiment, the information processing apparatus 1 used as a storage and main memory without dividing the NV memory into an area used as storage and an area used as main memory will be described. Here, the storage is a so-called secondary storage device or a storage device called an auxiliary storage device. The main memory is a so-called primary storage device or a storage device called a main storage device.

図1は、本実施の形態における情報処理装置1のブロック図である。情報処理装置1は、NVメモリ11、揮発性メモリ12、受付部13、ファイルシステム部14、メモリ管理部15を備える。また、ファイルシステム部14は、ファイル管理情報格納手段141、変換情報格納手段142、領域情報格納手段143、アドレス変換手段144、書込手段145、読出手段146、領域検出手段147を備える。また、メモリ管理部15は、領域判断手段151、メモリ管理手段152を備える。   FIG. 1 is a block diagram of an information processing apparatus 1 in the present embodiment. The information processing apparatus 1 includes an NV memory 11, a volatile memory 12, a reception unit 13, a file system unit 14, and a memory management unit 15. The file system unit 14 includes a file management information storage unit 141, a conversion information storage unit 142, a region information storage unit 143, an address conversion unit 144, a writing unit 145, a reading unit 146, and a region detection unit 147. In addition, the memory management unit 15 includes an area determination unit 151 and a memory management unit 152.

また、本実施の形態における情報処理装置1が備えるファイルシステム部14、およびメモリ管理部15は、例えば、いわゆるOSや、当該OSのカーネルと呼ばれるものなどである。   In addition, the file system unit 14 and the memory management unit 15 included in the information processing apparatus 1 according to the present embodiment are, for example, a so-called OS or what is called a kernel of the OS.

NVメモリ11は、不揮発性の記録媒体である。NVメモリ11は、例えば、PCM(Pahse Change Memory、相変化メモリ)や、MRAM、ReMAM、EEPROM、フラッシュメモリなどである。また、NVメモリ11は、通常、不揮発性メモリであれば、その形状や種類などは、問わない。また、NVメモリ11は、例えば、バイト単位アクセスが可能な不揮発性メモリであれば、物理アドレスにてアクセスすることができる。また、NVメモリ11は、例えば、バイト単位アクセスが不可能な不揮発性メモリであっても、図14に示すように、バッファRAMを経由することで、物理アドレスにてアクセスすることができる。   The NV memory 11 is a non-volatile recording medium. The NV memory 11 is, for example, PCM (Phase Change Memory), MRAM, ReMAM, EEPROM, flash memory, or the like. In addition, the NV memory 11 is not particularly limited in shape or type as long as it is a nonvolatile memory. For example, if the NV memory 11 is a nonvolatile memory that can be accessed in byte units, it can be accessed by a physical address. Further, for example, even if the NV memory 11 is a non-volatile memory that cannot be accessed in byte units, it can be accessed by a physical address via a buffer RAM as shown in FIG.

また、NVメモリ11は、所定の単位のデータが格納される1以上の領域(以下、適宜、単位領域)を有する。所定の単位とは、通常、いわゆるサイズ(容量)であり、例えば、4KB(キロバイト)や、512B(バイト)などである。当該サイズは、予め決められていてもよいし、そうでなくてもよい。また、当該一の単位領域は、例えば、後述のファイルシステム部14からは、「ブロック」として使用される。また、当該一の単位領域は、例えば、後述のメモリ管理部15からは、「ページ」として使用される。つまり、当該一の単位領域は、通常、2以上の名称で呼ばれる。また、所定の単位は、例えば、ブロック、ページ、2以上のブロック、2以上のページであってもよい。また、本実施の形態において、当該ブロックのサイズと、当該ページのサイズとは、同一である。また、当該サイズは、4KBであることが好適である。   In addition, the NV memory 11 has one or more areas (hereinafter referred to as unit areas as appropriate) in which data of a predetermined unit is stored. The predetermined unit is usually a so-called size (capacity), such as 4 KB (kilobytes) or 512 B (bytes). The size may or may not be predetermined. Further, the one unit area is used as, for example, a “block” from the file system unit 14 described later. The one unit area is used as, for example, a “page” from the memory management unit 15 described later. That is, the one unit area is usually called by two or more names. The predetermined unit may be, for example, a block, a page, two or more blocks, or two or more pages. In the present embodiment, the size of the block and the size of the page are the same. The size is preferably 4 KB.

揮発性メモリ12は、揮発性の記録媒体である。揮発性メモリ12は、通常、いわゆるDRAMであるが、SRAMなどであってもよい。また、揮発性メモリ12は、通常、いわゆる揮発性メモリであれば、その形状や種類などは問わない。   The volatile memory 12 is a volatile recording medium. The volatile memory 12 is usually a so-called DRAM, but may be an SRAM or the like. The volatile memory 12 is not particularly limited in shape or type as long as it is a so-called volatile memory.

また、揮発性メモリ12は、NVメモリ11と同様に、1以上の単位領域を有する。当該一の単位領域は、通常、後述のメモリ管理部15から、「ページ」として使用される。なお、当該一の単位領域は、通常、後述のファイルシステム部14から、「ブロック」として使用されない。   Further, the volatile memory 12 has one or more unit areas, like the NV memory 11. The one unit area is normally used as a “page” from the memory management unit 15 described later. The one unit area is not normally used as a “block” from the file system unit 14 described later.

また、NVメモリ11と、揮発性メモリ12は、通常、一の物理アドレス空間に配置される。当該物理アドレス空間は、通常、連続した1以上の物理アドレスを有する。また、「物理アドレス空間に配置される」とは、NVメモリ11、揮発性メモリ12のそれぞれが有する各1以上の単位領域と、物理アドレスとを対応付けることである。つまり、当該一の単位領域は、物理アドレスにより識別される。また、当該一の単位領域は、例えば、論理アドレス(仮想アドレスともいう)により間接的に識別されてもよい。なお、当該一の単位領域は、ブロックまたはページと呼ばれるため、物理アドレスおよび論理アドレスを、以下、適宜、ブロック識別子またはページ識別子とする。   Further, the NV memory 11 and the volatile memory 12 are usually arranged in one physical address space. The physical address space usually has one or more consecutive physical addresses. Further, “arranged in the physical address space” means that one or more unit areas of each of the NV memory 11 and the volatile memory 12 are associated with a physical address. That is, the one unit area is identified by the physical address. Further, the one unit area may be indirectly identified by a logical address (also referred to as a virtual address), for example. Note that the one unit area is called a block or a page, and therefore, the physical address and the logical address are hereinafter appropriately referred to as a block identifier or a page identifier.

また、上記、NVメモリ11の物理アドレス空間への配置は、例えば、後述のファイルシステム部14またはメモリ管理部15が行う。また、当該配置は、例えば、アドレス空間配置部(図示せず)が行ってもよい。   Further, the placement of the NV memory 11 in the physical address space is performed by, for example, the file system unit 14 or the memory management unit 15 described later. Further, the arrangement may be performed by, for example, an address space arrangement unit (not shown).

また、NVメモリ11と、揮発性メモリ12とには、通常、重複する物理アドレスが割り当てられることはない。   Further, the NV memory 11 and the volatile memory 12 are normally not assigned overlapping physical addresses.

受付部13は、指示や情報などを受け付ける。指示は、例えば、プログラムの実行の指示や、プロセスの実行の指示、プログラムやプロセスへのメモリ割当の指示、ファイル操作の指示などである。また、情報は、例えば、いわゆるコマンドや、当該コマンドに与える引数などである。また、これらの指示や情報は、通常、指示や情報を出力するプログラムが出力する。   The receiving unit 13 receives instructions and information. The instructions are, for example, a program execution instruction, a process execution instruction, a memory allocation instruction to the program or process, a file operation instruction, or the like. The information is, for example, a so-called command or an argument given to the command. These instructions and information are usually output by a program that outputs the instructions and information.

ファイルシステム部14は、いわゆるファイルシステムである。当該ファイルシステムは、例えば、PRAMFS(Persistent and Protected RAM File System)や、Ext2(Second Extended Filesystem)、SCMFS(A File System for Storage Class Memory)などである。また、当該ファイルシステムは、XIP(eXecute−In−Place)をサポートしており、NVメモリ11を対象としたファイルシステムであれば、何でもよい。つまり、ファイルシステム部14は、NVメモリ11を、いわゆるストレージとして使用する。また、ファイルシステム部14は、通常、NVメモリ11を1以上の単位領域に分割し、当該一の単位領域を、ブロックとして使用する。   The file system unit 14 is a so-called file system. The file system is, for example, PRAMFS (Persistent and Protected RAM File System), Ext2 (Second Extended System), or SCMFS (A File System for Storage Class). In addition, the file system supports XIP (eXecute-In-Place), and any file system that targets the NV memory 11 may be used. That is, the file system unit 14 uses the NV memory 11 as so-called storage. In addition, the file system unit 14 usually divides the NV memory 11 into one or more unit areas, and uses the one unit area as a block.

また、ファイルシステム部14は、例えば、一のファイルをNVメモリ11に書き込む場合、まず、当該一のファイルを、どの1以上のブロックに割り当てるのかを決定する。そして、ファイルシステム部14は、当該一のファイルを、当該割り当てたブロックごとに分割し、NVメモリ11に書き込む。   For example, when writing one file to the NV memory 11, the file system unit 14 first determines to which one or more blocks the one file is assigned. Then, the file system unit 14 divides the one file into the assigned blocks, and writes the divided file into the NV memory 11.

また、一のファイルをNVメモリ11に書き込んだ場合、ファイルシステム部14は、通常、書き込んだファイルの識別子(以下、適宜、ファイル識別子)と、書込み先のブロックを識別するブロック識別子との対応を示すファイル管理情報を、任意の記憶領域または所定の記憶領域などに蓄積する。ファイル識別子は、例えば、IDや、いわゆるファイル名などである。また、ファイル識別子は、ファイルを識別することができれば、その形式や内容などは、問わない。   Further, when one file is written in the NV memory 11, the file system unit 14 normally associates the identifier of the written file (hereinafter referred to as file identifier as appropriate) with the block identifier for identifying the write destination block. The file management information shown is accumulated in an arbitrary storage area or a predetermined storage area. The file identifier is, for example, an ID or a so-called file name. The file identifier may be any format or content as long as the file can be identified.

また、ファイルシステム部14は、例えば、一のファイルをNVメモリ11から読み出す場合、まず、当該一のファイルが書き込まれている1以上のブロックを識別するブロック識別子を、ファイル管理情報から取得する。そして、ファイルシステム部14は、取得した1以上のブロックの識別子が示すブロックから、1以上に分割されたファイルのデータを取得する。そして、ファイルシステム部14は、取得した1以上のデータを結合し、ファイルを取得する。   For example, when reading one file from the NV memory 11, the file system unit 14 first acquires a block identifier for identifying one or more blocks in which the one file is written from the file management information. Then, the file system unit 14 acquires data of the file divided into one or more from the block indicated by the acquired identifier of the one or more blocks. Then, the file system unit 14 combines the acquired one or more data to acquire a file.

また、ファイルシステム部14は、例えば、一のファイルをNVメモリ11から削除する場合、まず、当該一のファイルが書き込まれている1以上のブロックを識別するファイル識別子を、ファイル管理情報から取得する。そして、ファイルシステム部14は、取得した1以上のブロックの識別子が示すブロックから、データを消去する。なお、当該「消去」には、通常、当該ファイル管理情報を削除することも含まれる。また、当該「消去」は、例えば、後述の領域情報を更新すること(使用領域であることを示す領域情報を、空き領域であることを示す領域情報に書き換える)ことであってもよい。   For example, when deleting one file from the NV memory 11, the file system unit 14 first acquires a file identifier that identifies one or more blocks in which the one file is written from the file management information. . Then, the file system unit 14 erases data from the block indicated by the acquired identifier of one or more blocks. Note that “erasing” usually includes deleting the file management information. The “erase” may be, for example, updating area information to be described later (rewriting area information indicating a used area to area information indicating a free area).

また、一のファイルをNVメモリ11から削除した場合、ファイルシステム部14は、通常、削除したファイルを識別するファイル識別子と、当該削除先のブロックを識別するブロック識別子との対応を示す情報を、当該情報を蓄積した任意の記憶領域や所定の記憶領域などから消去する。   When one file is deleted from the NV memory 11, the file system unit 14 normally stores information indicating the correspondence between the file identifier for identifying the deleted file and the block identifier for identifying the block to be deleted. The information is deleted from an arbitrary storage area in which the information is stored or a predetermined storage area.

なお、ファイルシステムは、公知の技術であるので、ファイルシステム部14が行う処理や動作については、適宜、説明を省略する。また、ファイルシステム部14は、例えば、NVメモリ11におけるファイルの管理や、空き領域の管理、NVメモリ11へのファイルの書込み、NVメモリ11からのファイルの読出しなどを、通常、後述の各手段により行う。   Since the file system is a well-known technique, description of processing and operations performed by the file system unit 14 will be omitted as appropriate. In addition, the file system unit 14 usually performs, for example, each means described below for managing a file in the NV memory 11, managing a free area, writing a file to the NV memory 11, and reading a file from the NV memory 11. To do.

ファイル管理情報格納手段141には、ファイルを識別するファイル識別子と、当該ファイルに対応する1以上の論理アドレスとを有する1以上のファイル管理情報が格納される。当該論理アドレスは、物理アドレスであってもよい。   The file management information storage unit 141 stores one or more file management information having a file identifier for identifying a file and one or more logical addresses corresponding to the file. The logical address may be a physical address.

変換情報格納手段142には、論理アドレスを物理アドレスに変換するための変換情報が格納される。変換情報は、例えば、論理アドレスを代入することで、物理アドレスを算出する変換式や、一の論理アドレスと一の物理アドレスとの対応表、一の論理アドレスに対するオフセットなどである。変換情報は、後述のアドレス変換手段144が、一の論理アドレスを一の物理アドレスに変換するために用いる情報である。また、変換情報は、論理アドレスを物理アドレスに変換することができる情報であれば、その形式や内容などは、問わない。また、変換情報は、例えば、物理アドレスを論理アドレスに変換するための情報であってもよい。   The conversion information storage unit 142 stores conversion information for converting a logical address into a physical address. The conversion information includes, for example, a conversion formula for calculating a physical address by substituting a logical address, a correspondence table between one logical address and one physical address, an offset with respect to one logical address, and the like. The conversion information is information used by an address conversion unit 144 described later to convert one logical address to one physical address. The conversion information is not limited in its format or content as long as it is information that can convert a logical address into a physical address. The conversion information may be information for converting a physical address into a logical address, for example.

領域情報格納手段143には、1以上の領域情報が格納される。領域情報とは、NVメモリ11において使用されていない1以上の単位領域である空き領域を示す情報である。なお、領域情報は、NVメモリ11において使用されている1以上の単位領域である使用領域を示す情報であってもよい。つまり、領域情報は、空き領域を示してもよいし、使用領域を示してもよい。   The area information storage unit 143 stores one or more area information. The area information is information indicating a free area that is one or more unit areas that are not used in the NV memory 11. The area information may be information indicating a used area that is one or more unit areas used in the NV memory 11. That is, the area information may indicate a free area or a used area.

領域情報は、通常、一の論理アドレスと、フラグとを有する。当該論理アドレスは、物理アドレスであってもよい。また、当該フラグは、当該一の論理アドレスで識別される単位領域が、空き領域であるか、または使用領域であるかを示す。当該フラグは、例えば、空き領域を示す場合は「0」、使用領域を示す場合は「1」である。また、当該フラグは、例えば、空き領域を示す場合は「○」、使用領域を示す場合は「×」である。また、領域情報は、2つの論理アドレスを有していてもよい。この場合、領域情報は、当該2つの論理アドレスで示される論理アドレスの範囲に対応する単位領域が、空き領域であること、または使用領域であることを示す。   The area information usually has one logical address and a flag. The logical address may be a physical address. The flag indicates whether the unit area identified by the one logical address is an empty area or a used area. The flag is, for example, “0” when indicating a free area and “1” when indicating a used area. The flag is, for example, “◯” when indicating a free area, and “X” when indicating a used area. Further, the area information may have two logical addresses. In this case, the area information indicates that the unit area corresponding to the range of the logical address indicated by the two logical addresses is an empty area or a used area.

アドレス変換手段144は、一の論理アドレスを、変換情報格納手段142に格納されている変換情報を用いて、一の物理アドレスに変換する。当該「変換」には、通常、一の論理アドレスに対応する一の物理アドレスを、当該変換情報を用いて取得することも含まれる。また、アドレス変換手段144は、通常、一のファイルに対応する1以上の各論理アドレスを、変換情報を用いて1以上の物理アドレスに変換する。当該ファイルは、例えば、NVメモリ11に書き込むことを要求されたファイルや、NVメモリ11から読み出すことを要求されたファイルなどである。なお、当該書込みを要求する指示や、当該読出しを要求する指示は、通常、受付部13が受け付ける。また、当該指示は、通常、ファイル識別子を有する。   The address conversion unit 144 converts one logical address into one physical address using the conversion information stored in the conversion information storage unit 142. The “conversion” usually includes obtaining one physical address corresponding to one logical address using the conversion information. Further, the address converting unit 144 normally converts one or more logical addresses corresponding to one file into one or more physical addresses using the conversion information. The file is, for example, a file requested to be written to the NV memory 11 or a file requested to be read from the NV memory 11. Note that the receiving unit 13 normally receives an instruction to request the writing and an instruction to request the reading. The instruction usually has a file identifier.

アドレス変換手段144は、例えば、まず、受付部13が受け付けた指示が有するファイル識別子を取得する。そして、アドレス変換手段144は、当該取得したファイル識別子に対応する論理アドレスを、ファイル管理情報格納手段141から取得する。そして、アドレス変換手段144は、当該取得した論理アドレスから、変換情報格納手段142に格納されている変換情報を用いて、物理アドレスを取得する。   For example, the address conversion unit 144 first acquires the file identifier included in the instruction received by the receiving unit 13. Then, the address conversion unit 144 acquires a logical address corresponding to the acquired file identifier from the file management information storage unit 141. Then, the address conversion unit 144 acquires a physical address from the acquired logical address using the conversion information stored in the conversion information storage unit 142.

例えば、変換情報が変換式である場合、アドレス変換手段144は、論理アドレスを当該変換式に代入し、物理アドレスを取得する。また、例えば、変換情報が対応表である場合、アドレス変換手段144は、論理アドレスに対応する物理アドレスを、当該対応表から取得する。また、例えば、変換情報がオフセットである場合、アドレス変換手段144は、論理アドレスに当該オフセットを加算し、物理アドレスを取得する。   For example, when the conversion information is a conversion formula, the address conversion unit 144 substitutes a logical address into the conversion formula and acquires a physical address. For example, when the conversion information is a correspondence table, the address conversion unit 144 acquires a physical address corresponding to the logical address from the correspondence table. Further, for example, when the conversion information is an offset, the address conversion unit 144 adds the offset to the logical address and acquires the physical address.

また、アドレス変換手段144は、例えば、変換情報を用いて、物理アドレスを論理アドレスに変換してもよい。物理アドレスを論理アドレスに変換する方法や手順などは、論理アドレスを物理アドレスに変換する方法や手順などと同様であるので、説明を省略する。   Further, the address conversion unit 144 may convert a physical address into a logical address using, for example, conversion information. The method and procedure for converting a physical address to a logical address are the same as the method and procedure for converting a logical address to a physical address, and thus description thereof is omitted.

書込手段145は、書込みが要求されたファイルを、NVメモリに書き込む。これは、例えば、受付部13が受け付けたファイル書込指示が有するファイル識別子に対応するデータを、ファイルとしてNVメモリに書き込むことである。   The writing unit 145 writes the file requested to be written into the NV memory. This is, for example, writing the data corresponding to the file identifier included in the file writing instruction received by the receiving unit 13 as a file in the NV memory.

書込手段145は、例えば、書込みが要求されたファイルを、領域情報格納手段143に格納されている領域情報が示す空き領域のうち、どの1以上のブロックに書き込むのかを決定する。当該決定とは、書込先の1以上の各ブロックに対応する1以上の論理アドレスを取得することである。また、当該決定の方法は、問わない。書込手段145は、例えば、書込みが要求されたファイルのサイズに該当する1以上の連続する空き領域、または1以上の連続しない(不連続の)空き領域を検索し、当該空き領域に対応する論理アドレスを取得する。そして、書込手段145は、当該取得した1以上の論理アドレスをアドレス変換手段144に渡し、当該1以上の各論理アドレスに対応する1以上の物理アドレスを、アドレス変換手段144から取得する。そして、書込手段145は、当該ファイルを、当該取得した1以上の各物理アドレスに対応するブロックごとに分割し、当該分割したファイルを、各ブロックに書き込む。そして、書込手段145は、書き込んだファイルを識別するファイル識別子と、書き込んだ1以上の各ブロックに対応する論理アドレスとを対応付け、ファイル管理情報を作成する。そして、書込手段145は、当該ファイル管理情報をファイル管理情報格納手段141に蓄積する。また、この場合、書込手段145は、例えば、後述の領域検出手段147に、書き込んだファイルに対応する1以上の論理アドレスを、後述の領域検出手段147に渡してもよい。   For example, the writing unit 145 determines which one or more blocks of the free area indicated by the area information stored in the area information storage unit 143 to write the file requested to be written. The determination is to obtain one or more logical addresses corresponding to one or more blocks to be written to. Moreover, the method of the said determination is not ask | required. For example, the writing unit 145 searches for one or more continuous free areas or one or more non-consecutive (non-contiguous) free areas corresponding to the size of the file requested to be written, and corresponds to the free areas. Get logical address. Then, the writing unit 145 passes the acquired one or more logical addresses to the address conversion unit 144, and acquires one or more physical addresses corresponding to the one or more logical addresses from the address conversion unit 144. Then, the writing unit 145 divides the file into blocks corresponding to the acquired one or more physical addresses, and writes the divided file into each block. Then, the writing unit 145 creates file management information by associating the file identifier for identifying the written file with the logical address corresponding to each of the written one or more blocks. Then, the writing unit 145 accumulates the file management information in the file management information storage unit 141. In this case, for example, the writing unit 145 may pass one or more logical addresses corresponding to the written file to the area detecting unit 147 described later to the area detecting unit 147 described later.

読出手段146は、読出しが要求されたファイルを、NVメモリから読み出す。これは、例えば、受付部13が受け付けたファイル読出指示が有するファイル識別子に対応するデータを、ファイルとしてNVメモリから読み出すことである。   The reading unit 146 reads the file requested to be read from the NV memory. For example, the data corresponding to the file identifier included in the file read instruction received by the receiving unit 13 is read from the NV memory as a file.

読出手段146は、例えば、読出しが要求されたファイルを識別するファイル識別子に対応する1以上の論理アドレスを、ファイル管理情報格納手段141から取得する。そして、読出手段146は、当該取得した1以上の論理アドレスをアドレス変換手段144に渡し、当該1以上の各論理アドレスに対応する1以上の物理アドレスを、アドレス変換手段144から取得する。そして、読出手段146は、当該1以上の各物理アドレスに対応するブロックから、データを読み出す。そして、読出手段146は、読み出した1以上のデータを結合し、ファイルとして取得する。   For example, the reading unit 146 acquires one or more logical addresses corresponding to the file identifier for identifying the file requested to be read from the file management information storage unit 141. Then, the reading unit 146 passes the acquired one or more logical addresses to the address conversion unit 144, and acquires one or more physical addresses corresponding to the one or more logical addresses from the address conversion unit 144. Then, the reading unit 146 reads data from the block corresponding to the one or more physical addresses. Then, the reading unit 146 combines the read one or more data and acquires it as a file.

また、読出手段146は、例えば、削除が要求されたファイルを、NVメモリから削除してもよい。この場合、削除の対象となるファイルに対応する1以上の物理アドレスの取得の方法や手順などは、読出しの対象となるファイルに対応する1以上の物理アドレスの取得の方法や手順などと同様であるので、説明を省略する。そして、読出手段146は、取得した1以上の物理アドレスに対応するブロックから、データを消去する。そして、読出手段146は、ファイル管理情報格納手段141から、当該削除するファイルに対応するファイル管理情報を削除する。また、この場合、読出手段146は、例えば、後述の領域検出手段147に、削除したファイルに対応する1以上の論理アドレスを、後述の領域検出手段147に渡してもよい。また、当該ファイルの削除は、図示しないファイル削除手段が行ってもよい。   Further, the reading unit 146 may delete, for example, a file requested to be deleted from the NV memory. In this case, the method or procedure for acquiring one or more physical addresses corresponding to the file to be deleted is the same as the method or procedure for acquiring one or more physical addresses corresponding to the file to be read. Since there is, description is abbreviate | omitted. Then, the reading unit 146 erases data from the block corresponding to the acquired one or more physical addresses. Then, the reading unit 146 deletes the file management information corresponding to the file to be deleted from the file management information storage unit 141. In this case, for example, the reading unit 146 may pass one or more logical addresses corresponding to the deleted file to the area detecting unit 147 described later to the area detecting unit 147 described later. The file may be deleted by a file deletion unit (not shown).

領域検出手段147は、NVメモリ11の空き領域を検出する。そして、領域検出手段147は、当該空き領域を示す領域情報を、領域情報格納手段143に蓄積する。領域検出手段147は、例えば、NVメモリ11が有する1以上の各単位領域が、空き領域であるか否かを判断する。そして、領域検出手段147は、空き領域であると判断した1以上の各単位領域に対応する1以上の物理アドレスを取得する。そして、領域検出手段147は、当該1以上の物理アドレスをアドレス変換手段144に渡し、当該1以上の各物理アドレスに対応する1以上の論理アドレスを取得する。そして、領域検出手段147は、当該1以上の各論理アドレスと、空き領域であることを示すフラグとを対応付け、領域情報を作成する。そして、領域検出手段147は、当該領域情報を領域情報格納手段143に蓄積する。当該蓄積は、いわゆる追記や、上書き、更新などを含む概念である。また、領域検出手段147は、空き領域ではなく、使用領域を検出してもよい。   The area detection unit 147 detects an empty area in the NV memory 11. Then, the area detection unit 147 accumulates area information indicating the empty area in the area information storage unit 143. For example, the area detection unit 147 determines whether one or more unit areas of the NV memory 11 are free areas. Then, the area detection unit 147 acquires one or more physical addresses corresponding to one or more unit areas determined to be free areas. Then, the area detection unit 147 passes the one or more physical addresses to the address conversion unit 144, and acquires one or more logical addresses corresponding to the one or more physical addresses. Then, the area detection unit 147 creates area information by associating the one or more logical addresses with a flag indicating a free area. Then, the area detection unit 147 accumulates the area information in the area information storage unit 143. The accumulation is a concept including so-called appending, overwriting, updating, and the like. Further, the area detection unit 147 may detect the used area instead of the empty area.

また、領域検出手段147は、例えば、新たに空き領域となった単位領域、または新たに使用領域となった単位領域を検出してもよい。新たに空き領域となった単位領域を検出する場合、領域検出手段147は、例えば、領域情報格納手段143に格納されている領域情報から、使用領域である1以上の単位領域を特定する。そして、領域検出手段147は、当該使用領域である1以上の単位領域が空き領域であるか否かを判断する。そして、領域検出手段147は、空き領域であると判断した1以上の各単位領域に対応する1以上の領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積する。また、新たに使用領域となった単位領域を検出する場合、領域検出手段147は、例えば、領域情報格納手段143に格納されている領域情報から、空き領域である1以上の単位領域を特定する。そして、領域検出手段147は、当該空き領域である1以上の単位領域が使用領域であるか否かを判断する。そして、領域検出手段147は、使用領域であると判断した1以上の各単位領域に対応する1以上の領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積する。なお、領域情報の作成の方法や手順などは、上記と同様であるので、説明を省略する。   Further, the area detection unit 147 may detect, for example, a unit area that has become a new empty area or a unit area that has newly become a use area. When detecting a unit area that has newly become a free area, the area detection unit 147 specifies one or more unit areas that are used areas from, for example, area information stored in the area information storage unit 143. Then, the area detection unit 147 determines whether or not one or more unit areas that are used areas are free areas. Then, the area detection unit 147 creates one or more pieces of area information corresponding to one or more unit areas determined to be free areas, and accumulates the area information in the area information storage unit 143. In addition, when detecting a unit area that is newly used, the area detection unit 147 specifies one or more unit areas that are free areas from the area information stored in the area information storage unit 143, for example. . Then, the area detection unit 147 determines whether or not one or more unit areas that are free areas are used areas. Then, the area detection unit 147 creates one or more area information corresponding to one or more unit areas determined to be used areas, and accumulates the area information in the area information storage unit 143. Note that the region information creation method and procedure are the same as described above, and thus the description thereof is omitted.

また、領域検出手段147は、例えば、書込手段145がファイルを書き込んだ後や、読出手段146がファイルを削除した後、後述のメモリ管理部15がプロセスに領域を割り当てた後、後述のメモリ管理部15が領域を解放した後など、所定のタイミングにて、空き領域を検出する。   In addition, the area detection unit 147 may, for example, after the writing unit 145 writes a file, after the reading unit 146 deletes the file, after the memory management unit 15 described later allocates an area to the process, An empty area is detected at a predetermined timing such as after the management unit 15 releases the area.

また、例えば、書込手段145から1以上の論理アドレスを受け取った場合、領域検出手段147は、当該1以上の各論理アドレスと、使用領域であることを示すフラグとを対応付け、1以上の領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積する。また、例えば、読出手段146から1以上の論理アドレスを受け取った場合、領域検出手段147は、当該1以上の各論理アドレスと、空き領域であることを示すフラグとを対応付け、1以上の領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積する。   For example, when one or more logical addresses are received from the writing unit 145, the area detecting unit 147 associates each of the one or more logical addresses with a flag indicating that the area is a used area. Area information is created, and the area information is stored in the area information storage unit 143. Further, for example, when one or more logical addresses are received from the reading unit 146, the area detecting unit 147 associates each of the one or more logical addresses with a flag indicating that it is a free area. Information is created and the region information is stored in the region information storage unit 143.

また、例えば、領域情報「(0x00000000|0),(0x00000001|0),(0x00000002|0)」が領域情報格納手段143に既に格納されているとする。当該領域情報は、論理アドレス「0x00000000」から「0x00000002」までに対応するブロックが空き領域であることを意味する。また、領域検出手段147が領域情報「(0x00000000|0),(0x00000001|1),(0x00000002|1)」を取得したとする。当該領域情報は、論理アドレス「0x00000000」から「0x00000002」までに対応するブロックにおいて、論理アドレス「0x00000000」に対応するブロックのみが空き領域であることを意味する。この様な場合、領域検出手段147は、既に格納されている領域情報を、取得した領域情報で上書きする。   For example, it is assumed that the area information “(0x00000000 | 0), (0x00000001 | 0), (0x00000002 | 0)” is already stored in the area information storage unit 143. The area information means that blocks corresponding to logical addresses “0x00000000” to “0x00000002” are free areas. Further, it is assumed that the area detection unit 147 acquires area information “(0x00000000 | 0), (0x00000001 | 1), (0x00000002 | 1)”. The area information means that only blocks corresponding to the logical address “0x00000000” are free areas in the blocks corresponding to the logical addresses “0x00000000” to “0x00000002”. In such a case, the area detection unit 147 overwrites the already stored area information with the acquired area information.

また、例えば、領域情報「0x00000000〜0x00000002」が領域情報格納手段143に既に格納されているとする。当該領域情報は、論理アドレス「0x00000000」から「0x00000002」までに対応するブロックが空き領域であることを意味する。また、領域検出手段147が領域情報「0x00000003〜0x00000005」を取得したとする。当該領域情報の意味は、上記と同様であるので、説明を省略する。この様な場合、領域検出手段147は、既に格納されている領域情報を「0x00000000〜0x00000005」に書き換える。   Further, for example, it is assumed that the area information “0x00000000 to 0x00000002” is already stored in the area information storage unit 143. The area information means that blocks corresponding to logical addresses “0x00000000” to “0x00000002” are free areas. Further, it is assumed that the area detection unit 147 acquires area information “0x00000003 to 0x00000005”. Since the meaning of the area information is the same as described above, the description thereof is omitted. In such a case, the area detection unit 147 rewrites the already stored area information to “0x00000000-0x00000005”.

以上より、領域情報格納手段143への領域情報の蓄積は、通常、領域検出手段147が行う。従って、例えば、単位領域にデータが保存されているが、見かけ上は当該単位領域を空き領域として使用する場合(単位領域からデータは削除せずに、管理上は当該単位領域を空き領域として使用する場合)は、読出手段146が、削除の対象となるファイルに対応する1以上の論理アドレスを取得し、領域検出手段147が、当該1以上の論理アドレスに空き領域であることを示すフラグを対応付け、領域情報格納手段143に蓄積する。   As described above, the area information is normally accumulated in the area information storage unit 143 by the area detection unit 147. Thus, for example, when data is stored in a unit area but apparently the unit area is used as an empty area (data is not deleted from the unit area, but the unit area is used as an empty area for management purposes) The reading means 146 obtains one or more logical addresses corresponding to the file to be deleted, and the area detecting means 147 sets a flag indicating that the one or more logical addresses are free areas. The information is stored in the association and area information storage unit 143.

メモリ管理部15は、いわゆるメモリ管理を行う。メモリ管理とは、例えば、実行が要求されたプロセスに対し、NVメモリ11の1以上の単位領域を割り当てることや、実行中のプロセスからの要求に応じて、NVメモリ11の1以上の単位領域を割り当てること、不要となったNVメモリ11の1以上の単位領域を、空き領域として解放することなどである。つまり、メモリ管理部15は、NVメモリ11を、いわゆるメインメモリとして使用する。また、メモリ管理部15は、通常、NVメモリ11を1以上の単位領域に分割し、当該一の単位領域を、ページとして管理する。   The memory management unit 15 performs so-called memory management. Memory management refers to, for example, allocating one or more unit areas of the NV memory 11 to a process requested to be executed, or one or more unit areas of the NV memory 11 in response to a request from the executing process. And one or more unit areas of the NV memory 11 that are no longer needed are released as free areas. That is, the memory management unit 15 uses the NV memory 11 as a so-called main memory. In addition, the memory management unit 15 normally divides the NV memory 11 into one or more unit areas, and manages the one unit area as a page.

なお、メモリ管理は、公知の技術であるので、メモリ管理部15が行う処理や動作については、適宜、説明を省略する。また、メモリ管理部15は、例えば、プロセスなどへのページの割り当てや、割り当てたページの解放などを、通常、後述の各手段により行う。   Note that since memory management is a known technique, description of processing and operations performed by the memory management unit 15 will be omitted as appropriate. In addition, the memory management unit 15 normally performs, for example, allocation of pages to processes, release of allocated pages, and the like by means described below.

領域判断手段151は、NVメモリ11の空き領域の有無を判断する。このとき、領域判断手段151は、通常、実行が要求されたプロセスが要求するサイズと同サイズの空き領域の有無を判断する。また、領域判断手段151は、通常、NVメモリ11のすべての領域を、ファイルシステム部14が使用しているか否かを判断する。領域判断手段151は、通常、これらの判断を、ファイル管理情報格納手段141に格納されているファイル管理情報、および領域情報格納手段143に格納されている領域情報を用いて判断する。つまり、領域判断手段151は、通常、領域情報格納手段143に格納されている領域情報により、NVメモリ11のすべての領域が使用領域であるか否かを判断する。そして、領域判断手段151は、NVメモリ11のすべての領域が使用領域である場合、ファイル管理情報格納手段141に格納されているファイル管理情報により、当該すべての使用領域にファイルが書き込まれているか否かを判断する。   The area determination unit 151 determines whether there is a free area in the NV memory 11. At this time, the area determination unit 151 normally determines whether or not there is a free area having the same size as that requested by the process requested to be executed. The area determination unit 151 normally determines whether or not the file system unit 14 is using all areas of the NV memory 11. The area determination unit 151 normally determines these determinations using the file management information stored in the file management information storage unit 141 and the area information stored in the area information storage unit 143. In other words, the area determination unit 151 normally determines whether all areas of the NV memory 11 are used areas based on the area information stored in the area information storage unit 143. Then, if all the areas of the NV memory 11 are used areas, the area determining means 151 determines whether the files are written in all the used areas based on the file management information stored in the file management information storage means 141. Judge whether or not.

メモリ管理手段152は、実行が要求されたプロセスに対し、NVメモリ11が有する1以上のページを割り当てる。当該プロセスは、通常、いわゆるユーザが実行などを要求したユーザプロセスである。また、当該「割り当てる」とは、当該プロセスのために当該1以上のページを確保することや、当該プロセスに対し当該1以上のページを使用することを許可することなどである。また、このとき、メモリ管理手段152は、通常、当該1以上のページを識別する論理アドレスを、当該プロセスに送信する。また、当該論理アドレスは、物理アドレスであってもよい。   The memory management unit 152 allocates one or more pages of the NV memory 11 to the process requested to be executed. The process is usually a user process requested by a so-called user. In addition, the “assignment” includes securing the one or more pages for the process, permitting the process to use the one or more pages, and the like. At this time, the memory management unit 152 normally transmits a logical address for identifying the one or more pages to the process. The logical address may be a physical address.

また、メモリ管理手段152は、例えば、所定のタイミングで、上記プロセスに割り当てた1以上のページを解放する。当該「解放する」とは、当該1以上のページを、空き領域とすることである。また、所定のタイミングとは、例えば、プロセス実行の終了時や、正常終了時、再起動時などである。また、メモリ管理手段152は、例えば、当該ページの解放後に、解放した旨を、領域検出手段147に通知してもよい。また、メモリ管理手段152は、例えば、当該ページの解放後に、当該ページが空き領域であることを示す領域情報を、領域情報格納手段143に蓄積してもよい。   Also, the memory management unit 152 releases one or more pages allocated to the process at a predetermined timing, for example. “Release” means to make the one or more pages free. The predetermined timing is, for example, at the end of the process execution, at the normal end, or at the restart. Further, for example, the memory management unit 152 may notify the area detection unit 147 that the page has been released after the page is released. For example, the memory management unit 152 may store area information indicating that the page is an empty area in the area information storage unit 143 after the page is released.

また、例えば、領域判断手段151が、NVメモリ11に空き領域がないと判断した場合、メモリ管理手段152は、実行が要求されたプロセスに対し、揮発性メモリ12が有する1以上のページを割り当てる。   For example, if the area determination unit 151 determines that there is no free area in the NV memory 11, the memory management unit 152 allocates one or more pages of the volatile memory 12 to the process requested to be executed. .

また、メモリ管理手段152は、例えば、メモリ管理ユニット(Memory Management Unit、MMU)を含むと考えてもよいし、そうでないと考えてもよい。また、メモリ管理手段152は、例えば、ファイルシステム部14を介して、NVメモリ上の領域の確保や、その解放を行ってもよい。   Further, the memory management unit 152 may be considered to include, for example, a memory management unit (MMU), or may not be considered as such. Further, the memory management unit 152 may secure and release an area on the NV memory via the file system unit 14, for example.

また、ファイルシステム部14、ファイル管理情報格納手段141、変換情報格納手段142、領域情報格納手段143、アドレス変換手段144、書込手段145、読出手段146、領域検出手段147、メモリ管理部15、領域判断手段151、メモリ管理手段152は、通常、MPUやメモリ等から実現され得る。ファイルシステム部14の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現してもよい。   Further, the file system unit 14, the file management information storage unit 141, the conversion information storage unit 142, the area information storage unit 143, the address conversion unit 144, the writing unit 145, the reading unit 146, the region detection unit 147, the memory management unit 15, The area determination unit 151 and the memory management unit 152 can be usually realized by an MPU, a memory, or the like. The processing procedure of the file system unit 14 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).

次に、情報処理装置1の全体動作について、図2のフローチャートを用いて説明する。   Next, the overall operation of the information processing apparatus 1 will be described using the flowchart of FIG.

(ステップS201)ファイルシステム部14は、NVメモリ11、および揮発性メモリ12を、同一の物理アドレス空間に配置する。当該配置は、メモリ管理部15が行ってもよい。   (Step S201) The file system unit 14 arranges the NV memory 11 and the volatile memory 12 in the same physical address space. The arrangement may be performed by the memory management unit 15.

(ステップS202)書込手段145は、受付部13が指示を受け付けたか否かを判断する。受け付けた場合は、ステップS203に進み、そうでない場合は、ステップS215に進む。   (Step S202) The writing unit 145 determines whether the receiving unit 13 has received an instruction. If accepted, the process proceeds to step S203, and if not, the process proceeds to step S215.

(ステップS203)書込手段145は、ステップS202で受け付けた指示がファイル書込指示であるか否かを判断する。ファイル書込指示である場合は、ステップS204に進み、そうでない場合は、ステップS208に進む。   (Step S203) The writing unit 145 determines whether or not the instruction received in step S202 is a file writing instruction. If it is a file write instruction, the process proceeds to step S204, and if not, the process proceeds to step S208.

(ステップS204)書込手段145は、ステップS202で受け付けたファイル書込指示に対応するファイルを書き込むための1以上のブロックを確保する。当該「確保する」とは、当該1以上の各ブロックに対応する1以上の論理アドレスを取得することである。   (Step S204) The writing unit 145 secures one or more blocks for writing a file corresponding to the file write instruction received in step S202. “Securing” means obtaining one or more logical addresses corresponding to the one or more blocks.

(ステップS205)アドレス変換手段144は、変換情報格納手段142に格納されている変換情報を用いて、ステップS204で取得した1以上の論理アドレスを、1以上の物理アドレスに変換する。   (Step S205) The address conversion unit 144 uses the conversion information stored in the conversion information storage unit 142 to convert the one or more logical addresses acquired in Step S204 into one or more physical addresses.

(ステップS206)書込手段145は、ステップS205で取得した1以上の物理アドレスで識別される単位領域にファイルを書き込む。   (Step S206) The writing unit 145 writes the file in the unit area identified by one or more physical addresses acquired in step S205.

(ステップS207)書込手段145は、ステップS206で書き込んだファイルの識別子と、ステップS204で取得した1以上の論理アドレスとを対応付け、ファイル管理情報としてファイル管理情報格納手段141に蓄積する。   (Step S207) The writing unit 145 associates the identifier of the file written in step S206 with one or more logical addresses acquired in step S204, and accumulates them in the file management information storage unit 141 as file management information.

(ステップS208)読出手段146は、ステップS202で受け付けた指示がファイル読出指示であるか否かを判断する。ファイル読出指示である場合は、ステップS209に進み、そうでない場合は、ステップS212に進む。   (Step S208) The reading unit 146 determines whether or not the instruction received in step S202 is a file reading instruction. If it is a file read instruction, the process proceeds to step S209, and if not, the process proceeds to step S212.

(ステップS209)読出手段146は、ステップS202で受け付けたファイル読出指示に対応する1以上の論理アドレスを、ファイル管理情報格納手段141から取得する。   (Step S209) The reading unit 146 acquires one or more logical addresses corresponding to the file reading instruction received in step S202 from the file management information storage unit 141.

(ステップS210)アドレス変換手段144は、ステップS209で取得した1以上の論理アドレスを、1以上の物理アドレスに変換する。   (Step S210) The address conversion unit 144 converts the one or more logical addresses acquired in Step S209 into one or more physical addresses.

(ステップS211)読出手段146は、ステップS210で取得した1以上の物理アドレスで識別される単位領域からファイルを読み出す。   (Step S211) The reading unit 146 reads a file from the unit area identified by one or more physical addresses acquired in Step S210.

(ステップS212)読出手段146は、ステップS202で受け付けた指示がファイル削除指示であるか否かを判断する。ファイル削除指示である場合は、ステップS213に進み、そうでない場合は、ステップS217に進む。   (Step S212) The reading unit 146 determines whether or not the instruction received in step S202 is a file deletion instruction. If it is a file deletion instruction, the process proceeds to step S213, and if not, the process proceeds to step S217.

(ステップS213)読出手段146は、ステップS202で受け付けたファイル削除指示に対応する1以上の論理アドレスを、ファイル管理情報格納手段141から取得する。   (Step S213) The reading unit 146 acquires one or more logical addresses corresponding to the file deletion instruction received in Step S202 from the file management information storage unit 141.

(ステップS214)アドレス変換手段144は、ステップS213で取得した1以上の論理アドレスを、1以上の物理アドレスに変換する。   (Step S214) The address conversion unit 144 converts the one or more logical addresses acquired in Step S213 into one or more physical addresses.

(ステップS215)読出手段146は、ステップS214で取得した1以上の物理アドレスで識別される単位領域からファイルを削除する。   (Step S215) The reading unit 146 deletes the file from the unit area identified by the one or more physical addresses acquired in Step S214.

(ステップS216)読出手段146は、ステップS215で削除したファイルの識別子と、ステップS213で取得した1以上の論理アドレスとを有するファイル管理情報を、ファイル管理情報格納手段141から削除する。   (Step S216) The reading unit 146 deletes the file management information having the identifier of the file deleted in Step S215 and the one or more logical addresses acquired in Step S213 from the file management information storage unit 141.

(ステップS217)メモリ管理部15は、ステップS202で受け付けた指示がプロセス実行指示であるか否かを判断する。プロセス実行指示である場合は、ステップS218に進み、そうでない場合は、ステップS202に戻る。   (Step S217) The memory management unit 15 determines whether or not the instruction received in Step S202 is a process execution instruction. If it is a process execution instruction, the process proceeds to step S218; otherwise, the process returns to step S202.

(ステップS218)領域判断手段151は、NVメモリ11に空き領域が存在するか否かを判断する。存在する場合は、ステップS219に進み、そうでない場合は、ステップS220に進む。   (Step S <b> 218) The area determination unit 151 determines whether there is a free area in the NV memory 11. When it exists, it progresses to step S219, and when that is not right, it progresses to step S220.

(ステップS219)メモリ管理手段152は、ステップS202で受け付けたプロセス実行指示に対応するプロセスを実行するための1以上のページを、NVメモリ11から確保する。当該「確保する」とは、当該NVメモリ11の1以上の各ページに対応する1以上の論理アドレスを取得することである。   (Step S219) The memory management unit 152 secures one or more pages from the NV memory 11 for executing the process corresponding to the process execution instruction received in Step S202. “Securing” means obtaining one or more logical addresses corresponding to one or more pages of the NV memory 11.

(ステップS220)メモリ管理手段152は、ステップS202で受け付けたプロセス実行指示に対応するプロセスを実行するための1以上のページを、揮発性メモリ12から確保する。当該「確保する」とは、当該揮発性メモリ12の1以上の各ページに対応する1以上の論理アドレスを取得することである。   (Step S220) The memory management unit 152 reserves one or more pages from the volatile memory 12 for executing the process corresponding to the process execution instruction received in Step S202. “Securing” means obtaining one or more logical addresses corresponding to one or more pages of the volatile memory 12.

(ステップS221)アドレス変換手段144は、ステップS219またはステップS220で取得した1以上の論理アドレスを、1以上の物理アドレスに変換する。   (Step S221) The address conversion unit 144 converts one or more logical addresses acquired in Step S219 or Step S220 into one or more physical addresses.

(ステップS222)メモリ管理手段152は、ステップS221で取得した1以上の各物理アドレスで識別される1以上の単位領域を、ステップS202で受け付けたプロセス実行指示に対応するプロセスに割当て、当該プロセスを実行する。   (Step S222) The memory management unit 152 assigns one or more unit areas identified by one or more physical addresses acquired in Step S221 to a process corresponding to the process execution instruction received in Step S202, and allocates the process. Run.

(ステップS223)領域検出手段147およびメモリ管理手段152は、空き領域の検出および領域の解放を行う。この処理の詳細は、図3のフローチャートを用いて説明する。   (Step S223) The area detection means 147 and the memory management means 152 detect a free area and release the area. Details of this processing will be described with reference to the flowchart of FIG.

なお、図2のフローチャートにおいて、電源オフや処理終了の割り込みにより処理を終了してもよい。   In the flowchart of FIG. 2, the process may be terminated by powering off or a process termination interrupt.

また、図2のフローチャートにおいて、領域判断手段151は、NVメモリ11に空き領域が存在するか否かを判断しなくてもよい。この場合、図2のステップS217において、ステップS202で受け付けた指示がプロセス実行指示である場合は、ステップS219に進む。   In the flowchart of FIG. 2, the area determination unit 151 does not need to determine whether or not there is a free area in the NV memory 11. In this case, when the instruction received in step S202 is a process execution instruction in step S217 of FIG. 2, the process proceeds to step S219.

図3は、図2のフローチャートのステップS223の空き領域の検出と領域の解放処理を示すフローチャートである。   FIG. 3 is a flowchart showing the free area detection and area release processing in step S223 of the flowchart of FIG.

(ステップS301)領域検出手段147は、NVメモリ11の空き領域の検出のタイミングであるか否かを判断する。検出のタイミングである場合は、ステップS302に進み、そうでない場合は、ステップS304に進む。   (Step S <b> 301) The area detection unit 147 determines whether or not it is the timing for detecting an empty area in the NV memory 11. If it is the timing of detection, the process proceeds to step S302, and if not, the process proceeds to step S304.

(ステップS302)領域検出手段147は、NVメモリ11の空き領域を検出し、当該空き領域を示す領域情報を取得する。   (Step S302) The area detection unit 147 detects an empty area in the NV memory 11, and acquires area information indicating the empty area.

(ステップS303)領域検出手段147は、ステップS302で取得した領域情報を領域情報格納手段143に蓄積する。   (Step S303) The region detection unit 147 accumulates the region information acquired in Step S302 in the region information storage unit 143.

(ステップS304)メモリ管理手段152は、プロセスに割り当てた1以上の単位領域である割当領域の解放のタイミングであるか否かを判断する。解放のタイミングである場合は、ステップS305に進み、そうでない場合は、上位処理にリターンする。   (Step S304) The memory management unit 152 determines whether it is the timing for releasing the allocation area, which is one or more unit areas allocated to the process. If it is the release timing, the process proceeds to step S305, and if not, the process returns to the upper process.

(ステップS305)メモリ管理手段152は、プロセスに割り当てた1以上の単位領域である割当領域を解放する。そして、上位処理にリターンする。   (Step S305) The memory management unit 152 releases an allocation area that is one or more unit areas allocated to a process. Then, the process returns to the upper process.

(具体例)
次に、情報処理装置1の動作の具体例について説明する。なお、本具体例において、NVメモリ11と揮発性メモリ12とは、同一の物理アドレス空間に配置されているものとする。また、NVメモリ11と揮発性メモリ12とは、それぞれ、サイズが4KBである1以上の単位領域を有しているものとする。
(Concrete example)
Next, a specific example of the operation of the information processing apparatus 1 will be described. In this specific example, it is assumed that the NV memory 11 and the volatile memory 12 are arranged in the same physical address space. The NV memory 11 and the volatile memory 12 each have one or more unit areas each having a size of 4 KB.

(例1)
本例において、変換情報格納手段142には、図4に示す変換情報が格納されているものとする。当該変換情報は、レコードを一意に特定するためのIDと、論理アドレスと、物理アドレスとを有する。また、領域情報格納手段143には、図5に示す領域情報が格納されているものとする。当該領域情報は、レコードを一意に特定するためのIDと、論理アドレスと、空き領域であるか否かを示すフラグ(項目名:空き)とを有する。当該フラグは、「0」は空き領域であることを示し、「1」は空き領域でない(使用領域である)ことを示す。また、図4および図5における一の論理アドレス(物理アドレス)は、NVメモリ11の一の単位領域(以下、適宜、ブロック)を識別するものである。
(Example 1)
In this example, it is assumed that the conversion information storage unit 142 stores the conversion information shown in FIG. The conversion information includes an ID for uniquely identifying a record, a logical address, and a physical address. Further, it is assumed that the region information storage unit 143 stores the region information shown in FIG. The area information includes an ID for uniquely identifying a record, a logical address, and a flag (item name: empty) indicating whether the area is an empty area. The flag indicates that “0” is a free area and “1” is not a free area (used area). Further, one logical address (physical address) in FIGS. 4 and 5 identifies one unit area (hereinafter referred to as a block as appropriate) of the NV memory 11.

まず、ユーザが、情報処理装置1を操作し、ファイル名が「v_img」である10KBのファイルを作成するための操作を行ったとする。すると、受付部13は、当該ファイル名を有するファイル書込指示を受け付ける。   First, it is assumed that the user operates the information processing apparatus 1 and performs an operation for creating a 10 KB file whose file name is “v_img”. Then, the accepting unit 13 accepts a file writing instruction having the file name.

次に、書込手段145は、書き込むファイルのサイズが10KBであるので、図5の「ID=011」から「ID=013」の3つの論理アドレスで識別されるブロックを、書き込むファイルの領域として確保する。このとき、書込手段145は、当該3つの論理アドレスと、使用領域であることを示すフラグ「1」とを対応付け、領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積してもよい。   Next, since the size of the file to be written is 10 KB, the writing unit 145 uses the blocks identified by the three logical addresses “ID = 011” to “ID = 013” in FIG. 5 as the area of the file to be written. Secure. At this time, the writing unit 145 associates the three logical addresses with the flag “1” indicating the used area, creates area information, and stores the area information in the area information storage unit 143. May be.

次に、アドレス変換手段144は、図5の「ID=011」から「ID=013」の3つの各論理アドレスに対応する物理アドレスを、図4の変換情報から取得する。そして、アドレス変換手段144は、図4の「ID=011」から「ID=013」の3つの物理アドレスを取得する。   Next, the address conversion unit 144 acquires physical addresses corresponding to the three logical addresses “ID = 011” to “ID = 013” in FIG. 5 from the conversion information in FIG. Then, the address conversion unit 144 acquires three physical addresses “ID = 011” to “ID = 013” in FIG.

次に、書込手段145は、図4の「ID=011」から「ID=013」の3つの各物理アドレスで識別される単位領域に、書込対象のファイルを書き込む。書込手段145は、例えば、書込対象のファイルを4KBずつのデータに分割する(4KB、4KB、2KBの3つのデータに分割する)。そして、書込手段145は、当該3つのデータを、当該3つの単位領域のそれぞれに書き込む。   Next, the writing unit 145 writes the file to be written in the unit area identified by each of the three physical addresses “ID = 011” to “ID = 013” in FIG. For example, the writing unit 145 divides a file to be written into 4 KB data (divided into three data of 4 KB, 4 KB, and 2 KB). Then, the writing unit 145 writes the three data in each of the three unit areas.

次に、書込手段145は、当該ファイルのファイル名「v_img」と、確保した3つの論理アドレス「0xF0000001」、「0xF0000002」、「0xF0000003」とを対応付け、ファイル管理情報としてファイル管理情報格納手段141に蓄積する。当該ファイル管理情報は、例えば、図6である。   Next, the writing unit 145 associates the file name “v_img” of the file with the three secured logical addresses “0xF0000001”, “0xF0000002”, and “0xF00000003”, and stores the file management information as file management information. 141. The file management information is, for example, FIG.

次に、領域検出手段147は、書込手段145がファイルをNVメモリに書き込んだので、空き領域の検出のタイミングであると判断し、NVメモリ11の空き領域を検出する。そして、領域検出手段147は、3つの物理アドレス「0x10000001」、「0x10000002」、「0x10000003」のそれぞれで識別される単位領域が使用領域であることを示す領域情報を取得する。そして、領域検出手段147は、当該取得した領域情報を、領域情報格納手段143に蓄積する。この結果、領域情報格納手段143に格納されている領域情報は、図7となる。図7において、「ID=011」から「ID=013」までの領域情報が、領域検出手段147が取得した領域情報である。   Next, since the writing unit 145 has written the file to the NV memory, the area detecting unit 147 determines that it is the detection timing of the free area, and detects the free area of the NV memory 11. Then, the area detecting unit 147 acquires area information indicating that the unit area identified by each of the three physical addresses “0x10000001”, “0x10000002”, and “0x10000003” is a used area. Then, the area detection unit 147 accumulates the acquired area information in the area information storage unit 143. As a result, the region information stored in the region information storage unit 143 is as shown in FIG. In FIG. 7, the area information from “ID = 011” to “ID = 013” is the area information acquired by the area detecting unit 147.

次に、ユーザが、情報処理装置1を操作し、ファイル名が「v_img」であるファイルを読み出すための操作を行ったとする。すると、受付部13は、当該ファイル名を有するファイル読出指示を受け付ける。   Next, it is assumed that the user operates the information processing apparatus 1 and performs an operation for reading a file whose file name is “v_img”. Then, the accepting unit 13 accepts a file reading instruction having the file name.

次に、読出手段146は、ファイル名「v_img」に対応する論理アドレスを、図6のファイル管理情報から取得する。そして、読出手段146は、図6のファイル管理情報から、「0xF0000001」、「0xF0000002」、「0xF0000003」の3つの論理アドレスを取得する。   Next, the reading unit 146 acquires the logical address corresponding to the file name “v_img” from the file management information of FIG. Then, the reading unit 146 acquires three logical addresses “0xF0000001”, “0xF0000002”, and “0xF00000003” from the file management information of FIG.

次に、アドレス変換手段144は、図6の「ID=001」のレコードが有する3つの各論理アドレスに対応する物理アドレスを、図4の変換情報から取得する。そして、アドレス変換手段144は、図4の「ID=011」から「ID=013」の3つの物理アドレスを取得する。   Next, the address conversion unit 144 acquires physical addresses corresponding to the three logical addresses included in the record of “ID = 001” in FIG. 6 from the conversion information in FIG. Then, the address conversion unit 144 acquires three physical addresses “ID = 011” to “ID = 013” in FIG.

次に、読出手段146は、図4の「ID=011」から「ID=013」の3つの各物理アドレスで識別される単位領域から、ファイルを読み出す。読出手段146は、例えば、当該3つの各単位領域からデータを取得し、当該3つのデータを結合し、ファイルとして取得する。   Next, the reading unit 146 reads the file from the unit area identified by each of the three physical addresses “ID = 011” to “ID = 013” in FIG. For example, the reading unit 146 acquires data from the three unit areas, combines the three data, and acquires the data as a file.

次に、ユーザが、情報処理装置1を操作し、ファイル名が「v_img」であるファイルを削除するための操作を行ったとする。すると、受付部13は、当該ファイル名を有するファイル削除指示を受け付ける。なお、当該ファイルに対応する物理アドレスの取得の方法は、上記と同様であるので、説明を省略する。   Next, it is assumed that the user operates the information processing apparatus 1 and performs an operation for deleting a file whose file name is “v_img”. Then, the reception unit 13 receives a file deletion instruction having the file name. Note that the method for acquiring the physical address corresponding to the file is the same as described above, and thus the description thereof is omitted.

次に、読出手段146は、図4の「ID=011」から「ID=013」の3つの各物理アドレスで識別される単位領域から、データを削除する。このとき、読出手段146は、当該3つの各物理アドレスに対応する3つの論理アドレスと、空き領域であることを示すフラグ「0」とを対応付け、領域情報を作成し、当該領域情報を領域情報格納手段143に蓄積してもよい。   Next, the reading unit 146 deletes data from the unit area identified by each of the three physical addresses “ID = 011” to “ID = 013” in FIG. At this time, the reading unit 146 associates the three logical addresses corresponding to the three physical addresses with the flag “0” indicating the free area, creates area information, and sets the area information as the area. The information may be stored in the information storage unit 143.

次に、領域検出手段147は、読出手段146がファイルをNVメモリから削除したので、空き領域の検出のタイミングであると判断し、NVメモリ11の空き領域を検出する。そして、領域検出手段147は、3つの物理アドレス「0x10000001」、「0x10000002」、「0x10000003」のそれぞれで識別される単位領域が、上記の削除により新たに空き領域となったことを示す領域情報を取得する。そして、領域検出手段147は、当該取得した領域情報を、領域情報格納手段143に蓄積する。この結果、領域情報格納手段143に格納されている領域情報は、図5となる。   Next, since the reading unit 146 deletes the file from the NV memory, the area detection unit 147 determines that it is the detection timing of the free area, and detects the free area of the NV memory 11. Then, the area detecting unit 147 displays area information indicating that the unit area identified by each of the three physical addresses “0x10000001”, “0x10000002”, and “0x10000003” has become a new empty area by the above deletion. get. Then, the area detection unit 147 accumulates the acquired area information in the area information storage unit 143. As a result, the area information stored in the area information storage unit 143 is as shown in FIG.

(例2)
本例において、変換情報格納手段142には、図4に示す変換情報が格納されているものとする。また、領域情報格納手段143には、図5に示す領域情報が格納されているものとする。また、例1について説明した処理や動作などについては、適宜、説明を省略する。
(Example 2)
In this example, it is assumed that the conversion information storage unit 142 stores the conversion information shown in FIG. Further, it is assumed that the region information storage unit 143 stores the region information shown in FIG. In addition, the description of the processing and operation described in Example 1 will be omitted as appropriate.

まず、ユーザが、情報処理装置1を操作し、プログラム名が「pg_sample」であり、実行に10KBの領域を使用するプログラムを実行するための操作を行ったとする。当該プログラムは、例えば、NVメモリに格納されていてもよいし、揮発性メモリ12に格納されていてもよい。また、以下、当該プログラムを、プロセスと呼ぶこととする。すると、受付部13は、当該プログラム名を有するプロセス実行指示を受け付ける。   First, it is assumed that the user operates the information processing apparatus 1 and performs an operation for executing a program whose program name is “pg_sample” and uses a 10 KB area for execution. For example, the program may be stored in the NV memory or may be stored in the volatile memory 12. Hereinafter, the program is referred to as a process. Then, the reception unit 13 receives a process execution instruction having the program name.

次に、領域判断手段151は、NVメモリ11に空き領域があるか否かを判断し、空き領域があると判断する。   Next, the area determination unit 151 determines whether there is an empty area in the NV memory 11 and determines that there is an empty area.

次に、メモリ管理手段152は、実行するプロセスが使用する領域が10KBであるので、図5の「ID=011」から「ID=013」の3つの論理アドレスで識別されるページを、実行するプロセスが使用する領域として確保する。そして、アドレス変換手段144は、当該3つの各論理アドレスに対応する3つの物理アドレスを取得する。   Next, since the area used by the process to be executed is 10 KB, the memory management unit 152 executes the page identified by the three logical addresses “ID = 011” to “ID = 013” in FIG. Reserve as an area used by the process. Then, the address conversion unit 144 acquires three physical addresses corresponding to the three logical addresses.

次に、メモリ管理手段152は、図4の「ID=011」から「ID=013」の3つの各物理アドレスで識別される単位領域を、実行するプロセスに割り当てる。そして、メモリ管理手段152は、プロセスを実行する。   Next, the memory management unit 152 allocates a unit area identified by each of three physical addresses “ID = 011” to “ID = 013” in FIG. 4 to a process to be executed. Then, the memory management unit 152 executes a process.

次に、領域検出手段147は、空き領域の検出のタイミングであると判断し、NVメモリの空き領域を検出し、領域情報を取得する。そして、領域検出手段147は、当該取得した領域情報を、領域情報格納手段143に蓄積する。この結果、領域情報格納手段143に格納されている領域情報は、図7となる。   Next, the area detection unit 147 determines that it is the detection timing of the empty area, detects the empty area of the NV memory, and acquires area information. Then, the area detection unit 147 accumulates the acquired area information in the area information storage unit 143. As a result, the region information stored in the region information storage unit 143 is as shown in FIG.

次に、ユーザが、情報処理装置1を操作し、情報処理装置1の電源をOFFにする操作を行ったとする。すると、受付部13は、電源をOFFにする指示である電源OFF指示を受け付ける。   Next, it is assumed that the user operates the information processing apparatus 1 and performs an operation of turning off the power of the information processing apparatus 1. Then, the reception unit 13 receives a power-off instruction that is an instruction to turn off the power.

次に、メモリ管理手段152は、実行中のプロセスを強制終了する。そして、メモリ管理手段152は、当該プロセスに割り当てていた単位領域であり、図4の「ID=011」から「ID=013」の3つの各物理アドレスで識別される単位領域を解放する。   Next, the memory management unit 152 forcibly terminates the process being executed. Then, the memory management unit 152 releases the unit area that is assigned to the process and is identified by the three physical addresses “ID = 011” to “ID = 013” in FIG.

次に、領域検出手段147は、空き領域の検出のタイミングであると判断し、NVメモリの空き領域を検出し、領域情報を取得する。そして、領域検出手段147は、当該取得した領域情報を、領域情報格納手段143に蓄積する。この結果、領域情報格納手段143に格納されている領域情報は、図5となる。   Next, the area detection unit 147 determines that it is the detection timing of the empty area, detects the empty area of the NV memory, and acquires area information. Then, the area detection unit 147 accumulates the acquired area information in the area information storage unit 143. As a result, the area information stored in the area information storage unit 143 is as shown in FIG.

また、例えば、上記において、領域判断手段151が、NVメモリ11に空き領域があるか否かを判断し、空き領域がないと判断したとする。この場合、メモリ管理手段152は、揮発性メモリ12の3つのページを、実行するプロセスが使用する領域として確保する。そして、メモリ管理手段152は、当該3つの各ページを識別する3つの論理アドレスを取得する。   Further, for example, in the above, it is assumed that the area determination unit 151 determines whether there is a free area in the NV memory 11 and determines that there is no free area. In this case, the memory management unit 152 secures three pages of the volatile memory 12 as an area used by the process to be executed. Then, the memory management unit 152 acquires three logical addresses that identify the three pages.

(例3)
本例において、情報処理装置1の具体的な実現方法について説明する。なお、本例において、NVメモリ11は、単に「NVメモリ」と表記し、揮発性メモリ12は、DRAMであるものとする。また、情報処理装置1は、Linux(登録商標)カーネル(以下、カーネル)であるものとする。
(Example 3)
In this example, a specific method for realizing the information processing apparatus 1 will be described. In this example, the NV memory 11 is simply expressed as “NV memory”, and the volatile memory 12 is a DRAM. The information processing apparatus 1 is assumed to be a Linux (registered trademark) kernel (hereinafter referred to as a kernel).

まず、エミュレータを用いて、NVメモリ11をメインメモリとして持つシステムをエミュレーションする。また、NVメモリ11をメインメモリとして使用する場合、広い物理アドレス空間を持つ64ビット環境である方が望ましい。当該条件を満たすエミュレータは、例えば、QEMU(http://wiki.qemu.org/Main_Page)である。   First, a system having the NV memory 11 as a main memory is emulated using an emulator. Further, when the NV memory 11 is used as the main memory, it is desirable that the 64-bit environment has a wide physical address space. An emulator that satisfies the condition is, for example, QEMU (http://wiki.qemu.org/Main_Page).

次に、NVメモリの内容を保存するファイル「nvmemory.img」を用意する。そして、図8に示すコマンドを実行し、QEMUを起動する。当該コマンドにより、128MB(メガバイト)のDRAMの領域が確保され、また、ファイル「nvmemory.img」のすべてが、NVメモリとして物理アドレス「0x10000000」からの領域にマッピングされた状態で、QEMUが起動される。この結果、DRAMのNVメモリは、図9の様に、物理アドレス空間に配置される。なお、ここで、カーネルは、DRAMに格納されているものとし、DRAM上で展開し、ブート(起動)するものとする。   Next, a file “nvmemory.img” for saving the contents of the NV memory is prepared. Then, the command shown in FIG. 8 is executed to start QEMU. This command secures a 128 MB (megabyte) DRAM area, and starts QEMU with all of the file “nvmemory.img” mapped as an NV memory area from the physical address “0x10000000”. The As a result, the NV memory of the DRAM is arranged in the physical address space as shown in FIG. Here, the kernel is assumed to be stored in the DRAM, expanded on the DRAM, and booted (started).

次に、図10は、カーネルにおける仮想記憶システム、メモリアロケータ、ファイルシステムの関係を示す図である。図10において、仮想記憶システム(Vitrual Memory)は、ファイルシステム部14、およびメモリ管理部15が使用する仮想的なメモリであり、通常、論理アドレス空間である。また、メモリアロケータは、メモリ管理部15、変換情報格納手段142、アドレス変換手段144に相当する。また、ファイルシステム(PRAMFS)は、ファイルシステム部14に相当し、図10の様に、通常、NVメモリ上に構築される。また、当該ファイルシステムのブロックサイズは、メインメモリのページサイズである4KBとする。   Next, FIG. 10 is a diagram showing the relationship between the virtual storage system, the memory allocator, and the file system in the kernel. In FIG. 10, a virtual memory system (Virtual Memory) is a virtual memory used by the file system unit 14 and the memory management unit 15, and is usually a logical address space. The memory allocator corresponds to the memory management unit 15, the conversion information storage unit 142, and the address conversion unit 144. The file system (PRAMFS) corresponds to the file system unit 14 and is normally constructed on the NV memory as shown in FIG. The block size of the file system is 4 KB which is the page size of the main memory.

また、ファイルシステムは、NVメモリの領域管理の基盤として使用する。つまり、ファイルシステムがNVメモリの空き領域を管理し、メモリアロケータによる領域の確保および解放は、ファイルシステムを介して行う。   The file system is used as a base for NV memory area management. That is, the file system manages the free area of the NV memory, and the area is secured and released by the memory allocator through the file system.

また、単純なブロック単位でのファイルシステムからの領域の割り当てでは、性能への影響が大きい。従って、例えば、ファイルシステムからの領域確保は、まとめて行い、余った少数の領域をフリーリストにキャッシュする方法を採用してもよい。この方式では、領域確保と解放は次のように行う。領域確保要求に対し、フリーリスト中に空き領域があればそれを返す。なければ,まとめての領域確保を行った後に、空き領域を返す。解放時には、一定数(例えば、128ブロック)以上のブロックがフリーリストにある場合は、ファイルシステムに解放し、そうでなければフリーリストに追加する。   In addition, the allocation of an area from the file system in a simple block unit has a large effect on performance. Therefore, for example, a method may be adopted in which areas are secured together from the file system and a small number of remaining areas are cached in a free list. In this method, area reservation and release are performed as follows. If there is an empty area in the free list in response to the area allocation request, it is returned. If not, a free area is returned after securing the area as a whole. When releasing, if a certain number of blocks (for example, 128 blocks) or more are in the free list, they are released to the file system, otherwise they are added to the free list.

また、メモリアロケータは、まず、DRAMからではなく、NVメモリから領域の確保を試みる。そして、メモリアロケータは、NVメモリから領域を確保できた場合は、DRAMからの領域の確保は行わない。また、解放時には、NVメモリはDRAMとは別に解放処理を行う必要がある。そのため、メモリアロケータは、NVメモリ領域の確保時に、そのページの属性として「NVmemory」を追加する。そして、解放するページにこの属性が付いている場合は、NVメモリの領域解放を行う関数を呼び出す。   The memory allocator first tries to secure an area from the NV memory, not from the DRAM. The memory allocator does not secure the area from the DRAM when the area can be secured from the NV memory. At the time of release, the NV memory needs to be released separately from the DRAM. Therefore, the memory allocator adds “NVmemory” as the attribute of the page when the NV memory area is secured. If the page to be released has this attribute, a function for releasing the NV memory area is called.

また、システムを正常終了するためには、一般的に、全てのプロセスにシグナルを送り終了処理を行い、ファイルシステムをアンマウントまたはリードオンリーに再マウントした後に、カーネルの終了処理に入る。リードオンリーに再マウントする時に、NVメモリからの領域確保を停止することで、NVメモリから割り当てられ使用中のページはなくなることになる。リードオンリーに再マウント後は、NVメモリからの領域確保は行われないため、この時に、割当てのためにキャッシュされているページも解放する。   In order to normally terminate the system, generally, a signal is sent to all processes to perform termination processing, and after the file system is unmounted or read-mounted again, kernel termination processing is started. When remounting read-only, the allocation of the area from the NV memory is stopped, so that the pages allocated from the NV memory and in use are eliminated. After remounting read-only, the area is not secured from the NV memory, and at this time, the cached pages for allocation are also released.

(例4)
本例において、例3に示した実現方法により実現した情報処理装置1を動作させた結果などについて説明する。
(Example 4)
In this example, a result of operating the information processing apparatus 1 realized by the realizing method shown in Example 3 will be described.

図11は、メインメモリとファイルへの領域割当、および解放を行ったときのスクリーンダンプである。図11において、最初の行は、PRAMFSをルートファイルシステムとしてマウントし、カーネルをブートしていることを示す。また、カーネルをブートすると、まず、busyboxのシェルが起動する。そこで、メインメモリとファイルへの領域割当ておよび解放を行うプログラムを実行している。プログラムの引数に「16」を指定することで、1MBから倍に増やしながら、16MBまでの領域割当てを行う。図11より、メインメモリへの割当て、ファイルの作成を行うたびに、ファイルシステムの使用スペースが、その分だけ増加していくことがわかる。最後に、割り当てた領域の開放、ファイルの消去を行うことで、ファイルシステムの使用スペースは減少している。メインメモリからの解放時には一定量をキャッシュとして残すため、完全に最初の値には戻らない。   FIG. 11 shows a screen dump when the area is allocated to and released from the main memory and the file. In FIG. 11, the first line indicates that PRAMFS is mounted as a root file system and the kernel is booted. When the kernel is booted, first, a busybox shell is started. Therefore, a program for allocating and releasing the area to the main memory and the file is executed. By specifying “16” as an argument of the program, area allocation up to 16 MB is performed while increasing from 1 MB to twice. From FIG. 11, it can be seen that each time the allocation to the main memory and the creation of the file are performed, the use space of the file system increases correspondingly. Finally, the used space of the file system is reduced by releasing the allocated area and erasing the file. When releasing from the main memory, a certain amount is left as a cache, so it does not return completely to the initial value.

また、図12は、LMbench3ベンチマークスイートに含まれるfork+exit、fork+execve、fork+shを実行した結果を示す図である。図12において、各値は、RDTSC命令により取得した実行命令数を「1000」で割った値である。また、図12において、項目名「ベンチマーク」における「DRAM」は、NVメモリを用いない場合の結果である。また、同「NVメモリ(キャッシュ)」は、ファイルシステムからの領域確保はまとめて行い、余った少数の領域をフリーリストにキャッシュする方式を用いた場合の結果である。また、同「NVメモリ(ページ毎)」は、当該方式を用いずに、ファイルシステムからブロック単位での領域確保を行った場合の結果である。また、「fork+exit」はforkシステムコールによりプロセスを作成し終了するものである。また、「fork+execve」は、「fork+exit」に加え、さらにexecveシステムコールにより別プログラムを起動するものである。また、「fork+sh」は、シェルから別プログラムを起動するようにしたものである。   FIG. 12 is a diagram illustrating a result of executing “fork + exit”, “fork + execve”, and “fork + sh” included in the LMbench3 benchmark suite. In FIG. 12, each value is a value obtained by dividing the number of execution instructions acquired by the RDTSC instruction by “1000”. In FIG. 12, “DRAM” in the item name “benchmark” is a result when the NV memory is not used. The “NV memory (cache)” is a result of using a method in which areas are secured together from the file system and a small number of remaining areas are cached in a free list. The “NV memory (for each page)” is a result when an area is secured in a block unit from the file system without using the method. “Fork + exit” creates a process by a fork system call and ends the process. In addition to “fork + exit”, “fork + exec” is a program for starting another program by an execute system call. “Fork + sh” is for starting another program from the shell.

図12より、メインメモリに割り当てるための領域をフリーリストにキャッシュすることで、23〜26%性能向上が実現でき、DRAMの場合と同等の性能を実現することができることがわかる。逆に、ファイルシステムをそのまま空き領域の管理機構として用いるだけでは効率が悪く、OS実行性能への影響があることがわかる。少数の領域をキャッシュすることで、領域割当て時のコストを削減し、ファイルシステムを空き領域の管理機構とするオーバヘッドを隠蔽することができる。   From FIG. 12, it can be seen that by caching the area to be allocated to the main memory in the free list, a performance improvement of 23 to 26% can be realized, and a performance equivalent to that of the DRAM can be realized. On the other hand, it can be seen that simply using the file system as a free space management mechanism is inefficient and affects the OS execution performance. By caching a small number of areas, it is possible to reduce the cost of area allocation and conceal the overhead of using the file system as a free area management mechanism.

また、図13は、ページング機構との性能比較を行った結果を示す図である。当該比較は、ページングを行う場合と、NVメモリから直接メモリを割り当てることができる場合とで、大量のメモリアクセスが発生するときに性能差が生じるかどうかを計測したものである。図13において、横軸は、割当メモリサイズ、縦軸はRDTSC命令により取得した実行命令数を「1000」で割った値である。   FIG. 13 is a diagram showing a result of performance comparison with the paging mechanism. This comparison is a measurement of whether a performance difference occurs when a large amount of memory access occurs between paging and when memory can be directly allocated from the NV memory. In FIG. 13, the horizontal axis represents the allocated memory size, and the vertical axis represents the value obtained by dividing the number of execution instructions acquired by the RDTSC instruction by “1000”.

図13より、「DRAMのみ」(凡例の1番目)と、「NVメモリ(キャッシュ)」(凡例の3番目)とは、ほぼ同等の性能であるが、「DRAMのみ」は、メモリが足りないため、128MB以上の割当てができない。また、「DRAMとスワップファイルの組み合わせ」(凡例の2番目)は、512MBまでの割当てができているが、「NVメモリ(キャッシュ)」よりも約7.4倍のコスト(縦軸)がかかっている。また、「NVメモリ(ページ毎)」(凡例の4番目)は、「NVメモリ(キャッシュ)」よりも約1.8倍のコスト(縦軸)がかかっている。従って、NVメモリをメインメモリとファイルシステムの両方に使用することで、ページングが不要になり、DRAMのみの場合と同等の性能を維持することができることがわかる。   From FIG. 13, “DRAM only” (first in the legend) and “NV memory (cache)” (third in the legend) have almost the same performance, but “DRAM only” has insufficient memory. Therefore, allocation of 128 MB or more cannot be performed. The “DRAM and swap file combination” (second in the legend) can be allocated up to 512 MB, but costs about 7.4 times (vertical axis) more than “NV memory (cache)”. ing. The “NV memory (per page)” (fourth in the legend) costs about 1.8 times (vertical axis) the cost of “NV memory (cache)”. Therefore, it can be seen that by using the NV memory for both the main memory and the file system, paging becomes unnecessary and the performance equivalent to that of the DRAM alone can be maintained.

以上、本実施の形態による情報処理装置1によれば、NVメモリを領域分割することなく、メインメモリ、およびストレージとして使用することができる。これにより、NVメモリを、メインメモリ領域、ストレージ領域と領域分割することなく使用することができ、単一システムで使用できるメモリ領域を増やすことができる。また、これにより、ページングが不要になるため、システムの処理性能を向上させることができる。   As described above, according to the information processing apparatus 1 according to the present embodiment, the NV memory can be used as a main memory and a storage without dividing the area. Thus, the NV memory can be used without dividing the main memory area and the storage area, and the memory area that can be used in a single system can be increased. This also eliminates the need for paging, and can improve system processing performance.

また、本実施の形態による情報処理装置1によれば、プロセスに割り当てられ、その後、解放されたNVメモリ上の空き領域を、ファイルシステムに空き領域として登録することができる。これにより、ファイルシステムの一貫性を保つことができる。   Further, according to the information processing apparatus 1 according to the present embodiment, a free area on the NV memory that is allocated to a process and then released can be registered as a free area in the file system. Thereby, the consistency of the file system can be maintained.

なお、本実施の形態において、ファイル管理情報格納手段141には、ファイルの識別子と、1以上の物理アドレスとを有するファイル管理情報が格納されてもよい。この場合、書込手段145は、通常、書込要求のあったファイルのファイル識別子と、当該ファイルを書き込んだ1以上のブロックを識別する物理アドレスとを対応付け、ファイル管理情報格納手段141に蓄積する。また、読出手段146は、読出要求または削除要求のあったファイルのファイル識別子に対応する1以上の物理アドレスを、ファイル管理情報格納手段141から取得する。   In the present embodiment, the file management information storage unit 141 may store file management information having a file identifier and one or more physical addresses. In this case, the writing unit 145 normally associates the file identifier of the file requested to be written with a physical address that identifies one or more blocks into which the file has been written, and stores it in the file management information storage unit 141. To do. Further, the reading unit 146 acquires from the file management information storage unit 141 one or more physical addresses corresponding to the file identifier of the file that has been requested to be read or deleted.

また、本実施の形態において、情報処理装置1は、領域情報格納手段143を備えていなくてもよい。この場合、領域情報は、ファイル管理情報格納手段141に格納されていてもよいし、ファイル管理情報が有していてもよい。   In the present embodiment, the information processing apparatus 1 does not have to include the area information storage unit 143. In this case, the area information may be stored in the file management information storage unit 141 or may be included in the file management information.

また、本実施の形態において、メモリ管理部15は、例えば、プロセスを識別するプロセス識別子と、当該プロセスに対応する1以上の論理アドレスとを有する1以上のプロセス管理情報が格納されるプロセス管理情報格納手段(図示せず)を備えていてもよい。この場合、メモリ管理手段152は、通常、実行が要求されたプロセスを識別するプロセス識別子と、当該プロセスに割り当てた1以上の各ページを識別する1以上の論理アドレスとを対応付け、プロセス管理情報としてプロセス管理情報格納手段に蓄積する。また、当該論理アドレスは、物理アドレスであってもよい。   In this embodiment, the memory management unit 15 stores, for example, one or more process management information having a process identifier for identifying a process and one or more logical addresses corresponding to the process. Storage means (not shown) may be provided. In this case, the memory management unit 152 normally associates a process identifier that identifies a process requested to be executed with one or more logical addresses that identify one or more pages assigned to the process, and manages process information Is accumulated in the process management information storage means. The logical address may be a physical address.

また、本実施の形態において、情報処理装置1は、2以上のNVメモリ11を備えていてもよい。この場合、当該2以上のNVメモリ11は、通常、一の物理アドレス空間に、連続して配置されることが好適である。   In the present embodiment, the information processing apparatus 1 may include two or more NV memories 11. In this case, it is preferable that the two or more NV memories 11 are normally continuously arranged in one physical address space.

また、本実施の形態において、情報処理装置1は、揮発性メモリ12を備えていなくてもよい。この場合の情報処理装置1のブロック図を、図15に示す。また、この場合、ファイルシステム部14は、通常、NVメモリ11が有する1以上の単位領域のうち、所定の数以下(合計サイズが所定のサイズ以下)の領域を使用する。言い換えると、ファイルシステム部14は、NVメモリ11が有する1以上の単位領域のうち、所定の数以上(合計サイズが所定のサイズ以上)の領域を使用せずに残す。これは、メモリ管理部15が使用する領域を確保するためである。   Further, in the present embodiment, the information processing apparatus 1 may not include the volatile memory 12. A block diagram of the information processing apparatus 1 in this case is shown in FIG. In this case, the file system unit 14 normally uses a predetermined number or less (total size is equal to or less than a predetermined size) of one or more unit areas of the NV memory 11. In other words, the file system unit 14 leaves a predetermined number or more (total size is a predetermined size or more) of one or more unit areas of the NV memory 11 without using them. This is to secure an area used by the memory management unit 15.

また、本実施の形態において、ファイルシステム部14とメモリ管理部15とは、通常、NVメモリ11が有する1以上の単位領域を、ファイルシステム部14が使用する領域と、メモリ管理部15とが使用する領域とに区別することなく使用する。つまり、例えば、一の単位領域について、あるタイミングではファイルシステム部14が当該領域を使用しているが、他のあるタイミングではメモリ管理部15が当該領域を使用していることもある、ということである。これは、言い換えると、一の単位領域について、あるタイミングではメモリ管理部15が当該領域を使用しているが、他のあるタイミングではファイルシステム部14が当該領域を使用していることもある、ということである。   In the present embodiment, the file system unit 14 and the memory management unit 15 are usually configured to use one or more unit areas of the NV memory 11 as an area used by the file system unit 14 and the memory management unit 15. Use without distinguishing from the area to be used. That is, for example, for one unit area, the file system unit 14 uses the area at a certain timing, but the memory management unit 15 may use the area at another timing. It is. In other words, for one unit area, the memory management unit 15 uses the area at a certain timing, but the file system unit 14 may use the area at another timing. That's what it means.

また、本実施の形態において、情報処理装置1は、所定のサイズの1以上の単位領域を有する不揮発性の記録媒体であるNVメモリ11と、前記1以上の単位領域に対してデータを読み書きするファイルシステム部14と、実行中のプロセスからの要求に応じて、前記1以上の単位領域のうち、未使用の領域である1以上の空き領域を当該プロセスに割り当てるメモリ管理部15とを備え、前記1以上の単位領域は、前記ファイルシステム部14が使用する領域と、前記メモリ管理部15が使用する領域とに区別されることなく使用される情報処理装置1であってもよい。   Further, in the present embodiment, the information processing apparatus 1 reads / writes data from / to the NV memory 11 that is a nonvolatile recording medium having one or more unit areas of a predetermined size. A file system unit 14 and a memory management unit 15 that allocates one or more free areas, which are unused areas among the one or more unit areas, to the process in response to a request from an executing process; The one or more unit areas may be the information processing apparatus 1 used without being distinguished into an area used by the file system unit 14 and an area used by the memory management unit 15.

また、本実施の形態において、情報処理装置1は、所定のサイズの1以上の単位領域を有する不揮発性の記録媒体であるNVメモリ11と、前記NVメモリ11をストレージとして使用するファイルシステム部14と、前記NVメモリ11をメインメモリとして使用するメモリ管理部15とを備え、前記ファイルシステム部14は、前記1以上の単位領域をブロックとして使用し、前記メモリ管理部15は、前記1以上の単位領域をページとして使用する情報処理装置1であってもよい。   In the present embodiment, the information processing apparatus 1 includes an NV memory 11 that is a nonvolatile recording medium having one or more unit areas of a predetermined size, and a file system unit 14 that uses the NV memory 11 as a storage. And the memory management unit 15 that uses the NV memory 11 as a main memory, the file system unit 14 uses the one or more unit areas as a block, and the memory management unit 15 includes the one or more unit areas. The information processing apparatus 1 may use the unit area as a page.

また、上記各実施の形態において、各処理または各機能は、単一の装置または単一のシステムによって集中処理されることによって実現されてもよいし、あるいは、複数の装置または複数のシステムによって分散処理されることによって実現されてもよい。   In each of the above embodiments, each process or each function may be realized by centralized processing by a single device or a single system, or distributed by a plurality of devices or a plurality of systems. It may be realized by being processed.

また、上記各実施の形態において、各構成要素は専用のハードウェアにより構成されてもよいし、あるいは、ソフトウェアにより実現可能な構成要素については、プログラムを実行することによって実現されてもよい。例えば、ハードディスクや半導体メモリ等の記録媒体に記録されたソフトウェア・プログラムをCPU等のプログラム実行部が読み出して実行することによって、各構成要素が実現され得る。   In each of the above embodiments, each component may be configured by dedicated hardware, or a component that can be realized by software may be realized by executing a program. For example, each component can be realized by a program execution unit such as a CPU reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory.

また、上記各実施の形態における情報処理装置を実現するソフトウェアは、例えば、以下のようなプログラムである。つまり、このプログラムは、不揮発性の記録媒体であるNVメモリにアクセス可能なコンピュータを、前記NVメモリに対して、所定の単位でデータを読み書きするファイルシステム部と、実行が要求されたプロセスに対し、前記NVメモリの所定の領域を割り当てるメモリ管理部として機能させるためのプログラムである。   Moreover, the software which implement | achieves the information processing apparatus in each said embodiment is the following programs, for example. In other words, this program allows a computer that can access an NV memory, which is a non-volatile recording medium, to a file system unit that reads / writes data in / from the NV memory in a predetermined unit and a process that is requested to be executed. A program for causing a memory management unit to allocate a predetermined area of the NV memory.

なお、上記プログラムにおいて、ハードウェアでしか行われない処理は少なくとも含まれない。   Note that the program does not include at least processing that is performed only by hardware.

また、上記プログラムは、サーバなどからダウンロードされることによって実行されてもよいし、所定の記録媒体(例えば、CD−ROMなどの光ディスクや磁気ディスク、半導体メモリなど)に記録されたプログラムが読み出されることによって実行されてもよい。また、このプログラムは、プログラムプロダクトを構成するプログラムとして用いられてもよい。   The program may be executed by being downloaded from a server or the like, or a program recorded on a predetermined recording medium (for example, an optical disk such as a CD-ROM, a magnetic disk, a semiconductor memory, or the like) is read out. May be executed. Further, this program may be used as a program constituting a program product.

また、上記プログラムを実行するコンピュータは、単数であってもよいし、複数であってもよい。つまり、集中処理を行ってもよいし、あるいは分散処理を行ってもよい。   Moreover, the computer which performs the said program may be single, and plural may be sufficient as it. That is, centralized processing may be performed, or distributed processing may be performed.

また、図16は、前述のプログラムを実行して、前述の実施の形態の情報処理装置等を実現するコンピュータシステム9の概観図である。前述の実施の形態は、コンピュータハードウェア及びその上で実行されるコンピュータプログラムで実現され得る。   FIG. 16 is an overview of the computer system 9 that executes the above-described program to realize the information processing apparatus and the like of the above-described embodiment. The above-described embodiments can be realized by computer hardware and a computer program executed thereon.

図16において、コンピュータシステム9は、CD−ROMドライブ9011、FDドライブ9012を含むコンピュータ901と、キーボード902と、マウス903と、モニタ904とを備える。   In FIG. 16, the computer system 9 includes a computer 901 including a CD-ROM drive 9011 and an FD drive 9012, a keyboard 902, a mouse 903, and a monitor 904.

図17は、コンピュータシステム9のブロック図である。図17において、コンピュータ901は、CD−ROMドライブ9011、FDドライブ9012に加えて、MPU9013と、ブートアッププログラム等のプログラムを記憶するためのROM9014と、MPU9013に接続され、アプリケーションプログラムの命令を一時的に記憶するとともに一時記憶空間を提供するためのRAM9015と、アプリケーションプログラム、システムプログラム、及びデータを記憶するためのハードディスク9016と、CD−ROMドライブ9011、FDドライブ9012、MPU9013等を相互に接続するバス9017とを備える。ここでは図示しないが、コンピュータ901は、さらに、LANへの接続を提供するネットワークカードを備えていてもよい。   FIG. 17 is a block diagram of the computer system 9. In FIG. 17, in addition to the CD-ROM drive 9011 and the FD drive 9012, a computer 901 is connected to an MPU 9013, a ROM 9014 for storing a program such as a bootup program, and an MPU 9013, and temporarily receives instructions of an application program. A bus for mutually connecting a RAM 9015 for storing a temporary storage space, a hard disk 9016 for storing application programs, system programs, and data, a CD-ROM drive 9011, an FD drive 9012, an MPU 9013, etc. 9017. Although not shown here, the computer 901 may further include a network card that provides connection to a LAN.

コンピュータシステム9に、前述の実施の形態の情報処理装置等の機能を実行させるプログラムは、CD−ROM9101、またはFD9102に記憶されて、CD−ROMドライブ9011またはFDドライブ9012に挿入され、さらにハードディスク9016に転送されてもよい。これに代えて、プログラムは、図示しないネットワークを介してコンピュータ901に送信され、ハードディスク9016に記憶されてもよい。プログラムは実行の際にRAM9015にロードされる。プログラムは、CD−ROM9101、FD9102またはネットワークから直接、ロードされてもよい。   A program that causes the computer system 9 to execute the functions of the information processing apparatus and the like of the above-described embodiment is stored in the CD-ROM 9101 or the FD 9102, inserted into the CD-ROM drive 9011 or the FD drive 9012, and further the hard disk 9016. May be forwarded to. Alternatively, the program may be transmitted to the computer 901 via a network (not shown) and stored in the hard disk 9016. The program is loaded into the RAM 9015 when executed. The program may be loaded directly from the CD-ROM 9101, the FD 9102, or the network.

プログラムは、コンピュータ901に、前述の実施の形態の情報処理装置等の機能を実行させるオペレーティングシステム(OS)、またはサードパーティープログラム等は、必ずしも含まなくてもよい。プログラムは、制御された態様で適切な機能(モジュール)を呼び出し、所望の結果が得られるようにする命令の部分のみを含んでいればよい。コンピュータシステム9がどのように動作するかは周知であり、詳細な説明は省略する。   The program does not necessarily include an operating system (OS) or a third-party program that causes the computer 901 to execute the functions of the information processing apparatus according to the above-described embodiment. The program only needs to include an instruction portion that calls an appropriate function (module) in a controlled manner and obtains a desired result. How the computer system 9 operates is well known and will not be described in detail.

本発明は、以上の実施の形態に限定されることなく、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。   The present invention is not limited to the above-described embodiments, and various modifications are possible, and it goes without saying that these are also included in the scope of the present invention.

以上のように、本発明にかかる情報処理装置は、メインメモリとして使用する領域とストレージとして使用する領域とを区別することなく、NVメモリをメインメモリおよびストレージとして使用することができるという効果を有し、オペレーティングシステムの一機能等として有用である。   As described above, the information processing apparatus according to the present invention has an effect that the NV memory can be used as the main memory and the storage without distinguishing between the area used as the main memory and the area used as the storage. It is useful as a function of the operating system.

1 情報処理装置
11 NVメモリ
12 揮発性メモリ
13 受付部
14 ファイルシステム部
15 メモリ管理部
141 ファイル管理情報格納手段
142 変換情報格納手段
143 領域情報格納手段
144 アドレス変換手段
145 書込手段
146 読出手段
147 領域検出手段
151 領域判断手段
152 メモリ管理手段
DESCRIPTION OF SYMBOLS 1 Information processing apparatus 11 NV memory 12 Volatile memory 13 Reception part 14 File system part 15 Memory management part 141 File management information storage means 142 Conversion information storage means 143 Area information storage means 144 Address conversion means 145 Writing means 146 Reading means 147 Area detection means 151 Area determination means 152 Memory management means

Claims (7)

不揮発性の記録媒体であるNVメモリと、
前記NVメモリに対して、所定の単位でデータを読み書きするファイルシステム部と、
実行が要求されたプロセスに対し、前記NVメモリの所定の領域を割り当てるメモリ管理部とを備える情報処理装置。
NV memory which is a nonvolatile recording medium;
A file system unit for reading / writing data from / to the NV memory in a predetermined unit;
An information processing apparatus comprising: a memory management unit that allocates a predetermined area of the NV memory to a process requested to be executed.
前記ファイルシステム部は、
前記1以上のファイルを識別するファイル識別子と、当該ファイルに対応する1以上の論理アドレスとを有するファイル管理情報が格納されるファイル管理情報格納手段と、
論理アドレスを物理アドレスに変換するための変換情報が格納される変換情報格納手段と、
前記1以上の各ファイルに対応する1以上の各論理アドレスを、前記変換情報を用いて1以上の物理アドレスに変換するアドレス変換手段と、
前記アドレス変換手段が取得した物理アドレスに対応するNVメモリの領域にファイルを書き込む書込手段と、
前記アドレス変換手段が取得した物理アドレスに対応するNVメモリの領域からファイルを読み出す読出手段とを備える請求項1記載の情報処理装置。
The file system unit is
File management information storage means for storing file management information having a file identifier for identifying the one or more files and one or more logical addresses corresponding to the files;
Conversion information storage means for storing conversion information for converting a logical address into a physical address;
Address conversion means for converting one or more logical addresses corresponding to the one or more files into one or more physical addresses using the conversion information;
Writing means for writing a file into an NV memory area corresponding to the physical address obtained by the address conversion means;
The information processing apparatus according to claim 1, further comprising: a reading unit that reads a file from an NV memory area corresponding to the physical address acquired by the address converting unit.
前記ファイルシステム部は、
前記NVメモリを、所定のサイズごと領域であるブロックとして管理し、
前記メモリ管理部は、
前記NVメモリを、所定のサイズごと領域であるページとして管理し、
前記ブロックのサイズと、前記ページのサイズとが同一である請求項2記載の情報処理装置。
The file system unit is
Managing the NV memory as a block which is an area for each predetermined size;
The memory management unit
The NV memory is managed as a page that is an area for each predetermined size,
The information processing apparatus according to claim 2, wherein a size of the block and a size of the page are the same.
前記メモリ管理部は、
所定のタイミングで、前記プロセスに割り当てたNVメモリの領域を解放し、
前記ファイルシステム部は、
前記NVメモリの空き領域または使用領域を示す1以上の領域情報が格納される領域情報格納手段と、
前記メモリ管理部が解放した領域を空き領域として検出し、当該空き領域を示す領域情報を領域情報格納手段に蓄積する領域検出手段とをさらに備え、
前記ファイルシステム部は、
前記領域情報が示す空き領域にデータを書込み、
前記メモリ管理部は、
前記領域情報が示す空き領域を実行が要求されたプロセスに対して割り当てる請求項1から請求項3いずれか一項に記載の情報処理装置。
The memory management unit
At a predetermined timing, the NV memory area allocated to the process is released,
The file system unit is
Area information storage means for storing one or more area information indicating a free area or a used area of the NV memory;
An area detection unit that detects an area released by the memory management unit as an empty area, and stores area information indicating the empty area in an area information storage unit;
The file system unit is
Write data to the free area indicated by the area information,
The memory management unit
The information processing apparatus according to any one of claims 1 to 3, wherein a free area indicated by the area information is allocated to a process requested to be executed.
揮発性の記録媒体である揮発性メモリをさらに具備し、
前記メモリ管理部は、
前記NVメモリの空き領域の有無を判断する領域判断手段と、
前記領域判断手段が、前記NVメモリに空き領域がないと判断した場合に、実行が要求されたプロセスに対し、前記揮発性メモリ上の所定の領域を割り当てるメモリ管理手段とを具備する請求項1から請求項4いずれか一項に記載の情報処理装置。
A volatile memory that is a volatile recording medium;
The memory management unit
Area determination means for determining whether or not there is a free area in the NV memory;
The memory management means for allocating a predetermined area on the volatile memory to a process requested to be executed when the area determination means determines that there is no free area in the NV memory. The information processing apparatus according to claim 4.
不揮発性の記録媒体であるNVメモリと、
ファイルシステム部と、メモリ管理部とを用いて行われる情報処理方法であって、
前記ファイルシステム部が、
前記NVメモリに対して、所定の単位でデータを読み書きするファイルシステムステップと、
前記メモリ管理部が、
実行が要求されたプロセスに対し、前記NVメモリの所定の領域を割り当てるメモリ管理ステップとを備える情報処理方法。
NV memory which is a nonvolatile recording medium;
An information processing method performed using a file system unit and a memory management unit,
The file system unit is
A file system step for reading and writing data to and from the NV memory in a predetermined unit;
The memory management unit
A memory management step of allocating a predetermined area of the NV memory to a process requested to be executed.
不揮発性の記録媒体であるNVメモリにアクセス可能なコンピュータを、
前記NVメモリに対して、所定の単位でデータを読み書きするファイルシステム部と、
実行が要求されたプロセスに対し、前記NVメモリの所定の領域を割り当てるメモリ管理部として機能させるためのプログラム。
A computer that can access an NV memory that is a non-volatile recording medium,
A file system unit for reading / writing data from / to the NV memory in a predetermined unit;
A program for causing a process requested to be executed to function as a memory management unit that allocates a predetermined area of the NV memory.
JP2012208275A 2012-09-21 2012-09-21 Information processing apparatus, information processing method, and program Expired - Fee Related JP6219560B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012208275A JP6219560B2 (en) 2012-09-21 2012-09-21 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012208275A JP6219560B2 (en) 2012-09-21 2012-09-21 Information processing apparatus, information processing method, and program

Publications (3)

Publication Number Publication Date
JP2014063358A true JP2014063358A (en) 2014-04-10
JP2014063358A5 JP2014063358A5 (en) 2014-12-18
JP6219560B2 JP6219560B2 (en) 2017-10-25

Family

ID=50618532

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012208275A Expired - Fee Related JP6219560B2 (en) 2012-09-21 2012-09-21 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP6219560B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182449A (en) * 2013-03-18 2014-09-29 Toshiba Corp Memory controller
WO2014171223A1 (en) * 2013-04-15 2014-10-23 株式会社フィックスターズ Information processing device, information processing method, and program
JP2016524770A (en) * 2014-06-27 2016-08-18 華為技術有限公司Huawei Technologies Co.,Ltd. Method for writing data to flash memory device, flash memory device and storage system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131266A (en) * 1992-09-25 1994-05-13 Internatl Business Mach Corp <Ibm> Method and apparatus for controlling direct execution of program in external memory device, wherein random access is possible and reloadable memory is used
JPH07114499A (en) * 1993-10-19 1995-05-02 Hitachi Ltd Flash memory virtual memory system
JPH11143764A (en) * 1997-11-04 1999-05-28 Victor Co Of Japan Ltd Flash type memory, its management device, storage device and computer system
JP2004362464A (en) * 2003-06-06 2004-12-24 Sony Corp Computer system using nonvolatile memory
JP2004362426A (en) * 2003-06-06 2004-12-24 Sony Corp Information processing system, its control method, and computer program
JP2010250512A (en) * 2009-04-14 2010-11-04 Canon Inc Information processing device, control method therefor and computer program
WO2011142095A1 (en) * 2010-05-13 2011-11-17 パナソニック株式会社 Information processing device and information processing method
JP2012173870A (en) * 2011-02-18 2012-09-10 Toshiba Corp Semiconductor device and memory protection method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06131266A (en) * 1992-09-25 1994-05-13 Internatl Business Mach Corp <Ibm> Method and apparatus for controlling direct execution of program in external memory device, wherein random access is possible and reloadable memory is used
JPH07114499A (en) * 1993-10-19 1995-05-02 Hitachi Ltd Flash memory virtual memory system
JPH11143764A (en) * 1997-11-04 1999-05-28 Victor Co Of Japan Ltd Flash type memory, its management device, storage device and computer system
JP2004362464A (en) * 2003-06-06 2004-12-24 Sony Corp Computer system using nonvolatile memory
JP2004362426A (en) * 2003-06-06 2004-12-24 Sony Corp Information processing system, its control method, and computer program
JP2010250512A (en) * 2009-04-14 2010-11-04 Canon Inc Information processing device, control method therefor and computer program
WO2011142095A1 (en) * 2010-05-13 2011-11-17 パナソニック株式会社 Information processing device and information processing method
JP2012173870A (en) * 2011-02-18 2012-09-10 Toshiba Corp Semiconductor device and memory protection method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014182449A (en) * 2013-03-18 2014-09-29 Toshiba Corp Memory controller
WO2014171223A1 (en) * 2013-04-15 2014-10-23 株式会社フィックスターズ Information processing device, information processing method, and program
JP2016524770A (en) * 2014-06-27 2016-08-18 華為技術有限公司Huawei Technologies Co.,Ltd. Method for writing data to flash memory device, flash memory device and storage system
US10203899B2 (en) 2014-06-27 2019-02-12 Huawei Technologies Co., Ltd. Method for writing data into flash memory apparatus, flash memory apparatus, and storage system

Also Published As

Publication number Publication date
JP6219560B2 (en) 2017-10-25

Similar Documents

Publication Publication Date Title
CN108021510B (en) Method of operating a storage device that manages multiple namespaces
US8261267B2 (en) Virtual machine monitor having mapping data generator for mapping virtual page of the virtual memory to a physical memory
US9547600B2 (en) Method and system for restoring consumed memory after memory consolidation
US9940228B2 (en) Proactive memory reclamation for java virtual machines
US8095772B2 (en) Large memory pages for shared libraries
US9852054B2 (en) Elastic caching for Java virtual machines
WO2014171223A1 (en) Information processing device, information processing method, and program
US9946477B2 (en) Information processing apparatus, information processing method, and computer program product
JP4886866B2 (en) Method for speeding up access to main storage device and storage device system
US9081692B2 (en) Information processing apparatus and method thereof
KR101636892B1 (en) Avoidance of self eviction caused by dynamic memory allocation in a flash memory storage device
JPWO2006107095A1 (en) Computer system, memory management method, and program thereof
US10379751B2 (en) Memory swapper for virtualized environments
US8892810B2 (en) Semiconductor device and memory protection method
KR20140147017A (en) System and method for recovering from an unexpected shutdown in a write-back caching environment
JP6219560B2 (en) Information processing apparatus, information processing method, and program
US10025726B2 (en) Method in a memory management unit for managing address translations in two stages
US20100095081A1 (en) Early detection of an access to de-allocated memory
JP5619198B2 (en) Information processing apparatus, information processing method, and program
JPWO2014091629A1 (en) Storage device management program, electronic device, and storage device management method
US20220398199A1 (en) User-space remote memory paging
KR20080067144A (en) Apparatus and methods of managing the stacks for efficiently using the memories
KR20100018017A (en) Computer system based on non-volatile memory
JP2009217589A (en) Unit and program for assigning memory area for execution, and recording medium
KR20090120298A (en) Computer system based on non-volatile memory

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20140512

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20140718

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141030

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141030

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150714

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150914

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20160329

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170928

R150 Certificate of patent or registration of utility model

Ref document number: 6219560

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R370 Written measure of declining of transfer procedure

Free format text: JAPANESE INTERMEDIATE CODE: R370