TW201939284A - Mapping table management method applied to solid state storage device - Google Patents

Mapping table management method applied to solid state storage device Download PDF

Info

Publication number
TW201939284A
TW201939284A TW107108917A TW107108917A TW201939284A TW 201939284 A TW201939284 A TW 201939284A TW 107108917 A TW107108917 A TW 107108917A TW 107108917 A TW107108917 A TW 107108917A TW 201939284 A TW201939284 A TW 201939284A
Authority
TW
Taiwan
Prior art keywords
control circuit
correspondence table
volatile memory
storage device
state storage
Prior art date
Application number
TW107108917A
Other languages
Chinese (zh)
Other versions
TWI704454B (en
Inventor
莊森銘
蔡名峻
蘇哲蔚
Original Assignee
大陸商光寶電子(廣州)有限公司
光寶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商光寶電子(廣州)有限公司, 光寶科技股份有限公司 filed Critical 大陸商光寶電子(廣州)有限公司
Priority to TW107108917A priority Critical patent/TWI704454B/en
Publication of TW201939284A publication Critical patent/TW201939284A/en
Application granted granted Critical
Publication of TWI704454B publication Critical patent/TWI704454B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A mapping table management method applied to solid state storage device is provided. The method includes steps of: when a write command is received by a control circuit, the control circuit storing write data to a non-volatile memory and updating a mapping table in a DRAM; when a power down command is received by the control circuit, the control circuit storing the entire mapping table to the non-volatile memory; and when an update requirement is met judged by the control circuit, the control circuit storing a portion of the mapping table to the non-volatile memory.

Description

固態儲存裝置的對應表管理方法Correspondence table management method for solid-state storage device

本發明是有關於一種固態儲存裝置的處理方法,且特別是有關於一種固態儲存裝置的對應表(mapping table)管理方法。The invention relates to a processing method of a solid-state storage device, and in particular, to a mapping table management method of a solid-state storage device.

眾所周知,固態儲存裝置 (Solid State Storage Device) 已經非常廣泛的應用於各種電子產品,例如SD卡、固態硬碟等等。固態儲存裝置中包括一非揮發性記憶體(non-volatile memory)。當資料寫入非揮發性記憶體後,一旦系統電源關閉,資料仍保存在非揮發性記憶體中。As we all know, Solid State Storage Device (Solid State Storage Device) has been widely used in various electronic products, such as SD card, solid state hard disk, and so on. The solid-state storage device includes a non-volatile memory. After the data is written into the non-volatile memory, once the system power is turned off, the data is still stored in the non-volatile memory.

請參照第1圖,其所繪示為習知固態儲存裝置示意圖。固態儲存裝置100的控制電路10經由一外部匯流排110連接至主機(host)150,其中外部匯流排110可為USB匯流排、SATA匯流排、PCIe匯流排、M.2匯流排或者U.2匯流排等等。Please refer to FIG. 1, which is a schematic diagram of a conventional solid-state storage device. The control circuit 10 of the solid-state storage device 100 is connected to the host 150 via an external bus 110. The external bus 110 may be a USB bus, a SATA bus, a PCIe bus, an M.2 bus, or a U.2. Busbars and more.

再者,固態儲存裝置100包括:控制電路10、動態隨機存取記憶體(DRAM)30以及非揮發性記憶體20。其中,控制電路10連接至非揮發性記憶體20與DRAM 30。Furthermore, the solid-state storage device 100 includes a control circuit 10, a dynamic random access memory (DRAM) 30, and a non-volatile memory 20. The control circuit 10 is connected to the non-volatile memory 20 and the DRAM 30.

一般來說,主機150與控制電路10之間以邏輯區塊位址(Logical Block Address,以下簡稱LBA位址)來存取資料。而控制電路10與非揮發性記憶體20之間以實體配置位址(Physical Allocation Address,以下簡稱PAA位址)來存取資料。Generally, the host 150 and the control circuit 10 access data using a logical block address (Logical Block Address, hereinafter referred to as an LBA address). The control circuit 10 and the non-volatile memory 20 use a physical allocation address (Physical Allocation Address, hereinafter referred to as a PAA address) to access data.

因此,固態儲存裝置100的DRAM 30中會儲存一對應表(mapping table)32用來作為LBA位址與PAA位置之間的對應關係。此對應表32又稱為邏輯至實體位址對應表(Logical-to-Physical address mapping table)。以下介紹對應表32的運作原理。Therefore, a mapping table 32 is stored in the DRAM 30 of the solid-state storage device 100 to serve as a correspondence relationship between the LBA address and the PAA location. This correspondence table 32 is also referred to as a logical-to-physical address mapping table. The operation principle of the correspondence table 32 is described below.

當主機150要將資料寫入固態儲存裝置100時,主機150會發出寫入指令至固態儲存裝置100。此時,寫入指令中包括LBA位址以及寫入資料。接著,控制電路10在DRAM 30的對應表32中記錄LBA位址與PAA位址之間的對應關係,並將寫入資料儲存於非揮發性記憶體中PAA位址的儲存空間。When the host 150 writes data into the solid-state storage device 100, the host 150 sends a write instruction to the solid-state storage device 100. At this time, the write command includes the LBA address and the write data. Next, the control circuit 10 records the correspondence between the LBA address and the PAA address in the correspondence table 32 of the DRAM 30, and stores the written data in the storage space of the PAA address in the non-volatile memory.

當主機150欲由固態儲存裝置100中讀取資料時,則主機150發出讀取指令,且讀取指令中包括LBA位址。當控制電路10接收到讀取指令時,即根據LBA位址於對應表32中找到PAA位址。之後,控制電路10由非揮發性記憶體20中PAA位址的儲存空間中獲得讀取資料,並傳遞至主機150。When the host 150 wants to read data from the solid-state storage device 100, the host 150 sends a read command, and the read command includes an LBA address. When the control circuit 10 receives the read instruction, it finds the PAA address in the corresponding table 32 according to the LBA address. After that, the control circuit 10 obtains the read data from the storage space of the PAA address in the non-volatile memory 20 and transfers the read data to the host 150.

由以上的說明可知,當固態儲存裝置100在寫入資料時,控制電路10必須同步記錄對應表32,使得控制電路10能掌握儲存在非揮發性記憶體20中所有的寫入資料,並且有效地進行資料的管理。It can be known from the above description that when the solid-state storage device 100 is writing data, the control circuit 10 must simultaneously record the correspondence table 32 so that the control circuit 10 can grasp all the written data stored in the non-volatile memory 20 and is effective Management of data.

由於對應表32儲存於DRAM 30中,且一旦系統電源關閉,儲存於DRAM 30中的資料便會消失,因此當固態儲存裝置100收到關機指令(power down command)時,控制電路10必須先將對應表32儲存至非揮發性記憶體20之後才可以關閉電源。Since the correspondence table 32 is stored in the DRAM 30, and the data stored in the DRAM 30 will disappear once the system power is turned off, when the solid-state storage device 100 receives a power down command, the control circuit 10 must first After the mapping table 32 is stored in the non-volatile memory 20, the power can be turned off.

當固態儲存裝置100再次被供電時,控制電路10必須先將非揮發性記憶體20中的對應表載入(load)DRAM 30後,固態儲存裝置100才可正常運作。When the solid-state storage device 100 is powered again, the control circuit 10 must load the corresponding table in the non-volatile memory 20 into the DRAM 30 before the solid-state storage device 100 can operate normally.

由以上的說明可知,DRAM 30中的對應表32記錄了LBA位址與PAA位址之間的對應關係。As can be seen from the above description, the correspondence table 32 in the DRAM 30 records the correspondence relationship between the LBA address and the PAA address.

然而,如果固態儲存裝置100正常運作並存取了許多資料後,供應至固態儲存裝置100的電力突然斷電,則DRAM 30中對應表32的資料皆會被刪除。However, if the solid-state storage device 100 operates normally and accesses a lot of data, and the power supplied to the solid-state storage device 100 is suddenly cut off, the data of the corresponding table 32 in the DRAM 30 will be deleted.

如此,當固態儲存裝置100再次被供電時,控制單元10僅能由非揮發性記憶體20中載入舊的對應表至DRAM 30。接著,控制電路10必須搜尋(search)非揮發性記憶體20內的所有儲存空間,並逐步修改並重建對應表32。In this way, when the solid-state storage device 100 is powered again, the control unit 10 can only load the old correspondence table from the non-volatile memory 20 into the DRAM 30. Next, the control circuit 10 must search all the storage spaces in the non-volatile memory 20, and gradually modify and rebuild the correspondence table 32.

當控制電路10搜尋完非揮發性記憶體20內的所有儲存空間後,對應表32即重建(rebuild)完成,而固態儲存裝置100才可正常運作。然而,上述的對應表32重建會耗費相當長的時間。After the control circuit 10 searches all the storage spaces in the non-volatile memory 20, the corresponding table 32 is rebuilt, and the solid-state storage device 100 can operate normally. However, the reconstruction of the correspondence table 32 described above takes a considerable time.

本發明有關於一種固態儲存裝置的對應表管理方法,該固態儲存裝置包括一控制電路、一動態隨機存取記憶體與一非揮發性記憶體,該對應表管理方法包括下列步驟:當該控制電路接收到一寫入指令時,控制電路將寫入資料儲存至該非揮發性記憶體,並更新該動態隨機存取記憶體中的一對應表;當該控制電路收到一關機指令時,該控制電路將該動態隨機存取記憶體中完整的該對應表儲存至該非揮發性記憶體;以及當該控制電路判斷出符合一更新條件時,該控制電路將該動態隨機存取記憶體中一部分的該對應表儲存至該非揮發性記憶體。The invention relates to a correspondence table management method for a solid-state storage device. The solid-state storage device includes a control circuit, a dynamic random access memory, and a non-volatile memory. The correspondence table management method includes the following steps: when the control When the circuit receives a write command, the control circuit stores the write data into the non-volatile memory and updates a corresponding table in the dynamic random access memory; when the control circuit receives a shutdown command, the control circuit The control circuit stores the complete correspondence table in the dynamic random access memory to the non-volatile memory; and when the control circuit determines that an update condition is met, the control circuit stores a part of the dynamic random access memory The corresponding table is stored in the non-volatile memory.

為了對本發明之上述及其他方面有更佳的瞭解,下文特舉實施例,並配合所附圖式詳細說明如下:。In order to have a better understanding of the above and other aspects of the present invention, the embodiments are exemplified below and described in detail with the accompanying drawings as follows:

請參照第2圖,其所繪示為本發明第一實施例之對應表管理方法。基本上,第一實施例所揭露之對應表管理方法係運用於第1圖之固態儲存裝置100,此處不再贅述固態儲存裝置的結構。Please refer to FIG. 2, which illustrates a correspondence table management method according to the first embodiment of the present invention. Basically, the correspondence table management method disclosed in the first embodiment is applied to the solid-state storage device 100 in FIG. 1, and the structure of the solid-state storage device is not described here again.

於固態儲存裝置100正常運作時,當控制電路10接收到主機150的寫入指令時,控制電路10除了將寫入資料儲存至非揮發性記憶體20之外,也會同步地記錄DRAM 30中的對應表32。During the normal operation of the solid-state storage device 100, when the control circuit 10 receives a write command from the host 150, the control circuit 10 will simultaneously record the written data in the DRAM 30 in addition to storing the written data in the non-volatile memory 20. The corresponding table 32.

根據本發明的第一實施例,當固態儲存裝置100正常運作且未收到關機指令(步驟S210)時,控制電路10會判斷是否符合更新條件(步驟S320)。當控制電路10判斷已經符合更新條件(步驟S230)時,控制電路10將DRAM 30中完整對應表32儲存至非揮發性記憶體20(步驟S240)。反之,當控制電路10判斷出尚未符合更新條件(步驟S230)時,則回到步驟S210。According to the first embodiment of the present invention, when the solid-state storage device 100 is operating normally and no shutdown instruction is received (step S210), the control circuit 10 determines whether the update condition is met (step S320). When the control circuit 10 determines that the update conditions have been met (step S230), the control circuit 10 stores the complete correspondence table 32 in the DRAM 30 to the non-volatile memory 20 (step S240). Conversely, when the control circuit 10 determines that the update condition has not been met (step S230), it returns to step S210.

舉例來說,控制電路10可預設10Mbyte的資料量作為更新條件的判斷基準。具體而言,控制電路10會持續計算儲存到非揮發性記憶體20中寫入資料的資料總量,當寫入資料的資料總量到達預設資料量的整數倍時,即代表符合更新條件。此時,控制電路10將DRAM 30中完整對應表32儲存至非揮發性記憶體20。For example, the control circuit 10 may preset a data amount of 10 Mbyte as a judgment criterion for the update condition. Specifically, the control circuit 10 continuously calculates the total amount of data stored in the non-volatile memory 20. When the total amount of data written in the data reaches an integer multiple of the preset data amount, it means that the update conditions are met. . At this time, the control circuit 10 stores the complete correspondence table 32 in the DRAM 30 to the non-volatile memory 20.

換句話說,當儲存的寫入資料到達10Mbytes的整數倍(亦即,10Mbyte、20Mbytes、30Mbytes…)時,控制電路10即將DRAM 30中完整對應表32儲存至非揮發性記憶體20。反之,當儲存的寫入資料未到達10Mbytes的整數倍時,控制電路10僅繼續計算寫入資料的資料總量,不會將DRAM 30中的對應表32儲存至非揮發性記憶體20。In other words, when the stored write data reaches an integer multiple of 10 Mbytes (ie, 10 Mbyte, 20 Mbytes, 30 Mbytes ...), the control circuit 10 stores the complete correspondence table 32 in the DRAM 30 to the non-volatile memory 20. Conversely, when the stored written data does not reach an integer multiple of 10 Mbytes, the control circuit 10 only continues to calculate the total amount of data written, and does not store the corresponding table 32 in the DRAM 30 to the non-volatile memory 20.

當然,如果固態儲存裝置100接收到關機指令(步驟S210)時,控制電路10則直接將DRAM 30中完整的對應表32儲存至非揮發性記憶體(步驟S220)。之後,固態儲存裝置100即可被關機。Of course, if the solid-state storage device 100 receives the shutdown command (step S210), the control circuit 10 directly stores the complete correspondence table 32 in the DRAM 30 to the non-volatile memory (step S220). After that, the solid-state storage device 100 can be turned off.

固態儲存裝置100在正常運作的過程,DRAM 30中的對應表32會不斷地被更新。而由以上的說明可知,本發明的固態儲存裝置100在正常運作的過程,會將DRAM 30中更新的對應表32儲存至非揮發性記憶體20中。因此,當固態儲存裝置100發生不正常的斷電時,非揮發性記憶體20中可儲存有較新的對應表。During the normal operation of the solid-state storage device 100, the correspondence table 32 in the DRAM 30 is continuously updated. It can be known from the above description that during the normal operation of the solid-state storage device 100 of the present invention, the updated correspondence table 32 in the DRAM 30 is stored in the non-volatile memory 20. Therefore, when the solid-state storage device 100 is abnormally powered off, a newer correspondence table may be stored in the non-volatile memory 20.

如此,當固態儲存裝置100再次被供電時,控制單元10可載入斷電之前儲存於非揮發性記憶體20中最新的對應表至DRAM 30中。接著,控制電路10再根據此最新的對應表32來重建(rebuild)正確的對應表。由於最新的對應表32需修改的部分相對較少,因此可有效地縮短重建對應表32的時間。In this way, when the solid-state storage device 100 is powered again, the control unit 10 can load the latest correspondence table stored in the non-volatile memory 20 before the power-off to the DRAM 30. The control circuit 10 then rebuilds the correct correspondence table based on the latest correspondence table 32. Since there are relatively few parts to be modified in the latest correspondence table 32, the time for rebuilding the correspondence table 32 can be effectively reduced.

由以上的說明可知,運用本發明第一實施例之對應表管理方法,當固態儲存裝置100發生不正常的斷電後並再次供電至固態儲存裝置100時,控制電路10可以快速地重建對應表32,並使得固態儲存裝置100正常運作。As can be seen from the above description, using the correspondence table management method of the first embodiment of the present invention, when the solid-state storage device 100 is abnormally powered off and power is supplied to the solid-state storage device 100 again, the control circuit 10 can quickly reconstruct the correspondence table 32, and enables the solid-state storage device 100 to operate normally.

然而,當主機150連續地將寫入資料儲存至固態儲存裝置100時,運用本發明的第一實施例可能會造成固態儲存裝置100的寫入效能(write performance)降低。說明如下:However, when the host 150 continuously stores written data to the solid-state storage device 100, the use of the first embodiment of the present invention may cause the write performance of the solid-state storage device 100 to decrease. described as follows:

基本上,對應表32的大小(size)相關於非揮發性記憶體20的總容量。當非揮發性記憶體20的總容量越大,對應表的大小也越大。Basically, the size of the correspondence table 32 is related to the total capacity of the non-volatile memory 20. As the total capacity of the non-volatile memory 20 increases, the size of the correspondence table also increases.

當主機150將大量的寫入資料連續地儲存至固態儲存裝置100時,控制電路10需要根據主機150的指令連續地將寫入資料儲存至非揮發性記憶體20。然而,在第一實施例所揭露的方法中,當控制電路10累計的資料總量到達預設資料量的整數倍時,控制電路10會暫停將寫入資料儲存至非揮發性記憶體20,並且將完整的對應表32儲存至非揮發性記憶體20。When the host 150 continuously stores a large amount of written data to the solid-state storage device 100, the control circuit 10 needs to continuously store the written data to the non-volatile memory 20 according to an instruction of the host 150. However, in the method disclosed in the first embodiment, when the total amount of data accumulated by the control circuit 10 reaches an integer multiple of the preset data amount, the control circuit 10 temporarily suspends storing the written data in the non-volatile memory 20, And the complete correspondence table 32 is stored in the non-volatile memory 20.

當完整的對應表32儲存至非揮發性記憶體20後,控制電路10才會繼續將寫入資料儲存至非揮發性記憶體20。After the complete correspondence table 32 is stored in the non-volatile memory 20, the control circuit 10 will continue to store the written data in the non-volatile memory 20.

由以上的說明可知,於主機150將大量的寫入資料連續地儲存至固態儲存裝置100的過程,控制電路20在儲存一預設資料量的寫入資料後會中斷一段時間來將對應表32儲存至非揮發性記憶體20。之後,再次儲存該預設資料量的寫入資料後會再中斷一段時間來將對應表32儲存至非揮發性記憶體20,並持續重複進行。As can be seen from the above description, in the process of the host 150 continuously storing a large amount of written data to the solid-state storage device 100, the control circuit 20 will interrupt a period of time to store the corresponding table 32 after storing a preset amount of written data. Stored in non-volatile memory 20. After that, after the write data of the preset data amount is stored again, it is interrupted for a period of time to store the correspondence table 32 to the non-volatile memory 20, and is continuously repeated.

明顯地,在上述的運作過程中,儲存對應表32所花費的時間越長,則固態儲存裝置100的寫入效能降低越嚴重。換句話說,當非揮發性記憶體20的總容量越大,對應表32的大小也越大,則固態儲存裝置100的寫入效能降低越嚴重。Obviously, in the above-mentioned operation process, the longer the time it takes to store the correspondence table 32, the more severely the write performance of the solid-state storage device 100 decreases. In other words, when the total capacity of the non-volatile memory 20 is larger and the size of the correspondence table 32 is larger, the write performance of the solid-state storage device 100 is more severely reduced.

請參照第3圖,其所繪示為本發明第二實施例之對應表管理方法。相同地,第二實施例所揭露之對應表管理方法係運用於第1圖之固態儲存裝置100。另外,第二實施例與第一實施例的差異僅在於步驟S340。以下僅介紹此步驟,其他步驟不再贅述。Please refer to FIG. 3, which illustrates a correspondence table management method according to a second embodiment of the present invention. Similarly, the correspondence table management method disclosed in the second embodiment is applied to the solid-state storage device 100 in FIG. 1. In addition, the second embodiment differs from the first embodiment only in step S340. Only this step is described below, and the other steps are not repeated here.

當控制電路10判斷已經符合更新條件(步驟S230)時,控制電路10將DRAM 30中部分的對應表32儲存至非揮發性記憶體20(步驟S340)。When the control circuit 10 determines that the update conditions have been met (step S230), the control circuit 10 stores the correspondence table 32 of the part of the DRAM 30 to the non-volatile memory 20 (step S340).

根據本發明的第二實施例,控制電路10將對應表32區分為M個部分。當控制電路10判斷已經符合更新條件時,控制電路10僅將對應表32中M個部分其中之一的內容儲存至非揮發性記憶體20。如此,可以花費較少的時間來進行儲存。According to the second embodiment of the present invention, the control circuit 10 divides the correspondence table 32 into M parts. When the control circuit 10 determines that the update conditions have been met, the control circuit 10 stores only the content of one of the M parts in the correspondence table 32 to the non-volatile memory 20. In this way, less time can be spent on storage.

舉例來說,控制電路10中預設10Mbyte的資料量,且控制電路10將對應表32區分為M個部分。再者,控制電路10會持續計算儲存到非揮發性記憶體20中寫入資料的資料總量,當控制電路10判斷已經符合更新條件時,控制電路10將對應表32第一部分的內容儲存至非揮發性記憶體20。For example, the data volume of 10 Mbyte is preset in the control circuit 10, and the control circuit 10 divides the correspondence table 32 into M parts. Furthermore, the control circuit 10 continuously calculates the total amount of data stored in the non-volatile memory 20. When the control circuit 10 determines that the update conditions have been met, the control circuit 10 stores the content of the first part of the corresponding table 32 to Non-volatile memory 20.

同理,當控制電路10再次判斷已經符合更新條件時,控制電路10將對應表32第二部分的內容儲存至非揮發性記憶體20。再者,當控制電路10進行第M次儲存並將對應表32第M部分的內容儲存至非揮發性記憶體20之後,即可確定控制電路10已經將對應表32的全部內容儲存至非揮發性記憶體20。Similarly, when the control circuit 10 determines again that the update conditions have been met, the control circuit 10 stores the content of the second part of the correspondence table 32 to the non-volatile memory 20. Furthermore, after the control circuit 10 performs the Mth storage and stores the content of the M part of the corresponding table 32 to the non-volatile memory 20, it can be determined that the control circuit 10 has stored the entire content of the corresponding table 32 to the non-volatile memory. Sex memory 20.

接著,當控制電路10進行第(M+1)次儲存時,控制電路10再次將對應表32第一部分的內容儲存至非揮發性記憶體20。如此類推。換句話說,每當控制電路10判斷出符合更新條件時,控制電路10以循環方式依序選擇對應表32中M個部分的其中之一部分,並將其內容儲存至非揮發性記憶體20。Then, when the control circuit 10 performs the (M + 1) th storage, the control circuit 10 stores the contents of the first part of the correspondence table 32 to the non-volatile memory 20 again. And so on. In other words, whenever the control circuit 10 determines that the update conditions are met, the control circuit 10 sequentially selects one of the M sections in the correspondence table 32 in a circular manner and stores its content in the non-volatile memory 20.

固態儲存裝置100在正常運作的過程,DRAM 30中的對應表32會不斷地被更新。而由以上的說明可知,本發明的固態儲存裝置100在正常運作的過程,會將DRAM 30中更新的對應表32儲存至非揮發性記憶體20中。因此,當固態儲存裝置100發生不正常的斷電時,非揮發性記憶體20中可儲存有較新的對應表。因此,當固態儲存裝置100再次被供電時,可有效地縮短重建(rebuild)正確的對應表32所耗費的時間。During the normal operation of the solid-state storage device 100, the correspondence table 32 in the DRAM 30 is continuously updated. It can be known from the above description that during the normal operation of the solid-state storage device 100 of the present invention, the updated correspondence table 32 in the DRAM 30 is stored in the non-volatile memory 20. Therefore, when the solid-state storage device 100 is abnormally powered off, a newer correspondence table may be stored in the non-volatile memory 20. Therefore, when the solid-state storage device 100 is powered on again, the time taken to rebuild the correct correspondence table 32 can be effectively reduced.

再者,由於控制電路10將對應表32區分為M個部分,每次儲存一部分對應表32內容所耗費的時間較短。因此,第二實施例所揭露之對應表管理方法,可以使得固態儲存裝置100維持在較佳的寫入效能(write performance)。Furthermore, since the control circuit 10 divides the correspondence table 32 into M parts, the time it takes to store a part of the contents of the correspondence table 32 each time is relatively short. Therefore, the correspondence table management method disclosed in the second embodiment can make the solid-state storage device 100 maintain a better write performance.

在本發明的第一實施例與第二實施例中,係以儲存的寫入資料的資料總量是否到達預設資料量的整數倍來作為更新條件的判斷基準。當然,本發明並不限定於此,在此領域的技術人員可以運用其他的條件來決定是否將更新的對應表32儲存至非揮發性記憶體20。舉例來說,控制電路10可以計算儲存寫入資料所耗費的總時間,當累計的總時間到一達預設時間的整數倍時,即進行將更新的對應表32儲存至非揮發性記憶體20的動作。In the first embodiment and the second embodiment of the present invention, whether or not the total amount of stored written data reaches an integral multiple of a preset amount of data is used as a judgment criterion for the update condition. Of course, the present invention is not limited to this. Those skilled in the art may use other conditions to decide whether to store the updated correspondence table 32 in the non-volatile memory 20. For example, the control circuit 10 may calculate the total time taken to store the written data. When the accumulated total time reaches an integer multiple of a preset time, the updated correspondence table 32 is stored in the non-volatile memory. 20 moves.

綜上所述,雖然本發明已以實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。In summary, although the present invention has been disclosed as above with the embodiments, it is not intended to limit the present invention. Those with ordinary knowledge in the technical field to which the present invention pertains can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the scope of the attached patent application.

10‧‧‧控制電路10‧‧‧Control circuit

20‧‧‧非揮發性記憶體20‧‧‧Non-volatile memory

30‧‧‧DRAM30‧‧‧DRAM

32‧‧‧對應表32‧‧‧ Correspondence table

100‧‧‧固態儲存裝置100‧‧‧ solid state storage device

110‧‧‧外部匯流排110‧‧‧External bus

150‧‧‧主機150‧‧‧host

第1圖為習知固態儲存裝置示意圖。 第2圖為本發明第一實施例之對應表管理方法。 第3圖為本發明第二實施例之對應表管理方法。FIG. 1 is a schematic diagram of a conventional solid-state storage device. FIG. 2 is a correspondence table management method according to the first embodiment of the present invention. FIG. 3 is a correspondence table management method according to a second embodiment of the present invention.

Claims (6)

一種固態儲存裝置的對應表管理方法,該固態儲存裝置包括一控制電路、一動態隨機存取記憶體與一非揮發性記憶體,該對應表管理方法包括下列步驟: 當該控制電路接收到一寫入指令時,該控制電路將寫入資料儲存至該非揮發性記憶體,並更新該動態隨機存取記憶體中的一對應表; 當該控制電路收到一關機指令時,該控制電路將該動態隨機存取記憶體中完整的該對應表儲存至該非揮發性記憶體;以及 當該控制電路判斷出符合一更新條件時,該控制電路將該動態隨機存取記憶體中部分的該對應表儲存至該非揮發性記憶體。A correspondence table management method for a solid-state storage device. The solid-state storage device includes a control circuit, a dynamic random access memory, and a non-volatile memory. The correspondence table management method includes the following steps: When the control circuit receives a When a command is written, the control circuit stores the written data in the non-volatile memory and updates a corresponding table in the dynamic random access memory; when the control circuit receives a shutdown command, the control circuit will The complete corresponding table in the dynamic random access memory is stored in the non-volatile memory; and when the control circuit determines that an update condition is met, the control circuit stores the corresponding part of the dynamic random access memory The watch is stored in the non-volatile memory. 如申請專利範圍第1項所述之對應表管理方法,其中當對應表為一邏輯至實體位址對應表。The correspondence table management method described in item 1 of the scope of patent application, wherein the correspondence table is a logical-to-physical address correspondence table. 如申請專利範圍第1項所述之對應表管理方法,其中更包括下列步驟: 該控制電路計算儲存到該非揮發性記憶體中該寫入資料的一資料總量;以及 當該資料總量達到一預設資料量的整數倍時,該控制電路判斷出符合該更新條件。The correspondence table management method described in item 1 of the scope of patent application, further comprising the following steps: the control circuit calculates a total amount of data of the written data stored in the non-volatile memory; and when the total amount of data reaches When an integer multiple of a preset data amount, the control circuit determines that the update condition is met. 如申請專利範圍第1項所述之對應表管理方法,其中更包括下列步驟: 該控制電路計算儲存寫入資料所耗費的一總時間;以及 當該總時間達到一預設時間的整數倍時,該控制電路判斷出符合該更新條件。The correspondence table management method described in item 1 of the scope of patent application, further comprising the following steps: the control circuit calculates a total time consumed for storing and writing data; and when the total time reaches an integer multiple of a preset time , The control circuit determines that the update condition is met. 如申請專利範圍第1項所述之對應表管理方法,其中該對應表被區分為M個部分,且當該控制電路判斷出符合該更新條件時,該控制電路將該對應表中M個部分其中之一的內容儲存至該非揮發性記憶體。The correspondence table management method described in item 1 of the scope of patent application, wherein the correspondence table is divided into M parts, and when the control circuit determines that the update condition is met, the control circuit makes the M parts in the correspondence table One of the contents is stored in the non-volatile memory. 如申請專利範圍第1項所述之對應表管理方法,其中該對應表被區分為M個部分,且每當該控制電路判斷出符合該更新條件時,該控制電路以循環方式依序選擇該對應表中M個部分的其中之一部分,並將其內容儲存至該非揮發性記憶體。According to the correspondence table management method described in item 1 of the scope of patent application, wherein the correspondence table is divided into M parts, and whenever the control circuit determines that the update condition is met, the control circuit sequentially selects the Correspond to one of the M parts in the table, and store its contents in the non-volatile memory.
TW107108917A 2018-03-15 2018-03-15 Mapping table management method applied to solid state storage device TWI704454B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107108917A TWI704454B (en) 2018-03-15 2018-03-15 Mapping table management method applied to solid state storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107108917A TWI704454B (en) 2018-03-15 2018-03-15 Mapping table management method applied to solid state storage device

Publications (2)

Publication Number Publication Date
TW201939284A true TW201939284A (en) 2019-10-01
TWI704454B TWI704454B (en) 2020-09-11

Family

ID=69023139

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107108917A TWI704454B (en) 2018-03-15 2018-03-15 Mapping table management method applied to solid state storage device

Country Status (1)

Country Link
TW (1) TWI704454B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE112011102487T5 (en) * 2010-07-27 2013-05-29 International Business Machines Corporation Assignment of logical to physical addresses in semiconductor memory units having memory systems
TWI505090B (en) * 2013-03-12 2015-10-21 Macronix Int Co Ltd Difference l2p method
TWI579689B (en) * 2015-09-25 2017-04-21 瑞昱半導體股份有限公司 Data backup system
US10162561B2 (en) * 2016-03-21 2018-12-25 Apple Inc. Managing backup of logical-to-physical translation information to control boot-time and write amplification

Also Published As

Publication number Publication date
TWI704454B (en) 2020-09-11

Similar Documents

Publication Publication Date Title
US9910602B2 (en) Device and memory system for storing and recovering page table data upon power loss
US10915475B2 (en) Methods and apparatus for variable size logical page management based on hot and cold data
US10061710B2 (en) Storage device
US8949512B2 (en) Trim token journaling
US8316257B2 (en) NAND power fail recovery
US20170139839A1 (en) Data storage device and data maintenance method thereof
US9811456B2 (en) Reliable wear-leveling for non-volatile memory and method therefor
CN105718530B (en) File storage system and file storage control method thereof
US9529537B2 (en) Storage system and storage method
US20030093610A1 (en) Algorithm of flash memory capable of quickly building table and preventing improper operation and control system thereof
US8909870B2 (en) Cache evictions from data cache based on content of address translation table cache and address translation table
TWI596541B (en) Data accessing system, data accessing appraratus and method for accessing data
KR20120086239A (en) Memory system and operation method thereof
US9201784B2 (en) Semiconductor storage device and method for controlling nonvolatile semiconductor memory
KR102216116B1 (en) Memory module and operating method thereof
JP2013137770A (en) Lba bitmap usage
TW201636845A (en) Memory device and operating method of same
JP2010211734A (en) Storage device using nonvolatile memory
US20130124782A1 (en) Solid state drive and method for constructing logical-to-physical table thereof
KR20100133710A (en) Memory system and code data loading method therof
JP2013222435A (en) Semiconductor storage device and method of controlling the same
TW202307673A (en) Enhancing cache dirty information
CN110147332B (en) Management method of directory data and memory device
JP2020191055A (en) Recovery processing method and device from instantaneous interruption, and computer readable storage medium
TWI704454B (en) Mapping table management method applied to solid state storage device