CN108197038A - A kind of Linux data transmission methods, device and user terminal - Google Patents

A kind of Linux data transmission methods, device and user terminal Download PDF

Info

Publication number
CN108197038A
CN108197038A CN201810100464.8A CN201810100464A CN108197038A CN 108197038 A CN108197038 A CN 108197038A CN 201810100464 A CN201810100464 A CN 201810100464A CN 108197038 A CN108197038 A CN 108197038A
Authority
CN
China
Prior art keywords
address
memory
space
virtual
physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810100464.8A
Other languages
Chinese (zh)
Inventor
杨雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Forward Industrial Co Ltd
Original Assignee
Shenzhen Forward Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Forward Industrial Co Ltd filed Critical Shenzhen Forward Industrial Co Ltd
Priority to CN201810100464.8A priority Critical patent/CN108197038A/en
Publication of CN108197038A publication Critical patent/CN108197038A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0615Address space extension
    • G06F12/0623Address space extension for memory modules
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0806Multiuser, multiprocessor or multiprocessing cache systems
    • G06F12/0842Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources

Abstract

The present invention provides a kind of Linux data transmission methods, device and user terminal, wherein the method includes:According to the Virtual Space first address after known physical space first address and mapping, the address conversion interface between virtual address and physical address is generated;Distribute available physical address in memory to be used corresponding physical space memory block, and pass through address conversion interface and obtain the Virtual Space memory block of corresponding virtual address, during in order to which data to be stored being written, physical space memory block is corresponded to by operating Virtual Space memory block indirect operation.The present invention realizes that the zero-copy of data transmits by Memory Allocation, it is not take up the system resources such as CPU, it avoids and causes system burden and then drag slow system when volume of transmitted data is huge, substantially increase the ability and executive capability of the data transmission of linux system, for maintenance personnel based on the transmission of data is brought under linux system conveniently.

Description

A kind of Linux data transmission methods, device and user terminal
Technical field
The present invention relates to Linux technical field of data transmission, more specifically to a kind of Linux data transmission methods, Device and user terminal.
Background technology
Linux be it is a set of it is free using and Free propagation class Unix operating systems, be one based on POSIX and UNIX Multi-user, multitask, the operating system for supporting multithreading and multi -CPU.It can run main unix tool software, application program And procotol.It supports 32 and 64 hardware.Linux inherits design philosophys of the Unix using network as core, is one The multiple-user network operating system that performance is stablized.
Modern CPU usually realizes different operating modes, corresponds to the permission of different stage.Go out from the angle of CPU Hair, in order to protect the safety of kernel, Linux division systems structure is user's space and kernel spacing, in data transmission procedure Data copy operation result in great CPU overhead, limit operating system effectively carry out data transmission operation ability.
To sum up, the data transfer mode under existing linux system is the transmission that data are realized by data copy, Data copy causes to occupy the system resources such as a large amount of CPU or even causes system burden so that dragging the operation of slow whole system, greatly The ability and executive capability of the data transmission of big limitation linux system are maintenance personnel based under linux system to the biography of data It is defeated to bring inconvenience.
Invention content
In view of this, the present invention provides a kind of Linux data transmission methods, device and user terminal to solve the prior art Deficiency.
To solve the above problems, the present invention provides a kind of 1, Linux data transmission methods, which is characterized in that including:
According to known physical space first address and mapping after Virtual Space first address, generation virtual address with physically Address conversion interface between location;
It distributes the available physical address in memory to be used corresponding physical space memory block, and passes through described address Translation interface obtains the Virtual Space memory block of the corresponding virtual address, in order to which data to be stored is written When, the physical space memory block corresponding by operating the Virtual Space memory block indirect operation.
It is preferably, described that " according to the Virtual Space first address after known physical space first address and mapping, generation is virtual Before address conversion interface between address and physical address ", further include:
When memory headroom initializes, the physical memory that retains or distribute by mmap mapped systems obtains Virtual Space head Address.
It is preferably, described that " according to the Virtual Space first address after known physical space first address and mapping, generation is virtual After address conversion interface between address and physical address ", further include:
After free memory release, the adjacent free memory adjacent with the free memory is confirmed;
If the adjacent free memory is unallocated memory, the free memory and the adjacent free memory are closed And generate the memory to be used.
Preferably, described " after free memory release, confirming the adjacent free memory adjacent with the free memory " it Afterwards, it further includes:
If the adjacent free memory is storage allocation, by the free memory separately as described to be used interior It deposits.
Preferably, described address translation interface includes physics to virtual interface and virtual to physical interface;
It is described " according to known physical space first address and mapping after Virtual Space first address, generation virtual address with Address conversion interface between physical address " includes:
Based on the linear corresponding relation of the physical space first address, the Virtual Space first address and length, give birth to respectively Into the virtual address to the virtual to physical interface of the physical address and the physical address to the virtual address Physics is to virtual interface.
Preferably, the space of the free memory is allocated management of by free chained lists and busy chained lists;
Before described " after free memory release, confirming the adjacent free memory adjacent with the free memory ", also wrap It includes:
According to memory application, compare the free chained lists space application space corresponding with the memory application it is big It is small;
If the space of the free chained lists is not less than the application space size, it is required that will split the free chained lists Space and remaining space, and by the busy chained lists management required space, it is described remaining empty by free chained lists management Between, in order to after free memory discharges, be used according to the allocation managing of the free chained lists and the busy chained lists with described The adjacent adjacent free memory of memory.
In addition, to solve the above problems, the present invention also provides a kind of Linux data transmission devices, including:Transmission module and Distribution module;
The transmission module, for according to the Virtual Space first address after known physical space first address and mapping, life Into the address conversion interface between virtual address and physical address;
The distribution module, for distributing the available physical address in memory to be used corresponding physical space memory Block, and pass through described address translation interface and obtain the Virtual Space memory block of the corresponding virtual address, in order to right When data to be stored is written, the physical space corresponding by operating the Virtual Space memory block indirect operation Memory block.
In addition, to solve the above problems, the present invention also provides a kind of user terminal, including memory and processor, institute Memory is stated for storing Linux data distributing programs, the processor runs the Linux data distributing programs so that described User terminal performs Linux data transmission methods as described above.
In addition, to solve the above problems, the present invention also provides a kind of computer readable storage mediums, which is characterized in that institute It states and Linux data distributing programs is stored on computer readable storage medium, the Linux data distributing programs are held by processor Linux data transmission methods as described above are realized during row.
A kind of Linux data transmission methods provided by the invention, device and user terminal.Wherein, it is provided by the present invention Method is based on Linux by mapping and establishing between the virtual address of virtual memory space and the physical address in physical memory space Address conversion interface, and pass through address conversion interface and obtain Virtual Space corresponding with physical space memory block memory block, so as to It realizes that user need to only put it into memory headroom when needing to carry out the transmission of data to be stored, is directly obtained using distribution Virtual Space memory block, and then physical space memory block is directly obtained by address conversion interface, object is written in storage data indirectly Manage space memory block.Linux data transmission methods provided by the present invention realize that the zero-copy of data transmits by Memory Allocation, The system resources such as CPU are not take up, avoids and causes system burden and then slow system is dragged when volume of transmitted data is huge, greatly improve The ability and executive capability of the data transmission of linux system is maintenance personnel based under linux system to the conveyor of data Convenience is carried out.
Description of the drawings
Fig. 1 is the structure diagram of hardware running environment that Linux data transmission methods embodiment scheme of the present invention is related to;
Fig. 2 is the flow diagram of Linux data transmission methods first embodiment of the present invention;
Fig. 3 is the flow diagram of Linux data transmission methods second embodiment of the present invention;
Fig. 4 is the flow diagram of Linux data transmission methods 3rd embodiment of the present invention;
Fig. 5 is the flow diagram of Linux data transmission methods fourth embodiment of the present invention;
Fig. 6 is the flow diagram of the 5th embodiment of Linux data transmission methods of the present invention;
Fig. 7 is the high-level schematic functional block diagram of Linux data transmission devices of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, wherein same or similar label represents same or like from beginning to end Element or with same or like function element.
In addition, term " first ", " second " are only used for description purpose, and it is not intended that instruction or hint relative importance Or the implicit quantity for indicating indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include one or more this feature.In the description of the present invention, " multiple " are meant that two or more, Unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc. Term should be interpreted broadly, for example, it may be being fixedly connected or being detachably connected or integral;Can be that machinery connects It connects or is electrically connected;It can be directly connected, can also be indirectly connected by intermediary, can be in two elements The connection in portion or the interaction relationship of two elements.It for the ordinary skill in the art, can be according to specific feelings Condition understands the concrete meaning of above-mentioned term in the present invention.
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, the structure diagram of the hardware running environment of terminal that Fig. 1, which is the embodiment of the present invention, to be related to.
Terminal of the embodiment of the present invention can be PC or smart mobile phone, tablet computer, E-book reader, MP3 are broadcast Putting device, MP4 players, pocket computer etc. has the packaged type terminal device of display function.
As shown in Figure 1, the terminal can include:Processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is used to implement the connection communication between these components. User interface 1003 can include display screen, input unit such as keyboard, remote controler, and optional user interface 1003 can also include Standard wireline interface and wireless interface.Network interface 1004 can optionally include standard wireline interface and wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or the memory of stabilization, such as magnetic disk storage. Memory 1005 optionally can also be the storage device independently of aforementioned processor 1001.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..In addition, mobile terminal can also configure gyroscope, barometer, hygrometer, thermometer, infrared ray sensing The other sensors such as device, details are not described herein.
It will be understood by those skilled in the art that the restriction of the terminal shown in Fig. 1 not structure paired terminal, can include than It illustrates more or fewer components and either combines certain components or different components arrangement.
As shown in Figure 1, as operating system, number can be included in a kind of memory 1005 of computer readable storage medium According to interface control program, network attachment procedure and Linux data distributing programs.
A kind of Linux data transmission methods provided by the invention, device and user terminal.Wherein, the method passes through interior The zero-copy transmission that data are realized in distribution is deposited, is not take up the system resources such as CPU, is avoided and is caused system burden and then passed in data Slow system is dragged when throughput rate is huge, substantially increases the ability and executive capability of the data transmission of linux system, is maintenance personnel's base The transmission of data is brought under linux system conveniently.
Embodiment 1:
With reference to Fig. 2, first embodiment of the invention provides a kind of Linux data transmission methods, including:
Step S10 according to the Virtual Space first address after known physical space first address and mapping, generates virtual address Address conversion interface between physical address;
It is above-mentioned, it is to be understood that Linux is a set of free class Unix operating systems using with Free propagation, is one A multi-user based on POSIX and UNIX, multitask, the operating system for supporting multithreading and multi -CPU.It can run main Unix tool software, application program and procotol.It supports 32 and 64 hardware.Linux inherit Unix using network as The design philosophy of core is the multiple-user network operating system that a performance is stablized.
It is above-mentioned, based on linux system, it is required to carry out largely occupying CPU progress backrests when data are transmitted, so as to real The transmission of existing data, causes CPU great expense incurreds, greatly causes system burden, limit (SuSE) Linux OS effectively into line number According to the operational capacity of transmission.
It is above-mentioned, according to known physical space first address and the Virtual Space first address mapped, encapsulate out virtual address Address conversion interface between physical address, the interface and the correspondence for realizing the data between confirmation physical address and virtual address Relationship and address conversion.
Step S20 distributes the available physical address in memory to be used corresponding physical space memory block, and passes through Described address translation interface obtains the Virtual Space memory block of the corresponding virtual address, in order to data to be stored When being written, the physical space memory block corresponding by operating the Virtual Space memory block indirect operation.
Above-mentioned, memory can be that discrete space memory realizes data transmission so as to carry out memory sharing.System is needed to use Family space provides the interface of the address conversion under the corresponding different spaces of the communal space.
It is above-mentioned, when carrying out data transmission, applied according to required space, search the physical memory addresses block that can be used, Then call address translation interface can obtain corresponding virtual address block, for users to use.When user needs to place data into During memory headroom, directly using obtained virtual address block is distributed, it can pass through if desired for the relevant information of corresponding physical address Address conversion interface obtains.And then when further data are written, virtual address that direct operation user is distributed it is virtual Physical space memory block is written in space address block, storage data address translation interface indirectly.
The method that the present embodiment is provided is based on Linux by mapping and establishing the virtual address and object of virtual memory space Address conversion interface between the physical address of reason memory headroom, and pass through address conversion interface and obtain and physical space memory block pair The Virtual Space memory block answered, so as to fulfill when needing to carry out the transmission of data to be stored, user need to only put it into memory Space, the Virtual Space memory block directly obtained using distribution, and then directly obtained in physical space by address conversion interface Physical space memory block is written in data to be stored by counterfoil.Linux data transmission methods provided by the present invention pass through memory point With the zero-copy transmission for realizing data, the system resources such as CPU are not take up, avoids and causes system burden and then in volume of transmitted data Slow system is dragged when huge, the ability and executive capability of the data transmission of linux system is substantially increased, is based on for maintenance personnel The transmission of data is brought under linux system conveniently.
Embodiment 2:
With reference to Fig. 3, second embodiment of the invention provides a kind of Linux data transmission methods, based on above-mentioned shown in Fig. 2 the One embodiment, " according to the Virtual Space first address after known physical space first address and mapping, generation is empty by the step S10 Intend the address conversion interface between address and physical address " before, it further includes:
Step S30, when memory headroom initializes, the physical memory that retains or apply by mmap mapped systems obtains void Intend space first address.
It is above-mentioned, it is to be understood that mmap is by a file or other object maps into memory.File is mapped to more On a page, if the sum of size of the not all page of the size of file, the space that the last one page is not used will be reset. Mmap acts on very big in user's space invoking upon mapping system.Mmap operations provide a kind of mechanism, and user program is allowed directly to visit Ask device memory, this mechanism compares and copies data mutually in user's space and kernel spacing, more efficient.Requiring height It is more commonly used in the application of performance.Mmap mapping memories must be the integral multiple of page-size, and stream-oriented equipment cannot carry out The realization of mmap, mmap are related with hardware.
Above-mentioned, in chip initiation, when as memory headroom initializes, system calls mmap mapped systems to reserve or apply Physical memory, obtain corresponding Virtual Space first address;Driving calls remap_pfn_range according to physical address and length It is mapped, returns to Virtual Space address and be given to user's space.
Embodiment 3:
With reference to Fig. 4, third embodiment of the invention provides a kind of Linux data transmission methods, based on above-mentioned shown in Fig. 2 the One embodiment, " according to the Virtual Space first address after known physical space first address and mapping, generation is empty by the step S10 Intend the address conversion interface between address and physical address " after, it further includes:
Step S40 after free memory release, confirms the adjacent free memory adjacent with the free memory;
Above-mentioned, the present embodiment realizes the allocation managing of memory by establishing memory management mechanism.In memory by using family Using or during system automatic governing after release, memory management mechanism confirm release free memory and it is adjacent thereto it is adjacent can With memory, for example, can be the free memory of the memory address neighbor address of free memory in memory pool.
Above-mentioned, memory management mechanism is realized including but not limited to the mechanism of memory pool;Memory Allocation can be used as connection The interface of shared drive, the mode that when distribution is not intended as real memory batch operation are realized.
Step S50, if the adjacent free memory is that memory is not used, by the free memory with it is described adjacent available Memory merges, and generates the memory to be used.
Step S60, if the adjacent free memory treats the free memory separately as described to have used memory Use memory.
Above-mentioned, in the present embodiment, user or during system releasing memory judges whether the memory is that memory is not used, from And attempt to merge memory memory adjacent thereto, merge success, conduct after merging if being that memory is not used if adjacent memory One monoblock memory uses;If its adjacent memory for that cannot merge if having used memory, the memory block of the release is only as one Vertical memory block is used.
Embodiment 4:
With reference to Fig. 5, fourth embodiment of the invention provides a kind of Linux data transmission methods, based on above-mentioned shown in Fig. 2 the One embodiment, described address translation interface include physics to virtual interface and virtual to physical interface;
" according to the Virtual Space first address after known physical space first address and mapping, generation is virtual by the step S10 Address conversion interface between address and physical address " includes:
Step S11, the linear corresponding pass based on the physical space first address, the Virtual Space first address and length System, generate respectively the virtual address to the physical address virtual to physical interface and the physical address arrive described in The physics of virtual address is to virtual interface.
Memory headroom above-mentioned, that system is reserved or applied, because physical address space first address is first with virtual address space Address and length are linear corresponding relations, it is possible to by relationship therebetween encapsulate out virtual address to physical address with And physical address is to the transformational relation interface of virtual address;As, it physical space first address and is mapped according to known to reserved Virtual Space first address, encapsulate out by virtual address to physical address translation interface phy_to_virt and virtual address to The translation interface virt_to_phy of physical address.
Embodiment 5:
With reference to Fig. 6, fourth embodiment of the invention provides a kind of Linux data transmission methods, based on above-mentioned shown in Fig. 4 the Three embodiments, the space of the free memory are allocated management of by free chained lists and busy chained lists;
The step S10 " after free memory release, confirming the adjacent free memory adjacent with the free memory " it Before, it further includes:
Step S70, according to memory application, the space application corresponding with the memory application for comparing the free chained lists is empty Between size;
It is above-mentioned, it is to be understood that chained list is storage organization discontinuous, non-sequential on a kind of physical memory cell, number Logical order according to element is realized by the pointer link orders in chained list.Chained list is (in chained list each by a series of nodes A element is known as node) it forms, node can be dynamically generated at runtime.Each node includes two parts:One is storage The data field of data element, the other is storing the pointer field of next node address.Compared to linear list sequential organization, operation It is complicated.Due to necessarily storing in order, chained list can reach the complexity of O (1) when being inserted into, than another linear list Sequence list is faster, but is to look for a node or accesses the node of particular number then needing time of O (n), and linear list It is O (logn) and O (1) respectively with the corresponding time complexity of sequence list.
Above-mentioned, memory pool mechanism managing internal memory is realized using two chained lists (free, busy);Each linked list maintenance Location and length are effective attribute.
Above-mentioned, during initialization, free chained lists are currently available physical memory space attribute, and busy chained lists are sky, in having When depositing application, that is, start to compare the size in the space application space corresponding with memory application in free chained lists.
Step S80 if the space of the free chained lists is not less than the application space size, will split the free chains Table is required space and remaining space, and by the busy chained lists management required space, institute is managed by the free chained lists State remaining space, in order to after free memory discharges, according to the allocation managing of the free chained lists and the busy chained lists with The adjacent adjacent free memory of the free memory.
It is above-mentioned, if space is more than or equal to the memory of required application, free chained lists are split as the required space applied And remaining space, busy linked list maintenances then are transferred into the space of required application, remaining space transfers to free linked list maintenances;When having When memory discharges, judge that adjacent memory is then merged into for unallocated memory in free chained lists, adjacent memory is that storage allocation has been then It cannot merge, newly be added in free chained lists and safeguard.
In addition, with reference to figure 7, the present invention also provides a kind of Linux data transmission devices, including:Transmission module 10 and distribution Module 20;
The transmission module 10, for according to known physical space first address and mapping after Virtual Space first address, Generate the address conversion interface between virtual address and physical address;
The distribution module 20, for distributing in the corresponding physical space of the available physical address in memory to be used Counterfoil, and pass through described address translation interface and obtain the Virtual Space memory block of the corresponding virtual address, in order to It is empty by operating the corresponding physics of the Virtual Space memory block indirect operation when data to be stored is written Between memory block.
In addition, the present invention also provides a kind of user terminal, including memory and processor, the memory is used to store Linux data distributing programs, the processor runs the Linux data distributing programs so that the user terminal performs as above State the Linux data transmission methods.
In addition, the present invention also provides a kind of computer readable storage mediums, which is characterized in that the computer-readable storage Linux data distributing programs are stored on medium, are realized when the Linux data distributing programs are executed by processor such as above-mentioned institute State Linux data transmission methods.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or system including a series of elements not only include those elements, and And it further includes other elements that are not explicitly listed or further includes intrinsic for this process, method, article or system institute Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this Also there are other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions use so that a station terminal equipment (can be mobile phone, Computer, server or network equipment etc.) perform method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow shift that bright specification and accompanying drawing content are made directly or indirectly is used in other relevant skills Art field, is included within the scope of the present invention.

Claims (9)

1. a kind of Linux data transmission methods, which is characterized in that including:
According to the Virtual Space first address after known physical space first address and mapping, generation virtual address and physical address it Between address conversion interface;
It distributes the available physical address in memory to be used corresponding physical space memory block, and passes through described address and convert Interface obtains the Virtual Space memory block of the corresponding virtual address, during in order to which data to be stored being written, The physical space memory block corresponding by operating the Virtual Space memory block indirect operation.
2. Linux data transmission methods as described in claim 1, which is characterized in that described " according to the first ground of known physical space Virtual Space first address behind location and mapping, generates the address conversion interface between virtual address and physical address " before, also wrap It includes:
When memory headroom initializes, by mmap mapped system physical memories, Virtual Space first address is obtained.
3. Linux data transmission methods as described in claim 1, which is characterized in that described " according to the first ground of known physical space Virtual Space first address behind location and mapping, generates the address conversion interface between virtual address and physical address " after, also wrap It includes:
After free memory release, the adjacent free memory adjacent with the free memory is confirmed;
If the adjacent free memory is unallocated memory, the free memory is merged with the adjacent free memory, it is raw Into the memory to be used.
4. Linux data transmission methods as claimed in claim 3, which is characterized in that described " after free memory release, to confirm After the adjacent free memory adjacent with the free memory ", further include:
If the adjacent free memory is storage allocation, by the free memory separately as the memory to be used.
5. Linux data transmission methods as described in claim 1, which is characterized in that
Described address translation interface includes physics to virtual interface and virtual to physical interface;
It is described " according to the Virtual Space first address after known physical space first address and mapping, to generate virtual address and physics Address conversion interface between address " includes:
Based on the linear corresponding relation of the physical space first address, the Virtual Space first address and length, institute is generated respectively State virtual address to the physical address virtual to physical interface and the physical address to the virtual address physics To virtual interface.
6. the Linux data transmission methods as described in claim 3 or 4, which is characterized in that the space of the free memory is by free Chained list and busy chained lists allocate management of;
Before described " after free memory release, confirming the adjacent free memory adjacent with the free memory ", further include:
According to memory application, the size in the space application space corresponding with the memory application of the free chained lists is compared;
If the space of the free chained lists is not less than the application space size, the free chained lists will be split as required space And remaining space, and the required space is managed by the busy chained lists, the remaining space is managed by the free chained lists, with Convenient for after free memory discharges, according to the allocation managing of the free chained lists and the busy chained lists and the free memory phase Adjacent adjacent free memory.
7. a kind of Linux data transmission devices, which is characterized in that including:Transmission module and distribution module;
The transmission module, for according to the Virtual Space first address after known physical space first address and mapping, generation void Intend the address conversion interface between address and physical address;
The distribution module, for distributing the available physical address in memory to be used corresponding physical space memory block, And pass through described address translation interface and obtain the Virtual Space memory block of the corresponding virtual address, it is deposited in order to treat When storage data are written, the physical space memory corresponding by operating the Virtual Space memory block indirect operation Block.
8. a kind of user terminal, which is characterized in that including memory and processor, the memory is used to store Linux numbers According to transmission program, the processor runs the Linux data distributing programs so that the user terminal performs such as claim Any one of 1-6 Linux data transmission methods.
9. a kind of computer readable storage medium, which is characterized in that Linux numbers are stored on the computer readable storage medium According to transmission program, realized as described in any one of claim 1-6 when the Linux data distributing programs are executed by processor Linux data transmission methods.
CN201810100464.8A 2018-02-01 2018-02-01 A kind of Linux data transmission methods, device and user terminal Pending CN108197038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810100464.8A CN108197038A (en) 2018-02-01 2018-02-01 A kind of Linux data transmission methods, device and user terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810100464.8A CN108197038A (en) 2018-02-01 2018-02-01 A kind of Linux data transmission methods, device and user terminal

Publications (1)

Publication Number Publication Date
CN108197038A true CN108197038A (en) 2018-06-22

Family

ID=62592308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810100464.8A Pending CN108197038A (en) 2018-02-01 2018-02-01 A kind of Linux data transmission methods, device and user terminal

Country Status (1)

Country Link
CN (1) CN108197038A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684234A (en) * 2018-12-21 2019-04-26 深圳市趣创科技有限公司 A kind of data transmission method and system
CN110737608A (en) * 2018-07-03 2020-01-31 阿里巴巴集团控股有限公司 data operation method, device and system
CN110858145A (en) * 2018-08-22 2020-03-03 龙芯中科技术有限公司 Method and device for updating BIOS (basic input output System) in Linux operating system
CN112416815A (en) * 2020-12-09 2021-02-26 中船重工(武汉)凌久电子有限责任公司 High-speed storage playback method based on SRIO
WO2022151985A1 (en) * 2021-01-18 2022-07-21 苏州浪潮智能科技有限公司 Virtual memory-based data storage method and apparatus, device, and storage medium
CN115220936A (en) * 2022-09-20 2022-10-21 之江实验室 Method and device for zero copying of multi-class sensor data in controller

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122883A (en) * 2006-08-09 2008-02-13 中兴通讯股份有限公司 Memory allocation method for avoiding RAM fragmentation
CN105450986A (en) * 2015-11-12 2016-03-30 厦门雅迅网络股份有限公司 Video processing method in Linux system
CN107278292A (en) * 2016-06-21 2017-10-20 华为技术有限公司 A kind of mapping method of virutal machine memory, device and data transmission set
CN107357739A (en) * 2017-07-21 2017-11-17 郑州云海信息技术有限公司 A kind of method and apparatus of data internal sort
US10049046B1 (en) * 2014-05-28 2018-08-14 EMC IP Holding Company LLC Methods and apparatus for memory tier page cache with zero file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122883A (en) * 2006-08-09 2008-02-13 中兴通讯股份有限公司 Memory allocation method for avoiding RAM fragmentation
US10049046B1 (en) * 2014-05-28 2018-08-14 EMC IP Holding Company LLC Methods and apparatus for memory tier page cache with zero file
CN105450986A (en) * 2015-11-12 2016-03-30 厦门雅迅网络股份有限公司 Video processing method in Linux system
CN107278292A (en) * 2016-06-21 2017-10-20 华为技术有限公司 A kind of mapping method of virutal machine memory, device and data transmission set
CN107357739A (en) * 2017-07-21 2017-11-17 郑州云海信息技术有限公司 A kind of method and apparatus of data internal sort

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737608A (en) * 2018-07-03 2020-01-31 阿里巴巴集团控股有限公司 data operation method, device and system
CN110737608B (en) * 2018-07-03 2024-03-15 阿里巴巴集团控股有限公司 Data operation method, device and system
CN110858145A (en) * 2018-08-22 2020-03-03 龙芯中科技术有限公司 Method and device for updating BIOS (basic input output System) in Linux operating system
CN109684234A (en) * 2018-12-21 2019-04-26 深圳市趣创科技有限公司 A kind of data transmission method and system
CN112416815A (en) * 2020-12-09 2021-02-26 中船重工(武汉)凌久电子有限责任公司 High-speed storage playback method based on SRIO
CN112416815B (en) * 2020-12-09 2023-05-23 中船重工(武汉)凌久电子有限责任公司 High-speed storage playback method based on SRIO
WO2022151985A1 (en) * 2021-01-18 2022-07-21 苏州浪潮智能科技有限公司 Virtual memory-based data storage method and apparatus, device, and storage medium
CN115220936A (en) * 2022-09-20 2022-10-21 之江实验室 Method and device for zero copying of multi-class sensor data in controller

Similar Documents

Publication Publication Date Title
CN108197038A (en) A kind of Linux data transmission methods, device and user terminal
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
CN107690622B (en) Method, equipment and system for realizing hardware acceleration processing
EP1805629B1 (en) System and method for virtualization of processor resources
CN103425538B (en) Process communication method and system
CN105900105A (en) Media protection policy enforcement for multiple-operating-system environments
JP7141804B2 (en) Method, device, electronic device and storage medium for resource management
US20210117244A1 (en) Resource manager access control
CN101150487A (en) A transmission method for zero copy network packet
CN101150488A (en) A receiving method for zero copy network packet
CN108255598A (en) The virtual management platform resource distribution system and method for performance guarantee
CN103164278A (en) Real-time dynamic memory manager achieving method for multi-core processor
US8930955B2 (en) Controlling growth in virtual disks via utilization of previously used and free disk block space
US8006055B2 (en) Fine granularity hierarchiacal memory protection
WO2006065694A2 (en) Programmable transaction initiator architecture for systems with secure and non-secure modes
CN107818054A (en) Distribute method and system of the continuous physical memory space to equipment
WO2023207361A1 (en) Memory management method, system, device and computer readable storage medium
CN103491193B (en) A kind of method and apparatus of file-sharing
CN114424172A (en) Virtual memory metadata management
CN109977037A (en) A kind of DMA data transfer method and system
CN103150217A (en) Design method of multi-core processor operating system
CN114625482A (en) Equipment management method and device
US7793051B1 (en) Global shared memory subsystem
US20140289739A1 (en) Allocating and sharing a data object among program instances
CN115729845A (en) Data storage device and data processing method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180622