This application claims priority from Korean Patent Application No. 10-2010-0123788 filed Dec. 6, 2010, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference in its entirety.
1. Field
Exemplary embodiments relate to electronic devices, and more particularly, to a data storage device.
2. Description of the Related Art
As it is known in the art, computer systems generally use several types of memory systems. For example, computer systems generally use so called main memory comprised of semiconductor devices typically having the attribute that the devices can be randomly written to and read from with comparable and very fast access times and thus are commonly referred to as random access memories. However, since semiconductor memories are relatively expensive, other higher density and lower cost memories are often used. For example, other memory systems include magnetic disk storage systems. In case of magnetic disk storage systems, generally, access times are in the order of tens of milliseconds. On the other hand, in case of main memory, the access times are in the order of hundreds of nanoseconds. Disk storage is used to store large quantities of data which can be sequentially read into main memory as needed. Another type of disk like storage is solid state disk storage (SSD, also called solid state drive). SSD is a data storage device that uses memory chips, such as SDRAM, to store data, instead of the spinning platters found in conventional hard disk drives.
The term “SSD” is used for two different kinds of products. The first type of SSD, based on fast, volatile memory such as SDRAM, is categorized by extremely fast data access and is used primarily to accelerate applications that are held back by the latency of disk drives. Since this SSD uses volatile memory, it typically incorporates internal battery and backup disk systems to ensure data persistence. If power is lost for whatever reason, the battery keeps the unit powered long enough to copy all data from RAM to backup disk. Upon the restoration of power, data is copied back from backup disk to RAM and the SSD resumes normal operation. The first type of SSD is especially useful on a computer which is already has the maximum amount of RAM. The second type of SSD uses flash memory to store data and is generally used to replacement of a hard disk drive.
One or more exemplary embodiments provide a write method of a data storage device including a storage media. In accordance with an aspect of an exemplary embodiment, a write method includes receiving data to be stored in the storage media; judging whether the received data is compressed data, without externally provided additional information; and selectively compressing the received data according to the judgment result, wherein the judging whether the received data is compressed data is made based on a distribution of actual symbols included in at least part of the received data.
In accordance with an aspect of another exemplary embodiment, a data storage device provides a storage media; and a controller configured to control the storage media. The controller is configured to judge whether data to be stored in the storage media is compressed data without externally provided additional information and to selectively compress the data to be stored in the storage media according to the judgment result, the judging whether the received data is compressed data being made based on a distribution of actual symbols included in at least part of the received data.
The above and other objects and features will become apparent from the following description with reference to the following figures, wherein like reference numerals refer to like parts throughout the various figures unless otherwise specified, and wherein:
The inventive concept is described more fully hereinafter with reference to the accompanying drawings, in which exemplary embodiments of the inventive concept are shown. This inventive concept may, however, be embodied in many different forms and should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the inventive concept to those skilled in the art. In the drawings, the size and relative sizes of layers and regions may be exaggerated for clarity. Like numbers refer to like elements throughout.
It will be understood that, although the terms first, second, third etc. may be used herein to describe various elements, components, regions, layers and/or sections, these elements, components, regions, layers and/or sections should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or section from another region, layer or section. Thus, a first element, component, region, layer or section discussed below could be termed a second element, component, region, layer or section without departing from the teachings of the inventive concept.
Spatially relative terms, such as “beneath”, “below”, “lower”, “under”, “above”, “upper” and the like, may be used herein for ease of description to describe one element or feature's relationship to another element(s) or feature(s) as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as “below” or “beneath” or “under” other elements or features would then be oriented “above” the other elements or features. Thus, the exemplary terms “below” and “under” can encompass both an orientation of above and below. The device may be otherwise oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly. In addition, it will also be understood that when a layer is referred to as being “between” two layers, it can be the only layer between the two layers, or one or more intervening layers may also be present.
The terminology used herein is for the purpose of describing particular exemplary embodiments only and is not intended to be limiting of the inventive concept. As used herein, the singular forms “a”, “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms “comprises” and/or “comprising,” when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the term “and/or” includes any and all combinations of one or more of the associated listed items.
It will be understood that when an element or layer is referred to as being “on”, “connected to”, “coupled to”, or “adjacent to” another element or layer, it can be directly on, connected, coupled, or adjacent to the other element or layer, or intervening elements or layers may be present. In contrast, when an element is referred to as being “directly on,” “directly connected to”, “directly coupled to”, or “immediately adjacent to” another element or layer, there are no intervening elements or layers present.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this inventive concept belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the relevant art and/or the present specification and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Referring to
The controller 2000 may be configured to control the storage media 1000 in response to an external request. The controller 2000 may be configured to judge whether data provided from an external device is compressed data or raw data, i.e., non-compressed data, without additional information. If the data provided from the external device is judged to be compressed data, the controller 2000 may be configured to store the data provided from the external device in the storage media 1000 without performing further compression. If the data provided from the external device is judged to be raw data, the controller 2000 may be configured to compress it and to store the compressed data in the storage media 1000. This will be more fully described hereinafter.
As data compression is applied to the data storage device, it is possible to use the storage media 1000 efficiently. For example, it is possible to store a large amount of data with a low cost. Further, as data compression is applied to the data storage device, the amount of data transferred between the storage media 1000 and the controller 2000 can be reduced. That is, with data compression, a time taken to transfer data between the storage media 1000 and the controller 2000 may be shortened.
Referring to
The first interface 2100 may be configured to interface with an external device (or, a host). The second interface 2200 may be configured to interface with a storage media 1000 illustrated in
The buffer 2400 may be used to temporarily store data transferred from an external device via the first interface 2100. The buffer 2400 may be used to temporarily store data transferred from the storage media 1000 via the second interface 2200. Further, the buffer 2400 may be used as a work memory. The buffer 2400 may be formed of, for example but not limited to, DRAM, SRAM, or a combination of DRAM and SRAM. The compression block 2500 may operate responsive to the control of the CPU 2300 (or, the control of the MTL executed by the CPU 2300) and be configured to compress data sequentially provided from the buffer 2400 by a compression unit. Compressed data may be stored in the storage media 1000 via the second interface 2200. Further, the compression block 2500 may operate responsive to the control of the CPU 2300 (or, the control of the MTL executed by the CPU 2300) and be configured to release the compression of data read out from the storage media 1000.
The data deviation detection block 2700 may be configured to detect whether data being stored in the storage media 1000 (for example, data stored in the buffer 2400 or data provided from an external device) is compressed data or raw data. If data being stored in the storage media 1000, for example, data stored in the buffer 2400 or data provided from an external device, is judged to be compressed data, no compression is executed with respect to data being stored in the storage media 1000. In this case, a compression function of the compression block 2500 may be turned off. This means that data being stored in the storage media 1000 (for example, data stored in the buffer 2400 or data provided from an external device) is stored directly in the storage media 1000 without a further compression process being performed by the compression block 2500. If data being stored in the storage media 1000 (for example, data stored in the buffer 2400 or data provided from an external device) is judged to be raw data, compression is executed with respect to data being stored in the storage media 1000. In this case, a compression function of the compression block 2500 may be turned on. This means that data being stored in the storage media 1000 (for example, data stored in the buffer 2400 or data provided from an external device) is firstly compressed by the compression block 2500 and the compressed data is then stored in the storage media 1000.
As can be understood from the above description, the compression function of the compression block 2500 may be executed selectively according to a detection result of the data deviation detection block 2700. The turning on or off of the compression block may be implemented in hardware (for example, register) or in software according to a detection result of the data deviation detection block 2700.
Data being stored in a storage media 1000 may be sent to a buffer 2400 from an external device. Before the data in the buffer 2400 is stored in the storage media 1000, a data deviation detection block 2700 may judge whether the data in the buffer 2400 is compressed data. The data in the buffer 2400, for example, may be data transferred according to a write request of the external device. For ease of description, a compressed data unit of the compression block 2500 is called a chunk. The data in the buffer 2400 may be formed of one or more chunks. The compressed data unit of the compression block 2500 may be fixed or varied.
The data deviation detection block 2700 may detect a data deviation σ based on data (hereinafter, called a data chunk) corresponding to one chunk provided from the buffer 2400 and determine whether to compress data (or, activation/inactivation of a compression block 2500) according to the data deviation σ. A data chunk 2001, as illustrated in
As illustrated in
The data deviation calculating part 2720 may calculate a data deviation σ according to the following equation.
In the equation, Ci indicates the occurrence/event number of each symbol (hereinafter, called an actual symbol number), and X indicates the occurrence/event number (hereinafter, called an ideal symbol number) of each of all symbols expressible under the assumption that data is compressed ideally. For example, assuming that a data chunk is formed of 4096 symbols and one symbol is formed of eight bits, the ideal symbol number X may be 16 (=4096/256). The ideal symbol number X may be decided by a data chunk size and a symbol size. That is, the ideal symbol number X may indicate the average symbol number of expressible symbols decided according to a symbol size. The ideal symbol number X may be calculated by the data deviation calculating part 2720 based on a symbol size and a data chunk size or set by a predetermined value. In an exemplary embodiment, the data deviation σ may be used to indicate a distribution of actual symbols in the data chunk 2001.
The compression decision part 2730 may decide whether to compress data (or, activate/inactivate compression block 2500) according to the data deviation σ calculated by the data deviation calculating part 2720. For example, when a value of the data deviation σ exceeds a reference value, the compression decision part 2730 decides the data in the buffer 2400 (data being stored in a storage media 1000) as raw data (or, uncompressed data). When no value of the data deviation σ exceeds a reference value, the compression decision part 2730 decides the data in the buffer 2400 (or, data being stored in the storage media 1000) as compressed data. Data in the buffer 2400 may be compressed by the compression block 2500 selectively according to the decision result of the compression decision part 2730.
As described above, whether data being stored in the storage media 1000 is compressed data or raw/uncompressed data may be judged on the basis of one data chunk, which is provided to the data deviation detecting part 2700 from the buffer 2400. On the other hand, a data chunk provided to the data deviation detecting block 2700 can be data transferred to the buffer 2400 from an external device.
In some exemplary embodiments, whether data being stored in the storage media 1000 is compressed data or raw/uncompressed data may be determined on the basis of data deviation values of plural data chunks. Alternatively, activation/inactivation of the compression block 2500 can be accomplished independently with respect to all data chunk of data being stored in the storage media 1000.
In step S100, as data provided from an external device, data being stored in a storage media 1000 may be stored in a buffer 2400 at a write request. Once data being stored in a storage media 1000 is stored in the buffer 2400, in step S200, there is judged whether data being stored in the storage media 1000 is compressed data. This operation is referred to as a data deviation detecting operation. The data deviation detecting operation may be made by a data deviation detecting block 2700 described in
If data being stored in the storage media 1000 is raw data, the write method proceeds to step S300, in which data in the buffer 2400 is compressed by the compression block 2500 and the compressed data is stored in the storage media 1000. Afterwards, the write method ends. If data being stored in the storage media 1000 is compressed data, the write method proceeds to step S400, in which compressed data in the buffer 2400 is stored directly in the storage media 1000 without performing further compression.
In
In step S210, one symbol included in a data chunk 2001 may be sent to a data deviation detecting block 2700 from a buffer 2400. This may be accomplished under the control of CPU 2300 (or, firmware executed by the CPU 2300). Alternatively, transferring of data to the data deviation detecting block 2700 from the buffer 2400 may be performed according to a request of the data deviation detecting block 2700. In step S220, a symbol counting part 2710 of the data deviation detecting part 2700 may count the actual symbol number based on the received symbol. That is, a count value Ci of an actual symbol Si may increase by 1. At this time, the symbol counting part 2710 may increase the total symbol number by 1. In step S230, the symbol counting part 2710 may judge whether an input symbol is a last symbol of the data chunk 2001, based on the total symbol number.
If the input symbol is judged not to be the last symbol, the write method proceeds to step S210. The steps S210 to S230 may be repeated until the input symbol is judged to be the last symbol. If the input symbol is judged to be the last symbol, the write method proceeds to step S240, in which a data deviation calculating part 2720 may calculate a data deviation σ based on the ideal symbol number X and count values Ci generated by the symbol counting part 2710. Calculation of the data deviation σ may be made according to the above-described equation. Herein, the ideal symbol number X may be determined by a data chunk size and a symbol size. The ideal symbol number X may be calculated by the data deviation calculating part 2720 using a data chunk size and a symbol size or may be set to a fixed value.
In step S250, a compression decision part 2730 may judge whether a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds a reference value σTH. If a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the reference value σTH, the write method proceeds to step S260. In step S260, a compression function of a compression block 2500 may be activated. That a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the reference value σTH, means that a large deviation between the ideal symbol number X and the actual symbol number Ci exists. In other words, the greater a deviation between the ideal symbol number X and the actual symbol number Ci, the higher the probability that data in a buffer 2400 is raw data. For this reason, the compression function of the compression block 2500 may be activated. The activation of the compression function of the compression block 2500 may be made in hardware or in software.
On the other hand, if a value of the data deviation σ calculated by the data deviation calculating part 2720 does not exceed the reference value σTH, the write method proceeds to step S270, in which the compression function of the compression block 2500 is inactivated. That a value of the data deviation σ calculated by the data deviation calculating part 2720 does not exceed the reference value σTH, means that a small deviation between the ideal symbol number X and the actual symbol number Ci exists. In other words, the smaller a deviation between the ideal symbol number X and the actual symbol number Ci, the higher the probability that data in a buffer 2400 is compressed data. For this reason, the compression function of the compression block 2500 may be inactivated. The activation of the compression function of the compression block 2500 may be made in hardware or in software.
Afterwards, as activation or inactivation of the compression block 2500 is decided as described above, data stored in the buffer 2400 may be compressed by the compression block 2500 under the control of CPU 2300 (or, firmware executed by the CPU 2300) and stored in the storage media 1000, or directly stored in the storage media 1000 without being compressed by the compression block 2500, based on a value of the data deviation σ.
A data deviation σ may be calculated as described in
If the calculated data deviation σ is less than the reference value σTH, as described in
There is described an example that the data deviation detecting operation described in
In step S510, one symbol included in a data chunk 2001 may be sent to a data deviation detecting block 2700 from a buffer 2400. This may be accomplished under the control of CPU 2300 (or, firmware executed by the CPU 2300). In step S520, a symbol counting part 2710 of the data deviation detecting part 2700 may count the actual symbol number Ci based on the received symbol. That is, a count value Ci of an actual symbol Si may increase by 1. At this time, the symbol counting part 2710 may increase the total symbol number by 1. In step S530, the symbol counting part 2710 may judge whether an input symbol is a last symbol of the data chunk 2001, based on the total symbol number.
If the input symbol is judged not to be the last symbol, the write method proceeds to step S510. The steps S210 to S230 may be repeated until the input symbol is judged to be the last symbol. If the input symbol is judged to be the last symbol, the write method proceeds to step S540, in which a data deviation calculating part 2720 may calculate a data deviation σ based on the ideal symbol number X and count values Ci generated by the symbol counting part 2710. Calculation of the data deviation σ may be made according to the above-described equation. Herein, the ideal symbol number X may be determined by a data chunk size and a symbol size. The ideal symbol number X may be calculated by the data deviation calculating part 2720 using a data chunk size and a symbol size or set to a fixed value.
In step S550, a compression decision part 2730 may judge whether a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the first reference value σTH1. If a value of the data deviation σ calculated by the data deviation calculating part 2720 does not exceed the first reference value σTH1, the write method proceeds to step S560, in which the compression function of the compression block 2500 is inactivated. That a value of the data deviation σ calculated by the data deviation calculating part 2720 does not exceed the first reference value σTH1, means that a deviation between the ideal symbol number X and the actual symbol number Ci is small. In other words, the smaller a deviation between the ideal symbol number X and the actual symbol number Ci, the higher the probability that data in a buffer 2400 is compressed data. For this reason, the compression function of the compression block 2500 may be inactivated. The activation of the compression function of the compression block 2500 may be made in hardware or in software.
If a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the first reference value σTH1, the write method proceeds to step S570. In step S570, the compression decision part 2730 may judge whether a value of the data deviation σ is greater than the first reference value σTH1 and less than the second reference value σTH2. If a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the second reference value σTH2, the write method proceeds to step S580, in which a compression function of a compression block 2500 may be activated. That a value of the data deviation σ calculated by the data deviation calculating part 2720 exceeds the second reference value σTH1, means that a deviation between the ideal symbol number X and the actual symbol number Ci is large. In other words, the greater a deviation between the ideal symbol number X and the actual symbol number Ci, the higher the probability that data in a buffer 2400 is raw data. For this reason, the compression function of the compression block 2500 may be activated. The activation of the compression function of the compression block 2500 may be implemented in hardware or in software.
If a value of the data deviation σ is greater than the first reference value σTH1 and less than the second reference value σTH2, the write method proceeds to step S590, in which the compression decision part 2730 may decide whether to compress data, based on an additional condition. For example, the compression decision part 2730 may decide whether to compress data, based on a result of a data deviation detecting operation previously executed as the additional condition. If the result of the previously performed data deviation detecting operation corresponds to activation of a compression function, the compression decision part 2730 activates a compression function of the compression block 2500. If the result of the previously performed data deviation detecting operation corresponds to inactivation of a compression function, the compression decision part 2730 inactivates a compression function of the compression block 2500. Under the above assumption, if a value of the data deviation σ is greater than the first reference value σTH1 and less than the second reference value σTH2, there is selected a compression algorithm different from that used in step S580.
Afterwards, as activation or inactivation of the compression block 2500 is decided as described above, data stored in the buffer 2400 may be compressed by the compression block 2500 under the control of CPU 2300 (or, firmware executed by the CPU 2300) and stored in the storage media 1000, or directly stored in the storage media 1000 without performing further compression.
A data deviation σ may be calculated as described in
If the calculated data deviation σ is greater than the second reference value σTH2, as described in
In the event that the calculated data deviation σ is greater than the first reference value σTH1 and less than the second reference value σTH2, as illustrated in
There is described an example that the data deviation detecting operation described in
In step S610, data being stored in a storage media 1000 may be stored in a buffer 2400 at a write request. Once data being stored in the storage media 1000 is stored in the buffer 2400, in step S620, there is judged whether compression information on data transferred at the write request is sent therewith. This may be performed by a host interface 2100 or CPU 2300 (or, firmware executed by the CPU 2300). The compression information may be information indicating whether data transferred at the write request is compressed data or uncompressed/raw data. If the compression information on the data transferred at the write request is sent therewith, the write method proceeds to step S630, in which activation of a compression block 2500 is decided according to the provided compression information. In step S640, data stored in the buffer 2400 may be compressed or uncompressed according to the decision result, and resultant data (that is, compressed or uncompressed data) may be stored in the storage media 1000. Afterwards, the write method ends.
Returning to step S620, if the compression information on the data transferred at the write request is not sent therewith, the write method proceeds to step S650, in which a data deviation is decided in the same manner as described above. In step S660, whether to compress data is decided based on the decided data deviation. This may be made the same as described in
Each of symbols S1 to Sn included in a data chunk 2001 may be formed of at least two bytes B1 and B2 as illustrated in
Referring to
Referring to
An SSD 4000 according to an exemplary embodiment of the inventive concept is used to configure the storage. As illustrated in
Referring to
In the event that a solid state drive including a data storage device according to exemplary embodimentsis applied to the storage, as illustrated in
A non-volatile memory device according to an exemplary embodiment is a memory device which retains data even at power-off. With increases in mobile devices such as cellular phone, PDA digital camera, portable gate console, and MP3P, a flash memory device is widely used as not only data storage but also code storage. The flash memory device, further, is capable of being used at home applications such as HDTV, DVD, router, and GSP.
A computing system includes a processor 9100, a user interface 9200, a modem 9300 such as a baseband chipset, a memory controller 9400, and a storage media 9500 formed of a flash memory as a non-volatile memory device. The memory controller 9400 may be configured identically with that illustrated in
In an exemplary embodiment, a compression block 2500 of a controller 2000 may include one of the following compression algorithms or a combination of two or more thereof. The compression algorithms may includes LZ77&LZ78, LZW, Entropy encoding, Huffman coding, Adpative Huffman coding, Arithmetic coding, DEFLATE, JPEG, and the like.
In an exemplary embodiment, the first interface 2100/3100 of the controller 2000/3000 may be formed of one of computer bus standards, storage bus standards, and iFCPPeripheral bus standards, or a combination of two or more standards. The computer bus standards may include S-100 bus, Mbus, Smbus, Q-Bus, ISA, Zorro II, Zorro III, CAMAC, FASTBUS, LPC, EISA, VME, VXI, NuBus, TURBOchannel, MCA, Sbus, VLB, PCI, PXI, HP GSC bus, CoreConnect, InfiniBand, UPA, PCI-X, AGP, PCIe, Intel QuickPath Interconnect, Hyper Transport, etc. The storage bus standards may include ST-506, ESDI, SMD, Parallel ATA, DMA, SSA, HIPPI, USB MSC, FireWire(1394), Serial ATA, eSATA, SCSI, Parallel SCSI, Serial Attached SCSI, Fibre Channel, iSCSI, SAS, RapidIO, FCIP, etc. The iFCPPeripheral bus standards may include Apple Desktop Bus, HIL, MIDI, Multibus, RS-232, DMX512-A, EIA/RS-422, IEEE-1284, UNI/O, 1-Wire, 12C, SPI, EIA/RS-485, USB, Camera Link, External PCIe, Light Peak, Multidrop Bus, etc.
The above-disclosed subject matter is to be considered illustrative, and not restrictive, and the appended claims are intended to cover all such modifications, enhancements, and other embodiments, which fall within the true spirit and scope. Thus, to the maximum extent allowed by law, the scope is to be determined by the broadest permissible interpretation of the following claims and their equivalents, and shall not be restricted or limited by the foregoing detailed description.
Number | Date | Country | Kind |
---|---|---|---|
10-2010-0123788 | Dec 2010 | KR | national |