CN101977195A - Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism - Google Patents

Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism Download PDF

Info

Publication number
CN101977195A
CN101977195A CN2010105254383A CN201010525438A CN101977195A CN 101977195 A CN101977195 A CN 101977195A CN 2010105254383 A CN2010105254383 A CN 2010105254383A CN 201010525438 A CN201010525438 A CN 201010525438A CN 101977195 A CN101977195 A CN 101977195A
Authority
CN
China
Prior art keywords
communication
message
domain
inter
territory
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.)
Granted
Application number
CN2010105254383A
Other languages
Chinese (zh)
Other versions
CN101977195B (en
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.)
Beijing Cool Data Technology Co ltd
Original Assignee
Xian Jiaotong University
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 Xian Jiaotong University filed Critical Xian Jiaotong University
Priority to CN 201010525438 priority Critical patent/CN101977195B/en
Publication of CN101977195A publication Critical patent/CN101977195A/en
Application granted granted Critical
Publication of CN101977195B publication Critical patent/CN101977195B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for realizing a virtual machine inter-domain communication protocol based on a shared memory mechanism, which can solve the inter-domain communication problem of a virtual machine by adopting the shared memory mechanism. A brand-new inter-domain Socket communication protocol is designed based on the current Socket interface standard, so as to satisfy the requirements of inter-domain communication and communication between subdomains and internet. The protocol adopts the same addressing mode (ip address and port number) as ipv4, a central router determines inter-domain communication and communication between subdomains and internet via ip addresses, when the inter-domain communication is determined, the shared memory mechanism is adopted to realize rapid inter-domain information transfer, when communication between subdomains and internet is determined, the central router encapsulates communication packets into standard ipv4 packets for forwarding, data sent by internet are received by the central router, a broadcasting mechanism is adopted to distribute the data to each domain in the server, the domains receive the data and actively abandon the data if having no corresponding processing handlers, and a congestion control strategy between the central router and the subdomains refers to a fresh milk strategy.

Description

A kind of implementation method based on shared drive mechanism virtual machine inter-domain communication agreement
Technical field
The present invention relates to a kind of design and implementation method of virtual machine inter-domain communication agreement, especially design a kind of in multiple-core server the implementation method based on shared drive mechanism virtual machine inter-domain communication agreement.
Background technology
Along with development of electronic technology, check figure integrated on the single processor of server is more and more, and integrated more core is called a kind of trend on the uniprocessor, makes the parallel processing capability of server strengthen greatly thus.Yet the development of operating system does not well utilize this hardware advances advantage, makes the actual performance of whole system not promote significantly because of the lifting of hardware performance.The researcher proposes a kind of new software system architecture at this problem, promptly adopts Intel Virtualization Technology that a server is divided into a plurality of territories that can move SOS simultaneously.
After carrying out virtual division, for fear of the hardware access conflict, each territory can not all have complete hardware operation ability, and the territory that has only has the disk access function, and what have only has a network access functions.Isolated each other between each territory, can't directly communicate.In this simultaneously, the subdomain that does not have network access functions also can't communicate with extraneous internet.
Summary of the invention
The objective of the invention is to solve the communication issue between each subdomain in the above-mentioned monitor of virtual machine, and the communication issue between subdomain and the extraneous the Internet, thereby provide a kind of communication protocol to satisfy the implementation method based on shared drive mechanism virtual machine inter-domain communication agreement of Berkeley socket interface standard.
For achieving the above object, the technical solution used in the present invention is:
1) territory that will have a direct access ability of network is called main territory, and its co-domain is called subdomain;
2) each territory adopts the ip address to carry out unique identification, and it is that port numbers identifies that the application program in the territory adopts accessing points;
3) monitor of virtual machine plays center router, ip according to each subdomain judges recipient and transmit leg, directly adopt shared drive mechanism to carry out the message transmission for inter-domain communication, for then adopting the message encapsulation mechanism with PERCOM peripheral communication, the ipv4 message that the information encapsulation of this agreement is called standard is carried out internet communication;
4) each subdomain has a reception buffering, each socket (is also referred to as " socket ", being used to describe IP address and port, is the variable of a communication chain, application program usually by " socket " to the network request of sending or reply network requests) have a receiving cache queue;
5) for inter-domain communication, center router directly sends to message the reception buffering of corresponding domain according to recipient ip address;
6) communicate by letter with extraneous for each territory, when the extraneous information that sends is received in main territory this information is broadcasted to each subdomain, when not handling this message procedure and exist as if it for each subdomain, this message is abandoned automatically;
7) each territory has a work queue (work queue is a kind of mechanism that Linuxkernel postpones work execution) that is used for dispatch messages, receive buffering every the regular hour run-down, the message of the inside is distributed to corresponding treatment progress according to port numbers, message is inserted the receiving cache queue of corresponding socket.
Directly calling virtual machine transfer when 8) each territory socket sends message transmits;
9) each socket has a receiving cache queue, and each territory socket scans its receiving cache queue when receiving message, therefrom obtains message.
The present invention uses shared drive mechanism that communication issue between each territory of virtual machine is handled, and is consistent with Berkeley standard socket interface.The mode that adopts the ip address to add port numbers is carried out addressing, and is consistent with existing ipv4 agreement, makes the programmer need not special study and just can use this invention agreement.Message passing mechanism based on shared drive can be avoided the unnecessary data copy function, improves inter-domain communication efficient.The realization of this agreement simultaneously only needs 3 virtual machine call promptly, registration (init), and transmission (transfer) is nullified (exit), simplifies the virtual machine call design.
Description of drawings
Fig. 1 is an illustraton of model of the present invention.
The invention will be further described below in conjunction with accompanying drawing.
When subdomain socket need send message, directly call virtual machine call, the route in the virtual machine is done as judging according to the ip address:
Point-to-point communication between the territory
Target ip address is 192.168.0.2~192.168.0.254.Virtual machine directly sends to acceptance domain according to target ip address with message, inserts contiguous items in the buffering of acceptance domain.This data item comprises: message size, message source address, targets of messages address, message data entity.
Broadcast communication between the territory
Target ip address is 192.168.0.255.Virtual machine is distributed to each territory with this message, inserts contiguous items in the buffering in each territory.This data item is identical with point-to-point communication data item content.
Subdomain is communicated by letter with intemet
Destination address is other ip addresses.Virtual machine sends to main territory with message, and the protocol translation module in the main territory is at first read the message entity of this message, then message entity is encapsulated, and is converted to standard ipv4 message, uses network interface card that this message is sent then.
When socket need receive message be, in the following way:
Receive message between domains
After virtual machine was put into the reception buffering of corresponding domain with message, the scanning that the reception routine in this territory can be regular received buffering, the reception formation of message being put into corresponding socket according to the destination address in the data item.At this moment, when socket need receive data, directly visit its receiving cache queue and just can obtain message.
Receive intemet message
When receiving intemet message, virtual machine can be broadcasted this message to each territory, needs the socket that receives this message to receive intemet message as receiving message between domains then.This message can be ignored in other territories.
Agreement of the present invention designs according to Berkeley Socket interface standard and realizes, is guaranteeing that efficient communication is taken into account former signal procedure programming custom simultaneously between the territory, makes application program need not to carry out special modification and just can use this agreement and communicate.In addition, communication type is classified, dissimilar communications are designed targetedly, at utmost satisfy the efficient requirement of program running;
The addressing system of agreement adopts the IP address identical with having the maintenance of IPV4 agreement now to add the form of port numbers;
Agreement comprises two kinds of communication patterns for you to choose: connection-oriented stream communication pattern and towards connectionless datagram communication pattern.
Communication type is divided into (the overseas communication) two kinds of communicating by letter with internet of inter-domain communication and subdomain: center pathway is by communication is that the inner inter-domain communication of server still is that subdomain is communicated by letter with internet according to the ip address resolution, when the ip address is an inter-domain communication when being 192.168.0.0~192.168.0.255, other ip addresses are that subdomain is communicated by letter with internet;
Adopt share memory technology for inter-domain communication, improve process communication efficient between the territory;
Communicate by letter with internet for subdomain, center router transmits the ipv4 packet that communication data packet is encapsulated as standard, when center router receive the data that internet sends are arranged the time, adopt broadcast mechanism that each territory in the server is distributed;
Communicate by letter the time with overseas between the territory, only need to use unique transfer unit language can finish communication through virtual machine monitor layer.

Claims (1)

1. implementation method based on shared drive mechanism virtual machine inter-domain communication agreement is characterized in that:
1) territory that will have a direct access ability of network is called main territory, and its co-domain is called subdomain;
2) each territory adopts the ip address to carry out unique identification, and it is that port numbers identifies that the application program in the territory adopts accessing points;
3) monitor of virtual machine plays center router, ip according to each subdomain judges recipient and transmit leg, directly adopt shared drive mechanism to carry out the message transmission for inter-domain communication, for then adopting the message encapsulation mechanism with PERCOM peripheral communication, the ipv4 message that the information encapsulation of this agreement is called standard is carried out internet communication;
4) each subdomain has a reception buffering, and each socket has a receiving cache queue;
5) for inter-domain communication, center router directly sends to message the reception buffering of corresponding domain according to recipient ip address;
6) communicate by letter with extraneous for each territory, when the extraneous information that sends is received in main territory this information is broadcasted to each subdomain, when not handling this message procedure and exist as if it for each subdomain, this message is abandoned automatically;
7) each territory has a work queue that is used for dispatch messages, receives buffering every the regular hour run-down, and the message of the inside is distributed to corresponding treatment progress according to port numbers, message is inserted the receiving cache queue of corresponding socket.
Directly calling virtual machine transfer when 8) each territory socket sends message transmits;
9) each socket has a receiving cache queue, and each territory socket scans its receiving cache queue when receiving message, therefrom obtains message.
CN 201010525438 2010-10-29 2010-10-29 Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism Active CN101977195B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010525438 CN101977195B (en) 2010-10-29 2010-10-29 Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010525438 CN101977195B (en) 2010-10-29 2010-10-29 Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism

Publications (2)

Publication Number Publication Date
CN101977195A true CN101977195A (en) 2011-02-16
CN101977195B CN101977195B (en) 2013-07-31

Family

ID=43577040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010525438 Active CN101977195B (en) 2010-10-29 2010-10-29 Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism

Country Status (1)

Country Link
CN (1) CN101977195B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102890644A (en) * 2011-07-20 2013-01-23 郑州威科姆科技股份有限公司 Byte stream-based interprocess communication method
CN102968346A (en) * 2012-10-26 2013-03-13 曙光信息产业(北京)有限公司 Method for realizing external communication of virtual machine under virtual environment
CN105550576A (en) * 2015-12-11 2016-05-04 华为技术服务有限公司 Communication method and device between containers
WO2017101429A1 (en) * 2015-12-15 2017-06-22 乐视控股(北京)有限公司 Method and client for communication between multiple processes
CN107733839A (en) * 2016-08-11 2018-02-23 北京百度网讯科技有限公司 Data transmission method and system
CN110399229A (en) * 2018-04-25 2019-11-01 清华大学 Communication means, device, system, medium and terminal between process
CN114237818A (en) * 2021-12-01 2022-03-25 科东(广州)软件科技有限公司 Method, system, computing device and storage medium for sharing resources among virtual machines

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040226023A1 (en) * 2003-05-09 2004-11-11 Tucker Andrew G. Interprocess communication within operating system partitions
CN101377745A (en) * 2007-08-28 2009-03-04 张玉昆 Virtual computer system and method for implementing data sharing between each field
CN101667144A (en) * 2009-09-29 2010-03-10 北京航空航天大学 Virtual machine communication method based on shared memory

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040226023A1 (en) * 2003-05-09 2004-11-11 Tucker Andrew G. Interprocess communication within operating system partitions
CN101377745A (en) * 2007-08-28 2009-03-04 张玉昆 Virtual computer system and method for implementing data sharing between each field
CN101667144A (en) * 2009-09-29 2010-03-10 北京航空航天大学 Virtual machine communication method based on shared memory

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
JIANBAO REN等: "《Inter-domain communication mechanism design and implementation for high performance》", 《2011 FOURTH INTERNATION SYMPOSIUM ON PARALLEL ARCHITECTURES, ALGORITHMS AND PROGRAMMING》 *
戴月华等: "《基于cc-NUMA多核处理器构架的虚拟机监控器原型设计与实现》", 《计算机与数字工程》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102890644A (en) * 2011-07-20 2013-01-23 郑州威科姆科技股份有限公司 Byte stream-based interprocess communication method
CN102890644B (en) * 2011-07-20 2015-01-14 郑州威科姆科技股份有限公司 Byte stream-based interprocess communication method
CN102968346A (en) * 2012-10-26 2013-03-13 曙光信息产业(北京)有限公司 Method for realizing external communication of virtual machine under virtual environment
CN105550576A (en) * 2015-12-11 2016-05-04 华为技术服务有限公司 Communication method and device between containers
CN105550576B (en) * 2015-12-11 2018-09-11 华为技术服务有限公司 The method and apparatus communicated between container
WO2017101429A1 (en) * 2015-12-15 2017-06-22 乐视控股(北京)有限公司 Method and client for communication between multiple processes
CN107733839A (en) * 2016-08-11 2018-02-23 北京百度网讯科技有限公司 Data transmission method and system
CN107733839B (en) * 2016-08-11 2021-06-01 北京百度网讯科技有限公司 Data transmission method and system
CN110399229A (en) * 2018-04-25 2019-11-01 清华大学 Communication means, device, system, medium and terminal between process
CN114237818A (en) * 2021-12-01 2022-03-25 科东(广州)软件科技有限公司 Method, system, computing device and storage medium for sharing resources among virtual machines

Also Published As

Publication number Publication date
CN101977195B (en) 2013-07-31

Similar Documents

Publication Publication Date Title
CN101977195B (en) Method for realizing virtual machine inter-domain communication protocol based on shared memory mechanism
CN102859973B (en) Method, apparatus and system for address resolution
EP3993347A1 (en) Method and device for application migration
CN101356783B (en) Method and system for protocol offload and direct I/O with I/O sharing in a virtualized network environment
CN101133609B (en) Communication node and communication control method
CN100573496C (en) Be used to handle the method and apparatus of the IPv4 DNS PTR inquiry of striding IPv4 and IPv6 network
US7478173B1 (en) Method and system for sharing a network connection in a virtual computer system
WO2020236291A1 (en) System and method for facilitating efficient load balancing in a network interface controller (nic)
CN101848235B (en) Real-time multimedia data P2P transmission scheme for supporting NAT traversal
CN103152787A (en) Local agent, mobile node and control method
US10802885B2 (en) Method and apparatus for data processing based on multicore
CN106302322B (en) Virtual machine data flow management method and system
CN1954576A (en) Technique for handling initiation requests
CN102045244A (en) IPV4 (Internet Protocol Version 4) network as well as implementation method and system for intercommunicating with new network
CN103597794A (en) Concept for providing information on a data packet association and for forwarding a data packet
JP7401564B2 (en) Communication methods and related devices
WO2013097400A1 (en) Method for binding network apparatus, and communication method, device and system
EP3395049A1 (en) ROUTER AND METHOD FOR CONNECTING AN IPv4 NETWORK AND AN IPv6 NETWORK
CN101938531A (en) Method, system and device for communicating IPv4 network and IPv6 network
CN102025789A (en) Address mapping maintenance method and address mapping system
KR102025375B1 (en) Apparatus and method for data distribution service, data distribution service system
CN103780468A (en) Method enabling smart terminal to be accessed to TRILL network, smart terminal and route network bridge
WO2022089412A1 (en) Communication method and device
EP3753236A1 (en) Remote wake-up of a device behind a nat
WO2021184226A1 (en) Data transmission method and apparatus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240403

Address after: 101, Section B, 1st Floor, No. 203, Zhongyuan 2nd District, Wangjing Lize, Chaoyang District, Beijing, 100102

Patentee after: Beijing Cool Data Technology Co.,Ltd.

Country or region after: China

Address before: 710049 No. 28 West Xianning Road, Shaanxi, Xi'an

Patentee before: XI'AN JIAOTONG University

Country or region before: China