Method for reducing data copy among multiple processes under linux

A data copy and multi-process technology, applied in the direction of electrical digital data processing, special data processing applications, program control design, etc., can solve the problems of resource waste and low efficiency

Active Publication Date: 2014-06-04
XIAMEN YAXON NETWORKS CO LTD
View PDF6 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Data interaction between processes needs to be done through message queues, shared memory, pipes, files, etc. These methods either need to copy data such as message queues, pipes, etc., or even copy data multiple times to make the data organized in a process in a process. It can be seen in another process, and each additional process needs to copy the data once more, which is less efficient; or only two processes can share data, such as ordinary shared memory, which is usually used for each Two processes open up a memory segment as a shared memory space to complete the communication between the two processes. This shared memory cannot be reused by multiple processes, which is a serious waste of resources.

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 reducing data copy among multiple processes under linux
  • Method for reducing data copy among multiple processes under linux
  • Method for reducing data copy among multiple processes under linux

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0029] The present invention will be further described in conjunction with the accompanying drawings and specific embodiments.

[0030] As a specific embodiment, a kind of method of reducing data copying among many processes under linux of the present invention, comprises the following steps:

[0031] Step 1: Divide shared memory, defined as shared memory organization;

[0032] Step 2: Reference figure 1 As shown, the shared memory organization is divided into n memory pools of different sizes, each memory pool is composed of a memory head and N memory blocks of the same size, N is a positive integer, and the sizes of memory blocks in different memory pools are different , the memory header is used to store the usage identifier of each memory block. N memory blocks are linearly arranged behind the memory header in the form of an array. Each memory block includes a header field, a data field and a tail field. The header field is used for Store user count, memory type, memory ...

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 relates to the technical field of computer application, in particular to a method for reducing data copy among multiple processes under the linux. The method includes the following steps that firstly, a user applies for a shared storage organization; secondly, the shared storage organization is divided into multiple storage pools of different sizes and the storage pools are divided into multiple storage blocks; thirdly, a process A applies for a certain storage block, an application identification is an occupied identification and the count of the user in the head domain of the storage block a is 1; fourthly, the count of the user is added by one every time one more process applies the data in the storage block a; fifthly, the count of the user is subtracted by one every time the number of processes applying the data in the storage block a is reduced by one until the count of the user is zero, the application identification is an idle identification and the storage block a is returned to the corresponding storage pool. According to the method for reducing data copy among multiple processes under the linux, zero-copy data communication among the processes can be achieved, one-time data organization is achieved, multiple copying of the data is not needed and the data can be directly applied to the processes.

Description

technical field [0001] The invention relates to the field of computer application technology, in particular to a method for reducing data copying between multiple processes under linux. Background technique [0002] The Linux system is a system based on virtual memory. Its process spaces are independent and invisible to each other. Each process independently manages its own memory space. Data interaction between processes needs to be done through message queues, shared memory, pipes, files, etc. These methods either need to copy data such as message queues, pipes, etc., or even copy data multiple times to make the data organized in a process in a process. It can be seen in another process, and each additional process needs to copy the data once more, which is less efficient; or only two processes can share data, such as ordinary shared memory, which is usually used for each Two processes open up a memory segment as a shared memory space to complete the communication between...

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 Applications(China)
IPC IPC(8): G06F17/30G06F3/06
CPCG06F9/544
Inventor 任赋陈从华郑福弟李培明黄杭星范少卓
Owner XIAMEN YAXON NETWORKS 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