CN101169760B - Electronic hard disk storage room management method - Google Patents

Electronic hard disk storage room management method Download PDF

Info

Publication number
CN101169760B
CN101169760B CN2006101140688A CN200610114068A CN101169760B CN 101169760 B CN101169760 B CN 101169760B CN 2006101140688 A CN2006101140688 A CN 2006101140688A CN 200610114068 A CN200610114068 A CN 200610114068A CN 101169760 B CN101169760 B CN 101169760B
Authority
CN
China
Prior art keywords
data
storage block
storage
electronic hard
hard disc
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.)
Expired - Fee Related
Application number
CN2006101140688A
Other languages
Chinese (zh)
Other versions
CN101169760A (en
Inventor
周朝晖
姜玉龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aigo Digital Technology Co Ltd
Original Assignee
Beijing Huaqi Code Tech Lab Co Ltd
Beijing Huaqi Information Digital Technology Co Ltd
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 Beijing Huaqi Code Tech Lab Co Ltd, Beijing Huaqi Information Digital Technology Co Ltd filed Critical Beijing Huaqi Code Tech Lab Co Ltd
Priority to CN2006101140688A priority Critical patent/CN101169760B/en
Publication of CN101169760A publication Critical patent/CN101169760A/en
Application granted granted Critical
Publication of CN101169760B publication Critical patent/CN101169760B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a management method for memory space of an electronic hard disk, which comprises a central processing unit (CPU), an interface controller, a static random access memory and a memory. The memory comprises a plurality of memory blocks, and each memory block is divided into a data zone and a status tag zone. The status tag zone comprises a logic address tag, a data storage status tag, and a memory block tag, wherein the data storage status tag is used for storing the status whether data is written into the status storage data zone, and the logic address tag is used for creating an logic address of the data zone after the data is written into the data zone. The electronic hard disk is connected with an external data processor to initiate the electronic hard disk, and the static random access memory is used for creating a look-up table in which the memory block tag of the memory block is corresponding to the memory block. In the invention, the electronic hard disk operates the memory block that needs data read-write operation through the look-up table created by the memory block tag, so as to save data operation time and improve the management efficiency of the electronic hard disk.

Description

The management method of the storage space of electronic hard disc
[technical field]
The present invention relates to a kind of management method of storage space of memory storage, relate in particular to a kind of management method of storage space of electronic hard disc.
[background technology]
Electronic hard disc is as storage medium, by the memory storage of memory controller controls storage operation with the solid-state electronic storer.Present modal electronic hard disc is with the electronic hard disc of flash memories (Flash Memory) as storage medium.
Generally, in the flash memories as the storage medium of electronic hard disc, NAND type (non-and type) flash memories more and more is applied on the movable storage device because of its storage density and low cost, thereby makes NAND type flash memories also be suitable as the storage medium of electronic hard disc.
In the application of electronic hard disc, the controller of realizing electronic hard disc has been controlled two kinds of schemes at present: first kind is the multi-chip controller scheme, forms the controller of system as electronic hard disc by central processing unit chip, read-only storage chip, static RAM (SRAM) and field programmable gate array storer; Second kind is to be integrated into the controller of System on Chip/SoC in the sheet (System On Chip) as electronic hard disc by central processing unit, ROM (read-only memory), static random read-write memory, interface controller and memory controller, and writes the control that program curing is finished electronic hard disc in ROM (read-only memory).
In the controller scheme of first kind of above-mentioned electronic hard disc, adopt the multicore sheet that the storage space of electronic hard disc is managed, make cost increase, be unfavorable for popularizing of electronic hard disc; In the controller scheme of second kind of electronic hard disc, the storage space of electronic hard disc is managed, make the available resources of system be subjected to chip area and limitation of complexity, and then influence the reading and writing data performance of system because of adopting the chip Integrated Solution.
Thereby, a kind of management method of storage space of electronic hard disc cheaply of suitable widespread use is provided, improve the readwrite performance of electronic hard disc, then become pressing for of electronic hard disc development.
[summary of the invention]
The invention provides a kind of management method of storage space of electronic hard disc, improve the operating efficiency of reading and writing data, improve usability, reduce cost.
For achieving the above object, the invention provides a kind of electronic hard disc, comprise central processing unit, interface controller, static RAM, flash memories, described central processing unit inside is provided with the firmware memory of store electrons disk read-write control data and program, described interface controller is connected with central processing unit and is connected with the data processing equipment of outside and carries out data transmission and read-write, described storer comprises some storage blocks, each storage block is divided into data field and status indicator district, the status indicator district comprises logical address area, the data mode tag slot, the storage block tag slot, whether the data field that each storage block is stored in described data mode tag slot writes the state of data, described logical address area recorded data zone writes the logical address of this data field of setting up after the data, unique identification marking of storage data field, described storage block tag slot; When described electronic hard disc was connected with external data processing device by interface controller, look-up table was one to one set up between the physical address of the storage block sign of storage block tag slot of storage block and storage block in the electronic hard disc initialization in the static RAM.
Another object of the present invention provides a kind ofly carries out the method for data write operation to above-mentioned electronic hard disc, comprises the steps:
1), finds the required storage block that writes of data according to look-up table, the storage data field, data mode tag slot of described each storage block writes the data mode sign of " storage " or " sky " of data, if the data mode of this storage block is designated " storage ", then the storage block sign of this storage block is mapped to the rearmost position of the free block formation of look-up table, execution in step 2); If the data mode of this storage block is designated " sky ", then data are write this storage block, execution in step 3);
2) inquire about look-up table, data are write the storage block of free block formation primary importance in the look-up table;
3) set up the logical address of the storage block write data, this logical address and corresponding storage block sign are write to the primary importance that data mode in the look-up table is designated storage block identification information in the data field formation of " storage ";
4), data write operation is finished.
The present invention also further provides the improvement technical scheme of the method for above-mentioned data write operation, when described electronic hard disc is in the non-read-write operation state of data, described memory controller carries out erase operation with the storage block that the data mode in the look-up table is designated storage, discharges logical address simultaneously.
As shown from the above technical solution, the data write operation method of the management method of the storage space of electronic hard disc of the present invention and this electronic hard disc, physical address by setting up limited storage block sign and storage block in static RAM is the mode of look-up table one to one, occupying system resources is few, simplify the reading and writing data management of electronic hard disc, improve the usability of electronic hard disc.
[description of drawings]
Fig. 1 is the structural representation of electronic hard disc of the present invention.
Fig. 2 is the structural representation of the storage block of electronic hard disc of the present invention.
Fig. 3 is the synoptic diagram after the storage block of electronic hard disc of the present invention writes data.
Fig. 4 is the synoptic diagram after the storage block of electronic hard disc of the present invention is carried out erase operation.
Fig. 5 is the process flow diagram of the data write operation of electronic hard disc of the present invention.
[embodiment]
Reach technological means and the effect that predetermined purpose is taked for further setting forth the present invention, below in conjunction with drawings and Examples, embodiment, architectural feature and effect thereof to the management method of the storage space of electronic hard disc of the present invention are described in detail as follows.
See also Fig. 1, the management method of the storage space of electronic hard disc of the present invention, comprise the interface controller that is provided with data-interface, flash memories, central processing unit and static RAM, flash memories comprises some storage blocks, central processing unit inside is provided with firmware memory, this firmware memory store electrons disk read-write control data and program, promptly be called " Firmware " (firmware), storer comprises some storage blocks, each storage block is divided into data field and status indicator district, and the status indicator district comprises the logical address tag slot, the data mode tag slot, the storage block tag slot.Whether storage data field, data mode tag slot writes the state of data.Logical address area identification data district writes the logical address of this data field of setting up after the data.When electronic hard disc of the present invention is connected with external data processing device, the electronic hard disc power-up initializing, static RAM is set up between the physical address of the storage block sign of storage block and storage block look-up table one to one.
As shown in Figure 2, each storage block of electronic hard disc of the present invention is divided into data field and status indicator district.The data area stores data, the status indicator district is used to write down the information of the state data memory of corresponding data field, and status indicator is divided into logical address area, data mode tag slot and storage block tag slot.After the logical address area recorded data zone storage data, system sets up the logical address of this data field.The state data memory of data mode tag slot storage data field, when data area stores has data, being designated of data mode tag slot " storage "; When data are not stored in the data field, being designated of data mode tag slot " sky ".Unique identification marking of storage data field, storage block tag slot, promptly, corresponding to each data field in each storage block unique fixing identification marking is arranged all, this identification marking becomes system carries out data read-write operation to the different pieces of information district of storage block sign, so the unique fixing identification marking of each data field is stored to the storage block tag slot.
Be the structure of the storage block that specifies electronic hard disc of the present invention, below concrete storage block in 2,3 in conjunction with the accompanying drawings be that example describes.
Again as shown in Figure 2, in the diagram of present embodiment, be simple and clear structure and the principle of work of describing the storage block of electronic hard disc of the present invention, different numberings is all adopted in each data field at storage block, use alphabetical A1, A2, A3 ... expression, the logical address of logical address area adopts letter b 1, B2, B3 ... expression, letter C 1 is adopted in the storage block tag slot, C2, C3 ... expression, each data field look-up table of corresponding stored piece is set up physical address one by one, above-mentioned alphabetic flag only for ease of the explanation electronic hard disc of the present invention storage block design feature and identify, non-in order to the restriction the present invention.
All there is unique identification marking each data field, this identification marking is stored to the storage block tag slot, for example, when the data area stores of storage block A1 has data, system sets up data field A1 logical address B1, the data mode tag slot is designated " storage ", data are not all stored in the data field of storage block A4, A5, the sign of data mode tag slot is " sky ", logical address area does not write down the unallocated logical address of expression system, and the sign C4 of storage block tag slot, C5 are used for divided data district, tag slot A4, A5.
In conjunction with consulting Fig. 4, when electronic hard disc of the present invention and external data processing device (as computing machine) when being connected, electronic hard disc powers on, carry out initialization, the look-up table one to one between the physical address of the storage block sign of storage block and storage block is set up in static RAM inside, instruct when electronic hard disc of the present invention receives data write operation, data write operation comprises the steps:
1), finds the data field of physical address B 1 correspondence of the storage block A1 that data need write according to the storage block in look-up table sign C1;
2) whether the data mode tag slot sign of judging the data field of storage block A1 is empty, if the data mode tag slot of storage block A1 is " storage ", then carries out next step 3); If the data mode tag slot of storage block A1 is " sky ", carry out step 2.1);
2.1) write the data field of data to storage block A1, the data mode tag slot of storage block A1 is designated " storage ";
2.2) assign logical addresses gives storage block A1, the logical address of storage block A1 and storage block sign are write the primary importance of the data field formation (the data mode tag slot of the data field correspondence of storage block for the data field of " storage " according to going into the principle that afterwards the goes out formed formation of sorting earlier) of look-up table, execution in step 7);
3) data field of storage block A1 has stored data, so, the storage block sign C1 of the data field of storage block A1 is aligned to the least significant end position of the free block formation (the data mode tag slot of the data field correspondence of storage block is arranged formed formation for the storage block of " sky " according to the stacking order of first in first out) of look-up table according to the stacking order of first in first out, in this specific embodiment, the storage block sign C1 of the data field correspondence of storage block A1 is aligned to the back of storage block sign C5 of the data field correspondence of storage block A5;
4) the inquiry look-up table finds the storage block A2 that is positioned at free block formation (also the storage block of unallocated logical address is according to the formed formation of the stacking order of first in first out) primary importance, that is, the data mode tag slot is the formation of the data field of " sky ";
5) data are write the data field that the storage block that comes free block formation primary importance is designated the storage block A4 of C4 correspondence, after data write this data field, correspondingly, the data mode tag slot is designated " storage ";
6) assign logical addresses B4 gives data field A4, logical address B4 and corresponding storage block sign C4 are written in the look-up table primary importance of storage block identification information in the formation of data field, in this specific embodiment, logical address B4, storage block sign C4 are write the front of logical address B2 in the look-up table, storage block sign C2 respectively, simultaneously, the data field physical address corresponding D4 of look-up table corresponding record storage block A4;
7) data write operation is finished.
As shown in Figure 4, after above-mentioned data write operation is finished, when if electronic hard disc of the present invention is in the non-read-write operation state of data, central controller carries out erase operation with the state data memory in the free block formation in the look-up table for empty data field, in this specific embodiment, the data field of erase block memory A1, the logical address B1 of release data field, and the state data memory of storage block A1 sign changed to " sky ", to carry out the next write operation of data.
Correspondence relationship information in the look-up table of electronic hard disc of the present invention between the physical address of the storage space of different storage blocks of storage and electronic hard disc, and stored relation information is a constant volume in the look-up table, in concrete enforcement, storer is divided into the information of different groups and each group of corresponding stored, for example, every group of storage space that comprises 128M, once store the correspondence relationship information of storage stack in the look-up table, when the correspondence relationship information of the storage block that system searches surpasses the memory capacity of this group in the look-up table, central processing unit is according to the information of the storage block that will search, rebulid the correspondence relationship information of all storage blocks of the group at this storage block place, thereby, follow the management method of above-mentioned storage space, the correspondence relationship information of the group of the newly-established look-up table of the same counterweight of electronic hard disc of the present invention manages.
In sum, the management method of the storage space of electronic hard disc of the present invention, the storage block sign by setting up storage block in static RAM inside and the corresponding look-up table of physical address of storage block, and look-up table is divided into data field formation and free block formation two states district according to the distribution state of logical address, thereby, find the storage block sign that need write data according to the sign of the storage block in the look-up table, thereby correspondence finds corresponding data field, if this data area stores has data, the storage block sign that then finding from the free block formation makes number one puts, thereby data are write in the corresponding data field of this storage block sign, simplify the dina base administration of storage block, only the look-up table of setting up by the storage block sign is saved the data manipulation time, promotes the efficiency of management of electronic hard disc.
Electronic hard disc of the present invention passes through central processing unit, ROM (read-only memory), the static random read-write memory, interface controller and memory controller are integrated into the controller of the interior System on Chip/SoC (System OnChip) of sheet as electronic hard disc, and look-up table only need be set up the corresponding informance relation of one group of storage block at every turn, the less resource that takies static RAM just can be carried out data write operation easily, make full use of the resource of the interior System on Chip/SoC of integrated sheet of electronic hard disc of the present invention, be convenient to the integrated level of system, improve the readwrite performance of electronic hard disc when reducing the cost of electronic hard disc, meet the development need of current electronic hard disc.
In addition, the method of the data write operation of electronic hard disc of the present invention, ordering based on the first in first out of simple storage block is carried out erase operation to storage block, the read-write wearing and tearing of balanced flash memories, prolong the life cycle of electronic hard disc, thereby improve the usability of electronic hard disc of the present invention, reduce use cost.

Claims (10)

1. electronic hard disc, comprise central processing unit, interface controller, static RAM, storer, described central processing unit inside is provided with the firmware memory of store electrons disk read-write control data and program, described interface controller is connected with central processing unit and is connected with the data processing equipment of outside and carries out data transmission and read-write, described storer comprises some storage blocks, it is characterized in that: each storage block is divided into data field and status indicator district, the status indicator district comprises the logical address tag slot, the data mode tag slot, the storage block tag slot, whether the data field that each storage block is stored in described data mode tag slot writes the state of data, described logical address area recorded data zone writes the logical address of this data field of setting up after the data, unique identification marking of storage data field, described storage block tag slot; When described electronic hard disc is connected with external data processing device by interface controller, look-up table is one to one set up between the physical address of the storage block sign of storage block tag slot of storage block and storage block in the electronic hard disc initialization in the described static RAM.
2. electronic hard disc according to claim 1 is characterized in that: described interface controller is provided with ide interface.
3. electronic hard disc according to claim 1 is characterized in that: described storer adopts flash memories.
4. electronic hard disc according to claim 3 is characterized in that: the flash memories that described storer adopts is a NAND type flash memories.
5. electronic hard disc according to claim 1 is characterized in that: described look-up table stores is in described static RAM.
6. electronic hard disc according to claim 1 is characterized in that: also comprise the firmware program controller that is connected with central processing unit, described firmware program controller is controlled the required control data and the program of described storer of described firmware memory storage.
7. the data write operation method based on the described electronic hard disc of claim 1 comprises the steps:
1), finds the required storage block that writes of data according to look-up table, the storage data field, data mode tag slot of described each storage block writes the data mode sign of " storage " or " sky " of data, if the data mode of this storage block is designated " storage ", then the storage block sign of this storage block is arranged to the rearmost position of the free block formation of look-up table, execution in step 2); If the data mode of this storage block is designated " sky ", then data are write this storage block, execution in step 3);
2) inquire about look-up table, data are write the storage block of free block formation primary importance in the look-up table;
3) set up the logical address of the storage block write data, this logical address and corresponding storage block sign are write to the primary importance that data mode in the look-up table is designated storage block identification information in the data field formation of " storage ";
4), data write operation is finished.
8. the data write operation method of electronic hard disc according to claim 7 is characterized in that: the described storage block sign that stores data adopts the heap sort method of first in first out to arrange to the free block formation.
9. the method for the data write operation of electronic hard disc according to claim 7, it is characterized in that: when described electronic hard disc was in the non-read-write operation state of data, described central processing unit carried out erase operation in regular turn with the storage block that the data mode of free block formation in the look-up table is designated storage.
10. the method for the data write operation of electronic hard disc according to claim 9, it is characterized in that: described erase operation comprises: wipe the data field that will store the storage block of data, discharge the logical address of this data field, and the state data memory of this storage block sign changed to " sky ", to carry out the data write operation of next time.
CN2006101140688A 2006-10-26 2006-10-26 Electronic hard disk storage room management method Expired - Fee Related CN101169760B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2006101140688A CN101169760B (en) 2006-10-26 2006-10-26 Electronic hard disk storage room management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2006101140688A CN101169760B (en) 2006-10-26 2006-10-26 Electronic hard disk storage room management method

Publications (2)

Publication Number Publication Date
CN101169760A CN101169760A (en) 2008-04-30
CN101169760B true CN101169760B (en) 2011-09-28

Family

ID=39390391

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2006101140688A Expired - Fee Related CN101169760B (en) 2006-10-26 2006-10-26 Electronic hard disk storage room management method

Country Status (1)

Country Link
CN (1) CN101169760B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101719101B (en) * 2010-01-19 2013-09-25 华为技术有限公司 Method and device for reading data of memory
CN103207836B (en) * 2012-01-16 2016-01-20 百度在线网络技术(北京)有限公司 A kind of write method for solid storage hard disk and write device
WO2013107029A1 (en) * 2012-01-19 2013-07-25 华为技术有限公司 Data processing method, device and system based on block storage
CN102930615B (en) * 2012-11-02 2015-03-11 株洲南车时代电气股份有限公司 Method, device and system for recording train operation status data
CN103530738A (en) * 2013-10-25 2014-01-22 国家电网公司 Input virtual terminal management method and system
CN104252429B (en) * 2014-09-03 2017-05-17 英业达科技有限公司 Storage control device and method for calling its address
EP3262518A4 (en) 2015-09-30 2018-04-18 Hewlett-Packard Enterprise Development LP Using a memory controller to manage access to a memory based on a memory initialization state indicator
KR20170058482A (en) * 2015-11-18 2017-05-29 에스케이하이닉스 주식회사 Memory system and operating method of memory system
CN106815154A (en) * 2017-01-16 2017-06-09 联想(北京)有限公司 A kind of method and device of the mark for recognizing hard disk
CN107329703B (en) * 2017-06-30 2020-12-04 武汉日新科技照明有限公司 Dynamic storage method, device and system
CN108959517B (en) * 2018-06-28 2021-06-01 河南思维轨道交通技术研究院有限公司 File management method and device and electronic equipment
CN109491606B (en) * 2018-11-01 2021-10-15 郑州云海信息技术有限公司 Full flash memory space management method, system, equipment and computer medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2632743Y (en) * 2003-06-27 2004-08-11 北京金盛怡科技有限公司 IDE electronic hard disk

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2632743Y (en) * 2003-06-27 2004-08-11 北京金盛怡科技有限公司 IDE electronic hard disk

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张红等.基于单片机的硬盘FAT32文件系统访问的设计与实现.科技经济市场.2006,23,24. *

Also Published As

Publication number Publication date
CN101169760A (en) 2008-04-30

Similar Documents

Publication Publication Date Title
CN101169760B (en) Electronic hard disk storage room management method
US9098395B2 (en) Logical block management method for a flash memory and control circuit storage system using the same
US8407397B2 (en) Block management method for flash memory and controller and storage system using the same
CN101483067B (en) Flash memory data writing method and flash memory controller
CN101788955B (en) Access method of flash data, storage system and control system thereof
CN101625897B (en) Data write-in method, storage system and controller used for quick flash memory
TWI405209B (en) Data management method and flash memory stroage system and controller using the same
CN101556555B (en) Block managing method for flash memory as well as controller and storage system thereof
CN101634967B (en) Block management method for flash memory, storage system and controller
CN111158579B (en) Solid state disk and data access method thereof
US11334493B2 (en) Memory system and operating method thereof
US8074128B2 (en) Block management and replacement method, flash memory storage system and controller using the same
CN101499315B (en) Average abrasion method of flash memory and its controller
CN101571832A (en) Data writing method, quick flashing memory system using same and a controller thereof
US20100030953A1 (en) High-speed solid state storage system having a non-volatile ram for rapidly storing address mapping information
CN101866320B (en) Data management method and flash memory storage system and controller using the same
CN101957797A (en) Logic block management method for flash memory as well as control circuit and storage system thereof
CN101661431B (en) Block management method for flash memory, flash storage system and controller
CN104298615B (en) Method for equalizing swap partition loss of memory
CN101727397B (en) Block management and change method, flash memory storage system and controller thereof
CN101609431B (en) Flash memory apparatus and method for operating the same
CN112230849B (en) Memory control method, memory storage device and memory controller
CN112860193B (en) Sorting instruction processing method, memory control circuit unit and memory device
CN101661432B (en) Flash memory block management method, flash memory storage system and controller
CN101788954B (en) Block management method for flash memory, memory system and controller thereof

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
ASS Succession or assignment of patent right

Owner name: AIGO DIGITAL TECHNOLOGY CO., LTD.

Free format text: FORMER OWNER: BEIJING HUAQI INFORMATION + DIGITAL TECHNOLOGY CO., LTD.

Effective date: 20120628

Free format text: FORMER OWNER: BEIJING HUAQI CODE TECH. LAB. CO., LTD.

Effective date: 20120628

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20120628

Address after: 100080 Beijing, North Fourth Ring Road West, No. 58, International Building, ideal level 11,

Patentee after: Aigo Digital Technology Co., Ltd.

Address before: 100080 Beijing, North Fourth Ring Road West, No. 58, International Building, ideal level 11,

Co-patentee before: Beijing Huaqi Code Tech. Lab. Co., Ltd.

Patentee before: Beijing Huaqi Information & Digital Technology Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110928

Termination date: 20151026

EXPY Termination of patent right or utility model