TWI790568B - Work status control method for memory device and data storage system - Google Patents

Work status control method for memory device and data storage system Download PDF

Info

Publication number
TWI790568B
TWI790568B TW110109210A TW110109210A TWI790568B TW I790568 B TWI790568 B TW I790568B TW 110109210 A TW110109210 A TW 110109210A TW 110109210 A TW110109210 A TW 110109210A TW I790568 B TWI790568 B TW I790568B
Authority
TW
Taiwan
Prior art keywords
memory device
host system
working state
state
control command
Prior art date
Application number
TW110109210A
Other languages
Chinese (zh)
Other versions
TW202238375A (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 TW110109210A priority Critical patent/TWI790568B/en
Publication of TW202238375A publication Critical patent/TW202238375A/en
Application granted granted Critical
Publication of TWI790568B publication Critical patent/TWI790568B/en

Links

Images

Abstract

A work status control method for a memory device and a data storage system are disclosed. The method includes: detecting a status of a host system; sending a first control command to a memory device in response to that the status of the host system is a idle status. The first control command is configured to adjust a buffer time for the memory device changing from a first work status to a second work status.

Description

記憶體裝置的工作狀態控制方法與資料儲存系統Working state control method and data storage system of memory device

本發明是有關於一種記憶體控制技術,且特別是有關於一種記憶體裝置的工作狀態控制方法與資料儲存系統。The present invention relates to a memory control technology, and in particular to a working state control method and a data storage system of a memory device.

相較於傳統硬碟,記憶體裝置具有存取速度快及體積小等優點。但是,記憶體裝置在使用上,需要時常進行資料的搬移整理,以釋放出更多的寫入空間供新資料寫入。一般來說,記憶體裝置可以在例如開機後、關機前或切換工作狀態的期間,在背景執行資料的搬移整理。但是,實務上,記憶體裝置可以在背景執行資料的搬移整理的時間往往不足。一旦記憶體裝置的快取區被寫滿,則記憶體裝置就會主動降速,從而降低記憶體裝置的工作效率。Compared with traditional hard disks, memory devices have the advantages of fast access speed and small size. However, in the use of the memory device, data needs to be moved and sorted frequently to release more writing space for writing new data. Generally speaking, the memory device can perform data migration and sorting in the background, such as after booting, before shutting down, or during switching working states. However, in practice, the time for the memory device to move and organize data in the background is often insufficient. Once the cache area of the memory device is full, the memory device will actively slow down, thereby reducing the working efficiency of the memory device.

本發明提供一種記憶體裝置的工作狀態控制方法與資料儲存系統,可藉由延長記憶體裝置在不同工作狀態之間進行切換時的緩衝時間,從而提升記憶體裝置的工作效率。The invention provides a working state control method and a data storage system of a memory device, which can increase the working efficiency of the memory device by prolonging the buffer time when the memory device switches between different working states.

本發明的實施例提供一種記憶體裝置的工作狀態控制方法,其用於主機系統。所述主機系統耦接至所述記憶體裝置。所述工作狀態控制方法包括:偵測所述主機系統的狀態;以及響應於所述主機系統的所述狀態為閒置狀態,發送第一控制指令至所述記憶體裝置。所述第一控制指令用以調整所述記憶體裝置從第一工作狀態切換至第二工作狀態的緩衝時間。An embodiment of the present invention provides a method for controlling the working state of a memory device, which is used in a host system. The host system is coupled to the memory device. The working state control method includes: detecting the state of the host system; and sending a first control command to the memory device in response to the state of the host system being an idle state. The first control instruction is used to adjust the buffer time for the memory device to switch from the first working state to the second working state.

本發明的實施例另提供一種資料儲存系統,其包括主機系統與記憶體裝置。所述記憶體裝置耦接至所述主機系統並用以儲存來自所述主機系統的資料。所述主機系統用以偵測所述主機系統的狀態。所述主機系統更用以響應於所述主機系統的所述狀態為閒置狀態,發送第一控制指令至所述記憶體裝置。所述記憶體裝置用以根據所述第一控制指令調整從第一工作狀態切換至第二工作狀態的緩衝時間。An embodiment of the present invention further provides a data storage system, which includes a host system and a memory device. The memory device is coupled to the host system and used for storing data from the host system. The host system is used to detect the status of the host system. The host system is further configured to send a first control command to the memory device in response to the state of the host system being an idle state. The memory device is used for adjusting the buffer time for switching from the first working state to the second working state according to the first control instruction.

基於上述,當主機系統的狀態為閒置狀態時,主機系統可發送第一控制指令至記憶體裝置。所述第一控制指令可用以調整記憶體裝置從第一工作狀態切換至第二工作狀態的緩衝時間。藉由延長記憶體裝置在不同工作狀態之間進行切換時的緩衝時間,可提供更充足的時間供記憶體裝置執行背景資料整理,進而提升記憶體裝置的工作效率。Based on the above, when the state of the host system is the idle state, the host system can send the first control command to the memory device. The first control instruction can be used to adjust the buffer time for the memory device to switch from the first working state to the second working state. By prolonging the buffer time when the memory device switches between different working states, more sufficient time can be provided for the memory device to perform background data sorting, thereby improving the working efficiency of the memory device.

圖1是根據本發明的一實施例所繪示的資料儲存系統的示意圖。請參照圖1,資料儲存系統包括主機系統11與記憶體裝置12。主機系統11可將資料儲存至記憶體裝置12中,或從記憶體裝置12中讀取資料。例如,主機系統11為可實質地與記憶體裝置12配合以儲存資料的任意系統,例如,電腦系統、數位相機、攝影機、通訊裝置、音訊播放器、視訊播放器或平板電腦等,而記憶體裝置12則可為隨身碟、記憶卡、固態硬碟(Solid State Drive, SSD)、安全數位(Secure Digital, SD)卡、小型快閃(Compact Flash, CF)卡或嵌入式儲存裝置等各式非揮發性記憶體裝置。FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. Referring to FIG. 1 , the data storage system includes a host system 11 and a memory device 12 . The host system 11 can store data into the memory device 12 or read data from the memory device 12 . For example, the host system 11 is any system that can actually cooperate with the memory device 12 to store data, such as a computer system, a digital camera, a video camera, a communication device, an audio player, a video player, or a tablet computer, etc., and the memory The device 12 can be a flash drive, a memory card, a solid state drive (Solid State Drive, SSD), a secure digital (Secure Digital, SD) card, a small flash (Compact Flash, CF) card or an embedded storage device, etc. non-volatile memory device.

在一實施例中,主機系統11可包括連接介面111、感測器112及處理器113。連接介面111用以耦接至記憶體裝置12並與記憶體裝置12通訊。例如,連接介面111可將資料傳輸至記憶體裝置12或從記憶體裝置12接收資料。感測器112可用以感測環境資訊。例如,感測器112可包括鏡頭等影像擷取裝置或者其他類型的感測器,本發明不加以限制。In one embodiment, the host system 11 may include a connection interface 111 , a sensor 112 and a processor 113 . The connection interface 111 is used for coupling to the memory device 12 and communicating with the memory device 12 . For example, the connection interface 111 can transmit data to or receive data from the memory device 12 . The sensor 112 can be used to sense environmental information. For example, the sensor 112 may include an image capturing device such as a lens or other types of sensors, which is not limited by the present invention.

處理器113耦接至連接介面111與感測器112。處理器113可負責主機系統11的整體或部分運作。例如,處理器113可包括中央處理單元(CPU)或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。The processor 113 is coupled to the connection interface 111 and the sensor 112 . The processor 113 can be responsible for the whole or part of the operation of the host system 11 . For example, the processor 113 may include a central processing unit (CPU) or other programmable general-purpose or special-purpose microprocessors, digital signal processors (Digital Signal Processor, DSP), programmable controllers, special application Integrated circuit (Application Specific Integrated Circuits, ASIC), programmable logic device (Programmable Logic Device, PLD) or other similar devices or a combination of these devices.

在一實施例中,主機系統11還可包含任何實務上所需的硬體裝置,例如儲存媒體、電池單元、網路介面卡、鍵盤(或觸控板)、螢幕及/或揚聲器等等。In one embodiment, the host system 11 may also include any practically required hardware devices, such as storage media, battery units, network interface cards, keyboards (or touchpads), screens and/or speakers, and the like.

在一實施例中,記憶體裝置12包括連接介面121、記憶體模組122及記憶體控制器123。連接介面121用以連接主機系統11的連接介面112並經由連接介面112與主機系統11通訊。例如,連接介面111與121可符合序列先進附件(Serial Advanced Technology Attachment, SATA)、並列先進附件(Parallel Advanced Technology Attachment, PATA)、高速周邊零件連接介面(Peripheral Component Interconnect Express, PCI Express)或通用序列匯流排(Universal Serial Bus, USB)等各式連接介面標準。在一實施例中,連接介面111與121符合NVM Express (NVMe)規範。In one embodiment, the memory device 12 includes a connection interface 121 , a memory module 122 and a memory controller 123 . The connection interface 121 is used for connecting to the connection interface 112 of the host system 11 and communicating with the host system 11 through the connection interface 112 . For example, the connection interfaces 111 and 121 can conform to Serial Advanced Technology Attachment (SATA), Parallel Advanced Technology Attachment (PATA), high-speed peripheral component connection interface (Peripheral Component Interconnect Express, PCI Express) or universal serial Various connection interface standards such as Universal Serial Bus (USB). In one embodiment, the connection interfaces 111 and 121 conform to the NVM Express (NVMe) specification.

記憶體模組122用以儲存主機系統11所寫入之資料。例如,記憶體模組122可包括單階胞(Single Level Cell, SLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存1個位元的快閃記憶體模組)、多階胞(Multi Level Cell, MLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存2個位元的快閃記憶體模組)、三階胞(Triple Level Cell, TLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存3個位元的快閃記憶體模組)及/或四階胞(Quad Level Cell, QLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存4個位元的快閃記憶體模組)。例如,記憶體模組122中的記憶胞是以臨界電壓的改變來儲存資料。在一實施例中,記憶體模組122亦稱為快閃記憶體模組。The memory module 122 is used for storing data written by the host system 11 . For example, the memory module 122 may include a single-level cell (Single Level Cell, SLC) NAND flash memory module (ie, a memory cell can store 1 bit of flash memory module), multi-level Cell (Multi Level Cell, MLC) NAND flash memory module (that is, a memory cell can store 2 bits of flash memory module), triple level cell (Triple Level Cell, TLC) NAND flash memory module Flash memory module (that is, a flash memory module that can store 3 bits in a memory cell) and/or a quad-level cell (Quad Level Cell, QLC) NAND flash memory module (that is, a A memory cell can store 4 bits of flash memory module). For example, the memory cells in the memory module 122 store data by changing the threshold voltage. In one embodiment, the memory module 122 is also called a flash memory module.

記憶體模組122包括多個實體單元。每一個實體單元可包括多個記憶胞。例如,一個實體單元可包括一或多個實體頁、一或多個實體區塊或者一或多個其他的記憶胞管理單元。屬於同一個實體頁的記憶胞可以被同時程式化以儲存資料。屬於同一個實體區塊的記憶胞可被同時抹除以清除資料。The memory module 122 includes a plurality of physical units. Each physical unit may include multiple memory cells. For example, a physical unit may include one or more physical pages, one or more physical blocks, or one or more other memory cell management units. Memory cells belonging to the same physical page can be programmed simultaneously to store data. Memory cells belonging to the same physical block can be erased at the same time to clear data.

在一實施例中,記憶體模組122包括快取區1221與儲存區1222。快取區1221中的每一個實體單元中的每一個記憶胞可用以儲存N個位元。儲存區1222中的每一個實體單元中的每一個記憶胞可用以儲存M個位元。M與N皆為整數,且M大於N。例如,N可為1,且M可為2、3或4。例如,快取區1221中的實體單元可操作於SLC(或虛擬SLC)模式,而儲存區1222中的實體單元則可操作於MLC、TLC或QLC模式。In one embodiment, the memory module 122 includes a cache area 1221 and a storage area 1222 . Each memory cell in each physical unit in the cache area 1221 can store N bits. Each memory cell in each physical unit in the storage area 1222 can store M bits. Both M and N are integers, and M is greater than N. For example, N can be 1 and M can be 2, 3 or 4. For example, the physical units in the cache area 1221 can operate in SLC (or virtual SLC) mode, while the physical units in the storage area 1222 can operate in MLC, TLC or QLC mode.

在一實施例中,將資料寫入至快取區1221中的一個實體單元的速度及/或可靠度高於將資料寫入至儲存區1222中的一個實體單元的速度及/或可靠度。在一實施例中,儲存區1222中的一個實體單元的容量(即可儲存的資料量)大於快取區1221中的一個實體單元的容量。In one embodiment, the speed and/or reliability of writing data into a physical unit in the cache area 1221 is higher than the speed and/or reliability of writing data into a physical unit in the storage area 1222 . In one embodiment, the capacity of one physical unit in the storage area 1222 (that is, the amount of stored data) is greater than the capacity of one physical unit in the cache area 1221 .

記憶體控制器123耦接至連接介面121與記憶體模組122。記憶體控制器123用以執行以硬體型式或韌體型式實作的多個邏輯閘或控制指令並且根據主機系統11的指令在記憶體模組122中進行資料的寫入、讀取與抹除等運作。此外,記憶體控制器123也可控制記憶體裝置12的整體運作。在一實施例中,記憶體控制器123亦稱為快閃記憶體控制器。The memory controller 123 is coupled to the connection interface 121 and the memory module 122 . The memory controller 123 is used to execute a plurality of logic gates or control instructions implemented in hardware or firmware, and to write, read and erase data in the memory module 122 according to the instructions of the host system 11. operation. In addition, the memory controller 123 can also control the overall operation of the memory device 12 . In one embodiment, the memory controller 123 is also called a flash memory controller.

在一實施例中,快取區1221中的實體單元的最大數目少於儲存區1222中的實體單元的最大數目。當快取區1221中的實體單元尚未被用盡時,來自主機系統11的資料可先被以較快的速度及/或較高的可靠度寫入至快取區1221中的實體單元。爾後,記憶體控制器123可在記憶體裝置12的運作過程中執行背景資料整理,以將有效資料從快取區1221中的實體單元搬移至儲存區1222中的實體單元。其中,有效資料是指屬於某一邏輯區塊位址(Logical Block Address, LBA)的資料。在將快取區1221中的某一實體單元所儲存的有效資料都複製到儲存區1222後,快取區1221中的此實體單元可被抹除(亦稱為釋放)以重新接收來自主機系統11的新資料。In one embodiment, the maximum number of physical units in the cache area 1221 is less than the maximum number of physical units in the storage area 1222 . When the physical units in the cache area 1221 have not been used up, the data from the host system 11 can be written to the physical units in the cache area 1221 at a faster speed and/or with higher reliability. Afterwards, the memory controller 123 can perform background data sorting during the operation of the memory device 12 to move valid data from the physical units in the cache area 1221 to the physical units in the storage area 1222 . Wherein, the valid data refers to data belonging to a Logical Block Address (LBA). After copying all valid data stored in a certain physical unit in the cache area 1221 to the storage area 1222, the physical unit in the cache area 1221 can be erased (also called release) to receive data from the host system again. 11 new information.

一般來說,記憶體控制器123執行所述背景資料整理的時間是相當有限的。例如,記憶體控制器123可能只能在記憶體裝置12開機後、關機前、切換工作狀態的期間或者部分記憶體裝置12的存取負載較低的狀態下短暫執行所述背景資料整理。一旦快取區1221中的實體單元被用盡(即快取區1221中沒有可用的實體單元),則來自主機系統11的資料需以較慢的速度及/或較低的可靠度直接寫入至儲存區1222中的實體單元。換言之,在記憶體裝置12的運作過程中,若有充足的時間供記憶體控制器123執行背景資料整理,以盡可能地在快取區1221中釋放出可用的實體單元,則來自主機系統11的資料可以較快的速度及/或較高的可靠度儲存至記憶體裝置12(即快取區1221)中。Generally speaking, the time for the memory controller 123 to perform the background data sorting is quite limited. For example, the memory controller 123 may only execute the background data arrangement temporarily after the memory device 12 is turned on, before it is turned off, during switching working states, or when the access load of some memory devices 12 is low. Once the physical units in the cache area 1221 are used up (that is, there are no available physical units in the cache area 1221), the data from the host system 11 needs to be written directly at a slower speed and/or with lower reliability To the physical unit in storage area 1222. In other words, during the operation of the memory device 12, if there is enough time for the memory controller 123 to perform background data sorting, so as to release available physical units in the cache area 1221 as much as possible, then from the host system 11 The data can be stored in the memory device 12 (that is, the cache area 1221 ) at a faster speed and/or with a higher reliability.

在一實施例中,處理器113可偵測主機系統11當下的狀態。響應於主機系統11當下的狀態為閒置狀態,處理器113可發送一控制指令(亦稱為第一控制指令)至記憶體裝置12。第一控制指令可用以調整記憶體裝置12從某一工作狀態(亦稱為第一工作狀態)切換至另一工作狀態(亦稱為第二工作狀態)的緩衝時間。In one embodiment, the processor 113 can detect the current state of the host system 11 . In response to the current state of the host system 11 being the idle state, the processor 113 may send a control command (also referred to as a first control command) to the memory device 12 . The first control command can be used to adjust the buffer time for the memory device 12 to switch from a certain working state (also called the first working state) to another working state (also called the second working state).

在一實施例中,記憶體裝置12在第一工作狀態下的系統效能高於記憶體裝置12在第二工作狀態下的系統效能。在一實施例中,第一工作狀態可以是指NVMe規範中的電源狀態0(Power State 0, PS0)。PS0亦稱為正常工作狀態。在一實施例中,第二工作狀態可以是指NVMe規範中的電源狀態1(PS1)。相較於PS0,在PS1狀態下,記憶體裝置12運作時的系統效能與功耗皆會降低。In one embodiment, the system performance of the memory device 12 in the first working state is higher than the system performance of the memory device 12 in the second working state. In an embodiment, the first working state may refer to power state 0 (Power State 0, PS0) in the NVMe specification. PS0 is also called normal working state. In an embodiment, the second working state may refer to power state 1 (PS1) in the NVMe specification. Compared with PS0, in the PS1 state, the system performance and power consumption of the memory device 12 will be reduced.

在一實施例中,第一控制指令更用以指示記憶體裝置12從第一工作狀態切換至第二工作狀態。在一實施例中,調整後的緩衝時間可大於此緩衝時間的一個預設值。也就是說,處理器113可藉由此第一控制指令來指示記憶體裝置12從第一工作狀態切換至第二工作狀態,且同時藉由此第一控制指令來指示記憶體裝置12延長從第一工作狀態切換至第二工作狀態的緩衝時間。In one embodiment, the first control command is further used to instruct the memory device 12 to switch from the first working state to the second working state. In an embodiment, the adjusted buffer time may be greater than a preset value of the buffer time. That is to say, the processor 113 can use the first control instruction to instruct the memory device 12 to switch from the first working state to the second working state, and at the same time use the first control instruction to instruct the memory device 12 to extend the The buffer time for switching from the first working state to the second working state.

在一實施例中,當記憶體控制器123根據此第一控制指令來切換記憶體裝置12的工作狀態時,在切換工作狀態的期間(即緩衝時間內),記憶體控制器123可執行所述背景資料整理,以將有效資料從快取區1221中的至少一實體單元(亦稱為第一實體單元)搬移至儲存區1222中的至少一實體單元(亦稱為第二實體單元)。在一實施例中,藉由延長此緩衝時間,在切換至第二工作狀態之前,記憶體控制器123可以有更充足的時間來執行所述背景資料整理,從而提高對於快取區1221中的可用實體單元的釋放效率。In one embodiment, when the memory controller 123 switches the working state of the memory device 12 according to the first control command, the memory controller 123 can execute the The above-mentioned background data is sorted to move valid data from at least one physical unit (also called the first physical unit) in the cache area 1221 to at least one physical unit (also called the second physical unit) in the storage area 1222 . In one embodiment, by prolonging the buffer time, the memory controller 123 can have more time to execute the background data sorting before switching to the second working state, thereby improving the performance of the cache area 1221. The release efficiency of available solid units.

在一實施例中,響應於主機系統11的狀態非為閒置狀態,處理器113可發送另一控制指令(亦稱為第二控制指令)至記憶體裝置12。第二控制指令可用以指示記憶體裝置12從第二工作狀態回復為第一工作狀態並將所述緩衝時間回復為預設值。In one embodiment, in response to the state of the host system 11 being not the idle state, the processor 113 may send another control command (also referred to as a second control command) to the memory device 12 . The second control command can be used to instruct the memory device 12 to return from the second working state to the first working state and restore the buffer time to a preset value.

圖2是根據本發明的一實施例所繪示的工作狀態控制的操作時序示意圖。請參照圖1與圖2,假設在時間點T(0)之前,記憶體裝置12處於第一工作狀態(例如PS0或正常工作狀態)。在時間點T(0),響應於主機系統11處於閒置狀態,記憶體裝置12可從主機系統11接收第一控制指令。響應於第一控制指令,在經過緩衝時間BF(T)後,在時間點T(1),記憶體裝置12可切換其工作狀態,即從第一工作狀態切換為第二工作狀態(例如PS1)。須注意的是,在緩衝時間BF(T)內,記憶體裝置12可持續執行所述背景資料整理,且暫時不完成所述工作狀態的切換。FIG. 2 is a schematic diagram of an operation sequence of working state control according to an embodiment of the present invention. Referring to FIG. 1 and FIG. 2 , it is assumed that the memory device 12 is in a first working state (eg PS0 or normal working state) before the time point T(0). At time point T(0), in response to the host system 11 being in an idle state, the memory device 12 may receive a first control command from the host system 11 . In response to the first control command, after the buffer time BF(T), at the time point T(1), the memory device 12 can switch its working state, that is, switch from the first working state to the second working state (for example, PS1 ). It should be noted that, within the buffer time BF(T), the memory device 12 can continue to execute the background data sorting, and temporarily does not complete the switching of the working state.

在切換至第二工作狀態後,在時間點T(1)至T(2)之間,記憶體裝置12可持續運作於第二工作狀態。在時間點T(2)之後,響應於主機系統11離開閒置狀態(即恢復正常操作狀態),記憶體裝置12可從主機系統11接收第二控制指令並根據此第二控制指令回復至第一工作狀態。After being switched to the second working state, the memory device 12 can continue to operate in the second working state between time points T(1) and T(2). After the time point T(2), in response to the host system 11 leaving the idle state (that is, returning to the normal operation state), the memory device 12 can receive a second control command from the host system 11 and return to the first control command according to the second control command. working status.

圖3是根據本發明的一實施例所繪示的調整切換工作狀態之間的緩衝時間的示意圖。請參照圖3,響應於第一控制指令,記憶體裝置12可將緩衝時間BF(T)從預設的BF(0)調整為BF(1),且BF(1)所對應的時間長度大於BF(0)所對應的時間長度。爾後,響應於第二控制指令,記憶體裝置12可將緩衝時間BF(T)回復為預設的BF(0)。FIG. 3 is a schematic diagram of adjusting buffer time between switching working states according to an embodiment of the present invention. Referring to FIG. 3 , in response to the first control command, the memory device 12 can adjust the buffer time BF(T) from the preset BF(0) to BF(1), and the time length corresponding to BF(1) is greater than The length of time corresponding to BF(0). Then, in response to the second control command, the memory device 12 can restore the buffer time BF(T) to a preset BF(0).

回到圖1,在一實施例中,處理器113可偵測主機系統11的操作者是否已離開。若處理器113判定主機系統11的操作者已離開,處理器113可判定主機系統11當下的狀態為閒置狀態。反之,若處理器113判定主機系統11的操作者未離開(例如主機系統11的操作者持續操作主機系統11),處理器113可判定主機系統11當下的狀態非為閒置狀態。Returning to FIG. 1 , in one embodiment, the processor 113 can detect whether the operator of the host system 11 has left. If the processor 113 determines that the operator of the host system 11 has left, the processor 113 may determine that the current state of the host system 11 is an idle state. On the contrary, if the processor 113 determines that the operator of the host system 11 has not left (for example, the operator of the host system 11 continues to operate the host system 11 ), the processor 113 may determine that the current state of the host system 11 is not an idle state.

在一實施例中,處理器113可藉由感測器112來判斷主機系統11當下的狀態是否為閒置狀態。例如,假設感測器112包括鏡頭,則當使用者持續出現在鏡頭前時,處理器113可根據感測器112所擷取的影像判定主機系統11的操作者未離開且主機系統11當下的狀態非為閒置狀態。反之,當使用者未出現在鏡頭前時,處理器113可根據感測器112所擷取的影像判定主機系統11的操作者已離開且主機系統11當下的狀態為閒置狀態。In one embodiment, the processor 113 can determine whether the current state of the host system 11 is an idle state through the sensor 112 . For example, assuming that the sensor 112 includes a camera, then when the user continues to appear in front of the camera, the processor 113 can determine based on the image captured by the sensor 112 that the operator of the host system 11 has not left and the current status of the host system 11 is Status is not idle. On the contrary, when the user does not appear in front of the camera, the processor 113 can determine according to the image captured by the sensor 112 that the operator of the host system 11 has left and the current state of the host system 11 is idle.

在一實施例中,處理器113也可分析當前使用者對於主機系統11的操作狀態來判斷主機系統11的操作者是否已離開及/或主機系統11當下的狀態是否為閒置狀態。例如,處理器113可持續偵測使用者對主機系統11的滑鼠、鍵盤、處控板及/或觸控螢幕等輸入/輸出裝置的操作狀態。當使用者在某一段時間範圍內完全未操作所述輸入/輸出裝置,則處理器113可判定主機系統11的操作者已離開。反之,若使用者在所述時間範圍內持續有在使用或操作所述輸入/輸出裝置,則處理器113可判定主機系統11的操作者未離開。In one embodiment, the processor 113 can also analyze the current user's operating state of the host system 11 to determine whether the operator of the host system 11 has left and/or whether the current state of the host system 11 is idle. For example, the processor 113 can continuously detect the operation status of the input/output devices such as the mouse, the keyboard, the control panel and/or the touch screen of the host system 11 by the user. When the user does not operate the input/output device within a certain period of time, the processor 113 may determine that the operator of the host system 11 has left. On the contrary, if the user continues to use or operate the input/output device within the time range, the processor 113 may determine that the operator of the host system 11 has not left.

在一實施例中,在主機系統11處於閒置狀態(例如主機系統11的操作者已離開的狀態)時,主機系統11可藉由所述第一控制指令指示記憶體裝置12進入較為省電的第二工作狀態並使記憶體裝置12在進入第二工作狀態前有更充足的時間執行所述背景資料整理。特別是,在主機系統11處於閒置狀態(例如主機系統11的操作者已離開的狀態)時,即便記憶體裝置12花費更多時間執行工作狀態的切換,對主機系統11的操作體驗的影響不會太大,甚至可被忽略。In one embodiment, when the host system 11 is in an idle state (such as a state where the operator of the host system 11 has left), the host system 11 can use the first control command to instruct the memory device 12 to enter a relatively power-saving mode. The second working state allows the memory device 12 to have more time to execute the background data sorting before entering the second working state. In particular, when the host system 11 is in an idle state (such as a state where the operator of the host system 11 has left), even if the memory device 12 takes more time to switch between working states, the operating experience of the host system 11 will not be affected. would be too large to be ignored.

在一實施例中,在主機系統11脫離所述閒置狀態(例如主機系統11的操作者回來)後,主機系統11可藉由所述第二控制指令指示記憶體裝置12回復為工作效率較高的第一工作狀態並基於預設的緩衝時間來自主運作。特別是,記憶體裝置12內部的參數(包含所述緩衝時間)一般都是出廠前就設定好的合適的數值。因此,在主機系統11恢復正常操作狀態後,讓記憶體裝置12基於預設的緩衝時間來自主運作,可避免對記憶體裝置12的運作產生過度干涉,進而使記憶體裝置12處於較佳的工作狀態。In one embodiment, after the host system 11 leaves the idle state (for example, the operator of the host system 11 returns), the host system 11 can use the second control command to instruct the memory device 12 to return to a higher working efficiency The first working state of the system is automatically operated based on the preset buffer time. In particular, the internal parameters of the memory device 12 (including the buffer time) are generally set to appropriate values before leaving the factory. Therefore, after the host system 11 returns to the normal operating state, allowing the memory device 12 to operate autonomously based on the preset buffer time can avoid excessive interference with the operation of the memory device 12, thereby keeping the memory device 12 in a better state. working status.

圖4是根據本發明的一實施例所繪示的記憶體裝置的工作狀態控制方法的流程圖。請參照圖4,在步驟S401中,偵測主機系統的狀態。在步驟S402中,判斷所述主機系統的狀態是否為閒置狀態。響應於所述主機系統的狀態為閒置狀態,在步驟S403中,發送第一控制指令至所述記憶體裝置。所述第一控制指令用以調整所述記憶體裝置從第一工作狀態切換至第二工作狀態的緩衝時間。此外,若所述主機系統的狀態非為閒置狀態,步驟S401可重複執行。FIG. 4 is a flow chart of a method for controlling the working state of a memory device according to an embodiment of the present invention. Please refer to FIG. 4 , in step S401 , the state of the host system is detected. In step S402, it is determined whether the state of the host system is an idle state. In response to the state of the host system being an idle state, in step S403, a first control command is sent to the memory device. The first control instruction is used to adjust the buffer time for the memory device to switch from the first working state to the second working state. In addition, if the state of the host system is not idle state, step S401 may be repeatedly executed.

圖5是根據本發明的一實施例所繪示的記憶體裝置的工作狀態控制方法的流程圖。請參照圖5,在步驟S501中,偵測主機系統的狀態。在步驟S502中,判斷所述主機系統的狀態是否為閒置狀態。響應於所述主機系統的狀態為閒置狀態,在步驟S503中,發送第一控制指令至所述記憶體裝置,以調整所述記憶體裝置從第一工作狀態切換至第二工作狀態的緩衝時間。在步驟S504中,響應於第一控制指令,所述記憶體裝置從第一工作狀態切換至第二工作狀態。此外,若在步驟S502中判定所述主機系統的狀態非為閒置狀態,則步驟S501可重複執行。FIG. 5 is a flowchart of a method for controlling the working state of a memory device according to an embodiment of the present invention. Please refer to FIG. 5 , in step S501 , the state of the host system is detected. In step S502, it is judged whether the state of the host system is an idle state. In response to the state of the host system being an idle state, in step S503, sending a first control command to the memory device to adjust the buffer time for the memory device to switch from the first working state to the second working state . In step S504, in response to the first control instruction, the memory device switches from the first working state to the second working state. In addition, if it is determined in step S502 that the state of the host system is not an idle state, then step S501 may be repeatedly executed.

在所述記憶體裝置處於第二工作狀態的狀態下,在步驟S505中,判斷所述主機系統的狀態是否為閒置狀態。若所述主機系統的狀態為閒置狀態,步驟S505可重複執行。若所述主機系統的狀態非為閒置狀態,在步驟S506中,發送第二控制指令至所述記憶體裝置,以將經調整的所述緩衝時間回復為預設值。在步驟S507中,響應於第二控制指令,所述記憶體裝置從第二工作狀態回復為第一工作狀態。在步驟S507之後,步驟S501可重複執行。When the memory device is in the second working state, in step S505, it is determined whether the state of the host system is an idle state. If the state of the host system is idle, step S505 may be repeated. If the state of the host system is not the idle state, in step S506, a second control command is sent to the memory device to restore the adjusted buffer time to a preset value. In step S507, in response to the second control instruction, the memory device returns from the second working state to the first working state. After step S507, step S501 may be executed repeatedly.

然而,圖4與圖5中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖4與圖5中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖4與圖5的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, each step in FIG. 4 and FIG. 5 has been described in detail above, and will not be repeated here. It should be noted that each step in FIG. 4 and FIG. 5 can be implemented as a plurality of program codes or circuits, which is not limited by the present invention. In addition, the methods shown in FIG. 4 and FIG. 5 can be used together with the above exemplary embodiments, or can be used alone, which is not limited by the present invention.

綜上所述,本發明的實施例提出可在主機系統處於閒置狀態(例如主機系統的操作者已離開的狀態)時,適度延長記憶體裝置切換工作狀態時的緩衝時間。藉此,可在不影響主機系統的操作體驗的前提下,適度延長記憶體裝置執行背景資料整理的時間,從而提升記憶體裝置的工作效率。To sum up, the embodiments of the present invention propose that when the host system is in an idle state (for example, the operator of the host system has left), the buffer time when the memory device switches working states can be moderately extended. In this way, without affecting the operating experience of the host system, the time for the memory device to perform background data sorting can be moderately extended, thereby improving the working efficiency of the memory device.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above with the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field may make some changes and modifications without departing from the spirit and scope of the present invention. The scope of protection of the present invention should be defined by the scope of the appended patent application.

11:主機系統 111, 121:連接介面 112:感測器 113:處理器 12:記憶體裝置 122:記憶體模組 1221:快取區 1222:儲存區 123:記憶體控制器 T(0), T(1), T(2):時間點 BF(T), BF(0) , BF(1):緩衝時間 S401~S403, S501~S507:步驟 11: Host system 111, 121: Connection interface 112: sensor 113: Processor 12: Memory device 122:Memory module 1221: cache area 1222: storage area 123: Memory controller T(0), T(1), T(2): time points BF(T), BF(0) , BF(1): buffer time S401~S403, S501~S507: steps

圖1是根據本發明的一實施例所繪示的資料儲存系統的示意圖。 圖2是根據本發明的一實施例所繪示的工作狀態控制的操作時序示意圖。 圖3是根據本發明的一實施例所繪示的調整切換工作狀態之間的緩衝時間的示意圖。 圖4是根據本發明的一實施例所繪示的記憶體裝置的工作狀態控制方法的流程圖。 圖5是根據本發明的一實施例所繪示的記憶體裝置的工作狀態控制方法的流程圖。 FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present invention. FIG. 2 is a schematic diagram of an operation sequence of working state control according to an embodiment of the present invention. FIG. 3 is a schematic diagram of adjusting buffer time between switching working states according to an embodiment of the present invention. FIG. 4 is a flow chart of a method for controlling the working state of a memory device according to an embodiment of the present invention. FIG. 5 is a flowchart of a method for controlling the working state of a memory device according to an embodiment of the present invention.

S401~S403:步驟 S401~S403: steps

Claims (9)

一種記憶體裝置的工作狀態控制方法,用於一主機系統,其中該主機系統耦接至該記憶體裝置,且該工作狀態控制方法包括:偵測該主機系統的狀態;以及響應於該主機系統的該狀態為一閒置狀態,發送一第一控制指令至該記憶體裝置,其中該第一控制指令用以調整該記憶體裝置從一第一工作狀態切換至一第二工作狀態的一緩衝時間,並且在該緩衝時間內,該記憶體裝置執行一背景資料整理,以將有效資料從至少一第一實體單元搬移至至少一第二實體單元。 A working state control method of a memory device, used in a host system, wherein the host system is coupled to the memory device, and the working state control method includes: detecting the state of the host system; and responding to the host system The state is an idle state, and a first control command is sent to the memory device, wherein the first control command is used to adjust a buffer time for the memory device to switch from a first working state to a second working state , and within the buffer time, the memory device executes a background data arrangement to move valid data from at least one first physical unit to at least one second physical unit. 如請求項1所述的工作狀態控制方法,其中偵測該主機系統的該狀態的步驟包括:偵測該主機系統的一操作者是否已離開;以及若該主機系統的該操作者已離開,判定該主機系統的該狀態為該閒置狀態。 The working state control method as described in claim 1, wherein the step of detecting the state of the host system includes: detecting whether an operator of the host system has left; and if the operator of the host system has left, It is determined that the state of the host system is the idle state. 如請求項1所述的工作狀態控制方法,其中該第一控制指令更用以指示該記憶體裝置從該第一工作狀態切換至該第二工作狀態。 The working state control method as claimed in claim 1, wherein the first control command is further used to instruct the memory device to switch from the first working state to the second working state. 如請求項1所述的工作狀態控制方法,其中該記憶體裝置在該第一工作狀態下的一系統效能高於該記憶體裝置在該第二工作狀態下的一系統效能。 The working state control method according to claim 1, wherein a system performance of the memory device in the first working state is higher than a system performance of the memory device in the second working state. 如請求項1所述的工作狀態控制方法,其中調整後的該緩衝時間大於該緩衝時間的一預設值。 The working state control method according to claim 1, wherein the adjusted buffer time is greater than a preset value of the buffer time. 如請求項1所述的工作狀態控制方法,其中該至少一第一實體單元中的每一個記憶胞用以儲存N個位元,該至少一第二實體單元中的每一個記憶胞用以儲存M個位元,且M大於N。 The working state control method as described in claim 1, wherein each memory cell in the at least one first physical unit is used to store N bits, and each memory cell in the at least one second physical unit is used to store M bits, and M is greater than N. 如請求項1所述的工作狀態控制方法,更包括:響應於該主機系統的該狀態非為該閒置狀態,發送一第二控制指令至該記憶體裝置,其中該第二控制指令用以指示該記憶體裝置從該第二工作狀態回復為該第一工作狀態並將該緩衝時間回復為一預設值。 The working state control method as described in claim 1, further comprising: in response to the state of the host system being not the idle state, sending a second control command to the memory device, wherein the second control command is used to indicate The memory device returns from the second working state to the first working state and restores the buffer time to a preset value. 一種資料儲存系統,包括:一主機系統;以及一記憶體裝置,耦接至該主機系統並用以儲存來自該主機系統的資料,其中該主機系統用以偵測該主機系統的狀態,該主機系統更用以響應於該主機系統的該狀態為一閒置狀態,發送一第一控制指令至該記憶體裝置,並且該記憶體裝置用以根據該第一控制指令調整從一第一工作狀態切換至一第二工作狀態的一緩衝時間,並且在該緩衝時間內,該記憶體裝置執行一背景資料整理,以將有效資料從至少一第一實體單元搬移至至少一第二實體單元。 A data storage system, comprising: a host system; and a memory device coupled to the host system and used to store data from the host system, wherein the host system is used to detect the status of the host system, the host system It is further used to send a first control command to the memory device in response to the state of the host system being an idle state, and the memory device is used to adjust switching from a first working state to a first working state according to the first control command. A buffer time of a second working state, and during the buffer time, the memory device executes a background data arrangement to move valid data from at least one first physical unit to at least one second physical unit. 如請求項8所述的資料儲存系統,其中該記憶體裝置更用以根據該第一控制指令從該第一工作狀態切換至該第二工作狀態。 The data storage system as claimed in claim 8, wherein the memory device is further configured to switch from the first working state to the second working state according to the first control command.
TW110109210A 2021-03-15 2021-03-15 Work status control method for memory device and data storage system TWI790568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110109210A TWI790568B (en) 2021-03-15 2021-03-15 Work status control method for memory device and data storage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110109210A TWI790568B (en) 2021-03-15 2021-03-15 Work status control method for memory device and data storage system

Publications (2)

Publication Number Publication Date
TW202238375A TW202238375A (en) 2022-10-01
TWI790568B true TWI790568B (en) 2023-01-21

Family

ID=85460283

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110109210A TWI790568B (en) 2021-03-15 2021-03-15 Work status control method for memory device and data storage system

Country Status (1)

Country Link
TW (1) TWI790568B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200915331A (en) * 2007-09-28 2009-04-01 Super Talent Electronics Inc Managing bad blocks in various flash memory cells for electronic data flash card
US20110208892A1 (en) * 2010-02-25 2011-08-25 Fresco Logic, Inc. Method and apparatus for scheduling transactions in a multi-speed bus environment
CN102637146A (en) * 2011-02-11 2012-08-15 慧荣科技股份有限公司 Method for managing blocks, memory device and controller thereof
TWI450184B (en) * 2009-11-30 2014-08-21 Yang Chang Lien Ou Hot swap method for dram
TW202006553A (en) * 2017-09-22 2020-02-01 慧榮科技股份有限公司 Methods for internal data movement of a flash memory and apparatuses using the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200915331A (en) * 2007-09-28 2009-04-01 Super Talent Electronics Inc Managing bad blocks in various flash memory cells for electronic data flash card
TWI450184B (en) * 2009-11-30 2014-08-21 Yang Chang Lien Ou Hot swap method for dram
US20110208892A1 (en) * 2010-02-25 2011-08-25 Fresco Logic, Inc. Method and apparatus for scheduling transactions in a multi-speed bus environment
CN102637146A (en) * 2011-02-11 2012-08-15 慧荣科技股份有限公司 Method for managing blocks, memory device and controller thereof
TW202006553A (en) * 2017-09-22 2020-02-01 慧榮科技股份有限公司 Methods for internal data movement of a flash memory and apparatuses using the same

Also Published As

Publication number Publication date
TW202238375A (en) 2022-10-01

Similar Documents

Publication Publication Date Title
KR101498673B1 (en) Solid state drive, data storing method thereof, and computing system including the same
TWI409633B (en) Flash memory storage device, controller thereof, and method for programming data
US20130013853A1 (en) Command executing method, memory controller and memory storage apparatus
US20150052415A1 (en) Data storage device, operating method thereof and data processing system including the same
US8423838B2 (en) Block management method, memory controller, and memory storage apparatus
TWI421869B (en) Data writing method for a flash memory, and controller and storage system using the same
TWI698749B (en) A data storage device and a data processing method
US20140215130A1 (en) Clock switching method, memory controller and memory storage apparatus
CN111400201A (en) Data sorting method of flash memory, storage device and control circuit unit
US20220187987A1 (en) Temperature control method and data storage system
US11693567B2 (en) Memory performance optimization method, memory control circuit unit and memory storage device
TW201814489A (en) Data storage method and data storage system
US10558562B2 (en) Data storage device and operating method thereof
EP3772682A1 (en) Method and apparatus to improve write bandwidth of a block-based multi-level cell non-volatile memory
TWI790568B (en) Work status control method for memory device and data storage system
KR102425470B1 (en) Data storage device and operating method thereof
CN113094306B (en) Effective data management method, memory storage device and memory controller
CN112068782B (en) Memory management method, memory storage device and memory control circuit unit
TW202125206A (en) Memory management method and memory device
TWI768829B (en) Parameter adjusting method for a memory device and a memory storage system
TWI790512B (en) Storage control method and storage system
CN112988068B (en) Memory control method, memory storage device and memory controller
KR20200078101A (en) Memory system and operating method thereof
CN117632038B (en) Wear leveling method, memory storage device and memory control circuit unit
TWI768737B (en) Skipped data clean method and data storage system