CN101866677A - Memory using method - Google Patents
Memory using method Download PDFInfo
- Publication number
- CN101866677A CN101866677A CN200910135339A CN200910135339A CN101866677A CN 101866677 A CN101866677 A CN 101866677A CN 200910135339 A CN200910135339 A CN 200910135339A CN 200910135339 A CN200910135339 A CN 200910135339A CN 101866677 A CN101866677 A CN 101866677A
- Authority
- CN
- China
- Prior art keywords
- compression
- internal memory
- memory
- type spare
- capacity
- 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.)
- Pending
Links
Images
Landscapes
- Memory System (AREA)
Abstract
The invention relates to a memory using method, which is suitable for a memory system. The memory system is provided with a main memorizer and a primary memory, wherein at least an SWAP exchange zone is prearranged in a compression-type spare area of the main memorizer, and when the main memorizer is not sufficient for use, the prearranged SWAP exchanger zone is provided for saving the compression data. When the SWAP exchange zone is to be sufficient, a new SWAP exchange zone is added to save the compression data, and a secondary memory is provided for saving data until the SWAP exchange zone of the compression-type spare area is not sufficient to use.
Description
Technical field
The invention relates to a kind of method of using internal memory, particularly relevant for a kind of method of using the compression-type internal memory.
Background technology
When physical memory (RAM) capacity of existing memory system runs out, and memory system is when needing more memory source, inactive page will be moved in the good SWAP swapace of a planning in advance on the physical memory, though the SWAP swapace can help the internal memory of memory system increase sub-fraction capacity, still can not be considered as the substitute of internal memory.Tradition SWAP swapace is to be arranged in hard disk (Hard Disk), and its access speed system is slow than physical memory.
Yet, capacity for the less physical memory of memory system tool, but use the mode of SWAP swapace to place under the situation of internal storage data often, in order not reduce the operating performance of memory system itself, in present stage, it is unavoidable settling mode that the operating performance that the physical memory that increases larger capacity increases this memory system seems.
Summary of the invention
In view of this, the present invention discloses a kind of method of using internal memory, can be before the user obtains the physical memory of larger capacity, another kind of flexible solution between between the low operating performance of the origin operation performance of using physical memory and use hard disk SWAP swapace is provided, make it both have the high operating performance of mode of using hard disk SWAP swapace, again can not must the extra physical memory of anxious purchase and increased equipment cost.
According to above-mentioned purpose a kind of method of using internal memory is proposed, be applicable in the memory system, memory system tool primary memory and time internal memory, primary memory is distinguished former use district and the compression-type spare area that fixed capacity is arranged, at least one SWAP exchange area is preset in the compression-type spare area, and the method is at first set an internal memory according to the order of former use district, compression-type spare area and time internal memory and used priority.When the off-capacity in former use district is used, place the default SWAP exchange area of packed data to the compression-type spare area.When the capacity of the default SWAP exchange area of compression-type spare area is about to not enough the use, newly establish another SWAP exchange area to the compression-type spare area, for placing packed data.When the capacity of up-to-date SWAP exchange area is about to not enough the use, continue a newly-increased SWAP exchange area to the compression-type spare area, when the off-capacity of compression-type spare area is used, just change and place data to time internal memory.
So, the present invention has the internal memory temporarily providing room greater than the former capacity of primary memory, and the operating performance that it had also can postpone the opportunity of using time internal memory to exchange as SWAP simultaneously greater than the operating performance of the mode of the SWAP swapace that uses time internal memory.
Description of drawings
For above and other objects of the present invention, feature, advantage and embodiment can be become apparent, being described in detail as follows of appended accompanying drawing:
Fig. 1 illustrates the electronic block diagram of memory system of the present invention in an embodiment;
Fig. 2 illustrates the process flow diagram of server apparatus of the present invention in this embodiment.
[primary clustering symbol description]
100: memory system 146: newly-increased SWAP exchange area
120:LINUX operating system 147: preset
140: primary memory 160: inferior internal memory
142: former use district 162:SWAP swapace
144: compression-type spare area 210-280: step
145: default SWAP exchange area
Embodiment
Below will clearly demonstrate spirit of the present invention with accompanying drawing and detailed description, as the person skilled in the art after understanding embodiments of the invention, when can be by the technology of teachings of the present invention, change and modification, it does not break away from spirit of the present invention and scope.
The present invention is a kind of method of using internal memory, the method is planned in a primary memory 140 a former use district 142 and a compression-type spare area 144, compression-type spare area 144 is provided with SWAP exchange area 145 in advance, when the off-capacity in former use district 142 is deposited temporal data, compress the temporal data in former use district 142 and be positioned over the default SWAP exchange area 145 of compression-type spare area 144, when default SWAP exchange area 145 deficiencies are deposited temporal data, dynamically newly-increased another SWAP exchange area 146 is till the off-capacity of compression-type spare area 144 is used.
In one embodiment of the invention, the method is applicable in the memory system 100, see also shown in Figure 1, Fig. 1 is the electronic block diagram of memory system 100 in an embodiment for this reason, memory system 100 for example is a Thin Client (thin client) or server computer (server), be based on LINUX operating system 120, have a primary memory 140 and (or claim physical memory, as volatile memory, RAM) and an internal memory 160 (or claim second internal memory, as non-voltile memory, Hard Disk or Flash), primary memory 140 pre-defined capacity are (for example: the ratio of 1: 1 or 2: 1 or the like) and cut apart a former use district 142 and a compression-type spare area 144 are arranged.Former use district 142 is primary memory 140 former positions in order to temporal data.Any SWAP exchange area 145 is not planned as yet in advance in compression-type spare area 144 before start.
Among this embodiment, for example primary memory 140 is 512MB, its use district, Central Plains 142 and compression-type spare area 144 are planned to 256MB respectively in advance, compression-type spare area 144 can be compressed to more than 1/2 preceding (being that ratio of compression is 2) of not compression usually for the compression factor of placing packed data, make former use district 142 (256MB) add that compression-type spare area 144 (256MB*2) can be for the capacity that fully uses 768MB, and be the capacity of 512MB greater than primary memory 140.See also Figure 1 and Figure 2, Fig. 2 is the process flow diagram of server apparatus of the present invention in this embodiment, and the detailed step that memory system 100 carries out in this embodiment is as follows:
Step (201) is when memory system 100 starts, the operating system of LINUX set in advance (be not defined as one) more than one SWAP exchange area 145 (for example RAM DISK) to compression-type spare area 144, when a plurality of default SWAP exchange area 145, whether its capacity is not limit consistent, all for example is 8MB in the present embodiment;
Step (202) is set an internal memory according to the order of former use district 142, compression-type spare area 144 and time internal memory 160 and is used priority, makes the operating system of LINUX use priority to deposit temporal data in accordance with above-mentioned internal memory;
When step (203) was carried out operate as normal when memory system 100, the operating system of LINUX used the former use district 142 of primary memory 140 to carry out the access of temporal data;
Whether not enough step (204) utilizes the operating system of LINUX to monitor the capacity in former use district 142, and judge the capacity store data in former use district 142, if carry out step (205), otherwise return step (203);
Step (205) is utilized the default SWAP exchange area 145 of the operating system monitoring compression-type spare area 144 of LINUX, and judges whether default SWAP exchange area 145 will soon deposit packed data inadequately, if carry out step (207), otherwise carry out step (206);
Step (206) allows the operating system of LINUX deposit temporal data when the capacity in former use district 142 inadequately, but when default SWAP exchange area 145 still enough allows the operating system of LINUX deposit packed data, memory system 100 with inactive temporal data in the former use district 142 after the compression of above-mentioned compression factor, deposit to the default SWAP exchange area 145 of compression-type spare area 144, carry out step (203) so that the access of proceeding temporal data between clearancen with the operating system that LINUX is provided is moved in the former use district 142 of primary memory 140.
Step (207) is deposited temporal data once again inadequately when the capacity in former use district 142, and when packed data will also soon be deposited inadequately in the default SWAP exchange area 145 of compression-type spare area 144, newly-increased another SWAP exchange area 146 is to compression-type spare area 144, operating system for LINUX is placed packed data, return step (203), or step (208) is carried out when also soon allowing memory system 100 deposit packed data inadequately in the newly-increased SWAP exchange area 146 of compression-type spare area 144.Wherein whether the capacity of the SWAP exchange area 146 in the step (207) is not limit consistent with default SWAP exchange area 145.
In addition, stored temporal data arrives a preset 147 (for example default SWAP exchange area 145 is 8MB in default SWAP exchange area 145, then preset 147 can for example be 7.5MB) time, the operating system of LINUX assert that just the default SWAP exchange area 145 of compression-type spare area 144 soon deposits packed data inadequately.
When the capacity integral body of step (208) up to compression-type spare area 144 allows LINUX operating system 120 deposit packed data fully inadequately, LINUX operating system 120 is deposited SWAP swapace 162 to inferior internal memory 160 with inactive temporal data in the former use district 142, so that the former use district 142 of primary memory 140 is moved between clearancen for the access of carrying out temporal data.
So, the present invention has the internal memory temporarily providing room greater than the former capacity of primary memory, and the operating performance that it had also can postpone the opportunity of using time internal memory to exchange as SWAP simultaneously greater than the operating performance of the mode of the SWAP swapace that uses time internal memory.
The present invention discloses among as above each embodiment; be not in order to qualification the present invention, any person skilled in the art, without departing from the spirit and scope of the present invention; when can being used for a variety of modifications and variations, so protection scope of the present invention is when being as the criterion with the scope that claims were defined.
Claims (9)
1. a method of using internal memory is applicable in the memory system, it is characterized in that, this memory system tool one primary memory and an internal memory, this primary memory are divided into a former use district and a compression-type spare area, and this method comprises:
A default SWAP exchange area is to this compression-type spare area;
When the off-capacity in this former use district is used, place packed data to the SWAP exchange area that should preset;
When the capacity of this default SWAP exchange area is about to not enough the use, newly establish a SWAP exchange area to this compression-type spare area, for placing packed data; And
When the capacity of this up-to-date SWAP exchange area is about to not enough the use, continue a newly-increased SWAP exchange area to this compression-type spare area, when the off-capacity of this compression-type spare area is used, change and place data to this time internal memory.
2. the method for use internal memory according to claim 1, it is characterized in that, before a default SWAP exchange area to this compression-type spare area, comprise that also setting an internal memory according to the order of this former use district, this compression-type spare area and this time internal memory uses priority.
3. the method for use internal memory according to claim 1, it is characterized in that, when stored temporal data in this this default SWAP exchange area arrives a preset less than the capacity of SWAP exchange area, assert that this SWAP exchange area will soon provide inadequately to deposit packed data.
4. the method for use internal memory according to claim 1 is characterized in that, this memory system is a Thin Client or a server computer.
5. the method for use internal memory according to claim 1 is characterized in that, this memory system tool one LINUX operating system.
6. the method for use internal memory according to claim 1 is characterized in that, this primary memory is a volatile memory, saves as a non-voltile memory in this time.
7. the method for use internal memory according to claim 1 is characterized in that, this former use district and this compression-type spare area be just pre-defined its capacity when this memory system start.
8. the method for use internal memory according to claim 1 is characterized in that, the compression factor of this compression-type spare area is more than 2.
9. the method for use internal memory according to claim 1 is characterized in that, the capacity of those SWAP exchange areas is all fixed capacity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910135339A CN101866677A (en) | 2009-04-20 | 2009-04-20 | Memory using method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN200910135339A CN101866677A (en) | 2009-04-20 | 2009-04-20 | Memory using method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101866677A true CN101866677A (en) | 2010-10-20 |
Family
ID=42958360
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN200910135339A Pending CN101866677A (en) | 2009-04-20 | 2009-04-20 | Memory using method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101866677A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150211A (en) * | 2013-02-07 | 2013-06-12 | 宝龙计算机系统(湖南)有限公司 | Method and device for transferring swap space to UNIX-like operation system |
CN104281528A (en) * | 2013-07-09 | 2015-01-14 | 浙江大华技术股份有限公司 | Data storage method and device |
CN104461737A (en) * | 2014-12-10 | 2015-03-25 | 广东欧珀移动通信有限公司 | Memory management method and device thereof |
CN105653462A (en) * | 2014-11-11 | 2016-06-08 | 杭州海康威视数字技术股份有限公司 | Memory expansion method and device |
-
2009
- 2009-04-20 CN CN200910135339A patent/CN101866677A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103150211A (en) * | 2013-02-07 | 2013-06-12 | 宝龙计算机系统(湖南)有限公司 | Method and device for transferring swap space to UNIX-like operation system |
CN103150211B (en) * | 2013-02-07 | 2016-10-12 | 宝龙计算机系统(湖南)有限公司 | The method and device of one kind UNIX operating system transfer swapace |
CN104281528A (en) * | 2013-07-09 | 2015-01-14 | 浙江大华技术股份有限公司 | Data storage method and device |
CN104281528B (en) * | 2013-07-09 | 2018-02-16 | 浙江大华技术股份有限公司 | A kind of date storage method and device |
CN105653462A (en) * | 2014-11-11 | 2016-06-08 | 杭州海康威视数字技术股份有限公司 | Memory expansion method and device |
CN105653462B (en) * | 2014-11-11 | 2019-06-21 | 杭州海康威视数字技术股份有限公司 | Carry out the method and device of memory expansion |
CN104461737A (en) * | 2014-12-10 | 2015-03-25 | 广东欧珀移动通信有限公司 | Memory management method and device thereof |
CN104461737B (en) * | 2014-12-10 | 2018-01-16 | 广东欧珀移动通信有限公司 | A kind of EMS memory management process and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102955720B (en) | A kind of method improving ext file system stability | |
CN102385554B (en) | Method for optimizing duplicated data deletion system | |
CN101673192B (en) | Method for time-sequence data processing, device and system therefor | |
CN104317800A (en) | Hybrid storage system and method for mass intelligent power utilization data | |
WO2005066783A3 (en) | Coordinated storage management operations in replication environment | |
CN101866677A (en) | Memory using method | |
CN103150276B (en) | Dynamic Configuration and device | |
CN103823640B (en) | A kind of high efficiency storage method of flash storage | |
CN106940625A (en) | The date storage method of intelligent electric meter | |
CN103473343A (en) | File management method, device and terminal | |
CN105378716A (en) | Method and apparatus for conversion of data storage formats | |
CN102565709A (en) | Method and device for monitoring capacity of battery pack | |
CN103530335B (en) | In-stockroom operation method and device of electric power measurement acquisition system | |
CN103455391B (en) | A kind of apparatus and method of data protection of dynamic conditioning | |
CN103116475A (en) | Method of automatic simplifying allocation expansion | |
WO2003083661A8 (en) | Memory-access management method and system for synchronous dynamic random-access memory or the like | |
CN108664208A (en) | File appending write operation method based on FLASH memory and device | |
CN103093157A (en) | Method of permanent protection of cache data of serial attached scsi (SAS) redundant array of independent disks (RAID) card | |
CN103823766B (en) | high-efficiency storage method of Flash memory | |
CN100530110C (en) | System for automatically monitoring memory leakage and memory out-of-range in inlaid system | |
CN107562382A (en) | A kind of disk automatic dynamic expansion method and system based on timed task | |
CN102681650A (en) | Power supply control energy-saving method and corresponding storage system thereof | |
CN109614237A (en) | A kind of method for releasing resource, device, equipment and medium | |
CN105138278A (en) | Method for storing network messages of intelligent substation in bare disk | |
CN107547817A (en) | Video stores and its backup 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 | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20101020 |