This application claims priority under 35 U.S.C. §119(a) to Korean Patent Application No. 10-2013-0047772 filed on Apr. 29, 2013, the subject matter of which is hereby incorporated by reference.
Embodiments of the inventive concept relate to electronic memory technologies. More particularly, certain embodiments of the inventive concept relate to data storage devices performing an atomic write operation and related methods of operation.
An atomic write or atomic write operation is a write operation in which data is written to a designated location without intervening access to that location. During an atomic write operation, it may be necessary to block, postpone, or ignore incoming read operations, and it may also be necessary to compensate for unexpected interruptions such as a sudden loss of power. The complexity of an atomic write may be increased where some data is required to be stored in different locations, such as distinct physical chips or memory blocks.
In one embodiment of the inventive concept, a method of operating a data storage device comprises allocating a plurality of data blocks in received data to a plurality of intellectual property (IP) cores, performing an atomic write independently for of the IP cores, wherein the atomic write for each of the IP cores writes corresponding allocated data blocks to a corresponding memory region of the data storage device, and generating an independent identifier indicating completion of the atomic write for each of the IP cores.
In another embodiment of the inventive concept, a method of operating a system comprising a host and a data storage device comprises transmitting, by the host, data to the data storage device, allocating, by the data storage device, data blocks in the data to IP cores, performing, by the data storage device, an atomic write independently for data blocks allocated to each of the IP cores, and generating, by the data storage device, independent identifiers indicating whether the atomic write is completed for each of the IP cores.
These and other embodiments of the inventive concept may provide improved buffering of data related to an atomic write, reduce a size of a write buffer buffering the data, and allow adaptation to a loss of power.
The drawings illustrate selected embodiments of the inventive concept. In the drawings, like reference numbers indicate like features.
a to 8d are conceptual diagrams for describing data transmission and an atomic write according to still another embodiment of the inventive concept.
Embodiments of the inventive concept are described below with reference to the accompanying drawings. These embodiments are presented as teaching examples and should not be construed to limit the scope of the inventive concept.
In the description that follows, where a feature is referred to as being “connected” or “coupled” to another feature, it can be directly connected or coupled to the other feature or intervening features may be present. In contrast, where a feature is referred to as being “directly connected” or “directly coupled” to another feature, there are no intervening features present. As used herein, the term “and/or” encompasses any and all combinations of one or more of the associated listed items and may be abbreviated as “/”.
Although the terms first, second, etc. may be used herein to describe various features, the described features should not be limited by these terms. Rather, these terms are used merely to distinguish between different features. For example, a first signal could be termed a second signal, and, similarly, a second signal could be termed a first signal without departing from the teachings of this disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the inventive concept. As used herein, the singular forms “a”, “an” and “the” encompass the plural forms as well, unless the context clearly indicates otherwise. Terms such as “comprises” and/or “comprising,” or “includes” and/or “including” where used in this specification, indicate the presence of stated features but do not preclude the presence or addition of one or more other features.
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. 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 application, and should not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The term “intellectual property (IP) core”, as used herein, denotes data or logic (e.g., a semiconductor IP core, an IP block, an integrated circuit (IC), or a circuit block) used in making an application-specific integrated circuit (ASIC) or a field-programmable gate array (FPGA).
The term “module”, as used herein, denotes a set of features (e.g., hardware and/or software) capable of performing a designated function, and can be implemented, for instance, by computer code or an electronic recording medium equipped with a computer program code, such as a processor or a microprocessor. In other words, a module may comprise hardware, software, or a combination of hardware and software.
Referring to
System 100A may take the form of a personal computer (PC), a server, a data server, a database server, a web server, or a portable electronic device, for example. The portable electronic device may take the form of a laptop computer, a netbook, a mobile phone, a smart phone, a tablet PC, a mobile internet device (MID), a personal digital assistant (PDA), an enterprise digital assistant (EDA), a digital still camera, a digital video camera, a portable multimedia player (PMP), a personal navigation device or portable navigation device (PND), a handheld game console, or an e-book, for example.
Data storage device 130A comprises a controller board 131A and memory boards 140 and 146. Controller board 131A and memory boards 140 and 146 communicate with each other through a corresponding channels.
Data storage device 130A may take the form of a flash-based database, a solid state drive (SSD), a universal flash storage (UFS), a flash universal serial bus (USB) drive, a secure digital (SD) card, a multimedia card (MMC), an embedded MMC, a smart card, or a memory card, for example.
Data storage device 130A communicates with host 110 through an interface 111. For example, interface 111 may support a serial advanced technology attachment (SATA) protocol, a Serial Attached SCSI (SAS) protocol or peripheral component interconnect express (PCIe). Interface 111 may take other forms in addition to a SATA interface or an SAS interface.
Controller board 131A comprises a first memory 132, an allocation module 134, CPUs 136 and 142, controllers 138 and 144, and a second memory 139.
Power is supplied to host 110 and data storage device 130A. The power supplied to host 110 and data storage device 130A may be the same or different. The power is supplied to each board 131A, 140, and 146. In addition, the power is supplied to each capacitor CAP1 and CAP2, so that each capacitor CAP1 and CAP2 may be charged.
Capacitors CAP1 and CAP2 are used to provide power in the event of a sudden power off (SPO), and they may optionally be omitted or replaced by some other form of backup power. For convenience of description in
First memory 132 may take the form of a random access memory (RAM), a dynamic RAM (DRAM), a static RAM (SRAM) or a non-volatile memory. The non-volatile memory may comprise non-volatile memory cells as described below. First memory 132 performs a function of a write buffer that stores or buffers data related to the atomic write transmitted from host 110 through interface 111.
Allocation module 134 receives data related to the atomic write stored in write buffer 132, and it performs a function of allocating data blocks in the received data to IP cores 136-1 and 142-1. Here, a data block is a set of bits having a defined size for processing, sector data, chunk data, or page data.
Allocation module 134 divides the received data into data blocks, and it allocates the divided data blocks to IP cores 136-1 and 142-1. In various alternative embodiments, allocation module 134 allocates the data blocks to IP cores 136-1 and 142-1 based on addresses of data blocks in the received data, e.g., a logical block address (LBA). For example, where two IP cores 136-1 and 142-1 are included in data storage device 130A, allocation module 134 may allocate data blocks stored in storage regions corresponding to odd numbered LBAs of write buffer 132 to IP core 136-1, and allocate data blocks stored in storage regions corresponding to even numbered LBAs of write buffer 132 to IP core 142-1.
Allocation module 134 performs a function of allocating the data blocks in the received data to the IP cores based on the number of IP cores in data storage device 130A. Various alternative methods may be used to allocate the data blocks in the received data to the IP cores. For example, allocation module 134 may allocate the data blocks to the IP cores according to a round-robin method.
In some embodiments, allocation module 134 of
CPUs 136 and 142 communicate with host 110 through interface 111. CPUs 136 and 142 receive a command output from host 110, and control corresponding controllers 138 and 144 based on the received command. CPUs 136 and 142 comprise corresponding IP cores 136-1 and 142-1. For convenience of description in
Controllers 138 and 144 control access operations, e.g., write operations, atomic write operations, read operations, or erase operations, of corresponding memory chips 140-2 or 146-2. Memory chips 140-2 and 146-2 are storage regions storing data related to atomic write, and a storage region allocated to IP cores 136-1 and 142-1.
Second memory 139 transmits data output from memory chips 140-2 and 146-2 to host 110 through interface 111 under control of controllers 138 and 144. Second memory 139 stores data, and the data is loaded to controllers 138 and 144. For example, second memory 139 may store program code or firmware necessary for an operation of CPUs 136 and 142. Accordingly, the second memory described as a set of multiple memories may comprise a volatile memory chip and/or a non-volatile memory chip.
Data storage device 130A stores data or atomic data related to an atomic write in a memory chip 140-2 and/or 146-2. Host 110 writes data or atomic data in memory chip 140-2 and/or 146-2. In addition, host 110 may read data or atomic data from memory chip 140-2 and/or 146-2.
A data write operation and a data read operation between host 110 and memory chips 140-2 and 146-2 is processed under control of CPU 136 and 142 and/or controllers 138 and 144. Memory boards 140 and 146 comprise multiple memory chips 140-2 and 146-2. For convenience of description in
Memory chips 140-2 and 146-2 comprise non-volatile memory cells, each of which may take the form of an Electrically Erasable Programmable Read-Only Memory (EEPROM), a flash memory, a Magnetic RAM (MRAM), a Spin-Transfer Torque MRAM, a Conductive bridging RAM (CBRAM), a Ferroelectric RAM (FeRAM), a Phase change RAM (PRAM), a Resistive RAM (RRAM), a Nanotube RRAM, a Polymer RAM (PoRAM), a Nano Floating Gate Memory (NFGM), a holographic memory, a Molecular Electronics Memory Device, or an Insulator Resistance Change Memory, for example. Each of the non-volatile memory cells may store one or more bits.
Memory chips 140-2 and 146-2 may be the same or different types of memory chips. For example, memory chips 140-2 may be NAND flash memory chips comprising single-level cells (SLCs) which may store one-bit information per cell, and memory chips 146-2 may be NAND flash memory chips comprising multi-level cells (MLCs) storing two or more bits of information per cell.
Memory boards 140 and 146 further comprise memories 140-1 and 146-1, where memories 140-1 and 146-1 store information related to memory chips 140-2 and 146-2. For example, memories 140-1 and 146-1 may store property information of memory chips 140-2 and 146-2. The property information comprises type information of memory chips 140-2 and 146-2, e.g., information on whether each of memory chips 140-2 and 146-2 is a SLC chip or a MLC chip, information on whether each of memory chips 140-2 and 146-2 is NAND chip or NOR chip, information on the number of blocks in each of memory chips 140-2 and 146-2, and information on the number of pages per block, the number of bytes per page, or each operation of memory chips 140-2 and 146-2. Memory boards 140 and 146 may be separated from controller board 131A.
Referring to
Except for allocation module 134 executed by CPU 133, the structure and operation of a data storage device 130B comprising a controller board 131B of
Referring to
According to an embodiment, allocation module 134 of
Referring to
Referring to
The first memory region may be defined in one or more memory chips of memory board 140 (a first memory board). That is, the odd numbered data blocks B1, B3, and B5 may be atomically written in one memory chip in memory board 140, or divided and atomically written in at least two memory chips in memory board 140.
IP core 136-1 performs an atomic write for the odd numbered data blocks B1, B3, and B5 allocated to IP core 136-1. Here, controller 138 may atomically write the odd numbered data blocks B1, B3, and B5 in the first memory region allocated to IP core 136-1 under control of IP core 136-1.
For convenience of description,
After a last data block B5 allocated to IP core 136-1 is written in a user data region UDR of memory chip 140-2, IP core 136-1 generates an identifier E, and identifier E is written in the metadata region MDR storing metadata or the spare region. Identifier E is an identifier for controlling atomicity of the atomic write may be generated by IP core 136-1 after the last data block B5 among data blocks B1, B3, and B5 allocated to IP core 136-1 is written in the user data region UDR of memory chip 140-2. However, among data blocks B1, B3, and B5 allocated to IP core 136-1, after each of data blocks B1 and B3 is written in the user data region UDR of memory chip 140-2, IP core 136-1 generates identifier N. Here, identifier N denotes a Not End Flag or a not end mark, and identifier E denotes an End Flag or an end mark. For example, N and E perform a function of a status bit indicating whether the atomic write is completed.
Where identifier E for the last data block B5 allocated to IP core 136-1 is written or programmed in the user data region UDR of memory chip 140-2, identifier E indicates the atomic write is normally performed by IP core 136-1.
IP core 136-1 checks an identifier during scanning and checks whether the atomic write is completed. When an identifier for the last data block B5 is E, IP core 136-1 performs map build MAP BUILD generating a logical-to-physical map. That is, where the identifier for the last data block B5 is E, the atomic write or the map build is successfully performed.
In this case, where host 110 performs a read operation, new data blocks stored in memory chip 140-2, i.e., data blocks B1, B3, and B5 atomically written, are transmitted to host 110. However, where an identifier for the last data block B5 is N, the atomic write for IP core 136-1 fails to be performed. In this case, where host 110 performs a read operation, old data blocks stored in memory chip 140-2 are transmitted to host 110.
Even numbered data blocks B2, B4, and B6 allocated to IP core 142-1 may be atomically stored in a second memory region allocated to IP core 142-1 under control of IP core 142-1. The second memory region may be defined in one memory chip in memory board 146 (a second memory board), or in at least two memory chips in memory board 146. That is, the even numbered data blocks B2, B4, and B6 may be atomically written in one memory chip in memory board 146 or divided and atomically written in at least two memory chips in memory board 146.
IP core 142-1 performs an atomic write for the even numbered data blocks B2, B4, and B6 allocated to IP core 142-1. Here, controller 144 atomically writes the even numbered data blocks B2, B4, and B6 to a second memory region allocated to IP core 142-1 under control of IP core 142-1. For convenience of description,
After a last data block B6 allocated to IP core 142-1 is written in the user data region UDR of memory chip 146-2, IP core 142-1 generates an identifier E, and identifier E is written in the metadata region MDR storing metadata or the spare region.
Identifier E, which is an identifier that controls atomicity of the atomic write, is generated by IP core 142-1 after a last data block B6 among data blocks B2, B4, and B6 allocated to IP core 142-1 is written in the user data region UDR of memory chip 146-2. Among data blocks B2, B4, and B6 allocated to IP core 142-1, each of data blocks B2 and B4 is written in the user data region UDR of memory chip 146-2, and IP core 142-1 generates an identifier N.
As described above, the identifier N constitutes a Not End Flag, and the identifier E constitutes an End Flag. Where identifier E for the last data block B6 allocated to IP core 142-1 is written or programmed in the user data region UDR of memory chip 146-2, identifier E indicates the atomic write is successfully performed by IP core 142-1.
IP core 142-1 checks an identifier during scanning and checks whether the atomic write is completed. Where an identifier for the last data block B5 is E, IP core 142-1 performs a map build MAP BUILD to generate a logical-to-physical map. That is, where an identifier for the last data block B5 is E, the map build is successfully performed. In this case, where host 110 performs a read operation, new data blocks stored in memory chip 146-2, i.e., data blocks B2, B4, and B6 atomically written, are transmitted to host 110. However, where an identifier for the last data block B6 is N, an atomic write or map build by IP core 142-1 fails to be performed. In this case, where host 110 performs a read operation, old data blocks stored in memory chip 146-2 are transmitted to host 110.
As described above, each of multiple IP cores 136-1 and 142-1 in data storage device 130A to 130D (collectively ‘130’) performs the atomic write for data blocks allocated to each of IP cores 136-1 and 142-1, and independently generates an identifier E indicating completion of each atomic write. Accordingly, data storage device 130 transmits data satisfying atomicity to host 110 in response to a data read command from host 110.
Referring to
Odd numbered data blocks B1, B3, and B5 allocated to IP core 136-1 are atomically stored in a first memory region allocated to IP core 136-1 in a sequential manner under control of IP core 136-1. Even numbered data blocks B2, B4, and B6 allocated to IP core 142-1 are atomically stored in a second memory region allocated to IP core 142-1 in a sequential manner under control of IP core 142-1.
Among the odd numbered data blocks B1, B3, and B5 allocated to IP core 136-1, where an identifier E for the last data block B5 is written or programmed in the user data region UDR of memory chip 140-2, identifier E indicates the atomic write for IP core 136-1 is normally performed.
As described with reference to
Among even numbered data blocks B2, B4, and B6 allocated to IP core 142-1, where an identifier E for the last data block B6 is written or programmed in the user data region UDR of memory chip 146-2, identifier E indicates the atomic write is normally performed by IP core 142-1.
As described with reference to
As described above, each of IP cores 136-1 and 142-1 in data storage device 130 may perform an atomic write for data blocks allocated to IP cores 136-1 and 142-1, and independently generate an identifier indicating a completion of each atomic write. Accordingly, data storage device 130 may transmit data satisfying atomicity to host 110 in response to a data read command from host 110.
Referring to
Allocation module 134 allocates odd numbered data blocks among the data blocks to IP core 136-1, and allocates even numbered data blocks among the data blocks to IP core 142-1. The odd numbered data blocks allocated to IP core 136-1 are atomically stored in the first memory region allocated to IP core 136-1 in a sequential manner under control of IP core 136-1.
As described with reference to
As described with reference to
Referring to
As illustrated in
As illustrated in
Here, where data blocks B1 and B2 are transmitted to allocation module 134, buffer regions of write buffer 132 storing data blocks B1 and B2 become free regions, and therefore new data blocks transmitted from host 110 may be written in the buffer regions. Here, data blocks B1 and B2 are previous data blocks, and data blocks B3 and B4 are current data blocks.
Allocation module 134 allocates a first data block B1 transmitted from write buffer 132 to IP core 136-1, and allocates a second data block B2 transmitted from write buffer 132 to IP core 142-1. IP core 136-1 writes first data block B1 in the first memory region of memory board 140 using controller 138, and write second data block B2 in the second memory region of memory board 146 using controller 144.
As illustrated in
Allocation module 134 allocates a third data block B3 transmitted from write buffer 132 to IP core 136-1, and allocates a fourth data block B4 transmitted from write buffer 132 to IP core 142-1. IP core 136-1 writes a third data block B3 in the first memory region of memory board 140 using controller 138, and it writes a fourth data block B4 in the second memory region of memory board 146 using controller 144.
As illustrated in
Allocation module 134 allocates a fifth data block B5 transmitted from write buffer 132 to IP core 136-1, and it allocates a sixth data block B6 transmitted from write buffer 132 to IP core 142-1. IP core 136-1 writes a fifth data block B5 in the first memory region of memory board 140 using controller 138, and writes a sixth data block B6 in the second memory region of memory board 146 using controller 144.
Where the atomic write for data blocks B1, B3, and B5 allocated to IP core 136-1 is completed, IP core 136-1 generates an identifier E indicating a completion of the atomic write, and write an identifier E in the first memory region of memory board 140. Where the atomic write for data blocks B2, B4, and B6 allocated to IP core 142-1 is completed, IP core 142-1 generates an identifier E indicating a completion of the atomic write, and write an identifier E in the second memory region of memory board 140.
Referring to
As illustrated in
Allocation module 134 allocates a first data block B1 to IP core 136-1, and allocates a second data block B2 to IP core 142-1. However, first IP cores 136-1 and 142-1 do not transmit data blocks B1 and B2 to controllers 138 and 144.
As illustrated in
Allocation module 134 allocates a third data block B3 to IP core 136-1, and allocates a fourth data block B4 to IP core 142-1. IP core 136-1 writes a first data block B1 transmitted from allocation module 134 in a first memory region of memory board 140 using controller 138, and it writes a second data block B2 transmitted from allocation module 134 in a second memory region of memory board 146 using controller 144.
As illustrated in
Allocation module 134 allocates a fifth data block B5 to IP core 136-1, and allocates a sixth data block B6 to IP core 142-1. IP core 136-1 writes a third data block B3 transmitted from allocation module 134 in the first memory region of memory board 140 using controller 138, and writes a fourth data block B4 transmitted from allocation module 134 in the second memory region of memory board 146 using controller 144.
As illustrated in
Where the atomic write for data blocks B1, B3, and B5 allocated to IP core 136-1 is completed, IP core 136-1 generates an identifier E indicating a completion of the atomic write, and writes identifier E in the first memory region of memory board 140.
Where the atomic write for data blocks B2, B4, and B6 allocated to IP core 142-1 is completed, IP core 142-1 generates an identifier E indicating a completion of the atomic write, and writes identifier E in the second memory region of memory board 140.
First, it is assumed that data storage device 130 does not comprise either of capacitors CAP1 and CAP2. Under these circumstances, after each data block B1, B3, and B5 is atomically written in memory chip 140-2, when a power supplied to data storage device 130 is suddenly off while a data block B6 is written in memory chip 146-2, each data block B2, B4, and B6 is not atomically written in memory chip 146-2. That is, the atomic write for each data block B2, B4, and B6 fails to be performed. Here, a completion flag E for data block B6 is not generated.
During a read operation of data block B1 to B6, memory chip 140-2 transmits new data, i.e., each data block B1, B3, and B5, to host 110, or memory chip 146-2 transmits old data, i.e., each old data block corresponding to each data block B2, B4, and B6 to host 110. In this case, atomicity for data blocks B1 to B6 is not guaranteed.
Second, it is assumed that data storage device 130 comprises each capacitor CAP1 and CAP2. Under these circumstances, after each data block B1, B3, and B5 is atomically written in memory chip 140-2, when a power supplied to data storage device 130 is suddenly off while data block B6 is written in memory chip 146-2, data block B6 is written in memory chip 146-2 using a voltage stored in each capacitor CAP1 and CAP2. That is, even if an SPO occurs in data storage device 130, each data block B2, B4, and B6 is atomically written in memory chip 146-2.
During a read operation of data blocks B1 to B6, memory chip 140-2 transmits new data, i.e., each data block B1, B3, and B5, to host 110, and memory chip 146-2 transmits new data, i.e., each data block B2, B4, and B6, to host 110. In this case, atomicity for data blocks B1 to B6 is guaranteed.
The end mark count or end flag count indicates the number of IP cores processing data related to the atomic write, the number of end marks or end flags necessary for completing the atomic write, or the number of data blocks comprising the end mark or end flag necessary for completing the atomic write, the transaction ID indicates an ID identifying a transaction or an ID identifying whether atomic write data per data block are identical, and the end flag indicates whether the atomic write is completed.
Metadata stored in metadata region MDR in
Referring to
After each data block B1, B3, and B5 is atomically written in memory chip 140-2, when a power supplied to data storage device 130 is suddenly off while data block B6 is written in memory chip 146-2, end flag E is stored in metadata region MDR of memory chip 140-2, but end flag E is not stored in metadata region MDR of memory chip 146-2.
In this case, the number of end flags necessary for completing the atomic write for data blocks B1 to B6 is set to ‘2’; however, the number of end flags E which are actually generated is ‘1’. The atomic write for data blocks B1 to B6 fails to be performed. Accordingly, each IP core 136-1 and 142-1 does not perform a map build.
Referring to
Referring to
Data storage device 130 according to CASE I processes data related to the atomic write transmitted from application web server 310. According to CASE II, system 300 may further comprise a data base server 330. In this case, application web server 310 and a data base server 330 may be connected to each other through an internet or an intranet 303.
In this case, data base server 330 may perform a function of host 110. Data storage device 130 may process data related to the atomic write transmitted from data base server 330.
Referring to
Referring to
IP cores 136-1 and 142-1 perform the atomic write for data blocks, allocated per IP core 136-1 and 142-1, per IP core 136-1 and 142-1. Where SPO occurs while the atomic write for data blocks allocated per IP core 136-1 and 142-1 is performed per IP core 136-1 and 142-1, each IP core 136-1 and 142-1 performs the atomic write using a voltage or energy charged in each capacitor CAP1 and CAP2 (S123). IP cores 136-1 and 142-1 independently generate an identifier E indicating whether the atomic write is completed (S130).
Referring to
IP cores 136-1 and 142-1 perform the atomic write for data blocks, allocated to IP core 136-1 and 142-1, per IP core 136-1 and 142-1. An SPO occurs while the atomic write for data blocks allocated per IP core 136-1 and 142-1 is performed per IP core 136-1 and 142-1 (S121).
Where power is again supplied to data storage device 130, IP cores 136-1 and 142-1 compare an end mark count, a transaction ID, and an end flag related to IP core 136-1 with an end mark count, a transaction ID, and an end flag related to IP core 142-1, and determines whether the atomic write is successfully performed based on a result of the comparison (S210).
As indicated by the foregoing, in a data storage device comprising multiple IP cores may support atomicity of an atomic write. The IP cores in the data storage device may independently generate an identifier indicating whether an atomic write of the IP cores is completed. In addition, the data storage device may improve a method of buffering data related to the atomic write, and accordingly reduce a size of a write buffer buffering the data.
The foregoing is illustrative of embodiments and is not to be construed as limiting thereof. Although a few embodiments have been described, those skilled in the art will readily appreciate that many modifications are possible in the embodiments without departing from the scope of the inventive concept as defined by the claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2013-0047772 | Apr 2013 | KR | national |