CN102023822B - Method and system for clearing cache of host - Google Patents
Method and system for clearing cache of host Download PDFInfo
- Publication number
- CN102023822B CN102023822B CN201010593326A CN201010593326A CN102023822B CN 102023822 B CN102023822 B CN 102023822B CN 201010593326 A CN201010593326 A CN 201010593326A CN 201010593326 A CN201010593326 A CN 201010593326A CN 102023822 B CN102023822 B CN 102023822B
- Authority
- CN
- China
- Prior art keywords
- main frame
- storage expansion
- expansion equipment
- buffer memory
- card
- 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.)
- Active
Links
Images
Abstract
A method for clearing cache of a host comprises the following steps: the host initializes a storage expansion device, wherein the storage expansion device comprises a storage module and a function extension module capable of realizing specific functions; the host sends a writing operation command to the storage expansion device; the storage expansion device judges whether address in the writing operation command is the address of an interface file, if so, the storage expansion device executes the writing operation command and replies a response error signal to the host; the host initializes the storage expansion device again after receiving the response error signal, and updates the existing cache in the host; and the host sends a reading operation command to the storage expansion device to read result of a reading operation. The method can reduce time and efficiency for clearing the cache by the host, and also can improve the speed of executing read-write operations on the storage expansion device by the host. Additionally, a system for clearing the cache of the host is also provided.
Description
[technical field]
The present invention relates to caching technology, relate in particular to a kind of method and system the clear buffer memory of main frame.
[background technology]
Buffer memory is meant the temporary file exchange area.Main frame is placed on the most frequently used file in the buffer memory temporarily, when main frame will read data, at first from buffer memory, searches, and finds and then reads and give host process immediately; If do not find, just from memory device, read and deliver to host process with slow relatively speed, simultaneously the data block at this data place is called in the buffer memory, thereby after making reading from buffer memory of these data carried out, needn't from memory device, call again.
Memory device is to be used for the device of stored programme and data, is widely used in all trades and professions.Because the ubiquity that memory device is used; Generally can in memory device, embed the applicability that some other function expanding modules increase memory device; As in memory device, embedding smart card module, GPS module or WiFi module etc.; Here, the memory device that being referred to as these embeddings has function expanding module is the storage expansion equipment, and said storage expansion equipment is except having memory module; Also has the function expanding module that to realize specific function; These storage expansion equipments can be created one or several specific interface documents and are mapped as function expanding module, and when main frame and said storage expansion equipment connected, said interface document was set up a logical channel as interface and main frame.Main frame sends read write command to being mapped as the function expanding module of interface document or from this function expanding module, reading information specific in the storage expansion equipment through the read-write mechanism of file system.
Main frame realize the read-write operation to function expanding module in the storage expansion equipment, and order of every execution all needs the reading and writing interface document at least one time through the interface document in the said storage expansion equipment of operation.Because after said storage expansion equipment carried out write operation, the data in the storage expansion equipment had renewal, need clear buffer memory, soon newly write the Data Update of storing in the expansion equipment in buffer memory.Traditional method to the clear buffer memory of main frame is that main frame comes clear buffer memory through the alternative document in the circulation read-write storage expansion equipment, and the efficient of the clear buffer memory of this method is not high, has reduced the read-write operation speed to said storage expansion equipment yet.
[summary of the invention]
Based on this, be necessary to provide a kind of method to the clear buffer memory of main frame that can improve the efficient of the clear buffer memory of main frame.
A kind of method to the clear buffer memory of main frame may further comprise the steps:
Main frame initialization storage expansion equipment, said storage expansion equipment comprises memory module and can realize the function expanding module of specific function;
Main frame sends the write operation order to the storage expansion equipment;
The storage expansion equipment judges whether the address in the said write operation order is the address at interface document place, if then carry out the write operation order, to host response response rub-out signal;
Main frame reinitializes the storage expansion equipment after receiving said response rub-out signal, upgrades existing buffer memory in the main frame;
Main frame sends the read operation order to the storage expansion equipment, reads the result of write operation.
Preferably, said method also comprises: if when the address in the write operation order that the storage expansion equipment is received is not the address at interface document place, then to the host response correct signal.
Preferably, said main frame is mobile phone, computer, PDA, digital camera or card-reading apparatus.
Preferably, said storage expansion equipment is for embedding portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card that function expanding module is arranged.
Preferably, said function expanding module is smart card module, GPS module or WiFi module.
In addition, also be necessary to provide a kind of system to the clear buffer memory of main frame that can improve the efficient of the clear buffer memory of main frame.
A kind of system to the clear buffer memory of main frame, said system comprises:
Main frame is used for initialization storage expansion equipment, and the storage expansion equipment is sent the write operation order;
The storage expansion equipment; Be used for judging whether the address of said write operation order is the address at interface document place, if then carry out the write operation order; And to host response response rub-out signal, said storage expansion equipment comprises memory module and can realize the function expanding module of specific function;
Said main frame reinitializes the storage expansion equipment after receiving said response rub-out signal, upgrades existing buffer memory in the main frame, and said storage expansion equipment is sent the read operation order, reads the result of write operation.
Preferably, if when the address of the write operation that said storage expansion equipment also is used for receiving order is not the address at interface document place, then to the host response correct signal.
Preferably, said main frame is mobile phone, computer, PDA, data camera or card-reading apparatus.
Preferably, said storage expansion equipment is for embedding portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card that function expanding module is arranged.
Preferably, said function expanding module is smart card module, GPS module or WiFi module.
Above-mentioned method and system to the clear buffer memory of main frame; At main frame the storage expansion equipment is carried out in the process of write operation; When the address in the order of storage expansion equipment judgement write operation was the address at interface document place, deliberately to host response response rub-out signal, main frame judged that then storing expansion equipment exists defective after receiving this response rub-out signal; So reinitialize the storage expansion equipment, upgrade existing buffer memory in the main frame.Owing to need not the reading and writing of files that circulates, can reduce the time of main frame clear buffer memory in the process of operation store equipment, improved the efficient of the clear buffer memory of main frame, accelerated operating speed simultaneously to the storage expansion equipment.
[description of drawings]
Fig. 1 is to the process flow diagram of the method for the clear buffer memory of main frame among the embodiment;
Fig. 2 is to the structural representation of the system of the clear buffer memory of main frame among the embodiment.
[embodiment]
Fig. 1 shows the method flow to the clear buffer memory of main frame among the embodiment, may further comprise the steps:
Step S102, main frame initialization storage expansion equipment.
Step S104, main frame sends the write operation order to the storage expansion equipment.Main frame sends the write operation order to connected storage expansion equipment, and the interface IP address of storage expansion equipment is carried out write operation, thereby data are write in the storage expansion equipment.
Step S106, the storage expansion equipment judges whether the address in the write operation order is the address at interface document place, if then get into step S108, otherwise get into step S116.
Step S108, the storage expansion equipment is carried out the write operation order, to host response response rub-out signal.When the address of storage expansion equipment in judging the write operation order is the address at interface document place, promptly to data be write in the function expanding module of storage expansion equipment.
Step S110, main frame reinitialize the storage expansion equipment, upgrade existing buffer memory in the main frame.Main frame is being received the response rub-out signal of storage expansion equipment to its transmission, judges that then there is defective in the storage expansion equipment, thus initialization storage expansion equipment, and upgrade existing buffer memory in the main frame.
Step S112, main frame sends the read operation order to the storage expansion equipment, reads the result of write operation.Write the data of storage expansion equipment before main frame reads, and will store the data block that data updated belongs in the expansion equipment and call in the buffer memory, like this, can directly from buffer memory, carry out reading then of these data in next time.
Step S114 is to the host response correct signal.When the address in the order of storage expansion equipment judgement write operation is not the address at interface document place, then be invalid operational order, then to the host response correct signal, main frame need not to reinitialize the storage expansion equipment, does not then upgrade the buffer memory in the main frame.
Owing to when main frame is the address at interface document place to the address in the write operation order of storage expansion equipment, deliberately, make main frame reinitialize the storage expansion equipment, upgrade existing buffer memory in the main frame to host response response rub-out signal.Like this, can reduce the time of main frame clear buffer memory in the process of operation store expansion equipment, improve the efficient of the clear buffer memory of main frame, accelerate operating speed simultaneously the storage expansion equipment.
Should be noted that; Above-mentioned main frame can be mobile phone, computer, PDA, digital camera or card-reading apparatus etc.; The storage expansion equipment can be to embed portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card etc. of function expanding module are arranged, but is not limited to this.Wherein, function expanding module can be smart card module, GPS module or WiFi module etc.
Fig. 2 shows among the embodiment system to the clear buffer memory of main frame, and this system comprises main frame 10 and storage expansion equipment 20, wherein:
Main frame 10 is used for initialization storage expansion equipment 20, and the storage expansion equipment is sent the write operation order.
Storage expansion equipment 20 is connected with main frame 10, is used for judging whether the address of this write operation order is the address at interface document place, if then carry out the write operation order, to host response response rub-out signal.
Main frame 10 reinitializes storage expansion equipment 20 after receiving the response rub-out signal, upgrade existing buffer memory in the main frame 10, and storage expansion equipment 20 is sent the read operation order, reads the result of write operation.
As shown in Figure 2; Storage expansion equipment 20 is connected with main frame 10, receives the write operation order that main frame 10 sends, and judges whether the address in this write operation order is the address at interface document place; If; Then carry out the write operation order, data are write in the storage expansion equipment 20, reply the response rub-out signal to main frame 10 then.
Main frame 10 judge that there is defective in storage expansion equipment 20, thereby initialization storage expansion equipment 20 is upgraded existing buffer memory in the main frame 10 after receiving the response rub-out signal.Main frame 10 sends the read operation order to storage expansion equipment 20; Write the data of storage expansion equipment 20 before reading; And the data block that will store data new in the expansion equipment 20 place calls in the buffer memory, like this, in next time reading then of these data directly carried out from buffer memory.
When the address in the write operation order that storage expansion equipment 20 judgement main frames 10 send is not the address at interface document place; Be that the write operation order is not effective operational order; Then reply correct signal to main frame 10; Main frame 10 need not to reinitialize storage expansion equipment 20 after receiving correct signal, does not upgrade existing buffer memory in the main frame 10.
Main frame 10 can be mobile phone, computer, PDA, digital camera or card-reading apparatus, and memory device 20 can be to embed portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card etc. of function expanding module are arranged, but is not limited to this.Wherein, said function expanding module is smart card module, GPS module or WiFi module.
Above-mentioned system to the clear buffer memory of main frame; When main frame is the address at interface document place to the address in the write operation order of storage expansion equipment; Deliberately, make main frame reinitialize the storage expansion equipment, and upgrade existing buffer memory in the main frame to host response response rub-out signal.Like this, can reduce the time of main frame clear buffer memory in the process of operation store expansion equipment, improve the efficient of the clear buffer memory of main frame, accelerate operating speed simultaneously the storage expansion equipment.
The above embodiment has only expressed several kinds of embodiments of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art under the prerequisite that does not break away from the present invention's design, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection domain of patent of the present invention should be as the criterion with accompanying claims.
Claims (10)
1. method to the clear buffer memory of main frame may further comprise the steps:
Main frame initialization storage expansion equipment, said storage expansion equipment comprises memory module and can realize the function expanding module of specific function;
Main frame sends the write operation order to the storage expansion equipment;
The storage expansion equipment judges whether the address in the said write operation order is the address at interface document place, if then carry out the write operation order, to host response response rub-out signal;
Main frame reinitializes the storage expansion equipment after receiving said response rub-out signal, upgrades existing buffer memory in the main frame;
Main frame sends the read operation order to the storage expansion equipment, reads the result of write operation.
2. the method to the clear buffer memory of main frame according to claim 1 is characterized in that, said method also comprises: if the address in the write operation order that the storage expansion equipment is received is not the address at interface document place, then to the host response correct signal.
3. the method to the clear buffer memory of main frame according to claim 1 is characterized in that, said main frame is mobile phone, computer, PDA, digital camera or card-reading apparatus.
4. the method to the clear buffer memory of main frame according to claim 1 is characterized in that, said storage expansion equipment is for embedding portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card that function expanding module is arranged.
5. the method to the clear buffer memory of main frame according to claim 4 is characterized in that, said function expanding module is smart card module, GPS module or WiFi module.
6. the system to the clear buffer memory of main frame is characterized in that, said system comprises:
Main frame is used for initialization storage expansion equipment, and the storage expansion equipment is sent the write operation order;
The storage expansion equipment; Be used for judging whether the address of said write operation order is the address at interface document place, if then carry out the write operation order; And to host response response rub-out signal, said storage expansion equipment comprises memory module and can realize the function expanding module of specific function;
Said main frame reinitializes the storage expansion equipment after receiving said response rub-out signal, upgrades existing buffer memory in the main frame, and said storage expansion equipment is sent the read operation order, reads the result of write operation.
7. the system to the clear buffer memory of main frame according to claim 6 is characterized in that, if when the address of the write operation that said storage expansion equipment also is used for receiving order is not the address at interface document place, then to the host response correct signal.
8. the system to the clear buffer memory of main frame according to claim 6 is characterized in that, said main frame is mobile phone, computer, PDA, digital camera or card-reading apparatus.
9. the system to the clear buffer memory of main frame according to claim 6 is characterized in that, said storage expansion equipment is for embedding portable hard drive, USB flash disk, mmc card, Micro SD card, Mini SD card, CF card or the SD card that function expanding module is arranged.
10. the system to the clear buffer memory of main frame according to claim 9 is characterized in that, said function expanding module is smart card module, GPS module or WiFi module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010593326A CN102023822B (en) | 2010-12-17 | 2010-12-17 | Method and system for clearing cache of host |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010593326A CN102023822B (en) | 2010-12-17 | 2010-12-17 | Method and system for clearing cache of host |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102023822A CN102023822A (en) | 2011-04-20 |
CN102023822B true CN102023822B (en) | 2012-08-29 |
Family
ID=43865156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010593326A Active CN102023822B (en) | 2010-12-17 | 2010-12-17 | Method and system for clearing cache of host |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102023822B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102866864B (en) * | 2012-08-24 | 2016-03-02 | 深圳市江波龙电子有限公司 | Realize method and the memory device of One Time Programmable storage |
CN105005519B (en) * | 2014-04-17 | 2019-06-18 | 腾讯科技(深圳)有限公司 | The method and apparatus for removing client-cache |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266785B1 (en) * | 1998-09-01 | 2001-07-24 | Ncr Corporation | File system filter driver apparatus and method |
CN101526887A (en) * | 2009-04-20 | 2009-09-09 | 成都市华为赛门铁克科技有限公司 | Method for writing data into hard disc, device and system thereof |
-
2010
- 2010-12-17 CN CN201010593326A patent/CN102023822B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6266785B1 (en) * | 1998-09-01 | 2001-07-24 | Ncr Corporation | File system filter driver apparatus and method |
CN101526887A (en) * | 2009-04-20 | 2009-09-09 | 成都市华为赛门铁克科技有限公司 | Method for writing data into hard disc, device and system thereof |
Also Published As
Publication number | Publication date |
---|---|
CN102023822A (en) | 2011-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7515500B2 (en) | Memory device performance enhancement through pre-erase mechanism | |
EP2732374B1 (en) | Mobile memory cache read optimization | |
KR102104288B1 (en) | Methods for accessing stored data and associated controllers, devices, hosts and systems | |
CN100481040C (en) | Method for implementing real-time hot-plug of USB memory under TV embedded Linux system | |
US20130311712A1 (en) | Control apparatus, storage device, and storage control method | |
US20150261683A1 (en) | Cache memory control in electronic device | |
US20100191901A1 (en) | Non-volatile storage device, host device, non-volatile storage system, data recording method, and program | |
US8615624B2 (en) | Methods, apparatuses, and computer program products for enhancing memory erase functionality | |
US9003107B2 (en) | Method for adjusting storage space of partition of embedded multimedia card and terminal | |
KR20140093505A (en) | Method and apparatus for extending memory in terminal | |
KR20170010810A (en) | Method, device and user equipment for reading/writing data in nand flash | |
US20090313420A1 (en) | Method for saving an address map in a memory device | |
US20100005265A1 (en) | Method for isolating objects in memory region | |
CN102023822B (en) | Method and system for clearing cache of host | |
CN101795328A (en) | Set-card separation mobile phone and method for realizing card initialization | |
US9483195B2 (en) | Response reading method and data transmission system | |
CN201707662U (en) | Embedded type equipment supporting JAVA technology | |
CN102722378A (en) | Non-intelligent mobile phone and method for upgrading system program thereof | |
CN101621861A (en) | Method and device for processing command with telecommunication intelligent application card | |
US20100180282A1 (en) | Computer system and method for installing driver program in the computer system | |
CN110990832A (en) | Data protection method and related storage device | |
JP2004185584A (en) | Card adaptor control device, usb controller and card adaptor | |
CN117873515A (en) | Firmware updating method, device and equipment | |
CN102662819B (en) | Node addition and configuration automatic monitoring method and embedded system | |
CN113835622A (en) | Storage device processing method, host device, storage device and system |
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 | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee after: Shenzhen jiangbolong electronic Limited by Share Ltd Address before: 518057 A, B, C, D, E, F1, 8 Building, Financial Services Technology Innovation Base, No. 8 Kefa Road, Nanshan District, Shenzhen City, Guangdong Province Patentee before: Shenzhen jiangbolong Electronic Co., Ltd. |