CN105260139A - Magnetic disk management method and system - Google Patents

Magnetic disk management method and system Download PDF

Info

Publication number
CN105260139A
CN105260139A CN201510679878.7A CN201510679878A CN105260139A CN 105260139 A CN105260139 A CN 105260139A CN 201510679878 A CN201510679878 A CN 201510679878A CN 105260139 A CN105260139 A CN 105260139A
Authority
CN
China
Prior art keywords
data
disk
read
write
entries
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
Application number
CN201510679878.7A
Other languages
Chinese (zh)
Other versions
CN105260139B (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.)
Rockchip Electronics Co Ltd
Original Assignee
Fuzhou Rockchip Electronics 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 Fuzhou Rockchip Electronics Co Ltd filed Critical Fuzhou Rockchip Electronics Co Ltd
Priority to CN201510679878.7A priority Critical patent/CN105260139B/en
Publication of CN105260139A publication Critical patent/CN105260139A/en
Application granted granted Critical
Publication of CN105260139B publication Critical patent/CN105260139B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a magnetic disk management method, which comprises a data writing process and a data reading process, wherein the data writing process and the data reading process are not in any particular order; the data writing process specifically comprises the following steps: opening up a storage region in a memory, and writing data to be written into the storage region; and the data reading process specifically comprises the following steps: when the data is read according to a magnetic disk address, firstly, looking up the storage region, directly reading the data from the storage region if the storage region is found, and otherwise, reading the data from the magnetic disk. The invention also provides a magnetic disk management system which greatly improves the smoothness of the system.

Description

A kind of disk management method and system
Technical field
The present invention relates to a kind of disk management method and system.
Background technology
Not only current Android has some APK, there is the more behavior of reading but also writing in their Run-time scenario simultaneously, find through research, the file of their read and writes substantially all exists consistent relevance, and the data namely write are exactly the data in their subsequent reads.From platform, be difficult to retrain the behavior of these APK.So these APK run on the poor platform of some disk performances, system will be caused not smooth.For the design of these APK, we devise a kind of for the available method of user, improve the fluency of system when running these APK.
Summary of the invention
The technical problem to be solved in the present invention, is to provide a kind of disk management method and system, improves the fluency of system.
One of the present invention program is achieved in that a kind of disk management method, comprises data and writes process and data read procedure, and described data write process and data read procedure order in no particular order:
Described data are write process and are specially: in internal memory, open up a storage area, and the data that write are written to storage area;
Described data read procedure is specially: when reading data according to disk address, first search storage area, if find, then directly from storage area, reads data; Otherwise read data from disk.
Further, described data are write process and are specially further: in internal memory, open up a storage area, open up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, described data entries is stored in data entries storehouse.
Further, described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position.
Further, described data read procedure is specially: when reading data according to disk address, first travels through storage area total information item library, if find, then directly from storage area, reads data, and is marked as read the read flag position in this data entries; Otherwise read data from disk.
Further, also comprise a merging write-back process, wherein read flag position is that the data that the data entries read is corresponding are taken out by regular reading data entries storehouse, and writes data in disk according to the start address of the write disk in described data entries and end address.
Further, described merging write-back process is specially further: regularly read data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
The present invention program's two is achieved in that a kind of disk management system, comprises data writing module and data read through model, and described data writing module and data read through model be order in no particular order:
The data that will write, for opening up a storage area in internal memory, are written to storage area by described data writing module;
Described data read through model, during for reading data according to disk address, first searches storage area, if find, then directly from storage area, reads data; Otherwise read data from disk.
Further, described data writing module is specially further: in internal memory, open up a storage area, opens up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, described data entries is stored in data entries storehouse.
Further, described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position.
Further, described data read through model is specially: when reading data according to disk address, first travels through storage area total information item library, if find, then directly from storage area, reads data, and is marked as read the read flag position in this data entries; Otherwise read data from disk.
Further, also comprise a merging write-back module, for regularly reading data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, and write data in disk according to the start address of the write disk in described data entries and end address.
Further, described merging write-back module is specially further: regularly read data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
Tool of the present invention has the following advantages: a kind of disk management method of the present invention and system, make the behavior of the unreasonable use disk of APK effectively be evaded, greatly improve Consumer's Experience.。
Accompanying drawing explanation
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the theory diagram of a kind of disk management system of the present invention.
Fig. 2 is a kind of disk management method process flow diagram of the present invention.
Embodiment
As shown in Figure 2, inventive disk management method, comprises data and writes process and data read procedure, and described data write process and data read procedure order in no particular order:
Described data are write process and are specially: in internal memory, open up a storage area, open up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, be stored to by described data entries in data entries storehouse, described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position;
Described data read procedure is specially: when reading data according to disk address, first travels through storage area total information item library, if find, then directly from storage area, reads data, and is marked as read the read flag position in this data entries; Otherwise read data from disk.
Merge write-back process, regular reading data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
As shown in Figure 1, inventive disk management system, comprises data writing module and data read through model, and described data writing module and data read through model be order in no particular order:
Described data writing module, opens up a storage area in internal memory, opens up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, be stored to by described data entries in data entries storehouse, described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position.
Described data read through model is specially: when reading data according to disk address, first travels through storage area total information item library, if find, then directly from storage area, reads data, and is marked as read the read flag position in this data entries; Otherwise read data from disk.
Merge write-back module, for regularly reading data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
A kind of embodiment of the present invention is as follows:
(1) when user brings into operation certain APK, system ejects prompting, if user wishes the mechanism used designed by this case, then chooses confirmation on a user interface.
(2) the block device administrative unit of system opens up one piece of region in internal memory, writes the information record of data for preserving this APK, and we are referred to as to write data information units.
Which includes the information content of each write disk of APK, comprise the start address of write disk, the position of end address and data entity place internal memory, also comprises
A read flag position.
(3) when this APK writes data to disk address A, the fast device management unit of system is distributed one piece of internal memory and is assumed to be MA, the data of write is kept in this internal memory, then exists
Create a data entries in write data information units, the reference position of entry is A, and be the size of A+ data till terminating, memory bits then points to MA.
(4) when this APK reads data to disk address B, all entries in block administrative unit traversal write data information units, can not find the record that address is B, then directly
Be submitted to disk drive, go to read from disk.
(5) when this APK reads data to disk address A, all entries in block administrative unit traversal write data information units, find there is the record that Disk Locality is the data of A,
Then from the entry of record, the core position pointed by memory bits, obtains data entity, returns to APK.Meanwhile, by the read flag position mark of A entry
For "read".
(6) merging and write back unit regularly travel through all entries write in data information units, by read flag by the write back data indicated pointed by the data entries of "read",
The first address of disk of write-back, and data entity can obtain from data entries.In addition, if there is disk the first address continuous print situation in the data of write-back,
Then can merge write-back, reduce I/O request quantity.
Its advantage is as follows:
User enables method described in this case, then disk drive is sent in the request of the no longer direct read-write disk produced by this APK of system block device management unit.
Block device administrative unit opens up a block space, preserves the information that this APK writes data.This information includes the logical start address of write data place disk, logic end address, the internal memory at data place, and read flag.Wherein, data place internal memory points to the internal memory that data entity is deposited; Read flag represents whether this destination data was read by APK.
When this APK has the data of write disk, block administrative unit can increase an items for information in write data record unit, and opens up internal memory to preserve data entity.If APK wishes to read data from disk logical address A, whether then block administrative unit is first inquired about from all entries of write data record unit has address to be that the data of A are recorded, if had, be then the entry of A, take out data place memory information from recording address, from the internal memory of this information points, fetch data and return to APK.The read flag of this items for information of A is configured to "read" simultaneously.If not comprising address in all entries of write data record unit is A, then direct to go from disk is read.
(4) block device administrative unit is also set up one and is merged and write-back mechanism, the read flag of regularly inquiry write data record unit, by all read flags for " read " and entry corresponding to write back data to disk.Meanwhile, also check whether these logic beginning and end address by the data place disk of write-back exist continuity, if so, then continuous print part are merged into a disk I/O request, reduce disk occupancy.
Although the foregoing describe the specific embodiment of the present invention; but be familiar with those skilled in the art to be to be understood that; specific embodiment described by us is illustrative; instead of for the restriction to scope of the present invention; those of ordinary skill in the art, in the modification of the equivalence done according to spirit of the present invention and change, should be encompassed in scope that claim of the present invention protects.

Claims (12)

1. a disk management method, is characterized in that: comprise data and write process and data read procedure, and described data write process and data read procedure order in no particular order:
Described data are write process and are specially: in internal memory, open up a storage area, and the data that write are written to storage area;
Described data read procedure is specially: when reading data according to disk address, first search storage area, if find, then directly from storage area, reads data; Otherwise read data from disk.
2. a kind of disk management method according to claim 1, is characterized in that: described data are write process and are specially further: in internal memory, open up a storage area, opens up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, described data entries is stored in data entries storehouse.
3. a kind of disk management method according to claim 2, is characterized in that: described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position.
4. a kind of disk management method according to claim 3, it is characterized in that: described data read procedure is specially: when reading data according to disk address, first travel through storage area total information item library, if find, then directly from storage area, read data, and the read flag position in this data entries is marked as read; Otherwise read data from disk.
5. a kind of disk management method according to claim 4, it is characterized in that: also comprise a merging write-back process, regular reading data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, and write data in disk according to the start address of the write disk in described data entries and end address.
6. a kind of disk management method according to claim 5, it is characterized in that: described merging write-back process is specially further: regularly read data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
7. a disk management system, is characterized in that: comprise data writing module and data read through model, and described data writing module and data read through model be order in no particular order:
The data that will write, for opening up a storage area in internal memory, are written to storage area by described data writing module;
Described data read through model, during for reading data according to disk address, first searches storage area, if find, then directly from storage area, reads data; Otherwise read data from disk.
8. a kind of disk management system according to claim 7, is characterized in that: described data writing module is specially further: in internal memory, open up a storage area, opens up a data temporary storage region, and create data entries storehouse in storage area; The data that will write are written to data temporary storage region, and data message is recorded to data entries, described data entries is stored in data entries storehouse.
9. a kind of disk management system according to claim 8, is characterized in that: described data entries comprises: the position of the write start address of disk, end address, data entity place internal memory and read flag position.
10. a kind of disk management system according to claim 9, it is characterized in that: described data read through model is specially: when reading data according to disk address, first travel through storage area total information item library, if find, then directly from storage area, read data, and the read flag position in this data entries is marked as read; Otherwise read data from disk.
11. a kind of disk management systems according to claim 10, it is characterized in that: also comprise a merging write-back module, for regularly reading data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, and write data in disk according to the start address of the write disk in described data entries and end address.
12. a kind of disk management systems according to claim 11, it is characterized in that: described merging write-back module is specially further: regularly read data entries storehouse, be that the data that the data entries read is corresponding are taken out by wherein read flag position, if the start address in the end address in a data entries and another data entries is continuous, then the data corresponding to these two data entries are merged, write disk afterwards, otherwise according to the start address of the write disk in data entries and end address, data are written in disk successively.
CN201510679878.7A 2015-10-19 2015-10-19 A kind of disk management method and system Active CN105260139B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510679878.7A CN105260139B (en) 2015-10-19 2015-10-19 A kind of disk management method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510679878.7A CN105260139B (en) 2015-10-19 2015-10-19 A kind of disk management method and system

Publications (2)

Publication Number Publication Date
CN105260139A true CN105260139A (en) 2016-01-20
CN105260139B CN105260139B (en) 2018-09-28

Family

ID=55099846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510679878.7A Active CN105260139B (en) 2015-10-19 2015-10-19 A kind of disk management method and system

Country Status (1)

Country Link
CN (1) CN105260139B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145301A (en) * 2016-03-01 2017-09-08 深圳市深信服电子科技有限公司 Data access method and device based on hybrid magnetic disc
CN109558073A (en) * 2018-10-25 2019-04-02 深圳点猫科技有限公司 A kind of disk based on educational system extends the method and electronic equipment in service life
CN109634528A (en) * 2018-12-12 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of rule method, apparatus, equipment and the storage medium of target data
CN110032440A (en) * 2018-01-11 2019-07-19 武汉斗鱼网络科技有限公司 A kind of EMS memory management process and relevant apparatus
CN113064724A (en) * 2021-03-26 2021-07-02 华控清交信息科技(北京)有限公司 Memory allocation management method and device and memory allocation management device
CN113064724B (en) * 2021-03-26 2024-06-07 华控清交信息科技(北京)有限公司 Memory allocation management method and device for memory allocation management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093645A1 (en) * 2001-11-14 2003-05-15 Wong Thomas K. Methods and apparatus for implementing host-based object storage schemes
CN1862476A (en) * 2006-04-19 2006-11-15 华中科技大学 Super large capacity virtual magnetic disk storage system
CN101477492A (en) * 2009-01-21 2009-07-08 华中科技大学 Circulating rewriting flash memory equalization method used for solid state disk

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093645A1 (en) * 2001-11-14 2003-05-15 Wong Thomas K. Methods and apparatus for implementing host-based object storage schemes
CN1862476A (en) * 2006-04-19 2006-11-15 华中科技大学 Super large capacity virtual magnetic disk storage system
CN101477492A (en) * 2009-01-21 2009-07-08 华中科技大学 Circulating rewriting flash memory equalization method used for solid state disk

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145301A (en) * 2016-03-01 2017-09-08 深圳市深信服电子科技有限公司 Data access method and device based on hybrid magnetic disc
CN107145301B (en) * 2016-03-01 2020-09-01 深信服科技股份有限公司 Data access method and device based on hybrid disk
CN110032440A (en) * 2018-01-11 2019-07-19 武汉斗鱼网络科技有限公司 A kind of EMS memory management process and relevant apparatus
CN109558073A (en) * 2018-10-25 2019-04-02 深圳点猫科技有限公司 A kind of disk based on educational system extends the method and electronic equipment in service life
CN109634528A (en) * 2018-12-12 2019-04-16 浪潮(北京)电子信息产业有限公司 A kind of rule method, apparatus, equipment and the storage medium of target data
CN113064724A (en) * 2021-03-26 2021-07-02 华控清交信息科技(北京)有限公司 Memory allocation management method and device and memory allocation management device
CN113064724B (en) * 2021-03-26 2024-06-07 华控清交信息科技(北京)有限公司 Memory allocation management method and device for memory allocation management

Also Published As

Publication number Publication date
CN105260139B (en) 2018-09-28

Similar Documents

Publication Publication Date Title
CN105574104B (en) A kind of LogStructure storage system and its method for writing data based on ObjectStore
CN106548789B (en) Method and apparatus for operating stacked tile type magnetic recording equipment
US9990276B2 (en) Read-write control method for memory, and corresponding memory and server
CN104850358B (en) A kind of magneto-optic electricity mixing storage system and its data acquisition and storage method
US10255235B2 (en) Database storage system based on jukebox and method using the system
CN105242871A (en) Data writing method and apparatus
CN101727395A (en) Flash memory device and management system and method thereof
CN104268088A (en) Vehicle DVR (Digital Video Recorder) hard disk data storage method
US9875030B2 (en) Media write operation
CN105260139A (en) Magnetic disk management method and system
CN102521349A (en) Pre-reading method of files
JP5963726B2 (en) Eliminate file fragmentation in storage media using head movement time
CN101872639B (en) Method and device for storing and retrieving image data on digital hard disk video recorder
KR101374065B1 (en) Data Distinguish Method and Apparatus Using Algorithm for Chip-Level-Parallel Flash Memory
CN103729149A (en) Data storage method
CN103985393A (en) Method and device for parallel management of multi-optical-disc data
JP6052812B2 (en) How to manage, write and read files on tape
CN106469123A (en) A kind of write buffer distribution based on NVDIMM, method for releasing and its device
CN102520885B (en) Data management system for hybrid hard disk
CN109213898A (en) The video retrieval method and device of video monitoring system
SG126863A1 (en) Recording apparatus
US20090027796A1 (en) Information recording device and control method therefor
CN106371950B (en) Method and device for realizing RAID level conversion
CN104281517A (en) Log mode based memory space management method and device
CN105653466A (en) Data storage device and flash memory control method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 350000 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Patentee after: Ruixin Microelectronics Co., Ltd

Address before: 350000 building, No. 89, software Avenue, Gulou District, Fujian, Fuzhou 18, China

Patentee before: Fuzhou Rockchips Electronics Co.,Ltd.