JP6289883B2 - Storage device - Google Patents
Storage device Download PDFInfo
- Publication number
- JP6289883B2 JP6289883B2 JP2013244857A JP2013244857A JP6289883B2 JP 6289883 B2 JP6289883 B2 JP 6289883B2 JP 2013244857 A JP2013244857 A JP 2013244857A JP 2013244857 A JP2013244857 A JP 2013244857A JP 6289883 B2 JP6289883 B2 JP 6289883B2
- Authority
- JP
- Japan
- Prior art keywords
- database
- conversion table
- logical
- transaction
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Description
本明細書に記載の実施の形態は、ストレージ装置に関する。 Embodiments described herein relate to a storage apparatus.
近年、SSD(Solid State Drive)と呼ばれるフラッシュメモリ、特にNAND型フラッシュメモリを用いた記憶媒体を、データベースのストレージとして使う製品が増えている。従来はファイルシステム上にデータベースを保存していたが、今後は、ファイルシステムなしのデータベースが増加すると思われる。このようなファイルシステムなしのデータベースにおいては、トランザクション処理速度がデータベースの性能を左右する。そのため、コミット(反映)とロールバック(キャンセル)を速やかに実行する技術が求められている。
NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う従来のストレージ装置について説明する。
In recent years, an increasing number of products use a storage medium using a flash memory called SSD (Solid State Drive), in particular a NAND flash memory, as database storage. Previously, databases were stored on file systems, but in the future, databases without file systems are expected to increase. In such a database without a file system, the transaction processing speed affects the performance of the database. For this reason, there is a need for a technique for promptly executing commit (reflection) and rollback (cancellation).
A conventional storage apparatus using a storage medium using NAND flash memory as database storage will be described.
図15は、NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う、従来のストレージ装置の構成例を示す機能ブロック図である。 FIG. 15 is a functional block diagram showing a configuration example of a conventional storage apparatus that uses a storage medium using a NAND flash memory as a database storage.
従来のストレージ装置1Aは、入出力装置10と、入出力装置10に接続されたデータ管理部60と、データ管理部60に接続された演算装置50と、データ管理部60に接続された不揮発性メモリ40と、データ管理部60に接続された揮発性メモリ30Aとを有している。
揮発性メモリ30Aは、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34とを有している。
The conventional storage apparatus 1A includes an input /
The
入出力装置10は、ストレージ装置1Aと、ストレージ装置1Aと接続されたコンピュータなどの装置とのインターフェイスであって、例えばシリアルATA(SATA)などである。
The input /
データ管理部60は、不揮発性メモリ40のブロックやページ状態を管理し、読み書きを制御する機能を有する。データ管理部60は、例えばNANDメモリコントローラチップを用いて実現される。データ管理部60は、全ページが無効のブロックを選択・消去し、消去済ページリスト32に追加し、データを書きこむ際は、消去済ページリスト32からページを取得する。
The
演算装置50は 、データ管理部60からの要求に従って演算を行い、演算結果を出力する機能を有する 。演算装置50では、データの格納先を取得したり、データの有効・無効などの状態を判断する処理を行う。
不揮発性メモリ40は、電源を供給しなくても記憶を保持するメモリであって、例えばNANDメモリチップである。
The
The
揮発性メモリ30Aは、電源を供給しないと記憶している情報を保持できないメモリであって、例えばDRAMなどである。揮発性メモリ30Aは、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34とを有している。
キャッシュメモリ31は、データを一時的に保存するための記憶領域である。
The
The
消去済ページリスト32は、不揮発性メモリ40における書き込み可能なページのリスト(データ)を保存するための記憶領域である。データ管理部60は、不揮発性メモリ40にデータを書きこむ際は、この消去済ページリスト32から書き込み先ページを取得する。
The
ブロック状態テーブル33は、不揮発性メモリ40における各ブロックのページの状態を管理するデータを保存するための記憶領域である。ブロック状態テーブル33は、各ブロックについて「有効」「無効」「消去済」などの状態を持つ。
The block state table 33 is a storage area for storing data for managing the page state of each block in the
論物変換テーブル34は、不揮発性メモリ40における各ページの論理アドレスと物理アドレスの対応関係を保持するデータを保存するための記憶領域である。図16は、論物変換テーブル34の例を示す図である。図16に示す論物変換テーブル34は、論理アドレス「0」、論理アドレス「1」、論理アドレス「2」、論理アドレス「3」に対応するレコードを有している。論理アドレス「0」に対応するレコードは、対応する物理アドレスとしてブロック「1」のページ「3」を記憶している。論理アドレス「1」に対応するレコードは、対応する物理アドレスとしてブロック「4」のページ「0」を記憶している。論理アドレス「2」に対応するレコードは、対応する物理アドレスとしてブロック「1」のページ「2」を記憶している。論理アドレス「3」に対応するレコードは、対応する物理アドレスとしてブロック「2」のページ「1」を記憶している。
The logical-physical conversion table 34 is a storage area for storing data that holds the correspondence between the logical address and physical address of each page in the
論物変換テーブル34の内容の通り、論理アドレス「0」に対応するデータは、不揮発性メモリ40のブロック「1」のページ「3」に書き込まれている。論理アドレス「1」に対応するデータは、不揮発性メモリ40のブロック「4」のページ「0」に書き込まれている。論理アドレス「2」に対応するデータは、不揮発性メモリ40のブロック「1」のページ「2」に書き込まれている。論理アドレス「4」に対応するデータは、不揮発性メモリ40のブロック「2」のページ「1」に書き込まれている。
なお、データが更新される時は、データ管理部60は、常に別の物理アドレスに更新データを書き込む。
As shown in the contents of the logical-physical conversion table 34, the data corresponding to the logical address “0” is written in the page “3” of the block “1” of the
When the data is updated, the
[従来のストレージ装置の書込み処理(書込み動作)]
次に、従来のストレージ装置1Aの書込み処理(書込み動作)を説明する。図17は、従来のストレージ装置1Aの書込み処理の例を示すフローチャートである。
[Conventional storage device write processing (write operation)]
Next, write processing (write operation) of the conventional storage apparatus 1A will be described. FIG. 17 is a flowchart showing an example of write processing of the conventional storage apparatus 1A.
従来のストレージ装置1A、より詳しくはデータ管理部60は、コンピュータなどの装置から入出力装置10を介して、ある論理アドレスへの書き込み要求を取得する(S1710 )。
データ管理部60は、この書き込み要求に対応するデータ(更新データなど)を、揮発性メモリ30Aのキャッシュメモリ31上に書き込む(S1720)。
次に、データ管理部60は、揮発性メモリ30Aの消去済ページリスト32の先頭から書き込み先物理ページを取得する(S1730)。
The conventional storage apparatus 1A, more specifically, the
The
Next, the
次に、データ管理部60は、不揮発性メモリ40における、上記ステップS1730で取得した物理ページに、ステップS1720でキャッシュメモリ31に書き込んだデータを書き込む(S1740)。
Next, the
次に、データ管理部60は、論物変換テーブル34の上記論理アドレスに対応するレコードの内容を、ステップS1740においてデータを書き込んだ物理ページに対応するブロック番号及びページ番号に書き換える(S1750)。
Next, the
次に、データ管理部60は、論物変換テーブル34の、以前登録されていた物理アドレスに対応する、ブロック状態テーブル33の当該ページの状態を「有効」から「無効」に変更する(以前登録されていた物理アドレスが有効な値の場合)(S1760)。
Next, the
次に、データ管理部60は、ブロック状態テーブル33の、ステップS1740において書き込んだ該当ページの状態を「消去済」から「有効」に変更する(S1770)。
以上で、従来のストレージ装置1Aは、書込み処理を終了する。
Next, the
Thus, the conventional storage apparatus 1A ends the write process.
[従来のストレージ装置の消去処理(消去動作 )]
次に、従来のストレージ装置1Aの消去処理(消去動作)を説明する。図18は、従来のストレージ装置1Aの消去処理の例を示すフローチャートである。
[Conventional storage device erase processing (erase operation)]
Next, an erasing process (erasing operation) of the conventional storage apparatus 1A will be described. FIG. 18 is a flowchart showing an example of the erasing process of the conventional storage apparatus 1A.
従来のストレージ装置1A、より詳しくはデータ管理部60は、揮発性メモリ30Aの消去済ページリスト32に書き込まれている登録済ページの数が一定以下か否かを判定する(S1810)。消去済ページリスト32に書き込まれている登録済ページの数が一定以下ではないと判定した場合(S1810, No)、ストレージ装置1、より詳しくはデータ管理部60は消去処理を終了する。
The conventional storage apparatus 1A, more specifically, the
一方、ステップS1810において、登録済ページの数が一定以下であると判定した場合(S1810, Yes)、従来のストレージ装置1A、より詳しくはデータ管理部60は、揮発性メモリ30のブロック状態テーブル33から、全ページが「無効」となっているブロックを選択する(S1820)。
On the other hand, if it is determined in step S1810 that the number of registered pages is less than or equal to a certain number (S1810, Yes), the conventional storage apparatus 1A, more specifically, the
次に、従来のストレージ装置1A、より詳しくはデータ管理部60は、ステップS1820で選択した、不揮発性メモリ40のブロックに書き込まれているデータを消去する(S1830)。
Next, the conventional storage apparatus 1A, more specifically, the
次に、従来のストレージ装置1A、より詳しくはデータ管理部60は、ステップS1820で選択したブロックの全ページについて、揮発性メモリ30のブロック状態テーブル33に記録されている状態を「消去済」に変更する(S1840)。
Next, the conventional storage device 1A, more specifically, the
次に、ストレージ装置1、より詳しくはデータ管理部60は、揮発性メモリ30Aの消去済ページリスト32に、ステップS1830で消去したページを追加する(S1850)。
以上で従来のストレージ装置1Aは消去処理(消去動作)を終了する。
[従来のストレージ装置のトランザクション・コミット処理]
Next, the
Thus, the conventional storage device 1A ends the erasing process (erasing operation).
[Conventional storage device transaction commit processing]
従来のストレージ装置1Aのトランザクション・コミット処理を説明する。図19は、従来のストレージ装置1Aのトランザクション・コミット処理の例を示すフロー図である。 A transaction commit process of the conventional storage apparatus 1A will be described. FIG. 19 is a flowchart showing an example of transaction / commit processing of the conventional storage apparatus 1A.
まず、従来のストレージ装置1Aに接続されたコンピュータ(図略)にBEGIN文が入力される(S3010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S3110)。 First, a BEGIN sentence is input to a computer (not shown) connected to the conventional storage apparatus 1A (S3010). This starts a transaction. In response to the input of the BEGIN statement, the internal operation of the database is not performed (S3110).
次に、ステップS3010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)がストレージ装置1Aに接続されたコンピュータ(図略)に入力される(S3020)。これらの処理命令文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上で、上記処理命令文に応じてデータベースを更新する(S3120)。
Next, following step S3010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage apparatus 1A (S3020). In accordance with these processing instructions, the
次にストレージ装置1Aに接続されたコンピュータ(図略)にCOMMIT文が入力される(S3030)。COMMIT文の入力に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上のデータベースを不揮発性メモリ40に書き込む(S3130)。
以上で、従来のストレージ装置1Aのトランザクション・コミット処理は終了する。
Next, a COMMIT sentence is input to a computer (not shown) connected to the storage apparatus 1A (S3030). In response to the input of the COMMIT statement, as an internal operation of the database, the
Thus, the transaction / commit processing of the conventional storage apparatus 1A is completed.
[従来のストレージ装置のトランザクション・ロールバック処理]
従来のストレージ装置1Aのトランザクション・ロールバック処理を説明する。図20は、従来のストレージ装置1Aのトランザクション・ロールバック処理の例を示すフロー図である。
[Conventional storage device transaction rollback processing]
A transaction / rollback process of the conventional storage apparatus 1A will be described. FIG. 20 is a flowchart showing an example of transaction / rollback processing of the conventional storage apparatus 1A.
まず、従来のストレージ装置1Aに接続されたコンピュータ(図略)にBEGIN文が入力される(S4010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S4110)。 First, a BEGIN sentence is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S4110).
次に、ステップS4010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)が従来のストレージ装置1Aに接続されたコンピュータ(図略)に入力される(S4020)。これらの処理命令文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上で、上記処理命令文に応じてデータベースを更新する(S4120)。
Next, following step S4010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4020). In response to these processing instructions, the
次に従来のストレージ装置1Aに接続されたコンピュータ(図略)に、ROLLBACK文が入力される(S4030)。ROLLBACK文に応じて、データベース内部の動作として、データ管理部60は、キャッシュメモリ31上のデータベースを破棄する(S4130)。
以上で、従来のストレージ装置1Aのトランザクション・ロールバック処理は終了する。
Next, a ROLLBACK statement is input to a computer (not shown) connected to the conventional storage apparatus 1A (S4030). In response to the ROLLBACK statement, as an internal operation of the database, the
Thus, the transaction / rollback process of the conventional storage apparatus 1A is completed.
NAND型フラッシュメモリを用いた記憶媒体をデータベースのストレージとして使う場合、トランザクション時にコミット操作をしてからデータをNAND型フラッシュメモリに書き込むと時間がかかるという問題がある。
本発明の目的は、トランザクション処理を、コミット(COMMIT)およびロールバック(ROLLBACK)共、高速に実行する技術を提供することにある。
When a storage medium using NAND flash memory is used as database storage, there is a problem that it takes time to write data to the NAND flash memory after performing a commit operation during a transaction.
An object of the present invention is to provide a technique for executing transaction processing at high speed for both COMMIT and ROLLBACK.
本発明の実施の形態はストレージ装置として提案される。ストレージ装置は、不揮発性メモリと、キャッシュメモリと、第1の変換テーブルと、第2の変換テーブルと、第1の処理手段と、第2の処理手段とを有する。 The embodiment of the present invention is proposed as a storage apparatus. The storage apparatus includes a nonvolatile memory, a cache memory, a first conversion table, a second conversion table, a first processing unit, and a second processing unit.
不揮発性メモリは、データベースを記憶する。キャッシュメモリは、データベースを一時的に記憶する。第1の変換テーブル は、データの論理アドレスと、これに対応する不揮発性メモリの物理アドレスを対応付けて記憶する。第2の変換テーブルは、データの論理アドレスと、これに対応する不揮発性メモリの物理アドレスを対応付けて記憶する。第1の処理手段は、データベースを操作する命令であるコマンド文を受け取り、このコマンド文を解釈してデータベースの変更内容を決定し、このデータベースの変更内容に基づいて、キャッシュメモリ上のデータベースの内容を変更し、キャッシュメモリ上のデータベースの変更された内容に対応する論理アドレスと、この変更された内容のデータを記憶させることが可能な不揮発性メモリ上の物理アドレスとを対応付けて、第2の変換テーブルに書き込み、トランザクション処理の結果をデータベースに反映させること意味する命令を受け取ると、第2の変換テーブル内容を第1の変換テーブルに反映させる。第2の処理手段は、キャッシュメモリ上のデータベースの変更された内容を、不揮発性メモリへバックグラウンドで書き込む。 The non-volatile memory stores a database. The cache memory temporarily stores the database. The first conversion table stores the logical address of data and the corresponding physical address of the nonvolatile memory in association with each other. The second conversion table stores the logical address of the data and the corresponding physical address of the non-volatile memory in association with each other. The first processing means receives a command statement that is an instruction for operating the database, interprets the command statement, determines a database change content, and based on the database change content, the database content on the cache memory And the logical address corresponding to the changed contents of the database on the cache memory is associated with the physical address on the nonvolatile memory capable of storing the data of the changed contents, and the second Is received, and the second conversion table content is reflected in the first conversion table when an instruction indicating that the result of transaction processing is reflected in the database is received. The second processing means writes the changed contents of the database on the cache memory to the nonvolatile memory in the background.
以下、図面を参照して本発明の実施の形態に係るストレージ装置を説明する。
[0.用語の定義]
本明細書中で使用する用語の定義を述べる。
Hereinafter, a storage apparatus according to an embodiment of the present invention will be described with reference to the drawings.
[0. Definition of terms]
Definitions of terms used in this specification will be described.
[0.1.論物変換テーブル]
「論物変換テーブル」とは、論理アドレスをNAND型フラッシュメモリの物理アドレスに変換するためのテーブルをいう。
[0.1. Logical-physical conversion table]
The “logical / physical conversion table” is a table for converting a logical address into a physical address of a NAND flash memory.
[0.2.トランザクション]
「トランザクション」とは、データベースにおいて、一連の処理を一つの作業としてまとめて行う処理をいう。
[0.2. transaction]
A “transaction” refers to a process in which a series of processes are collectively performed as one work in a database.
[0.3.コミット]
「コミット」とは、トランザクション処理の結果をデータベースに反映する処理をいう。
[0.3. commit]
“Commit” refers to a process of reflecting the result of a transaction process in a database.
[0.4.ロールバック]
「ロールバック」とは、トランザクション処理の結果を取り消す処理をいう。
[0.4. roll back]
“Rollback” refers to a process of canceling the result of a transaction process.
[1.本発明の実施の形態]
本発明の実施の形態は、ストレージ装置として提案される。このストレージ装置は、論物変換テーブルを利用してトランザクション処理のコミットやロールバックを実現することで、処理時間を短縮する装置である。
[1. Embodiment of the Invention]
The embodiment of the present invention is proposed as a storage apparatus. This storage device is a device that shortens processing time by realizing transaction processing commit and rollback using a logical-physical conversion table.
ストレージ装置は、情報処理装置であって、この情報処理装置は、演算処理装置(CPU)、主メモリ(RAM)、読み出し専用メモリ(ROM)、入出力装置(I/O)、及び必要な場合にはハードディスク装置等の外部記憶装置を具備している装置である。 The storage device is an information processing device, and this information processing device includes an arithmetic processing unit (CPU), a main memory (RAM), a read-only memory (ROM), an input / output device (I / O), and when necessary Is a device having an external storage device such as a hard disk device.
[1.1.構成例]
本発明の実施の形態にかかるストレージ装置の構成について説明する。図1は、本実施の形態に係るストレージ装置の構成例を示す機能ブロック図である。なお、機能ブロック図中に示す構成要素は、ストレージ装置の機能を機能ごとにまとめてブロックとして捉えたものであり、ストレージ装置が各構成要素に対応する基板、装置、回路、部品などの物理的構成要素を備えていなければならないことを意味するわけではない。また、「接続されている」とは、データ、情報、命令などの送受信、受け取り、受け渡しなどが可能な状態になっていることをいい、互いに配線で連結されているような物理的な接続に限られる意味ではない。本明細書中の他の構成要素の機能ブロック図の説明についても同様である。
[1.1. Configuration example]
A configuration of the storage apparatus according to the embodiment of the present invention will be described. FIG. 1 is a functional block diagram showing a configuration example of the storage apparatus according to the present embodiment. Note that the components shown in the functional block diagram are the functions of the storage device that are grouped by function and regarded as a block. The storage device is a physical component such as a board, device, circuit, or component that corresponds to each component. It does not mean that it must have components. “Connected” means that data, information, instructions, etc. can be sent, received, delivered, etc. It is not limited. The same applies to the description of the functional block diagrams of the other components in this specification.
ストレージ装置1は、入出力装置10と、入出力装置10に接続されたデータベース処理部20と、データベース処理部20に接続された演算装置50と、演算装置50に接続されたデータ管理部60と、データベース処理部20及びデータ管理部60に接続された揮発性メモリ30と、データベース処理部20及びデータ管理部60に接続された不揮発性メモリ40とを有している。
The
データベース処理部20は、入出力装置10に接続された入出力部21と、入出力部21に接続されたコマンド解釈・処理部22と、コマンド解釈・処理部22に接続された保存・読み出し処理23とを有している。保存・読み出し処理23は不揮発性メモリ40に接続されており、不揮発性メモリ40へのデータ書き込み、不揮発性メモリ40からのデータ読み出しが可能である。
The
揮発性メモリ30は、キャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34と、トランザクション用論物変換テーブル35とを有している。
The
データベース処理部20は 、外部からの命令に応じて、データベースの読出し、追加、変更を行う機能を有する。なお、不揮発性メモリ40へのデータの書き込みは、データ管理部60が行い、データベース処理部20は揮発性メモリ30上のキャッシュデータ等の書き換えを行う。
The
入出力部21は、入出力装置10からデータベース操作に関する命令文を受け取り、当該命令文の処理結果を入出力装置10へ出力する機能を有する。
The input /
コマンド解釈・処理部22は入出力部21からデータベース操作に関する命令文を受け取り、この命令文を解釈して、データベースの変更内容を出力する機能を有する。
The command interpreting /
保存・読み出し処理23は、データベースの変更内容を、揮発性メモリ30上のキャッシュメモリ31と、消去済ページリスト32と、ブロック状態テーブル33と、論物変換テーブル34と、トランザクション用論物変換テーブル35とに反映させる機能を有する。
The save /
トランザクション用論物変換テーブル35は、一つのトランザクションの開始から終了までの間に生じた論理アドレスと物理アドレスの対応関係を記述したデータを保存する記憶領域である。 The transaction logical-physical conversion table 35 is a storage area for storing data describing the correspondence between logical addresses and physical addresses generated from the start to the end of one transaction.
ストレージ装置1のその他の構成要素は、図15に示した従来のストレージ装置1Aの構成要素と同様の機能を有する。同様の機能を有する構成要素には、同一の参照符号を付し、これらの機能の詳細な説明は省略する。なお、論物変換テーブル34は本実施の形態の第1の変換テーブルに相当し、トランザクション用論物変換テーブル35は本実施の形態の第2の変換テーブルに相当し、データベース処理部20は本実施の形態の第1の処理手段に相当し、データ管理部60は本実施の形態の第2の処理手段に相当する。
Other components of the
[2.動作例]
次に、ストレージ装置1の動作を説明する。
[2.1.ストレージ装置のトランザクション・コミット処理]
ストレージ装置1のトランザクション・コミット処理を説明する。図2は、ストレージ装置1のトランザクション・コミット処理の例を示すフロー図である。
[2. Example of operation]
Next, the operation of the
[2.1. Storage device transaction commit processing]
The transaction / commit processing of the
まず、ストレージ装置1に接続されたコンピュータ(図略)にBEGIN文が入力される(S1010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S1110)。 First, a BEGIN sentence is input to a computer (not shown) connected to the storage device 1 (S1010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S1110).
次に、ステップS1010に続いて、データベースへのコマンド文(処理命令文;INSERT, UPDATEなど)がストレージ装置1に接続されたコンピュータ(図略)に入力される(S1020)。これらの処理命令文に応じて、データベース処理部20、より詳しくは入出力部21が入出力装置10を介してコンピュータ(図略)から処理命令文を受信する。コマンド解釈・処理部22は、入出力部21から処理命令文を受け取り、この処理命令文を解釈してデータベースの変更内容を決定する。保存・読み出し処理23は、データベースの変更内容に基づいて、キャッシュメモリ31上のデータベースを更新する(S1120)。なお、データ管理部60は、その後、バックグラウンドで、キャッシュメモリ31上のデータベースに基づいて、不揮発性メモリ40へデータベースの内容を書き込む。なお、不揮発性メモリ40へデータベースの内容を書き込む場合の物理アドレスは、消去済ページリスト32の先頭から書込み先物理アドレス(物理ページ)を取得する 。
Next, following step S1010, a command statement (processing command statement; INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage apparatus 1 (S1020). In response to these processing command statements, the
また、データベース処理部20、より詳しくは保存・読み出し処理23は、キャッシュメモリ31、消去済ページリスト32、論物変換テーブル34を参照して、データベースの更新データに対応する論物変換情報をトランザクション用論物変換テーブル35に書き込む(S1120)。
Further, the
次にストレージ装置1に接続されたコンピュータ(図略)にCOMMIT文が入力される(S1030)。入力されたCOMMIT文は入出力装置10を介してデータベース処理部20、より詳しくは入出力部21に渡される。コマンド解釈・処理部22は、入出力部21からCOMMIT文を受け取り、このCOMMIT文に応じて保存・読み出し処理23にトランザクション用論物変換テーブル35の内容を論物変換テーブル34に反映させるよう命令を送る。この命令を受け取った保存・読み出し処理23はトランザクション用論物変換テーブル35の内容を論物変換テーブル34に反映させる(S1130)。
以上で、ストレージ装置1のトランザクション・コミット処理は終了する。
Next, a COMMIT sentence is input to a computer (not shown) connected to the storage apparatus 1 (S1030). The input COMMIT statement is passed to the
Thus, the transaction commit processing of the
[2.2.ストレージ装置のトランザクション・ロールバック処理]
ストレージ装置1のトランザクション・ロールバック処理を説明する。図3は、ストレージ装置1のトランザクション・ロールバック処理の例を示すフロー図である。
[2.2. Storage device transaction rollback processing]
A transaction rollback process of the
まず、ストレージ装置1に接続されたコンピュータ(図略)にBEGIN文が入力される(S2010)。これによりトランザクションが開始する。BEGIN文の入力に対して、データベース内部の動作は特に行われない(S2110)。 First, a BEGIN sentence is input to a computer (not shown) connected to the storage device 1 (S2010). This starts a transaction. In response to the input of the BEGIN statement, no internal operation is performed in the database (S2110).
次に、ステップS2010に続いて、データベースへの処理命令文(INSERT, UPDATEなど)がストレージ装置1に接続されたコンピュータ(図略)に入力される(S2020)。これらの処理命令文に応じて、データベース処理部20、より詳しくは入出力部21が入出力装置10を介してコンピュータ(図略)から処理命令文を受信する。コマンド解釈・処理部22は、入出力部21から処理命令文を受け取り、この処理命令文を解釈してデータベースの変更内容を決定する。保存・読み出し処理23は、データベースの変更内容に基づいて、キャッシュメモリ31上のデータベースを更新する(S2120)。なお、データ管理部60は、その後、バックグラウンドで、キャッシュメモリ31上のデータベースに基づいて、不揮発性メモリ40へデータベースの内容を書き込む。
Next, following step S2010, a processing command statement (INSERT, UPDATE, etc.) to the database is input to a computer (not shown) connected to the storage device 1 (S2020). In response to these processing command statements, the
また、データベース処理部20、より詳しくは保存・読み出し処理23は、キャッシュメモリ31、消去済ページリスト32、論物変換テーブル34を参照して、データベースの更新データに対応する論物変換情報をトランザクション用論物変換テーブル35に書き込む(S2120)。
Further, the
次にストレージ装置1に接続されたコンピュータ(図略)にROLLBACK文が入力される(S2030)。入力されたROLLBACK文は入出力装置10を介してデータベース処理部20、より詳しくは入出力部21に渡される。コマンド解釈・処理部22は、入出力部21からROLLBACK文を受け取り、このROLLBACK文に応じて保存・読み出し処理23にトランザクション用論物変換テーブル35の内容を削除するよう命令を送る。の命令を受け取った保存・読み出し処理23はトランザクション用論物変換テーブル35の内容を削除する(S2130)。
以上で、ストレージ装置1のトランザクション・ロールバック処理は終了する。
Next, a ROLLBACK statement is input to a computer (not shown) connected to the storage device 1 (S2030). The input ROLLBACK statement is passed to the
This completes the transaction rollback process of the
[2.3.トランザクション処理]
次に、ストレージ装置1のトランザクション処理について説明する。図4は、ストレージ装置1のトランザクション処理の例を示すフローチャートである。
[2.3. Transaction processing]
Next, transaction processing of the
トランザクション処理において、まずストレージ装置1はBEGIN文処理を実行する(S10)。図5に、BEGIN文処理の例を示すフローチャートを掲げる。BEGIN文処理では、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、BEGIN文の受け取りをトリガとして、トランザクション状態を「開始」にする(S110)。以上でBEGIN文処理は終了する。
In the transaction processing, first, the
図4に戻り、トランザクション処理の説明を続る。ステップS10に続いて、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、コマンド(命令文)入力を待ち受け、コマンド文入力を受信した場合には、当該コマンド文に応じた内容の処理(以下、「コマンド文処理」という)を実行する(S20)。図6に、コマンド文処理の例を示したフローチャートを掲げ、このフローチャートを参照しながらコマンド文処理を説明する。
Returning to FIG. 4, the description of the transaction processing will be continued. Subsequent to step S10, the
コマンド文処理において、ストレージ装置1、より詳しくはデータベース処理部20は、データ登録の要求であるINSERT文、或いはデータベース更新の要求であるUPDATE文を、入出力装置10及び入出力部21を介して受信する(S210)。
In command statement processing, the
ステップS210に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、受信した要求(INSERT文、或いはUPDATE文)を解釈し、書き込み先論理アドレスを決定する(S220)。
Subsequent to step S210, the
ステップS220に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、キャッシュメモリ31上に展開されたデータベースに、ステップS210で受信した要求に対応する登録データ、若しくは更新データを書き込む(S230)。なお、後に、不揮発性メモリ40の物理ページにキャッシュメモリ31上のデータがデータ管理部60によって書き込まれる。
Subsequent to step S220, the
ステップS230に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する(S240)。
ステップS240に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態であるか否かを判定する(S250)。
Subsequent to step S230, the
Subsequent to step S24O, the
トランザクション状態であると判定した場合(S250, Yes)、ストレージ装置1、より詳しくはデータベース処理部20は、ステップS220で決定した当該論理アドレスと、この論理アドレスに対応する物理アドレスを対応付けて、トランザクション用論物変換テーブル35に登録する(S260)。ステップS260に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、ブロック状態テーブル33において、ステップS240で取得した物理ページの状態を「消去済」から「有効」に変更する(S270)。ステップS270の後、ストレージ装置1、より詳しくはデータベース処理部20はコマンド文処理を終了する。
When it is determined that the transaction state is established (S250, Yes), the
一方、ステップS250においてトランザクション状態ではないと判定した場合(S250, No)、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34にステップS220で決定した当該論理アドレスに対応する物理アドレスを登録する(S280)。
On the other hand, if it is determined in step S250 that the transaction state is not established (S250, No), the
ステップS280に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に、以前登録されていた物理アドレスに対応するブロック状態テーブル33のページの状態情報を「有効」から「無効」に変更する(S290)。なお、ページの状態情報を「有効」から「無効」に変更するのは、以前登録されていた物理アドレスが有効値の場合のみである。
Subsequent to step S280, the
ステップS290に続いて、ストレージ装置1、より詳しくはデータベース処理部20は前述のステップS270に進みコマンド文処理を続行する。
以上でコマンド文処理の説明を終了する。
Subsequent to step S290, the
This is the end of the description of command statement processing.
図4に戻りトランザクション処理の説明を続る。ステップS20に続いて、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、コマンド入力が完了したか否かを判定する(S30)。具体的には、直近に受信したコマンド文がCOMMIT文若しくはROLLBACK文であるか否かを判定する。
Returning to FIG. 4, the description of the transaction processing will be continued. Subsequent to step S20, the
ステップS30において、コマンド入力が完了していないと判定した場合(S30, No)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、ステップS20に戻り、次のコマンド文入力を待ち受ける。
If it is determined in step S30 that the command input has not been completed (S30, No), the
一方、ステップS30において、コマンド入力は完了したと判定した場合(S30, Yes)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、トランザクション開始後の一連のコマンド文入力の内容に応じて、データベースに反映させるか否かを判定する(S40)。具体的には、直近に入力されたコマンド文がCOMMIT文である場合、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、データベースに反映させると判定する。一方、直近に入力されたコマンド文がROLLBACK文である場合、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、データベースに反映させないと判定する。
On the other hand, if it is determined in step S30 that the command input has been completed (S30, Yes), the
ステップS40においてデータベースに反映させると判定した場合(S40, Yes)、ストレージ装置1、より詳しくはデータベース処理部20は、COMMIT処理を実行する。図7に、COMMIT処理の一例を示すフローチャートを掲げる。COMMIT処理において、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に、トランザクション用論物変換テーブル35の内容を反映(転記)し、その後トランザクション用論物変換テーブル35の内容を空 (削除)にする(S310)。
When it is determined in step S40 that the data is to be reflected in the database (S40, Yes), the
ステップS310に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34に以前登録されていた物理アドレスに対応する、ブロック状態テーブル33のページの状態を、「有効」から「無効」に変更する(S320;以前登録されていた物理アドレスが有効な値の場合)。
ステップS320に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を終了する(S330)。
以上で、COMMIT処理は終了する。
Subsequent to step S310, the
Subsequent to step S320, the
This completes the COMMIT process.
図4に戻り、トランザクション処理の説明を続る。ステップS40においてデータベースに反映させないと判定した場合(S40, No)、ストレージ装置1、より詳しくはデータベース処理部20及びデータ管理部60は、ROLLBACK処理を実行する(S50)。図8に、ROLLBACK処理の一例を示すフローチャートを掲げる。ROLLBACK処理において、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35を空にする(S410)。
Returning to FIG. 4, the description of the transaction processing will be continued. When it is determined in step S40 that the data is not reflected in the database (S40, No), the
ステップS410に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に登録されていた物理アドレスに対応する、ブロック状態テーブル33のページの状態を、「有効」から「無効」に変更する(S420)。
ステップS420に続いて、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を終了する(S430)。
以上で、ROLLBACK処理は終了する。
Subsequent to step S410, the
Subsequent to step S420, the
This completes the ROLLBACK process.
図4に戻り、トランザクション処理の説明を続る。ステップS50のCOMMIT処理、又はステップS60のROLLBACK処理を実行した後、ストレージ装置1、より詳しくはデータベース処理部20はトランザクション処理を終了する。
以上でトランザクション処理の説明を終了する。
Returning to FIG. 4, the description of the transaction processing will be continued. After executing the COMMIT process in step S50 or the ROLLBACK process in step S60, the
This is the end of the description of the transaction process.
[2.4.トランザクション処理におけるトランザクション用論物変換テーブル等の書き換え]
上述したトランザクション処理(S10〜S60)におけるトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容の書き換えの例を述べる。
[2.4. Rewrite transaction logical / physical conversion table in transaction processing]
An example of rewriting the storage contents of the transaction logical / physical conversion table 35, logical / physical conversion table 34, and nonvolatile memory in the transaction processing (S10 to S60) described above will be described.
[2.4.1.トランザクション処理前]
図9に、トランザクション処理前のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリ40の記憶内容例を示す。トランザクション処理前において、図9に示す論物変換テーブル34は、論理アドレス「0」、論理アドレス「1」、論理アドレス「2」、論理アドレス「3」のそれぞれに対応するレコードを有している。論理アドレス「0」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「1」のページ「0」を記憶している。また、論理アドレス「1」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「2」のページ「1」を記憶している。論理アドレス「2」に対応するレコードは、対応する物理アドレスとして、不揮発性メモリ40のブロック「1」のページ「2」を記憶している。論理アドレス「3」に対応するレコードは、対応する物理アドレスとしてブロック「4」のページ「0」を記憶している。論物変換テーブル34の各レコードと、不揮発性メモリ40のブロック及びページとの対応関係を図中の矢印線で示す。
[2.4.1. Before transaction processing]
FIG. 9 shows an example of storage contents of the transaction logical-physical conversion table 35, the logical / physical conversion table 34, and the
トランザクション処理前の時点では、トランザクション用論物変換テーブル35は、論理アドレスと物理アドレスとの対応関係はまだ記憶されていない。 At the time before the transaction processing, the transaction logical-physical conversion table 35 has not yet stored the correspondence between the logical address and the physical address.
[2.4.2.トランザクション処理開始後(1)]
図9に示した状態の後、ストレージ装置1が以下のコマンド文(SQL文)を受け取ったものとする。
BEGIN;
UPDATE table1 SET x1=n WHERE id=m;
[2.4.2. After starting transaction processing (1)]
Assume that the
BEGIN;
UPDATE table1 SET x1 = n WHERE id = m;
上記BEGIN文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、トランザクション状態を開始するとともに、これに続くUPDATE文の内容を解釈して、書込み先論理アドレスを決定し、キャッシュメモリ31に更新データを書き込む。この例では、書込み先論理アドレスは「1」であるものとする。
The
次にストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する。この例では、消去済ページリスト32の先頭には、ブロック「3」のページ「0」が記述されているものとする。
Next, the
上記に続いてストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に前記書込み先論理アドレス「1」と、これに対応する物理アドレスである不揮発性メモリ40のブロック「3」のページ「0」を登録する。図10にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
Subsequent to the above, the
ストレージ装置1、より詳しくはデータ管理部60は、上記処理のバックグラウンドで不揮発性メモリ40のブロック「3」のページ「0」に、論理アドレス「1」に対応するキャッシュメモリ31の更新データを書き込む処理を行う。
The
[2.4.3.トランザクション処理開始後(2)]
図10に示した状態の後、ストレージ装置1がさらに以下のコマンド文(SQL文)を受け取ったものとする。
UPDATE table1 SET x2=n WHERE id=b;
[2.4.3. After transaction processing starts (2)]
Assume that the
UPDATE table1 SET x2 = n WHERE id = b;
上記UPDATE文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、このUPDATE文の内容を解釈して、書込み先論理アドレスを決定し、キャッシュメモリ31に更新データを書き込む。この例では、書込み先論理アドレスは「2」であるものとする。
The
次にストレージ装置1、より詳しくはデータベース処理部20は、消去済ページリスト32の先頭から書き込み先物理ページを取得する。この例では、消去済ページリスト32の先頭には、ブロック「4」のページ「2」が記述されているものとする。
Next, the
上記に続いてストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に前記書込み先論理アドレス「2」と、これに対応する物理アドレスである不揮発性メモリ40のブロック「4」のページ「2」を新たに登録する。図11にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
Following the above, the
ストレージ装置1、より詳しくはデータ管理部60は、上記処理のバックグラウンドで不揮発性メモリ40のブロック「4」のページ「2」に、論理アドレス「2」に対応するキャッシュメモリ31の更新データを書き込む処理を行う。
The
[2.4.4.トランザクション処理開始後(3)]
図11に示した状態の後、ストレージ装置1がさらにコマンド文(SQL文)であるCOMMIT文を受け取ったものとする。
[2.4.4. After starting transaction processing (3)]
Assume that after the state shown in FIG. 11, the
上記COMMIT文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、論物変換テーブル34へトランザクション用論物変換テーブル35の内容を書き込む。この例では、ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれている論理アドレス「1」に対応するブロック「3」、ページ番号「0」を、論物変換テーブル34の論理アドレス「1」に対応するブロック番号及びページ番号として書込み、トランザクション用論物変換テーブル35に書き込まれている論理アドレス「2」に対応するブロック「4」、ページ番号「2」を論物変換テーブル34の論理アドレス「1」に対応するブロック番号及びページ番号として書込む。
The
なお、不揮発性メモリ40へのデータの書き込みは、バックグラウンドでデータ管理部60が各コマンド文受領ごとに事前に実行しているため、COMMIT文を受け取った時点で新たに開始する不揮発性メモリ40への書込みは発生しない。
ストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれているデータをすべて削除する。
図12にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
Note that the data writing to the
The
FIG. 12 shows an example of storage contents of the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.
[2.4.5.トランザクション処理開始後(4)]
図11に示した状態の後、ストレージ装置1がさらにコマンド文(SQL文)であるROLLBACK文を受け取った場合の動作を説明する。
[2.4.5. After starting transaction processing (4)]
The operation when the
ROLLBACK文を受け取ったストレージ装置1、より詳しくはデータベース処理部20は、トランザクション用論物変換テーブル35に書き込まれているデータをすべて削除する。なお、不揮発性メモリ40への更新データ、追加データの書き込みは、バックグラウンドでデータ管理部60が各コマンド文受領ごとに事前に実行しているが、論物変換テーブル34が指示しているブロック番号及びページ番号は、更新データ、追加データの書き込みが行われる前の内容のブロック番号及びページ番号であるため、不揮発性メモリ40への削除・書き換えを行う必要はない。
図13にこの時点の状態のトランザクション用論物変換テーブル35、論物変換テーブル34、不揮発性メモリの記憶内容例を示す。
The
FIG. 13 shows an example of storage contents of the transaction logical-physical conversion table 35, logical-physical conversion table 34, and nonvolatile memory in this state.
[3.利点]
(1) 本実施の形態にかかるストレージ装置1によれば、トランザクション処理を、コミットおよびロールバック共、高速に実行することができる。
[3. advantage]
(1) According to the
コミットおよびロールバック時点で、揮発性メモリの変更のみの場合、従来手法では、数百μs以上(NANDに保存する場合)が必要であるのに対して、本実施の形態にかかるストレージ装置1では、数μs以下(DRAMの場合)で完了する。
In the case of only changing the volatile memory at the time of commit and rollback, the conventional method requires several hundred μs or more (when stored in NAND), whereas the
図14(A)に従来手法によるトランザクション処理のシーケンス図を示し、図14(B)に本実施の形態にかかるストレージ装置1によるトランザクション処理のシーケンス図を示して比較する。
FIG. 14A shows a sequence diagram of transaction processing according to the conventional method, and FIG. 14B shows a sequence diagram of transaction processing by the
図14(A)に示すように、従来手法によるトランザクション処理では、UPDATE文、INSERT文に応じてキャッシュメモリ31を更新し、その後COMMIT文の処理開始から、不揮発性メモリ40への更新データ、追加データ等の書き込みが行われる。
As shown in FIG. 14A, in the transaction processing according to the conventional method, the
一方、図14(B)に示すように、本実施の形態にかかるストレージ装置1によるトランザクション処理では、UPDATE文、INSERT文に応じてキャッシュメモリ31を更新するとともに、不揮発性メモリ40への書き込みをバックグラウンドで実行する。また、COMMIT文の処理時ではキャッシュメモリ31上の論物変換テーブル34の書き換えのみで処理を終えることができる。すなわち、従来手法ではCOMMITまで不揮発性メモリ40への書き込みが行えなかったが、本実施の形態にかかるストレージ装置1は 裏(バックグラウンド)で不揮発性メモリ40の更新を行うため、トランザクション処理時間短縮が可能となる。
On the other hand, as shown in FIG. 14B, in the transaction processing by the
(2) 本実施の形態にかかるストレージ装置1によれば、揮発性メモリの使用量を少なく抑えることができるため、揮発性メモリ量に制約がある場合に有効である。
(2) According to the
従来手法においては、レコードサイズ×件数分のメモリ使用量が必要であるのに対して、本実施の形態にかかるストレージ装置1では、論物変換テーブルの1エントリサイズ×件数分のメモリ使用量で足りる。
In the conventional method, the memory usage corresponding to the record size × the number of cases is necessary, whereas in the
例をあげると、100バイト×10,000件、論物変換テーブル34の1エントリサイズ=4バイトとすると、必要な揮発性メモリ量は、従来手法では100×10,000 = 1,000Kバイトとなるのに対して、本実施の形態にかかるストレージ装置1では、4×10,000 = 40Kバイトとなり、大幅にメモリ使用量を低減させることが可能である。
For example, if 100 bytes x 10,000 and 1 entry size of the logical-physical conversion table 34 = 4 bytes, the required amount of volatile memory is 100 x 10,000 = 1,000 Kbytes in the conventional method. In the
[4.まとめ、その他]
以上、本発明の実施の形態を説明したが、本発明はこれらに限定されるものではなく、発明の趣旨を逸脱しない範囲内において、種々の変更、追加、組み合わせ等が可能である。
[4. Summary, etc.]
As mentioned above, although embodiment of this invention was described, this invention is not limited to these, A various change, addition, a combination, etc. are possible in the range which does not deviate from the meaning of invention.
1,1A・・・ストレージ装置; 10・・・入出力装置; 20・・・データベース処理部; 30、30A・・・揮発性メモリ; 40・・・不揮発性メモリ; 50・・・演算装置; 60・・・データ管理部;
1, 1A ... Storage device; 10 ... I / O device; 20 ... Database processing unit; 30, 30A ... Volatile memory; 40 ... Non-volatile memory; 60: Data management department;
Claims (2)
前記データベースを一時的に記憶するキャッシュメモリと、
前記不揮発性メモリにおける書き込み可能なページの物理アドレスを記憶する消去済ページリストと、
前記不揮発性メモリにおける各ブロックのページの状態を管理するデータを保存するブロック状態テーブルと、
データの論理アドレスと、これに対応する前記不揮発性メモリの物理アドレスを対応付けて記憶する第1の変換テーブルと、
データの論理アドレスと、これに対応する前記不揮発性メモリの物理アドレスを対応付けて記憶する第2の変換テーブルと、
前記データベースを操作する命令であるコマンド文を受け取り、このコマンド文を解釈してデータベースの変更内容及び前記データの論理アドレスを決定し、前記データベースの変更内容に基づいて、前記キャッシュメモリ上のデータベースの内容を変更し、前記消去済ページリストから前記不揮発性メモリにおける書き込み先物理アドレスを取得し、前記キャッシュメモリ上のデータベースの変更された内容に対応する論理アドレスと、前記書き込み先物理アドレスと、を対応付けて、前記第2の変換テーブルに書き込み、トランザクション処理の結果をデータベースに反映させることを意味する命令を受け取ると、前記第2の変換テーブルの内容を前記第1の変換テーブルに反映させ、前記ブロック状態テーブルにおいて、前記書き込み先物理アドレスに対応するページの状態を有効とし、前記データベースの変更元の物理アドレスに対応するページの状態を無効とする第1の処理手段と、
前記キャッシュメモリ上のデータベースの変更された内容を、前記不揮発性メモリの前記書き込み先物理アドレスへバックグラウンドで書き込む第2の処理手段と
を有するストレージ装置。 Non-volatile memory for storing the database;
A cache memory for temporarily storing the database;
An erased page list for storing a physical address of a writable page in the nonvolatile memory;
A block state table for storing data for managing the state of the page of each block in the nonvolatile memory;
A first conversion table for storing a logical address of data and a physical address of the nonvolatile memory corresponding to the logical address;
A second conversion table for storing a logical address of data and a physical address of the nonvolatile memory corresponding to the logical address;
Receives a command statement is a command for operating the database, interprets the command statement to determine the logical address of the changes and the data in the database, based on the changes of the database, the database on the cache memory Changing the contents, obtaining a write destination physical address in the nonvolatile memory from the erased page list, and a logical address corresponding to the changed contents of the database on the cache memory, and the write destination physical address , association with, writing to the second conversion table, receives an instruction means to reflect the results of the transaction processing to the database, the contents of the second conversion table is reflected in the first conversion table, In the block state table, the write And enable the state of the page corresponding to the physical address, the first processing means shall be the disable state of the page corresponding to the change source physical address of said database,
Second processing means for writing the changed contents of the database on the cache memory in the background to the write destination physical address of the nonvolatile memory;
A storage device.
請求項1に記載のストレージ装置。 When the first processing means receives an instruction meaning to cancel the transaction processing result, the second conversion table is not reflected in the first conversion table without reflecting the contents of the second conversion table. revoke the content, in the block state table, the disable state of the page corresponding to the write destination physical address
The storage apparatus according to claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013244857A JP6289883B2 (en) | 2013-11-27 | 2013-11-27 | Storage device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013244857A JP6289883B2 (en) | 2013-11-27 | 2013-11-27 | Storage device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015103147A JP2015103147A (en) | 2015-06-04 |
JP6289883B2 true JP6289883B2 (en) | 2018-03-07 |
Family
ID=53378768
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013244857A Expired - Fee Related JP6289883B2 (en) | 2013-11-27 | 2013-11-27 | Storage device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6289883B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6293709B2 (en) * | 2015-07-22 | 2018-03-14 | 株式会社東芝 | Storage system and storage system program |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6957236B1 (en) * | 2002-05-10 | 2005-10-18 | Oracle International Corporation | Providing a useable version of a data item |
US7752382B2 (en) * | 2005-09-09 | 2010-07-06 | Sandisk Il Ltd | Flash memory storage system and method |
US8103822B2 (en) * | 2009-04-26 | 2012-01-24 | Sandisk Il Ltd. | Method and apparatus for implementing a caching policy for non-volatile memory |
US9104690B2 (en) * | 2011-01-27 | 2015-08-11 | Micron Technology, Inc. | Transactional memory |
-
2013
- 2013-11-27 JP JP2013244857A patent/JP6289883B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2015103147A (en) | 2015-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI670594B (en) | Data storage device | |
JP4524309B2 (en) | Memory controller for flash memory | |
US9697116B2 (en) | Storage system and writing method thereof | |
TWI531963B (en) | Data storage systems and their specific instruction enforcement methods | |
KR102275563B1 (en) | Host-managed non-volatile memory | |
US20110208898A1 (en) | Storage device, computing system, and data management method | |
JP2011253251A (en) | Data storage device and data writing method | |
WO2017025039A1 (en) | Flash storage oriented data access method and device | |
TW202001573A (en) | Memory system | |
TWI671631B (en) | Memory management method and storage controller | |
JP4745465B1 (en) | Semiconductor memory device and method for controlling semiconductor memory device | |
KR20140094278A (en) | Semiconductor apparatus and method of operating the same | |
JP2018504692A (en) | Transaction processing method and apparatus, and computer system | |
WO2017113059A1 (en) | Discrepant data backup method, storage system and discrepant data backup device | |
JP2010287049A (en) | Memory system and memory system management method | |
KR20210050592A (en) | Error checking in namespaces on storage devices | |
EP3385846B1 (en) | Method and device for processing access request, and computer system | |
TWI640864B (en) | Two stage command buffers to overlap iommu map and second tier memory reads | |
US20140219041A1 (en) | Storage device and data processing method thereof | |
US20210026763A1 (en) | Storage device for improving journal replay, operating method thereof, and electronic device including the storage device | |
KR20200056533A (en) | Storage device for performing map scheduling and electronic device including the same | |
TW201734793A (en) | Memory management method, memory control circuit unit and memory storage device | |
JP4242245B2 (en) | Flash ROM control device | |
US20140218767A1 (en) | Image forming apparatus, memory management method for image forming apparatus, and program | |
KR20100121389A (en) | Storage device based on a flash memory and user device including the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160921 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170524 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170613 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170810 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180109 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180207 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 6289883 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
LAPS | Cancellation because of no payment of annual fees |