CN102819497B - A kind of memory allocation method, Apparatus and system - Google Patents

A kind of memory allocation method, Apparatus and system Download PDF

Info

Publication number
CN102819497B
CN102819497B CN201210176906.XA CN201210176906A CN102819497B CN 102819497 B CN102819497 B CN 102819497B CN 201210176906 A CN201210176906 A CN 201210176906A CN 102819497 B CN102819497 B CN 102819497B
Authority
CN
China
Prior art keywords
memory
thread
page
user space
kernel state
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
CN201210176906.XA
Other languages
Chinese (zh)
Other versions
CN102819497A (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.)
Tsinghua University
Huawei Technologies Co Ltd
Original Assignee
Tsinghua University
Huawei Technologies 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 Tsinghua University, Huawei Technologies Co Ltd filed Critical Tsinghua University
Priority to CN201210176906.XA priority Critical patent/CN102819497B/en
Publication of CN102819497A publication Critical patent/CN102819497A/en
Application granted granted Critical
Publication of CN102819497B publication Critical patent/CN102819497B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention discloses a kind of memory allocation method, Apparatus and system, relate to computer realm, in order to avoid operating system and application program to the competition of high-speed cache to a certain extent, thus improve system performance and data-handling efficiency.Described memory allocation method comprises: when a thread needs storage allocation, identify the type of described thread; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction; If described thread is User space thread, be then this User space thread storage allocation from described User space memory field; If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field.

Description

A kind of memory allocation method, Apparatus and system
Technical field
The present invention relates to computer realm, particularly relate to a kind of memory allocation method, Apparatus and system.
Background technology
In computer organization, processor and storer are the assemblies of wherein two cores.Processor is mainly used in computing, and storer is mainly used in storing data.The hierarchical classification of storer is a kind of tissue in pyramid structure, the hardware cache memories that pinnacle of a pagoda is cost intensive, but the less access speed of capacity is exceedingly fast, centre also exists that cost is controlled, the comparatively faster internal memory of memory access speed, but column foot is with low cost, that the very large access speed of capacity is very slow hardware disk.
Current, the arithmetic speed of computer CPU will far away higher than the speed of access data from internal memory, and hardware cache memories is between CPU and internal memory, its memory access speed falls between, as L1 (one-level) high-speed cache in current main-stream server, L2 (secondary) high-speed cache, some even has L3 (three grades) high-speed cache.In general, LLC (Last Level Cache, afterbody high-speed cache) uses for all logic CPU on present physical CPU share.
When CPU process data, first in cache memory, search required data, if there are this data, be called cache hit, then directly return, carry out data processing by CPU; If this data processing is not present in high-speed cache, be called cache miss, then access memory searches desired data, then returns CPU and carry out data processing, and by this data buffer storage in cache memory.
When new data need to be cached to cache memory, the data needs that must have been friends in the past are replaced away.The data being replaced out are likely User space data, are also likely kernel state data.In the process that data are replaced, inventor finds under limited resource, and operating system and application program must be competed to high-speed cache, thus cause system performance to decline.
Summary of the invention
Embodiments of the invention provide a kind of memory allocation method, Apparatus and system, in order to avoid operating system and application program to the competition of high-speed cache to a certain extent, thus improve system performance and data-handling efficiency.
Embodiments of the invention adopt following technical scheme:
On the one hand, the invention provides a kind of memory allocation method, comprising:
When a thread needs storage allocation, identify the type of described thread; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
If described thread is User space thread, be then this User space thread storage allocation from described User space memory field;
If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field.
Another aspect, present invention also offers a kind of memory allocation method, comprising:
Be kernel code storage allocation from kernel state memory field, and kernel code is copied in the internal memory of distribution; Be global data storage allocation from User space memory field, and global data is copied in the internal memory of distribution; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
Static amendment is about kernel code and the virtual memory of global data and the mapping relations of physical memory.
Another aspect, present invention also offers a kind of Memory Allocation device, comprising:
First recognition unit, for when a thread needs storage allocation, identifies the type of described thread, and when identifying described thread and being User space thread, trigger the first allocation units, when identifying described thread and being kernel state thread, trigger the second allocation units; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
Described first allocation units, for being this User space thread storage allocation from described User space memory field;
Described second allocation units, for being this kernel state thread storage allocation from described kernel state memory field.
Another aspect, present invention also offers a kind of Memory Allocation device, comprising:
First allocation units, for being kernel code storage allocation from kernel state memory field, and copy in the internal memory of distribution by kernel code;
Second allocation units, for being global data storage allocation from User space memory field, and copy in the internal memory of distribution by global data;
Amendment map unit, for static state amendment about kernel code and the virtual memory of global data and the mapping relations of physical memory; Wherein,
Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
On the one hand, present invention also offers a kind of internal memory, described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
On the one hand, present invention also offers a kind of computer system, comprising:
Bus;
The processor be connected with described bus;
The internal memory be connected with described bus;
Wherein, described processor comprises any one Memory Allocation device above-mentioned; Above-mentioned internal memory is saved as in described; There are mapping relations between described buffer memory and described internal memory.
On the other hand, present invention also offers a kind of computer system, comprising:
Bus;
The processor be connected with described bus;
The internal memory be connected with described bus;
Wherein, described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction; Described processor, by described bus, calls the code stored in described internal memory, for: when a thread needs storage allocation, identify the type of described thread; If described thread is User space thread, be then this User space thread storage allocation from described User space memory field; If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field.
Memory allocation method provided by the invention, Apparatus and system, by internal memory being divided into User space memory field and kernel state memory field, and being User space thread storage allocation from User space memory field, is kernel state thread storage allocation from kernel state memory field; Owing to there are fixing mapping relations between internal memory and buffer memory, high-speed cache is divided into regard to corresponding the two parts being respectively used to store User space data and kernel state data like this, thus avoid operating system and application program to the competition of high-speed cache to a certain extent, thus improve system performance and data-handling efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
A kind of memory allocation method process flow diagram that Fig. 1 provides for the embodiment of the present invention;
Fig. 2 is the mapping relations of internal memory physical address and buffer address;
The another kind of memory allocation method process flow diagram that Fig. 3 provides for the embodiment of the present invention;
Another memory allocation method process flow diagram that Fig. 4 provides for the embodiment of the present invention;
Fig. 5 is chained list schematic diagram;
Another memory allocation method process flow diagram that Fig. 6 provides for the embodiment of the present invention;
A kind of Memory Allocation device schematic diagram that Fig. 7 provides for the embodiment of the present invention;
The another kind of Memory Allocation device schematic diagram that Fig. 8 provides for the embodiment of the present invention;
The schematic diagram of a kind of computer system that Fig. 9 provides for the embodiment of the present invention;
The schematic diagram of the another kind of computer system that Figure 10 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of memory allocation method, comprising:
S101, when a thread needs storage allocation, identify the type of described thread.
Wherein, the type of thread comprises: User space thread and kernel state thread; Under normal circumstances, User space thread is that user application provides the thread created during service, mainly at User space space motion, and kernel state thread, be that operating system nucleus provides the thread created during service.
In addition, described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
Preferably, the described internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field to comprise: color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits.
Below with reference to the physical address of the internal memory shown in Fig. 2 and the mapping relations of buffer address, briefly introduce page and color bits.The physical address of internal memory comprises: physical memory page number and page bias internal amount; Wherein, physical memory page number is used for index current physical address and belongs to which physical memory page, and page bias internal amount is for marking the side-play amount of current physical address in present physical page.Buffer address comprises: buffer tag, buffer memory group # and group bias internal amount; Wherein, buffer memory group # is used for index current cache address and belongs to which buffer memory group, and group bias internal amount is for marking the side-play amount of current cache address in current cache group.
There are intrinsic mapping relations because hardware determines between physical memory and buffer memory, therefore the physical address of data in internal memory just determines data buffer memory group # and group bias internal amount in the buffer.The position that a high position for page bias internal amount and the low level of buffer memory group # overlap is the uncontrollable position of software; The position that the low level of physical memory page number and a high position for buffer memory group # overlap, is software-controllable position, is called that page color bits.So have the physical memory page that same page color bits and share the set of same buffer memory group, this buffer memory group set comprises at least one buffer memory group.Such foundation page color bits and internal memory is divided into multiple memory group, and the page of same memory group is corresponding with the same buffer memory group set in buffer memory.
In above-mentioned preferred version, color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Another from the physical address of above-mentioned internal memory and the mapping relations of buffer address, buffer memory is also corresponding is in fact divided into two classes, can be called User space buffer area and kernel state buffer area, and all include the set of multiple buffer memory group in two class buffer areas; Wherein, User space buffer area is for User space, and kernel state buffer area is for kernel state.
Optionally, can also comprise before the type of the described thread of described identification: when described thread needs storage allocation, if operating system generation page fault, then for the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier, the concrete user memory that can arrange in call function needed for described thread distributes behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread.
Now, the type of the described thread of the identification in S101 is specially: identify whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier; If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
Wherein, above-mentioned Memory Allocation behavior is the conventional idiom of computer realm, and so-called Memory Allocation behavior refers to by processor to be the behavior of thread storage allocation, and Memory Allocation behavior can be triggered by User space thread, or, can be triggered by kernel state thread.
If identifying described thread in S101 is User space thread, then carry out S102; If identifying described thread in S101 is kernel state thread, then carry out S103.
Further, the combination in any of any one or the following methods that can also to utilize before S102 or S103 in following methods is being performed, to obtain the scope of User space memory field and kernel state memory field:
Method one, when os starting, to obtain in described os starting parameter the group number of the memory group of set described User space memory field and/or kernel state memory field.
Wherein, because the group number summation of all memory group is certain, if so get the group number of the memory group that User space memory field comprises, the group number of the memory group that kernel state memory field comprises just can be obtained accordingly; If get the group number of the memory group that kernel state memory field comprises equally, the group number of the memory group that User space memory field comprises just can be obtained accordingly; Certainly, the group number obtaining the memory group that two memory fields comprise respectively is also fine.
If adopt in this way, so had better not change again in operating system.
Method two, in operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system.
Example, under linux operating system, the kernel interactive interface of operating system can be procfs interface or sysfs interface, and user can revise the group number of the memory group that at least one memory field comprises in operating system process.
Method three, in operating system process, obtain the group number of the memory group of described User space memory field that the system call interfaces that provided by described operating system arranged and/or kernel state memory field.
As adopted in this way, user can revise the group number of the memory group that at least one memory field comprises in operating system process.
S102, be this User space thread storage allocation from described User space memory field.
Optionally, according to the group number of the memory group that User space memory field comprises, be User space thread storage allocation in the scope of User space memory field.
S103, be this kernel state thread storage allocation from described kernel state memory field.
Optionally, according to the group number of the memory group that kernel state memory field comprises, be kernel state thread storage allocation in the scope of kernel state memory field.
Memory allocation method provided by the invention, by internal memory being divided into User space memory field and kernel state memory field, and being User space thread storage allocation from User space memory field, is kernel state thread storage allocation from kernel state memory field; Owing to there are fixing mapping relations between internal memory and buffer memory, high-speed cache is divided into regard to corresponding the two parts being respectively used to store User space data and kernel state data like this, thus operating system and application program can be avoided to a certain extent to the competition of high-speed cache, thus improve system performance and data-handling efficiency.
Based on the embodiment of any one memory allocation method above-mentioned, as shown in Figure 3, when a thread needs storage allocation, can also further comprise:
S100, judge whether to be divided into described thread storage allocation according to internal memory;
If not, even judged result is can not be divided into described thread storage allocation according to internal memory, then carry out step S104;
If so, even judged result is can be divided into described thread storage allocation according to internal memory, be then divided into described thread storage allocation according to internal memory, namely turns to S101 to complete the distribution of internal memory.
S104, according to operating system acquiescence memory allocation method be described thread storage allocation; Example, the memory allocation method of operating system acquiescence can be buddy algorithm memory allocation method.
The embodiment of the present invention additionally provides a kind of memory allocation method based on every CPU chained list, and as shown in Figure 4, described method comprises:
S401, when thread needs from every CPU chained list storage allocation, identify the type of described thread.
First the structure of chained list is introduced, example as shown in Figure 5, chained list comprises multiple node, stores the start address of one section of memory storage space, the size (or termination address of this memory storage space) of this memory storage space and the entry address of next node in each node.
In embodiments of the present invention, described every CPU chained list is divided into user chain table and kernel chained list; Wherein, the structure of user chain table and kernel chained list all can with reference to the structure in Fig. 5.The physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table.The division of internal memory still with reference to above-described embodiment, can not add at this and repeats.
Similar with S101, optionally, can also comprise before the type of the described thread of described identification: when described thread needs storage allocation, if operating system generation page fault, then for the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread.
Now, identify in S401 that the process of the type of thread can adopt the mode identical with S401: identify whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier; If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
To identify described thread in S401 be User space thread, perform S402; When to identify described thread be kernel state thread to S401, perform S405.
S402, judge whether user chain table exists idle physical memory page;
If user chain table exists idle physical memory page, then carry out step S403;
If described user chain table does not exist idle physical memory page, then carry out step S404.
S403, be described thread storage allocation from described user chain table.
Concrete, from the free physical page being in User space memory field pointed by described user chain table interior joint, be described thread storage allocation.
S404, be the physical memory page that described user chain table distributes predetermined number from described User space memory field, then be described User space thread storage allocation from described user chain table;
S405, judge whether kernel chained list exists idle physical memory page.
If described kernel chained list exists idle physical memory page, now carry out step S406;
If described kernel chained list does not exist idle physical memory page, now carry out step S407.
S406, be described thread storage allocation from described kernel chained list.
Concrete, from the free physical page being in kernel state memory field pointed by described kernel chained list interior joint, be described thread storage allocation.
S407, be the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
Further, in above-mentioned S404, be after described user chain table distributes the physical memory page of predetermined number from described User space memory field, can also comprise: in the page descriptor of the physical memory page distributed for described user chain table, the first mark is set, for identifying present physical page for User space thread; Example, in the member variable flag of the page descriptor structure of present physical page, the first mark is set;
Same, in above-mentioned S407, be after described kernel chained list distributes the physical memory page of predetermined number from described kernel state memory field, can also comprise: in the page descriptor of the physical memory page distributed for described kernel chained list, the second mark is set, for identifying present physical page for kernel state thread; Example, in the member variable flag of the page descriptor structure of present physical page, the second mark is set.
Further, above-mentioned memory allocation method can also comprise: when physical memory page discharges, remove mark (the first mark or the second mark) set in the page descriptor of described physical memory page, and this physical memory page is joined in the free page chained list of operating system default memory distribution method.Specific as follows, when physical memory page discharges, judge whether be provided with and mark in page descriptor, if be provided with mark, remove this mark, and the physical memory page removing mark is joined in the free page chained list of operating system default memory distribution method.Wherein, operating system default memory distribution method example can be buddy algorithm memory allocation method; The free page chained list of operating system default memory distribution method, example can be buddy algorithm free page chained list.
While computer system can be made like this to realize memory allocation method that the embodiment of the present invention provides, also can be good at supporting existing memory allocation method, better compatible.
Further, identify the type of described thread at S401 before, also comprise:
Judge whether to be divided into described thread storage allocation according to internal memory;
If judged result is no, even can not be divided into described thread storage allocation according to internal memory, be then described thread storage allocation according to the memory allocation method of operating system acquiescence; If the determination result is YES, even can be divided into described thread storage allocation according to internal memory, then perform from S401, to be divided into described thread storage allocation according to internal memory.
The embodiment of the present invention is provided with User space thread and the distribution of kernel state thread in different memory field based on every CPU chained list, thus operating system and application program can be avoided to a certain extent to the competition of high-speed cache, thus improve system performance and data-handling efficiency.
Based on the division of above-mentioned internal memory, namely described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, the physical memory page of described kernel state memory field is for storing kernel state data and instruction, in order to reduce the competition for buffer memory of kernel code and global data, as shown in Figure 6, the embodiment of the present invention additionally provides a kind of memory allocation method, comprising:
S601, be kernel code storage allocation from kernel state memory field, and kernel code is copied in the internal memory of distribution;
S602, be global data storage allocation from User space memory field, and global data is copied in the internal memory of distribution;
It should be noted that, out-of-order relation between above-mentioned S601 and S602.
S603, static amendment are about kernel code and the virtual memory of global data and the mapping relations of physical memory.
So just make virtual memory address by amended mapping relations, the physical memory addresses of kernel code or global data can be got.
Memory allocation method provided by the invention, by internal memory being divided into User space memory field and kernel state memory field, and copying to kernel state memory field by kernel code and global data is copied to User space memory field; Owing to there are fixing mapping relations between internal memory and buffer memory, kernel code and global data can be reduced so to a certain extent to the competition of buffer memory.
The embodiment of the present invention additionally provides the Memory Allocation device corresponding with above-mentioned memory allocation method below, to the explanation of the unit in internal memory distributor, can with reference to the description in each step of said method, and will not add in lower device embodiment and repeat.
As shown in Figure 7, the Memory Allocation device that the embodiment of the present invention provides, comprising:
Recognition unit 71, for when a thread needs storage allocation, identifies the type of described thread, and when identifying described thread and being User space thread, trigger the first allocation units 72, when identifying described thread and being kernel state thread, trigger the second allocation units 73; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
Described first allocation units 72, for being this User space thread storage allocation from described User space memory field;
Described second allocation units 73, for being this kernel state thread storage allocation from described kernel state memory field.
Further, as shown in Figure 7, also comprise: modifier unit 74 is set, for when described thread needs storage allocation, if operating system generation page fault, then for the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread;
Described recognition unit 71, specifically for identifying whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier; If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
Preferably, User space memory field and described kernel state memory field can divide in such a way: described User space memory field and described kernel state memory field comprise at least one memory group respectively, and same memory group only belongs to one of them memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits;
Like this, as shown in Figure 7, above-mentioned Memory Allocation device also comprises:
Acquiring unit 75, for when os starting, obtains the group number of the memory group of described User space memory field set in described os starting parameter and/or kernel state memory field; And/or, in operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system; And/or, in operating system process, the group number of the memory group of the described User space memory field that the system call interfaces that obtaining is provided by described operating system is arranged and/or kernel state memory field.
The group number making the first allocation units 72 and the second allocation units 73 can be obtained by acquiring unit 75 is like this thread storage allocation of different types in different memory fields.
On the basis of above-mentioned Memory Allocation device, can also further comprise: judging unit 76 and system default allocation units 77;
Described system default allocation units 77, the memory allocation method for giving tacit consent to according to operating system is described thread storage allocation;
Described judging unit 76, for when a thread needs storage allocation, judges whether to be divided into described thread storage allocation according to internal memory;
If the judged result of described judging unit 76 is can not be divided into described thread storage allocation according to internal memory, then trigger described system default allocation units 77, if judged result is can be divided into described thread storage allocation according to internal memory, then trigger described recognition unit 71.
Further, based on the allocative decision of every CPU chained list, above provide in either memory distributor,
Described recognition unit 71, specifically for when a thread needs from CPU chained list storage allocation, identifies the type of described thread; Described CPU chained list is divided into user chain table and kernel chained list, the physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table;
Described first allocation units 72, specifically for when described user chain table exists idle physical memory page, are described User space thread storage allocation from described user chain table; When described user chain table is the physical memory page that there is not the free time, is the physical memory page that described user chain table distributes predetermined number from described User space memory field, then is described User space thread storage allocation from described user chain table;
Described second allocation units 73, specifically for when described kernel chained list exists idle physical memory page, are described kernel state thread storage allocation from described kernel chained list; When described kernel chained list does not exist idle physical memory page, be the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
Further, described first allocation units 72 also for, in the page descriptor of the physical memory page distributed for described user chain table, the first mark is set, for identifying present physical page for User space thread;
Described second allocation units 73 also for, in the page descriptor of the physical memory page distributed for described kernel chained list, the second mark is set, for identifying present physical page for kernel state thread.
Further, described device also comprises: remove indexing unit 78 and add linked list units 79;
Described removing identify unit 78, for when physical memory page discharges, removes mark set in the page descriptor of described physical memory page;
Describedly add linked list units 79, for being joined in the free page chained list of operating system default memory distribution method by the physical memory page after removing mark.
High-speed cache, based on the division of internal memory, is divided into regard to corresponding the two parts being respectively used to store User space data and kernel state data, thus operating system and application program can be avoided to a certain extent to the competition of high-speed cache by above-mentioned Memory Allocation device.
As shown in Figure 8, the invention provides a kind of Memory Allocation device, comprising:
First allocation units 81, for being kernel code storage allocation from kernel state memory field, and copy in the internal memory of distribution by kernel code;
Second allocation units 82, for being global data storage allocation from User space memory field, and copy in the internal memory of distribution by global data;
Amendment map unit 83, for static state amendment about kernel code and the virtual memory of global data and the mapping relations of physical memory; Wherein,
Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
Like this based on the division of internal memory, kernel code and global data can be avoided to a certain extent to the competition of buffer memory.
The embodiment of the present invention additionally provides a kind of internal memory, described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
Preferably, the described internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field to comprise: color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits.
The embodiment of the present invention additionally provides a kind of computer system, comprising:
Bus 91;
The processor 92 be connected with described bus 91;
The internal memory 93 be connected with described bus 91;
Wherein, described processor comprises above-mentioned either memory distributor; Above-mentioned either memory is saved as in described.
Above computer system can further include the user interface 94 be connected with bus 91.
The embodiment of the present invention additionally provides a kind of computer system, comprising:
Bus 101;
The processor 102 be connected with described bus 101;
The internal memory 103 be connected with described bus 101;
Wherein, described internal memory 103 comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction; Described processor 102, by described bus, calls the code stored in described internal memory, for: when a thread needs storage allocation, identify the type of described thread; If described thread is User space thread, be then this User space thread storage allocation from described User space memory field; If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field.
Above computer system can further include the user interface 104 be connected with bus 101.
Optionally, described processor 102, also for when described thread needs storage allocation, if operating system generation page fault, is then that the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread.
Now above-mentioned processor 102 identifies the function of the type of described thread, can for identifying whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier; If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
Optionally, the described internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field to comprise: color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits.
Now, described processor 102 also for: when os starting, obtain the group number of the memory group of described User space memory field set in described os starting parameter and/or kernel state memory field; And/or,
In operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system; And/or,
In operating system process, the group number of the memory group of the described User space memory field that the system call interfaces that obtaining is provided by described operating system is arranged and/or kernel state memory field.
Optionally, described processor 102 also for: when a thread needs storage allocation, judge whether to be divided into described thread storage allocation according to internal memory;
If judged result is can not be divided into described thread storage allocation according to internal memory, be then described thread storage allocation according to the memory allocation method of operating system acquiescence;
If judged result is can be divided into described thread storage allocation according to internal memory, be then divided into described thread storage allocation according to internal memory.
Optionally, described processor 102 storage allocation is from every CPU chained list storage allocation; Wherein, described every CPU chained list is divided into user chain table and kernel chained list, the physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table;
Now, described processor 102 for: when described thread is User space thread, if there is idle physical memory page in described user chain table, then from described user chain table be described User space thread storage allocation; If described user chain table is there is not idle physical memory page, is then the physical memory page that described user chain table distributes predetermined number from described User space memory field, then is described User space thread storage allocation from described user chain table;
When described thread is kernel state thread, if there is idle physical memory page in described kernel chained list, then from described kernel chained list be described kernel state thread storage allocation; If described kernel chained list does not exist idle physical memory page, be then the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
Further alternative, described processor 102 also for: from described User space memory field be described user chain table distribute predetermined number physical memory page after, in the page descriptor of the physical memory page distributed for described user chain table, the first mark is set, for identifying present physical page for User space thread;
Being after described kernel chained list distributes the physical memory page of predetermined number from described kernel state memory field, in the page descriptor of the physical memory page distributed for described kernel chained list, the second mark is set, for identifying present physical page for kernel state thread.
Further, optionally, described processor 102 also for: when physical memory page discharges, to remove in the page descriptor of described physical memory page set mark, and this physical memory page joined in the free page chained list of operating system default memory distribution method.
Above-mentioned arbitrary computer system can also comprise buffer memory, and this buffer memory can be arranged within a processor, as the shared buffer memory of processor core multiple in this processor.It should be noted that, the buffer memory in the embodiment of the present invention can be hardware cache usually, but is not limited to afterbody high-speed cache, and can be the buffer memory that any one is shared by multiple processor core.Above computer system is not limited to multi-core computer system, and can be any system being shared same buffer memory by multiple processor core.
Memory Allocation device provided by the invention, internal memory and computer system, by internal memory being divided into User space memory field and kernel state memory field, and being User space thread storage allocation in User space memory field, is kernel state thread storage allocation in kernel state memory field; Owing to there are fixing mapping relations between internal memory and buffer memory, high-speed cache is divided into regard to corresponding the two parts being respectively used to store User space data and kernel state data like this, thus avoids operating system and application program to the competition of high-speed cache; In addition, based on the division of above-mentioned internal memory, kernel code and global data can also be avoided to a certain extent to the competition of high-speed cache, thus improve system performance and data-handling efficiency.
One of ordinary skill in the art will appreciate that: all or part of step realizing said method embodiment can have been come by the hardware that programmed instruction is relevant, aforesaid program can be stored in a computer read/write memory medium, this program, when performing, performs the step comprising said method embodiment; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (18)

1. a memory allocation method, is characterized in that, comprising:
When a thread needs storage allocation, identify the type of described thread; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
If described thread is User space thread, be then this User space thread storage allocation from described User space memory field;
If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field;
The described internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field to comprise:
Color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits;
Described method also comprises:
When os starting, obtain the group number of the memory group of described User space memory field set in described os starting parameter and/or kernel state memory field; And/or,
In operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system; And/or,
In operating system process, the group number of the memory group of the described User space memory field that the system call interfaces that obtaining is provided by described operating system is arranged and/or kernel state memory field.
2. memory allocation method according to claim 1, is characterized in that, also comprises before the type of the described thread of described identification:
When described thread needs storage allocation, if operating system generation page fault, then for the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread;
The type of the described thread of described identification comprises:
Identify whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier;
If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
3. memory allocation method according to claim 1, is characterized in that, before the type identifying described thread, described method also comprises:
When a thread needs storage allocation, judge whether to be divided into described thread storage allocation according to internal memory;
If judged result is can not be divided into described thread storage allocation according to internal memory, be then described thread storage allocation according to the memory allocation method of operating system acquiescence;
If judged result is can be divided into described thread storage allocation according to internal memory, be then divided into described thread storage allocation according to internal memory.
4. the memory allocation method according to any one of claim 1-3, is characterized in that, described storage allocation is from every CPU chained list storage allocation; Wherein, described every CPU chained list is divided into user chain table and kernel chained list, the physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table;
If described thread is User space thread, then comprise from described User space memory field for this User space thread storage allocation:
When described thread is User space thread, if there is idle physical memory page in described user chain table, then from described user chain table be described User space thread storage allocation; If described user chain table is there is not idle physical memory page, is then the physical memory page that described user chain table distributes predetermined number from described User space memory field, then is described User space thread storage allocation from described user chain table;
If described thread is kernel state thread, then comprise from described kernel state memory field for this kernel state thread storage allocation:
When described thread is kernel state thread, if there is idle physical memory page in described kernel chained list, then from described kernel chained list be described kernel state thread storage allocation; If described kernel chained list does not exist idle physical memory page, be then the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
5. memory allocation method according to claim 4, it is characterized in that, be after described user chain table distributes the physical memory page of predetermined number from described User space memory field, also comprise: in the page descriptor of the physical memory page distributed for described user chain table, the first mark is set, for identifying present physical page for User space thread;
Be after described kernel chained list distributes the physical memory page of predetermined number from described kernel state memory field, also comprise: in the page descriptor of the physical memory page distributed for described kernel chained list, the second mark is set, for identifying present physical page for kernel state thread.
6. memory allocation method according to claim 5, it is characterized in that, also comprise: when physical memory page discharges, remove mark set in the page descriptor of described physical memory page, and this physical memory page is joined in the free page chained list of operating system default memory distribution method.
7. a Memory Allocation device, is characterized in that, comprising:
Recognition unit, for when a thread needs storage allocation, identifies the type of described thread, and when identifying described thread and being User space thread, trigger the first allocation units, when identifying described thread and being kernel state thread, trigger the second allocation units; Described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction;
Described first allocation units, for being this User space thread storage allocation from described User space memory field;
Described second allocation units, for being this kernel state thread storage allocation from described kernel state memory field;
Described User space memory field and described kernel state memory field comprise at least one memory group respectively, and same memory group only belongs to one of them memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits;
Described device also comprises:
Acquiring unit, for when os starting, obtains the group number of the memory group of described User space memory field set in described os starting parameter and/or kernel state memory field; And/or,
In operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system; And/or,
In operating system process, the group number of the memory group of the described User space memory field that the system call interfaces that obtaining is provided by described operating system is arranged and/or kernel state memory field.
8. Memory Allocation device according to claim 7, it is characterized in that, also comprise: modifier unit is set, for when described thread needs storage allocation, if operating system generation page fault, then for the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread;
Described recognition unit, specifically for identifying whether the Memory Allocation behavior of described thread is provided with user memory and distributes behavior modifier; If the Memory Allocation behavior of described thread is provided with user memory distribute behavior modifier, then determine that described thread is User space thread; If the Memory Allocation behavior of described thread is not provided with user memory distribute behavior modifier, then determine that described thread is kernel state thread.
9. Memory Allocation device according to claim 7, is characterized in that, also comprise: judging unit and system default allocation units;
Described system default allocation units, the memory allocation method for giving tacit consent to according to operating system is described thread storage allocation;
Described judging unit is used for when a thread needs storage allocation, judges whether to be divided into described thread storage allocation according to internal memory; If the judged result of described judging unit is can not be divided into described thread storage allocation according to internal memory, then trigger described system default allocation units, if judged result is can be divided into described thread storage allocation according to internal memory, then trigger described recognition unit.
10. the Memory Allocation device according to any one of claim 7-9, is characterized in that,
Described recognition unit, for when a thread needs from every CPU chained list storage allocation, identifies the type of described thread; Described every CPU chained list is divided into user chain table and kernel chained list, the physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table;
Described first allocation units, for when described user chain table exists idle physical memory page, are described User space thread storage allocation from described user chain table; When described user chain table is the physical memory page that there is not the free time, is the physical memory page that described user chain table distributes predetermined number from described User space memory field, then is described User space thread storage allocation from described user chain table;
Described second allocation units, for when described kernel chained list exists idle physical memory page, are described kernel state thread storage allocation from described kernel chained list; When described kernel chained list does not exist idle physical memory page, be the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
11. Memory Allocation devices according to claim 10, it is characterized in that, described first allocation units also for, in the page descriptor of the physical memory page distributed for described user chain table, the first mark is set, for identifying present physical page for User space thread;
Described second allocation units also for, in the page descriptor of the physical memory page distributed for described kernel chained list, the second mark is set, for identifying present physical page for kernel state thread.
12. Memory Allocation devices according to claim 11, it is characterized in that, described device also comprises: remove indexing unit and add linked list units;
Described removing identify unit, for when physical memory page discharges, removes mark set in the page descriptor of described physical memory page;
Describedly add linked list units, for being joined in the free page chained list of operating system default memory distribution method by the physical memory page after removing mark.
13. 1 kinds of computer systems, is characterized in that, comprising:
Bus;
The processor be connected with described bus;
The internal memory be connected with described bus;
Wherein, described processor comprises the Memory Allocation device as described in claim 7 to any one of claim 12; Described internal memory comprises multiple physical memory page, and the internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction.
14. computer systems according to claim 13, is characterized in that, described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field to comprise:
Color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits.
15. 1 kinds of computer systems, is characterized in that, comprising:
Bus;
The processor be connected with described bus;
The internal memory be connected with described bus;
Wherein, described internal memory comprises multiple physical memory page, and described in comprise multiple physical memory page internal memory be divided into User space memory field and kernel state memory field, the physical memory page of described User space memory field is for storing User space data and instruction, and the physical memory page of described kernel state memory field is for storing kernel state data and instruction; Described processor, by described bus, calls the code stored in described internal memory, for: when a thread needs storage allocation, identify the type of described thread; If described thread is User space thread, be then this User space thread storage allocation from described User space memory field; If described thread is kernel state thread, be then this kernel state thread storage allocation from described kernel state memory field;
The described internal memory comprising multiple physical memory page is divided into User space memory field and kernel state memory field to comprise: color bits by the page of physical address and described multiple physical memory page is divided at least two memory group, and described at least two memory group are divided into User space memory field and kernel state memory field; Wherein, it is identical that the page of each physical address of all physical memory pages in same memory group color bits;
Described processor also for: when os starting, obtain the group number of the memory group of described User space memory field set in described os starting parameter and/or kernel state memory field; And/or,
In operating system process, obtain the group number of the memory group of described User space memory field and/or the kernel state memory field arranged by the kernel interactive interface of described operating system; And/or,
In operating system process, the group number of the memory group of the described User space memory field that the system call interfaces that obtaining is provided by described operating system is arranged and/or kernel state memory field.
16. computer systems according to claim 15, it is characterized in that, described processor, also for when described thread needs storage allocation, if operating system generation page fault, is then that the Memory Allocation behavior of described thread arranges user memory distribution behavior modifier; Described user memory distributes behavior modifier for marking current memory alllocated lines for be triggered by User space thread.
17. computer systems according to claim 15, is characterized in that, described processor, also for when described thread needs storage allocation, before the type identifying described thread, judges whether to be divided into described thread storage allocation according to internal memory;
If judged result is can not be divided into described thread storage allocation according to internal memory, be then described thread storage allocation according to the memory allocation method of operating system acquiescence;
If judged result is can be divided into described thread storage allocation according to internal memory, be then divided into described thread storage allocation according to internal memory.
18. computer systems according to any one of claim 15-17, it is characterized in that, described storage allocation is from every CPU chained list storage allocation; Wherein, described every CPU chained list is divided into user chain table and kernel chained list, the physical memory page of the described User space memory field of each node sensing of described user chain table, the physical memory page of the described kernel state memory field of each node sensing of described user chain table;
Described processor is used for: when described thread is User space thread, if there is idle physical memory page in described user chain table, then from described user chain table be described User space thread storage allocation; If described user chain table is there is not idle physical memory page, is then the physical memory page that described user chain table distributes predetermined number from described User space memory field, then is described User space thread storage allocation from described user chain table;
When described thread is kernel state thread, if there is idle physical memory page in described kernel chained list, then from described kernel chained list be described kernel state thread storage allocation; If described kernel chained list does not exist idle physical memory page, be then the physical memory page that described kernel chained list distributes predetermined number from described kernel state memory field, then be described kernel state thread storage allocation from described kernel chained list.
CN201210176906.XA 2012-05-31 2012-05-31 A kind of memory allocation method, Apparatus and system Expired - Fee Related CN102819497B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210176906.XA CN102819497B (en) 2012-05-31 2012-05-31 A kind of memory allocation method, Apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210176906.XA CN102819497B (en) 2012-05-31 2012-05-31 A kind of memory allocation method, Apparatus and system

Publications (2)

Publication Number Publication Date
CN102819497A CN102819497A (en) 2012-12-12
CN102819497B true CN102819497B (en) 2015-09-30

Family

ID=47303619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210176906.XA Expired - Fee Related CN102819497B (en) 2012-05-31 2012-05-31 A kind of memory allocation method, Apparatus and system

Country Status (1)

Country Link
CN (1) CN102819497B (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365797B (en) * 2013-07-05 2017-05-31 华为技术有限公司 Physical memory page distribution method and computer system
CN103544324B (en) * 2013-11-11 2017-09-08 北京搜狐新媒体信息技术有限公司 A kind of data access method of kernel state, apparatus and system
CN104899159B (en) * 2014-03-06 2019-07-23 华为技术有限公司 The mapping treatment method and device of the address cache memory Cache
CN103927145B (en) * 2014-04-28 2017-02-15 中国科学院微电子研究所 System hibernating and awakening method and device based on hybrid memory
CN104850502B (en) * 2015-05-05 2018-03-09 华为技术有限公司 A kind of access method of data, device and equipment
CN107179949B (en) * 2016-12-16 2020-11-24 重庆大学 Quantification method for operating system memory distribution fluency in mobile equipment
CN107203477A (en) 2017-06-16 2017-09-26 深圳市万普拉斯科技有限公司 Memory allocation method, device, electronic equipment and readable storage medium storing program for executing
CN107783908B (en) * 2017-11-07 2020-12-25 晶晨半导体(上海)股份有限公司 Linux kernel memory leakage detection method
CN108132841A (en) * 2017-12-11 2018-06-08 杭州迪普科技股份有限公司 A kind of memory allocation method and device of the equipment based on linux system
CN110121114B (en) * 2018-02-07 2021-08-27 华为技术有限公司 Method for transmitting stream data and data transmitting apparatus
CN108958911B (en) * 2018-05-30 2022-02-08 北京小米移动软件有限公司 Process control method and device
CN110597641A (en) * 2018-06-12 2019-12-20 杨力祥 Linear address space layout method and computing device
CN109062693A (en) * 2018-07-26 2018-12-21 郑州云海信息技术有限公司 A kind of EMS memory management process and relevant device
CN109240621B (en) * 2018-09-25 2021-12-24 郑州云海信息技术有限公司 Nonvolatile internal memory management method and device
CN109688058B (en) * 2018-12-19 2021-03-02 迈普通信技术股份有限公司 Message processing method and device and network equipment
CN110109761B (en) * 2019-05-11 2021-06-04 广东财经大学 Method and system for managing kernel memory of operating system in user mode
CN111177019B (en) * 2019-08-05 2021-07-16 腾讯科技(深圳)有限公司 Memory allocation management method, device, equipment and storage medium
CN111309644B (en) * 2020-02-14 2021-11-09 苏州浪潮智能科技有限公司 Memory allocation method and device and computer readable storage medium
CN113312322B (en) * 2021-04-21 2022-04-01 厦门芯泰达集成电路有限公司 STDF file reading and writing method, medium, equipment and device
CN115344507A (en) * 2021-05-14 2022-11-15 华为技术有限公司 Memory allocation method, device and system
CN113296703B (en) * 2021-05-27 2022-08-05 山东云海国创云计算装备产业创新中心有限公司 Heap memory management method, device, equipment and medium
CN113849238B (en) * 2021-09-29 2024-02-09 浪潮电子信息产业股份有限公司 Data communication method, device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6226725B1 (en) * 1998-04-21 2001-05-01 Ibm Method and system in a data processing system for the dedication of memory storage locations
US6732237B1 (en) * 2000-08-29 2004-05-04 Oracle International Corporation Multi-tier caching system
CN1617113A (en) * 2003-11-13 2005-05-18 国际商业机器公司 Method of assigning virtual memory to physical memory, storage controller and computer system
CN1791862A (en) * 2003-04-09 2006-06-21 扎鲁纳股份有限公司 Operating systems
CN101510176A (en) * 2009-03-26 2009-08-19 浙江大学 Control method of general-purpose operating system for accessing CPU two stage caching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63200251A (en) * 1987-02-16 1988-08-18 Matsushita Electric Ind Co Ltd Cache memory control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6226725B1 (en) * 1998-04-21 2001-05-01 Ibm Method and system in a data processing system for the dedication of memory storage locations
US6732237B1 (en) * 2000-08-29 2004-05-04 Oracle International Corporation Multi-tier caching system
CN1791862A (en) * 2003-04-09 2006-06-21 扎鲁纳股份有限公司 Operating systems
CN1617113A (en) * 2003-11-13 2005-05-18 国际商业机器公司 Method of assigning virtual memory to physical memory, storage controller and computer system
CN101510176A (en) * 2009-03-26 2009-08-19 浙江大学 Control method of general-purpose operating system for accessing CPU two stage caching

Also Published As

Publication number Publication date
CN102819497A (en) 2012-12-12

Similar Documents

Publication Publication Date Title
CN102819497B (en) A kind of memory allocation method, Apparatus and system
US7930515B2 (en) Virtual memory management
US20120137055A1 (en) Hybrid memory system and method managing the same
US9507731B1 (en) Virtualized cache memory
CN104346294A (en) Data reading/writing method and device and computer system on basis of multi-level Cache
KR101650424B1 (en) Operation transfer from an origin virtual machine to a destination virtual machine
CN104216837A (en) Memory system, memory access request processing method and computer system
CN105095116A (en) Cache replacing method, cache controller and processor
CN105677580A (en) Method and device for accessing cache
US9069477B1 (en) Reuse of dynamically allocated memory
EP2437462B1 (en) Data access processing method and device
CN102667714B (en) Support the method and system that the function provided by the resource outside operating system environment is provided
CN111930643B (en) Data processing method and related equipment
US8583890B2 (en) Disposition instructions for extended access commands
US20210011634A1 (en) Methods and systems for managing key-value solid state drives (kv ssds)
US20140229683A1 (en) Self-disabling working set cache
CN103488523A (en) Page access method, page access device and server
KR20170029594A (en) Memory management method and device, and memory controller
CN101847096A (en) Optimization method of stack variable-containing function
US8028118B2 (en) Using an index value located on a page table to index page attributes
CN105988875B (en) Method and device for running process
CN102959548A (en) Data storage method, search method and device
CN109062823A (en) The method and device of the equipment performance based on Shen prestige framework is promoted using big page memory
CN115617542A (en) Memory exchange method and device, computer equipment and storage medium
US20130346714A1 (en) Hardware-Based Accelerator For Managing Copy-On-Write

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150930

Termination date: 20160531