Method and system for managing bad areas in flash memory

Error detection/correction and fault detection/recovery – Data processing system error or fault handling – Reliability and availability

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C714S710000, C711S103000, C360S048000

Reexamination Certificate

active

06260156

ABSTRACT:

FIELD OF THE INVENTION
The present invention relates generally to nonvolatile memory with flash erase capability, such as electrically erasable programmable read only memory (EEPROM, hereinafter referred to as a flash memory), and more specifically to a method and system for managing areas in the flash memory that are bad.
BACKGROUND OF THE INVENTION
There are several peripheral devices to a computer used for storing data, such as hard disk drives and floppy disk drives. Hard disk drives can be erased and programmed (written to) many times and, typically, can store a large amount of data. Floppy disk drives also can be erased and written to or programmed many times, but, typically, store a smaller amount of data. Another peripheral storage device used to store data is a Read Only Memory (ROM). A ROM is a solid state memory device that can be programmed only once and then read many times.
Recently, another solid state memory device, flash memory, has been developed for use as a storage medium. In order to use flash memory as a storage medium, a flash file system is used to manage the flash memory and to interface with the operating system of the host. Flash memory can be programmed and electrically erased many times. Typically, flash memory is erased using either a block erase or a chip erase process. When a block erase process is employed, areas of a flash memory chip array, called blocks, are simultaneously erased. When a chip erase process is employed individual chips are erased one at a time. In the following description, when referring to erasing an area of flash memory, the term block erase will be used.
While flash memory is a memory media that can be reprogrammed, prior to writing new data to a memory location that previously held data, the entire block that includes that memory location typically is erased to either an all 0 or an all 1 state. The only time erasing to an all 0 or all 1 state is not required prior to programming new data is when programming only involves changes from 1s to 0s in the all 1 state or from 0s to 1s in the all 0 state. The all 0 or all 1 state is referred to as the erased state and depends on the type of flash memory being used. The erasing of an entire block may take from several tens of milliseconds to several seconds. Furthermore, each time flash memory is erased and rewritten, the flash memory deteriorates. Once flash memory deteriorates to the point where the memory is no longer reliable or able to store data, that area of the flash memory is considered bad. Flash memory may be manufactured with bad areas and may develop bad areas for several other reasons well known to those familiar with flash memory.
Various methods of managing bad areas of flash memory have been proposed. One method copies control information describing the state of the flash memory from the flash memory into a RAM before erasing the flash memory area. After the flash memory area is erased, the control information is written back to the flash memory. This approach has the disadvantage that control information temporarily stored in the RAM is lost if a system failure, such as a power failure, occurs during erasure of the flash memory. The lost information is not recoverable. Another proposed method employs a separate controller and a more reliable secondary memory, such as an EEPROM. This method of managing the flash memory has the disadvantage of requiring extensive support hardware, which adds complexity and expense to the system employing the flash memory.
In summary, a need exists for a method of managing bad areas of flash memory such that information is reliably stored in the flash memory that does not require the use of extensive hardware. The invention is directed to fulfilling this need.
SUMMARY OF THE INVENTION
In accordance with this invention, a method, a computer-readable medium, and a system for managing bad areas in flash memory such that information is reliably stored in the flash memory that does not require extensive support hardware.
The flash memory is initialized by formatting the flash memory into a spare area and a data area with the spare area and the data area including a plurality of spare blocks and data blocks, respectively. In addition, a plurality of spare blocks are grouped together to form a chunk. Each chunk includes two chunk maps—an original chunk map and a copy chunk map. The original and copy chunk maps store format and re-mapping information. Each chunk map includes a bad block management (BBM) header and a plurality of BBM entries that correspond to the spare blocks in each chunk. The original and copy chunk maps are created and updated by creating a related working chunk map in temporary storage, e.g., RAM, and writing the working chunk map into one of the plurality of spare blocks to form the original chunk map and into another of the plurality of spare blocks to form the copy chunk map.
The present invention provides operational processing including: re-mapping of data contained in a block detected as having a bad area (called a bad block) to one of the plurality of spare blocks; and providing access information of a requested data block to a flash file system regarding a location for contents of the requested data block.
In accordance with other aspects of this invention, the BBM header includes a Status field and an In-Progress Index field and each of the plurality of BBM entries includes a Bad Data Block Number field.
In accordance with still further aspects of this invention, the re-mapping of data contained in a block detected as having a bad area (called a bad block) to one of the plurality of spare blocks includes finding the first available free BBM entry in the plurality of BBM entries in one of the chunks; reading the original chunk map associated with the chunk containing the first available free BBM entry (called a free entry original chunk map); and creating a free working chunk map with information from the free entry original chunk map. If the bad block is a bad spare block and in the chunk associated with free working chunk map, the BBM entry associated with the bad spare block is found and that BBM entry is marked as bad in the free working chunk map. Then, a number that identifies the bad data block that was re-mapped to the bad spare block is written into the Bad Data Block field of the free BBM entry. If the bad block is not in the chunk associated with the working chunk map, e.g., the bad block is a data block, the bad block number is written into the Bad Data Block Number field of the free BBM entry. Thereafter, the free entry original chunk map is erased and a ‘Status Copy Invalid’ value is written into the Status field. If the bad block is not in the current chunk and is not a data block, the bad block must be a spare block not in the current chunk. In this case, the chunk containing the bad block is found, the original chunk map for this chunk (called the bad block original chunk map) is read, and a current working chunk map is built using the data from the bad block original chunk map. Then the bad BBM entry associated with the bad block is found and marked as bad in the current working chunk map. Thereafter, the bad block original chunk map is erased and over written with the contents of the current working chunk map and a ‘Status Copy Invalid’ value in the Status field. Next the copy chunk map associated with the bad block (called the bad block copy chunk map) is erased and overwritten with the contents of the current working chunk map. Then a ‘Status Copy Valid’ value is written into the Status field of the original chunk map.


REFERENCES:
patent: 4800520 (1989-01-01), Iijima
patent: 4935825 (1990-06-01), Worrell et al.
patent: 5077737 (1991-12-01), Leger et al.
patent: 5111385 (1992-05-01), Hattori
patent: 5153880 (1992-10-01), Owen et al.
patent: 5161157 (1992-11-01), Owen et al.
patent: 5179536 (1993-01-01), Kasa et al.
patent: 5199033 (1993-03-01), McGeoch et al.
patent: 5200959 (1993-04-01), Gross et al.
patent: 5245572 (1993-09-01), Kosonocky et al.
patent: 5278793 (1994-01-01), Yeh
patent

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method and system for managing bad areas in flash memory does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method and system for managing bad areas in flash memory, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method and system for managing bad areas in flash memory will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2503671

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.