US20120089805A1 - Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof - Google Patents
Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof Download PDFInfo
- Publication number
- US20120089805A1 US20120089805A1 US12/960,563 US96056310A US2012089805A1 US 20120089805 A1 US20120089805 A1 US 20120089805A1 US 96056310 A US96056310 A US 96056310A US 2012089805 A1 US2012089805 A1 US 2012089805A1
- Authority
- US
- United States
- Prior art keywords
- file
- host system
- fill
- root directory
- sector
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/13—File access structures, e.g. distributed indices
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7201—Logical to physical mapping or translation of blocks or pages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0656—Data buffering arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
Definitions
- the present invention generally relates to a method for creating a fill-file, and more particularly, to a method for automatically creating a fill-file, a memory storage device using the same, and a memory controller thereof.
- a pre-read mechanism is usually adopted to read part of the data into a random access memory (RAM) of the host system in advance.
- RAM random access memory
- the host system When subsequently the host system is about to read data from a specific address, if the data at this specific address is already recorded in the RAM of the host system, the host system then directly reads the data from the RAM. In other words, the host system only reads data from the storage device when the data to be read by the host system is not yet recorded in the RAM.
- the pre-read mechanism can increase the efficiency in data reading, it may cause the host system not to be able to obtain the latest data in some cases. For example, if the host system reads data from a specific address and records the data into the RAM, and the host system then writes data into the storage device to update the data at the specific address again, when subsequently the host system reads the specific address, because the data at the specific address has been recorded in the RAM, the host system still reads the data from the RAM instead of the storage device. Thus, the host system cannot obtain the updated data.
- an existing technique usually adopted is to make the host system to write a fill-file into the RAM, so as to make sure that the host system reads data from the storage device.
- it takes a lot of time for the host system to write the fill-file and when the storage device needs to capture the address range of the fill-file, the host system may determine that the operation of the storage device times out or may even remove or reset the storage device due to the long processing time of the storage device, which brings a lot of inconvenience to the user.
- the present invention is directed to a method for automatically creating a fill-file, wherein the fill-file of a large capacity is instantly and automatically created by a memory storage device according to different file system.
- the present invention is directed to a memory controller, wherein a memory storage device having the memory controller can instantly and automatically create a fill-file of a large capacity according to different file system.
- the present invention is directed to a memory storage device which can instantly and automatically create a fill-file of a large capacity according to different file system.
- the present invention provides a method for automatically creating a fill-file.
- the method is adaptable to a memory storage device coupled to a host system.
- the memory storage device includes a memory chip, and the memory chip has a plurality of physical blocks.
- the physical blocks are grouped into at least a data area, a spare area, and a system area.
- a plurality of logical addresses is configured, and the logical addresses are grouped into a plurality of logical blocks to be mapped to the physical blocks in the data area.
- the host system When the host system is powered on, if the logical addresses have been formatted into a partition by using a file system and the partition includes a partition boot record (PBR), a file allocation table (FAT), and a root directory, the PBR and the root directory are read, and whether a fill-file of a predetermined file capacity exists in the memory chip is determined.
- PBR partition boot record
- FAT file allocation table
- root directory When the host system is powered on, if the logical addresses have been formatted into a partition by using a file system and the partition includes a partition boot record (PBR), a file allocation table (FAT), and a root directory, the PBR and the root directory are read, and whether a fill-file of a predetermined file capacity exists in the memory chip is determined.
- PBR partition boot record
- FAT file allocation table
- a sector amount corresponding to the predetermined file capacity is configured, a plurality of specific sectors conforming to the sector amount is defined by starting from a predetermined sector of the FAT, a plurality of cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to a write-protect status.
- a fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- the PBR has a free space field, and in the present method, if the fill-file does not exist, when the host system is about to read the PB, a difference between a total capacity of the memory chip and the predetermined file capacity is written into the free space field, and the PBR is transmitted to the host system.
- the predetermined sector of the FAT is used for storing the cluster entry values of a first quantity, and other sectors of the FAT are respectively used for storing the cluster entry values of a second quantity.
- the step of configuring the sector amount corresponding to the predetermined file capacity includes configuring a cluster amount for storing the fill-file according to the predetermined file capacity and configuring the sector amount according to the cluster amount, the first quantity, and the second quantity.
- the step of filling the cluster entry values related to the fill-file into the specific sectors further includes determining whether the specific sectors have a free space after filling the cluster entry values related to the fill-file into the specific sectors, and if the specific sectors have the free space, filling up the free space by using a plurality of cluster entry values related to at least one predetermined file.
- the predetermined file is one of a hidden file, a deleted file, and a general file.
- the step of filling the fill-file header into the predetermined sector of the root directory further includes determining whether the predetermined sector of the root directory has a free space after filling the fill-file header into the predetermined sector of the root directory, and if the predetermined sector of the root directory has the free space, filing up the predetermined sector of the root directory by using at least one predetermined file header.
- the quantity of the predetermined file header is corresponding to a filename format of the fill-file, a filename format of a predetermined file corresponding to the predetermined file header, and a sector capacity.
- the predetermined sector is the first sector.
- the method further includes if the fill-file exists, when the host system is about to read the FAT, setting the logical addresses corresponding to the specific sectors to the write-protect status and transmitting the FAT to the host system, and when the host system is about to read the root directory, setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status and transmitting the root directory to the host system.
- the method for automatically creating a fill-file further includes following steps. Whether the host system starts to execute a format operation is determined. If the host system starts to execute the format operation, whether the format operation is completed is determined. After the format operation is completed, when the host system is about to read the FAT, the sector amount corresponding to the predetermined file capacity is configured, the specific sectors conforming to the sector amount are defined by starting from the predetermined sector of the FAT, the cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to the write-protect status.
- the fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- the step of determining whether the host system starts to execute the format operation includes when the host system is about to write a writing data into a partition information recording address, determining whether the writing data is the same as an existing data stored in the partition information recording address, and if the writing data is different from the existing data, determining that the host system starts to execute the format operation.
- the step of determining whether the host system starts to execute the format operation includes when the host system is about to update the content of the PBR, determining whether the host system executes a file modification operation according to data respectively written by the host system into a specific byte address in the PBR before and after the PBR is updated, and if the host system does not execute the file modification operation, determining that the host system starts to execute the format operation.
- the PBR has a free space field
- the step of determining whether the host system starts to execute the format operation includes when the host system is about to update the content of the PBR, if a free capacity recorded in the free space field is smaller than a difference between a total capacity of the memory chip and the predetermined file capacity, determining that the host system starts to execute the format operation.
- the method further includes determining whether the FAT and the root directory exist when the host system starts to execute the format operation, and if the FAT and the root directory exist, setting all the logical addresses corresponding to the FAT and the root directory to a writable status.
- the step of determining whether the format operation is completed includes determining that the format operation is completed when the host system continuously reads two different logical addresses or the logical address read by the host system is different from the logical address previously written by the host system.
- the method for automatically creating a fill-file further includes following steps.
- the host system is powered on, if the logical addresses are not formatted, whether the host system starts to execute a format operation is determined. If the host system starts to execute the format operation, whether the format operation is completed is determined. If the format operation is completed, when the host system is about to read the FAT, the sector amount corresponding to the predetermined file capacity is configured, the specific sectors conforming to the sector amount are defined by starting from the predetermined sector of the FAT, the cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to the write-protect status.
- the fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- the present invention also provides a memory controller for managing a plurality of physical blocks of a memory chip in a memory storage device.
- the memory controller includes a host interface, a memory interface, and a memory management circuit.
- the host interface is used for coupling to a host system
- the memory interface is used for coupling to the memory chip.
- the memory management circuit is coupled to the host interface and the memory interface.
- the memory management circuit groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area.
- the memory management circuit When the host system is powered on, if the logical addresses have been formatted into at least one partition by using a file system and the partition includes a PBR, a FAT, and a root directory, the memory management circuit further reads the PBR and the root directory to determine whether a fill-file of a predetermined file capacity exists in the memory chip.
- the memory management circuit configures a sector amount corresponding to the predetermined file capacity, defines a plurality of specific sectors conforming to the sector amount by starting from a predetermined sector of the FAT, fills a plurality of cluster entry values related to the fill-file into the specific sectors, and transmits the FAT to the host system after setting the logical addresses corresponding to the specific sectors to a write-protect status.
- the memory management circuit fills a fill-file header of the fill-file into the predetermined sector of the root directory and transmits the root directory to the host system after setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status.
- the present invention further provides a memory storage device including a memory chip, a connector, and a memory controller.
- the memory chip has a plurality of physical blocks.
- the connector is used for coupling to a host system.
- the memory controller is coupled to the memory chip and the connector.
- the memory controller groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area.
- the memory controller When the host system is powered on, if the logical addresses have been formatted into at least one partition by using a file system and the partition includes a PBR, a FAT, and a root directory, the memory controller reads the PBR and the root directory and determines whether a fill-file of a predetermined file capacity exists in the memory chip.
- the memory controller configures a sector amount corresponding to the predetermined file capacity, defines a plurality of specific sectors conforming to the sector amount by starting from a predetermined sector of the FAT, fills a plurality of cluster entry values related to the fill-file into the specific sectors, and transmits the FAT to the host system after setting the logical addresses corresponding to the specific sectors to a write-protect status.
- the memory controller fills a fill-file header of the fill-file into the predetermined sector of the root directory and transmits the root directory to the host system after setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status.
- the PBR has a free space field, and if the fill-file does not exist, when the host system is about to read the PBR, the memory controller further writes the difference between the total capacity of the memory chip and the predetermined file capacity into the free space field and transmits the PBR to the host system.
- the predetermined sector of the FAT is used for storing the cluster entry values of a first quantity
- other sectors of the FAT are respectively used for storing the cluster entry values of a second quantity
- the memory controller further configures a cluster amount for storing the fill-file according to the predetermined file capacity and configures the sector amount according to the cluster amount, the first quantity, and the second quantity.
- the present invention still provides a memory storage device including a memory chip, a connector, and a memory controller.
- the memory chip has a plurality of physical blocks.
- the connector is used for coupling to the host system.
- the memory controller is coupled to the memory chip and the connector.
- the memory controller manages the physical blocks of the memory chip. To be specific, the memory controller groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area.
- the memory controller When the host system is powered on, the memory controller further configures a corresponding data of a fill-file of a predetermined file capacity to a file system stored in the memory chip and transmits a FAT of the file system to the host system after setting the fill-file to a write-protect status, wherein the fill-file is used for occupying a cache space of the host system so that the host system reads desired data from the memory chip.
- the memory storage device automatically creates a large-capacity fill-file according to different file system used without affecting the operation of the host system, so that the time spent on creating the large-capacity fill-file is reduced.
- the memory storage device can instantly obtain the storage address range of the fill-file. Accordingly, the processing speed of the memory storage device is increased.
- FIG. 1A is a diagram of a host system using a memory storage device according to an exemplary embodiment of the present invention.
- FIG. 1B is a diagram of a computer, an input/output (I/O) device, and a memory storage device according to an exemplary embodiment of the present invention.
- FIG. 1C is a diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention.
- FIG. 2 is a schematic block diagram of the memory storage device in FIG. 1A .
- FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the present invention.
- FIG. 4 and FIG. 5 are diagrams illustrating an example of how a memory chip is managed according to an exemplary embodiment of the present invention.
- FIG. 6 illustrates an example of formatting logical addresses of a memory chip by using a file system according to an exemplary embodiment of the present invention.
- FIG. 7A and FIG. 7B are diagrams illustrating how specific sectors of a FAT are filled up by using cluster entry values related to a fill-file and at least one predetermined file according to an exemplary embodiment of the present invention.
- FIG. 8A and FIG. 8B are diagrams illustrating how the first sector of a root directory is filled up by using a fill-file header of a fill-file and at least one predetermined file header according to an exemplary embodiment of the present invention.
- FIG. 9 is a flowchart of a method for automatically creating a fill-file according to an exemplary embodiment of the present invention.
- Embodiments of the present invention may comprise any one or more of the novel features described herein, including in the Detailed Description, and/or shown in the drawings.
- “at least one”, “one or more”, and “and/or” are open-ended expressions that are both conjunctive and disjunctive in operation.
- each of the expressions “at least on of A, B and C”, “at least one of A, B, or C”, “one or more of A, B, and C”, “one or more of A, B, or C” and “A, B, and/or C” means A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B and C together.
- FIG. 1A is a diagram of a host system using a memory storage device according to an exemplary embodiment of the present invention.
- the host system 1000 includes a computer 1100 and an input/output (I/O) device 1106 .
- the computer 1100 includes a microprocessor 1102 , a random access memory (RAM) 1104 , a system bus 1108 , a data transmission interface 1110 , and a primary storage device 1112 .
- the I/O device 1106 includes a mouse 1202 , a keyboard 1204 , a display 1206 , and a printer 1208 , as shown in FIG. 1B . It should be understood that the devices illustrated in FIG. 1B are not intended to limit the I/O device 1106 , and the I/O device 1106 may further include other devices.
- the memory storage device 100 is coupled to other components of the host system 1000 through the data transmission interface 1110 .
- the host system 1000 can write data into or read data from the memory storage device 100 .
- the memory storage device 100 may be a memory card 1214 , a flash memory 1212 , or a solid state drive (SSD) 1216 , as shown in FIG. 1B .
- the host system 1000 may be any system that can store data. Even though the host system 1000 is described as a computer system in the present exemplary embodiment, in another exemplary embodiment of the present invention, the host system 1000 may also be a cell phone, a digital camera, a video camera, a communication device, an audio player, or a video player.
- the memory storage device is then a secure digital (SD) card 1312 , a multimedia card (MMC) 1314 , a memory stick (MS) 1316 , a compact flash (CF) card 1318 , or an embedded storage device 1320 (as shown in FIG. 1 C) used by the digital camera 1310 .
- the embedded storage device 1320 may be an embedded MMC (eMMC) directly coupled to the motherboard of the host system.
- eMMC embedded MMC
- FIG. 2 is a schematic block diagram of the memory storage device 100 in FIG. 1A .
- the memory storage device 100 includes a connector 102 , a memory controller 104 , and a memory chip 106 .
- the connector 102 is coupled to the memory controller 104 and used for coupling to the host system 1000 .
- the connector 102 may be a SD interface.
- the connector 102 may also be a MMC interface, a universal serial bus (USB) interface, a serial advanced technology attachment (SATA) interface, a parallel advanced technology attachment (PATA) interface, an Institute of Electrical and Electronic Engineers (IEEE) 1394 interface, a peripheral component interconnect (PCI) express interface, a MS interface, a CF interface, an integrated drive electronics (IDE) interface, or any other suitable interface.
- USB universal serial bus
- SATA serial advanced technology attachment
- PATA parallel advanced technology attachment
- IEEE 1394 an Institute of Electrical and Electronic Engineers 1394 interface
- PCI peripheral component interconnect
- MS interface MS interface
- CF Compact Flash
- IDE integrated drive electronics
- the memory controller 104 executes a plurality of logic gates or control instructions implemented in a hardware form or a firmware form and performs various data operations on the memory chip 106 according to instructions of the host system 1000 .
- the host system 1000 executes a pre-read mechanism to read data at some addresses of the memory chip 106 into the cache space of the RAM 1104 that is allocated to the pre-read mechanism.
- the memory controller 104 further executes a fill-file automatic creation procedure to fill up the cache space in the RAM 1104 with a fill-file, so that every time when the host system 1000 reads data from the memory chip 106 , it can read the desired data correctly.
- the fill-file automatic creation procedure executed by the memory controller 104 will be described with reference to accompanying drawings below.
- the memory chip 106 is coupled to the memory controller 104 .
- the memory chip 106 stores information related to the file system (for example, a file allocation table (FAT), a partition boot record (PBR), and a root directory) and other general files (for example, text files, video files, or audio files).
- the memory chip 106 includes a plurality of physical blocks (for example, physical blocks 206 ( 0 )- 206 (K)), wherein each physical block includes a plurality of physical addresses (also referred to as physical pages), and the physical pages corresponding to the same physical block can be written individually but have to be erased all together.
- physical block may be the smallest unit for erasing data. Namely, each physical block contains the least number of memory cells that are erased together.
- Physical page may be the smallest unit for programming data. Namely, physical page is the smallest unit for writing data.
- the memory chip 106 is a rewritable non-volatile memory.
- the memory chip 106 is a multi level cell (MLC) NAND flash memory chip.
- MLC multi level cell
- the present invention is not limited thereto, and the memory chip 106 may also be a single level cell (SLC) NAND flash memory chip, any other flash memory chip, or any memory chip with the same characteristics.
- FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the present invention.
- the memory controller 104 includes a host interface 1042 , a memory management circuit 1046 , and a memory interface 1048 .
- the host interface 1042 is coupled to the memory management circuit 1046 and to the host system 1000 through the connector 102 .
- the host interface 1042 receives and identifies commands and data from the host system 1000 . In other words, commands and data from the host system 1000 are transmitted to the memory management circuit 1046 through the host interface 1042 .
- the host interface 1042 is, corresponding to the connector 102 , a SD interface.
- the host interface 1042 may also be a MMC interface, a USB interface, a SATA interface, a PATA interface, an IEEE 1394 interface, a PCI express interface, a MS interface, a CF interface, an IDE interface, or any other interface.
- the memory management circuit 1046 controls the operation of the memory controller 104 .
- the memory management circuit 1046 has a plurality of control instructions. During the operation of the memory storage device 100 , the control instructions are executed to accomplish the fill-file automatic creation procedure in the present exemplary embodiment.
- control instructions of the memory management circuit 1046 are implemented in a firmware form.
- the memory management circuit 1046 has a microprocessor unit (not shown) and a read-only memory (ROM, not shown), and the control instructions are burnt into the ROM.
- the control instructions are executed by the microprocessor unit to accomplish the fill-file automatic creation procedure in the present exemplary embodiment.
- control instructions of the memory management circuit 1046 may also be stored in a specific area of the memory chip 106 (for example, the system area in the memory chip 106 that is exclusively used for storing system data) as program codes.
- the memory management circuit 1046 has a microprocessor unit (not shown), a ROM (not shown), and a RAM (not shown).
- the ROM has a driving code segment, and when the memory controller 104 is enabled, the microprocessor unit first executes this driving code segment to load the control instructions from the memory chip 106 into the RAM of the memory management circuit 1046 . After that, the microprocessor unit runs the control instructions to execute the fill-file automatic creation procedure provided by the present exemplary embodiment.
- the control instructions of the memory management circuit 1046 may also be implemented in a hardware form.
- the memory interface 1048 is coupled to the memory management circuit 1046 and used for coupling the memory controller 104 to the memory chip 106 so that the memory controller 104 can perform various operations on the memory chip 106 . Namely, data to be written into the memory chip 106 is converted by the memory interface 1048 into a format acceptable to the memory chip 106 .
- the memory controller 104 further includes a buffer memory 2002 .
- the buffer memory 2002 is coupled to the memory management circuit 1046 and used for temporarily storing data from the host system 1000 or data from the memory chip 106 .
- the memory controller 104 further includes an error correcting circuit 2004 .
- the error correcting circuit 2004 is coupled to the memory management circuit 1046 , and which executes an error correcting procedure to ensure data accuracy.
- the error correcting circuit 2004 when the memory controller 104 receives a write command from the host system 1000 , the error correcting circuit 2004 generates an error correcting code (ECC) for the data corresponding to the write command, and the data and the corresponding ECC are both written into the memory chip 106 .
- ECC error correcting code
- the memory controller 104 receives a read command from the host system 1000 , it reads the data corresponding to the read command and the corresponding ECC from the memory chip 106 . Then, the error correcting circuit 2004 executes the error correcting procedure on the data according to the ECC.
- the memory controller 104 further includes a power management circuit 2006 .
- the power management circuit 2006 is coupled to the memory management circuit 1046 , and which controls the power supply of the memory storage device 100 .
- FIG. 4 and FIG. 5 are diagrams illustrating an example of how a memory chip is managed according to an exemplary embodiment of the present invention.
- the memory management circuit 1046 logically groups the physical blocks 206 ( 0 )- 206 (K) in the memory chip 106 into a data area 402 , a spare area 404 , a system area 406 , and a replacement area 408 .
- the physical blocks logically belonging to the data area 402 and the spare area 404 are used for storing data from the host system 1000 .
- the physical blocks in the data area 402 contain data
- the physical blocks in the spare area 404 are used for substituting the physical blocks in the data area 402 .
- the physical blocks in the spare area 404 are blank or available physical blocks (i.e., no data is recorded therein or data recorded therein is marked as invalid data). Namely, the physical blocks in the spare area 404 have been erased, or when a physical block is selected from the spare area 404 for storing data, the selected physical block is erased before data is stored therein.
- the physical blocks in the spare area 404 are available physical blocks.
- the physical blocks logically belonging to the system area 406 are used for recording system data, such as the manufacturer and model of the memory chip 106 , the number of physical blocks in the memory chip 106 , and the number of physical pages in each physical block.
- the physical blocks logically belonging to the replacement area 408 are referred to as replacement physical blocks. For example, when the memory chip 106 is manufactured, 4% of its physical blocks are reserved for replacement purpose. When a physical block in the data area 402 , the spare area 404 , or the system area 406 is damaged, a physical block is selected from the replacement area 408 for replacing the damaged physical block. Accordingly, if a physical block is damaged and there are still normal physical blocks in the replacement area 408 , the memory management circuit 1046 selects a normal physical block from the replacement area 408 for replacing the damaged physical block. If a physical block is damaged but there is no more normal physical block in the replacement area 408 , the memory management circuit 1046 announces that the memory storage device 100 is in a write-protect status and cannot be used for writing data anymore.
- the memory management circuit 1046 configures a plurality of logical blocks. Each of the logical blocks includes a plurality of logical addresses.
- the memory management circuit 1046 provides the logical addresses to the host system 1000 so that the host system 1000 can access data in the physical blocks that are alternatively used for storing data.
- the memory management circuit 1046 groups the logical addresses provided to the host system 1000 into logical blocks 510 ( 0 )- 510 (L) and maps the logical blocks 510 ( 0 )- 510 (L) to the physical blocks in the data area 402 .
- the memory management circuit 1046 establishes a logical block-physical block mapping table for recording the mapping relationship between the logical blocks and the physical blocks.
- the logical addresses in the logical blocks 510 ( 0 )- 510 (L) have to be formatted by using a file system (for example, FAT32 or FAT16) supported by the OS 1200 before they are used by the OS 1200 .
- a file system for example, FAT32 or FAT16
- FIG. 6 illustrates an example of formatting logical addresses in a memory chip by using a file system according to an exemplary embodiment of the present invention.
- the host system 1000 formats the logical addresses in the logical blocks 510 ( 0 )- 510 (L) of the memory chip 106 into a partition 600 by using the file system supported by the OS 1200 .
- the partition 600 includes a master boot region 602 , a partition boot region 604 , a FAT region 606 , a directory region 608 , and a file region 610 .
- the storage addresses in the master boot region 602 are used for storing system information of the storage space of the memory storage device 100 , such as the master boot record (MBR).
- the storage addresses in the partition boot region 604 are used for storing the PBR.
- the storage addresses in the FAT region 606 are used for storing the FAT.
- a FAT records the cluster entry value of each of those logical addresses for storing files.
- the FAT region 606 stores two FATs, wherein one of the FATs is regularly accessed while the other FAT is a backup FAT.
- the storage addresses in the directory region 608 are used for storing the root directory.
- the root directory records attribute information of files and directories currently stored in the memory storage device 100 .
- the storage addresses in the file region 610 are used for storing the actual contents of the files.
- the master boot region 602 , the partition boot region 604 , the FAT region 606 , and the directory region 608 are accessed in unit of sectors.
- the smallest unit for storing data into a disc is sector, and each sector contains an information content of 512 bytes.
- the OS 1200 of the host system 1000 uses cluster as the basic unit for accessing files, wherein the number of sectors in each cluster has to be a power of 2. If it is assumed that 8 continuous sectors constitute a cluster, the capacity of the cluster is then 4096 bytes. In other words, the OS 1200 accesses data in unit of 8 continuous sectors so that the efficiency can be improved
- the host system 1000 formats the logical addresses into one partition 600
- the host system 1000 may also format the logical addresses into multiple partitions by using a file system.
- the memory management circuit 1046 determines whether a fill-file of a predetermined file capacity exists in the memory chip 106 after it determines that the logical addresses in the logical blocks 510 ( 0 )- 510 (L) of the memory chip 106 have been formatted.
- the predetermined file capacity may be 20 to 100 megabytes (MB).
- the present invention is not limited thereto.
- the memory management circuit 1046 creates the fill-file at the same time when the host system 1000 reads information about the file system, such as the PBR, the FAT, and the root directory.
- the memory management circuit 1046 reads the PBR and the root directory of the partition 600 and determines whether a fill-file of the predetermined file capacity exists in the memory chip 106 accordingly.
- the memory management circuit 1046 also configures a sector amount corresponding to the predetermined file capacity and defines several sectors conforming to the sector amount as specific sectors by starting from a predetermined sector of the FAT, and the memory management circuit 1046 further fills a plurality of cluster entry values related to the fill-file into the specific sectors.
- the memory management circuit 1046 takes the same action regarding the two FATs stored in the FAT region 606 .
- the host system 1000 when the host system 1000 performs the format operation by using different file systems, different numbers of bytes are required for recording each cluster entry value in the corresponding FAT. For example, 4 bytes are required for recording each cluster entry value in the FAT established by using the FAT32 file system, and 2 bytes are required for recording each cluster entry value in the FAT established by using the FAT16 file system.
- the predetermined sector may be the first sector of the FAT. Because some bytes in the first sector of the FAT are reserved for recording information related to the FAT (for example, a starting flag of the FAT), the number of cluster entry values that can be stored in the first sector of the FAT is different from the number of cluster entry values that can be stored in other sectors.
- the first sector of the FAT can store 125 (i.e., (512 ⁇ 12)/4) cluster entry values, and each other sector can store 128 (i.e., 512/4) cluster entry values.
- the first sector of the FAT can store 254 (i.e., (512 ⁇ 4)/2) cluster entry values, and each other sector can store 256 (i.e., 512/2) cluster entry values.
- the memory management circuit 1046 configures a cluster amount for storing the fill-file according to the predetermined file capacity and configures the sector amount according to the cluster amount, a first quantity (i.e. the number of cluster entry values that can be stored in the first sector of the FAT), and a second quantity (i.e. the number of cluster entry values that can be stored in each other sector).
- the memory management circuit 1046 calculates the cluster amount CN for storing the fill-file by using following expression:
- X is the predetermined file capacity (in unit of MB) of the fill-file
- Y is the capacity of one cluster (in unit of kilobytes (KB)).
- the memory management circuit 1046 calculates the sector amount SN by using following expression:
- m is the number of cluster entry values that can be stored in the first sector of the FAT (i.e. the first quantity)
- n is the number of cluster entry values that can be stored in each other sector (i.e. the second quantity).
- the memory management circuit 1046 may directly obtain the sector amount SN from a table recording the mapping relationship between the file capacity and the sector amount according to the predetermined file capacity of the fill-file.
- the memory management circuit 1046 defines those sectors conforming to the sector amount SN as specific sectors by starting from a predetermined sector of the FAT. For example, when the predetermined sector is the first sector of the FAT, the first SN sectors of the FAT are defined as the specific sectors, and when the predetermined sector is the M th sector of the FAT, the M th to the (M+SN ⁇ 1) th sectors of the FAT are defined as the specific sectors.
- the memory management circuit 1046 fills the cluster entry values related to the fill-file by starting from the predetermined sector of the FAT. After all the cluster entry values related to the fill-file are filled into the specific sectors, the memory management circuit 1046 determines whether there is still free space in the specific sectors. If there is still free space in the specific sectors, the memory management circuit 1046 fills up the free space by using a plurality of cluster entry values related to at least one predetermined file, wherein the predetermined file may be a hidden file, a deleted file, or a general file but is not limited thereto.
- the memory management circuit 1046 obtains the cluster amount CN for storing the fill-file as 640 and the corresponding sector amount SN as 6 through table lookup or abovementioned expressions. If the predetermined sector is the first sector of the FAT, the first 6 sectors of the FAT are defined as the specific sectors (i.e., the sectors FATS( 1 )-FATS( 6 ) in FIG. 7A ).
- the cluster amount CN corresponding to the fill-file is 640, besides filling information related to the FAT (denoted with straight lines in FIG. 7A ) into the first specific sector FATS( 1 ), 125 cluster entry values related to the fill-file (denoted with diagonal lines in FIG. 7A ) are filled into the remaining space of the first specific sector FATS( 1 ), 128 cluster entry values related to the fill-file are respectively filled into each of the specific sectors FATS( 2 )-FATS( 5 ), and the last 3 cluster entry values related to the fill-file are filled into the last specific sector FATS( 6 ). Because the specific sector FATS( 6 ) still has free space, the memory management circuit 1046 fills up the free space by using the cluster entry values related to the predetermined file (denoted with dots in FIG. 7A ).
- the sectors FATS(M)-FATS(M+5) are defined as the specific sectors.
- identification information for example, the starting flag of the fill-file, denoted with straight lines in FIG. 7B
- partial cluster entry values related to the fill-file are filled into the first specific sector FATS(M)
- partial cluster entry values related to the fill-file are filled into the specific sectors FATS(M+1)-FATS(M+4)
- partial cluster entry values related to the fill-file and the cluster entry values related to the predetermined file are filled into the last specific sector FATS(M+5).
- the memory management circuit 1046 first sets the logical addresses corresponding to all the specific sectors to a write-protect status and then transmits the FAT to the host system 1000 .
- the memory management circuit 1046 fills a fill-file header of the fill-file into the predetermined sector (for example, the first sector) of the root directory after it reads the root directory from the memory chip 106 .
- the memory management circuit 1046 determines that there is still free space in the predetermined sector of the root directory after it fills the fill-file header into the predetermined sector of the root directory (i.e., the fill-file header cannot fill up the predetermined sector of the root directory)
- the memory management circuit 1046 fills up the predetermined sector of the root directory by using at least one predetermined file header, wherein the number of the predetermined file headers is corresponding to the filename format of the fill-file, the filename format of the predetermined file (for example, a hidden file, a deleted file, or a general file) corresponding to each predetermined file header, and the sector capacity.
- a file header corresponding to a short filename format takes up a space of 32 bytes in the root directory.
- the predetermined sector is the first sector of the root directory and the filename format of the fill-file is a short filename
- the memory management circuit 1046 fills up the remaining 480 (i.e., 512 ⁇ 32) bytes in the first sector of the root directory by using 15 predetermined file headers corresponding to a predetermined short filename format (as the first sector RDS( 1 ) of the root directory shown in FIG.
- the memory management circuit 1046 also fills up the first sector of the root directory by using a predetermined file header when there is still free space in the first sector of the root directory.
- the memory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to a write-protect status and then transmits the root directory to the host system 1000 .
- the PBR has a free space field if the FAT32 file system is adopted.
- the memory management circuit 1046 determines that the fill-file does not exist, when the host system 1000 is about to read the PBR, the memory management circuit 1046 reads the PBR from the memory chip 106 , writes the difference between the total capacity of the memory chip 106 and the predetermined file capacity into the free space field, and then transmits the PBR back to the host system 1000 .
- the memory management circuit 1046 directly transmits the PBR back to the host system 1000 after it reads the PBR from the memory chip 106 .
- the memory management circuit 1046 determines that the logical addresses in the logical blocks 510 ( 0 )- 510 (L) of the memory chip 106 have been formatted and a fill-file of the predetermined file capacity exists in the memory chip 106 when the host system 1000 is powered on, when the host system 1000 is about to read the FAT, the memory management circuit 1046 sets the logical addresses corresponding to the specific sectors in the FAT to the write-protect status and then transmits the FAT to the host system 1000 . In addition, when the host system 1000 is about to read the root directory, the memory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status and then transmits the root directory to the host system 1000 .
- the host system 1000 In order to use the memory storage device 100 , the host system 1000 needs to read information related to the file system of the memory storage device 100 after the host system 1000 is powered on. Thus, when the memory chip 106 has been formatted and the fill-file does not exists, the memory management circuit 1046 fills the information related to the fill-file respectively into the PBR, the FAT, and the root directory at the same time when the host system 1000 respectively reads various file system information. Accordingly, the memory management circuit 1046 can automatically create the fill-file without spending additional execution time, and the memory management circuit 1046 can create the corresponding fill-file regardless of what file system is used for formatting the memory chip 106 .
- the memory management circuit 1046 sets the addresses for storing the fill-file to the write-protect status so that contents stored in these addresses won't be changed by the host system 1000 . Because the fill-file is automatically created by the memory management circuit 1046 , the memory management circuit 1046 can instantly obtain the storage address range of the fill-file. Due to the same reason, the memory storage device 100 can be synchronized with the host system 1000 after the host system 1000 finishes reading the information of the file system.
- the memory management circuit 1046 determines that the logical addresses of the memory chip 106 have not been formatted when the host system 1000 is powered on, the memory management circuit 1046 waits for the host system 1000 to finish executing the format operation and then automatically creates the fill-file in the situation that the memory chip 106 has been formatted and the fill-file does not exist.
- the memory management circuit 1046 in the present exemplary embodiment is capable of determining whether the host system 1000 has started to execute the format operation and whether the format operation has been completed.
- the memory management circuit 1046 may determine whether the host system 1000 has started to execute the format operation through following techniques.
- a partition information recording address in the memory chip 106 is used for recording data related to a partition.
- the memory management circuit 1046 checks whether the writing data is the same as existing data stored in the partition information recording address. If the writing data is different from the existing data, which means the host system 1000 is about to change the file system, the memory management circuit 1046 determines that the host system 1000 has started to execute the format operation.
- the memory management circuit 1046 has to further determine whether an operation of the host system 1000 is the format operation or the file modification operation.
- the PBR has a specific byte address
- the memory management circuit 1046 determines whether the host system 1000 executes a file modification operation according to data contents respectively written into the specific byte address before and after the host system 1000 updates the PBR. If the host system 1000 does not execute a file modification operation, the memory management circuit 1046 determines that the host system 1000 is about to execute a format operation.
- the specific byte address of the PBR varies along with different file system.
- the specific byte address is 0 ⁇ 25 in the FAT16 file system
- the specific byte address is 0 ⁇ 51 in the FAT32 file system.
- every time when the host system 1000 is about to execute a file modification operation it first sets the value at the address 0 ⁇ 25 to 1, and after the host system 1000 finishes executing the file modification operation, it changes the value at the address 0 ⁇ 25 to 0.
- the memory management circuit 1046 can determine whether the host system 1000 simply modifies a file or executes a format operation according to the data respectively written into the specific byte address by the host system 1000 .
- the memory management circuit 1046 determines that the host system 1000 starts to execute a format operation if the free capacity recorded in the free space field is smaller than the difference between the total capacity of the memory chip 106 and the predetermined file capacity.
- the memory management circuit 1046 determines that the host system 1000 is about to execute the format operation. If the FAT and the root directory exist, the memory chip 106 has been formatted. Because the memory management circuit 1046 automatically creates a fill-file, and after creating the fill-file, the memory management circuit 1046 sets some logical addresses in the FAT and the root directory to the write-protect status, in order to allow the format operation to be performed successfully, the memory management circuit 1046 sets all the corresponding logical addresses in the FAT and the root directory to a writable status to allow the host system 1000 to execute the format operation.
- the host system 1000 executes the format operation, it performs data writing, reading, and comparison operations regarding the same address. For example, after the host system 1000 finishes writing the FAT, it reads the FAT again to be compared, so that the memory management circuit 1046 can determine whether the format operation is completed according to such behavior of the host system 1000 .
- the memory management circuit 1046 records the logical address.
- the memory management circuit 1046 determines whether the logical address corresponding to the reading operation is the same as the logical address corresponding to the previous writing operation. If the two are the same, it is determined that the host system 1000 is going to perform a comparison operation and the format operation is not yet completed. Thus, when the host system 1000 continuously reads two different logical addresses or a logical address read by the host system 1000 is different from a previous logical address, the memory management circuit 1046 determines that the format operation is completed.
- the memory management circuit 1046 After the format operation is completed, the memory management circuit 1046 automatically creates a fill-file.
- the method adopted by the memory management circuit 1046 for creating the fill-file is the same as or similar to the method for creating a fill-file when the memory management circuit 1046 determines that the memory chip 106 has been formatted and no fill-file exists after the host system 1000 is powered on therefore will not be described herein.
- the memory management circuit 1046 can detect the beginning and ending of the format operation and automatically create a fill-file after the host system 1000 finishes executing the format operation through the technique described above.
- a user sets the predetermined file capacity of the fill-file by issuing a special instruction. After the host system 1000 re-formats the logical addresses in the logical blocks 510 ( 0 )- 510 (L) of the memory chip 106 , the memory management circuit 1046 automatically creates a fill-file conforming to the predetermined file capacity set by the user.
- FIG. 9 is a flowchart of a method for automatically creating a fill-file according to an exemplary embodiment of the present invention.
- step S 910 the memory management circuit 1046 groups the physical blocks 206 ( 0 )- 206 (K) into a data area 402 , a spare area 404 , a system area 406 , and a replacement area 408 .
- step S 920 the memory management circuit 1046 configures a plurality of logical addresses and groups the logical addresses into a plurality of logical blocks 510 ( 0 )- 510 (L) to be mapped to the physical blocks in the data area 402 .
- step S 930 when the host system 1000 is powered on, the memory management circuit 1046 determines whether the logical addresses are formatted into a partition.
- step S 940 the memory management circuit 1046 reads the PBR and the root directory in the partition to determine whether a fill-file of the predetermined file capacity exists.
- step S 950 when the host system 1000 is about to read the FAT, the memory management circuit 1046 fills a plurality of cluster entry values related to the fill-file into several specific sectors of the FAT. If the cluster entry values related to the fill-file cannot fill up the specific sectors, the memory management circuit 1046 fills up the specific sectors by using a plurality of cluster entry values of at least one predetermined file (as shown in FIG. 7 ). After setting the logical addresses corresponding to the specific sectors to a write-protect status, the memory management circuit 1046 transmits the FAT to the host system 1000 .
- step S 960 when the host system 1000 is about to read the root directory, the memory management circuit 1046 fills a fill-file header of the fill-file into a predetermined sector of the root directory.
- the memory management circuit 1046 fills up the predetermined sector of the root directory by using at least one predetermined file header (as shown in FIG. 8A and FIG. 8B ). After setting the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status, the memory management circuit 1046 transmits the root directory to the host system 1000 .
- step S 970 when the host system 1000 is about to read the FAT, the memory management circuit 1046 sets the logical addresses corresponding to the specific sectors to the write-protect status and transmits the FAT to the host system 1000 . Besides, when the host system 1000 is about to read the root directory, the memory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status and then transmits the root directory to the host system 1000 .
- step S 930 the memory management circuit 1046 determines that the logical addresses have not been formatted
- step S 980 the memory management circuit 1046 constantly determines whether the host system 1000 starts to execute a format operation. If the memory management circuit 1046 determines that the host system 1000 starts to execute the format operation, in step S 990 , the memory management circuit 1046 constantly determines whether the format operation is completed.
- the memory management circuit 1046 determines that the format operation is completed, in steps S 950 and S 960 , the memory management circuit 1046 fills data related to the fill-file into the FAT and the root directory when the host system 1000 respectively reads the FAT and the root directory.
- the memory controller 104 when the host system 1000 is powered on, the memory controller 104 configures the data corresponding to the fill-file of the predetermined file capacity into the file system stored in the memory chip 106 , and after setting the fill-file to the write-protect status, the memory controller 104 transmits the FAT of the file system to the host system 1000 .
- the memory controller 104 first determines whether the fill-file exists in the file system of the memory chip 106 . If the fill-file does not exist, the memory controller 104 configures the data corresponding to the fill-file into the file system. Because the fill-file is used for taking up a cache space in the host system 1000 , it is ensured that the host system 1000 can read the desired data from the memory chip 106 when it executes a data reading operation.
- the present invention provides a memory storage device, a memory controller thereof, and a method for automatically creating a fill-file, wherein the memory storage device automatically creates a large-capacity fill-file for filling up the cache space in the RAM of a host system without affecting the operation of the host system, so as to ensure that the host system with a pre-read mechanism can read data from the memory storage device every time when the host system executes a reading operation.
- the previously described exemplary embodiments of the present invention have many advantages, including no additional execution time is consumed since the memory storage device creates the fill-file at the same time when the host system reads information about the file system, and the efficiency of the host system in executing data writing operations is improved since the fill-file is created by the memory storage device itself so that the memory storage device can instantly obtain the storage address range of the fill-file, wherein the advantages aforementioned not required in all versions of the invention.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
- This application claims the priority benefit of Taiwan application serial no. 99134409, filed on Oct. 8, 2010. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
- 1. Field of the Invention
- The present invention generally relates to a method for creating a fill-file, and more particularly, to a method for automatically creating a fill-file, a memory storage device using the same, and a memory controller thereof.
- 2. Description of Related Art
- Regarding a host system (for example, a cell phone or a computer) connected to a storage device, in order to improve the efficiency of the host system on reading data from the storage device, a pre-read mechanism is usually adopted to read part of the data into a random access memory (RAM) of the host system in advance. When subsequently the host system is about to read data from a specific address, if the data at this specific address is already recorded in the RAM of the host system, the host system then directly reads the data from the RAM. In other words, the host system only reads data from the storage device when the data to be read by the host system is not yet recorded in the RAM.
- Even though the pre-read mechanism can increase the efficiency in data reading, it may cause the host system not to be able to obtain the latest data in some cases. For example, if the host system reads data from a specific address and records the data into the RAM, and the host system then writes data into the storage device to update the data at the specific address again, when subsequently the host system reads the specific address, because the data at the specific address has been recorded in the RAM, the host system still reads the data from the RAM instead of the storage device. Thus, the host system cannot obtain the updated data.
- In order to allow the host system to read the latest data from the storage device, an existing technique usually adopted is to make the host system to write a fill-file into the RAM, so as to make sure that the host system reads data from the storage device. However, it takes a lot of time for the host system to write the fill-file, and when the storage device needs to capture the address range of the fill-file, the host system may determine that the operation of the storage device times out or may even remove or reset the storage device due to the long processing time of the storage device, which brings a lot of inconvenience to the user.
- Nothing herein should be construed as an admission of knowledge in the prior art of any portion of the present invention. Furthermore, citation or identification of any document in this application is not an admission that such document is available as prior art to the present invention, or that any reference forms a part of the common general knowledge in the art.
- Accordingly, the present invention is directed to a method for automatically creating a fill-file, wherein the fill-file of a large capacity is instantly and automatically created by a memory storage device according to different file system.
- The present invention is directed to a memory controller, wherein a memory storage device having the memory controller can instantly and automatically create a fill-file of a large capacity according to different file system.
- The present invention is directed to a memory storage device which can instantly and automatically create a fill-file of a large capacity according to different file system.
- The present invention provides a method for automatically creating a fill-file. The method is adaptable to a memory storage device coupled to a host system. The memory storage device includes a memory chip, and the memory chip has a plurality of physical blocks. In the present method, the physical blocks are grouped into at least a data area, a spare area, and a system area. A plurality of logical addresses is configured, and the logical addresses are grouped into a plurality of logical blocks to be mapped to the physical blocks in the data area. When the host system is powered on, if the logical addresses have been formatted into a partition by using a file system and the partition includes a partition boot record (PBR), a file allocation table (FAT), and a root directory, the PBR and the root directory are read, and whether a fill-file of a predetermined file capacity exists in the memory chip is determined. If the fill-file does not exists, when the host system is about to read the FAT, a sector amount corresponding to the predetermined file capacity is configured, a plurality of specific sectors conforming to the sector amount is defined by starting from a predetermined sector of the FAT, a plurality of cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to a write-protect status. When the host system is about to read the root directory, a fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- According to an exemplary embodiment of the present invention, the PBR has a free space field, and in the present method, if the fill-file does not exist, when the host system is about to read the PB, a difference between a total capacity of the memory chip and the predetermined file capacity is written into the free space field, and the PBR is transmitted to the host system.
- According to an exemplary embodiment of the present invention, the predetermined sector of the FAT is used for storing the cluster entry values of a first quantity, and other sectors of the FAT are respectively used for storing the cluster entry values of a second quantity. The step of configuring the sector amount corresponding to the predetermined file capacity includes configuring a cluster amount for storing the fill-file according to the predetermined file capacity and configuring the sector amount according to the cluster amount, the first quantity, and the second quantity.
- According to an exemplary embodiment of the present invention, the step of filling the cluster entry values related to the fill-file into the specific sectors further includes determining whether the specific sectors have a free space after filling the cluster entry values related to the fill-file into the specific sectors, and if the specific sectors have the free space, filling up the free space by using a plurality of cluster entry values related to at least one predetermined file.
- According to an exemplary embodiment of the present invention, the predetermined file is one of a hidden file, a deleted file, and a general file.
- According to an exemplary embodiment of the present invention, the step of filling the fill-file header into the predetermined sector of the root directory further includes determining whether the predetermined sector of the root directory has a free space after filling the fill-file header into the predetermined sector of the root directory, and if the predetermined sector of the root directory has the free space, filing up the predetermined sector of the root directory by using at least one predetermined file header.
- According to an exemplary embodiment of the present invention, the quantity of the predetermined file header is corresponding to a filename format of the fill-file, a filename format of a predetermined file corresponding to the predetermined file header, and a sector capacity.
- According to an exemplary embodiment of the present invention, the predetermined sector is the first sector.
- According to an exemplary embodiment of the present invention, after the step of reading the PBR and the root directory to determine whether the fill-file exists in the memory chip, the method further includes if the fill-file exists, when the host system is about to read the FAT, setting the logical addresses corresponding to the specific sectors to the write-protect status and transmitting the FAT to the host system, and when the host system is about to read the root directory, setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status and transmitting the root directory to the host system.
- According to an exemplary embodiment of the present invention, the method for automatically creating a fill-file further includes following steps. Whether the host system starts to execute a format operation is determined. If the host system starts to execute the format operation, whether the format operation is completed is determined. After the format operation is completed, when the host system is about to read the FAT, the sector amount corresponding to the predetermined file capacity is configured, the specific sectors conforming to the sector amount are defined by starting from the predetermined sector of the FAT, the cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to the write-protect status. when the host system is about to read the root directory, the fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- According to an exemplary embodiment of the present invention, the step of determining whether the host system starts to execute the format operation includes when the host system is about to write a writing data into a partition information recording address, determining whether the writing data is the same as an existing data stored in the partition information recording address, and if the writing data is different from the existing data, determining that the host system starts to execute the format operation.
- According to an exemplary embodiment of the present invention, the step of determining whether the host system starts to execute the format operation includes when the host system is about to update the content of the PBR, determining whether the host system executes a file modification operation according to data respectively written by the host system into a specific byte address in the PBR before and after the PBR is updated, and if the host system does not execute the file modification operation, determining that the host system starts to execute the format operation.
- According to an exemplary embodiment of the present invention, the PBR has a free space field, and the step of determining whether the host system starts to execute the format operation includes when the host system is about to update the content of the PBR, if a free capacity recorded in the free space field is smaller than a difference between a total capacity of the memory chip and the predetermined file capacity, determining that the host system starts to execute the format operation.
- According to an exemplary embodiment of the present invention, after the step of determining whether the host system starts to execute the format operation, the method further includes determining whether the FAT and the root directory exist when the host system starts to execute the format operation, and if the FAT and the root directory exist, setting all the logical addresses corresponding to the FAT and the root directory to a writable status.
- According to an exemplary embodiment of the present invention, the step of determining whether the format operation is completed includes determining that the format operation is completed when the host system continuously reads two different logical addresses or the logical address read by the host system is different from the logical address previously written by the host system.
- According to an exemplary embodiment of the present invention, the method for automatically creating a fill-file further includes following steps. When the host system is powered on, if the logical addresses are not formatted, whether the host system starts to execute a format operation is determined. If the host system starts to execute the format operation, whether the format operation is completed is determined. If the format operation is completed, when the host system is about to read the FAT, the sector amount corresponding to the predetermined file capacity is configured, the specific sectors conforming to the sector amount are defined by starting from the predetermined sector of the FAT, the cluster entry values related to the fill-file is filled into the specific sectors, and the FAT is transmitted to the host system after the logical addresses corresponding to the specific sectors are set to the write-protect status. When the host system is about to read the root directory, the fill-file header of the fill-file is filled into the predetermined sector of the root directory, and the root directory is transmitted to the host system after the logical address corresponding to the predetermined sector of the root directory is set to the write-protect status.
- The present invention also provides a memory controller for managing a plurality of physical blocks of a memory chip in a memory storage device. The memory controller includes a host interface, a memory interface, and a memory management circuit. The host interface is used for coupling to a host system, and the memory interface is used for coupling to the memory chip. The memory management circuit is coupled to the host interface and the memory interface. The memory management circuit groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area. When the host system is powered on, if the logical addresses have been formatted into at least one partition by using a file system and the partition includes a PBR, a FAT, and a root directory, the memory management circuit further reads the PBR and the root directory to determine whether a fill-file of a predetermined file capacity exists in the memory chip. If the fill-file does not exist, when the host system is about to read the FAT, the memory management circuit configures a sector amount corresponding to the predetermined file capacity, defines a plurality of specific sectors conforming to the sector amount by starting from a predetermined sector of the FAT, fills a plurality of cluster entry values related to the fill-file into the specific sectors, and transmits the FAT to the host system after setting the logical addresses corresponding to the specific sectors to a write-protect status. When the host system is about to read the root directory, the memory management circuit fills a fill-file header of the fill-file into the predetermined sector of the root directory and transmits the root directory to the host system after setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status.
- The present invention further provides a memory storage device including a memory chip, a connector, and a memory controller. The memory chip has a plurality of physical blocks. The connector is used for coupling to a host system. The memory controller is coupled to the memory chip and the connector. The memory controller groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area. When the host system is powered on, if the logical addresses have been formatted into at least one partition by using a file system and the partition includes a PBR, a FAT, and a root directory, the memory controller reads the PBR and the root directory and determines whether a fill-file of a predetermined file capacity exists in the memory chip. If the fill-file does not exist, when the host system is about to read the FAT, the memory controller configures a sector amount corresponding to the predetermined file capacity, defines a plurality of specific sectors conforming to the sector amount by starting from a predetermined sector of the FAT, fills a plurality of cluster entry values related to the fill-file into the specific sectors, and transmits the FAT to the host system after setting the logical addresses corresponding to the specific sectors to a write-protect status. When the host system is about to read the root directory, the memory controller fills a fill-file header of the fill-file into the predetermined sector of the root directory and transmits the root directory to the host system after setting the logical address corresponding to the predetermined sector of the root directory to the write-protect status.
- According to an exemplary embodiment of the present invention, the PBR has a free space field, and if the fill-file does not exist, when the host system is about to read the PBR, the memory controller further writes the difference between the total capacity of the memory chip and the predetermined file capacity into the free space field and transmits the PBR to the host system.
- According to an exemplary embodiment of the present invention, the predetermined sector of the FAT is used for storing the cluster entry values of a first quantity, and other sectors of the FAT are respectively used for storing the cluster entry values of a second quantity, and the memory controller further configures a cluster amount for storing the fill-file according to the predetermined file capacity and configures the sector amount according to the cluster amount, the first quantity, and the second quantity.
- The present invention still provides a memory storage device including a memory chip, a connector, and a memory controller. The memory chip has a plurality of physical blocks. The connector is used for coupling to the host system. The memory controller is coupled to the memory chip and the connector. The memory controller manages the physical blocks of the memory chip. To be specific, the memory controller groups the physical blocks into at least a data area, a spare area, and a system area, configures a plurality of logical addresses, and groups the logical addresses into a plurality of logical blocks to be mapped to the physical blocks in the data area. When the host system is powered on, the memory controller further configures a corresponding data of a fill-file of a predetermined file capacity to a file system stored in the memory chip and transmits a FAT of the file system to the host system after setting the fill-file to a write-protect status, wherein the fill-file is used for occupying a cache space of the host system so that the host system reads desired data from the memory chip.
- As described above, in the present invention, the memory storage device automatically creates a large-capacity fill-file according to different file system used without affecting the operation of the host system, so that the time spent on creating the large-capacity fill-file is reduced. In addition, because the fill-file is created by the memory storage device itself, the memory storage device can instantly obtain the storage address range of the fill-file. Accordingly, the processing speed of the memory storage device is increased.
- It should be understood, however, that this Summary may not contain all of the aspects and embodiments of the present invention, is not meant to be limiting or restrictive in any manner, and that the invention as disclosed herein is and will be understood by those of ordinary skill in the art to encompass obvious improvements and modifications thereto.
- The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
-
FIG. 1A is a diagram of a host system using a memory storage device according to an exemplary embodiment of the present invention. -
FIG. 1B is a diagram of a computer, an input/output (I/O) device, and a memory storage device according to an exemplary embodiment of the present invention. -
FIG. 1C is a diagram of a host system and a memory storage device according to another exemplary embodiment of the present invention. -
FIG. 2 is a schematic block diagram of the memory storage device inFIG. 1A . -
FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the present invention. -
FIG. 4 andFIG. 5 are diagrams illustrating an example of how a memory chip is managed according to an exemplary embodiment of the present invention. -
FIG. 6 illustrates an example of formatting logical addresses of a memory chip by using a file system according to an exemplary embodiment of the present invention. -
FIG. 7A andFIG. 7B are diagrams illustrating how specific sectors of a FAT are filled up by using cluster entry values related to a fill-file and at least one predetermined file according to an exemplary embodiment of the present invention. -
FIG. 8A andFIG. 8B are diagrams illustrating how the first sector of a root directory is filled up by using a fill-file header of a fill-file and at least one predetermined file header according to an exemplary embodiment of the present invention. -
FIG. 9 is a flowchart of a method for automatically creating a fill-file according to an exemplary embodiment of the present invention. - Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
- Embodiments of the present invention may comprise any one or more of the novel features described herein, including in the Detailed Description, and/or shown in the drawings. As used herein, “at least one”, “one or more”, and “and/or” are open-ended expressions that are both conjunctive and disjunctive in operation. For example, each of the expressions “at least on of A, B and C”, “at least one of A, B, or C”, “one or more of A, B, and C”, “one or more of A, B, or C” and “A, B, and/or C” means A alone, B alone, C alone, A and B together, A and C together, B and C together, or A, B and C together.
- It is to be noted that the term “a” or “an” entity refers to one or more of that entity. As such, the terms “a” (or “an”), “one or more” and “at least one” can be used interchangeably herein.
-
FIG. 1A is a diagram of a host system using a memory storage device according to an exemplary embodiment of the present invention. - The
host system 1000 includes acomputer 1100 and an input/output (I/O)device 1106. Thecomputer 1100 includes amicroprocessor 1102, a random access memory (RAM) 1104, asystem bus 1108, adata transmission interface 1110, and aprimary storage device 1112. The I/O device 1106 includes amouse 1202, akeyboard 1204, adisplay 1206, and aprinter 1208, as shown inFIG. 1B . It should be understood that the devices illustrated inFIG. 1B are not intended to limit the I/O device 1106, and the I/O device 1106 may further include other devices. - In the present exemplary embodiment, the
memory storage device 100 is coupled to other components of thehost system 1000 through thedata transmission interface 1110. Through the operations of themicroprocessor 1102, theRAM 1104, the I/O device 1106, and an operating system (OS) 1200 installed in theprimary storage device 1112, thehost system 1000 can write data into or read data from thememory storage device 100. For example, thememory storage device 100 may be amemory card 1214, aflash memory 1212, or a solid state drive (SSD) 1216, as shown inFIG. 1B . - Generally speaking, the
host system 1000 may be any system that can store data. Even though thehost system 1000 is described as a computer system in the present exemplary embodiment, in another exemplary embodiment of the present invention, thehost system 1000 may also be a cell phone, a digital camera, a video camera, a communication device, an audio player, or a video player. For example, if the host system is adigital camera 1310, the memory storage device is then a secure digital (SD)card 1312, a multimedia card (MMC) 1314, a memory stick (MS) 1316, a compact flash (CF)card 1318, or an embedded storage device 1320 (as shown in FIG. 1C) used by thedigital camera 1310. The embeddedstorage device 1320 may be an embedded MMC (eMMC) directly coupled to the motherboard of the host system. -
FIG. 2 is a schematic block diagram of thememory storage device 100 inFIG. 1A . Referring toFIG. 2 , thememory storage device 100 includes aconnector 102, amemory controller 104, and amemory chip 106. - The
connector 102 is coupled to thememory controller 104 and used for coupling to thehost system 1000. In the present exemplary embodiment, theconnector 102 may be a SD interface. However, the present invention is not limited thereto, and in other exemplary embodiments, theconnector 102 may also be a MMC interface, a universal serial bus (USB) interface, a serial advanced technology attachment (SATA) interface, a parallel advanced technology attachment (PATA) interface, an Institute of Electrical and Electronic Engineers (IEEE) 1394 interface, a peripheral component interconnect (PCI) express interface, a MS interface, a CF interface, an integrated drive electronics (IDE) interface, or any other suitable interface. - The
memory controller 104 executes a plurality of logic gates or control instructions implemented in a hardware form or a firmware form and performs various data operations on thememory chip 106 according to instructions of thehost system 1000. In the present exemplary embodiment, in order to increase the efficiency in data accessing, thehost system 1000 executes a pre-read mechanism to read data at some addresses of thememory chip 106 into the cache space of theRAM 1104 that is allocated to the pre-read mechanism. In order to prevent thehost system 1000 from only reading the cache space of theRAM 1104 therefore not obtaining the latest data in thememory chip 106, thememory controller 104 further executes a fill-file automatic creation procedure to fill up the cache space in theRAM 1104 with a fill-file, so that every time when thehost system 1000 reads data from thememory chip 106, it can read the desired data correctly. The fill-file automatic creation procedure executed by thememory controller 104 will be described with reference to accompanying drawings below. - The
memory chip 106 is coupled to thememory controller 104. Thememory chip 106 stores information related to the file system (for example, a file allocation table (FAT), a partition boot record (PBR), and a root directory) and other general files (for example, text files, video files, or audio files). In the present exemplary embodiment, thememory chip 106 includes a plurality of physical blocks (for example, physical blocks 206(0)-206(K)), wherein each physical block includes a plurality of physical addresses (also referred to as physical pages), and the physical pages corresponding to the same physical block can be written individually but have to be erased all together. To be specific, in the present exemplary embodiment, physical block may be the smallest unit for erasing data. Namely, each physical block contains the least number of memory cells that are erased together. Physical page may be the smallest unit for programming data. Namely, physical page is the smallest unit for writing data. - In the present exemplary embodiment, the
memory chip 106 is a rewritable non-volatile memory. For example, thememory chip 106 is a multi level cell (MLC) NAND flash memory chip. However, the present invention is not limited thereto, and thememory chip 106 may also be a single level cell (SLC) NAND flash memory chip, any other flash memory chip, or any memory chip with the same characteristics. -
FIG. 3 is a schematic block diagram of a memory controller according to an exemplary embodiment of the present invention. Referring toFIG. 3 , thememory controller 104 includes ahost interface 1042, amemory management circuit 1046, and amemory interface 1048. - The
host interface 1042 is coupled to thememory management circuit 1046 and to thehost system 1000 through theconnector 102. Thehost interface 1042 receives and identifies commands and data from thehost system 1000. In other words, commands and data from thehost system 1000 are transmitted to thememory management circuit 1046 through thehost interface 1042. In the present exemplary embodiment, thehost interface 1042 is, corresponding to theconnector 102, a SD interface. However, in other exemplary embodiments, thehost interface 1042 may also be a MMC interface, a USB interface, a SATA interface, a PATA interface, an IEEE 1394 interface, a PCI express interface, a MS interface, a CF interface, an IDE interface, or any other interface. - The
memory management circuit 1046 controls the operation of thememory controller 104. To be specific, thememory management circuit 1046 has a plurality of control instructions. During the operation of thememory storage device 100, the control instructions are executed to accomplish the fill-file automatic creation procedure in the present exemplary embodiment. - In the present exemplary embodiment, the control instructions of the
memory management circuit 1046 are implemented in a firmware form. For example, thememory management circuit 1046 has a microprocessor unit (not shown) and a read-only memory (ROM, not shown), and the control instructions are burnt into the ROM. When thememory storage device 100 is in operation, the control instructions are executed by the microprocessor unit to accomplish the fill-file automatic creation procedure in the present exemplary embodiment. - In another exemplary embodiment, the control instructions of the
memory management circuit 1046 may also be stored in a specific area of the memory chip 106 (for example, the system area in thememory chip 106 that is exclusively used for storing system data) as program codes. Besides, thememory management circuit 1046 has a microprocessor unit (not shown), a ROM (not shown), and a RAM (not shown). The ROM has a driving code segment, and when thememory controller 104 is enabled, the microprocessor unit first executes this driving code segment to load the control instructions from thememory chip 106 into the RAM of thememory management circuit 1046. After that, the microprocessor unit runs the control instructions to execute the fill-file automatic creation procedure provided by the present exemplary embodiment. Additionally, in another exemplary embodiment of the present invention, the control instructions of thememory management circuit 1046 may also be implemented in a hardware form. - The
memory interface 1048 is coupled to thememory management circuit 1046 and used for coupling thememory controller 104 to thememory chip 106 so that thememory controller 104 can perform various operations on thememory chip 106. Namely, data to be written into thememory chip 106 is converted by thememory interface 1048 into a format acceptable to thememory chip 106. - In another exemplary embodiment of the present invention, the
memory controller 104 further includes abuffer memory 2002. Thebuffer memory 2002 is coupled to thememory management circuit 1046 and used for temporarily storing data from thehost system 1000 or data from thememory chip 106. - In another exemplary embodiment of the present invention, the
memory controller 104 further includes anerror correcting circuit 2004. Theerror correcting circuit 2004 is coupled to thememory management circuit 1046, and which executes an error correcting procedure to ensure data accuracy. To be specific, when thememory controller 104 receives a write command from thehost system 1000, theerror correcting circuit 2004 generates an error correcting code (ECC) for the data corresponding to the write command, and the data and the corresponding ECC are both written into thememory chip 106. When subsequently thememory controller 104 receives a read command from thehost system 1000, it reads the data corresponding to the read command and the corresponding ECC from thememory chip 106. Then, theerror correcting circuit 2004 executes the error correcting procedure on the data according to the ECC. - In another exemplary embodiment of the present invention, the
memory controller 104 further includes apower management circuit 2006. Thepower management circuit 2006 is coupled to thememory management circuit 1046, and which controls the power supply of thememory storage device 100. -
FIG. 4 andFIG. 5 are diagrams illustrating an example of how a memory chip is managed according to an exemplary embodiment of the present invention. - It should be noted that the terms used for describing the operations executed on the physical blocks of the
memory chip 106, such as “select”, “exchange”, “group”, and “alternate”, only refer to logical operations. Namely, the actual positions of the physical blocks in thememory chip 106 are not changed. Instead, the physical blocks of thememory chip 106 are only logically operated. - Referring to
FIG. 4 , in the present exemplary embodiment, thememory management circuit 1046 logically groups the physical blocks 206(0)-206(K) in thememory chip 106 into adata area 402, aspare area 404, asystem area 406, and areplacement area 408. - The physical blocks logically belonging to the
data area 402 and thespare area 404 are used for storing data from thehost system 1000. To be specific, the physical blocks in thedata area 402 contain data, while the physical blocks in thespare area 404 are used for substituting the physical blocks in thedata area 402. Thus, the physical blocks in thespare area 404 are blank or available physical blocks (i.e., no data is recorded therein or data recorded therein is marked as invalid data). Namely, the physical blocks in thespare area 404 have been erased, or when a physical block is selected from thespare area 404 for storing data, the selected physical block is erased before data is stored therein. Thus, the physical blocks in thespare area 404 are available physical blocks. - The physical blocks logically belonging to the
system area 406 are used for recording system data, such as the manufacturer and model of thememory chip 106, the number of physical blocks in thememory chip 106, and the number of physical pages in each physical block. - The physical blocks logically belonging to the
replacement area 408 are referred to as replacement physical blocks. For example, when thememory chip 106 is manufactured, 4% of its physical blocks are reserved for replacement purpose. When a physical block in thedata area 402, thespare area 404, or thesystem area 406 is damaged, a physical block is selected from thereplacement area 408 for replacing the damaged physical block. Accordingly, if a physical block is damaged and there are still normal physical blocks in thereplacement area 408, thememory management circuit 1046 selects a normal physical block from thereplacement area 408 for replacing the damaged physical block. If a physical block is damaged but there is no more normal physical block in thereplacement area 408, thememory management circuit 1046 announces that thememory storage device 100 is in a write-protect status and cannot be used for writing data anymore. - Referring to
FIG. 5 , as described above, the physical blocks in thedata area 402 and thespare area 404 are alternatively used for storing data from thehost system 1000. In the present exemplary embodiment, thememory management circuit 1046 configures a plurality of logical blocks. Each of the logical blocks includes a plurality of logical addresses. Thememory management circuit 1046 provides the logical addresses to thehost system 1000 so that thehost system 1000 can access data in the physical blocks that are alternatively used for storing data. To be specific, thememory management circuit 1046 groups the logical addresses provided to thehost system 1000 into logical blocks 510(0)-510(L) and maps the logical blocks 510(0)-510(L) to the physical blocks in thedata area 402. Thememory management circuit 1046 establishes a logical block-physical block mapping table for recording the mapping relationship between the logical blocks and the physical blocks. - However, because different OSs have different file attributes and access rights, the logical addresses in the logical blocks 510(0)-510(L) have to be formatted by using a file system (for example, FAT32 or FAT16) supported by the
OS 1200 before they are used by theOS 1200. -
FIG. 6 illustrates an example of formatting logical addresses in a memory chip by using a file system according to an exemplary embodiment of the present invention. As shown inFIG. 6 , thehost system 1000 formats the logical addresses in the logical blocks 510(0)-510(L) of thememory chip 106 into apartition 600 by using the file system supported by theOS 1200. Thepartition 600 includes amaster boot region 602, apartition boot region 604, aFAT region 606, adirectory region 608, and afile region 610. - The storage addresses in the
master boot region 602 are used for storing system information of the storage space of thememory storage device 100, such as the master boot record (MBR). The storage addresses in thepartition boot region 604 are used for storing the PBR. - The storage addresses in the
FAT region 606 are used for storing the FAT. A FAT records the cluster entry value of each of those logical addresses for storing files. In an exemplary embodiment, theFAT region 606 stores two FATs, wherein one of the FATs is regularly accessed while the other FAT is a backup FAT. - The storage addresses in the
directory region 608 are used for storing the root directory. The root directory records attribute information of files and directories currently stored in thememory storage device 100. The storage addresses in thefile region 610 are used for storing the actual contents of the files. - In the present exemplary embodiment, the
master boot region 602, thepartition boot region 604, theFAT region 606, and thedirectory region 608 are accessed in unit of sectors. To be specific, the smallest unit for storing data into a disc is sector, and each sector contains an information content of 512 bytes. However, because the efficiency of thehost system 1000 is very low when data is stored therein in unit of sectors, theOS 1200 of thehost system 1000 uses cluster as the basic unit for accessing files, wherein the number of sectors in each cluster has to be a power of 2. If it is assumed that 8 continuous sectors constitute a cluster, the capacity of the cluster is then 4096 bytes. In other words, theOS 1200 accesses data in unit of 8 continuous sectors so that the efficiency can be improved - It should be noted that even though in the present exemplary embodiment, the
host system 1000 formats the logical addresses into onepartition 600, in other exemplary embodiments, thehost system 1000 may also format the logical addresses into multiple partitions by using a file system. - Every time when the
host system 1000 is powered on, thememory management circuit 1046 then determines whether a fill-file of a predetermined file capacity exists in thememory chip 106 after it determines that the logical addresses in the logical blocks 510(0)-510(L) of thememory chip 106 have been formatted. Herein the predetermined file capacity may be 20 to 100 megabytes (MB). However, the present invention is not limited thereto. - If the fill-file does not exist in the
memory chip 106, thememory management circuit 1046 creates the fill-file at the same time when thehost system 1000 reads information about the file system, such as the PBR, the FAT, and the root directory. - To be specific, after the
host system 1000 is powered on and thememory management circuit 1046 determines that thememory chip 106 has been formatted, thememory management circuit 1046 reads the PBR and the root directory of thepartition 600 and determines whether a fill-file of the predetermined file capacity exists in thememory chip 106 accordingly. - If the PBR and the root directory indicate that the fill-file does not exist, when the
host system 1000 is about to read the FAT, besides reading the FAT from thememory chip 106, thememory management circuit 1046 also configures a sector amount corresponding to the predetermined file capacity and defines several sectors conforming to the sector amount as specific sectors by starting from a predetermined sector of the FAT, and thememory management circuit 1046 further fills a plurality of cluster entry values related to the fill-file into the specific sectors. Thememory management circuit 1046 takes the same action regarding the two FATs stored in theFAT region 606. - To be specific, in this exemplary embodiment, when the
host system 1000 performs the format operation by using different file systems, different numbers of bytes are required for recording each cluster entry value in the corresponding FAT. For example, 4 bytes are required for recording each cluster entry value in the FAT established by using the FAT32 file system, and 2 bytes are required for recording each cluster entry value in the FAT established by using the FAT16 file system. In the present exemplary embodiment, the predetermined sector may be the first sector of the FAT. Because some bytes in the first sector of the FAT are reserved for recording information related to the FAT (for example, a starting flag of the FAT), the number of cluster entry values that can be stored in the first sector of the FAT is different from the number of cluster entry values that can be stored in other sectors. For example, with the FAT32 file system, the first sector of the FAT can store 125 (i.e., (512−12)/4) cluster entry values, and each other sector can store 128 (i.e., 512/4) cluster entry values. With the FAT16 file system, the first sector of the FAT can store 254 (i.e., (512−4)/2) cluster entry values, and each other sector can store 256 (i.e., 512/2) cluster entry values. - The
memory management circuit 1046 configures a cluster amount for storing the fill-file according to the predetermined file capacity and configures the sector amount according to the cluster amount, a first quantity (i.e. the number of cluster entry values that can be stored in the first sector of the FAT), and a second quantity (i.e. the number of cluster entry values that can be stored in each other sector). - In an exemplary embodiment, the
memory management circuit 1046 calculates the cluster amount CN for storing the fill-file by using following expression: -
CN=(X*1024)/Y - In foregoing expression, X is the predetermined file capacity (in unit of MB) of the fill-file, and Y is the capacity of one cluster (in unit of kilobytes (KB)). Besides, the
memory management circuit 1046 calculates the sector amount SN by using following expression: -
- In foregoing expression, m is the number of cluster entry values that can be stored in the first sector of the FAT (i.e. the first quantity), and n is the number of cluster entry values that can be stored in each other sector (i.e. the second quantity).
- In another exemplary embodiment, the
memory management circuit 1046 may directly obtain the sector amount SN from a table recording the mapping relationship between the file capacity and the sector amount according to the predetermined file capacity of the fill-file. - After obtaining the sector amount SN, the
memory management circuit 1046 defines those sectors conforming to the sector amount SN as specific sectors by starting from a predetermined sector of the FAT. For example, when the predetermined sector is the first sector of the FAT, the first SN sectors of the FAT are defined as the specific sectors, and when the predetermined sector is the Mth sector of the FAT, the Mth to the (M+SN−1)th sectors of the FAT are defined as the specific sectors. - Then, the
memory management circuit 1046 fills the cluster entry values related to the fill-file by starting from the predetermined sector of the FAT. After all the cluster entry values related to the fill-file are filled into the specific sectors, thememory management circuit 1046 determines whether there is still free space in the specific sectors. If there is still free space in the specific sectors, thememory management circuit 1046 fills up the free space by using a plurality of cluster entry values related to at least one predetermined file, wherein the predetermined file may be a hidden file, a deleted file, or a general file but is not limited thereto. - For example, assuming that the
host system 1000 performs a format operation to establish thepartition 600 by using the FAT32 file system, the capacity of each cluster is 32 KB, and the predetermined file capacity of the fill-file is 20 MB, thememory management circuit 1046 obtains the cluster amount CN for storing the fill-file as 640 and the corresponding sector amount SN as 6 through table lookup or abovementioned expressions. If the predetermined sector is the first sector of the FAT, the first 6 sectors of the FAT are defined as the specific sectors (i.e., the sectors FATS(1)-FATS(6) inFIG. 7A ). Because the cluster amount CN corresponding to the fill-file is 640, besides filling information related to the FAT (denoted with straight lines inFIG. 7A ) into the first specific sector FATS(1), 125 cluster entry values related to the fill-file (denoted with diagonal lines inFIG. 7A ) are filled into the remaining space of the first specific sector FATS(1), 128 cluster entry values related to the fill-file are respectively filled into each of the specific sectors FATS(2)-FATS(5), and the last 3 cluster entry values related to the fill-file are filled into the last specific sector FATS(6). Because the specific sector FATS(6) still has free space, thememory management circuit 1046 fills up the free space by using the cluster entry values related to the predetermined file (denoted with dots inFIG. 7A ). - If the predetermined sector is the Mth sector of the FAT, as shown in
FIG. 7B , the sectors FATS(M)-FATS(M+5) are defined as the specific sectors. Herein identification information (for example, the starting flag of the fill-file, denoted with straight lines inFIG. 7B ) and partial cluster entry values related to the fill-file (denoted with diagonal lines inFIG. 7B ) are filled into the first specific sector FATS(M), partial cluster entry values related to the fill-file are filled into the specific sectors FATS(M+1)-FATS(M+4), and partial cluster entry values related to the fill-file and the cluster entry values related to the predetermined file (denoted with dots inFIG. 7B ) are filled into the last specific sector FATS(M+5). - Because the specific sectors are used for recording the cluster entry values related to the fill-file, the contents recorded in these addresses should be prevented from being deleted or changed by the
host system 1000. Thus, thememory management circuit 1046 first sets the logical addresses corresponding to all the specific sectors to a write-protect status and then transmits the FAT to thehost system 1000. - When the
host system 1000 is about to read the root directory, thememory management circuit 1046 fills a fill-file header of the fill-file into the predetermined sector (for example, the first sector) of the root directory after it reads the root directory from thememory chip 106. - In an exemplary embodiment, if the
memory management circuit 1046 determines that there is still free space in the predetermined sector of the root directory after it fills the fill-file header into the predetermined sector of the root directory (i.e., the fill-file header cannot fill up the predetermined sector of the root directory), thememory management circuit 1046 fills up the predetermined sector of the root directory by using at least one predetermined file header, wherein the number of the predetermined file headers is corresponding to the filename format of the fill-file, the filename format of the predetermined file (for example, a hidden file, a deleted file, or a general file) corresponding to each predetermined file header, and the sector capacity. - For example, a file header corresponding to a short filename format takes up a space of 32 bytes in the root directory. Assuming that in the present exemplary embodiment, the predetermined sector is the first sector of the root directory and the filename format of the fill-file is a short filename, because there is still free space in the first sector of the root directory after the
memory management circuit 1046 fills the fill-file header into the first sector of the root directory, thememory management circuit 1046 fills up the remaining 480 (i.e., 512−32) bytes in the first sector of the root directory by using 15 predetermined file headers corresponding to a predetermined short filename format (as the first sector RDS(1) of the root directory shown inFIG. 8A ) or fills up the remaining 480 bytes in the first sector of the root directory by using one predetermined file header corresponding to a predetermined long filename format (as the first sector RDS(1) of the root directory shown inFIG. 8B ). Similarly, if the fill-file has a long filename format, besides filling the fill-file header into the first sector of the root directory, thememory management circuit 1046 also fills up the first sector of the root directory by using a predetermined file header when there is still free space in the first sector of the root directory. - Similarly, in order to prevent the
host system 1000 from writing other data into the predetermined sector of the root directory, thememory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to a write-protect status and then transmits the root directory to thehost system 1000. - It should be noted that the PBR has a free space field if the FAT32 file system is adopted. Thus, if the
host system 1000 performs the format operation to construct thepartition 600 by using the FAT32 file system and thememory management circuit 1046 determines that the fill-file does not exist, when thehost system 1000 is about to read the PBR, thememory management circuit 1046 reads the PBR from thememory chip 106, writes the difference between the total capacity of thememory chip 106 and the predetermined file capacity into the free space field, and then transmits the PBR back to thehost system 1000. However, because the PBR does not have aforementioned free space field when the FAT16 file system is adopted, if thehost system 1000 construct thepartition 600 by using the FAT16 file system, thememory management circuit 1046 directly transmits the PBR back to thehost system 1000 after it reads the PBR from thememory chip 106. - In another exemplary embodiment, if the
memory management circuit 1046 determines that the logical addresses in the logical blocks 510(0)-510(L) of thememory chip 106 have been formatted and a fill-file of the predetermined file capacity exists in thememory chip 106 when thehost system 1000 is powered on, when thehost system 1000 is about to read the FAT, thememory management circuit 1046 sets the logical addresses corresponding to the specific sectors in the FAT to the write-protect status and then transmits the FAT to thehost system 1000. In addition, when thehost system 1000 is about to read the root directory, thememory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status and then transmits the root directory to thehost system 1000. - In order to use the
memory storage device 100, thehost system 1000 needs to read information related to the file system of thememory storage device 100 after thehost system 1000 is powered on. Thus, when thememory chip 106 has been formatted and the fill-file does not exists, thememory management circuit 1046 fills the information related to the fill-file respectively into the PBR, the FAT, and the root directory at the same time when thehost system 1000 respectively reads various file system information. Accordingly, thememory management circuit 1046 can automatically create the fill-file without spending additional execution time, and thememory management circuit 1046 can create the corresponding fill-file regardless of what file system is used for formatting thememory chip 106. Besides, when thememory chip 106 has been formatted and the fill-file exists, thememory management circuit 1046 sets the addresses for storing the fill-file to the write-protect status so that contents stored in these addresses won't be changed by thehost system 1000. Because the fill-file is automatically created by thememory management circuit 1046, thememory management circuit 1046 can instantly obtain the storage address range of the fill-file. Due to the same reason, thememory storage device 100 can be synchronized with thehost system 1000 after thehost system 1000 finishes reading the information of the file system. - In yet another exemplary embodiment, if the
memory management circuit 1046 determines that the logical addresses of thememory chip 106 have not been formatted when thehost system 1000 is powered on, thememory management circuit 1046 waits for thehost system 1000 to finish executing the format operation and then automatically creates the fill-file in the situation that thememory chip 106 has been formatted and the fill-file does not exist. - In other words, the
memory management circuit 1046 in the present exemplary embodiment is capable of determining whether thehost system 1000 has started to execute the format operation and whether the format operation has been completed. Thememory management circuit 1046 may determine whether thehost system 1000 has started to execute the format operation through following techniques. - In an exemplary embodiment, a partition information recording address in the
memory chip 106 is used for recording data related to a partition. Thus, when thehost system 1000 is about to write a writing data into the partition information recording address, thememory management circuit 1046 checks whether the writing data is the same as existing data stored in the partition information recording address. If the writing data is different from the existing data, which means thehost system 1000 is about to change the file system, thememory management circuit 1046 determines that thehost system 1000 has started to execute the format operation. - In another exemplary embodiment, regardless of whether the data to be written by the
host system 1000 is the same as the data originally recorded into the PBR or not, it is determined that thehost system 1000 is about to execute the format operation as long as thehost system 1000 wants update the content of the PBR. However, because thehost system 1000 also updates the PBR when thehost system 1000 executes a file modification operation (for example, deletes a file from thememory chip 106 or writes a file into the memory chip 106), thememory management circuit 1046 has to further determine whether an operation of thehost system 1000 is the format operation or the file modification operation. - In the present exemplary embodiment, the PBR has a specific byte address, and the
memory management circuit 1046 determines whether thehost system 1000 executes a file modification operation according to data contents respectively written into the specific byte address before and after thehost system 1000 updates the PBR. If thehost system 1000 does not execute a file modification operation, thememory management circuit 1046 determines that thehost system 1000 is about to execute a format operation. - To be specific, the specific byte address of the PBR varies along with different file system. For example, the specific byte address is 0×25 in the FAT16 file system, and the specific byte address is 0×51 in the FAT32 file system. Taking the FAT16 file system as an example, every time when the
host system 1000 is about to execute a file modification operation, it first sets the value at theaddress 0×25 to 1, and after thehost system 1000 finishes executing the file modification operation, it changes the value at theaddress 0×25 to 0. Thus, thememory management circuit 1046 can determine whether thehost system 1000 simply modifies a file or executes a format operation according to the data respectively written into the specific byte address by thehost system 1000. - In yet another exemplary embodiment, assuming that the
memory chip 106 has been formatted by thehost system 1000 by using the FAT32 file system, because the PBR has a free space field in this file system, when thehost system 1000 is about to update the content of the PBR, thememory management circuit 1046 determines that thehost system 1000 starts to execute a format operation if the free capacity recorded in the free space field is smaller than the difference between the total capacity of thememory chip 106 and the predetermined file capacity. - When the
memory management circuit 1046 determines that thehost system 1000 is about to execute the format operation, thememory management circuit 1046 checks whether the FAT and the root directory exist. If the FAT and the root directory exist, thememory chip 106 has been formatted. Because thememory management circuit 1046 automatically creates a fill-file, and after creating the fill-file, thememory management circuit 1046 sets some logical addresses in the FAT and the root directory to the write-protect status, in order to allow the format operation to be performed successfully, thememory management circuit 1046 sets all the corresponding logical addresses in the FAT and the root directory to a writable status to allow thehost system 1000 to execute the format operation. - When the
host system 1000 executes the format operation, it performs data writing, reading, and comparison operations regarding the same address. For example, after thehost system 1000 finishes writing the FAT, it reads the FAT again to be compared, so that thememory management circuit 1046 can determine whether the format operation is completed according to such behavior of thehost system 1000. - To be specific, when the
host system 1000 is about to write data into a logical address, thememory management circuit 1046 records the logical address. When thehost system 1000 finishes writing data into the logical address and executes a reading operation, thememory management circuit 1046 determines whether the logical address corresponding to the reading operation is the same as the logical address corresponding to the previous writing operation. If the two are the same, it is determined that thehost system 1000 is going to perform a comparison operation and the format operation is not yet completed. Thus, when thehost system 1000 continuously reads two different logical addresses or a logical address read by thehost system 1000 is different from a previous logical address, thememory management circuit 1046 determines that the format operation is completed. - After the format operation is completed, the
memory management circuit 1046 automatically creates a fill-file. The method adopted by thememory management circuit 1046 for creating the fill-file is the same as or similar to the method for creating a fill-file when thememory management circuit 1046 determines that thememory chip 106 has been formatted and no fill-file exists after thehost system 1000 is powered on therefore will not be described herein. - Regardless of when the
host system 1000 starts to execute the format operation, thememory management circuit 1046 can detect the beginning and ending of the format operation and automatically create a fill-file after thehost system 1000 finishes executing the format operation through the technique described above. - In an exemplary embodiment, a user sets the predetermined file capacity of the fill-file by issuing a special instruction. After the
host system 1000 re-formats the logical addresses in the logical blocks 510(0)-510(L) of thememory chip 106, thememory management circuit 1046 automatically creates a fill-file conforming to the predetermined file capacity set by the user. -
FIG. 9 is a flowchart of a method for automatically creating a fill-file according to an exemplary embodiment of the present invention. - Referring to
FIG. 9 , in step S910, thememory management circuit 1046 groups the physical blocks 206(0)-206(K) into adata area 402, aspare area 404, asystem area 406, and areplacement area 408. In step S920, thememory management circuit 1046 configures a plurality of logical addresses and groups the logical addresses into a plurality of logical blocks 510(0)-510(L) to be mapped to the physical blocks in thedata area 402. - In step S930, when the
host system 1000 is powered on, thememory management circuit 1046 determines whether the logical addresses are formatted into a partition. - If the logical addresses are formatted into a partition, in step S940, the
memory management circuit 1046 reads the PBR and the root directory in the partition to determine whether a fill-file of the predetermined file capacity exists. - If the fill-file does not exists, in step S950, when the
host system 1000 is about to read the FAT, thememory management circuit 1046 fills a plurality of cluster entry values related to the fill-file into several specific sectors of the FAT. If the cluster entry values related to the fill-file cannot fill up the specific sectors, thememory management circuit 1046 fills up the specific sectors by using a plurality of cluster entry values of at least one predetermined file (as shown inFIG. 7 ). After setting the logical addresses corresponding to the specific sectors to a write-protect status, thememory management circuit 1046 transmits the FAT to thehost system 1000. - In step S960, when the
host system 1000 is about to read the root directory, thememory management circuit 1046 fills a fill-file header of the fill-file into a predetermined sector of the root directory. When the fill-file header of the fill-file cannot fill up the predetermined sector of the root directory, thememory management circuit 1046 fills up the predetermined sector of the root directory by using at least one predetermined file header (as shown inFIG. 8A andFIG. 8B ). After setting the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status, thememory management circuit 1046 transmits the root directory to thehost system 1000. - On the other hand, if the
memory management circuit 1046 determines that the fill-file exists, in step S970, when thehost system 1000 is about to read the FAT, thememory management circuit 1046 sets the logical addresses corresponding to the specific sectors to the write-protect status and transmits the FAT to thehost system 1000. Besides, when thehost system 1000 is about to read the root directory, thememory management circuit 1046 sets the logical addresses corresponding to the predetermined sector of the root directory to the write-protect status and then transmits the root directory to thehost system 1000. - If in step S930 the
memory management circuit 1046 determines that the logical addresses have not been formatted, in step S980, thememory management circuit 1046 constantly determines whether thehost system 1000 starts to execute a format operation. If thememory management circuit 1046 determines that thehost system 1000 starts to execute the format operation, in step S990, thememory management circuit 1046 constantly determines whether the format operation is completed. - When the
memory management circuit 1046 determines that the format operation is completed, in steps S950 and S960, thememory management circuit 1046 fills data related to the fill-file into the FAT and the root directory when thehost system 1000 respectively reads the FAT and the root directory. - In an exemplary embodiment of the present invention, when the
host system 1000 is powered on, thememory controller 104 configures the data corresponding to the fill-file of the predetermined file capacity into the file system stored in thememory chip 106, and after setting the fill-file to the write-protect status, thememory controller 104 transmits the FAT of the file system to thehost system 1000. To be specific, thememory controller 104 first determines whether the fill-file exists in the file system of thememory chip 106. If the fill-file does not exist, thememory controller 104 configures the data corresponding to the fill-file into the file system. Because the fill-file is used for taking up a cache space in thehost system 1000, it is ensured that thehost system 1000 can read the desired data from thememory chip 106 when it executes a data reading operation. - In summary, the present invention provides a memory storage device, a memory controller thereof, and a method for automatically creating a fill-file, wherein the memory storage device automatically creates a large-capacity fill-file for filling up the cache space in the RAM of a host system without affecting the operation of the host system, so as to ensure that the host system with a pre-read mechanism can read data from the memory storage device every time when the host system executes a reading operation. The previously described exemplary embodiments of the present invention have many advantages, including no additional execution time is consumed since the memory storage device creates the fill-file at the same time when the host system reads information about the file system, and the efficiency of the host system in executing data writing operations is improved since the fill-file is created by the memory storage device itself so that the memory storage device can instantly obtain the storage address range of the fill-file, wherein the advantages aforementioned not required in all versions of the invention.
- It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.
Claims (21)
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW99134409A | 2010-10-08 | ||
TW99134409 | 2010-10-08 | ||
TW099134409A TWI420305B (en) | 2010-10-08 | 2010-10-08 | Memory storage device, memory controller thereof, and method for creating fill-file automatically thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
US20120089805A1 true US20120089805A1 (en) | 2012-04-12 |
US8707007B2 US8707007B2 (en) | 2014-04-22 |
Family
ID=45926030
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US12/960,563 Active 2032-11-27 US8707007B2 (en) | 2010-10-08 | 2010-12-06 | Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof |
Country Status (2)
Country | Link |
---|---|
US (1) | US8707007B2 (en) |
TW (1) | TWI420305B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120005408A1 (en) * | 2009-12-23 | 2012-01-05 | Thales | Securing the erasure of a flashprom memory |
US20120005407A1 (en) * | 2009-12-23 | 2012-01-05 | Thales | Revolving data management method |
US20120030411A1 (en) * | 2010-07-29 | 2012-02-02 | Phison Electronics Corp. | Data protecting method, memory controller and portable memory storage apparatus |
US20130019142A1 (en) * | 2011-07-12 | 2013-01-17 | Phison Electronics Corp. | Memory storage device, memory controller thereof, and method for programming data thereof |
US20140068158A1 (en) * | 2012-09-05 | 2014-03-06 | Silicon Motion, Inc. | Flash storage device and control method for flash memory |
US20140156913A1 (en) * | 2012-12-05 | 2014-06-05 | Phison Electronics Corp. | Data processing method, memory controller and memory storage apparatus |
US20170024157A1 (en) * | 2015-07-21 | 2017-01-26 | SK Hynix Inc. | Memory system and operating method of memory system |
US20170212709A1 (en) * | 2016-01-25 | 2017-07-27 | SK Hynix Inc. | Memory system and operation method for the same |
CN108701080A (en) * | 2015-12-21 | 2018-10-23 | 内存技术有限责任公司 | Use reference values to ensure valid storage device actions |
CN109308267A (en) * | 2017-07-28 | 2019-02-05 | 聚星电子股份有限公司 | Control method and control system of storage device of driving recorder |
CN109597793A (en) * | 2018-12-04 | 2019-04-09 | 中国航空工业集团公司西安航空计算技术研究所 | A method of promoting file system IO performance |
CN110321740A (en) * | 2019-05-15 | 2019-10-11 | 深圳市江波龙电子股份有限公司 | A kind of data manipulation method and storage equipment of storage equipment |
CN112650448A (en) * | 2020-12-21 | 2021-04-13 | 中国航天科工集团八五一一研究所 | FPGA-based large data volume storage file management method |
CN116166199A (en) * | 2023-03-17 | 2023-05-26 | 哈尔滨市科佳通用机电股份有限公司 | Method and device for self-adaptive adjustment of storage capacity of locomotive signal recording data |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103870408B (en) * | 2012-12-18 | 2017-06-06 | 群联电子股份有限公司 | Data processing method, memory controller and memory storage device |
TWI631461B (en) * | 2017-06-27 | 2018-08-01 | 晨星半導體股份有限公司 | Controlling method of storage of driving recorder and storage controlling system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6459644B2 (en) * | 2000-06-06 | 2002-10-01 | Hitachi, Ltd. | Semiconductor memory device with block alignment function |
US7039754B2 (en) * | 2002-04-15 | 2006-05-02 | Sony Corporation | Detachably mounted removable data storage device |
US7398348B2 (en) * | 2004-08-24 | 2008-07-08 | Sandisk 3D Llc | Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewritable memory |
US7457910B2 (en) * | 2005-06-29 | 2008-11-25 | Sandisk Corproation | Method and system for managing partitions in a storage device |
-
2010
- 2010-10-08 TW TW099134409A patent/TWI420305B/en active
- 2010-12-06 US US12/960,563 patent/US8707007B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6459644B2 (en) * | 2000-06-06 | 2002-10-01 | Hitachi, Ltd. | Semiconductor memory device with block alignment function |
US7039754B2 (en) * | 2002-04-15 | 2006-05-02 | Sony Corporation | Detachably mounted removable data storage device |
US7398348B2 (en) * | 2004-08-24 | 2008-07-08 | Sandisk 3D Llc | Method and apparatus for using a one-time or few-time programmable memory with a host device designed for erasable/rewritable memory |
US7457910B2 (en) * | 2005-06-29 | 2008-11-25 | Sandisk Corproation | Method and system for managing partitions in a storage device |
Cited By (20)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120005407A1 (en) * | 2009-12-23 | 2012-01-05 | Thales | Revolving data management method |
US20120005408A1 (en) * | 2009-12-23 | 2012-01-05 | Thales | Securing the erasure of a flashprom memory |
US20120030411A1 (en) * | 2010-07-29 | 2012-02-02 | Phison Electronics Corp. | Data protecting method, memory controller and portable memory storage apparatus |
US8312554B2 (en) * | 2010-07-29 | 2012-11-13 | Phison Electronics Corp. | Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus |
US9213597B2 (en) * | 2011-07-12 | 2015-12-15 | Phison Electronics Corp. | Memory storage device, memory controller thereof, and method for programming data thereof |
US20130019142A1 (en) * | 2011-07-12 | 2013-01-17 | Phison Electronics Corp. | Memory storage device, memory controller thereof, and method for programming data thereof |
US9563550B2 (en) * | 2012-09-05 | 2017-02-07 | Silicon Motion, Inc. | Flash storage device and control method for flash memory |
US20140068158A1 (en) * | 2012-09-05 | 2014-03-06 | Silicon Motion, Inc. | Flash storage device and control method for flash memory |
US20140156913A1 (en) * | 2012-12-05 | 2014-06-05 | Phison Electronics Corp. | Data processing method, memory controller and memory storage apparatus |
US9772937B2 (en) * | 2012-12-05 | 2017-09-26 | Phison Electronics Corp. | Data processing method, memory controller and memory storage apparatus |
US20170024157A1 (en) * | 2015-07-21 | 2017-01-26 | SK Hynix Inc. | Memory system and operating method of memory system |
US9952793B2 (en) * | 2015-07-21 | 2018-04-24 | SK Hynix Inc. | Memory system for processing data efficiently by searching segments of data and operating method thereof |
CN108701080A (en) * | 2015-12-21 | 2018-10-23 | 内存技术有限责任公司 | Use reference values to ensure valid storage device actions |
US20170212709A1 (en) * | 2016-01-25 | 2017-07-27 | SK Hynix Inc. | Memory system and operation method for the same |
US10514860B2 (en) * | 2016-01-25 | 2019-12-24 | SK Hynix Inc. | Memory system and operation method for the same |
CN109308267A (en) * | 2017-07-28 | 2019-02-05 | 聚星电子股份有限公司 | Control method and control system of storage device of driving recorder |
CN109597793A (en) * | 2018-12-04 | 2019-04-09 | 中国航空工业集团公司西安航空计算技术研究所 | A method of promoting file system IO performance |
CN110321740A (en) * | 2019-05-15 | 2019-10-11 | 深圳市江波龙电子股份有限公司 | A kind of data manipulation method and storage equipment of storage equipment |
CN112650448A (en) * | 2020-12-21 | 2021-04-13 | 中国航天科工集团八五一一研究所 | FPGA-based large data volume storage file management method |
CN116166199A (en) * | 2023-03-17 | 2023-05-26 | 哈尔滨市科佳通用机电股份有限公司 | Method and device for self-adaptive adjustment of storage capacity of locomotive signal recording data |
Also Published As
Publication number | Publication date |
---|---|
TWI420305B (en) | 2013-12-21 |
US8707007B2 (en) | 2014-04-22 |
TW201216054A (en) | 2012-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8707007B2 (en) | Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof | |
US8291155B2 (en) | Data access method, memory controller and memory storage system | |
US8230160B2 (en) | Flash memory storage system and flash memory controller and data processing method thereof | |
US8312554B2 (en) | Method of hiding file at data protecting mode for non-volatile memory module, memory controller and portable memory storage apparatus | |
US8417869B2 (en) | Hybrid storage apparatus and hybrid storage medium controller and addressing method thereof | |
JP4238514B2 (en) | Data storage device | |
US9176865B2 (en) | Data writing method, memory controller, and memory storage device | |
US9389998B2 (en) | Memory formatting method, memory controller, and memory storage apparatus | |
US8589619B2 (en) | Data writing method, memory controller, and memory storage apparatus | |
US9304900B2 (en) | Data reading method, memory controller, and memory storage device | |
TWI450099B (en) | Flash memory storage system for simulating a rewritable disc device, flash memory controller, comupter system and method theeof | |
US20080082774A1 (en) | Methods of Managing File Allocation Table Information | |
US8255656B2 (en) | Storage device, memory controller, and data protection method | |
US9268688B2 (en) | Data management method, memory controller and memory storage apparatus | |
TWI421686B (en) | Data access method and system, storage medium controller and storage system | |
US20130275655A1 (en) | Memory management method and memory controller and memory storage device using the same | |
US9235501B2 (en) | Memory storage device, memory controller thereof, and method for programming data thereof | |
CN102200946B (en) | Data access method, memory controller and storage system | |
CN102455879B (en) | Memory storage device, memory controller and method for automatically generating filling files | |
US9501397B2 (en) | Data writing method, memory controller, and memory storage apparatus | |
US8589620B2 (en) | Data writing method, memory controller, and memory storage apparatus | |
US20150046632A1 (en) | Memory address management method, memory controller and memory storage device | |
CN102543184A (en) | Memory storage device, memory controller thereof and data writing method | |
CN102109965A (en) | Flash memory storage system, flash memory controller, computer system and simulation method | |
TWI498731B (en) | Non-volatile memory storage system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AS | Assignment |
Owner name: PHISON ELECTRONICS CORP., TAIWAN Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:LIU, SING-CHANG;REEL/FRAME:025449/0516 Effective date: 20101124 |
|
STCF | Information on status: patent grant |
Free format text: PATENTED CASE |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551) Year of fee payment: 4 |
|
MAFP | Maintenance fee payment |
Free format text: PAYMENT OF MAINTENANCE FEE, 8TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1552); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY Year of fee payment: 8 |