Storage device preventing loss of data in situation of lacking power and operating method thereof
The storage device addresses data loss in volatile memory by using a storage controller to prioritize and move data to a selected portion with backup power, ensuring data preservation during power shortages.
Patent Information
- Application Number
- KR1020220107855
- Authority / Receiving Office
- KR · KR
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2022-05-31
- Filing Date
- 2022-08-26
- Publication Date
- 2026-11-11
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Volatile semiconductor memory devices risk data loss during sudden power shortages or power glitches, as data temporarily stored in the volatile memory is not preserved when the power supply is interrupted.
A storage device with a non-volatile memory and a volatile memory buffer that employs a storage controller to prioritize and move data from the volatile memory to a selected portion during power shortages, using backup power to ensure data preservation until main power is restored.
Prevents data loss in volatile memory by strategically moving and preserving data in a selected portion of the volatile memory using backup power, ensuring data integrity during sudden power outages.
Smart Images

Figure 112022090012134-PAT00011_ABST
Abstract
Description
Technology Field
[0001] The present invention relates to a storage device, and more specifically, to a storage device that prevents data loss in a power shortage situation and a method of operating the same. Background Technology
[0002] Semiconductor memory devices can be broadly classified into volatile semiconductor memory devices and non-volatile semiconductor memory devices. Volatile semiconductor memory devices offer fast read and write speeds but have the disadvantage that stored data is lost if the power supply is cut off. On the other hand, non-volatile semiconductor memory devices preserve their data even if the power supply is interrupted. Therefore, non-volatile semiconductor memory devices are used to store data that must be preserved regardless of power supply.
[0003] The storage device may include a non-volatile memory device and a volatile memory device. The storage device may use the volatile memory device as a buffer memory to temporarily store data to be stored in the non-volatile memory device. However, in the event of a sudden power shortage (e.g., sudden power off (SPO) or power glitch), there is a risk that the data temporarily stored in the volatile memory device will be lost. In this case, the storage device may perform a data flushing operation to dump the data stored in the volatile memory device into the non-volatile memory device. The problem to be solved
[0004] The present invention is intended to solve the aforementioned problems, and the objective of the present invention is to provide a storage device that protects data stored in volatile memory until the main power of the host system is restored by moving data scattered in volatile memory to a part of the volatile memory in the event of a sudden main power shortage of the host system (e.g., SPO or power glitch) and supplying a backup power source only to the part of the volatile memory where the data has been moved. means of solving the problem
[0005] A method for preventing data loss in a storage device according to the present invention may include: receiving a query plan corresponding to necessary data stored in volatile memory from a host system; generating a data priority list corresponding to the necessary data based on the query plan; selecting at least a portion of the volatile memory based on the data priority list when the main power supplied from the host system decreases to a specified size or less; and moving the necessary data to the selected at least portion of the volatile memory.
[0006] Additionally, the step of receiving the query plan may include the step of dividing the volatile memory into a plurality of partial regions; and the step of dividing and storing the necessary data in the plurality of partial regions.
[0007] Additionally, the step of selecting at least a portion of the volatile memory may include selecting a partial region of the volatile memory that contains the largest data among the partial data of the required data.
[0008] Additionally, the step of selecting at least a portion of the volatile memory may include selecting at least one partial region of the volatile memory that includes partial data of a specified size or larger among the partial data of the required data.
[0009] Additionally, the step of selecting at least a portion of the volatile memory may include selecting at least one partial region of the volatile memory containing valid required data to be executed first after the main power is reduced to a specified power or lower according to the data priority list.
[0010] Additionally, the step of selecting at least a portion of the volatile memory may include selecting a partial region of the volatile memory in which the largest of the partial data of the valid required data is stored.
[0011] Additionally, the step of moving the necessary data to at least a selected portion of the volatile memory may include not moving invalid necessary data, which was performed before the main power in the data priority list was reduced to a power level below a specified power, to at least a selected portion of the volatile memory.
[0012] Additionally, if the main power supplied from the host system decreases to a specified power level or lower, the method may further include the step of supplying backup power to the volatile memory through an internal backup power source or an external backup power source.
[0013] Additionally, the method may further include a step of cutting off the supply of reserve power to a non-selected portion of the volatile memory after the data stored in the volatile memory is moved to at least a selected portion of the volatile memory.
[0014] A storage device according to the present invention may include: a non-volatile memory that inputs and outputs data based on a request from a host system; a volatile memory that stores necessary data used for input / output operations of the non-volatile memory; and a storage controller that controls the input / output of data between the non-volatile memory and the volatile memory. The storage controller may receive a query plan corresponding to the necessary data from the host system, generate a data priority list corresponding to the necessary data based on the query plan, and, when the main power from the host system decreases to a specified size or less, select a portion of the volatile memory based on the data priority list and move the necessary data to the selected portion of the volatile memory.
[0015] In addition, the volatile memory includes a plurality of partial regions, and the necessary data may be divided and stored in the plurality of partial regions.
[0016] Additionally, the storage controller may select a portion of the volatile memory containing the largest portion of the required data based on the data priority list.
[0017] Additionally, the storage controller may select at least one partial region of the volatile memory containing partial data of a specified size or larger among the necessary data based on the data priority list.
[0018] Additionally, the storage controller may select a portion of the volatile memory where necessary data is stored, which is executed after the point in time when the main power decreases to a specified size or less, based on the data priority list.
[0019] Additionally, the storage controller may select a portion of the volatile memory in which the largest portion of the necessary data is stored, which is executed after the point in time when the main power decreases to a specified size or less.
[0020] A storage device according to the present invention may include: a non-volatile memory that inputs and outputs data based on a request from a host system; a volatile memory that stores necessary data used for input / output operations of the non-volatile memory; a storage controller that controls data input / output of the non-volatile memory and the volatile memory; and an internal backup power source that supplies backup power to the volatile memory device when the main power from the host system decreases to a specified level or lower. The storage controller may receive a query plan corresponding to the necessary data from the host system, generate a data priority list corresponding to the necessary data based on the query plan, select a portion of the volatile memory based on the data priority list when the main power decreases to a specified level or lower, move the necessary data to the selected portion of the volatile memory, and then cut off the backup power supplied to the unselected portion of the volatile memory.
[0021] Additionally, the volatile memory includes a plurality of memory chips, and when the main power decreases to a specified size or less, the storage controller can select some of the plurality of memory chips.
[0022] In addition, the storage controller can select one of the plurality of memory chips, move the necessary data to the selected memory chip, and cut off the power supply to at least one of the remaining memory chips.
[0023] In addition, the storage controller can select at least two of the plurality of memory chips, move the necessary data to the selected memory chips, and cut off the power supply to the remaining at least one memory chip.
[0024] In addition, the storage controller can supply backup power supplied from an external backup power source to only a selected portion of the volatile memory. Effects of the invention
[0025] According to the present invention, when a sudden main power shortage situation of the host system occurs (e.g., SPO (sudden power off) or power glitch), the loss of data stored in volatile memory can be prevented until the main power of the host system is restored. Brief explanation of the drawing
[0026] FIG. 1 is a drawing showing a computing system according to one embodiment. Figure 2 is a drawing showing the storage device of Figure 1. Figure 3 is a diagram showing how a data priority list is generated by the storage controller of Figure 2. FIG. 4 is a diagram showing multiple partial regions of a volatile memory in which the necessary data of FIG. 3 is stored in a distributed manner. Figure 5 is a diagram showing a data priority list generated by the storage controller of Figure 3. FIG. 6 is a diagram illustrating an example of a method for moving necessary data within volatile memory when the main power of the host system decreases to below a specified power based on the data priority of FIG. 5. FIG. 7 is a diagram showing another example of a method for moving necessary data within volatile memory when the main power of the host system decreases to below a specified power based on the data priority of FIG. 5. FIG. 8 is a diagram showing another example of a method for moving necessary data within volatile memory when the main power of the host system decreases to below a specified power based on the data priority of FIG. 5. FIG. 9 is a diagram showing another example of a method for moving necessary data within volatile memory when the main power of the host system decreases to below a specified power based on the data priority of FIG. 5. FIG. 10 is a diagram showing another example of a method for moving necessary data within volatile memory when the main power of the host system decreases to below a specified power based on the data priority of FIG. 5. FIG. 11 is a flowchart illustrating a method for preventing data loss in the event of a power shortage in a storage device according to one embodiment. FIG. 12 is a drawing showing a volatile memory module included in a storage device according to one embodiment. Specific details for implementing the invention
[0027] In the following, embodiments of the present invention will be described clearly and in detail so that a person skilled in the art can easily practice the present invention.
[0028] FIG. 1 is a drawing illustrating a computing system according to one embodiment. Referring to FIG. 1, the computing system (100) may include a host system (110), a backplane (120), at least one storage device (1100), and at least one external backup power source (1200). As an example, the computing system (100) may include a PC or a server system, etc.
[0029] According to one embodiment, the host system (110) can control the computing system (100) overall. For example, the host system (110) may include components necessary to control the computing system (100), such as a processor, memory, and power supply (111). The processor and memory may be mounted on a main board and operated. The power supply (111) may supply main power to the processor and memory through the main board.
[0030] According to one embodiment, the processor can control the operation of at least one storage device (1100) and at least one external backup power source (1200). For example, the processor may be at least one of a System-on-Chip (SoC), such as an Application Processor (AP) for controlling the storage device (1100), a Central Processing Unit (CPU), a Digital Signal Processor (DSP), and a Graphics Processing Unit (GPU). The processor can run various software or firmware stored in memory.
[0031] According to one embodiment, the memory may store various software or firmware to control the operation of at least one storage device (1100) and at least one external backup power source (1200). For example, the memory may be a volatile memory device such as Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate (DDR) DRAM, DDR SDRAM, Low Power Double Data Rate (LPDDR) SDRAM, Graphics Double Data Rate (GDDR) SDRAM, Rambus Dynamic Random Access Memory (RDRAM), Static Random Access Memory (SRAM), etc.
[0032] According to one embodiment, the power supply (111) can supply power to at least one storage device (1100) and at least one external backup power source (1200) through the backplane (120). For example, the power supply (111) can provide main power to at least one storage device (1100). The power supply (111) can charge at least one external backup power source (1200).
[0033] According to one embodiment, the backplane (120) may connect a host system (110), at least one storage device (1100), and at least one external backup power source (1200). For example, the at least one storage device (1100) and at least one external backup power source (1200) may be configured in the form of modules connected to sockets or slots provided in the backplane (120). The backplane (120) may include a switching block for interfacing between at least one storage device (1100) and the host system (110).
[0034] According to one embodiment, the storage device (1100) can store data received from the host system (110). The storage device (1100) can transmit the stored data upon request from the host system (110). For example, the storage device (1100) and the host system (110) may be connected via a host interface. The host interface may include standard interfaces such as ATA, SATA, PATA, USB, SCSI, ESDI, IEEE 1394, IDE, card interface, or CXL (compute express link). The storage device (1100) may be a data storage device based on flash memory. As an example, the storage device (1100) may include a solid-state drive (SSD), UFS, and a memory card.
[0035] According to one embodiment, an external backup power source (1200) can supply power to a storage device (1100) when main power is not supplied from the power supply (111) of the host system (110). For example, the external backup power source (1200) may include a rechargeable battery. The external backup power source (1200) can be charged by receiving power from the power supply (111) of the host system (110). The external backup power source (1200) can charge an internal backup power source (or internal capacitor) of the storage device (1100).
[0036] FIG. 2 is a drawing showing the storage device of FIG. 1. Referring to FIG. 2, the storage device (1100) may include a storage controller (1110), a non-volatile memory (1120), a volatile memory (1130), a power loss protection circuit (1140), and an internal backup power source (1150).
[0037] According to one embodiment, the storage controller (1110) may be configured to control the non-volatile memory (1120). For example, the storage controller (1110) may write data to the non-volatile memory (1120) or read data stored in the non-volatile memory (1120) upon a request from the host system (110). To access the non-volatile memory (120), the storage controller (1110) may provide instructions, addresses, data, and control signals to the non-volatile memory (1120).
[0038] According to one embodiment, the storage controller (1110) can perform access operations to write data to the volatile memory (1130) or to read data stored in the volatile memory (1130). For example, the storage controller (1110) can provide commands, addresses, data, and control signals to the volatile memory (1130) to write data to the volatile memory (1130) or to read data stored in the volatile memory (1130). The storage controller (1110) can temporarily store data received from the host system (110) or the non-volatile memory (1120) in the volatile memory (1130).
[0039] According to one embodiment, the non-volatile memory (1120) can perform data input / output in response to the control of the storage controller (1110). For example, the non-volatile memory (1120) may include NAND flash memory, NOR flash memory, FRAM (Ferroelectric Random Access Memory), PRAM (Phase Change Random Access Memory), TRAM (Thyristor Random Access Memory), or MRAM (Magnetic Random Access Memory).
[0040] According to one embodiment, the volatile memory (1130) may be used as an operating memory, cache memory, or buffer memory of the storage controller (1110). The volatile memory (1130) may also be used as a cache memory of the non-volatile memory (1120). The volatile memory (1130) may store codes and commands executed by the storage controller (1110). The volatile memory (1130) may store data processed by the storage controller (1110). For example, the volatile memory (1130) may include Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate (DDR) DRAM, DDR SDRAM, Low Power Double Data Rate (LPDDR) SDRAM, Graphics Double Data Rate (GDDR) SDRAM, Rambus Dynamic Random Access Memory (RDRAM), or Static Random Access Memory (SRAM), etc. Although the advantages of the present invention have been described in this specification based on DRAM, the technical scope of the present disclosure is not limited thereto.
[0041] According to one embodiment, the power loss prevention circuit (1140) can manage the power supply within the storage device (1100). For example, the power loss prevention circuit (1140) can supply main power supplied from the power supply (111) of the host system (110) to the storage controller (1110), non-volatile memory (1120), or volatile memory (1130). The power loss prevention circuit (1140) can supply main power supplied from the power supply (111) of the host system (110) to an internal backup power source (1150). The power loss prevention circuit (1140) can supply power supplied from an external backup power source (1200) to the internal backup power source (1150).
[0042] According to one embodiment, the power loss prevention circuit (1140) may notify the storage controller (1110) when a main power shortage situation (e.g., SPO or power glitch) occurs in the host system (110) (or when the main power decreases below a specified amount). For example, when the main power from the power supply (111) of the host system (110) decreases below a specified amount, the power loss prevention circuit (1140) may supply backup power from an internal backup power source (1150) or an external backup power source (1200) to the storage controller (1110), non-volatile memory (1120), or volatile memory (1130). When the main power decreases below a specified amount, the power loss prevention circuit (1140) may supply power to only a specified portion of the volatile memory (1130). For example, the power loss prevention circuit (1140) may be implemented as a separate circuit from the storage controller (1110). As another example, the power loss prevention circuit (1140) may be configured to be included in the storage controller (1110).
[0043] According to one embodiment, the power loss prevention circuit (1140) can manage the power supply path of an internal backup power source (1150) or an external backup power source (1200). For example, the power loss prevention circuit (1140) can manage the power supply path from the internal backup power source (1150) to the storage controller (1110), non-volatile memory (1120), or volatile memory (1130). The power loss prevention circuit (1140) can manage the power supply path from the external backup power source (1200) to the storage controller (1110), non-volatile memory (1120), volatile memory (1130), or internal backup power source (1150).
[0044] According to one embodiment, in the event of a main power shortage situation (e.g., SPO or power glitch) of the host system (110) (or when the main power decreases below a specified level), the internal backup power source (1150) may supply power to the storage controller (1110), non-volatile memory (1120), or volatile memory (1130) through the power loss prevention circuit (1140). The internal backup power source (1150) may be charged by receiving power from the power supply (111) of the host system (110) or an external backup power source (1200). As an example, the internal backup power source (1150) may include a capacitor, a supercapacitor, or a rechargeable battery.
[0045] According to one embodiment, the storage controller (1110) can divide the volatile memory (1130) into multiple power supply areas and manage power supply for each power supply area. For example, the storage controller (1110) can control the power loss prevention circuit (1140) to supply power to the volatile memory (1130) for each power supply area. The storage controller (1110) can set up an area in a part of the volatile memory (1130) that receives power redundantly from an internal backup power source (1150) and an external backup power source (1200). The storage controller (1110) can set up multiple areas that receive power based on the remaining amount of the external backup power source (1200).
[0046] FIG. 3 is a diagram illustrating how a data priority list is generated by the storage controller of FIG. 2. FIG. 4 is a diagram illustrating multiple sub-regions of volatile memory in which the necessary data of FIG. 3 is distributed and stored. Referring to FIG. 3, the storage controller (1110) can receive a query plan from the host system (110). For example, some of the database structure or database system may be based on Structured Query Language (SQL). In a database structure or database system based on Structured Query Language (SQL), a user or host system (110) who wishes to retrieve data stored in the storage device (1100) can transmit a query containing a search goal or search target to the database structure or database system. The database structure or database system can analyze the query, generate a query plan, and retrieve data from the storage device (1100) according to the query plan. The processing quality of a query (e.g., processing speed) can be determined by the time taken to retrieve data according to the query plan. As the time taken to retrieve data increases, the processing speed of the query decreases, and thus the processing quality of the query may decrease. To improve the processing quality of the query, i.e., the processing speed, the host system (110) establishes a query plan, and the storage controller (1110) can receive the query plan from the host system (110).
[0047] Referring to FIG. 4, the storage controller (1110) can divide the volatile memory (1130) into a plurality of partial regions and store necessary data in the plurality of partial regions. The necessary data may include data temporarily stored to be stored in the non-volatile memory (1120), data temporarily stored to be transmitted to the host system (110), or data necessary for the operation of the storage device (1100). For example, the storage controller (1110) may divide the volatile memory (1130) into a first partial region (1131), a second partial region (1132), a third partial region (1133), or a fourth partial region (1134). However, this is exemplary, and the volatile memory (1130) may be divided into at least two partial regions. The plurality of partial regions of the volatile memory (1130) may be divided through logical division units or physical division units (e.g., memory chip units). The first required data (D1), the second required data (D2), or the third required data (D3) may be stored distributed in the first partial area (1131), the second partial area (1132), the third partial area (1133), or the fourth partial area (1134).
[0048] According to one embodiment, the storage controller (1110) may generate a data priority list (10) based on a query plan. The data priority list (10) may include detailed information on necessary data stored by dividing it into multiple sub-regions. The data priority list (10) may include information such as the execution order of the necessary data, the size of the necessary data, or the storage location of the necessary data. For example, the storage controller (1110) may receive a query plan corresponding to the first necessary data (D1), the second necessary data (D2), or the third necessary data (D3). Based on the query plan, the storage controller (1110) may generate a data priority list (10) in which the first necessary data (D1) is set as the first priority (1st), the second data (D1) as the second priority (2nd), and the third necessary data (D3) as the third priority (3rd). However, this is exemplary, and the number or size of the data included in the data priority list (10) may vary. According to one embodiment, the data priority list (10) may include size information of the required data. For example, the first required data (D1) may have a first data size (DS1). The second required data (D2) may have a second data size (DS2). The third required data (D3) may have a third data size (DS3).
[0049] According to one embodiment, the data priority list (10) may include a location where the necessary data is stored. Additionally, the data priority list (10) may include information about a partial area where the maximum portion of the necessary data is stored. For example, the first necessary data (D1) may be stored in a first partial area (1131), a second partial area (1132), and a third partial area (1133). The maximum portion of the first necessary data (D1) may be stored in the first partial area (1131). The second necessary data (D2) may be stored in the second partial area (1132). The maximum portion of the second necessary data (D2) may be stored in the second partial area (1132). The third necessary data (D3) may be stored in the third partial area (1133) and the fourth partial area (1134). The maximum portion of the third necessary data (D3) may be stored in the fourth partial area (1134).
[0050] FIG. 5 is a diagram showing a data priority list generated by the storage controller of FIG. 3. FIG. 6 through 10 are diagrams showing various methods of moving necessary data within volatile memory when the main power of the host system decreases below a specified power based on the data priority of FIG. 5. Referring to FIG. 5 through 10, when the main power of the host system (110) decreases below a specified power (e.g., in a main power shortage situation (e.g., SPO or power glitch)), the storage controller (1110) can supply backup power (e.g., an internal backup power source (1150) or an external backup power source (1200)) to the volatile memory (1130). The storage controller (1110) can select some of the multiple partial regions of the volatile memory (1130) based on various criteria. The storage controller (1110) can move data stored in the volatile memory (1130) to at least one selected partial region. The storage controller (1110) (or power loss prevention circuit (1140)) can cut off reserve power supplied to an unselected portion of the volatile memory (1130).
[0051] Referring to FIGS. 5 and 6, the storage controller (1110) may select at least one partial area of volatile memory (1130) containing partial data of a specified size or larger (e.g., partial data of the first required data (D1), partial data of the third required data (D3)) based on the data priority list (10). For example, the storage controller (1110) may identify the largest partial data of the first required data (D1) and the second largest partial data of the third required data (D3) in the data priority list (10). The storage controller (1110) may select a first partial area (1131) containing partial data of the first required data (D1) and a fourth partial area (1134) containing partial data of the third required data (D3). The storage controller (1110) can move the remaining partial data (e.g., first required data (D1) and second required data (D2) stored in the second partial area (1132), and first required data (D1) and third required data (D3) stored in the third partial area (1133)) to a selected partial area (e.g., first partial area (1131) or fourth partial area (1134)). For example, the partial data corresponding to the first required data (D1) can be moved to the first partial area (1131). The partial data corresponding to the third required data (D3) can be moved to the fourth partial area (1134). The second required data (D2) can be moved to the first partial area (1131) or the fourth partial area (1134). The storage controller (1110) (or power loss prevention circuit (1140)) can cut off backup power supplied to unselected partial areas (e.g., second partial area (1132) and third partial area (1133)) after the necessary data has been moved.
[0052] Referring to FIGS. 5 and 7, the storage controller (1110) can select a portion of the volatile memory (1130) (e.g., a first portion (1131)) containing the largest portion of data (e.g., portion of the first required data (D1)) based on the data priority list (10). For example, the storage controller (1110) can select the first portion (1131) containing the largest portion of data. The storage controller (1110) can move the remaining portion of data to the first portion (1131). The storage controller (1110) (or power loss prevention circuit (1140)) can cut off the reserve power supplied to the unselected portions (e.g., a second portion (1132), a third portion (1133), and a fourth portion (1134)) after the required data has been moved.
[0053] Referring to FIGS. 5 and 8, the storage controller (1110) may select a partial area of volatile memory (1130) based on the priority of the data priority list (10) or the remaining amount of reserve power, and may move data stored in the volatile memory (1130). For example, the storage controller (1110) may select a first partial area (1131) in which the maximum partial data of the first required data (D1), which is the first priority (1st) in the data priority list (10), is stored. Alternatively, the storage controller (1110) may select a partial area of volatile memory (1130) by considering the remaining amount of reserve power. The storage controller (1110) may determine the number of selected partial areas based on the remaining amount of reserve power. The storage controller (1110) may select the required data to be moved by considering the size of the selected partial area (e.g., the first partial area (1131)). If all necessary data stored in the volatile memory (1130) cannot be moved to the selected first partial area (1131), the storage controller (1110) moves the partial data of the first necessary data (D1) and the second necessary data (D1) to the first partial area (1131) according to the priority of the data priority list (10), and the third necessary data (D3) may not be moved. The storage controller (1110) (or power loss prevention circuit (1140)) may cut off the backup power supplied to the unselected partial areas (e.g., the second partial area (1132), the third partial area (1133), and the fourth partial area (1134)) after the selected necessary data has been moved.
[0054] Referring to FIGS. 5, 9, and 10, the storage controller (1110) may select a portion of volatile memory (1130) containing necessary data to be executed after the point in time when the main power of the host system (110) decreases to a specified power or lower, based on a data priority list (10). For example, if a main power shortage occurs at the first point in time (T1) of FIG. 5, the storage controller (1110) may select a portion of volatile memory (1130) containing partial data of the second necessary data (D2) or the third necessary data (D3), excluding the first necessary data (D1) that was already executed before the first point in time (T1).
[0055] For example, in FIG. 9, the storage controller (1110) may select a fourth partial area (1134) in which the maximum portion of the second required data (D2) and the third required data (D3) is stored. The storage controller (1110) may move the remaining portion of the second required data (D2) and the third required data (D3) to the fourth partial area (1134). The storage controller (1110) may not move the first required data (D1) that has already been moved. The storage controller (1110) (or power loss prevention circuit (1140)) may cut off the reserve power supplied to the unselected partial areas (e.g., the first partial area (1131), the second partial area (1132), and the third partial area (1133)) after the selected required data has been moved.
[0056] In another example, in FIG. 10, the storage controller (1110) may select a second sub-region (1132) in which second required data (D2) with a higher priority is stored in the data priority list (10). The storage controller (1110) may move the distributed third required data (D3) portion data to the second sub-region (1132). The storage controller (1110) may not move the first required data (D1) that has already been moved. The storage controller (1110) (or power loss prevention circuit (1140)) may cut off the backup power supplied to the unselected sub-regions (e.g., first sub-region (1131), third sub-region (1133), and fourth sub-region (1134)) after the selected required data has been moved.
[0057] According to various embodiments, although not illustrated, if a main power shortage occurs at the second time point (T2) of FIG. 5, the storage controller (1110) may select a partial area of volatile memory (1130) containing partial data of the third required data (D3), excluding the first required data (D1) and the second required data (D2) that have already been performed prior to the second time point (T1). The storage controller (1110) may select a fourth partial area (1134) in which the maximum partial data of the third required data (D3) is stored. The storage controller (1110) may move the distributed partial data of the third required data (D3) to the fourth partial area (1134). The storage controller (1110) may not move the first required data (D1) and the second required data (D2) that have already been performed. The storage controller (1110) (or power loss prevention circuit (1140)) can cut off backup power supplied to unselected partial areas (e.g., first partial area (1131), second partial area (1132) and third partial area (1133)) after the selected required data has been moved.
[0058] As described above, the storage device (1100) can supply backup power (e.g., an internal backup power source (1150) or an external backup power source (1200)) to the volatile memory (1130) in the event of a main power shortage. The storage controller (1110) of the present invention can move necessary data stored in the volatile memory (1130) to a selected portion of the volatile memory (1130) according to a data priority list (10) generated based on a query plan received from the host system (110) in the event of a main power shortage. Additionally, the storage controller (1110) can cut off the supply of backup power to a non-selected portion of the volatile memory (1130). Thus, the storage device (1100) can protect the necessary data stored in the volatile memory (1130) with backup power until the main power of the host system (110) is restored.
[0059] FIG. 11 is a flowchart illustrating a method for preventing data loss in the event of a power shortage in a storage device according to one embodiment. Referring to FIGS. 1 through 11, the storage device (1100) can protect necessary data stored in volatile memory (1130) based on a query plan received from a host system (110).
[0060] According to one embodiment, in step S110, the storage controller (1110) may receive a query plan corresponding to the required data (e.g., first required data (D1), second required data (D2), or third required data (D3)) stored in the volatile memory (1130) from the host system (110). For example, a user or the host system (110) who wishes to search for data stored in the storage device (1100) may transmit a query including a search goal or a search target to a database structure or a database system. To improve the processing quality, i.e., processing speed of the query, the host system (110) may establish a query plan, and the storage controller (1110) may receive the query plan from the host system (110).
[0061] According to one embodiment, at step S120, the storage controller (1110) may generate a data priority list (10) corresponding to the required data based on the received query plan (e.g., the data priority list (10) of FIG. 3 or FIG. 5). For example, the data priority list (10) may include information such as the execution order (or priority) of the required data, the size of the required data, or the storage location of the required data. The volatile memory (1130) may be managed by being divided into a plurality of sub-regions. Referring to FIG. 4, as an example, the volatile memory (1130) may be divided into a first sub-region (1131), a second sub-region (1132), a third sub-region (1133), or a fourth sub-region (1134). The storage controller (1110) can store the necessary data (e.g., first necessary data (D1), second necessary data (D2) or third necessary data (D3)) by dividing it into a first partial area (1131), a second partial area (1132), a third partial area (1133), or a fourth partial area (1134).
[0062] According to one embodiment, in step S130, when the main power from the host system (110) decreases to a specified size or less, the storage controller (1110) may select at least a portion of the volatile memory (1130) based on the data priority list (10). For example, in the case of FIG. 6, the storage controller (1110) may select at least one partial area (e.g., a first partial area (1131) and a fourth partial area (1134)) of the volatile memory (1130) containing partial data of a specified size or larger (e.g., partial data of the first required data (D1), partial data of the third required data (D3)) based on the data priority list (10). Additionally, in the case of FIG. 7, the storage controller (1110) may select a partial area of volatile memory (1130) (e.g., a first partial area (1131)) containing the largest partial data (e.g., partial data of the first required data (D1)) based on the data priority list (10). Additionally, in the case of FIG. 8, the storage controller (1110) may select a partial area of volatile memory (1130) (e.g., a first partial area (1131)) based on the priority of the data priority list (10) or the remaining amount of reserve power. Additionally, in the case of FIG. 9 or FIG. 10, the storage controller (1110) may select a partial area of volatile memory (1130) (e.g., a second partial area (1132) or a fourth partial area (1134)) where required data to be performed is stored after the point in time when the main power of the host system (110) decreases to below a specified power, based on the data priority list (10).
[0063] For example, the storage controller (1110) may select a first partial area (1131) in which the maximum partial data of the first required data (D1), which is first priority (1st) in the data priority list (10), is stored. Alternatively, the storage controller (1110) may select a partial area of the volatile memory (1130) in consideration of the remaining amount of reserve power. The storage controller (1110) may determine the number of selected partial areas based on the remaining amount of reserve power. The storage controller (1110) may select the required data to be moved in consideration of the size of the selected partial area (e.g., the first partial area (1131)).
[0064] According to one embodiment, in step S140, the storage controller (1110) may move the necessary data stored in the volatile memory (1130) to at least a selected portion of the volatile memory (1130). For example, in the case of FIG. 6, the storage controller (1110) may move the remaining partial data (e.g., the first necessary data (D1) and the second necessary data (D2) stored in the second partial area (1132), and the first necessary data (D1) and the third necessary data (D3) stored in the third partial area (1133)) to a selected partial area (e.g., the first partial area (1131) or the fourth partial area (1134)). Additionally, in the case of FIG. 7, the storage controller (1110) may move all the remaining partial data to the first partial area (1131). Additionally, in the case of FIG. 8, the storage controller (1110) may move only selected partial data based on the data priority list (10) to a selected partial area (e.g., a first partial area (1131)). Additionally, in the case of FIG. 9 or FIG. 10, the storage controller (1110) may move the remaining necessary data to a partial area of volatile memory (1130) where necessary data to be performed after the point in time when the main power of the host system (110) decreases to a specified power or lower is stored (e.g., a second partial area (1132) or a fourth partial area (1134)). In the case of FIG. 9 or FIG. 10, invalid necessary data that has already been performed may be retained, and only valid necessary data to be performed in the future may be moved.
[0065] According to one embodiment, at step S150, the storage controller (1110) may cut off reserve power to an unselected portion of the volatile memory (1130). For example, if the main power of the host system (110) decreases below a specified power level, the storage controller (1110) (or power loss prevention circuit (1140)) may supply reserve power (e.g., an internal reserve power source (1150) or an external reserve power source (1200)) to the volatile memory (1130). The storage controller (1110) (or power loss prevention circuit (1140)) may cut off the reserve power supplied to the unselected portion area after the necessary data has been moved.
[0066] As described above, the storage device (1100) can supply backup power (e.g., an internal backup power source (1150) or an external backup power source (1200)) to the volatile memory (1130) in the event of a main power shortage. The storage controller (1110) of the present invention can move necessary data stored in the volatile memory (1130) to a selected portion of the volatile memory (1130) according to a data priority list (10) generated based on a query plan received from the host system (110) in the event of a main power shortage. Additionally, the storage controller (1110) can cut off the supply of backup power to a non-selected portion of the volatile memory (1130). Thus, the storage device (1100) can protect the necessary data stored in the volatile memory (1130) with backup power until the main power of the host system (110) is restored.
[0067] FIG. 12 is a drawing showing a volatile memory module included in a storage device according to one embodiment. Referring to FIG. 12, the volatile memory module (2130) may correspond to the volatile memory (1130) of FIG. 2, FIG. 4, FIG. 6 to FIG. 10.
[0068] According to one embodiment, the volatile memory module (2130) may include a plurality of memory chips. For example, the plurality of memory chips may include a first memory chip (2131), a second memory chip (2132), a third memory chip (2133), a fourth memory chip (2134), a fifth memory chip (2135), a sixth memory chip (2136), a seventh memory chip (2137), and an eighth memory chip (2138). However, this is exemplary, and the volatile memory module (2130) may include at least one memory chip.
[0069] According to one embodiment, the storage controller (1110) of FIG. 2 can manage data stored in a plurality of memory chips of a volatile memory module (2130) based on the data loss prevention method of FIG. 11. For example, one partial region of FIG. 4, FIG. 6 to FIG. 10 may correspond to one memory chip of the volatile memory module (2130). The storage controller (1110) can move necessary data stored in a plurality of memory chips to at least one selected memory chip among the plurality of memory chips in the event of a main power shortage. The storage controller (1110) can cut off the reserve power supplied to the remaining memory chips, excluding the memory chip to which the necessary data has been moved.
[0070] According to one embodiment, the storage controller (1110) may group a portion of one memory chip or a plurality of memory chips to form a logical partial region such as that shown in FIGS. 4, 6 to 10. For example, the storage controller (1110) may form at least two of the first to fourth partial regions (1131, 1132, 1133, 1134) of FIGS. 4, 6 to 10 within the first memory chip (2131). For another example, the storage controller (1110) may form adjacent memory chips (e.g., the first memory chip (2131) and the second memory chip (2132)) into a single partial region (e.g., the first partial region (1131) of FIGS. 4, 6 to 10). As another example, the storage controller (1110) can set memory chips that are not adjacent to each other (e.g., the first memory chip (2131) and the fifth memory chip (2135)) into a single partial area (e.g., the first partial area (1131) of FIG. 4, FIG. 6 to FIG. 10).
[0071] The above description describes specific embodiments for implementing the present invention. In addition to the embodiments described above, the present invention may also include embodiments that can be simply modified or easily modified. Furthermore, the present invention may also include technologies that can be easily modified and implemented using the embodiments. Accordingly, the scope of the present invention should not be limited to the embodiments described above, but should be defined by the claims set forth below as well as equivalents to the claims of the present invention.
Claims
Claim 1 A method for preventing data loss in a storage device, comprising: receiving a query plan corresponding to necessary data stored in volatile memory from a host system; generating a data priority list corresponding to the necessary data based on the query plan; selecting at least a portion of the volatile memory based on the data priority list when the main power supplied from the host system decreases to a specified size or less; and moving the necessary data to the selected at least portion of the volatile memory. Claim 2 A method for preventing data loss in a storage device according to claim 1, wherein the step of receiving the query plan comprises: a step of dividing the volatile memory into a plurality of partial regions; and a step of dividing and storing the necessary data in the plurality of partial regions. Claim 3 A method for preventing data loss in a storage device according to claim 2, wherein the step of selecting at least a portion of the volatile memory includes selecting a portion of the volatile memory that contains the largest data among the portions of the required data. Claim 4 A method for preventing data loss in a storage device according to claim 2, wherein the step of selecting at least a portion of the volatile memory comprises selecting at least one portion region of the volatile memory that includes portion data of a specified size or larger among the portion data of the necessary data. Claim 5 A method for preventing data loss in a storage device according to claim 2, wherein the step of selecting at least a portion of the volatile memory comprises selecting at least one partial region of the volatile memory containing valid necessary data to be executed first after the main power is reduced to a specified power or lower according to the data priority list. Claim 6 A method for preventing data loss in a storage device according to claim 5, wherein the step of selecting at least a portion of the volatile memory comprises selecting a portion of the volatile memory in which the largest of the portions of the valid required data is stored. Claim 7 A method for preventing data loss in a storage device according to claim 5, wherein the step of moving the necessary data to at least a selected portion of the volatile memory comprises not moving invalid necessary data, which was performed before the main power in the data priority list is reduced to a power level below a specified power, to at least a selected portion of the volatile memory. Claim 8 A method for preventing data loss in a storage device according to claim 1, further comprising the step of supplying backup power to the volatile memory through an internal backup power source or an external backup power source when the main power supplied from the host system decreases to a specified power or lower. Claim 9 A method for preventing data loss in a storage device according to claim 8, further comprising the step of cutting off the supply of reserve power to a non-selected portion of the volatile memory after data stored in the volatile memory is moved to at least a selected portion of the volatile memory. Claim 10 A storage device comprising: a non-volatile memory that inputs and outputs data based on a request from a host system; a volatile memory that stores necessary data used for input / output operations of the non-volatile memory; and a storage controller that controls data input / output of the non-volatile memory and the volatile memory, wherein the storage controller receives a query plan corresponding to the necessary data from the host system, generates a data priority list corresponding to the necessary data based on the query plan, and when the main power from the host system decreases to a specified size or less, selects a portion of the volatile memory based on the data priority list and moves the necessary data to the selected portion of the volatile memory.
Citation Information
Patent Citations
Memory manager with enhanced application metadata
KR1020140035416A
Storage device, database system having the same, and methode for providing interface therof
KR1020170057821A
