CN101034416A - Method for file seek track using file allocation table and system frame thereof - Google Patents
Method for file seek track using file allocation table and system frame thereof Download PDFInfo
- Publication number
- CN101034416A CN101034416A CN 200710098729 CN200710098729A CN101034416A CN 101034416 A CN101034416 A CN 101034416A CN 200710098729 CN200710098729 CN 200710098729 CN 200710098729 A CN200710098729 A CN 200710098729A CN 101034416 A CN101034416 A CN 101034416A
- Authority
- CN
- China
- Prior art keywords
- file
- list item
- allocation table
- index value
- file allocation
- 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
- 238000000034 method Methods 0.000 title claims abstract description 37
- 230000015654 memory Effects 0.000 claims description 14
- 230000008569 process Effects 0.000 claims description 4
- 239000007787 solid Substances 0.000 abstract 1
- 230000006872 improvement Effects 0.000 description 7
- 238000007726 management method Methods 0.000 description 4
- 238000013459 approach Methods 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 208000010086 Hypertelorism Diseases 0.000 description 1
- 206010020771 Hypertelorism of orbit Diseases 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000000704 physical effect Effects 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- GOLXNESZZPUPJE-UHFFFAOYSA-N spiromesifen Chemical compound CC1=CC(C)=CC(C)=C1C(C(O1)=O)=C(OC(=O)CC(C)(C)C)C11CCCC1 GOLXNESZZPUPJE-UHFFFAOYSA-N 0.000 description 1
Images
Abstract
The invention provides a method and system structure of using file allocation tables to make file section routing. And the system structure comprises first and second file allocation tables, and it sets the item value stored in each item in the second allocation table as an indexing value for the previous item so that the two file allocation tables form a two-way link list, and uses the two-way link list to make file section routing. And it implements a two-way link list structure in the file allocation tables, reduces the time for file section routing and lays solid foundations for smooth multimedia playing.
Description
Technical field
The present invention relates to the disk management technology of computing machine, particularly relate to a kind of method and system framework that utilizes file allocation table to carry out the file tracking.
Background technology
FAT (file allocation table, file allocation table) is the file system of a kind of hyperdisk data space of Microsoft's definition, be created in the beginning of the eighties at the end of the seventies, originally be used for MS-DOS operation system, design FAT originally and only positioned it as a kind of simple file system, only be suitable for floppy disk management, and the memory range of 1M only of floppy disk at that time.Continuous development along with new technology, it is big that disk storage space constantly becomes, initial FAT design can not be satisfied, so Microsoft is spread F AT on original basis, be our the now common FAT12 that arrives, FAT16, FAT32, these three kinds of file system have satisfied the space management of different memory space ranges substantially.
A continuous blank data area can be thought by the data in magnetic disk district of a blank, and the user can directly read and write data on the data field.And the FAT file system has been done some definition planning exactly on this blank disc space, convenient use to disk space.Defined after the FAT, all forbid the user the direct read of disk space, and are only open to FAT, and the user realizes by the interface of FAT definition the operation of disk, for example open file, reading and writing of files, close file etc.
From in logic, the logical organization of FAT comprises following 4 levels:
1) parameter region and some reserved areas
2) FAT table
3) directory area (FAT12, FAT16 are effective, do not have among the FAT32)
4) data field
The logical organization of four levels as shown in Figure 1, the parameter setting that the map parameter district whole FAT of essential record system is relevant, for example: cluster (bunch) several block (piece) are arranged, what block a FAT table has constitute, and what FAT are a system have show formation or the like.The recording parameters part is placed among the block usually, may have several reservation block in addition as other purposes.Wherein, block is the base unit to the disk read-write operation of FAT regulation, is 512 bytes, the notion that FAT has defined bunch on the basis of block, one bunch can comprise one or more block, informs in parameter region as for specifically comprising several meetings, and block is the least unit of read-write disk.
As shown in Figure 1, the FAT epi-position is in following one deck of parameter region.The FAT file system shows to manage the whole magnetic disk space by FAT, base unit is 12 bit (bit) in the FAT table, 16 bit or 32 bit, so-called FAT12, FAT16, FAT32 promptly come therefrom, corresponding one bunch of this base unit, it is one bunch that a corresponding data of basic list item (data) distinguishes in the FAT table, just be not difficult to understand how hyperdisk space of FAT thus, in brief, exactly disk is divided into data field and mark zone, the FAT table is exactly the place of marking, i.e. a mark zone frankly speaking.How is this mark used so? in fact FAT is by single-track link table structure of FAT table structure, with regard to each FAT list item, it can contain two information, and the one, which list item it is, be the index value of FAT list item, this simply is exactly the number of starting from scratch; The 2nd, the data of storing in the list item, the FAT system is the index value of next FAT list item with the value defined of these data.So just formed an individual event chained list, the value of the FAT of chained list end list item is zero, and Fig. 2 is the exemplary plot of a FAT table.
By the FAT standard as can be known, the content that FAT shows in each list item is the index value of next FAT list item, because the index value of list item representative is this list item at the deposit position of the correspondence of data field bunch, therefore FAT show in each list item the content representative be: this list item is at the deposit position of the next one of the correspondence of data field bunch bunch, thereby form an individual event chained list by FAT table every, be used for the deposit position of tab file or catalogue.
Because the limitation of FAT file system (the FAT table is an individual event chained list), file seek among the FAT is at every turn always from file header (FAT table first), search for one by one up to the pairing list item of the file that finds seek according to the individual event chained list, if first hypertelorism of pairing list item of the file of seek and FAT table, will cause the side-play amount of seek excessive, it is just consuming time very long only to locate the FAT chained list, so existing seek method is still very incomplete.
And the function items that the seek right and wrong of file are usually seen, the height of its performance directly influences the performance of file read-write, for example audio frequency and video are asked in the playing process of part, frequently the seek file is so that obtain data, if seek efficient is underground, add the system processor performance and do not do, not smooth with regard to what cause easily playing, so need to propose a kind of high efficiency seek method, to solve the problem of the seek inefficiency that existing FAT table brings because of the limitation of individual event chained list.
Summary of the invention
The purpose of this invention is to provide a kind of method and system framework that utilizes file allocation table to carry out the file tracking, solve the limitation of existing FAT table, solve and adopt existing FAT table seek long technical matters of file time spent because of only having for the individual event chained list.
To achieve these goals, the invention provides a kind of method of utilizing file allocation table to carry out the file tracking, be used to include the system architecture of first file allocation table and second file allocation table, the representative of the index value of each list item of described first file allocation table and second file allocation table be this list item at the deposit position of the correspondence in data in magnetic disk district bunch, the list item value of storing in each list item of described first file allocation table is the index value of next list item, wherein, comprise: the list item value of storing in each list item with described second file allocation table is set at the index value of a last list item, thereby described second file allocation table and described first file allocation table form doubly linked list, utilize described doubly linked list to carry out the file tracking.
Above-mentioned method wherein, also comprises: utilize cache memories store file tracking result's record, make follow-up file tracking carry out Search and Orientation by described record and described doubly linked list.
Above-mentioned method, wherein, described be recorded as the file that obtains behind the file tracking the index value of corresponding list item.
Above-mentioned method, wherein, in the tracking process, by in the described record with current file the immediate index value of index value of corresponding list item begin to search.
Above-mentioned method, wherein, if described immediate index value current file before the index value of corresponding list item, then begin by described immediate index value, find the pairing list item of current file by the described first file allocation table sequential index; If described immediate index value current file after the index value of corresponding list item, then begin by described immediate index value, the reverse index by described second file allocation table finds the pairing list item of current file.
Above-mentioned method, wherein, if described cache memory is empty, then first list item by described first file allocation table begins, sequential index finds the pairing list item of current file, and write down at described cache memory the file that obtains behind this file tracking the index value of corresponding list item.
Above-mentioned method wherein, if described cache memory is full, then utilizes current tracking result's record to replace a record of having stored.
Above-mentioned method, wherein, described stored be recorded as the record nearest with current tracking result's record.
In order to realize purpose of the present invention, the present invention also provides a kind of system architecture that is used for the file allocation table of disk management, comprise first file allocation table and second file allocation table, the representative of the index value of each list item of described first file allocation table and second file allocation table be this list item at the deposit position of the correspondence in data in magnetic disk district bunch, the list item value of storing in each list item of described first file allocation table is the index value of next list item, wherein, the list item value of storing in each list item of described second file allocation table is the index value of a last list item, thereby described second file allocation table and described first file allocation table are formed for the doubly linked list of file tracking.
Above-mentioned system architecture wherein, also comprises cache memory, is used for storage file tracking result's record, makes follow-up file tracking carry out Search and Orientation by described record and described doubly linked list.
Above-mentioned system architecture, wherein, described be recorded as the file that obtains behind the file tracking the index value of corresponding list item.
Technique effect of the present invention is:
The present invention defines the position of FAT table 2 a list item value representation last cluster pointed, and by revising the definition of FAT table 2, the present invention has realized the doubly linked list structure in the FAT table, changed the limitation of traditional individual event list structure like this.
The present invention increases the cache module, notes the seek position of limited number of times, and promptly a seek can seek from cache from own recent historical record, from the FAT table, locate this seek position again based on this historical record, like this, the seek method with respect to traditional has the improvement of matter.
The scheme that the present invention carried with file seek consuming time drop to minimum, for guaranteeing multimedia smooth playing establish a firm foundation.
Description of drawings
Fig. 1 is the building-block of logic of four levels of FAT;
Fig. 2 is the exemplary plot of FAT table;
Fig. 3 is the flow chart of steps of method provided by the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, describe the present invention below in conjunction with the accompanying drawings and the specific embodiments.
Existing scheme is that two FAT epiphases are same, and seek must be initial from file, and the present invention will improve seek exactly, to realize file seek rapidly and efficiently.
In the FAT standard, the purpose that defines two identical FAT tables is in order to do backup to guarantee safety.Why like this, be the security that will guarantee the FAT table, in case first FAT table is damaged, can repair with second FAT table.Actual conditions show that second FAT table generally has little significance, and FAT itself does not have power-off protection mechanism, so in case the outage of physical property is even preserve two FAT tables, also of no avail.Therefore the present invention redefines second FAT table, has realized doubly linked list, can be from optional position seek, and added buffer queue, quicken seek.
The method of utilizing file allocation table to carry out the file tracking provided by the present invention, it is the system architecture that is used to include first file allocation table and second file allocation table, the representative of the index value of each list item of described first file allocation table and second file allocation table be this list item at the deposit position of the correspondence in data in magnetic disk district bunch, the list item value of storing in each list item of described first file allocation table is the index value of next list item, afterwards, the inventive method has been carried out following 2 main improvement:
Main improvement one: the list item value of storing in each list item with second file allocation table is set at the index value of a last list item, thereby described second file allocation table and described first file allocation table form doubly linked list, utilize described doubly linked list to carry out the file tracking.
Main improvement two: utilize cache memories store file tracking result's record, make follow-up file tracking carry out Search and Orientation by described record and described doubly linked list.
Fig. 3 is the flow chart of steps of method provided by the invention, and as figure, the detailed step of the inventive method is as follows:
Does step 307 judge that closest approach is before this seek? be execution in step 308 then, otherwise execution in step 309;
As from the foregoing, the present invention realizes that by the method for " redefining second FAT table " and " increasing cache " seek optimizes, and compared with the prior art, the present invention has following advantage:
1) because the limitation of prior art FAT file system (the FAT table is an individual event chained list), file seek among the FAT is at every turn always from file header, if the side-play amount of seek is excessive, it is just consuming time very long only to locate the FAT chained list, promptly for read one " data field " and block, the block that will read earlier in n " FAT table " is used for the location, so existing seek method can be very consuming time.
2) well-known, two FAT tables are arranged in the FAT file system usually, and actual conditions show second FAT justice and not obvious of expressing the meaning.The position of list item value representation next cluster pointed in the FAT table 1, the present invention defines the position of FAT table 2 a list item value representation last cluster pointed, like this by revising the definition of FAT table 2, the present invention has realized the doubly linked list structure in the FAT table, changed the limitation of traditional individual event list structure.
3) increase the cache module, in the application process of reality, seek to file is clocklike, often the position of a seek is always at the periphery of last once seek position, exception is also arranged certainly, so note the seek position of limited number of times, the position of seek is necessary for locating next time.And the present invention has redefined the meaning of FAT table 2, realized doubly linked list, promptly a seek can seek from cache from own recent historical record, from the FAT table, locate this seek position again based on this historical record, like this, seek method with respect to traditional has the improvement of matter.
4) in embedded chip in the multimedia broadcast, through the seek of regular meeting audio-video document, the scheme that the present invention carried with file seek consuming time drop to minimum, for guaranteeing multimedia smooth playing establish a firm foundation.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.
Claims (11)
1. method of utilizing file allocation table to carry out the file tracking, be used to include the system architecture of first file allocation table and second file allocation table, the representative of the index value of each list item of described first file allocation table and second file allocation table be this list item at the deposit position of the correspondence in data in magnetic disk district bunch, the list item value of storing in each list item of described first file allocation table is the index value of next list item, it is characterized in that, comprising:
The list item value of storing in each list item with described second file allocation table is set at the index value of a last list item, thereby described second file allocation table and described first file allocation table form doubly linked list, utilize described doubly linked list to carry out the file tracking.
2. method according to claim 1 is characterized in that, also comprises: utilize cache memories store file tracking result's record, make follow-up file tracking carry out Search and Orientation by described record and described doubly linked list.
3. method according to claim 2 is characterized in that, described be recorded as the file that obtains behind the file tracking the index value of corresponding list item.
4. method according to claim 3 is characterized in that, in the tracking process, by in the described record with current file the immediate index value of index value of corresponding list item begin to search.
5. method according to claim 4, it is characterized in that, if described immediate index value current file before the index value of corresponding list item, then begin by described immediate index value, find the pairing list item of current file by the described first file allocation table sequential index; If described immediate index value current file after the index value of corresponding list item, then begin by described immediate index value, the reverse index by described second file allocation table finds the pairing list item of current file.
6. method according to claim 2, it is characterized in that, if described cache memory is empty, then first list item by described first file allocation table begins, sequential index finds the pairing list item of current file, and write down at described cache memory the file that obtains behind this file tracking the index value of corresponding list item.
7. method according to claim 2 is characterized in that, if described cache memory is full, then utilizes current tracking result's record to replace a record of having stored.
8. method according to claim 7 is characterized in that, described stored be recorded as the record nearest with current tracking result's record.
9. system architecture that is used for the file allocation table of disk management, comprise first file allocation table and second file allocation table, the representative of the index value of each list item of described first file allocation table and second file allocation table be this list item at the deposit position of the correspondence in data in magnetic disk district bunch, the list item value of storing in each list item of described first file allocation table is the index value of next list item, it is characterized in that, the list item value of storing in each list item of described second file allocation table is the index value of a last list item, thereby described second file allocation table and described first file allocation table are formed for the doubly linked list of file tracking.
10. system architecture according to claim 9 is characterized in that, also comprises cache memory, is used for storage file tracking result's record, makes follow-up file tracking carry out Search and Orientation by described record and described doubly linked list.
11. system architecture according to claim 10 is characterized in that, described be recorded as the file that obtains behind the file tracking the index value of corresponding list item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100987297A CN100543748C (en) | 2007-04-25 | 2007-04-25 | A kind of method and system of utilizing file allocation table to carry out the file tracking |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2007100987297A CN100543748C (en) | 2007-04-25 | 2007-04-25 | A kind of method and system of utilizing file allocation table to carry out the file tracking |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101034416A true CN101034416A (en) | 2007-09-12 |
CN100543748C CN100543748C (en) | 2009-09-23 |
Family
ID=38730969
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2007100987297A Expired - Fee Related CN100543748C (en) | 2007-04-25 | 2007-04-25 | A kind of method and system of utilizing file allocation table to carry out the file tracking |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100543748C (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102024060A (en) * | 2010-12-31 | 2011-04-20 | 山西奥克斯电子系统工程中心 | Method for memorizing files and restoring error deleted files |
CN102841894A (en) * | 2011-06-22 | 2012-12-26 | 比亚迪股份有限公司 | Data storage method of file allocation table |
CN102855327A (en) * | 2012-09-18 | 2013-01-02 | 中国石油天然气股份有限公司 | Small embedded file storage management system |
CN102929884A (en) * | 2011-08-10 | 2013-02-13 | 阿里巴巴集团控股有限公司 | Method and device for compressing virtual hard disk image file |
CN104239564A (en) * | 2014-09-28 | 2014-12-24 | 深圳市锐明视讯技术有限公司 | Method and device for organizing and repairing indexes of files |
CN108921488A (en) * | 2018-05-03 | 2018-11-30 | 北京水规院京华工程管理有限公司 | Marine traffic engineering manages platform |
-
2007
- 2007-04-25 CN CNB2007100987297A patent/CN100543748C/en not_active Expired - Fee Related
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102024060A (en) * | 2010-12-31 | 2011-04-20 | 山西奥克斯电子系统工程中心 | Method for memorizing files and restoring error deleted files |
CN102024060B (en) * | 2010-12-31 | 2012-10-24 | 山西奥克斯电子系统工程中心 | Method for memorizing files and restoring error deleted files |
CN102841894A (en) * | 2011-06-22 | 2012-12-26 | 比亚迪股份有限公司 | Data storage method of file allocation table |
CN102929884A (en) * | 2011-08-10 | 2013-02-13 | 阿里巴巴集团控股有限公司 | Method and device for compressing virtual hard disk image file |
CN102929884B (en) * | 2011-08-10 | 2016-05-04 | 阿里巴巴集团控股有限公司 | A kind of method and device that shrinks virtual disk image file |
CN102855327A (en) * | 2012-09-18 | 2013-01-02 | 中国石油天然气股份有限公司 | Small embedded file storage management system |
CN102855327B (en) * | 2012-09-18 | 2015-12-02 | 中国石油天然气股份有限公司 | A kind of low profile edge file storage management system |
CN104239564A (en) * | 2014-09-28 | 2014-12-24 | 深圳市锐明视讯技术有限公司 | Method and device for organizing and repairing indexes of files |
CN104239564B (en) * | 2014-09-28 | 2018-02-09 | 深圳市锐明技术股份有限公司 | A kind of file index tissue and the method and device of reparation |
CN108921488A (en) * | 2018-05-03 | 2018-11-30 | 北京水规院京华工程管理有限公司 | Marine traffic engineering manages platform |
Also Published As
Publication number | Publication date |
---|---|
CN100543748C (en) | 2009-09-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104346357B (en) | The file access method and system of a kind of built-in terminal | |
US9449005B2 (en) | Metadata storage system and management method for cluster file system | |
CN101051318A (en) | Method for cluster linking and track hunting magnetic disc data using file distribution table | |
CN101039278A (en) | Data management method and system | |
US20070185902A1 (en) | Object-based data storage device | |
US20100082537A1 (en) | File system for storage device which uses different cluster sizes | |
CN103838853B (en) | Mixed file system based on different storage media | |
CN1750164A (en) | Digital hard disc recorder file managing method for preventing file fragment production | |
CN1466060A (en) | Flash memory file system | |
CN104899297A (en) | Hybrid index structure with storage perception | |
CN101034416A (en) | Method for file seek track using file allocation table and system frame thereof | |
CN111026329B (en) | Key value storage system based on host management tile record disk and data processing method | |
CN103399823A (en) | Method, equipment and system for storing service data | |
CN100347705C (en) | Method for file merge | |
CN102902709A (en) | Space allocation fixing file memory system and implementation method | |
CN101539884B (en) | Method and device for data storage | |
CN101051317A (en) | FAT file system and its processing method | |
CN103399915A (en) | Optimal reading method for index file of search engine | |
CN1744090A (en) | File distribution list file system read-write method and device | |
CN1822174A (en) | Method for protecting hardware key information area in embedded device | |
KR100907477B1 (en) | Apparatus and method for managing index of data stored in flash memory | |
CN108563586A (en) | A kind of method of garbage reclamation data and user data in separation solid-state disk | |
CN1904881A (en) | Method for searching database filing data | |
CN104133970A (en) | Data space management method and device | |
CN1627272A (en) | Method for managing files in flash memory of mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090923 Termination date: 20120425 |