Method for improving utilization rate of large pages of operating system

An operating system and utilization technology, applied in multi-programming devices, resource allocation and other directions, can solve the problems of not meeting the requirements of large page alignment, low utilization rate of large pages, etc., to reduce the number of page fault interrupts and improve performance , the effect of improving program performance

Active Publication Date: 2014-08-13
PEKING UNIV
View PDF5 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

The application of the virtual address of the application does not meet the requirements of large page alignment in many cases, which makes the Linux kernel not allocate larg

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for improving utilization rate of large pages of operating system
  • Method for improving utilization rate of large pages of operating system
  • Method for improving utilization rate of large pages of operating system

Examples

Experimental program
Comparison scheme
Effect test

Example Embodiment

[0040] The following describes how to implement large page optimization on the Linux operating system. This method is based on Linux kernel version 3.6.3, the modification of glibc is based on glibc-2.17, and is suitable for machines with 64-bit x86 architecture. This method is a concrete example of implementing huge page optimization.

[0041] Modify the data structure mm_struct that records the virtual address space of the process, add the member variable long allocate_brk in the structure, and record the top position of the heap where the virtual address has been allocated by the process. The value is set to 0 when the process virtual address space is initialized.

[0042] In Linux systems, the include / linux / mm_types.h file defines data structures related to memory, including mm_struct. The kernel / fork.c file in the Linux system implements the related functions of the new process. The mm_struct structure will be initialized in the mm_init function. Add the statement mm->a...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method for improving the utilization rate of large pages of an operating system. The method comprises the steps that (1) the system adds a variable a in a virtual address space data structure of each process, and each variable a is recorded as a heap top position of a distributed virtual address of the corresponding process; (2) in the process starting, the system initiates a to 0; when any process calls a heap top setting function for the application of an internal storage, a heap top parameter b is transmitted into the system; (3) the system calculates a value c after the alignment of upward large pages of the heap top positions according to a previously-requested heap top position and a currently-requested heap top position b of the process; (4) the system assigns the current value of a to a highest heap address variable of the recorded and distributed internal storage of the process, and compares the current value with c; if the current value is smaller than c, a stack space of the process is increased according to a difference value between the current value and c; if the current value is smaller than c, the release of the internal storage is implemented; if the current value is equal to c, the calling of the internal storage is not implemented. According to the method, the utilization rate of the large pages is fully improved, so that the performance of a program is improved.

Description

technical field [0001] The invention relates to a method for increasing the utilization rate of large pages of an operating system, and belongs to the technical field of operating system memory management. technical background [0002] Paging is a common feature of modern CPUs. It establishes a mapping from the program's virtual memory space to the machine's physical memory. Memory is managed in units of pages. Many CPU architectures, including Intel x86, implement a large page mechanism, which supports physical page granularities of different sizes such as 4k, 2M, and 4M. [0003] For the sake of simplicity, the current operating system (such as Linux) generally uses 4K pages, which makes the range of virtual addresses covered by each mapping only 4K. If a memory with a length of 2M needs to be accessed, the operating system needs to handle 512 page fault interrupts, and each page fault interrupt allocates 4K memory. [0004] Taking the Linux operating system as an exam...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/50
Inventor 汪小林罗韬威罗英伟
Owner PEKING UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products