Linux kernel page table replacement-based method for tracking memory access model

A memory access and page table technology, which is applied in the field of operating system and program analysis, can solve the problem of the explosion of statistical data storage space, etc., and achieve the effect of fast tracking speed and small data volume

Inactive Publication Date: 2009-12-16
BEIHANG UNIV
View PDF0 Cites 20 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Some memory access address tracking tools have also been implemented abroad, such as valgrind, etc. Their implementation does not need to change the Linux kernel, and they trac

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
  • Linux kernel page table replacement-based method for tracking memory access model
  • Linux kernel page table replacement-based method for tracking memory access model
  • Linux kernel page table replacement-based method for tracking memory access model

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The present invention adopts following steps:

[0025] (1) Main variable settings

[0026] / / The pid of the target process, if it is 0, it means it is not started

[0027] pid_t_mt_pid_;

[0028] / / Whether the first address of the fake page table has been passed to the cr3 register

[0029] bool _mt_tran_cr3_;

[0030] / / The first address of the fake page table

[0031] pgd_t* _mt_pgd_;

[0032] / / Used to back up the first address of the real page table

[0033] pgd_t* _mt_gd_pgd_;

[0034] / / The address that triggered the page fault interrupt last time

[0035] unsigned long_l_mt_add_;

[0036] (2) Add system calls

[0037] The present invention adds three new system calls to the Linux kernel, the system call a is used to start the statistical process, the system call b is used to end the statistical process, and the system call c is used to take out the traced memory access model to the user state. In this way, the statistical process can be

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 Linux kernel page table replacement-based method for tracking a memory access model. As different between the speed of a processor and the memory access speed becomes larger and larger, a memory system becomes a bottleneck of system performance. Application programs of different natures have different memory access models and different memory behavior optimization modes. However, the prior tool cannot track the memory accesses of the programs effectively and therefore causes complex memory optimization. The method of the invention is used in a Linux system and replaces the page table of a target process by changing Linux kernel. A new page table stores only one item of a non-code segment web page, so missing page interrupt occurs every time the target process accesses a memory and virtual page access sequence of the specific target process, namely, the memory access model of programs can be tracked by recording corresponding address when the kernel processes the missing page. The method has the characteristic of light weight, and can quickly track memory access, track out a small amount of data and avoid influencing the normal operation of other processes in an operation system. The method for tracking the memory access model can guide the optimization of memory behaviors.

Description

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

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
Owner BEIHANG 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