Unlock instant, AI-driven research and patent intelligence for your innovation.

Address mapping method and device for shared memory

A technology of shared memory and address mapping, which is applied in the direction of multi-program device, inter-program communication, program control design, etc., and can solve the problem of low conversion efficiency

Active Publication Date: 2021-01-15
CHENGDU HUAWEI TECH
View PDF9 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Embodiments of the present invention provide an address mapping method and device for a shared memory, which solves the problem of low conversion efficiency between addresses of the shared memory in the prior art

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
  • Address mapping method and device for shared memory
  • Address mapping method and device for shared memory
  • Address mapping method and device for shared memory

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0037] At present, the deployment of the memory in the controller is gradually switched from the kernel state to the user state. Most of the services have been deployed in the user state, and a small number of services (such as drivers, etc.) are still deployed in the kernel state. Among them, the memory deployed in the user mode needs to be accessed using the user mode virtual address, and the memory deployed in the kernel mode needs to be accessed using the kernel mode virtual address. The user mode and kernel mode here are two operating levels of the operating system, and the Intel CPU provides three levels of operating modes, Ring0-Ring3. Ring0 has the highest level and Ring3 has the lowest level.

[0038] User state: When a process is executing user code, it is said that the process is in the user running state, which can also be referred to as user state for short. At this time, the processor runs in the user code with the lowest privilege level (level 3). Kernel state:...

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 application relates to the technical field of data storage and provides an address mapping method and device of a shared memory to convert addresses of a shared memory more efficiently. The methodcomprises: when a first controller receives a shared memory mapping request triggered by a first user mode process, acquiring, by the first controller, a first user mode virtual address from a specified virtual address section; determining, by the first controller, a first kernel mode virtual address corresponding to the first user mode virtual address according to the specified virtual address section, the first user mode virtual address and a first linear relationship, wherein the first linear relationship is used for indicating a relationship between user mode virtual addresses and the kernel mode virtual addresses; determining a first physical address of the shared memory according to the first kernel mode virtual address and a second linear relationship, wherein the shared memory isa memory shared by a user mode process and a kernel mode process, and the second linear relationship is used for indicating a relationship between kernel mode virtual address and physical addresses.

Description

technical field [0001] The embodiments of the present application relate to the technical field of data storage, and in particular, to an address mapping method and device for a shared memory. Background technique [0002] At present, the memory deployment is gradually switching from the kernel mode to the user mode. Most services have been deployed in the user mode, and the memory deployed in the user mode needs to be accessed using the user mode virtual address. A small number of services (for example, drivers, etc.) are still deployed in the kernel state, mainly for direct memory access (Direct Memory Access, DMA) and remote direct memory access (Remote Direct Memory Access, RDMA) operations. In order to reduce data copy between user state processes and between user state processes and kernel state processes, it can be realized by sharing memory. Shared memory refers to a logical memory that allows multiple processes to share. Shared memory is the fastest way to share da...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/54
CPCG06F9/544
Inventor 赵冬梅邓晓阳
Owner CHENGDU HUAWEI TECH