Method and device for communication between kernel mode and user mode and terminal

A communication method and kernel mode technology, applied in the field of data processing, can solve the problem of low communication efficiency between kernel mode and user mode

Inactive Publication Date: 2018-05-22
BEIJING QIHOO TECH CO LTD
View PDF4 Cites 40 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Therefore, there is a technical problem of low communicatio...

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 and device for communication between kernel mode and user mode and terminal
  • Method and device for communication between kernel mode and user mode and terminal
  • Method and device for communication between kernel mode and user mode and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0021] The embodiment of the present invention provides a kind of communication method of kernel state and user state, because the copy_from_user (), copy_to_user (), get_user () and put_user () function that realize the copy of kernel state and user state data provided by Linux system kernel will cause Therefore, the Linux system also uses other ...

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 provides a method and device for communication between a kernel mode and a user mode and a terminal, and aims at realizing high-speed communication between the kernel node and the user mode. The method comprises the following steps of: obtaining a read operation from a kernel mode program, wherein the read operation is sued for reading data in a first virtual address of a kernel modememory area, and the data is written by a user mode program; in response to the read operation, determining a shared physical address corresponding to the first virtual address according to a mappingrelationship between the kernel mode memory area and a shared memory area, wherein the shared memory area is a storage space of character device in a kernel, and the shared physical address corresponds to a second virtual address in the user mode memory area; and reading the data from the shared physical address.

Description

technical field [0001] The invention relates to the field of data processing, in particular to a communication method, device and terminal between a kernel state and a user state. Background technique [0002] In the Linux system, since the memory mapping mechanisms of the kernel mode and the user mode are different, the kernel mode cannot directly read the memory area of ​​the user mode, and the kernel mode cannot directly transfer data to the memory area of ​​the user mode. [0003] At present, in order to solve the above problems, the kernel of the Linux system provides two functions to copy data between the kernel mode and the user mode. These two functions are: copy_from_user() and copy_to_user(), and get_user() and put_user( ). Specifically, taking the kernel mode to read user mode data as an example, the kernel mode can call copy-from-user() to complete the data copy from the user mode memory area to the kernel mode memory area, and can also call copy-to-uesr() Comp...

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/54
CPCG06F9/544G06F9/545
Inventor 张建新高永岗
Owner BEIJING QIHOO TECH CO LTD
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