TWI476680B - Archives System for File Management of Flash Memory - Google Patents

Archives System for File Management of Flash Memory Download PDF

Info

Publication number
TWI476680B
TWI476680B TW101106495A TW101106495A TWI476680B TW I476680 B TWI476680 B TW I476680B TW 101106495 A TW101106495 A TW 101106495A TW 101106495 A TW101106495 A TW 101106495A TW I476680 B TWI476680 B TW I476680B
Authority
TW
Taiwan
Prior art keywords
logical unit
data
flash memory
file
free
Prior art date
Application number
TW101106495A
Other languages
Chinese (zh)
Other versions
TW201335840A (en
Original Assignee
Innostor Technology Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Innostor Technology Corp filed Critical Innostor Technology Corp
Priority to TW101106495A priority Critical patent/TWI476680B/en
Publication of TW201335840A publication Critical patent/TW201335840A/en
Application granted granted Critical
Publication of TWI476680B publication Critical patent/TWI476680B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

檔案系統對快閃記憶體之檔案管理方法File system for flash memory file management method

本發明係關於一種檔案系統之檔案管理方法,尤指一種檔案系統對快閃記憶體之檔案管理方法。The invention relates to a file management method for a file system, in particular to a file system for a flash memory file management method.

電腦主機中的硬碟是電腦資料儲存中心,隨著硬碟容量加大,作業系統亦搭配不同的檔案系統(File System),以對硬碟進行讀、寫或移動檔案等檔案管理動作,如早期的FAT16、FAT32檔案系統至現今的NTFS檔案系統;其中該NTFS較FAT系列的檔案系統最大的不同在於,FAT系統採用「檔案配置表(File Allocation Table)」來對硬碟進行檔案管理,但NTFS檔案管理***則是使用「管理檔案表(Master File Table;MFT)」,管理檔案表主要包含有表頭、檔案或資料夾名稱、檔案資料、儲存位址及建立日期等等。當作業系統產生新增資料欲儲存至硬碟時,NTFS檔案系統對該新增資料產生一管理檔案表,一併與檔案或資料夾儲存至硬碟或快閃記憶體中。並以該硬碟或快閃記憶體儲存的管理檔案表作為判斷資料配置狀況之依據。The hard disk in the computer mainframe is a computer data storage center. As the hard disk capacity increases, the operating system also works with different file systems (File System) to perform file management operations such as reading, writing or moving files on the hard disk. The early FAT16, FAT32 file system to the current NTFS file system; the biggest difference between the NTFS and the FAT series file system is that the FAT system uses the "File Allocation Table" to manage files on the hard disk, but The NTFS file management system uses the "Master File Table (MFT)". The management file table mainly contains the header, file or folder name, file data, storage address and creation date. When the operating system generates new data to be stored on the hard disk, the NTFS file system generates a management file table for the newly added data, and stores the file or folder with the file or folder into the hard disk or the flash memory. The management file table stored in the hard disk or the flash memory is used as a basis for judging the data configuration status.

舉例說明,請參閱圖6,硬碟或快閃記憶體60連接於電腦主機時,該電腦主機的作業系統40會透過檔案系統50來管理快閃記憶體60內的資料,而依據現有檔案系統50之檔案管理方法,檔案系統50會讀取存於硬碟或快閃記憶體60中的至少一管理檔案表,而當一硬碟或快閃記憶體中已經寫有複數個資料時,檔案系統50可藉由讀取該複數資料分別對應的管理檔案表判斷各資料儲存於硬碟或快閃記憶體中的位址,以得知該硬碟或快閃記憶體的資料配置狀況,並如圖7所示,依據硬碟或快閃記憶體60的資料配置狀況將複數邏輯單位(Logical unit)標示為已使用邏輯單位51(Used),表示該邏輯單位定址對應(mapping)到硬碟或快閃記憶體的儲存位址中存有資料;而將邏輯單位標示為自由邏輯單位52(Free),則表示該邏輯單定址對應到硬碟或快閃記憶體的儲存位址中未存放資料;檔案系統對硬碟或快閃記憶碟寫入資料時,則會挑選自由邏輯單位52所定址對應到硬碟或快閃記憶體的儲存位址來寫入資料,以達到管理檔案配置的目的;因此,若電腦主機要刪除其中部份個資料如資料B、資料D與資料F,則檔案系統會讀取資料B、資料D及資料F對應的管理檔案表,取得資料B、資料D及資料F定址對應硬碟或快閃記憶體的儲存位址後,再將其刪除,並將原本分別對應資料B、D、F的邏輯單位標示為自由邏輯單位52,形成圖8所示,此後,檔案系統要對硬碟或快閃記憶體寫入下一筆新增資料H時,則由於原本對應到資料B、D、F位址的邏輯單位已經被標示為自由邏輯單位52,因此,檔案系統便可將該筆新增資料H寫入硬碟或快閃記憶體原本存放資料B、D、F之儲存位址中,而若該資料H的資料量大於原本資料B資料量,檔案系統便需將資料H分割存放在不連續的位址上,如圖9所示的資料H1、H2及H3。For example, referring to FIG. 6, when the hard disk or the flash memory 60 is connected to the host computer, the operating system 40 of the host computer manages the data in the flash memory 60 through the file system 50, and according to the existing file system. 50 file management method, the file system 50 will read at least one management file table stored in the hard disk or the flash memory 60, and when a plurality of data has been written in a hard disk or flash memory, the file The system 50 can determine the data configuration status of the hard disk or the flash memory by reading the corresponding management file table of the plurality of data to determine the address of each data stored in the hard disk or the flash memory, and As shown in FIG. 7, the logical unit is marked as the used logical unit 51 (Used) according to the data configuration status of the hard disk or the flash memory 60, indicating that the logical unit is mapped to the hard disk. Or the flash memory has a data stored in the storage address; and the logical unit is marked as a free logical unit 52 (Free), indicating that the logical single address is not stored in the storage address of the hard disk or the flash memory. Information system When writing data to a hard disk or a flash memory disk, the free logical unit 52 is selected to correspond to the storage address of the hard disk or the flash memory to write data, so as to achieve the purpose of managing the file configuration; therefore, If the host computer wants to delete some of the data such as data B, data D and data F, the file system will read the management file table corresponding to data B, data D and data F, and obtain the data B, data D and data F address. Corresponding to the storage address of the hard disk or the flash memory, delete it, and mark the logical units corresponding to the data B, D, and F respectively as the free logical unit 52, which is formed as shown in FIG. 8. Thereafter, the file system To write the next new data H to the hard disk or flash memory, since the logical unit corresponding to the data B, D, and F addresses has been marked as a free logical unit 52, the file system can The newly added data H is written into the storage address of the original storage data B, D, and F of the hard disk or the flash memory, and if the data amount of the data H is larger than the original data B, the file system needs to be Data H segmentation is stored in discontinuous bits On the site, the data H1, H2 and H3 are shown in FIG.

上述檔案系統的檔案管理方法對於硬碟而言,寫入速度並無太大的影響,但對於快閃記憶體而言,非連續寫入將會嚴重拖緩寫入速度,主要係因快閃記憶體的讀寫單位為一頁(Page),且頁的容量與檔案系統的邏輯單位容量並沒有一定的倍數關係,因此,雖然在檔案系統中,後寫入的資料H1與資料A及資料C對應在檔案系統的不同邏輯單位中,但實際上定址對應(mapping)到快閃記憶體時,資料H1的位址可能分別對應到一個已經寫有資料A的頁以及另一個寫有資料C的頁中,例如快閃記憶體將二個邏輯單位對應到一個頁時,亦即圖9中每兩個邏輯單位要寫成一頁時,則H1將有一部份會與資料A對應在同一頁,而又有一部份與資料C對應在同一頁中,基於快閃記憶體不能直接覆寫已經寫有資料的頁之特性,快閃記憶體必須執行一種稱為讀取-修改-寫入(Read-Modify-Write)的寫入程序,該寫入過程相當費時且麻煩,若資料H1要寫入的儲存位址對應到資料A及資料C,則快閃記憶體便要執行二次讀取-修改-寫入程序;又,若資料H1、H2、H3分別對應到快閃記憶體的位址剛好分別對應到已經寫有資料A、C、資料C、E及資料E、G頁中時,則寫入一個資料H便會使快閃記憶體執行6次讀取-修改-寫入,使寫入過程相當複雜,且耗費時間。The file management method of the above file system does not have much impact on the write speed of the hard disk. However, for flash memory, the non-continuous write will seriously slow down the writing speed, mainly due to flashing. The unit of reading and writing of memory is a page, and the capacity of the page does not have a certain multiple relationship with the logical unit capacity of the file system. Therefore, although in the file system, the data H1 and data A and data are written later. C corresponds to different logical units of the file system, but when the mapping is actually mapped to the flash memory, the address of the data H1 may correspond to one page that has been written with the data A and the other with the data C. In the page, for example, if the flash memory corresponds two logical units to one page, that is, every two logical units in FIG. 9 are to be written into one page, then H1 will have a part corresponding to the data A on the same page. There is a part corresponding to the data C on the same page. Based on the fact that the flash memory cannot directly overwrite the page on which the data has been written, the flash memory must perform a so-called read-modify-write ( Read-Modify-Write) write The program, the writing process is quite time consuming and cumbersome. If the storage address to be written by the data H1 corresponds to the data A and the data C, the flash memory is to perform a secondary read-modify-write program; If the data H1, H2, and H3 correspond to the address of the flash memory, respectively, corresponding to the data A, C, data C, E, and E and G pages already written, then a data H will be written. The flash memory is subjected to 6 read-modify-writes, making the writing process quite complicated and time consuming.

綜上所述,由於上述檔案系統的檔案管理方法,再刪除資料後寫入新增的資料時,十分容易面臨將資料分割並定址對應到不連續位址中,常使快閃記憶體需執行多次複雜的讀取-修改-寫入程序而嚴重拖慢寫入速度,需改良之。In summary, due to the file management method of the above file system, when deleting the data and then writing the newly added data, it is very easy to face the data segmentation and address corresponding to the discontinuous address, often causing the flash memory to be executed. Multiple complex read-modify-write programs have severely slowed down the write speed and need to be improved.

有鑑於上述檔案系統之檔案管理方法造成快閃記憶體資料寫入速度緩慢之技術缺陷,本發明的主要目的係提出一種檔案系統對快閃記憶體之檔案管理方法。In view of the technical defect that the file management method of the above file system causes the writing speed of the flash memory data to be slow, the main object of the present invention is to provide a file system management method for the flash memory.

欲達上述目的所使用的主要技術手段係令該檔案系統對快閃記憶體之檔案管理方法包含一資料刪除及寫入程序,且該資料刪除及寫入程序包含以下步驟:讀取至少一管理檔案表,該至少一管理檔案表包含一儲存位址,並依據讀取的管理檔案表中的儲存位址標示出至少一已使用邏輯單位及至少一自由邏輯單位;接收上層作業系統命令;判斷該作業系統命令中是否為一刪除命令或一新增命令;於判斷為刪除命令時,則讀取一欲刪除資料的管理檔案表,並將其管理檔案表中儲存位址所對應的已使用邏輯單位標示為暫時非可用邏輯單位(unavailable);於判斷包含有新增命令時,則選擇自由邏輯單位對應的儲存位址,寫入一欲新增資料。The main technical means used to achieve the above purpose is to enable the file system to include a data deletion and writing process for the file management method of the flash memory, and the data deletion and writing process comprises the following steps: reading at least one management a file table, the at least one management file table includes a storage address, and at least one used logical unit and at least one free logical unit are marked according to the stored address in the read management file table; receiving an upper operating system command; Whether the command is a delete command or a new command in the operating system command; when it is determined that the command is deleted, a management file table for deleting the data is read, and the corresponding address corresponding to the storage address in the management file table is used. The logical unit is marked as a temporarily unavailable non-available logical unit (unavailable); when it is judged that a new command is included, the storage address corresponding to the free logical unit is selected, and a new data to be added is written.

本發明主要係令檔案系統要刪除資料時,將對應該資料儲存位址的已使用邏輯單位標示成暫時非可用邏輯單位,而當檔案系統要寫入新增檔案時只依據自由邏輯單位對應的儲存位址定址對應寫到快閃記憶體中,如此即可避免讓新增資料寫入快閃記憶體因資料但被刪除而形成的不連續儲存位址中,使新增資料可快速地連續寫入而不分割,以大幅減少快閃記憶體執行讀取-修改-寫入程序的次數,對於提升快閃記憶體的寫入速度有顯著的效果。The invention mainly causes the file system to delete the used data, and the used logical unit corresponding to the data storage address is marked as a temporary non-available logical unit, and when the file system is to be written into the newly added file, only the corresponding logical unit is used. The address of the storage address is correspondingly written to the flash memory, so that the newly added data can be prevented from being continuously written into the discontinuous storage address formed by the flash memory due to the deletion of the data, so that the newly added data can be continuously continuous. Write without division to greatly reduce the number of times the flash memory performs the read-modify-write program, which has a significant effect on increasing the write speed of the flash memory.

由於本發明檔案系統刪除資料後,係將已使用邏輯單位標示為暫時非可用邏輯單位,且檔案系統不會將新增資料寫入暫時非可用邏輯單位對應的儲存位址中,故本發明必須將暫時非可用邏輯單位標示回自由邏輯單位,故令上述檔案系統對快閃記憶體之檔案管理方法進一步包含有一邏輯單位釋放程序,用以將該資料刪除及寫入程序標示出的暫時非可用邏輯單位改標示為自由邏輯單位,該邏輯單位釋放程序中係設定一連續邏輯單位值,並搜尋複數個分別對應儲存位址連續的暫時非可用邏輯單位,於判斷該複數個暫時非可用邏輯單位數量大於該連續邏輯單位值時,將該複數個分別對應儲存位址連續的暫時非可用邏輯單位標示為複數個自由邏輯單位。Since the file system of the present invention deletes the data, the logical unit is marked as a temporary non-available logical unit, and the file system does not write the newly added data into the storage address corresponding to the temporarily unavailable logical unit, so the present invention must The temporary non-available logical unit is marked back to the free logical unit, so that the above file system for the flash memory file management method further includes a logical unit release program for deleting and writing the data to the temporarily unavailable non-available program. The logical unit is changed to a free logical unit, and the logical unit release program sets a continuous logical unit value, and searches for a plurality of temporary non-available logical units respectively corresponding to the storage address, and determines the plurality of temporarily unavailable logical units. When the number is greater than the continuous logical unit value, the plurality of temporary non-available logical units respectively corresponding to the storage address are marked as a plurality of free logical units.

由於上述邏輯單位釋放程序係於判斷該複數個暫時非可用邏輯單位數量大於該連續邏輯單位值時再標示為自由邏輯單位;如此,以配合讓資料刪除及寫入程序有較高的機率能讓新增資料寫入連續的位址中,減少寫入資料進行分割的機率及次數,使快閃記憶體能以連續寫入方式寫入新增資料,提高快閃記憶體寫入資料的速度。The above logical unit release program is further marked as a free logical unit when it is determined that the number of the plurality of temporarily unavailable logical units is greater than the continuous logical unit value; thus, the data deletion and writing process has a higher probability of being matched. The newly added data is written into consecutive addresses, which reduces the probability and frequency of writing data for segmentation, so that the flash memory can write new data in a continuous write manner, thereby improving the speed at which the flash memory writes data.

請參閱圖1,本發明檔案系統對快閃記憶體之檔案管理方法包含有一資料刪除及寫入程序及一邏輯單位釋放程序,且該資料刪除及寫入程序包含以下步驟:讀取至少一管理檔案表S11,該至少一管理檔案表包含一儲存位址,並如圖2所示,依據讀取的管理檔案表中的儲存位址標示出複數已使用邏輯單位11及複數自由邏輯單位12,例如,讀取資料A~G管理檔案表的儲存位址,並依據其儲存位址標示出已使用邏輯單位11,其餘的邏輯單位則標示為自由邏輯單位12;接收上層作業系統命令S12;判斷該作業系統命令中是否為一刪除命令或一新增命令S13;於判斷為刪除命令,則讀取一欲刪除資料的管理檔案表,並如圖3所示,假設有複數個欲刪除資料B、D、F,則分別將其管理檔案表中儲存位址所對應的已使用邏輯單位11標示為暫時非可用邏輯單位13(available)(S14);於判斷為新增命令時,則如圖4所示,選擇自由邏輯單位12對應的儲存位址,寫入一欲新增資料H(S15)。Referring to FIG. 1, a file management method for a flash memory of the file system of the present invention includes a data deletion and writing program and a logical unit release program, and the data deletion and writing program includes the following steps: reading at least one management In the file table S11, the at least one management file table includes a storage address, and as shown in FIG. 2, the plural used logical unit 11 and the plural free logical unit 12 are marked according to the storage address in the read management file table. For example, reading the storage address of the data A~G management file table, and indicating that the logical unit 11 has been used according to the storage address, and the remaining logical units are marked as the free logical unit 12; receiving the upper operating system command S12; Whether the command is a delete command or a new command S13; if it is determined to be a delete command, a management file table for deleting data is read, and as shown in FIG. 3, it is assumed that there are a plurality of data to be deleted. , D, F, respectively, the used logical unit 11 corresponding to the storage address in the management file table is marked as a temporary non-available logical unit 13 (available) (S14); When a command is added, as shown in FIG. 4, the storage address corresponding to the free logical unit 12 is selected, and a new information H is written (S15).

由圖2至圖4之表示中可知,相較於現有技術所舉之實例,以本發明的資料刪除及寫入程序寫入該新增資料H時,並不會將新增資料H寫於對應原存放資料B、D、F的儲存位址中,因此該新增資料H並不會進行分割,而是連續寫入快閃記憶體中。As can be seen from the representations of FIG. 2 to FIG. 4, compared with the example of the prior art, when the new data H is written by the data deletion and writing program of the present invention, the new data H is not written in Corresponding to the storage address of the original storage data B, D, F, the new data H is not divided, but is continuously written into the flash memory.

但由於上述資料刪除及寫入程序,並不會挑選暫時非可用邏輯單位13對應的儲存位址來存放資料,因此,必須以該邏輯單位釋放程序將暫時非可用邏輯單位13標示回自由邏輯單位12;由於快閃記憶體歷經越多次資料刪除及寫入的程序,就有越高的機率可以找到多個分別對應儲存位址連續的暫時非可用邏輯單位13,故於本實施例中,該邏輯單位釋放程序設定一自由單位臨界值及一連續邏輯單位值,並於判斷自由邏輯單位12的數量小於該自由單位臨界值時,如圖5所示,開始搜尋複數個分別對應儲存位址連續的暫時非可用邏輯單位13’,此時,檔案系統已標示出多個連續的暫時非可用邏輯單位13機率較高,例如使用者可能已經也刪除了資料C與資料E,而邏輯單位釋放程序於判斷該複數個暫時非可用邏輯單位13’數量大於該連續邏輯單位值時(例如15個連續的邏輯單位),便將該複數個分別對應儲存位址連續的暫時非可用邏輯單位標13’示為複數個自由邏輯單位12’;如此可使資料刪除後所標示出來的暫時非可用邏輯單位13’,先累積到具有一定數量且對應位址連續後才標示成自由邏輯單位12’,減少新增資料需進行分割的機率及次數,並提高新增資料可連續寫入的機率,避免讓快閃記憶體執行費時的寫入程序。However, due to the above data deletion and writing procedures, the storage address corresponding to the temporarily unavailable logical unit 13 is not selected to store the data. Therefore, the temporary non-available logical unit 13 must be marked back to the free logical unit by the logical unit release program. 12; Because the flash memory has been subjected to a process of deleting and writing data more and more times, there is a higher probability that a plurality of temporary non-available logical units 13 respectively corresponding to the storage address are found, so in this embodiment, The logical unit release program sets a free unit threshold and a continuous logical unit value, and when it is determined that the number of free logical units 12 is less than the free unit threshold, as shown in FIG. 5, starting to search for a plurality of corresponding storage addresses respectively Continuous temporary non-available logical unit 13'. At this time, the file system has indicated that a plurality of consecutive temporary unavailable logical units 13 have a higher probability. For example, the user may have deleted the data C and the data E, and the logical unit is released. The program determines that the number of the plurality of temporary non-available logical units 13' is greater than the continuous logical unit value (eg, 15 consecutive logics) Unit), the plurality of temporary non-available logical unit labels 13' respectively corresponding to the storage address are shown as a plurality of free logical units 12'; thus the temporary non-available logical unit 13' marked after the data deletion is deleted , first accumulate to a certain number and the corresponding address is continuous after being marked as a free logical unit 12', reducing the probability and number of new data to be split, and increasing the probability of new data can be continuously written, to avoid flashing The memory performs a time-consuming writing process.

又,上述本發明的檔案系統之檔案管理方法,可於資料刪除及寫入程序將已使用邏輯單位11標示為暫時非可用邏輯單位13時,輸出一刪除指令給外部之快閃記憶體,讓快閃記憶體於此時將對應的檔案資料刪除;或可於邏輯單位釋放程序將非暫時邏輯單位13標示回自由邏輯單位12時才輸出該刪除指令。Moreover, the file management method of the file system of the present invention can output a delete command to the external flash memory when the data deletion and writing program marks the used logical unit 11 as the temporarily unavailable logical unit 13. The flash memory deletes the corresponding file data at this time; or the delete instruction can be output when the logical unit release program marks the non-transitory logical unit 13 back to the free logical unit 12.

綜上所述,本發明檔案系統對快閃記憶體之檔案管理方法可提高新增資料以連續方式寫入的機率,減低快閃記憶體執行費時的讀取-修改-寫入程序的機率及次數,達到提升快閃記憶體資料寫入速度的效果,並經統計,現有技術的檔案系統之檔案管理方法對快閃記憶體的資料平均寫入速度是每秒0.4MB,以本發明檔案系統之檔案管理方法對快閃記憶體的資料平均寫入速度則可高達每秒10MB,效果顯著,提升快閃記憶體之存取效能。In summary, the file management method of the flash memory of the present invention can improve the probability of adding new data in a continuous manner, and reduce the probability of reading-modifying-writing programs in the flash memory execution time and The number of times reaches the effect of increasing the writing speed of the flash memory data, and according to statistics, the file management method of the prior art file system has an average writing speed of 0.4 MB per second for the flash memory, to the file system of the present invention. The file management method has an average writing speed of up to 10 MB per second for the flash memory, and the effect is remarkable, and the access performance of the flash memory is improved.

11...已使用邏輯單位11. . . Logical unit used

12、12’...自由邏輯單位12, 12’. . . Free logical unit

13、13’...暫時非可用邏輯單位13, 13’. . . Temporary non-available logical unit

40...作業系統40. . . working system

50...檔案系統50. . . File system

51...已使用邏輯單位51. . . Logical unit used

52...自由邏輯單位52. . . Free logical unit

60...快閃記憶體60. . . Flash memory

圖1:為本發明檔案系統之檔案管理方法的資料刪除及寫入程序之流程圖。Figure 1 is a flow chart of the data deletion and writing process of the file management method of the file system of the present invention.

圖2:為圖1檔案系統之檔案管理方法標示出的邏輯單位之一示意圖。Figure 2: Schematic diagram of one of the logical units indicated for the file management method of the file system of Figure 1.

圖3:圖2刪除部分資料後,本發明檔案系統之檔案管理方法標示出的邏輯單位之另一示意圖。FIG. 3 is another schematic diagram of the logical unit indicated by the file management method of the file system of the present invention after deleting part of the data.

圖4:圖3新增一資料後,本發明檔案系統之檔案管理方法標示出的邏輯單位之再一示意圖。Figure 4: A further schematic diagram of the logical unit indicated by the file management method of the file system of the present invention after adding a new material.

圖5:為圖4又刪除部分資料並且寫入其他資料後,本發明檔案系統之檔案管理方法標示出的邏輯單位之又一示意圖。FIG. 5 is still another schematic diagram of the logical unit indicated by the file management method of the file system of the present invention after FIG. 4 deletes part of the data and writes other materials.

圖6:為現有檔案系統與快閃記憶體連結之示意圖。Figure 6: Schematic diagram of the connection between the existing file system and the flash memory.

圖7:為圖6檔案系統之檔案管理方法標示出的邏輯單位之一示意圖。Figure 7 is a schematic diagram showing one of the logical units indicated for the file management method of the file system of Figure 6.

圖8:為圖7刪除部分資料後,現有檔案系統之檔案管理方法標示出的邏輯單位之另一示意圖。Figure 8: Another schematic diagram of the logical unit indicated by the file management method of the existing file system after deleting part of the data in Figure 7.

圖9:圖8新增一資料後,現有檔案系統之檔案管理方法標示出的邏輯單位之再一示意圖。Figure 9: A further schematic diagram of the logical unit indicated by the file management method of the existing file system after adding a new material in Figure 8.

Claims (5)

一種檔案系統對快閃記憶體之檔案管理方法,係包含一資料刪除及寫入程序,且該資料刪除及寫入程序包含以下步驟:讀取至少一管理檔案表,該至少一管理檔案表包含一儲存位址,並依據讀取的管理檔案表中的儲存位址標示出至少一已使用邏輯單位及至少一自由邏輯單位;接收上層作業系統命令;判斷該作業系統命令中是否為一刪除命令或一新增命令;於判斷為刪除命令時,則讀取一欲刪除資料的管理檔案表,並將其管理檔案表中儲存位址所對應的已使用邏輯單位標示為暫時非可用邏輯單位;於判斷包含有新增命令時,則選擇自由邏輯單位對應的儲存位址,寫入一欲新增資料。A file system for flash memory file management method includes a data deletion and writing program, and the data deletion and writing program includes the following steps: reading at least one management file table, the at least one management file table includes Storing an address, and indicating at least one used logical unit and at least one free logical unit according to the stored address in the read management file table; receiving an upper operating system command; determining whether the operating system command is a delete command Or a new command; when it is determined to delete the command, it reads a management file table of the data to be deleted, and marks the used logical unit corresponding to the storage address in the management file table as a temporary non-available logical unit; When it is judged that a new command is included, the storage address corresponding to the free logical unit is selected, and a new data to be added is written. 如請求項1所述之檔案系統對快閃記憶體之檔案管理方法,係進一步包含有一邏輯單位釋放程序,該邏輯單位釋放程序中係設定一連續邏輯單位值,並搜尋複數個分別對應儲存位址連續的暫時非可用邏輯單位,於判斷該複數個暫時非可用邏輯單位數量大於該連續邏輯單位值時,將該複數個分別對應儲存位址連續的暫時非可用邏輯單位標示為複數個自由邏輯單位。The file system for flash memory according to claim 1 further includes a logical unit release program, wherein the logical unit release program sets a continuous logical unit value, and searches for a plurality of corresponding storage bits respectively. a temporary temporary non-available logical unit of the address, when determining that the plurality of temporary non-available logical units is greater than the continuous logical unit value, marking the plurality of consecutive non-available logical units corresponding to the storage address consecutively as a plurality of free logic unit. 如請求項2所述之檔案系統對快閃記憶體之檔案管理方法,該邏輯單位釋放程序中係設定一自由單位臨界值,並於判斷資料刪除及寫入程序標示出的自由邏輯單位的數量小於該自由單位臨界值時,開始搜尋儲存位址連續的暫時非可用邏輯單位。In the file system for flash memory according to claim 2, the logical unit release program sets a free unit threshold, and determines the number of free logical units indicated by the data deletion and writing program. When less than the free unit threshold, it begins searching for temporary non-available logical units of storage addresses. 如請求項2或3任一項所述之檔案系統對快閃記憶體之檔案管理方法,該資料刪除及寫入程序於將已使用邏輯單位標示為暫時非可用邏輯單位時,輸出一刪除指令。The file system for flash memory according to any one of claims 2 or 3, wherein the data deletion and writing program outputs a delete command when the used logical unit is marked as a temporarily unavailable logical unit. . 如請求項2或3任一項所述之檔案系統對快閃記憶體之檔案管理方法,邏輯單位釋放程序將非暫時邏輯單位標示回自由邏輯單位時,輸出一刪除指令。In the file system for flash memory according to any one of claims 2 or 3, when the logical unit release program marks the non-transitory logical unit back to the free logical unit, a delete instruction is output.
TW101106495A 2012-02-29 2012-02-29 Archives System for File Management of Flash Memory TWI476680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101106495A TWI476680B (en) 2012-02-29 2012-02-29 Archives System for File Management of Flash Memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101106495A TWI476680B (en) 2012-02-29 2012-02-29 Archives System for File Management of Flash Memory

Publications (2)

Publication Number Publication Date
TW201335840A TW201335840A (en) 2013-09-01
TWI476680B true TWI476680B (en) 2015-03-11

Family

ID=49627425

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101106495A TWI476680B (en) 2012-02-29 2012-02-29 Archives System for File Management of Flash Memory

Country Status (1)

Country Link
TW (1) TWI476680B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI599881B (en) 2014-01-22 2017-09-21 群暉科技股份有限公司 Method for adaptively managing a solid state drive, and associated apparatus and associated computer program product

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104309A1 (en) * 2006-10-30 2008-05-01 Cheon Won-Moon Flash memory device with multi-level cells and method of writing data therein
US20080316816A1 (en) * 2007-06-25 2008-12-25 Lin Jason T Systems for programming multilevel cell nonvolatile memory
TW201202927A (en) * 2010-07-06 2012-01-16 Innostor Technology Corp Log-structured file system of flash memory for increasing data access performance

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080104309A1 (en) * 2006-10-30 2008-05-01 Cheon Won-Moon Flash memory device with multi-level cells and method of writing data therein
US20080316816A1 (en) * 2007-06-25 2008-12-25 Lin Jason T Systems for programming multilevel cell nonvolatile memory
TW201202927A (en) * 2010-07-06 2012-01-16 Innostor Technology Corp Log-structured file system of flash memory for increasing data access performance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
http://peso.pixnet.net/blog/post/28193761 *
香醇咖啡(2008.11.27),"快閃記憶體-維基百科",(痞客邦之文章) *

Also Published As

Publication number Publication date
TW201335840A (en) 2013-09-01

Similar Documents

Publication Publication Date Title
US10649910B2 (en) Persistent memory for key-value storage
US11573701B2 (en) Memory device and host device
KR101813786B1 (en) System and method for copy on write on an ssd
KR102586805B1 (en) Management system for operating storage media in multi-mode, storage system including the same, and method of managing storage media using the same
WO2017025039A1 (en) Flash storage oriented data access method and device
KR100703807B1 (en) Method and apparatus for managing block by update type of data in block type memory
JP6094267B2 (en) Storage system
CN111143285A (en) Small file storage file system and small file processing method
JP2015507798A (en) Method for erasing data entities in a memory module
WO2020192710A1 (en) Method for processing garbage based on lsm database, solid state hard disk, and storage apparatus
US9524236B1 (en) Systems and methods for performing memory management based on data access properties
CN104050057A (en) Historical sensed data duplicate removal fragment eliminating method and system
CN101324899B (en) Method for rapidly writing NAND type FLASH
KR20090042570A (en) Apparatus and method for managing files and memory unit
TWI476680B (en) Archives System for File Management of Flash Memory
CN104951569B (en) File system and the file management method for using this document system
CN105630406B (en) Using MRAM as the storage system of editor's buffer area and editor's caching method
KR101191650B1 (en) Apparatus and method for mapping the data address in NAND flash memory
CN104391652A (en) Wear leveling method and device of hard disk
CN107526548B (en) Multi-namespace solid state disk and data deleting method and device
TW202137013A (en) Data processing method and memory controller utilizing the same
TWI459196B (en) Log-structured file system
TWI389001B (en) File system and file system transforming method
JP5697398B2 (en) File management apparatus, file management method, and computer program
TWI581097B (en) Access method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees