TWI820473B - Method and apparatuse and computer program product for handling sudden power off recovery - Google Patents
Method and apparatuse and computer program product for handling sudden power off recovery Download PDFInfo
- Publication number
- TWI820473B TWI820473B TW110131169A TW110131169A TWI820473B TW I820473 B TWI820473 B TW I820473B TW 110131169 A TW110131169 A TW 110131169A TW 110131169 A TW110131169 A TW 110131169A TW I820473 B TWI820473 B TW I820473B
- Authority
- TW
- Taiwan
- Prior art keywords
- pseudo
- data
- power outage
- layer unit
- flash memory
- Prior art date
Links
Images
Landscapes
- Electrical Discharge Machining, Electrochemical Machining, And Combined Machining (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本發明涉及資料儲存裝置,尤指一種快閃記憶裝置的資料存取控制方法及電腦程式產品。 The present invention relates to a data storage device, and in particular, to a data access control method and computer program product of a flash memory device.
快閃記憶裝置通常分為NOR快閃記憶裝置與NAND快閃記憶裝置。NOR快閃記憶裝置為隨機存取裝置,主裝置(Host)可於位址腳位上提供任何存取NOR快閃記憶裝置的位址,並及時地從NOR快閃記憶裝置的資料腳位上獲得儲存於該位址上的資料。相反地,NAND快閃記憶裝置並非隨機存取,而是序列存取。NAND快閃記憶裝置無法像NOR快閃記憶裝置一樣,可以存取任何隨機位址,主裝置反而需要寫入序列的位元組(Bytes)的值到NAND快閃記憶裝置中,用以定義請求命令(Command)的類型(如,讀取、寫入、抹除等),以及用在此命令上的位址。位址可指向一個頁面(快閃記憶裝置中寫入作業的最小資料塊)或一個區塊(快閃記憶裝置中抹除作業的最小資料塊)。 Flash memory devices are generally divided into NOR flash memory devices and NAND flash memory devices. The NOR flash memory device is a random access device. The host device (Host) can provide any address for accessing the NOR flash memory device on the address pin and obtain the data pin of the NOR flash memory device in real time. Get the data stored at this address. In contrast, NAND flash memory devices do not have random access, but sequential access. NAND flash memory devices cannot access any random address like NOR flash memory devices. Instead, the master device needs to write a sequence of Bytes values to the NAND flash memory device to define the request. The type of command (such as read, write, erase, etc.), and the address used for this command. The address can point to a page (the smallest block of data for a write operation in a flash memory device) or a block (the smallest block of data for an erase operation in a flash memory device).
由於自然或人為引起的瞬間斷電可能讓揮發性動態隨機存取記憶體中儲存的資料丟失,因此,本發明實施例提出一種的瞬間斷電回復處理方法及裝置以及電腦程式產品,使用NAND快閃記憶體來解決如上所述的問題。 Since a momentary power outage caused by nature or man-made may cause the data stored in the volatile dynamic random access memory to be lost, the embodiment of the present invention proposes a momentary power outage recovery processing method and device as well as a computer program product, using NAND fast Flash memory to solve the problems mentioned above.
有鑑於此,如何減輕或消除上述相關領域的缺失,實為有待解決的 問題。 In view of this, how to alleviate or eliminate the deficiencies in the above-mentioned related fields remains to be solved. problem.
本發明提出一種瞬間斷電回復處理方法,該方法由電子裝置的處理單元執行,包含以下步驟:根據主裝置發出給該電子裝置的一個或多個主機寫入命令中攜帶的資訊判斷是否發生電力只能維持以秒為單位的運作後瞬間斷電;於偵測到該電子裝置發生瞬間斷電後,驅動閃存介面將該主裝置傳送的資料以單層式單元模式通過多個通道寫入多個邏輯單元號的擬單層式單元塊,其中,該些擬單層式單元塊於正常運行時被保留下來而不寫入資料,直到偵測到發生瞬間斷電;以及當偵測到該主裝置發出命令指示修剪該些擬單層式單元塊時,或者當偵測到該些擬單層式單元塊都已經被該主裝置讀取時,驅動該閃存介面抹除所有擬單層式單元塊的記憶單元。 The present invention proposes an instantaneous power outage recovery processing method. The method is executed by a processing unit of an electronic device and includes the following steps: determining whether power is generated based on the information carried in one or more host write commands sent by the main device to the electronic device. It can only maintain operation in seconds after a momentary power outage; after detecting a momentary power outage of the electronic device, the driver flash memory interface writes the data transmitted by the host device into multiple channels through multiple channels in single-layer unit mode. pseudo-single-layer unit blocks of logical unit numbers, wherein these pseudo-single-layer unit blocks are retained without writing data during normal operation until an instantaneous power outage is detected; and when the When the master device issues a command to instruct the pruning of the pseudo-single-layer cell blocks, or when it detects that the pseudo-single-layer cell blocks have been read by the master device, the flash memory interface is driven to erase all pseudo-single-layer cell blocks. Memory unit of unit block.
本發明另提出一種電腦程式產品,包含可實施如上所述方法的程式碼,用於讓處理單元載入並執行。 The present invention also provides a computer program product, which includes program code that can implement the above method and is used for loading and executing by a processing unit.
本發明提出一種瞬間斷電回復處理裝置,至少包含處理單元,用以於載入並執行相關韌體或軟體指令時實施如上所述的方法。 The present invention proposes an instant power-off recovery processing device, which at least includes a processing unit for implementing the above method when loading and executing relevant firmware or software instructions.
上述實施例的優點之一,通過擬單層式單元塊的設置及多通道的單層式單元模式的資料寫入,使得動態隨機存取記憶體的資料能夠以盡可能短的時間寫入擬單層式單元塊。 One of the advantages of the above embodiment is that through the arrangement of pseudo-single-layer unit blocks and the data writing of multi-channel single-layer unit mode, the data of the dynamic random access memory can be written into the pseudo-simulator in the shortest possible time. Single storey unit block.
本發明的其他優點將搭配以下的說明和圖式進行更詳細的解說。 Other advantages of the present invention will be explained in more detail in conjunction with the following description and drawings.
100:系統架構 100:System architecture
110:主裝置 110: Main device
130:控制器 130:Controller
131:處理單元 131: Processing unit
135:主裝置介面 135: Main device interface
137:靜態隨機存取記憶體 137: Static random access memory
139:閃存介面 139:Flash memory interface
150:動態隨機存取記憶體 150:Dynamic Random Access Memory
170:LUN 170:LUN
170#0~170#8:LUN 170#0~170#8:LUN
170#0-0~170#8-0:正常塊 170#0-0~170#8-0: normal block
170#0-1~170#8-1:擬單層式單元塊 170#0-1~170#8-1: Pseudo single-layer unit block
CH#0~CH#2:輸出入通道
CE#0~CE#2:晶片致能控制訊號
310~370:邏輯區段 310~370: Logical section
LBA#0~LBA#36863:邏輯區塊位址
S510~S560:方法步驟 S510~S560: Method steps
610:邏輯-實體表 610: Logic-Entity Table
630:實體位置資訊 630: Entity location information
630-0:(實體)區塊編號 630-0: (entity) block number
630-1:(實體)頁面編號 630-1: (entity) page number
630-2:(實體)平面編號 630-2: (entity) plane number
630-3:邏輯單元編號以及輸出入通道編號 630-3: Logic unit number and input and output channel number
650:實體區塊 650:Physical block
655:實體區域 655:Entity area
S710~S730:方法步驟 S710~S730: Method steps
圖1為依據本發明實施例的快閃記憶裝置的系統架構示意圖。 FIG. 1 is a schematic system architecture diagram of a flash memory device according to an embodiment of the present invention.
圖2為閃存介面與邏輯單元號(Logical Unit Number LUN)之間的連接示意圖。 Figure 2 is a schematic diagram of the connection between the flash memory interface and the logical unit number (Logical Unit Number LUN).
圖3為依據本發明實施例的邏輯區段示意圖。 Figure 3 is a schematic diagram of a logical section according to an embodiment of the present invention.
圖4為依據本發明實施例的LUN的實體塊分割示意圖。 Figure 4 is a schematic diagram of physical block partitioning of LUN according to an embodiment of the present invention.
圖5為依據本發明實施例的瞬間斷電回復處理的方法流程圖。 FIG. 5 is a flow chart of a method for instantaneous power outage recovery processing according to an embodiment of the present invention.
圖6為依據本發明實施例的邏輯-實體表(Logical-to-Physical L2P Table)與實體位置間的對應示意圖。 Figure 6 is a logical-to-physical L2P table according to an embodiment of the present invention. Table) and the corresponding diagram of the entity position.
圖7為依據本發明實施例的瞬間斷電回復處理的方法流程圖。 FIG. 7 is a flow chart of a method for instantaneous power outage recovery processing according to an embodiment of the present invention.
以下說明為完成發明的較佳實現方式,其目的在於描述本發明的基本精神,但並不用以限定本發明。實際的發明內容必須參考之後的權利要求範圍。 The following description is a preferred implementation manner for completing the invention, and its purpose is to describe the basic spirit of the invention, but is not intended to limit the invention. For the actual invention, reference must be made to the following claims.
必須了解的是,使用於本說明書中的”包含”、”包括”等詞,用以表示存在特定的技術特徵、數值、方法步驟、作業處理、元件以及/或組件,但並不排除可加上更多的技術特徵、數值、方法步驟、作業處理、元件、組件,或以上的任意組合。 It must be understood that the words "including" and "include" used in this specification are used to indicate the existence of specific technical features, numerical values, method steps, work processes, components and/or components, but do not exclude the possibility of adding further technical features, values, method steps, processes, components, components, or any combination of the above.
於權利要求中使用如”第一”、"第二"、"第三"等詞是用來修飾權利要求中的元件,並非用來表示之間具有優先順序,前置關係,或者是一個元件先於另一個元件,或者是執行方法步驟時的時間先後順序,僅用來區別具有相同名字的元件。 Words such as "first", "second", and "third" used in the claims are used to modify the elements in the claims, and are not used to indicate a priority, precedence relationship, or a single element. Prior to another element, or the chronological order in which method steps are performed, it is only used to distinguish elements with the same name.
必須了解的是,當元件描述為”連接”或”耦接"至另一元件時,可以是直接連結、或耦接至其他元件,可能出現中間元件。相反地,當元件描述為”直接連接”或”直接耦接”至另一元件時,其中不存在任何中間元件。使用來描述元件之間關係的其他語詞也可類似方式解讀,例如”介於”相對於”直接介於”,或者是”鄰接”相對於”直接鄰接”等等。 It must be understood that when an element is described as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, and intervening elements may be present. In contrast, when an element is described as being "directly connected" or "directly coupled" to another element, there are no intervening elements present. Other words used to describe the relationship between elements could be interpreted in a similar fashion, such as "between" versus "directly between," or "adjacent" versus "directly adjacent," etc.
參考圖1。系統架構100包含主裝置110、控制器130、動態隨機存取記憶體150(Dynamic Random Access Memory DRAM)及邏輯單元號(Logical Unit Number LUN)170。此系統架構100可實施於伺服器、個人電腦、筆記型電腦(Laptop PC)、平板電腦、手機、數位相機、數位攝影機等電子產品。控制器130是一種特殊應用積體電路(Application-Specific Integrated Circuit ASIC),用來控制LUN 170的資料存取,可包含處理單元131、主裝置介面135及閃存介面
139。LUN 170提供的儲存空間(例如16、32、64Gigabytes GBs)可作為開機碟(Boot Disk)及快取資料(Cache Data)的儲存空間。LUN 170中的記憶單元可為三層式單元(Triple Level Cells,TLCs)或四層式單元(Quad-Level Cells QLCs)。當記憶體單元為TLC而可記錄8個狀態時,一個實體字元線可包含頁面P#0(可稱為最低位元頁面,Most Significant Bit MSB page)、頁面P#1(可稱為中間位元頁面,CSB,Center Significant Bit page)及頁面P#2(可稱為最高位元頁面,Least Significant Bit LSB page)。當記憶體單元為QLC而可記錄16個狀態時,除了MSB、CSB以及LSB頁面之外,更包括TSB(可稱為頂部位元,TSB,Top Significant Bit)頁面。靜態隨機存取記憶體(Static Random Access Memory SRAM)137可用於緩存處理單元131於執行過程中需要的資料,例如,變數、資料表(Data Tables)等。處理單元131可通過閃存介面139與NAND閃存170通信,例如,可採用開放NAND快閃(Open NAND Flash Interface ONFI)、雙倍資料率開關(DDR Toggle)或其他介面。
Refer to Figure 1. The
控制器130包含處理單元131,通過主裝置介面135與主裝置110通信。主裝置介面135可為通用快閃記憶儲存(Universal Flash Storage UFS)、快速非揮發記憶體(Non-Volatile Memory Express NVMe)、通用序列匯流排(Universal Serial Bus,USB)、先進技術附著(advanced technology attachment,ATA)、序列先進技術附著(serial advanced technology attachment,SATA)、快速周邊元件互聯(peripheral component interconnect express,PCI-E)或其他介面。主裝置110及處理單元131中之任一者可使用多種方式實施,如使用通用硬體(例如,單一處理器、具平行處理能力的多處理器,或其他具運算能力的處理器),並且在執行韌體或軟體指令(Instructions)時,提供之後描述的功能。多處理器為單一的運算元件,可配備二或更多的獨立處理器(又稱為多核)來讀取及執行
程式指令。
The
參考圖2,閃存介面139可包含三個輸出入通道(I/O channels,以下簡稱通道)CH#0至CH#2,每一個通道連接三個LUN,例如,通道CH#0連接LUN 170#0至170#2,通道CH#1連接LUN 170#3至170#5,依此類推。換句話說,多個LUN可共享一個通道。例如,處理單元131可驅動閃存介面139發出致能訊號CE#0來致能LUN 170#0、170#3及170#6,接著以並行的方式從致能的LUN讀取使用者資料,或者寫入使用者資料至致能的LUN。
Referring to Figure 2, the
資料儲存裝置中的儲存空間可邏輯性地切割為多個區段(Partitions),用來儲存不同類型的資料,每個區段使用一段連續邏輯位址,例如,邏輯區塊位址(Logical Block Address,LBA),以作區分。舉例來說,每個LBA可關聯512位元組(Bytes)、4KB、16KB等大小的資料,下述中將以4KB為例進行說明,但不以此為限。參考圖3,第一區段310可包含6GB的空間,位址範圍從LBA#0至LBA#1,572,863,用於對應主裝置110的使用者資料(簡稱資料),例如:作業系統相關的程式碼。第二區段330可包含2GB的空間,位址範圍從LBA#1,572,864至LBA#2,097,151,用於對應主裝置110的資料,例如:應用程式相關的程式碼。第三區段350可包含5GB的空間,位址範圍從LBA#2,097,152至LBA#3,407,871,用於對應主裝置110的資料,例如:主裝置110於運行時產生的快取資料。動態隨機存取記憶體150儲存主裝置110於運行過程中需要的資料,例如變數、資料表、執行緒內容(Thread Context)等。為了防止瞬間斷電造成動態隨機存取記憶體150中儲存的資料丟失,主裝置110於偵測到瞬間斷電時,立即要求資料儲存裝置將動態隨機存取記憶體150所儲存的資料通過主裝置介面135寫入LUN 170。為了達到此目的,資料儲存裝置可設置第四區段370,包含5GB的空間,位址範圍從LBA#3,407,872至LBA#4,718,591,用於對應動態隨機存取記憶
體150中所儲存的資料。第四區段370的大小可為固定值,例如5GB,亦可與儲存動態隨機存取記憶體150的大小相等。之後,主裝置110於系統回復時,可通過要求資料儲存裝置提供第四區段370的資料,如此一來,主裝置110可迅速地取回原本動態隨機存取記憶體150所儲存的資料。
The storage space in the data storage device can be logically divided into multiple partitions (Partitions) to store different types of data. Each partition uses a continuous logical address, such as a logical block address (Logical Block Address, LBA) to distinguish. For example, each LBA can be associated with data of 512 bytes, 4KB, 16KB, etc. In the following description, 4KB will be used as an example, but it is not limited to this. Referring to Figure 3, the
參考圖4,資料儲存裝置中的每個LUN的實體塊(Physical Blocks)可依據不同的運作目的或編程方式而區分成一般塊(Normal Blocks)及擬單層式單元塊(pseudo SLC,pSLC Blocks)。參考圖4,例如,LUN 170#0中的實體塊可配置為包含800個一般塊170#0-0及400個pSLC塊170#0-1,LUN 170#1中的實體塊可配置為包含800個一般塊170#1-0及400個pSLC塊170#1-1,依此類推。處理單元131較佳將LUN 170#0至170#8中實體塊以及擬單層式單元塊的配置資訊記錄於靜態隨機存取記憶體137。一般塊用以提供第一區段310、第二區段330以及第三區段350的儲存空間,儲存主裝置於正常運行時寫入的資料,例如,作業系統、應用程式的檔案。由於每個LUN中的記憶單元為TLC或QLC,處理單元131可驅動閃存介面139使用多段式編程方式,例如粗略(Foggy)編程以及精細(Fine)編程來將資料寫入一般塊的記憶單元。
Referring to Figure 4, the physical blocks (Physical Blocks) of each LUN in the data storage device can be divided into normal blocks (Normal Blocks) and pseudo single-layer unit blocks (pseudo SLC, pSLC Blocks) according to different operating purposes or programming methods. ). Referring to Figure 4, for example, the physical blocks in
另一方面,快取資料等擬單層式單元塊則提供第四區段370的儲存空間,所以,pSLC塊於正常運行時被保留下來而不寫入資料。當處理單元131偵測到瞬間斷電發生時,才依據主裝置110的要求,將動態隨機存取記憶體150中所儲存的資料寫入至pSLC塊。偵測到瞬間斷電後,來自主裝置110的電力通常只能維持資料儲存裝置數秒(例如1~5秒間)的運作,因此,資料儲存裝置需利用這段時間來將動態隨機存取記憶體150所儲存的資料寫入至LUN 170。如果於正常運行時有資料佔據pSLC塊中的記憶單元,處理單元131還需要耗費時間把pSLC塊所儲存的資料搬移至一般塊,然後執行抹除作業等
等,不僅需要花費時間,也會消耗所剩無幾的電力,無法在容許的時間內將動態隨機存取記憶體150的資料寫入pSLC塊。處理單元131採用單層式單元(Single Level Cells,SLC)模式及交錯頁編程(Interleave Page Programming)方式,並通過所有通道來將動態隨機存取記憶體150的資料寫入至pSLC塊中的記憶單元,即以最快的方式將動態隨機存取記憶體150的資料寫入至資料儲存裝置的pSLC塊中,例如,以300MB/s或更高的資料傳輸率將資料寫入至資料儲存裝置的pSLC塊中。雖然實施例描述了三個通道,每個通道連接三個LUN作為範例,但是所屬技術領域的技術人員可修改NAND閃存架構來包含更多或更少的通道及LUN,本發明不應因此受侷限。
On the other hand, the pseudo-single-level unit block such as cache data provides the storage space of the
參考圖5所示的資料編程方法的流程圖,由處理單元131於載入相關軟體或韌體程式碼時執行。在步驟S510,處理單元131偵測是否有斷電中斷事件,如果是則執行步驟S520,如果否則執行步驟S540。
Referring to the flow chart of the data programming method shown in FIG. 5 , it is executed by the
在步驟S520,處理單元131以多通道以及交錯頁編程將來自主裝置110的資料寫入pSLC塊,其中,pSLC塊為採用SLC模式來進行資料編程的實體塊。
In step S520, the
在步驟S530,處理單元131依據pSLC塊所儲存的資料來更新邏輯-實體(Logical-to-Physical,L2P)映射表,其中,L2P映射表較佳儲存在SRAM 137中。
In step S530, the
在步驟S540,處理單元131以多通道以及交錯頁編程將來自主裝置110的資料寫入一般塊。
In step S540, the
在步驟S550,處理單元131依據一般塊所儲存的資料來更新邏輯-實體L2P映射表。
In step S550, the
在步驟S560,處理單元131將更新的L2P映射表寫入一般塊,其中,處理單元131較佳以SLC模式將更新的L2P映射表寫入一般塊。
In step S560, the
之後,當主裝置110恢復電力之後,資料儲存裝置再依據主裝置110的要求,將pSLC塊所儲存的資料上傳至動態隨機存取記憶體150,
之後,處理單元131可將pSLC塊予以抹除,當再次發生斷電中斷事件時,處理單元131可再將資料寫入pSLC塊。
Afterwards, when the power of the
為了記錄邏輯位置(由主裝置110管理)及實體位置(由控制器130管理)間的對應關係,控制器130可於SRAM 137中維護L2P映射表,依序儲存每個邏輯位址的資料實際儲存於哪個實體位址的資訊,讓控制器130處理關於特定邏輯位址的讀取或寫入命令時,可快速查找出對應的實體位址。另外,由於SRAM 137的大小有限,因此,L2P映射表可分割成複數個子表,控制器130再輪流將子表上傳至SRAM 137中。參考圖6,舉例來說,子表610較佳依照順序儲存相應於每一邏輯位址的實體位址資訊。子表610所需的空間較佳與邏輯位址的總數成正比。邏輯位址可以LBA表示,每個LBA對應到一個固定大小的邏輯區塊,例如512B或4KB,並且此LBA的資料儲存於LUN 170的實體位址。子表610依序儲存從LBA#26624至LBA#27647的實體位址資訊。實體位址資訊630例如包括四個位元組,其中,位元組630-0記錄(實體)區塊編號,位元組630-1記錄頁面編號及偏移量(offset);位元組630-2紀錄平面編號,位元組630-3記錄邏輯單元編號以及輸出入通道編號等等。例如,相應於LBA#26626的實體位址資訊630可指向區塊650中的一個區域655。
In order to record the correspondence between the logical location (managed by the host device 110) and the physical location (managed by the controller 130), the
於步驟S510的一些實施例,處理單元131可偵測每個從主裝置110發出的命令是否為立即待命命令(STANDBY IMMEDIATE command),立即待命命令的內容可參考ATA命令集-4(ATA Command Set-4,ACS-4)第7.48節的規範。雖然立即待命命令原為主裝置110指示資料儲存裝置進入待命模式(Standby Mode),但是主裝置110及控制器130可協議當主裝置110偵測到發生瞬間斷電時,發出立即待命命令,指示處理單元131將後續傳送的資料以最快的速度寫入LUN 170。雖然實施例舉出立即待命命令做例子,主裝置110可使用其他命令指示處理單元131,用以達成相同的技術效果。
In some embodiments of step S510, the
於步驟S510的另一些實施例,處理單元131可觀察命令佇列(Command Queue)中的主裝置寫入命令(Host Write Commands)來判斷電子裝置是否發生瞬間斷電。相對於大量資料儲存裝置(Mass Storage)提供超過如100GB以上儲存空間的應用場景,當主裝置110將LUN 170作為開機碟及快取資料的儲存空間時,於正常運行的情況下,主裝置110發出長資料寫入命令是罕見的。所以,當處理單元131在命令佇列中發現到一個長資料寫入命令後接著一個連續寫入命令時,可判斷電子裝置很可能發生瞬間斷電。主裝置命令通常包含起始邏輯位址及長度的參數,長資料寫入命令可指主裝置寫入命令中的長度超過一個預設閥值(例如1MB),並且連續寫入命令可指主裝置寫入命令中的起始邏輯位址為命令佇列中的前一個主裝置寫入命令的結束邏輯位址的下一個位址。
In other embodiments of step S510, the
於步驟S510的更另一些實施例,處理單元131可觀察命令佇列中的主裝置寫入命令的起始邏輯位址是否落入預設區間來判斷電子裝置是否發生瞬間斷電。例如,參考圖3,當發現任何主裝置寫入命令的起始邏輯位址介於LBA#3407872及LBA#4718591之間時,處理單元131判斷電子裝置很可能發生瞬間斷電。
In some other embodiments of step S510, the
於步驟S520,處理單元131可先通過閃存介面139發出SLC模式致能命令(SLC MODE ENABLE Command),接著發出一連串的編程頁面命令(PROGRAM PAGE Commands)用來將資料寫入預先配置的pSLC塊。SLC模式的資料寫入指閃存介面139編程pSLC塊中的每個記憶單元成為兩個狀態中的一個,而不是八或十六個狀態中的一個。所屬技術領域人員可理解SLC模式的資料寫入速度優於TLC或QLC模式中使用粗略-精細技術的資料寫入速度。
In step S520, the
於步驟S520的較佳實施例,處理單元131可驅動閃存介面以交錯頁編程的方式寫入資料,以圖4的通道CH#0舉例,閃存介面139可發出致能訊號CE#0來致能LUN 170#0並通過通道CH#0傳送資料給
pSLC塊170#0-1,接著於資料傳送完畢後發出指令給pSLC塊170#0-1來開始編程其中的記憶單元。於pSLC塊170#0-1實際編程記憶單元的期間,閃存介面139可發出致能訊號CE#1來致能LUN 170#1並通過通道CH#0傳送資料給pSLC塊170#1-1,依此類推。
In the preferred embodiment of step S520, the
於步驟S520的較佳實施例,處理單元131可驅動閃存介面139通過所有通道寫入主裝置110傳送的資料。
In the preferred embodiment of step S520, the
參考圖7所示的方法流程圖,由處理單元131於載入相關軟體或韌體程式碼時執行。於偵測到電子裝置已經完成瞬間斷電回復後(步驟S710),處理單元131驅動閃存介面170抹除LUN 170中所有pSLC塊的記憶單元,讓pSLC塊處於就緒狀態,供下次可能發生的瞬間斷電運用(步驟S730)。
Referring to the method flow chart shown in FIG. 7 , the method is executed by the
處理單元131可檢視每個從主裝置110發出的資料集管理命令(DATA SET MANAGEMENT command)的內容判斷是否指示修剪(Trim)pSLC塊,資料集管理命令的內容可參考ATA命令集-4(ATA Command Set-4 ACS-4)第7.6節的規範。資料集管理命令可包含LBA及修剪位元(Trim Bit)等參數,處理單元131可參考L2P映射表的資訊判斷資料集管理命令中的LBA是否關聯於一個pSLC塊且修剪位元設為“1”。如果是,處理單元131判斷電子裝置已經完成瞬間斷電回復。雖然實施例舉出資料集管理命令做例子,主裝置110可使用其他命令指示處理單元131,用以達成相同的技術效果。
The
於步驟S710的另一些實施例,處理單元131可紀錄主裝置讀取命令(Host Read Commands)的執行來判斷電子裝置是否已經完成瞬間斷電回復。處理單元131可參考L2P映射表的內容記錄每個關聯於pSLC塊的主裝置讀取命令的執行。當L2P映射表中對應於pSLC塊的所有LBA的資料都已經被主裝置110讀取後,處理單元131判斷電子裝置已經完成瞬間斷電回復。
In other embodiments of step S710, the
本發明所述的方法中的全部或部分步驟可以電腦程式實現,例如電 腦的作業系統、電腦中特定硬體的驅動程式、或軟體應用程式。此外,也可實現於如上所示的其他類型程式。所屬技術領域具有通常知識者可將本發明實施例的方法撰寫成電腦程式,為求簡潔不再加以描述。依據本發明實施例方法實施的電腦程式.可儲存於適當的電腦可讀取資料載具,例如DVD、CD-ROM、USB碟、硬碟,亦可置於可通過網路(例如,網際網路,或其他適當載具)存取的網路伺服器。 All or part of the steps in the method of the present invention can be implemented by computer programs, such as The computer's operating system, drivers for specific hardware in the computer, or software applications. In addition, it can also be implemented in other types of programs as shown above. Those with ordinary skill in the art can write the methods of the embodiments of the present invention into computer programs, which will not be described again for the sake of simplicity. The computer program implemented according to the method of the embodiment of the present invention can be stored in an appropriate computer-readable data carrier, such as DVD, CD-ROM, USB disk, hard disk, or can be placed in a computer program that can be accessed through a network (such as the Internet). route, or other appropriate vehicle).
雖然圖1中包含了以上描述的元件,但不排除在不違反發明的精神下,使用更多其他的附加元件,已達成更佳的技術效果。此外,雖然圖5及圖7的流程圖採用指定的順序來執行,但是在不違反發明精神的情況下,熟習此技藝人士可以在達到相同效果的前提下,修改這些步驟間的順序,所以,本發明並不侷限於僅使用如上所述的順序。此外,熟習此技藝人士亦可以將若干步驟整合為一個步驟,或者是除了這些步驟外,循序或平行地執行更多步驟,本發明亦不因此而侷限。 Although Figure 1 contains the above-described components, it does not rule out the use of other additional components to achieve better technical effects without violating the spirit of the invention. In addition, although the flowcharts of Figures 5 and 7 are executed in a specified order, those skilled in the art can modify the order of these steps without violating the spirit of the invention and achieving the same effect. Therefore, The present invention is not limited to the use of only the sequence described above. In addition, those skilled in the art can also integrate several steps into one step, or in addition to these steps, perform more steps sequentially or in parallel, and the invention is not limited thereby.
雖然本發明使用以上實施例進行說明,但需要注意的是,這些描述並非用以限縮本發明。相反地,此發明涵蓋了熟習此技藝人士顯而易見的修改與相似設置。所以,申請權利要求範圍須以最寬廣的方式解釋來包含所有顯而易見的修改與相似設置。 Although the present invention is described using the above embodiments, it should be noted that these descriptions are not intended to limit the present invention. On the contrary, this invention covers modifications and similar arrangements which will be obvious to one skilled in the art. Therefore, the scope of the claims of the application must be interpreted in the broadest manner to include all obvious modifications and similar arrangements.
S510~S560:方法步驟 S510~S560: Method steps
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110131169A TWI820473B (en) | 2019-05-21 | 2019-05-21 | Method and apparatuse and computer program product for handling sudden power off recovery |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| TW110131169A TWI820473B (en) | 2019-05-21 | 2019-05-21 | Method and apparatuse and computer program product for handling sudden power off recovery |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| TW202147126A TW202147126A (en) | 2021-12-16 |
| TWI820473B true TWI820473B (en) | 2023-11-01 |
Family
ID=80784005
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| TW110131169A TWI820473B (en) | 2019-05-21 | 2019-05-21 | Method and apparatuse and computer program product for handling sudden power off recovery |
Country Status (1)
| Country | Link |
|---|---|
| TW (1) | TWI820473B (en) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104077174A (en) * | 2009-03-27 | 2014-10-01 | Lsi公司 | Storage system logical block address de-allocation management and data hardening |
| TW201521027A (en) * | 2013-11-28 | 2015-06-01 | Phison Electronics Corp | Method for data management and memory storage device and memory control circuit unit |
| US20160268000A1 (en) * | 2015-03-09 | 2016-09-15 | Ocz Storage Solutions, Inc. | Power fail saving modes in solid state drive with mlc memory |
| US20180260331A1 (en) * | 2017-03-10 | 2018-09-13 | Toshiba Memory Corporation | Multibit nand media using pseudo-slc caching technique |
| CN108762669A (en) * | 2018-05-18 | 2018-11-06 | 深圳忆联信息系统有限公司 | The method, apparatus and computer equipment of writing speed when promoting power down |
-
2019
- 2019-05-21 TW TW110131169A patent/TWI820473B/en active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104077174A (en) * | 2009-03-27 | 2014-10-01 | Lsi公司 | Storage system logical block address de-allocation management and data hardening |
| TW201521027A (en) * | 2013-11-28 | 2015-06-01 | Phison Electronics Corp | Method for data management and memory storage device and memory control circuit unit |
| US20160268000A1 (en) * | 2015-03-09 | 2016-09-15 | Ocz Storage Solutions, Inc. | Power fail saving modes in solid state drive with mlc memory |
| US20180260331A1 (en) * | 2017-03-10 | 2018-09-13 | Toshiba Memory Corporation | Multibit nand media using pseudo-slc caching technique |
| CN108762669A (en) * | 2018-05-18 | 2018-11-06 | 深圳忆联信息系统有限公司 | The method, apparatus and computer equipment of writing speed when promoting power down |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202147126A (en) | 2021-12-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102610395B1 (en) | Memory system comprising non-volatile memory device | |
| CN107908571B (en) | Data writing method, flash memory device and storage equipment | |
| CN111984441B (en) | Instant power-off recovery processing method and device and computer readable storage medium | |
| US8489805B2 (en) | Memory devices operated within a communication protocol standard timeout requirement | |
| US20090049234A1 (en) | Solid state memory (ssm), computer system including an ssm, and method of operating an ssm | |
| US12014081B2 (en) | Host managed buffer to store a logical-to physical address table for a solid state drive | |
| CN114327240B (en) | Computer readable storage medium, data storage method and device for flash memory | |
| US11269559B2 (en) | Data processing device | |
| TWI754396B (en) | Method and apparatus and computer program product for storing data in flash memory | |
| KR102809599B1 (en) | Controller, memory system and operating method thereof | |
| US20220083280A1 (en) | Method and apparatus to reduce latency for random read workloads in a solid state drive | |
| KR102595233B1 (en) | Data processing system and operating method thereof | |
| KR20220085708A (en) | Logical to physical address indirection table in a persistent memory in a solid state drive | |
| KR20230166612A (en) | Memory controller and operating method thereof | |
| US12260122B2 (en) | Storage controller providing status information of zone region, method of operating the same, and method of operating electronic device having the same | |
| KR20200114086A (en) | Controller, memory system and operating method thereof | |
| KR102425470B1 (en) | Data storage device and operating method thereof | |
| KR20220103340A (en) | Data storage device and operating method thereof | |
| TWI820473B (en) | Method and apparatuse and computer program product for handling sudden power off recovery | |
| TWI741296B (en) | Method and apparatuse and computer program product for handling sudden power off recovery | |
| KR102879451B1 (en) | Data storage device and operating method thereof | |
| KR20240015513A (en) | Memory system and operating method thereof | |
| TWI876739B (en) | Method and computer program product and apparatus for configuring current block to program data | |
| EP4435579A1 (en) | Storage controller providing status information of zone region | |
| US20240143226A1 (en) | Data storage device and method for managing a write buffer |