CN111143072A - User mode program memory allocation method, system and related components - Google Patents

User mode program memory allocation method, system and related components Download PDF

Info

Publication number
CN111143072A
CN111143072A CN201911386460.1A CN201911386460A CN111143072A CN 111143072 A CN111143072 A CN 111143072A CN 201911386460 A CN201911386460 A CN 201911386460A CN 111143072 A CN111143072 A CN 111143072A
Authority
CN
China
Prior art keywords
memory
user mode
mode program
kernel
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911386460.1A
Other languages
Chinese (zh)
Other versions
CN111143072B (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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry 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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201911386460.1A priority Critical patent/CN111143072B/en
Publication of CN111143072A publication Critical patent/CN111143072A/en
Application granted granted Critical
Publication of CN111143072B publication Critical patent/CN111143072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a memory allocation method for a user mode program, which directly calls a kernel auxiliary module installed on a kernel to allocate memory at the kernel, and the memory allocated at the kernel is directly used as an applied memory without being controlled by the memory of an operating system, namely, the memory directly allocated by the kernel is a memory which is not required to be swapped in and out, so that the memory required by the user mode program can be locked, the page swapping in and out of the operating system can not occur when the user mode program accesses the memories, the program processing time delay increased by the page swapping in and out is avoided, and the memory access response efficiency is improved. The application also provides a user mode program memory allocation system, a kernel auxiliary module, a user mode program memory response device, a user mode program memory request device and a readable storage medium, and the beneficial effects are achieved.

Description

User mode program memory allocation method, system and related components
Technical Field
The present application relates to the field of memory application technologies, and in particular, to a user mode program memory allocation method, a user mode program memory allocation system, a kernel auxiliary module, a user mode program memory response device, a user mode program memory request device, and a readable storage medium.
Background
The memory is a basic component of a computer, and with the continuous progress of technology and technology, the capacity of the memory is continuously increased, and the demand of modern application programs on the memory is also increased. The general application program mostly runs in a user mode, and is compiled by using a C language, such user mode program is executed by a glibc library function (e.g. malloc) when applying for the memory, and the library function is obtained by encapsulating a system call provided by an operating system. The memory applied by the user mode program in this way has the following disadvantages: the memory applied is a virtual memory, the operating system does not guarantee that enough physical memory corresponds to the virtual memory, and the performance of the user mode program when accessing the virtual memory is not guaranteed, because when accessing the virtual memory, page swapping in and out of the operating system may be involved, and page swapping in and out may increase the time delay of program processing, which affects the performance of the program.
Therefore, how to improve the response performance of the user mode program when accessing the virtual memory is a problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
The method can improve the response performance of the user mode program when accessing the virtual memory; another objective of the present application is to provide a user mode program memory allocation method system, a kernel auxiliary module, a user mode program memory response device, a user mode program memory request device, and a readable storage medium.
In order to solve the above technical problem, the present application provides a method for allocating a memory of a user mode program, including:
when a kernel auxiliary module installed on a kernel receives a memory application request initiated by a user mode program through miscellaneous equipment, determining a memory block to be allocated currently according to a memory applied from an operating system in advance; wherein the miscellaneous device is used for realizing the access of the kernel auxiliary module;
and mapping the memory block to the user mode program through the miscellaneous equipment so as to facilitate the direct calling of the user mode program.
Optionally, the method for allocating memory of the user mode program further includes:
the kernel auxiliary module receives a memory viewing request initiated by the user mode program;
obtaining pre-stored memory allocation data;
and returning the memory allocation data to the user mode program.
Optionally, the method for allocating memory of the user mode program further includes:
and applying for a memory with a fixed size from an operating system so as to respond to the memory application of the user mode program.
The application discloses kernel auxiliary module includes:
the memory block determining unit is used for determining a memory block to be allocated currently according to a memory which is applied from an operating system in advance when a kernel auxiliary module installed on a kernel receives a memory application request initiated by a user mode program through miscellaneous equipment; wherein the miscellaneous device is used for realizing the access of the kernel auxiliary module;
a memory block mapping unit, configured to map the memory block to the user mode program through the miscellaneous device, so as to facilitate direct invocation of the user mode program.
The application discloses user mode program memory response device includes:
a memory for storing a program;
and the processor is used for realizing the steps of the user mode program memory allocation method based on the coupling auxiliary module when the program is executed.
The application discloses a user mode program memory allocation method, which comprises the following steps:
when a user mode program generates a memory application request, mapping miscellaneous equipment to a memory; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on a kernel;
sending the memory application request to the kernel auxiliary equipment through the miscellaneous equipment so that the kernel auxiliary equipment can distribute the memory in the kernel;
and receiving the memory block returned by the kernel auxiliary equipment to respond to the memory calling requirement.
The application discloses user mode program module includes:
the device mapping unit is used for mapping the miscellaneous devices to the memory when generating the memory application request; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on a kernel;
a request sending unit, configured to send the memory application request to the kernel auxiliary device through the miscellaneous device, so that the kernel auxiliary device performs memory allocation in a kernel;
and the memory block receiving unit is used for receiving the memory block returned by the kernel auxiliary device so as to respond to the memory calling requirement.
The application discloses user mode program memory request equipment includes:
a memory for storing a program;
and the processor is used for realizing the steps of the user mode program memory allocation method based on the user mode program when the program is executed.
The application discloses a user mode program memory allocation system, includes:
the user mode program memory response device, the user mode program memory request device and the miscellaneous device;
the user mode program memory response device is arranged on a kernel mode part, the user mode program memory request device is arranged on a user mode part, and the miscellaneous device is simultaneously positioned on the kernel mode part and the user mode part and is used for simultaneously connecting the user mode program memory response device and the user mode program memory request device.
The application discloses a readable storage medium, wherein a program is stored on the readable storage medium, and when the program is executed by a processor, the steps of the user mode program memory allocation method based on the kernel auxiliary module and/or the user mode program memory allocation method based on the user mode program are realized.
According to the memory allocation method for the user mode program, the kernel auxiliary module installed on the kernel is directly called to allocate the memory at the kernel, the memory allocated at the kernel is directly used as the applied memory without being controlled by the memory of the operating system, namely the memory directly allocated by the kernel is the memory which is not required to be changed in and out, the memory required by the user mode program can be locked, the page changing in and out of the operating system can not occur when the user mode program accesses the memories, the program processing time delay caused by the page changing in and out can be avoided, and the memory access response efficiency is improved.
The application also provides a user mode program memory allocation system, a kernel auxiliary module, a user mode program memory response device, a user mode program memory request device and a readable storage medium, which have the beneficial effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a user mode program memory allocation method based on kernel-based auxiliary devices according to an embodiment of the present application;
fig. 2 is a distribution diagram of a user mode program, a kernel auxiliary module, and miscellaneous devices according to an embodiment of the present application;
fig. 3 is a block diagram illustrating a structure of a kernel assistance module according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a user mode program memory response device according to an embodiment of the present disclosure;
fig. 5 is a flowchart of a user mode program memory allocation method based on a user mode program according to an embodiment of the present application;
FIG. 6 is a block diagram of a user mode program module according to an embodiment of the present disclosure;
fig. 7 is a signaling diagram of interaction between system devices according to an embodiment of the present application.
Detailed Description
The core of the application is to provide a memory allocation method for a user mode program, and the method can improve the response performance of the user mode program when accessing a virtual memory; at the other core of the application, a user mode program memory allocation system, a kernel auxiliary module, a user mode program memory response device, a user mode program memory request device and a readable storage medium are provided.
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
Referring to fig. 1, fig. 1 is a flowchart of a memory allocation method for a user mode program based on a kernel auxiliary device according to this embodiment, where the method mainly includes:
step s110, when a kernel auxiliary module installed in a kernel receives a memory application request initiated by a user mode program through miscellaneous equipment, determining a memory block to be allocated currently according to a memory applied from an operating system in advance;
the kernel auxiliary module which is installed in the kernel and used for realizing kernel-based memory request response is introduced, the kernel auxiliary module installed in the kernel is directly called to distribute the memory at the kernel end, the memory distribution at the kernel end is directly applied to the memory without the memory control of an operating system, namely the memory directly distributed by the kernel is the memory which is not required to be changed in and out, the memory required by the user mode program can be locked, the page change in and out of the operating system can not occur when the user mode program accesses the memories, the program processing time delay which can be increased by the page change in and out is avoided, and the memory access response efficiency is improved.
As shown in fig. 2, a distribution diagram of a user mode program, a kernel auxiliary module, and miscellaneous devices is shown, where the kernel auxiliary module is installed in a kernel mode portion, and the user mode program runs in the user mode portion, and direct communication cannot be performed between the user mode program and the kernel auxiliary module. In this embodiment, the installation mechanism and the interface setting method of the miscellaneous device are not limited, for example, the miscellaneous device may be registered by the kernel auxiliary module, and register the following necessary file interfaces for implementing the device: open, release, ioctl, mmap. When implementing the mmap (memory mapped) file interface of the device, a virtual memory operation interface needs to be registered and implemented: open, close, fault.
It should be noted that, after receiving a memory application request initiated by a user mode program through a miscellaneous device, the kernel auxiliary module determines a current memory block to be allocated according to a memory applied from an operating system in advance, where the memory block may be applied in the kernel after receiving the memory application request, or may apply for a memory of a fixed size in advance before receiving the application request, and directly invokes a corresponding memory block to implement a response of the memory block after receiving the memory application request. For example, 90% of the entire memory is applied in advance from the kernel mode portion to allow the user mode program to initiate a memory application request to the kernel side through the miscellaneous device, and the remaining 10% of the memory is used for the normal memory response that can be switched in and out by the operating system.
And step s120, mapping the memory block to the user mode program through miscellaneous equipment, so as to facilitate direct calling of the user mode program.
The kernel auxiliary module maps the allocated memory blocks to a user mode program through miscellaneous equipment, the user mode program accesses the miscellaneous equipment and maps the miscellaneous equipment to a memory space of the user mode program, and a virtual memory address obtained through mapping points to a memory applied by the kernel auxiliary module, so that the user mode program can obtain the applied memory blocks which are not required to be exchanged.
In addition, in addition to the above memory application process, in order to improve the functional comprehensiveness of memory allocation at the kernel side, miscellaneous devices created by the kernel auxiliary module may be mapped in other user mode programs, thereby implementing more complicated usage, such as viewing and processing of the contents of the mapped memory. Optionally, one implementation is as follows:
the kernel auxiliary module receives a memory viewing request initiated by a user mode program;
obtaining pre-stored memory allocation data;
and returning the memory allocation data to the user mode program.
The mode realizes the function of checking the distribution condition of the kernel-side memory distribution, and is convenient for users to know the current memory distribution and utilization condition. In this embodiment, only the above implementation process is described as an example, and other implementation manners based on the present application can refer to the description of this embodiment, which is not described herein again.
Based on the above description, the memory allocation method for the user mode program provided in this embodiment directly calls the kernel auxiliary module installed in the kernel to allocate the memory at the kernel side, and since the memory allocated at the kernel side is directly used for the application memory without being controlled by the memory of the operating system, that is, the memory directly allocated by the kernel is a memory that is not to be swapped in and out, the memory required by the user mode program can be locked, it is ensured that the page swapping in and out of the operating system does not occur when the user mode program accesses the memories, program processing delay that may be increased by the page swapping in and out is avoided, and memory access response efficiency is improved.
Example two
Referring to fig. 3, fig. 3 is a block diagram of a kernel auxiliary module according to the present embodiment; the apparatus may include: memory block determination unit 110 and memory block mapping unit 120. The kernel auxiliary module provided by this embodiment may be contrasted with the above-mentioned user mode program memory allocation method based on the kernel auxiliary module.
The memory block determining unit 110 is mainly configured to determine a current memory block to be allocated according to a memory previously applied from an operating system when receiving a memory application request initiated by a user mode program through miscellaneous equipment; the miscellaneous equipment is used for realizing the access of the kernel auxiliary module;
the memory block mapping unit 120 is mainly configured to map the memory block to the user mode program through miscellaneous equipment, so as to facilitate direct invocation of the user mode program.
EXAMPLE III
The embodiment provides a memory response device for a user mode program, which includes: a memory and a processor.
Wherein, the memory is used for storing programs;
when the processor is used to execute a program, the steps of the memory allocation method for a user mode program based on a kernel auxiliary module described in the above embodiments may be specifically referred to in the description of the memory allocation method for a user mode program.
Referring to fig. 4, a schematic structural diagram of a user mode program memory response device provided in this embodiment is shown, where the user mode program memory response device may generate relatively large differences due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instructions operating on a data processing device. Further, the central processor 322 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the user mode program memory response device 301.
The user mode program memory response device 301 may also include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input output interfaces 358, and/or one or more operating systems 341, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps in the method for allocating memory of a user mode program based on a kernel auxiliary module described in fig. 1 may be implemented by the structure of the memory response device of the user mode program introduced in this embodiment.
Example four
Referring to fig. 5, fig. 5 is a flowchart of a memory allocation method for a user mode program based on the user mode program according to the present embodiment, where the method mainly includes:
step s210, when the user mode program generates a memory application request, mapping the miscellaneous device to the memory; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on the kernel;
the miscellaneous item equipment is used for realizing the access of the kernel auxiliary module positioned at the kernel end, and the user mode program running in the user mode part maps the miscellaneous item equipment to the memory of the user mode program so as to realize the access of the kernel auxiliary module for calling the miscellaneous item equipment.
Step s220, sending the memory application request to the kernel auxiliary device through the miscellaneous device, so that the kernel auxiliary device performs memory allocation in the kernel;
step s230, receiving the memory block returned by the kernel auxiliary device to respond to the memory call requirement.
The memory block fed back by the kernel auxiliary module is directly mapped into miscellaneous equipment, and the miscellaneous equipment is mapped into the user mode program in advance, so that the user mode program can receive the memory block through the miscellaneous equipment. How to perform the specific use of the memory block by the subsequent user mode program is not limited in this embodiment.
It should be noted that, the user mode program memory allocation method based on the user mode program described in this embodiment may refer to the user mode program memory allocation method based on the kernel auxiliary module described in the first embodiment, and the two embodiments may be contrasted with each other, which is not described herein again.
The memory allocation method for the user mode program based on the user mode program introduced in this embodiment applies for the memory in the kernel mode, and maps the memory applied in the kernel mode into the user mode program through the miscellaneous device, so as to ensure that the performance of the user mode program is not affected when accessing the memory, and also can reserve a large amount of memory for the specific user mode program in this way, and can meet the requirements of the specific user mode program in the Linux platform on the memory capacity and the access performance.
EXAMPLE five
Referring to fig. 6, fig. 6 is a block diagram of a user mode program module provided in this embodiment; the apparatus may include: a device mapping unit 210, a request sending unit 220, and a memory block receiving unit 230. The user mode program module provided by this embodiment may be contrasted with the user mode program memory allocation method based on the user mode program.
The device mapping unit 210 is mainly configured to map miscellaneous devices into a memory when generating a memory application request; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on the kernel;
the request sending unit 220 is mainly configured to send the memory application request to the kernel auxiliary device through the miscellaneous device, so that the kernel auxiliary device performs memory allocation in the kernel;
the memory block receiving unit 230 is mainly configured to receive a memory block returned by the kernel auxiliary device, so as to respond to a memory call request.
EXAMPLE six
The embodiment provides a memory request device for a user mode program, which includes: a memory and a processor.
Wherein, the memory is used for storing programs;
when the processor is used to execute a program, the steps of the memory allocation method for a user mode program based on the user mode program described in the above embodiments may be specifically referred to the description of the memory allocation method for a user mode program based on the user mode program.
In this embodiment, details of a specific connection structure of the user mode program memory request device are not described again, and the specific connection structure may refer to the description of fig. 4.
EXAMPLE seven
The present embodiment provides a memory allocation system for a user mode program, including: user mode program memory response equipment, user mode program memory request equipment and miscellaneous equipment;
the structural schematic diagram of the user mode program memory allocation system provided in this embodiment may refer to the description in fig. 2, where both the user mode program memory response device and the user mode program memory request device may refer to the description in the foregoing device embodiments, and are not described herein again.
The miscellaneous devices may refer to the description of the corresponding embodiment in fig. 1, and are not described herein again.
The user mode program memory response device is arranged on the kernel mode part, the user mode program memory request device is arranged on the user mode part, and the miscellaneous device is simultaneously positioned on the kernel mode part and the user mode part and is used for simultaneously connecting the user mode program memory response device and the user mode program memory request device.
Fig. 7 is a signaling diagram illustrating interaction between system devices, in which a kernel auxiliary module may be used to apply for an irreplaceable memory from an operating system and register a miscellaneous device;
miscellaneous devices may be created by the kernel assistance module for access by user mode programs.
The user mode program, i.e. the part accessed by the user, is used for initiating a memory application request and receiving the allocated memory blocks.
The memory allocation system for the user mode program provided by the embodiment can meet the requirements of a specific user mode program on the memory capacity and the access performance.
Example eight
The present embodiment discloses a readable storage medium, on which a program is stored, and the program, when executed by a processor, implements the steps of the memory allocation method for the user mode program described in the above embodiments, which may be referred to in the description of the memory allocation method for the user mode program in the above embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various readable storage media capable of storing program codes.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The user mode program memory allocation method, the user mode program memory allocation system, the kernel auxiliary module, the user mode program memory response device, the user mode program memory request device, and the readable storage medium provided by the present application are described in detail above. The principles and embodiments of the present application are explained herein using specific examples, which are provided only to help understand the method and the core idea of the present application. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A memory allocation method for a user mode program is characterized by comprising the following steps:
when a kernel auxiliary module installed on a kernel receives a memory application request initiated by a user mode program through miscellaneous equipment, determining a memory block to be allocated currently according to a memory applied from an operating system in advance; wherein the miscellaneous device is used for realizing the access of the kernel auxiliary module;
and mapping the memory block to the user mode program through the miscellaneous equipment so as to facilitate the direct calling of the user mode program.
2. The user mode program memory allocation method of claim 1, further comprising:
the kernel auxiliary module receives a memory viewing request initiated by the user mode program;
obtaining pre-stored memory allocation data;
and returning the memory allocation data to the user mode program.
3. The user mode program memory allocation method of claim 1, further comprising:
and applying for a memory with a fixed size from an operating system so as to respond to the memory application of the user mode program.
4. A kernel assistance module, comprising:
the memory block determining unit is used for determining a memory block to be allocated currently according to a memory which is applied from an operating system in advance when a kernel auxiliary module installed on a kernel receives a memory application request initiated by a user mode program through miscellaneous equipment; wherein the miscellaneous device is used for realizing the access of the kernel auxiliary module;
a memory block mapping unit, configured to map the memory block to the user mode program through the miscellaneous device, so as to facilitate direct invocation of the user mode program.
5. A user mode program memory response device, comprising:
a memory for storing a program;
a processor for implementing the steps of the memory allocation method for a user mode program according to any one of claims 1 to 3 when executing said program.
6. A memory allocation method for a user mode program is characterized by comprising the following steps:
when a user mode program generates a memory application request, mapping miscellaneous equipment to a memory; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on a kernel;
sending the memory application request to the kernel auxiliary equipment through the miscellaneous equipment so that the kernel auxiliary equipment can distribute the memory in the kernel;
and receiving the memory block returned by the kernel auxiliary equipment to respond to the memory calling requirement.
7. A user mode program module, comprising:
the device mapping unit is used for mapping the miscellaneous devices to the memory when generating the memory application request; the miscellaneous equipment is used for realizing the access of a kernel auxiliary module installed on a kernel;
a request sending unit, configured to send the memory application request to the kernel auxiliary device through the miscellaneous device, so that the kernel auxiliary device performs memory allocation in a kernel;
and the memory block receiving unit is used for receiving the memory block returned by the kernel auxiliary device so as to respond to the memory calling requirement.
8. A user mode program memory request device, comprising:
a memory for storing a program;
a processor, configured to implement the steps of the memory allocation method for the user-mode program according to claim 6 when executing the program.
9. A user mode program memory allocation system, comprising:
the user mode program memory responding device of claim 5, the user mode program memory requesting device of claim 8, and miscellaneous devices;
the user mode program memory response device is arranged on a kernel mode part, the user mode program memory request device is arranged on a user mode part, and the miscellaneous device is simultaneously positioned on the kernel mode part and the user mode part and is used for simultaneously connecting the user mode program memory response device and the user mode program memory request device.
10. A readable storage medium, on which a program is stored, which program, when being executed by a processor, carries out the steps of the user-mode program memory allocation method according to any one of claims 1 to 3 and/or the user-mode program memory allocation method according to claim 6.
CN201911386460.1A 2019-12-29 2019-12-29 User mode program memory allocation method, system and related components Active CN111143072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911386460.1A CN111143072B (en) 2019-12-29 2019-12-29 User mode program memory allocation method, system and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911386460.1A CN111143072B (en) 2019-12-29 2019-12-29 User mode program memory allocation method, system and related components

Publications (2)

Publication Number Publication Date
CN111143072A true CN111143072A (en) 2020-05-12
CN111143072B CN111143072B (en) 2023-09-08

Family

ID=70521418

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911386460.1A Active CN111143072B (en) 2019-12-29 2019-12-29 User mode program memory allocation method, system and related components

Country Status (1)

Country Link
CN (1) CN111143072B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111683109A (en) * 2020-08-17 2020-09-18 烽火通信科技股份有限公司 Micro-service architecture
WO2023236930A1 (en) * 2022-06-10 2023-12-14 维沃移动通信有限公司 Memory allocation method and apparatus based on ion allocator, electronic device, and readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744726A (en) * 2014-01-02 2014-04-23 西北工业大学 Two-stage scheduling method of real-time extension of Windows system
CN104794069A (en) * 2015-04-01 2015-07-22 北京创毅视讯科技有限公司 User state allocation method and system for cache in CPU
EP3115903A1 (en) * 2014-03-07 2017-01-11 Huawei Technologies Co., Ltd. File accessing method and related device
US20170126738A1 (en) * 2013-03-14 2017-05-04 Daniel Shawcross Wilkerson Hard Object: Lightweight Hardware Enforcement of Encapsulation, Unforgeability, and Transactionality
CN106708627A (en) * 2016-12-29 2017-05-24 中国科学院计算技术研究所 Multi-virtual-machine mapping and multipath fuse acceleration method and system based on kvm
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN108062253A (en) * 2017-12-11 2018-05-22 北京奇虎科技有限公司 The communication means of a kind of kernel state and User space, device and terminal
CN108875360A (en) * 2017-05-12 2018-11-23 南京大学 Network based on KVM virtualization services isolation design
CN110457261A (en) * 2019-08-06 2019-11-15 深圳市腾讯计算机系统有限公司 Data access method, device and server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170126738A1 (en) * 2013-03-14 2017-05-04 Daniel Shawcross Wilkerson Hard Object: Lightweight Hardware Enforcement of Encapsulation, Unforgeability, and Transactionality
CN103744726A (en) * 2014-01-02 2014-04-23 西北工业大学 Two-stage scheduling method of real-time extension of Windows system
EP3115903A1 (en) * 2014-03-07 2017-01-11 Huawei Technologies Co., Ltd. File accessing method and related device
CN104794069A (en) * 2015-04-01 2015-07-22 北京创毅视讯科技有限公司 User state allocation method and system for cache in CPU
CN106708627A (en) * 2016-12-29 2017-05-24 中国科学院计算技术研究所 Multi-virtual-machine mapping and multipath fuse acceleration method and system based on kvm
CN108875360A (en) * 2017-05-12 2018-11-23 南京大学 Network based on KVM virtualization services isolation design
CN107729159A (en) * 2017-09-29 2018-02-23 华为技术有限公司 The address mapping method and device of a kind of shared drive
CN108062253A (en) * 2017-12-11 2018-05-22 北京奇虎科技有限公司 The communication means of a kind of kernel state and User space, device and terminal
CN110457261A (en) * 2019-08-06 2019-11-15 深圳市腾讯计算机系统有限公司 Data access method, device and server

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
CONGFENG JIANG: "Optimized Inter-domain Communications Among Multiple Virtual Machines Based on Shared Memory", 《 2015 IEEE 17TH INTERNATIONAL CONFERENCE ON HIGH PERFORMANCE COMPUTING AND COMMUNICATIONS, 2015 》, 11 April 2019 (2019-04-11), pages 921 - 922 *
沈健: "《Linux系统管理》", 华东理工大学出版社 *
沈健: "《Linux系统管理》", 华东理工大学出版社, pages: 151 - 154 *
王兆文: "一种提高Linux内存管理实时性的设计方案", 《计算机工程》 *
王兆文: "一种提高Linux内存管理实时性的设计方案", 《计算机工程》, vol. 40, no. 9, 26 September 2014 (2014-09-26), pages 291 - 299 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111683109A (en) * 2020-08-17 2020-09-18 烽火通信科技股份有限公司 Micro-service architecture
WO2023236930A1 (en) * 2022-06-10 2023-12-14 维沃移动通信有限公司 Memory allocation method and apparatus based on ion allocator, electronic device, and readable storage medium

Also Published As

Publication number Publication date
CN111143072B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
KR101952795B1 (en) Resource processing method, operating system, and device
US9612648B2 (en) System and method for memory channel interleaving with selective power or performance optimization
CN106897299B (en) Database access method and device
CN110750336B (en) OpenStack virtual machine memory hot-expanding method
EP3748508A1 (en) Memory management in virtualized computing
CN115576654B (en) Request processing method, device, equipment and storage medium
KR20130100689A (en) Scalable, customizable, and load-balancing physical memory management scheme
CN109960569B (en) Virtualization processing method and device
CN111104219A (en) Binding method, device, equipment and storage medium of virtual core and physical core
CN111143072A (en) User mode program memory allocation method, system and related components
EP3304294A1 (en) Method and system for allocating resources for virtual hosts
CN112732501B (en) Test method and multiprocessor SOC chip
CN114490433A (en) Management method of storage space, data processing chip, device and storage medium
CN115421787A (en) Instruction execution method, apparatus, device, system, program product, and medium
CN112162818B (en) Virtual memory allocation method and device, electronic equipment and storage medium
CN105677481A (en) Method and system for processing data and electronic equipment
CN111831451A (en) Cloud host memory allocation method, cloud host, cloud device and storage medium
CN117632843A (en) Data processing method and device, system on chip and electronic equipment
US11249760B2 (en) Parameter management between programs
US9405470B2 (en) Data processing system and data processing method
CN117632457A (en) Method and related device for scheduling accelerator
CN111813564B (en) Cluster resource management method and device and container cluster management system
CN115098272A (en) GPU resource scheduling method, scheduler, electronic device and storage medium
Lee et al. Compressed and shared swap to extend available memory in virtualized consumer electronics
CN109634721B (en) Method and related device for starting communication between virtual machine and host

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant