JP2013050880A - Memory control device and method therefor, data management device and method therefor, and program - Google Patents
Memory control device and method therefor, data management device and method therefor, and program Download PDFInfo
- Publication number
- JP2013050880A JP2013050880A JP2011189077A JP2011189077A JP2013050880A JP 2013050880 A JP2013050880 A JP 2013050880A JP 2011189077 A JP2011189077 A JP 2011189077A JP 2011189077 A JP2011189077 A JP 2011189077A JP 2013050880 A JP2013050880 A JP 2013050880A
- Authority
- JP
- Japan
- Prior art keywords
- write
- data
- size
- control unit
- write data
- 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.)
- Withdrawn
Links
Images
Landscapes
- Memory System (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
Description
本技術は、メモリ制御装置およびその方法、データ管理装置およびその方法、並びに、プログラムに関し、特に、ライトバック処理の発生頻度を抑制することができるようにするメモリ制御装置およびその方法、データ管理装置およびその方法、並びに、プログラムに関する。 The present technology relates to a memory control device and method, a data management device and method, and a program, and in particular, a memory control device and method and a data management device that can suppress the occurrence frequency of write-back processing. And a method thereof, and a program.
フラッシュメモリなどの不揮発性メモリは、パーソナルコンピュータ、デジタルスチルカメラ、オーディオレコーダ等の多くの電子機器で記憶媒体として利用されている。 Nonvolatile memories such as flash memories are used as storage media in many electronic devices such as personal computers, digital still cameras, and audio recorders.
不揮発性メモリでは、データの書き換え回数が有限であるため、ライトバック処理の発生頻度を抑えることが重要であり、そのための手法が本出願人により提案されている(例えば、特許文献1参照)。ここで、ライトバック処理とは、簡単に言うと、書き込み先の論理ブロックに対応するキャッシュ領域の物理ブロック(キャッシュブロック)に空きがない場合に、キャッシュブロック内の残すべきデータを他のブロックにコピーし、コピー後にキャッシュブロックのデータを消去する処理である。ライトバック処理ではデータの書き換えが必要となるため、できるだけライトバック処理の発生頻度を抑制させる必要がある。 In a nonvolatile memory, since the number of data rewrites is finite, it is important to suppress the frequency of occurrence of write-back processing, and a technique for this has been proposed by the present applicant (see, for example, Patent Document 1). Here, in simple terms, the write back processing means that when there is no free space in the physical block (cache block) of the cache area corresponding to the logical block of the write destination, the remaining data in the cache block is transferred to another block. This is a process of copying and erasing cache block data after copying. Since write-back processing requires data rewriting, it is necessary to suppress the frequency of write-back processing as much as possible.
しかしながら、特許文献1の手法では、上位層から、書き込み先の論理アドレスが指定され、デバイス側は上位層から指定された論理アドレスに書き込んでいた。このとき、上位層は、デバイス側の書き込み状態に関係なく、書き込み先の論理アドレスを指定するので、ライトバック処理の発生頻度を抑制する点においては不効率となる場合があった。
However, in the method of
本技術は、このような状況に鑑みてなされたものであり、ライトバック処理の発生頻度を抑制することができるようにするものである。 The present technology has been made in view of such a situation, and is capable of suppressing the occurrence frequency of write-back processing.
本技術の第1の側面のメモリ制御装置は、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得する取得部と、取得された前記書き込みデータのサイズの空き領域を検索する検索部と、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部とを備える。 The memory control device according to the first aspect of the present technology includes an acquisition unit that acquires the size of the write data from an upper layer having the write data to be written to the nonvolatile memory, and an empty area of the acquired size of the write data. A search unit for searching; and a notification unit for notifying the upper layer of a logical address of a write destination of the write data based on a search result.
本技術の第1の側面のメモリ制御方法は、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、取得された前記書き込みデータのサイズの空き領域を検索し、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知するステップを含む。 The memory control method according to the first aspect of the present technology obtains the size of the write data from an upper layer having the write data to be written to the nonvolatile memory, searches for a free area of the obtained size of the write data, Based on the search result, a step of notifying the upper layer of the logical address of the write destination of the write data.
本技術の第1の側面のプログラムは、コンピュータに、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、取得された前記書き込みデータのサイズの空き領域を検索し、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する処理を実行させるためのものである。 The program according to the first aspect of the present technology acquires a size of the write data from an upper layer having write data to be written to a nonvolatile memory in a computer, and searches for an empty area of the acquired size of the write data. Based on the search result, a process for notifying the upper layer of the logical address of the write destination of the write data is executed.
本技術の第1の側面においては、不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズが取得され、取得された前記書き込みデータのサイズの空き領域が検索され、検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスが前記上位層に通知される。 In the first aspect of the present technology, the size of the write data is acquired from the upper layer having the write data to be written to the nonvolatile memory, and an empty area of the acquired size of the write data is searched, and the search result is Based on this, the logical address of the write destination of the write data is notified to the upper layer.
本技術の第2の側面のデータ管理装置は、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知する通知部と、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部とを備え、前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する。 A data management device according to a second aspect of the present technology responds to a notification of a size of write data to be written to the nonvolatile memory and a notification of the size of the write data to a memory control device that controls the nonvolatile memory. And an acquisition unit that acquires a logical address of a write destination of the write data supplied from the memory control device, and the notification unit uses the acquired logical address as a write destination of the write data. A write command is notified to the memory control device.
本技術の第2の側面のデータ管理方法は、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知するステップを含む。 In the data management method according to the second aspect of the present technology, the memory control device that controls the nonvolatile memory is notified of the size of the write data to be written to the nonvolatile memory, and in response to the notification of the size of the write data, Obtaining a logical address of a write destination of the write data supplied from the memory control device, and notifying the memory control device of a write command for the write data by using the acquired logical address as a write destination. .
本技術の第2の側面のプログラムは、コンピュータに、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する処理を実行させるためのものである。 A program according to a second aspect of the present technology notifies a computer of a size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory, and responds to the notification of the size of the write data. A process of acquiring a logical address of a write destination of the write data supplied from the memory control device, and notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination. It is for execution.
本技術の第2の側面においては、不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズが通知され、前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスが取得され、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令が前記メモリ制御装置に通知される。 In the second aspect of the present technology, the memory control device that controls the nonvolatile memory is notified of the size of the write data to be written to the nonvolatile memory, and the memory control is performed in response to the notification of the size of the write data. A logical address of a write destination of the write data supplied from the device is acquired, and a write command for the write data is notified to the memory control device by using the acquired logical address as a write destination.
なお、プログラムは、伝送媒体を介して伝送することにより、又は、記録媒体に記録して、提供することができる。 The program can be provided by being transmitted through a transmission medium or by being recorded on a recording medium.
メモリ制御装置およびデータ管理装置は、独立した装置であっても良いし、1つの装置を構成している内部ブロックであっても良い。 The memory control device and the data management device may be independent devices, or may be internal blocks constituting one device.
本技術の第1及び第2の側面によれば、ライトバック処理の発生頻度を抑制することができる。 According to the first and second aspects of the present technology, the occurrence frequency of the write-back process can be suppressed.
以下、本技術を実施するための形態(以下、実施の形態という)について説明する。なお、説明は以下の順序で行う。
1. 電子機器の構成例
2. 書き込みデータ制御に関する機能ブロック図
3. 不揮発性メモリの動作の前提条件
4. 起動シーケンス
5. 従来手法による書き込み制御の説明
6. 書き込みデータサイズがブロックサイズ未満である場合の書き込み制御の説明
7. 書き込みデータサイズがブロックサイズである場合の書き込み制御の説明
8. 書き込み回数が複数回の例
9. データの消去命令
10. ファイルシステム制御部とメモリ制御部の詳細機能ブロック図
Hereinafter, modes for carrying out the present technology (hereinafter referred to as embodiments) will be described. The description will be given in the following order.
1. 1. Configuration example of electronic device Functional block diagram related to write data control FIG. 3. Precondition of operation of nonvolatile memory 4. Startup sequence 5. Description of conventional write control 6. Description of write control when write data size is less than block size 7. Description of write control when write data size is block size Example of writing
[電子機器の構成例]
図1は、本技術が適用された電子機器の一実施の形態の構成例を示すブロック図である。
[Configuration example of electronic equipment]
FIG. 1 is a block diagram illustrating a configuration example of an embodiment of an electronic device to which the present technology is applied.
図1に示される電子機器1は、例えば、パーソナルコンピュータ、デジタルスチルカメラ、デジタルビデオカメラ、オーディオレコーダ等の、画像データや音声データなどの所定のデータを記録する機器である。
An
電子機器1は、例えば、MPU11、ROM12、RAM13、不揮発性メモリ14、入出力インタフェース15、操作入力デバイス16、表示デバイス17、及び、通信インタフェース18を備える。また、電子機器1は、データの伝送路としてのバス19で各構成要素間を接続する。
The
MPU11は、MPU(Micro Processing Unit)や、制御機能を実現するための複数の回路が集積された集積回路などで構成され、電子機器1全体を制御する制御部として機能する。
The
MPU11は、電子機器1の電源投入とともに、オペレーティングシステム(OS)を起動実行し、FAT(File Allocation Tables)やUDF(Universal Disk Format)などのファイルシステムによって、不揮発性メモリ13に記録されている画像や音声のデータをファイルとして管理する。
The
ROM(Read Only Memory)12は、起動プログラムや演算パラメータなどの制御用データを記憶する。RAM(Random Access Memory)13は、例えば、MPU11により実行されるアプリケーションプログラムなどを一時記憶する。
A ROM (Read Only Memory) 12 stores control data such as a startup program and calculation parameters. A RAM (Random Access Memory) 13 temporarily stores, for example, an application program executed by the
不揮発性メモリ14は、NAND型のフラッシュメモリであり、画像データや音声データなど、様々なデータを記憶する記録媒体である。不揮発性メモリ14はまた、MPU11により実行される、オペレーティングシステム、デバイスドライバ、およびアプリケーションプログラムも記憶する。
The
入出力インタフェース15は、操作入力デバイス16および表示デバイス17を接続する。入出力インタフェース15としては、例えば、USB(Universal Serial Bus)端子や、DVI(Digital Visual Interface)端子、HDMI(High-Definition Multimedia Interface)端子、各種処理回路などが挙げられるが、上記に限られない。
The input /
操作入力デバイス16は、操作部として機能し、また、表示デバイス17は、表示部として機能する。操作入力デバイス16としては、例えば、ボタン、方向キー、ジョグダイヤルなどの回転型セレクター、あるいは、これらの組み合わせなどが挙げられるが、上記に限られない。また、表示デバイス17としては、例えば、液晶ディスプレイ(Liquid Crystal Display;LCD)や有機ELディスプレイ(organic ElectroLuminescence display。または、OLEDディスプレイ(Organic Light Emitting Diode display)ともよばれる。)などが挙げられるが、上記に限られない。
The
なお、入出力インタフェース15は、電子機器1の外部装置としての操作入力デバイス(例えば、キーボードやマウスなど)や、表示デバイス(例えば、外部ディスプレイなど)と接続することもできる。また、表示デバイス17は、例えばタッチスクリーンなど、表示とユーザ操作とが可能なデバイスであってもよい。
The input /
通信インタフェース18は、ネットワークを介して(あるいは、直接的に)、サーバなどの外部装置と無線または有線で通信を行うための通信部として機能する。ここで、通信インタフェース18としては、例えば、通信アンテナおよびRF回路(無線通信)や、IEEE802.15.1ポートおよび送受信回路(無線通信)、IEEE802.11bポートおよび送受信回路(無線通信)、あるいはLAN端子および送受信回路(有線通信)などが挙げられる。
The
ここで、本実施の形態に係るネットワークとしては、例えば、LAN(Local Area Network)やWAN(Wide Area Network)などの有線ネットワーク、基地局を介した無線WAN(WWAN;Wireless Wide Area Network)や無線MAN(WMAN;Wireless Metropolitan Area Network)などの無線ネットワーク、あるいは、TCP/IP(Transmission Control Protocol/Internet Protocol)などの通信プロトコルを用いたインターネットなどが挙げられる。 Here, as the network according to the present embodiment, for example, a wired network such as a LAN (Local Area Network) or a WAN (Wide Area Network), a wireless WAN (WWAN; Wireless Wide Area Network) via a base station, or a wireless Examples include a wireless network such as MAN (WMAN; Wireless Metropolitan Area Network) or the Internet using a communication protocol such as TCP / IP (Transmission Control Protocol / Internet Protocol).
電子機器1は、以上のように構成される。なお、本実施の形態に係る電子機器1のハードウェア構成は、図1に示す構成に限られない。
The
[書き込みデータ制御に関する機能ブロック図]
上述した電子機器1において、例えば、撮影された画像データや、受信した放送信号に基づく画像データが、不揮発性メモリ14に記録される場合、MPU11は、それらの画像データをファイルとして、不揮発性メモリ14に記録させる。
[Functional block diagram related to write data control]
In the
図2は、不揮発性メモリ14にデータを書き込む場合の制御に関する機能ブロック図を示している。
FIG. 2 is a functional block diagram relating to control when data is written to the
不揮発性メモリ14へのデータの書き込みは、MPU11により実行されるオペレーティングシステム42により制御・管理される。オペレーティングシステム42は、いわゆる基本プログラムであり、例えば、電子機器1のハードウェアなどのリソースの取り扱いを制御する。オペレーティングシステム42には、ファイルシステム制御部61とメモリ制御部62が少なくとも含まれる。
Writing data to the
オペレーティングシステム42上で実行されるアプリケーションプログラム41は、各種の処理を実行して、ファイルの書き込みおよび読み出しをオペレーティングシステム42に要求する。アプリケーションプログラム41は、オペレーティングシステム42のファイルシステム制御部61に対して、ファイル単位(レベル)でのアクセス(読み出しまたは書き込み)を要求(指示)する。
The
ファイルシステム制御部61は、例えば、FATファイルシステムであり、不揮発性メモリ14に記録されているデータの書き込みおよび読み出しをTU(Translation Unit)単位で管理する。ここで、TU単位とは、不揮発性メモリ14のデータの書き込みおよび読み出し単位をページ、消去単位をブロックとすると、ページサイズ以上、ブロックサイズ未満で構成されるサイズである。従って、ファイルシステム制御部61は、データの書き込みおよび読み出しについては、TU単位でランダムにメモリ制御部62に指示し、データの消去については、ブロック単位でランダムにメモリ制御部62に指示することができる。
The file
ファイルシステム制御部61は、アプリケーションプログラム41から一つのファイルのデータの書き込みが要求された場合、メモリ制御部62に対して一度の書き込み命令で行うのではなく、複数回の書き込み命令をTU単位で行う。なお、ファイルシステム制御部61は、メモリ制御部62に、複数TUを指定して、まとめて書き込むことは可能である。
When the file
メモリ制御部62は、例えば、デバイスドライバで構成され、不揮発性メモリ14の動作に必要な情報を上位層であるファイルシステム制御部61に供給し、ファイルシステム制御部61の制御に基づいて、不揮発性メモリ14に対するデータの書き込みまたは読み出しなど、不揮発性メモリ14の動作を制御する。
The
メモリ制御部62は、ファイルシステム制御部61からのTU単位(レベル)でのアクセス(読み出しまたは書き込み)の要求(指示)に対して、ページ単位で不揮発性メモリ14にアクセスする。また、メモリ制御部62は、データを消去する場合には、上述したように、ブロック単位で消去する。
In response to a request (instruction) for access (reading or writing) in units of TUs (levels) from the file
不揮発性メモリ14は、主記憶領域81とキャッシュ領域82とで構成される。主記憶領域81は、データが最終的に記憶されるデータ領域であり、主記憶領域81のサイズ(記憶容量)が、ユーザ側(ファイルシステム制御部61側)で認識される不揮発性メモリ14のメモリサイズとなる。キャッシュ領域82は、データを一時的に保存する領域である。
The
[不揮発性メモリの動作の前提条件]
図3を参照して、不揮発性メモリ14を制御するための前提となる不揮発性メモリ14の制御構造について説明する。
[Prerequisites for nonvolatile memory operation]
With reference to FIG. 3, a control structure of the
不揮発性メモリ14の記憶領域(物理領域)は、複数の物理ブロックで構成される。主記憶領域81は、複数の物理ブロックで構成され、主記憶領域81を構成する各物理ブロックをユーザブロックと呼ぶ。
The storage area (physical area) of the
一方、キャッシュ領域82は、複数の物理ブロックで構成され、キャッシュ領域82を構成する各物理ブロックをキャッシュブロックと呼ぶ。ユーザブロックとキャッシュブロックは、同一のブロックサイズである。
On the other hand, the
また、ファイルシステム制御部61は、LBA(Logical Block Address)空間でデータの書き込み等を、メモリ制御部62に指示するため、主記憶領域81を構成する各ユーザブロックと1対1に、論理ブロックが割り当てられている。
Further, the file
論理ブロックは、複数の論理TU(以下、LTUという。)で構成され、論理TUに対応する物理領域の単位が、上述したTUである。従って、主記憶領域81の各ユーザブロックは、複数のTUで構成される。ファイルシステム制御部61は、不揮発性メモリ14に対するデータの書き込みおよび読み出しの制御をLTU単位で行い、データの消去の制御を、論理ブロック単位で行う。なお、本実施の形態では、図3に示されるように、1つの論理ブロックは、4つのLTUで構成されている。
The logical block is composed of a plurality of logical TUs (hereinafter referred to as LTU), and the unit of the physical area corresponding to the logical TU is the TU described above. Accordingly, each user block in the
また、メモリ制御部62では、1つの論理ブロックに対して割り当て可能なキャッシュブロックの個数、および、キャッシュブロックを割り当てられる論理ブロックの個数が制限条件として決められている。メモリ制御部62は、その制限条件の下、データが記憶されていない(消去済み)物理ブロックである消去済みブロックを、所定の論理ブロックに対応するキャッシュブロックとして割り当てることができる。本実施の形態では、1つの論理ブロックに対して割り当て可能なキャッシュブロックの個数と、キャッシュブロックを割り当てられる論理ブロックの個数は、いずれも3個であるとする。従って、本実施の形態の不揮発性メモリ14は、物理的な記憶領域として、少なくとも12個の物理ブロックを有していることになる。
In the
ユーザブロックおよびキャッシュブロックは、そこに記録されていたデータが消去され、消去済みブロックとされると、その後、再び、ユーザブロックまたはキャッシュブロックとして利用することができる。 The user block and the cache block can be used again as a user block or a cache block when the data recorded in the user block and the cache block are erased to be an erased block.
メモリ制御部62は、LBA(Logical Block Address)空間で表される論理領域と、不揮発性メモリ14の物理領域との対応関係を管理し、ファイルシステム制御部61からの論理アドレスに対応する不揮発性メモリ14の物理領域にアクセスする。
The
図3で示される不揮発性メモリ14の主記憶領域81は、3個の論理ブロック0乃至3に対応するユーザブロック0乃至3で構成されている。そして、論理ブロック1に対して、3個のキャッシュブロック1−1乃至1−3が割り当てられ、それ以外の論理ブロック0および2には、キャッシュブロックが割り当てられていない状態を示している。
The
図3において、物理ブロックを構成する各TUに付された符号は、物理領域の各TUの絶対番地(絶対アドレス)を表すものとする。図3においては、理解を容易にするため、ユーザブロック0乃至2と、キャッシュブロック1−1乃至1−3に対して、絶対番地の小さい方から順に割り当てた例を示しているが、どの物理ブロックがユーザブロックまたはキャッシュブロックとして割り当てられるかはメモリ制御部62の制御によって異なる。即ち、物理ブロックは、メモリ制御部62の制御によって、ユーザブロックともなり得るし、キャッシュブロックともなり得る。
In FIG. 3, the reference numerals attached to the TUs constituting the physical block represent the absolute addresses (absolute addresses) of the TUs in the physical area. FIG. 3 shows an example in which the user blocks 0 to 2 and the cache blocks 1-1 to 1-3 are assigned in order from the smallest absolute address for easy understanding. Whether a block is allocated as a user block or a cache block depends on the control of the
また、図3において、グレー色で塗りつぶされたTUは、データが記録済みのTUであることを示し、以降の図においても同様に表す。 Further, in FIG. 3, a TU filled in gray indicates that the data has been recorded, and is similarly expressed in the following drawings.
不揮発性メモリ14の制御および構成についてまとめると、次のように言うことができる。主記憶領域81は、複数のユーザブロックで構成され、キャッシュ領域82は、複数のキャッシュブロックで構成される。主記憶領域81は、不揮発性メモリ14としてのメモリ容量と同一の容量を有し、キャッシュ領域82は、不揮発性メモリ14としてのメモリ容量と同一の容量を有する必要が無い。主記憶領域81とキャッシュ領域82は、異なるデバイスである必要が無く、同じデバイス内の物理ブロックごとに主記憶領域81またはキャッシュ領域82を割り当てることが可能である。
The control and configuration of the
本実施の形態の主記憶領域81とキャッシュ領域82は、上述したように、一つのデバイス(記憶領域)を、主記憶領域81またはキャッシュ領域82として適宜使い分けるようにして構成されるが、主記憶領域81とキャッシュ領域82は、それぞれ異なるデバイスとして予め区別して設けられてもよい。
As described above, the
[起動シーケンス]
図4は、電子機器1の電源が投入され、オペレーティングシステム42が起動したときに、ファイルシステム制御部61とメモリ制御部62との間で行われる処理を説明するフローチャートである。
[Startup sequence]
FIG. 4 is a flowchart illustrating a process performed between the file
オペレーティングシステム42が起動されると、ステップS1において、ファイルシステム制御部61は、メモリ制御部62にLTUのサイズ(LTUサイズ)と論理ブロックのサイズ(論理ブロックサイズ)を要求する。
When the
ステップS2において、メモリ制御部62は、ファイルシステム制御部61からの要求に応じて、LTUのサイズと論理ブロックのサイズをファイルシステム制御部61に返答(出力)する。
In step S 2, the
以上の処理により、ファイルシステム制御部61はLTUのサイズと論理ブロックのサイズを認識し、LTU単位による制御が可能となる。
Through the above processing, the file
[従来手法による書き込み制御の説明]
次に、図5乃至図11を参照して、従来行われていた不揮発性メモリ14に対する書き込み制御について説明する。なお、図5乃至図11の説明において、便宜上、ファイルシステム制御部61とメモリ制御部62が行うものとして説明する。
[Description of conventional write control]
Next, referring to FIG. 5 to FIG. 11, the conventional writing control for the
図5は、データを書き込み前の不揮発性メモリ14の状態を示している。
FIG. 5 shows a state of the
データ書き込み前の不揮発性メモリ14の状態は、図3に示した状態と同様に、論理ブロック1と、それに割り当てられた3個のキャッシュブロック1−1乃至1−3の全てのTUがデータ書き込み済みの状態である。なお、書き込み済みの各TUのうち、有効なデータは、ユーザブロック1のTU4と、キャッシュブロック1−1のTU13、キャッシュブロック1−2のTU18、及び、キャッシュブロック1−3のTU23であるとする。
The state of the
不揮発性メモリ14の状態が、図5に示す状態であるとき、ファイルシステム制御部61から、開始LTUアドレスとして「5(LTU5)」、書き込みTU数として「2」の書き込み命令が供給された場合の従来手法による制御を、以下で説明する。
When the state of the
初めに、メモリ制御部62は、書き込み対象のLTU5およびLTU6が含まれる論理ブロック1に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、図6に示されるように、他の消去済みブロックを確保する。図6の例では、TU32乃至TU35で構成される物理ブロックが消去済みブロックとして確保されている。
First, the
そして、メモリ制御部62は、確保した消去済みブロックに、論理ブロック1の有効なデータをコピーする。具体的には、図6に示すように、ユーザブロック1のTU4、キャッシュブロック1−1のTU13、キャッシュブロック1−2のTU18、及び、キャッシュブロック1−3のTU23のデータを、確保した消去済みブロックのTU32乃至TU35にコピーする。
Then, the
次に、メモリ制御部62は、図7に示されるように、コピー完了により不要になった、TU4乃至TU7で構成されるユーザブロック1と、TU12乃至TU23で構成されるキャッシュブロック1−1乃至1−3のデータを消去する。
Next, as shown in FIG. 7, the
そして、メモリ制御部62は、図8に示されるように、先ほど有効なデータをコピーした元消去済みブロックを、論理ブロック1に対応する新たなユーザブロック1として割り当てる。換言すれば、論理ブロック1に対応するユーザブロック1が、TU4乃至TU7で構成される物理ブロックから、TU32乃至TU35で構成される物理ブロックに変更される。
Then, as shown in FIG. 8, the
以上のように、書き込み先の論理ブロックに対応するキャッシュブロックに空きがない場合に、ユーザブロック及びキャッシュブロック内の有効なデータを新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理がライトバック処理と呼ばれる。 As described above, when there is no free space in the cache block corresponding to the logical block of the write destination, valid data in the user block and the cache block is copied to a new physical block, and the data of the current cache block is copied after the copy. The process of erasing is called a write back process.
ライトバック処理の後、メモリ制御部62は、図9に示されるように、1つの消去済みブロックをさらに確保し、論理ブロック1に対応する1個目のキャッシュブロック1−1として割り当て、書き込み命令とともに供給されたデータを、そこに書き込む。図9では、TU20乃至TU23で構成される物理ブロックが、キャッシュブロック1−1として割り当てられ、そのうちのTU20とTU21に、ファイルシステム制御部61から供給されたデータが書き込まれている。このとき、メモリ制御部62では、論理ブロック1のLTU5に対して新キャッシュブロック1−1のTU20が、論理ブロック1のLTU6に対して新キャッシュブロック1−1のTU21が参照されるようなアドレス変換が設定される。
After the write-back process, the
図10は、開始LTUアドレス:5、書き込みTU数:2の書き込み命令による書き込み処理完了後の不揮発性メモリ14の最終的な状態を示している。
FIG. 10 shows the final state of the
図11は、図5乃至図10を参照して説明した従来の書き込み制御を説明するフローチャートである。 FIG. 11 is a flowchart for explaining the conventional write control described with reference to FIGS.
ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けて、ステップS11において、開始LTUアドレス:5(LTU5)、書き込みTU数:2の書き込み命令をメモリ制御部62に出力する。
The file
メモリ制御部62は、ステップS12において、書き込み対象のLTU5およびLTU6が含まれる論理ブロック1に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のユーザブロック及びキャッシュブロックのデータを消去する処理を行う。
In step S12, the
ステップS13において、メモリ制御部62は、新キャッシュブロックとなる消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。
In step S13, the
そして、ステップS14において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答を、ファイルシステム制御部61に返信して、終了する。
In step S14, after the writing is completed, the
以上のように、従来の手法では、デバイス側の書き込み状態に関係なく、上位層であるファイルシステム制御部61が独自にデータの書き込み先(開始LTUアドレス)を指定していた。従って、上述した例で言えば、論理ブロック0または論理ブロック2をデータの書き込み先に指定すれば、ライトバック処理を回避できた場合までも、ライトバック処理が行われることとなっていた。
As described above, in the conventional method, the file
[書き込みデータサイズがブロックサイズ未満である場合の書き込み制御の説明]
そこで、図12および図13を参照して、ファイルシステム制御部61とメモリ制御部62とで行われる、本技術を適用した書き込み制御を説明する。なお、図12および図13を参照して説明する書き込み制御方法は、書き込むデータのデータサイズがブロックサイズ未満、即ち、TU数が4個未満である場合の方法である。書き込むデータのデータサイズがブロックサイズであるときの書き込み制御方法については後述する。
[Description of write control when write data size is less than block size]
Therefore, with reference to FIG. 12 and FIG. 13, write control to which the present technology is applied performed by the file
図12は、ファイルシステム制御部61とメモリ制御部62とで行われる本技術を適用した書き込み制御のフローチャートである。
FIG. 12 is a flowchart of write control to which the present technology is applied that is performed by the file
ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、ステップS31において、書き込みサイズを通知する書き込みサイズ通知を、メモリ制御部62に出力する。上述した例でいうと、TU数:2を書き込みサイズとして指定した書き込みサイズ通知が、ファイルシステム制御部61からメモリ制御部62に供給される。
When receiving a data write command from the
ステップS32において、メモリ制御部62は、キャッシュブロックのデータの書き込み状態に基づいて、ライトバック処理を発生させず、指定された書き込みサイズのデータを書き込み可能な書き込み先を検索する。検索結果として、例えば、LTUアドレス8と9が検索されたとする。
In step S <b> 32, the
そして、ステップS33において、メモリ制御部62は、検索結果に基づいて、開始LTUアドレスとして、先頭のLTUアドレス(8)を通知する開始LTUアドレス通知を、ファイルシステム制御部61に出力する。
In step S33, the
ステップS34において、ファイルシステム制御部61は、ステップS31で先に通知した書き込みサイズと、開始LTUアドレス通知で指定された開始LTUアドレスを指定した書き込み命令をメモリ制御部62に出力する。即ち、ファイルシステム制御部61は、開始LTUアドレス:8(LTU8)、書き込みTU数:2の書き込み命令をメモリ制御部62に出力する。
In step S34, the file
ステップS35において、メモリ制御部62は、書き込み命令とともにファイルシステム制御部61から供給されたデータを、指定された開始LTUアドレスから書き込む。指定された開始LTUアドレスが含まれる論理ブロックに対応するキャッシュブロックは、必要に応じて割り当てられる。
In step S35, the
そして、ステップS35において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答を、ファイルシステム制御部61に返信して、終了する。
In step S35, after the writing is completed, the
図13は、図12で説明した処理を図示したものである。なお、図13において、データを書き込む前の不揮発性メモリ14の状態は、図5に示した従来例と同様である。
FIG. 13 illustrates the processing described in FIG. In FIG. 13, the state of the
図13に示されるように、メモリ制御部62は、TU数:2の書き込みサイズが通知されたとき、上限値の3個のキャッシュブロックが割り当てられ、かつ、その全てでデータが書き込み済みである論理ブロック1を除外したなかから、例えば、論理ブロック2のLTUアドレス8と9を書き込み先として検索し、決定する。そして、メモリ制御部62は、LTUアドレス:8を開始LTUアドレスとして通知する。
As shown in FIG. 13, when the write size of TU number: 2 is notified, the
ファイルシステム制御部61は、開始LTUアドレス通知で指定された開始LTUアドレス(LTUアドレス:8)を指定して、書き込み命令をメモリ制御部62に出力する。
The file
書き込み前の状態では、論理ブロック2に対しては1個のキャッシュブロックも割り当てられておらず、また、キャッシュブロックが割り当てられている論理ブロックも論理ブロック1の1個だけである。従って、論理ブロック2に対してキャッシュブロックを割り当てることができる。そこで、メモリ制御部62は、論理ブロック2に対して1個目のキャッシュブロック2−1として、TU28乃至TU31で構成される1個の消去済みブロックを確保し、先頭の2つのTUにデータを書き込む。
In the state before writing, one cache block is not assigned to the logical block 2, and only one
以上のように、ファイルシステム制御部61は、データの書き込み命令を出力する前に、最適な書き込み先、即ち、ライトバック処理が発生しない書き込み先をメモリ制御部62から取得する。そして、ファイルシステム制御部61は、取得した書き込み先を開始LTUアドレスで指定して、書き込み命令をメモリ制御部62に出力する。
As described above, the file
このように、メモリ制御部62が最適な書き込み先を予め指定することで、ライトバック処理を行うことなく、データを書き込むことができる。即ち、本技術を適用した書き込み制御方法によれば、ライトバック処理の発生頻度を抑制することができる。
As described above, the
なお、上述した例のように、選択可能な論理ブロック0と論理ブロック2に対応するキャッシュブロックの書き込み状態が同一条件である場合には、メモリ制御部62は、論理ブロック0と論理ブロック2のどちらを書き込み先として選択してもよい。
As in the example described above, when the write states of the cache blocks corresponding to the selectable logical block 0 and logical block 2 are the same condition, the
一方、例えば、図14に示されるように、選択可能な論理ブロック0と論理ブロック2に対応するキャッシュブロックの書き込み状態が同一でない場合には、メモリ制御部62は、書き込みサイズと同一のキャッシュブロックの空きTU数を有する論理ブロックを書き込み先として指定する。
On the other hand, for example, as shown in FIG. 14, when the write states of the cache blocks corresponding to the selectable logical block 0 and logical block 2 are not the same, the
図14の例では、論理ブロック0に対応するキャッシュブロック0−2の空きTU数は3であり、論理ブロック2に対応するキャッシュブロック2−1の空きTU数は2である。従って、メモリ制御部62は、論理ブロック2のLTUアドレス10を、書き込み先として指定する。これにより、キャッシュブロックを効率よく使用することができ、不揮発性メモリ14全体としての書き換え回数を抑制することができる。
In the example of FIG. 14, the number of empty TUs in the cache block 0-2 corresponding to the logical block 0 is 3, and the number of empty TUs in the cache block 2-1 corresponding to the logical block 2 is 2. Therefore, the
[書き込みデータサイズがブロックサイズである場合の書き込み制御の説明]
次に、書き込むデータのデータサイズがブロックサイズであるときの書き込み制御について説明する。
[Description of write control when write data size is block size]
Next, write control when the data size of data to be written is a block size will be described.
初めに、図15および図16を参照して、従来行われていた書き込み制御について説明する。 First, referring to FIGS. 15 and 16, the conventional write control will be described.
従来の手法では、上述したように、デバイス側の書き込み状態に関係なく、上位層であるファイルシステム制御部61が独自にデータの書き込み先(開始LTUアドレス)を指定する。
In the conventional method, as described above, regardless of the writing state on the device side, the file
例えば、図15に示されるように、論理ブロック0および論理ブロック1のそれぞれに対して、上限数のキャッシュブロックが割り当てられ、かつ、全てのTUにデータが書き込み済みであるような状態において、LTU3乃至LTU6に対応する4個のTUにデータを書き込む場合について説明する。
For example, as shown in FIG. 15, in a state where an upper limit number of cache blocks are allocated to each of logical block 0 and
この場合、LTU3とLTU4乃至LTU6とは異なる論理ブロックであるため、ファイルシステム制御部61は、論理ブロックの境界を跨って連続するLTUを1回の書き込み命令で書き込むことはできない。
In this case, since LTU3 and LTU4 to LTU6 are different logical blocks, the file
そこで、従来では、図16に示すような制御が行われる。 Therefore, conventionally, control as shown in FIG. 16 is performed.
図16は、書き込みデータサイズがブロックサイズである場合の従来の書き込み制御を説明するフローチャートである。なお、図16においても、上述した例と同様、ファイルシステム制御部61とメモリ制御部62が制御を行うものとして説明する。
FIG. 16 is a flowchart for explaining conventional write control when the write data size is a block size. In FIG. 16, similarly to the example described above, the file
ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、初めに、LTUアドレスが小さい方の論理ブロック0に対する書き込みを行う。即ち、ステップS51において、開始LTUアドレス:3(LTU3)、書き込みTU数:1の書き込み命令をメモリ制御部62に出力する。
When the file
メモリ制御部62は、ステップS52において、書き込み対象のLTU3に対応するユーザブロック0に割り当てられたキャッシュブロック0−1乃至0−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理を行う。
In step S52, the
そして、ステップS53において、メモリ制御部62は、新キャッシュブロックとなる新たな消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。
In step S53, the
そして、ステップS54において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信する。
In
次に、残りの論理ブロック1に対する書き込みを行う。即ち、ステップS55において、開始LTUアドレス:4(LTU4)、書き込みTU数:3の書き込み命令をメモリ制御部62に出力する。
Next, the remaining
メモリ制御部62は、ステップS56において、書き込み対象のLTU4乃至LTU6に対応するユーザブロック1に割り当てられたキャッシュブロック1−1乃至1−3の各TUがいずれも書き込み済みであるので、ライトバック処理を行う。即ち、メモリ制御部62は、ユーザブロック及びキャッシュブロック内の有効なデータを、(新ユーザブロックとなる)新たな物理ブロックにコピーし、コピー後に現在のキャッシュブロックのデータを消去する処理を行う。
In step S56, the
そして、ステップS57において、メモリ制御部62は、新キャッシュブロックとなる新たな消去済みブロックを確保し、書き込み命令とともにファイルシステム制御部61から供給されたデータを、確保した新キャッシュブロックに書き込む。
In step S57, the
そして、ステップS58において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信し、終了する。
In step S58, after completing the writing, the
以上のように、従来の書き込み制御によれば、論理ブロック0および論理ブロック1のそれぞれについてライトバック処理が行われる。
As described above, according to the conventional write control, the write back process is performed for each of the logical block 0 and the
次に、図17を参照して、ファイルシステム制御部61とメモリ制御部62とで行われる本技術を適用した書き込み制御について説明する。
Next, with reference to FIG. 17, write control to which the present technology is applied performed by the file
本技術を適用した書き込み制御方法では、上述したように、最初に、メモリ制御部62が、ファイルシステム制御部61から通知された書き込みサイズに応じて、開始LTUアドレスを決定し、ファイルシステム制御部61に通知する。図15に示した書き込み前の状態においては、メモリ制御部62は、図17に示すように、データが記録済みではないユーザブロックに対応する論理ブロックで、かつ、ライトバック処理が発生しない論理ブロック2の先頭のLTUアドレス:8を、開始LTUアドレスとして、ファイルシステム制御部61に通知する。
In the write control method to which the present technology is applied, as described above, first, the
そして、開始LTUアドレス通知に応じて、ファイルシステム制御部61から、開始LTUアドレス:8(LTU8)、書き込みTU数:4の書き込み命令が供給された場合、メモリ制御部62は、キャッシュブロックではなく、ユーザブロックに直接書き込む。即ち、メモリ制御部62は、ブロックサイズ分のデータがくることが分かっている場合には、キャッシュブロックではなく、ユーザブロックに直接書き込む。これにより、キャッシュ領域82(キャッシュブロック)に保存する時間と、ライトバック処理を行った場合のキャッシュ領域82のデータを消去する時間を削減でき、かつ、キャッシュ領域82の書き換え回数を減らすことができる。
Then, in response to the notification of the start LTU address, when a write command of start LTU address: 8 (LTU 8) and write TU number: 4 is supplied from the file
図18は、図17を参照して説明した書き込み制御のフローチャートである。 FIG. 18 is a flowchart of the write control described with reference to FIG.
ファイルシステム制御部61は、上位のアプリケーションプログラム41からのデータ書き込み命令を受けると、ステップS71において、書き込みサイズを通知する書き込みサイズ通知を、メモリ制御部62に出力する。ここで通知される書き込みサイズは、ブロックサイズであるTU数:4である。
When receiving a data write command from the
ステップS72において、メモリ制御部62は、キャッシュブロックへのデータの書き込み状態に基づいて、ライトバック処理を発生させず、指定された書き込みサイズのデータを書き込み可能な書き込み先を検索する。図17の例では、LTUアドレス8乃至11の論理ブロック2が検索される。
In step S <b> 72, the
そして、ステップS73において、メモリ制御部62は、検索結果に基づいて、開始LTUアドレスとして、論理ブロック2の先頭のLTUアドレス:8を通知する開始LTUアドレス通知を、ファイルシステム制御部61に出力する。
In step S73, the
ステップS74において、ファイルシステム制御部61は、ステップS71で先に通知した書き込みサイズと、開始LTUアドレス通知で指定された開始LTUアドレスを指定して、書き込み命令をメモリ制御部62に出力する。即ち、ファイルシステム制御部61は、開始LTUアドレス:8(LTU8)、書き込みTU数:4の書き込み命令をメモリ制御部62に出力する。
In step S 74, the file
ステップS75において、メモリ制御部62は、論理ブロック2に対応するユーザブロック2に、直接、ファイルシステム制御部61から供給されたデータを書き込む。
In step S <b> 75, the
そして、ステップS75において、メモリ制御部62は、書き込み完了後、書き込み命令に対する終了応答をファイルシステム制御部61に返信して、終了する。
In step S75, after the writing is completed, the
以上のように、メモリ制御部62が最適な書き込み先を予め指定することで、ライトバック処理を行うことなく、データを書き込むことができる。また、書き込むデータのデータサイズがブロックサイズである場合には、データが、キャッシュ領域82(キャッシュブロック)ではなく、主記憶領域81(ユーザブロック)に直接書き込まれる。これにより、キャッシュ領域82に保存する時間とキャッシュ領域82のデータを消去する時間を削減でき、かつ、キャッシュ領域82の書き換え回数を減らすことができる。
As described above, data can be written without performing write-back processing by the
なお、ブロックサイズの書き込み先として指定可能な複数の論理ブロックがある場合、対応するユーザブロックのこれまでの書き換え回数の少ない方の論理ブロックを指定することができる。これにより、不揮発性メモリ14の各物理ブロックの書き換え回数を平均化することができる。
When there are a plurality of logical blocks that can be designated as the write destination of the block size, the logical block with the smaller number of rewrites of the corresponding user block can be designated. Thereby, the rewrite frequency of each physical block of the
また、上述した実施の形態では、ファイルシステム制御部61がメモリ制御部62に通知する書き込みサイズ通知において、書き込む予定のサイズ(書き込みサイズ)のみを通知するようにしたが、書き込む予定の開始LTUアドレスも通知するようにしてもよい。
In the embodiment described above, only the size to be written (write size) is notified in the write size notification that the file
従って、本技術を適用した書き込み制御方法によれば、不揮発性メモリ14の書き換えの頻度を減らすことで、メモリシステムとしての寿命を延ばすことができる。また、ライトバック処理の発生頻度が減ることで、書き込み速度も高速化することができる。
Therefore, according to the write control method to which the present technology is applied, the lifetime of the memory system can be extended by reducing the frequency of rewriting of the
[書き込み回数が複数回の例]
上述した例は、いずれも、フィルシステム制御部61からの1回の書き込みサイズ通知に対して、フィルシステム制御部61から、書き込み命令が1回のみ通知される場合の例であった。しかし、ファイルシステム制御部61は、書き込みサイズ通知により予め通知した書き込みサイズの領域を、何回の書き込み命令によって使用するか(書き込むか)は任意である。
[Example of writing multiple times]
Each of the above-described examples is an example in which a write command is notified only once from the fill
図19は、1回の書き込みサイズ通知に対して、2回の書き込みを行う例を示したフローチャートである。 FIG. 19 is a flowchart illustrating an example in which writing is performed twice for one writing size notification.
即ち、図19の処理では、ステップS91乃至S93の処理により、ファイルシステム制御部61が書き込みサイズを通知して、それに応じてメモリ制御部62が最適な開始LTUアドレスを通知する。
That is, in the process of FIG. 19, the file
そして、ファイルシステム制御部61は、ステップS94乃至S96の処理からなる1回目の書き込み処理と、ステップS97乃至S99の処理からなる2回目の書き込み処理により、指定した書き込みサイズの領域にデータを書き込んでいる。
Then, the file
ステップS91乃至S93の処理は、上述した図18のステップS71乃至S73の処理と、開始LTUアドレスとTU数が異なるだけで、基本的に同様の処理であるので、詳細な説明は省略する。また、ステップS94乃至S96の処理及びステップS97乃至S99の処理も同様に、上述した図18のステップS74乃至S76の処理と、基本的に同様の処理であるので、詳細な説明は省略する。 The processing of steps S91 to S93 is basically the same as the processing of steps S71 to S73 of FIG. 18 described above except that the start LTU address and the TU number are different, and thus detailed description thereof is omitted. Similarly, the processes in steps S94 to S96 and the processes in steps S97 to S99 are basically the same as the processes in steps S74 to S76 in FIG.
図19で説明した書き込み処理を図示すると、図20Aに示すようになる。図20Aでは、確保されたLTUアドレス4乃至7に対して、1TUを書き込む1回目の書き込みと、3TUを書き込む2回目の書き込みの計2回の書き込みが行われている。 The write process described with reference to FIG. 19 is illustrated in FIG. 20A. In FIG. 20A, a total of two writes are performed on the reserved LTU addresses 4 to 7, that is, a first write for writing 1TU and a second write for writing 3TU.
その他、図20Bに示されるように、確保されたLTUアドレス4乃至7に対して、4回の書き込みにより、最終的に4TUの書き込みを行ってもよいし、図20Cに示されるように2TUの2回の書き込みにより、最終的に4TUの書き込みを行ってもよい。 In addition, as shown in FIG. 20B, 4 TUs may be finally written to the reserved LTU addresses 4 to 7 by four writes, or 2 TUs as shown in FIG. 20C. You may write 4TU finally by writing twice.
[データの消去命令]
本技術を適用した書き込み制御によれば、上述したように、メモリ制御部62は、書き込みサイズ通知により指定されたサイズの空き領域を検索して書き込み先を返答するが、処理が進むにつれて、空き領域が少なくなる。デバイス側のメモリ制御部62は、不要なデータと必要なデータの違いがわからないため、書き込まれたデータをすべて残そうとする。その結果、最終的には空き領域がなくなり、書き込み先を指定できないという事態が想定される。
[Data erase instruction]
According to the write control to which the present technology is applied, as described above, the
そのため、ファイルシステム制御部61には、消去命令のコマンドが用意されており、不要となり、消去可能なデータを、メモリ制御部62に通知することができる。なお、消去単位はブロックサイズであるため、消去命令は論理ブロック単位で指定される。
For this reason, the file
図21は、消去命令を行う処理のフローチャートである。 FIG. 21 is a flowchart of a process for issuing an erase command.
初めに、ステップS121において、ファイルシステム制御部61は、消去可能な論理ブロックの先頭のLTUアドレスを開始LTUアドレスとし、TU数をブロックサイズの4とする消去命令をメモリ制御部62に通知する。
First, in step S121, the file
ステップS122において、メモリ制御部62は、消去命令により指定された論理ブロックを消去する消去処理を実行し、ステップS123において、終了応答を返信して、処理を終了する。
In step S122, the
以上のように、ファイルシステム制御部61が消去命令を通知し、メモリ制御部62が消去処理を実行することにより、空き領域を増やすことができ、書き込み先を指定できないという事態を防止することができる。ファイルシステム制御部61は、例えば、主記憶領域81の全容量における空き領域の比率が所定の比率以下となったときや、自身がアイドル状態となったときに、消去命令を通知することができる。
As described above, the file
なお、消去命令の代わりに、その論理ブロック内のデータが無効なもの(不要なもの)であることを示す無効化命令を送信してもよい。即ち、指定された論理ブロックを実際に消去するものでなく、消去可能であることを通知するだけでもよい。 Instead of the erase command, an invalidation command indicating that the data in the logical block is invalid (unnecessary) may be transmitted. In other words, the designated logical block may not be actually erased, but may be simply notified that it can be erased.
[ファイルシステム制御部61とメモリ制御部62の詳細機能ブロック図]
図22は、上述したファイルシステム制御部61とメモリ制御部62の機能をまとめた、ファイルシステム制御部61とメモリ制御部62の詳細な機能ブロック図を示している。
[Detailed Functional Block Diagram of File
FIG. 22 is a detailed functional block diagram of the file
ファイルシステム制御部61は、通知部101と取得部02を少なくとも有し、メモリ制御部62は、取得部111、検索部112、通知部113、及び書き込み部114を少なくとも有する。
The file
ファイルシステム制御部61の通知部101は、メモリ制御部62の取得部111に、不揮発性メモリ14に書き込む書き込みデータのサイズを通知する。また、通知部101は、取得部102から取得された書き込み先の開始LTUアドレス(論理アドレス)を書き込み先として、書き込みデータの書き込み命令を、メモリ制御部62の取得部111に通知する。
The
ファイルシステム制御部61の取得部102は、メモリ制御部62の通知部113から供給される、書き込みデータの書き込み先の開始LTUアドレスを取得し、通知部101に供給する。
The
メモリ制御部62の取得部111は、上位層としてのファイルシステム制御部61から、書き込みデータのサイズを取得する。メモリ制御部62の検索部112は、取得部111で取得された書き込みデータのサイズを少なくとも有する空き領域を検索する。
The
メモリ制御部62の通知部113は、検索部112の検索結果に基づき、書き込みデータの書き込み先の開始LTUアドレスを、ファイルシステム制御部61に通知する。
The
メモリ制御部62の書き込み部114は、取得部111で取得された書き込み命令に基づいて、不揮発性メモリ14の主記憶領域81またはキャッシュ領域82に書き込みデータを書き込む。また、書き込み部114は、取得部111で取得された消去命令に基づいて、主記憶領域81またはキャッシュ領域82に書き込み済みのデータを消去する。
The writing unit 114 of the
ファイルシステム制御部61とメモリ制御部62は、以上のように構成される。
The file
本明細書において、フローチャートに記述されたステップは、記載された順序に沿って時系列的に行われる場合はもちろん、必ずしも時系列的に処理されなくとも、並列に、あるいは呼び出しが行われたとき等の必要なタイミングで実行されてもよい。 In this specification, the steps described in the flowchart are not necessarily processed in chronological order, but are performed in parallel or when they are called in chronological order according to the described order. It may be executed at a necessary timing.
本技術の実施の形態は、上述した実施の形態に限定されるものではなく、本技術の要旨を逸脱しない範囲において種々の変更が可能である。 Embodiments of the present technology are not limited to the above-described embodiments, and various modifications can be made without departing from the gist of the present technology.
なお、本技術は以下のような構成も取ることができる。
(1)
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得する取得部と、
取得された前記書き込みデータのサイズの空き領域を検索する検索部と、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部と
を備えるメモリ制御装置。
(2)
前記不揮発性メモリに前記書き込みデータを書き込む制御を行う書き込み制御部をさらに備え、
前記取得部は、さらに、前記上位層から、前記通知部が通知した前記論理アドレスを書き込み先とする書き込み命令を取得し、
前記書き込み制御部は、前記書き込み命令に基づいて、前記書き込みデータを書き込む
前記(1)に記載のメモリ制御装置。
(3)
前記検索部は、検索された前記書き込みデータのサイズ以上の空き領域のなかから、前記書き込みデータと同一サイズの空き領域を、前記検索結果とする
前記(1)または(2)に記載のメモリ制御装置。
(4)
前記検索部は、検索された前記空き領域のなかから、これまでの書き換え回数が少ない空き領域を、前記検索結果とする
前記(1)乃至(3)のいずれかに記載のメモリ制御装置。
(5)
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
ステップを含むメモリ制御方法。
(6)
コンピュータに、
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
処理を実行させるためのプログラム。
(7)
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知する通知部と、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部と
を備え、
前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
データ管理装置。
(8)
前記通知部は、前記メモリ制御装置に書き込まれたデータのうち、消去可能なデータが記録された論理アドレスも通知する
前記(7)に記載のデータ管理装置。
(9)
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
ステップを含むデータ管理方法。
(10)
コンピュータに、
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
処理を実行させるためのプログラム。
In addition, this technique can also take the following structures.
(1)
An acquisition unit that acquires the size of the write data from an upper layer having write data to be written to the nonvolatile memory;
A search unit for searching for a free area of the size of the acquired write data;
A memory control device comprising: a notification unit that notifies the upper layer of a logical address of a write destination of the write data based on a search result.
(2)
A write control unit for controlling writing of the write data in the nonvolatile memory;
The acquisition unit further acquires, from the upper layer, a write command with the logical address notified by the notification unit as a write destination,
The memory control device according to (1), wherein the write control unit writes the write data based on the write command.
(3)
The memory control according to (1) or (2), wherein the search unit uses, as a search result, an empty area having the same size as the write data from among the empty areas that are equal to or larger than the searched write data size. apparatus.
(4)
The memory control device according to any one of (1) to (3), wherein the search unit uses, as the search result, an empty area with a small number of rewrites so far from the searched empty areas.
(5)
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A memory control method including a step of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
(6)
On the computer,
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A program for executing a process of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
(7)
A notification unit for notifying the size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory;
In response to the notification of the size of the write data, an acquisition unit that is supplied from the memory control device and acquires a logical address of a write destination of the write data,
The notification unit is a data management device that notifies the memory control device of a write command for the write data, using the acquired logical address as a write destination.
(8)
The data management device according to (7), wherein the notification unit also notifies a logical address in which erasable data is recorded among data written in the memory control device.
(9)
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A data management method comprising: notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
(10)
On the computer,
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A program for executing a process of notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
1 電子機器, 11 MPU, 14 不揮発性メモリ, 42 オペレーティングシステム, 61 ファイルシステム制御部, 62 メモリ制御部, 81 主記憶領域, 82 キャッシュ領域 1 electronic device, 11 MPU, 14 non-volatile memory, 42 operating system, 61 file system control unit, 62 memory control unit, 81 main storage area, 82 cache area
Claims (10)
取得された前記書き込みデータのサイズの空き領域を検索する検索部と、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する通知部と
を備えるメモリ制御装置。 An acquisition unit that acquires the size of the write data from an upper layer having write data to be written to the nonvolatile memory;
A search unit for searching for a free area of the size of the acquired write data;
A memory control device comprising: a notification unit that notifies the upper layer of a logical address of a write destination of the write data based on a search result.
前記取得部は、さらに、前記上位層から、前記通知部が通知した前記論理アドレスを書き込み先とする書き込み命令を取得し、
前記書き込み制御部は、前記書き込み命令に基づいて、前記書き込みデータを書き込む
請求項1に記載のメモリ制御装置。 A write control unit for controlling writing of the write data in the nonvolatile memory;
The acquisition unit further acquires, from the upper layer, a write command with the logical address notified by the notification unit as a write destination,
The memory control device according to claim 1, wherein the write control unit writes the write data based on the write command.
請求項1に記載のメモリ制御装置。 The memory control device according to claim 1, wherein the search unit uses, as the search result, an empty area having the same size as the write data, from among the empty areas that are equal to or larger than the size of the searched write data.
請求項1に記載のメモリ制御装置。 The memory control device according to claim 1, wherein the search unit uses, as the search result, an empty area with a small number of rewrites so far from among the searched empty areas.
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
ステップを含むメモリ制御方法。 From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A memory control method including a step of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
不揮発性メモリに書き込む書き込みデータを有する上位層から、前記書き込みデータのサイズを取得し、
取得された前記書き込みデータのサイズの空き領域を検索し、
検索結果に基づき、前記書き込みデータの書き込み先の論理アドレスを前記上位層に通知する
処理を実行させるためのプログラム。 On the computer,
From the upper layer having write data to be written to the nonvolatile memory, obtain the size of the write data,
Search for free space of the size of the acquired write data,
A program for executing a process of notifying the upper layer of a logical address of a write destination of the write data based on a search result.
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得する取得部と
を備え、
前記通知部は、取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
データ管理装置。 A notification unit for notifying the size of write data to be written to the nonvolatile memory to a memory control device that controls the nonvolatile memory;
In response to the notification of the size of the write data, an acquisition unit that is supplied from the memory control device and acquires a logical address of a write destination of the write data,
The notification unit is a data management device that notifies the memory control device of a write command for the write data, using the acquired logical address as a write destination.
請求項7に記載のデータ管理装置。 The data management device according to claim 7, wherein the notification unit also notifies a logical address in which erasable data is recorded among data written in the memory control device.
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
ステップを含むデータ管理方法。 Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A data management method comprising: notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
不揮発性メモリを制御するメモリ制御装置に、前記不揮発性メモリに書き込む書き込みデータのサイズを通知し、
前記書き込みデータのサイズの通知に応答して、前記メモリ制御装置から供給される、前記書き込みデータの書き込み先の論理アドレスを取得し、
取得された前記論理アドレスを書き込み先として、前記書き込みデータの書き込み命令を前記メモリ制御装置に通知する
処理を実行させるためのプログラム。 On the computer,
Notifying the memory control device that controls the nonvolatile memory of the size of the write data to be written to the nonvolatile memory,
In response to the notification of the size of the write data, obtain a logical address of the write destination of the write data supplied from the memory control device,
A program for executing a process of notifying the memory control device of a write command for the write data, using the acquired logical address as a write destination.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011189077A JP2013050880A (en) | 2011-08-31 | 2011-08-31 | Memory control device and method therefor, data management device and method therefor, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2011189077A JP2013050880A (en) | 2011-08-31 | 2011-08-31 | Memory control device and method therefor, data management device and method therefor, and program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JP2013050880A true JP2013050880A (en) | 2013-03-14 |
Family
ID=48012867
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2011189077A Withdrawn JP2013050880A (en) | 2011-08-31 | 2011-08-31 | Memory control device and method therefor, data management device and method therefor, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2013050880A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2022058898A (en) * | 2017-08-30 | 2022-04-12 | マイクロン テクノロジー,インク. | Managed NVM conformance cache management |
| JP2022135146A (en) * | 2021-03-04 | 2022-09-15 | Necプラットフォームズ株式会社 | Storage device, cache memory writing program, and writing method |
-
2011
- 2011-08-31 JP JP2011189077A patent/JP2013050880A/en not_active Withdrawn
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2022058898A (en) * | 2017-08-30 | 2022-04-12 | マイクロン テクノロジー,インク. | Managed NVM conformance cache management |
| JP2022135146A (en) * | 2021-03-04 | 2022-09-15 | Necプラットフォームズ株式会社 | Storage device, cache memory writing program, and writing method |
| JP7663192B2 (en) | 2021-03-04 | 2025-04-16 | Necプラットフォームズ株式会社 | STORAGE DEVICE, CACHE MEMORY WRITE PROGRAM, AND WRITE METHOD |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5400875B2 (en) | MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, ACCESS DEVICE, NONVOLATILE STORAGE SYSTEM, DATA WRITE METHOD, AND PROGRAM | |
| JP3825465B2 (en) | Memory card and memory card system | |
| CN103677666B (en) | The apparatus and method for handling continuously shot images data | |
| EP1729218A1 (en) | Nonvolatile storage system | |
| US20130138871A1 (en) | Flash Memory Device and Data Access Method for Same | |
| CN112051970B (en) | Dirty data management for hybrid drives | |
| JPWO2009096180A1 (en) | MEMORY CONTROLLER, NONVOLATILE STORAGE DEVICE, AND NONVOLATILE STORAGE SYSTEM | |
| US20120215964A1 (en) | Management device and management method | |
| US8380920B2 (en) | Flash storage device and data access method of flash memory | |
| TWI454922B (en) | Memory storage device and memory controller and data writing method thereof | |
| TWI540435B (en) | Memory system capable of prohibiting access to application software and system software | |
| JP4988054B2 (en) | Memory system | |
| JP2010237907A (en) | Storage device and recording method | |
| JP2013050880A (en) | Memory control device and method therefor, data management device and method therefor, and program | |
| JP6579324B2 (en) | Image forming apparatus and data processing program | |
| US12511050B2 (en) | Data storage method and system, and processor | |
| US20120166713A1 (en) | Administration device, administration method, and program | |
| JP6410055B2 (en) | Image forming apparatus and data processing program | |
| JP4645043B2 (en) | MEMORY CONTROLLER, NONVOLATILE MEMORY DEVICE, AND NONVOLATILE MEMORY SYSTEM | |
| JP2010015251A (en) | Recording device | |
| JP5350077B2 (en) | Information processing apparatus and image forming apparatus having the same | |
| JP2008181381A (en) | Semiconductor memory card, semiconductor memory card data management method, database engine, and semiconductor memory system | |
| JP2015138272A (en) | information processing apparatus, information processing method, and information processing program | |
| WO2020039927A1 (en) | Non-volatile storage device, host device, and data storage system | |
| JP6494275B2 (en) | Recording apparatus and recording apparatus control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20141104 |