Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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 large pages and use small pages instead
In this way, in many cases, the Linux kernel will not allocate large pages to programs, and the utilization rate of large pages is not high.

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

Embodiment Construction

[0040] The following describes how to implement large page optimization on the Linux operating system. The method is based on Linux kernel version 3.6.3, and the modification of glibc is based on glibc-2.17, which 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 a member variable long allocate_brk in the structure, and record it as the heap top position where the process has allocated a virtual address. Sets the value to 0 when the process virtual address space is initialized.

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

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
Features
  • Generate Ideas
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More