WO2009129819A1 - Method and device for n times writeable memory devices - Google Patents

Method and device for n times writeable memory devices Download PDF

Info

Publication number
WO2009129819A1
WO2009129819A1 PCT/EP2008/003192 EP2008003192W WO2009129819A1 WO 2009129819 A1 WO2009129819 A1 WO 2009129819A1 EP 2008003192 W EP2008003192 W EP 2008003192W WO 2009129819 A1 WO2009129819 A1 WO 2009129819A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical memory
allocation table
access
write
memory device
Prior art date
Application number
PCT/EP2008/003192
Other languages
French (fr)
Inventor
Timo Jaakko Tapani Elomaa
Original Assignee
Nokia Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nokia Corporation filed Critical Nokia Corporation
Priority to PCT/EP2008/003192 priority Critical patent/WO2009129819A1/en
Publication of WO2009129819A1 publication Critical patent/WO2009129819A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7202Allocation control and policies

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This invention provides a method, comprising receiving an access from a host at a memory device comprising a primary data allocation table associating physical memory blocks of said memory device with logical data units occupying said physical memory blocks, if said access is a read access requesting one or more logical data units from said memory device, providing said requested one or more logical data units from said associated physical memory blocks to said host, if said access is a write access requesting to write one or more logical data units to said memory device, determining if said write access is a pre-determined write access, responsive to said access being a pre-determined write access, writing said one or more logical data units to un-occupied physical memory blocks indicated by a supplementary data allocation table indicating un-occupied physical memory blocks of said memory device, and updating said primary and said supplementary data allocation table accordingly, and responsive to said access not being a pre-determined write access, denying said write access of said host. The invention also provides a device for operating the method.

Description

Applicant: Nokia Corporation
Our File: 561 1 1 WO (KG/DM)
Method and device for N times writeable memory devices
This invention relates to the usage of memory devices that can be read like read only memories (ROM) and be written to once or a definite amount of times. Particularly it is concerned with memory devices acting as ROM-type memories when being accessed by hosts not compatible with N times writeable memory, and acting as N times writeable memories when accessed by compatible hosts.
Prior art
Current software systems such as Symbian (S60) assume that any available memory can be accessed like a hard drive. This is true for e.g. USB mass storage devices and commonly used memory cards like Secure Digital (SD) cards and the like. These memories are based on nonvolatile memory devices that can in principle be re-written infinitely, for example flash-based memories. In reality there is an upper limit of write operations after which a certain memory cell will become defective. This number is comparatively high, e.g. some manufacturers of flash memory guarantee somewhere above 10.000 or even 100.000 write cycles.
)
However, there is advent of e.g. a new flash memory technology that enables lower production costs than the known many times re-writeable flash memory. The caveat with such memory is that integrating this memory with current software system can cause the memory to corrupt or the system to behave in an unstable manner due to failed write operations. That is, current system software basically knows two types of memory: the readonly memories and the re-writeable memories.
Current system software is usually not adapted to deal with media that are writeable only once or a few times. "Fresh" or still writeable media show a reaction considered "normal" by the system, i.e. data can be written to them as on hard drives or like. However, if the amount of possible writes is exceeded, such a medium will behave in an unexpected manner. Although the system considers it to be still writeable, no further write operations are possible. This unexpected behaviour can cause crashes and other irregularities occurring responsive to failed write attempts, or even worse, write attempts that the system believes have been performed, but the data has actually not been written. In the latter case the data stored on the medium is not consistent with what the system believes is stored.
Write-once (read many) media have been implemented for example in the known CD-R(W) and DVD-R(W)/DVD+R(W) technologies. In these cases a special software application on the PC is used to put the CD/DVD drive into a specific disc burning mode, thus writing the data to an empty (or re-writeable) disc. For flash memory there is currently no similar solution available, as the memory technology as such is only emerging.
Summary of the invention
According to a first aspect a method is provided, comprising receiving an access from a host at a memory device comprising a primary data allocation table associating physical memory blocks of said memory device with logical data ) units occupying said physical memory blocks; if said access is a read access requesting one or more logical data units from said memory device, providing said requested one or more logical data units from said associated physical memory blocks to said host; if said access is a write access requesting to write one or more logical data units to said memory device, determining if said write access is a pre-determined write access; responsive to said access being a pre-determined write access, writing said one or more logical data units to un-occupied physical memory blocks indicated by a supplementary data allocation table indicating un-occupied physical memory blocks of said memory device, and updating said primary and said supplementary data allocation table accordingly; and responsive to said access not being a pre-determined write access, denying said write access of said host. This method allows that a memory device that comprises physical memory blocks which are writeable N times is used with both conventional hosts as well as hosts adapted to the limited (re-) writeable capabilities of the new memory device. For both kinds of hosts the respective memory device will show a completely predictable behaviour, such that crashes or other irregularities due to failed write attempts will not occur. When used in a conventional or so- called legacy device the memory device may behave as if it were read-only. In this manner a fresh medium is shown as ROM for a legacy device. This way the device does not accidentally write e.g. temporary files on the memory wasting the card memory. When accessed by a compatible host device it will behave as writeable. "Compatible" in this context means that the host device itself is aware that each physical memory block can only be (re-) written N times, e.g. only once.
It should be noted that the present invention can in principle be used with all types of file systems, including but not limited to file systems using the so-called file allocation table FAT. However, other file systems such as e.g. the Second Extended File System Ext2 are possible as well.
In FAT based file systems like FAT12, FAT16 and FAT32 there are usually at least two copies of the file allocation table, the one that is normally used (in the present application corresponding to the "primary data allocation table") and at least one backup copy thereof. The backup copy (or copies) is (are) kept in synchronisation with the primary table. However, it is only used for recovery purposes, e.g. to repair corruptions that occurred in the primary table.
The supplementary data allocation table must be located in a "hidden" or "invisible" location with respect to incompatible conventional ("legacy") devices. For this purpose the supplementary data allocation table could e.g. be located in a reserved area. Another possibility is to locate it in an area at the logical "end" of the memory device, while the primary data allocation table only addresses the physical memory blocks up to but excluding this reserved area, such that the supplementary data allocation table can not be accessed by any conventional device relying only on the primary data allocation table.
Still another example could be to use a special logical data unit as a container for the supplementary data allocation table. In this case this special logical data unit, e.g. a file, could be marked as read-only for conventional host devices, while only compatible host devices are granted write access. Another alternative could be that said special logical data unit is not addressed by said primary data allocation table, such that a legacy device can not access it. However, in this case there must be provided a possibility for compatible devices to access it.
According to an exemplary embodiment the method further comprises maintaining a write counter for each physical memory block indicating the number of times the physical memory block can still be written to; decrementing said write counter each time a physical memory block is written to; and - indicating each physical memory block as un-writeable in said supplementary data allocation table for which said counter reaching zero.
This embodiment allows keeping track of the number of times a particular physical memory block can still be overwritten. That is, in a "fresh" memory each physical memory block ) would have an associated write counter value, which is decremented each time a write operation is performed on that block. When the value reaches zero, the respective block becomes permanent. This embodiment allows setting different starting values for the write counter value for individual memory blocks, including but not limited to memory devices having at least two types of physical memory blocks which are rewriteable N and O times, wherein N ≠ O. For example memory blocks which are considered to be overwritten more often could be implemented such that they sustain a higher write counter value until becoming permanent. The starting value can e.g. be given by the memory manufacturer in the 1 st formatting.
According to an alternative exemplary embodiment the method further comprises maintaining a write counter for each physical memory block indicating the number of times the physical memory block has been written to; incrementing said write counter each time a physical memory block is written to; and indicating each physical memory block as un-writeable in said supplementary data allocation table for which said counter exceeds a pre-determined threshold.
According to this alternative embodiment the write counter is implemented the other way around, i.e. by indicating the number of already completed write operations instead of those still possible. This embodiment requires setting the pre-determined threshold to a known value, which entails that the threshold is the same for a group of physical memory blocks or even all of them. However, this has the advantage that it is possible to change the threshold during operation.
Indicating physical memory blocks as un-writeable can for example be accomplished by using a flag indicating that the respective block is now "permanent", i.e. its content can not be overwritten anymore. In another exemplary embodiment un-writeable physical memory blocks can be removed from the supplementary data allocation table, that is, in this example the supplementary data allocation table would only indicate still writeable physical memory blocks.
) According to an exemplary embodiment said write counter is implemented in said supplementary data allocation table. While it is possible to implement the write counter in another location as well, it is advantageous to implement it within the supplementary data allocation table, as the write counter should also be hidden from legacy devices and the supplementary data allocation table already is located in a location invisible for such legacy devices.
According to an exemplary embodiment said memory device comprises a FATl 2, FAT 16 or FAT32 file system and said primary data allocation table is a file allocation table of said file system. Particularly FATl 6 is currently used very often for small flash-based memory cards and similar memory devices. According to a second aspect of the invention a program product is provided, comprising code which, when executed by a controller of a memory device, causes the steps of the above mentioned method to be performed.
According to a second aspect of the invention a memory device is provided, comprising a plurality of physical memory blocks; a primary data allocation table associating physical memory blocks with logical data units occupying said physical memory blocks; a supplementary data allocation table indicating un-occupied physical memory blocks; - a host interface; a controller configured for receiving an access from a host; if said access is a read access requesting one or more logical data units from said memory device, providing said requested one or more logical data units from said associated physical memory blocks to said host; if said access is a write access requesting to write one or more logical data units to said memory device, determining if said write access is a pre-determined write access; responsive to said access being a pre-determined write access, writing said one or more logical data units to un-occupied physical memory blocks indicated by said supplementary data allocation table, and updating said primary and said supplementary data allocation table accordingly; and responsive to said access not being a pre-determined write access, denying said write access of said host.
According to an exemplary embodiment said physical memory blocks are non-volatile; said primary data allocation table occupies a sub-set of said physical memory blocks which are re-writeable; and the other physical memory blocks are at least writeable M times, with M > 1.
According to an exemplary embodiment said controller is further configured for maintaining a write counter for each of said other physical memory block indicating the number of times the physical memory block can still be written to; decrementing said write counter each time one of said other physical memory block is written to; and - indicating each of said other physical memory blocks as un-writeable in said supplementary data allocation table for which said counter reaches zero.
According to an alternative embodiment said controller is further configured for maintaining a write counter for each of said other physical memory block indicating the number of times the physical memory block has been written to; incrementing said write counter each time one of said other physical memory block is written to; and indicating each of said other physical memory blocks as un-writeable in said supplementary data allocation table for which said counter reaches a pre-determined threshold.
In exemplary embodiments at least part of said physical memory blocks may be writable N times. In this case the pre-determined threshold for these physical memory blocks may be referred to as M, wherein M < N. According to embodiments of the invention there may be more than one group of physical memory blocks, wherein each group may have a different value Nn of times they can be overwritten. In this case each group may also have an individual threshold Mn, wherein Mn < Nn. It may also be possible that all groups have the same threshold, wherein this threshold is less or equal to the lowest value of Nn of all groups.
According to an exemplary embodiment said write counter is implemented in said supplementary data allocation table.
According to an exemplary embodiment said memory device comprises a FATl 2, FAT 16 or FAT32 file system and said primary data allocation table is a file allocation table of said file system. According to an exemplary embodiment said supplementary data allocation table is located in a reserved area of said memory device.
According to an exemplary embodiment said supplementary data allocation table is located in an area of said memory device that is not addressed by said primary data allocation table.
According to an exemplary embodiment said supplementary data allocation table is located within a logical data unit, wherein said logical data unit is indicated to be read-only in said primary data allocation table, or is not indicated in said primary data allocation table.
Brief description of the drawings
The invention can be more fully understood by the following detailed description of exemplary embodiments, when also referring to the drawings, which are provided in an exemplary manner only and are not intended to limit the invention to any particular embodiment illustrated therein. In the drawings
Fig. 1 shows a flow diagram of an embodiment of the method of the invention; and
Fig. 2 is an illustration of an embodiment of a data structure of the invention;
Fig. 3 is an illustration of an alternative embodiment of a data structure of the invention; and
Fig. 4 is an illustration of an embodiment of a memory device of the invention,
Detailed description
In the following description the term "logical data unit" shall be understood as including but not being limited to a file, directory, cluster, data block or any other logical data unit associated to one or more physical memory blocks. The following description will mainly focus on examples wherein the FAT 16 file system is used, although the invention is not limited to any particular file system. Also, the following description of exemplary embodiments will refer to flash memory as an example for non-volatile memories, although the invention can also be used with other non-volatile memories. All features of any embodiment can also be applied to any other embodiment or replace corresponding features thereof.
Fig. 1 is a flow diagram depicting the steps of an exemplary embodiment of the present invention. In step 102 an access from a host device is received at a memory device. The term host device is to be understood as including all devices that can connect to and exchange data with a memory device. This is not limited to host devices for exchangeable memory media, but also applies to hosts internal to electronic devices.
The memory device is here assumed to be based on a memory technology only allowing N times of re-/overwriting per physical memory block. For such devices the invention can avoid corruption of data content and strange behaviour and even crashes of accessing host devices not fully compatible of the N times rewriting property. However, the invention is not limited to the use with N times writeable device (wherein N > 1). It can also be advantageous when used with memory devices that allow an in principle indefinite number of overwriting operations.
)
In step 104 it is determined if the access is a write access or a read access. Responsive to the access being a read access the process continues at step 106. The read access involves that one or more logical data units are requested to be read out. Logical data units can for example be files, directories, clusters or data blocks, i.e. parts of a file or data stream.
Mounting a disk drive enables logical disk commands to the device. After this procedure for example the logical operating system (OS) command "directory" (DIR) is translated to e.g. a secure digital (SD) card specific "card read directory" set of commands that effects the directory listing to the accessing device side.
In a "FATl 6+" concept it may be possible to indicate during the first handshake phase that the special variant FAT16+ of the file system FAT16 is active with this media. FAT16 is only mentioned as an example, while the invention can be used with other file systems as well. In the example of FAT16 and FAT12, there is a further structure used by FAT12 and FATl 6, also known as the Extended BIOS Parameter Block, wherein at byte offset 0x36 the FAT file system type, padded with blanks (0x20), is indicated, e.g. "FAT 16". According to exemplary embodiments this could also be used for indicating the novel FAT 16+ type.
In step 106 the requested logical data unit(s) is/are retrieved, based on the information given in a primary data allocation table. For example, if a particular file has been requested to be read, the primary data allocation table indicates which physical memory blocks on the memory device are associated to said file. The logical data units are then provided to the requesting host. The process then returns to the start.
If in step 104 the access type is determined to be a write access, the process continues in step 108. In this step it is determined if the write access is a pre-determined write access. In case of "no", the write access is denied in step 1 10 and the process restarts. According to embodiments of the invention the write access can be denied by returning to the requesting host device that the memory device, directory or file is write-protected or read-only such that the write access can not be performed.
Basically there can be three kinds of write attempt. First, a new file is to be written to the memory device. In this case a return to the host device can indicate that the directory into which the file is to be written is write-protected/read-only. A second possibility of a write access is the attempted deletion of an existing file/directory. In this case it can be returned that the respective file/directory is write-protected/read-only. A third possibility is the updating of an existing file or directory, i.e. by changing and/or adding information in/to said file/directory, also including changing the name thereof. This situation can also be handled by returning that the file/directory is write-protected/read-only. In all these exemplary cases it could also be returned that the complete medium is write-protected/read-only.
In this manner it can be avoided that the content on the memory device becomes corrupted, or that the accessing host device will behave strangely or even crash. Instead the memory device, when accessed by a host device not intrinsically compatible with a memory device having a limit as to the number of re-/overwriting operations, will behave substantially like a read-only memory ROM.
If however, in step 108, the write access can be determined to be a pre-determined kind of write access, the process continues in step 1 12. That the write access is a pre-determined kind indicates that the host device having issued the write access is aware that the memory device has a limitation as to the number of overwriting operations. For such host devices, which in the context of the invention are considered to be "compatible", the memory device may act as a rewriteable device. It is assumed that compatible in this sense means that the host device will take precautions on its own with respect to the limitations of the N times writeable medium.
There are at least the following two exemplary embodiments:
1) The accessing device would always first try to use a compatible "WRITE2" command, and if it fails it would revert back to legacy WRITE command. This might slow down writing to legacy cards.
2) The card type is identified in the initial handshake procedure, and write operations using ) compatible "WRITE2" command are only used for new type of cards. If the card host controller only accepts WRITE2 commands, the card cannot be accidentally overwritten. The host controller logic can control how many write operations are accepted.
In step 1 12 the logical data unit or units is or are, respectively, written into unoccupied memory blocks. Such unoccupied memory blocks are determined on the basis of a supplementary data allocation table indicating which physical memory blocks may still be written to. Although not depicted here, it should be apparent to any artisan that, should the amount of still available physical memory blocks be insufficient to store the logical data unit(s), the process will also continue in step 1 10, i.e. with the write access being denied.
If there are enough still available physical memory blocks to accommodate the logical data units, they are written to the memory device. In the following step 114 the primary and supplementary data allocation table will be updated accordingly. That is, the physical memory blocks now occupied are indicated as un-writeable in the supplementary data allocation table. This can for example be achieved by removing these physical memory blocks from the supplementary data allocation table altogether. It can also be achieved by providing an "un-writeable" indication, e.g. flag, in the supplementary data allocation table. The primary data allocation table is also updated, i.e. an association between the logical data units and the physical memory blocks now occupied thereby is stored therein.
As this updating in the primary data allocation table may be required a plurality of times, in certain embodiments of the invention those physical memory blocks housing the primary data allocation table may be of a type allowing for at least a sufficient number of overwriting operations, e.g. a substantially indefinite number. This is not necessarily required for the supplementary data allocation table. Even in case the physical memory blocks intended for user data are only writeable once, it may be sufficient that the physical memory blocks housing the supplementary data allocation table are (over)writeable only once in order to remove physical memory blocks from the table or mark them as un-writeable.
After step 1 14 the process may restart. However, in still further embodiments of the invention additional steps may be performed. According to embodiments of the invention a write counter is maintained for physical memory blocks that may be overwritten N times (wherein N > 1). The write counter may indicate the number of times writing is still possible to a particular physical memory block, i.e. may count down from a pre-set number of possible write operations. The write counter may also indicate the number of already completed write operations, i.e. count starting from zero. In step 1 16, i.e. after writing to one or more physical memory blocks in step 114, the write counter is decremented or incremented, respectively, for each of those physical memory blocks, depending on the manner the write counter works.
In step 1 18 physical memory blocks for which the counter reaches a pre-determined threshold of (performed/possible) rewrite operations are indicated as un-writeable in the supplementary data allocation table. That is, if a decrementing counter is implemented, reaching the value of zero possible rewrites causes a physical memory block to become un- writeable. In case of an incrementing counter reaching the value of a pre-determined threshold M (e.g. the number of possible physical rewrites N or a number between 1 and N) causes a physical memory block to become un-writeable.
In the context of the present invention such un-writeable physical memory blocks may also be designated "permanent", as their state cannot be changed anymore. Indicating physical memory blocks as un-writeable may involve removing such permanent physical memory blocks from the supplementary data allocation table permanently.
The pre-determined threshold value M can basically be any value between 1 up to and including N. It may be desirable to define M to be smaller than N in order to provide a kind of security margin. This may particularly be advantageous if the actual maximum number of rewrite operations of a single physical memory block cannot be determined exactly, but is e.g. subject to a statistical variation.
After step 118 the process restarts.
According to an exemplary embodiment not shown in fig. 1 the accessing host device can be ) provided with the relevant write counter values. N times writable media could be sold formatted, wherein formatting involves giving the correct initial counter number(s) to work with. The host device can be provided with the write counter value, e.g. per file. In case of an incrementing counter it may be advantageous to provide not the absolute value of the write counter, but instead the difference between threshold M and current write counter value, i.e. return to the host device D=N-M. In case a certain file is associated with a plurality of physical memory blocks, wherein the write counter values are not identical for all physical memory blocks this may further involve returning only the minimum value of D, i.e. indicating the remaining number of rewrite operations per file. Similar to the logic of a legacy "WRITE" command compared to a compatible "WRITE2" command there could also be a legacy "DIR" command compared to a compatible "DIR2" command, wherein the latter one would retrieve the rewrite counter status for the host device. In other embodiments the write counter value or the corresponding remaining write operations value can also be returned to the host on a per-physical-memory-block basis. Providing the host with these values can be performed responsive to a read access to a logical data unit. The host device can then use this value to indicate in a file viewer the status of e.g. certain files, which may include "re-writeable still D times" or "reached permanent status". Responsive to a write access the updated values could be returned to the host device in order to enable it to update the file/directory or generally logical data unit statuses.
Fig. 2 shows an exemplary data structure of a memory device according to an embodiment of the invention. In this example the underlying file system used is FAT 16. Therefore this exemplary embodiment will be described referring to the FAT 16 file system. However, other file systems, including but not limited to FAT 12, FAT32, Ext2 etc. can be used instead. The memory device comprises a plurality of physical memory blocks 10, wherein only one is indicated in the figure in order to improve intelligibility. It should be noted that the dimensions and numbers of these physical memory blocks are only illustrative and not representative for the actual dimensions and numbers thereof.
The term "physical memory block" in the context of this invention is used to define the smallest block in the memory device that can be written to independently. Depending on the implementation the smallest unit that can be erased may have the same size as the physical memory block or may be a multiple thereof. For example in flash memory devices the smallest erasable unit usually comprises a plurality of physical memory blocks. That is, while data may be written into physical memory blocks independently, it is required to erase the whole erasable unit first before the data in the physical blocks can be changed again.
In this embodiment it is assumed that the physical memory blocks are of a type that can be overwritten N times, wherein N > 1. This entails that any physical memory blocks for which the number of overwrite operations reaches N becomes "permanent", i.e. its content can then not be changed anymore. The data structure comprises a first block of reserved sectors. Such reserved sectors may e.g. include the boot sector, a media descriptor and the like.
A primary file allocation table FAT#1 is provided. The FAT#1 comprises a list of so-called clusters on the memory device which belong to a particular file or logical unit. Clusters in FAT 16 are the smallest independently usable memory blocks, wherein "usable" refers to the logical implementation rather than the physical implementation. This means that a cluster is the smallest logical memory block, although parts of the cluster may be written to independently. In other words, a cluster usually comprises a plurality of physical memory blocks.
To give an example, if the cluster size is 4 KiloByte (kB), a 1 kB file will use up a complete cluster, although the cluster itself is only filled with 1 kB of actual payload data, while the remaining 3 kB are left empty, i.e. may be considered to be "wasted". A 16 kB file will in turn be associated with 4 clusters. It should be noted that these clusters are not necessarily located in succession or not even adjacent to each other, but may be located all over the memory device, which leads to the so-called fragmentation.
The FAT#1 comprises the associations between logical data units (e.g. files) and the clusters occupied by them. As each cluster is composed of one or more physical memory blocks, it can also be said that the FAT#1 associates logical data units to physical memory blocks occupied thereby. A secondary FAT#2 is provided as a backup. This means that this FAT#2 is kept in synchronisation with the FAT#1 , but usually not used. It may be used to check the integrity of the primary FAT#1 and ultimately to repair damage that occurred to the FAT# 1. Although not shown here it is also possible to provide even more backup FATs in order to further improve data integrity.
The next block is the root directory, which indicates all logical units, e.g. files and/or directories, in the root of the file system. After the root directory the data region begins, which holds the actual payload data. In this exemplary embodiment a supplementary data allocation table, in this example a FAT, is provided at the (logical) end of the memory device. The supplementary FAT indicates physical memory blocks that may still be written to. That is, physical memory blocks which have not yet reached permanent state and do not hold payload data.
The supplementary FAT shall be made invisible to any legacy device accessing the memory device. An exemplary embodiment of achieving this is to have the primary FAT #1 address only the data region and not the part where the supplementary FAT is located. In this manner any device relying on the primary FAT# 1 will not be aware of the supplementary FAT. Only devices that indicate that they are capable of dealing with the N-times writeable limitation of the memory device will also have access to the supplementary FAT.
There are different possibilities for indicating to such compatible devices the location of the supplementary FAT. For example it may be defined that the supplementary FAT starts after the data region. It may be required to also indicate the size of the supplementary FAT. This can be achieved by providing a corresponding indication in the beginning of the supplementary FAT. The maximum number of physical memory blocks that can be indicated in the supplementary FAT to be writeable corresponds to the maximum number of physical memory blocks in the data region. Therefore it may be possible to indicate the size of the supplementary FAT implicitly. An accessing compatible device could evaluate the boot sector or other information in order to determine the maximum number of physical memory blocks in the data region, and then derive the size of the supplementary FAT to be such that all these physical memory blocks could be indicated therein.
If a logical data unit, e.g. a file or directory, is written to the memory device by a compatible host device, the primary FAT#1 and the supplementary FAT will be updated accordingly. That is, the physical memory blocks occupied by the new logical data unit will be indicated in the primary FAT#1, while the same physical memory blocks will be indicated in the supplementary FAT as un-writeable. This may be achieved by removing them from the supplementary FAT, or providing a flag or marker stating this. IfN=I , it may be sufficient to indicate writeable blocks in the supplementary FAT, and remove them from supplementary FAT after the single possible write operation.
In embodiments wherein N>1, a write counter for each physical memory block may be implemented. The write counter may be implemented in the supplementary FAT or another location, as long as it can be ensured that the write counter is also "invisible" to legacy devices. The write counter can be implemented by indicating the number of times a particular physical memory block can still be written to. In this case the write counter is decremented each time a physical memory block is written to. Each physical memory block for which said counter reaches zero is indicated in said supplementary data allocation table to be un- writeable.
In an alternative embodiment the write counter can be implemented by indicating the number of times the physical memory block has been written to. In this case the write counter is incremented each time a physical memory block is written to. Each physical memory block for which said counter exceeds a pre-determined threshold is indicated in said supplementary data allocation table to be un-writeable. The threshold M can be up to the number of times N each physical memory block can be physically overwritten, i.e. M < N. Choosing M smaller than N can provide a safety margin.
In both alternatives indicating a physical memory block as un-writeable can be achieved by removing it from the supplementary data allocation table, or by providing a respective flag or marker within the supplementary data allocation table. If any physical memory block (which has not reached permanent state) becomes "free" again, e.g. when a file occupying it is deleted, it may be re-introduced into the supplementary FAT if only writeable blocks are indicated therein which are also logically available. Otherwise it may suffice to change the un-writeable flag or marker to one stating "writeable" status.
According to embodiments of the invention at least two different markers/flags may be distinguished. A first one would just indicate "writeable", which means that physical overwrite operations are still possible, independent from the logical state of a particular physical memory block. This marker/flag would therefore be associated with the write counter value. Logical state is supposed to relate to the status of either being occupied by a logical data unit or not. This alternative may be useful for cases where the primary data allocation table indicates logically available memory blocks.
A second marker/flag could indicate that a physical memory is logically available, i.e. is not occupied by any file/directory. A combination of these markers/flags is possible.
According to embodiments of the invention it may be preferred to write data first to physical memory blocks which have the highest amount of still possible writes or the smallest amount of yet performed write operations, respectively. This may achieve a wear-levelling mechanism.
Fig. 3 shows an alternative embodiment otherwise similar to that depicted in fig. 2. The main difference is that the supplementary FAT is located in a special hidden file instead of an area at the (logical) end of the memory device as in fig. 2. The special file serves as a kind of container for the supplementary FAT, and in this embodiment is indicated as read-only. This attribute is indicated together with the other attributes of the special file stored in the primary FAT#1. This embodiment represents a very flexible alternative, as the special file can be located anywhere in the data region just like any normal file. As only compatible devices will
) be granted write access anyway, no special care must be taken to ensure the read-only status of this special file for legacy devices.
The special file may also contain a write counter, if any, either within the supplementary FAT or separately from the supplementary FAT. It may also be possible to have a second special file just for the write counter.
As the special file may be arranged to be readable even for legacy devices, it is possible for these devices to use information in the supplementary FAT, e.g. for indicating in a file viewer the state of the memory device according to this information. The existence of the special file (which may have a special name recognized by compatible devices) may indicate that the memory device is of the N times writeable type, even if it appears as read-only medium for legacy devices. This may enable a host device to switch from legacy mode into the compatible mode. For example, if FAT 16 is the legacy system used, the compatible system could be referred to/identified as FATl 6+.
When a write counter is implemented as described above, the legacy device can also use this information and report the status of e.g. files based thereon, as the special file (or files, if separate files are provided for FAT/counter) is (are) readable.
Another alternative embodiment may have the supplementary FAT in the reserved sectors in front of the primary FAT#1, or any other reserved location.
Fig. 4 is an illustration of an embodiment of a memory device 2 of the invention. The memory device 2 may have the form of a memory card, including but not limited to Secure Digital (SD) card, Compact Flash (CF) card, Multimedia Card (MMC), xD Picture Card and the like. It may also be implemented in a Universal Serial Bus (USB) memory stick. Although the SD card shown in this figure is an example of an exchangeable memory device, the invention can also be applied to any other memory device, for example internal memory device in an electronic device.
The memory device 2 comprises a plurality of physical memory blocks 4, which may be of an N times writeable type. For example the physical memory blocks 4 can be implemented by a flash memory array. Furthermore a host interface 6 is provided, adapted to connect to an electronic device having e.g. an SD card slot. However, this is only an example. The host interface 6 can also be an internal interface when the memory device 2 is an internal or otherwise non-exchangeable memory device.
The memory device 2 comprises a data structure, for example one as depicted in fig. 2 or 3, implemented in said array of physical memory blocks 4. A write counter is optionally implemented, e.g. as described in conjunction with fig. 2 or 3. In case the FAT table would have to be rewritten many times, e.g. 100 small files added to the card in 100 different events, this table might need to be saved in a separate type of physical memory (for example traditional flash memory). In this case a memory card would have a host controller connected to two different kinds of physical medium.
The memory device 2 further comprises a controller 8 connected to both the array of physical memory blocks 4 and the host interface 6. The controller 8 is configured for receiving an access from a host via said host interface 6. If the controller 8 determines that said access is a read access requesting one or more logical data units from said memory device 2, the controller 8 provides said requested one or more logical data units from said associated physical memory blocks to said host. If the controller determines that said access is a write access requesting to write one or more logical data units to said memory device, it is configured for determining if said write access is a pre-determined write access.
For example, said pre-determined write access may be a "FAT 16+" write access, compared to a legacy FATl 6 write access. Responsive to said access being said pre-determined write access, the controller 8 is configured for writing said one or more logical data units to unoccupied physical memory blocks indicated by said supplementary data allocation table. In embodiments of the invention having a write counter the controller 8 is further adapted to perform this writing operation such that physical memory blocks are favoured which have a smaller amount of already completed write operations or higher amount of still possible write
) operations, respectively. This can provide a wear-levelling mechanism.
The controller 8 is further configured to updating said primary and said supplementary data allocation table accordingly to a completed writing operation. This updating, particularly of the primary data allocation table and the root directory, may occur more than once, depending e.g. on the value of N, the size of the memory device etc. Therefore in certain embodiments of the invention the physical memory blocks for accommodating e.g. the primary data allocation table and the root directory may be implemented as rewriteable physical memory blocks, or at least with physical memory blocks for which the number of times they can be rewritten is sufficiently high.
The controller 8 is further configured, responsive to said access not being a pre-determined write access, for denying said write access of a host. This creates the appearance of a readonly memory device for such host devices that are (at least not fully) compatible with the N times rewriteable memory.
The invention enables use of memory devices based on N times rewriteable memories, wherein N > 1, with legacy as well as compatible host devices. Full read capability is achieved even with legacy devices. Compatible host devices can benefit from the writing possibility. For N=I the user of such a device, e.g. a digital camera, can enjoy the old- fashioned feeling of capturing images on a conventional film. Accidental deletion or other manipulation destroying captured pictures or like is impossible for N=I , in other words permanent recording of data is possible with such memories. With the invention the functionality of writing can easily be added even to legacy devices. As N times rewriteable memories may be produced cheaper, memory devices according to embodiments of the invention offer cheaper memory devices for customers.

Claims

Claims
1. A method comprising receiving an access from a host at a memory device comprising a primary data allocation table associating physical memory blocks of said memory device with logical data units occupying said physical memory blocks; if said access is a read access requesting one or more logical data units from said memory device, providing said requested one or more logical data units from said associated physical memory blocks to said host; if said access is a write access requesting to write one or more logical data units to said memory device, determining if said write access is a predetermined write access; responsive to said access being a pre-determined write access, writing said one or more logical data units to un-occupied physical memory blocks indicated by a supplementary data allocation table indicating un-occupied physical memory blocks of said memory device, and updating said primary and said supplementary data allocation table accordingly; and responsive to said access not being a pre-determined write access, denying said write access of said host.
2. The method according to claim 1, further comprising maintaining a write counter for each physical memory block indicating the number of times the physical memory block can still be written to; decrementing said write counter each time a physical memory block is written to; and indicating each physical memory block as un-writeable in said supplementary data allocation table for which said counter reaching zero.
3. The method according to claim 1, further comprising maintaining a write counter for each physical memory block indicating the number of times the physical memory block has been written to; incrementing said write counter each time a physical memory block is written to; and indicating each physical memory block as un-writeable in said supplementary data allocation table for which said counter exceeds a pre-determined threshold.
4. The method according to claim 2 or 3, wherein said write counter is implemented in said supplementary data allocation table.
5. The method according to anyone of the preceding claims, wherein said memory device comprises a FAT12, FAT16 or FAT32 file system and said primary data allocation table is a file allocation table of said file system.
6. Program product, comprising code which, when executed by a controller of a memory device, causes the method of anyone of claims 1 to 5 to be performed.
7. Memory device, comprising a plurality of physical memory blocks; a primary data allocation table associating physical memory blocks with logical ) data units occupying said physical memory blocks; a supplementary data allocation table indicating un-occupied physical memory blocks; a host interface; a controller configured for i - receiving an access from a host; if said access is a read access requesting one or more logical data units from said memory device, providing said requested one or more logical data units from said associated physical memory blocks to said host; if said access is a write access requesting to write one or more logical data units to said memory device, determining if said write access is a pre-determined write access; responsive to said access being a pre-determined write access, writing said one or more logical data units to un-occupied physical memory blocks indicated by said supplementary data allocation table, and updating said primary and said supplementary data allocation table accordingly; and responsive to said access not being a pre-determined write access, denying said write access of said host.
8. The memory device according to claim 7, wherein - said physical memory blocks are non-volatile; said primary data allocation table occupies a sub-set of said physical memory blocks which are re-writeable; and the other physical memory blocks are writeable at least N times, with N > 1.
9. The memory device according to claim 7, wherein said controller is further configured for maintaining a write counter for each of said other physical memory block indicating the number of times the physical memory block can still be written to; - decrementing said write counter each time one of said other physical memory block is written to; and indicating each of said other physical memory blocks as un-writeable in said supplementary data allocation table for which said counter reaches zero.
> 10. The memory device according to claim 7, wherein said controller is further configured for maintaining a write counter for each of said other physical memory block indicating the number of times the physical memory block has been written to; incrementing said write counter each time one of said other physical memory block is written to; and indicating each of said other physical memory blocks as un-writeable in said supplementary data allocation table for which said counter reaches a predetermined threshold.
1 1. The memory device according to claim 9 or 10, wherein said write counter is implemented in said supplementary data allocation table.
12. The memory device according to anyone of claims 7 to 1 1 , wherein said memory device comprises a FAT 12, FAT 16 or FAT32 file system and said primary data allocation table is a file allocation table of said file system.
13. The memory device according to anyone of claims 7 to 12, wherein said supplementary data allocation table is located in a reserved area of said memory device.
14. The memory device according to claim 13, wherein said supplementary data allocation table is located in an area of said memory device that is not addressed by said primary data allocation table.
15. The memory device according to anyone of claims 6 to 14, wherein said ) supplementary data allocation table is located within a logical data unit, wherein said logical data unit is indicated to be read-only in said primary data allocation table, or is not indicated in said primary data allocation table.
PCT/EP2008/003192 2008-04-21 2008-04-21 Method and device for n times writeable memory devices WO2009129819A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/EP2008/003192 WO2009129819A1 (en) 2008-04-21 2008-04-21 Method and device for n times writeable memory devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/EP2008/003192 WO2009129819A1 (en) 2008-04-21 2008-04-21 Method and device for n times writeable memory devices

Publications (1)

Publication Number Publication Date
WO2009129819A1 true WO2009129819A1 (en) 2009-10-29

Family

ID=40193910

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2008/003192 WO2009129819A1 (en) 2008-04-21 2008-04-21 Method and device for n times writeable memory devices

Country Status (1)

Country Link
WO (1) WO2009129819A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5604880A (en) * 1994-08-11 1997-02-18 Intel Corporation Computer system with a memory identification scheme
US5611067A (en) * 1992-03-31 1997-03-11 Kabushiki Kaisha Toshiba Nonvolatile semiconductor memory device having means for selective transfer of memory block contents and for chaining together unused memory blocks
US5623640A (en) * 1993-03-08 1997-04-22 Nec Corporation Data memory system that exchanges data in data locations with other data locations based on the number of writes to the memory
US5835927A (en) * 1993-06-30 1998-11-10 Intel Corporation Special test modes for a page buffer shared resource in a memory device
US6591329B1 (en) * 1997-12-22 2003-07-08 Tdk Corporation Flash memory system for restoring an internal memory after a reset event
CA2591957A1 (en) * 2005-01-07 2006-07-13 Hyperstone Ag Method for the conversion of logical into real block addresses in flash memories

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5611067A (en) * 1992-03-31 1997-03-11 Kabushiki Kaisha Toshiba Nonvolatile semiconductor memory device having means for selective transfer of memory block contents and for chaining together unused memory blocks
US5623640A (en) * 1993-03-08 1997-04-22 Nec Corporation Data memory system that exchanges data in data locations with other data locations based on the number of writes to the memory
US5835927A (en) * 1993-06-30 1998-11-10 Intel Corporation Special test modes for a page buffer shared resource in a memory device
US5604880A (en) * 1994-08-11 1997-02-18 Intel Corporation Computer system with a memory identification scheme
US6591329B1 (en) * 1997-12-22 2003-07-08 Tdk Corporation Flash memory system for restoring an internal memory after a reset event
CA2591957A1 (en) * 2005-01-07 2006-07-13 Hyperstone Ag Method for the conversion of logical into real block addresses in flash memories

Similar Documents

Publication Publication Date Title
JP4238514B2 (en) Data storage device
US7039754B2 (en) Detachably mounted removable data storage device
US10168962B2 (en) Tape emulating disk based storage system and method with automatically resized emulated tape capacity
KR100920716B1 (en) Ruggedized block device driver
US8504763B2 (en) Method and memory device that powers-up in a read-only mode and is switchable to a read/write mode
KR101139224B1 (en) Method And Apparatus For Using A One-Time Or Few-Time Programmable Memory With A Host Device Designed For Erasable/Rewriteable Memory
JP4416914B2 (en) Method for providing control information to a drive via a data storage medium
KR101033068B1 (en) Memory Device and Recording/Reproducing Apparatus Using the Same
EP1586997B1 (en) Method of data storage capacity allocation and management using one or more data storage drives
US7174420B2 (en) Transaction-safe FAT file system
JP4268396B2 (en) Non-volatile memory device file management that can be programmed once
US8972426B2 (en) Storage device presenting to hosts only files compatible with a defined host capability
US8818950B2 (en) Method and apparatus for localized protected imaging of a file system
KR20040038712A (en) Power management block for use in a non-volatile memory system
WO2004079575A1 (en) Data management method for slash memory medium
JP2007233638A (en) Information processor, information processing method, and computer program
JP2005506632A (en) Security device for mass storage devices
WO2009129819A1 (en) Method and device for n times writeable memory devices
CN110597454B (en) Data storage device and non-volatile memory control method
JP2007018528A (en) Memory device, file management method, and recording and reproducing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08749028

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08749028

Country of ref document: EP

Kind code of ref document: A1