CN103957233A - Real-time communication platform based on processor nucleus dividing and virtual machine - Google Patents

Real-time communication platform based on processor nucleus dividing and virtual machine Download PDF

Info

Publication number
CN103957233A
CN103957233A CN201410116628.8A CN201410116628A CN103957233A CN 103957233 A CN103957233 A CN 103957233A CN 201410116628 A CN201410116628 A CN 201410116628A CN 103957233 A CN103957233 A CN 103957233A
Authority
CN
China
Prior art keywords
time
real
module
rtx
communication
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
CN201410116628.8A
Other languages
Chinese (zh)
Other versions
CN103957233B (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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN201410116628.8A priority Critical patent/CN103957233B/en
Publication of CN103957233A publication Critical patent/CN103957233A/en
Application granted granted Critical
Publication of CN103957233B publication Critical patent/CN103957233B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of networks, and discloses a real-time communication platform based on processor nucleus dividing and a virtual machine, for providing a real-time communication capability for a distributed system composed of a Windows operation system, a TCP/IP protocol and an Ethernet. The real-time communication platform comprises a subsystem running on a time correction master node and a subsystem running on a time correction slave node, wherein the former comprises a real-time communication protocol stack master station module, a time synchronization algorithm master station module and an RTX equipment driving module; and the later comprises a VMM module, a real-time protocol stack slave station module and a time synchronization algorithm slave station module which support a real-time virtual communication machine. According to the invention, real-time and determined transmission of data can be finished by use of the real-time communication platform; the data real-time validity among applications is guaranteed, and support is provided for real-time data interaction of the distributed system; and on the basis of real-time communication, a high-precision real-time clock function is provided, through a built-in time correction mechanism, system-level high precision time is provided, the clock consistency of each node in the distributed system is guaranteed, and a consistent time scale is provided for the distributed system.

Description

Real time communication platform based on processor pyrene and virtual machine
Technical field
The present invention relates to a kind of real time communication platform, relate to networking technology area.
Background technology
As everyone knows, be now the epoch of network.An independent computer can not provide enough abundant information, only has network interconnection, and resource-sharing can meet growing to the quantity of information requirement of the mankind.In the process of network interconnection, the quality of communication and speed have just become the topic that people pay close attention to.
Be not only the Internet, local local area network (LAN) is also faced with the problem of communication quality.For example, one forms a distributed network environment by multiple host, how to ensure the certainty of communication quality between each main frame, how under existing communication environment, to ensure the real-time of communication, is all the problems that need solution.
Current, the terminal equipment that access network is maximum remains PC.And the operating system of moving on PC, Windows still occupies definitely large share.Windows operating system is a kind of non real-time operating system, and its core mechanism such as process scheduling, Time Service does not all possess certainty, and therefore its communication mechanism does not possess real-time yet along with these are uncertain.
Like this, in a larger distributed network environment being made up of multiple host, the communication between each main frame does not just possess certainty and real-time.And in most distributed environment, some critical datas of transmitting between main frame all needed to ensure within certain time limit, complete accurately transmission, that is to say, the system of disposing has strong demand to real-time, a definite communication environment, and the communication environment of current Windows cannot ensure.The present invention is exactly demand and the constraint based on such, has proposed a kind of real time communication scheme based on point nuclear technology.
Summary of the invention
The object of this invention is to provide a kind of real time communication platform based on processor pyrene and virtual machine, to meet the real time communication requirement of the distributed system building based on Windows operating system, ICP/IP protocol, Ethernet; For the distributed system being built by Windows operating system, ICP/IP protocol, Ethernet provides real time communication ability.
The present invention solves the problems of the technologies described above the technical scheme of taking to be:
A kind of real time communication platform based on processor pyrene and virtual machine, the distributed real-time systems of the local that described real time communication platform application forms from node when host node and multiple school when by a school, described real time communication platform is synchronous for realizing real time communication and each internodal cycle accurate of each window application between distributed system; When it comprises the subsystem of host node while running on school and runs on school from the subsystem of node;
While running on school, the subsystem work of host node is under RTX environment, and it comprises real-time communication protocol stack master station module, Time synchronization algorithm master station module and RTX device driver module,
Real-time communication protocol stack master station module, for providing service with the real-time thread form under RTX, is used the standard network interface card that RTX provides to drive interface to complete the bottom transmission of data simultaneously; The IPC mechanism providing by RTX provides real-time Socket interface for Time synchronization algorithm master station module,
Time synchronization algorithm master station module is when adopting IEEE1588PTP precision interval clock synchronous protocol to the time synchronized school of described real time communication platform, Time synchronization algorithm master station module is embodied as the real-time thread form under RTX, and thread uses the real-time clock of PC system as clock source; The service that Time synchronization algorithm master station module is also used real-time protocol (RTP) stack to provide for the IPC mechanism by RTX,
RTX device driver module comprises RTX real-time clock driven element module and the real-time network interface card driven element of RTX module; RTX real-time clock driven element module is used to RTX thread to provide access to be stored in the uniform interface of the time data in real-time timepiece chip; The real-time network interface card driven element of RTX module is used to RTX thread that the uniform interface of access network interface card is provided, and described interface all needs to meet RTX driver standard; Wherein, RTX real-time clock driven element module is also for providing local clock information, as system precision clock source; The real-time network interface card driven element of RTX module is also used to real-time protocol (RTP) stack that the operation API to hardware is provided;
While running on school, comprise from the subsystem of node VMM module, real-time protocol (RTP) stack slave station module and the Time synchronization algorithm slave station module of supporting real-time virtual communication equipment;
Real-time virtual communication equipment module (real-time virtual communication equipment VMM) is for real time communication network interface card and clock chip are carried out to equipment control, during for school from the basis of node work; Time synchronization algorithm slave station mould and real-time protocol (RTP) stack slave station module all operate in real-time virtual communication equipment module;
Real-time communication protocol stack slave station module will be compiled as image file, directly on real time communication virtual machine, move, provide service by interface for Windows application, and the Time synchronization algorithm slave station module together being run on real time communication virtual machine is directly called, meanwhile, real-time protocol (RTP) stack slave station module will directly operate network interface card;
Time synchronization algorithm slave station module adopts IEEE1588PTP precision interval clock synchronous protocol, uses the real-time clock of PC system as clock source; The service that Time synchronization algorithm slave station module is used real-time protocol (RTP) stack to provide by internal interface, by Hardware I/O instruction access or amendment slave station time, guarantees time mark precision.
Described RTX device driver module comprises RTX Real-time Network card apparatus driver module and RTX clockwork driver module; The clock source that wherein RTX clockwork driver module is realized has three: be respectively level clock second based on mainboard real-time clock RTC chip, the Millisecond clock based on Windows system time and the nanosecond clock based on TSC register.
Described RTX Real-time Network card apparatus driver module is for meeting under RTX driving development specifications, the driving exploitation that real-time network card chip is carried out, described module can provide to upper layer module the operation-interface of real-time network interface card, this module is also for completing initialization to network interface card, send data, accepting data manipulation, for real-time protocol (RTP) stack provides the bottom communication ability towards hardware;
Described RTX clockwork driver module is for meeting under RTX driving development specifications, the driving exploitation that real-time timepiece chip is carried out, described module can provide to upper layer module the operation-interface of real-time clock, this module also for complete to clock information obtain, change operation, for each computer node of distributed system provides high accuracy, exercisable clock source.
Described real-time virtual communication equipment module comprises VMM function of initializing module, virtual storage management functional module and virtual device management functional module.
Described VMM function of initializing module is the basis of virtual machine operation, has been mainly used in pyrene processing to processor, real time communication network card binding to distribution, the loading virtual communication machine program of the processing of given processor core, core physical memory and has set up relevant VMCS kernel data structure; By these processes, build basic virtual machine environment, during for real time communication and school, the operation of algorithm provides basic operation support;
Virtual storage management functional module is mainly used in providing storage protection and shared drive mechanism for Windows with the virtual machine of communicating by letter, on the one hand, can isolate the access of physical memory, ensure Windows can out-of-bounds access to the privately owned internal memory of communication virtual machine, ensure simultaneously communication virtual machine can out-of-bounds access to the privately owned internal memory of Windows; On the other hand, for the two connection setup shared drive, when can supporting to communicate by letter virtual machine and Windows access, complete data interaction;
Virtual device management functional module has been mainly used in the device access isolation between Windows and communication virtual machine, can intercept and capture the operation (comprise setting, send data etc.) of Windows to private network communication card, makes it not affect the work of communication equipment; Also, for intercepting and capturing the operation of communication virtual machine to Windows equipment, make it not affect the work of Windows.
The invention has the beneficial effects as follows:
The present invention, by point nuclear technology, the use of Intel Virtualization Technology and a realization for real-time communication protocol stack, meets the real time communication requirement of the distributed system building based on Windows operating system, ICP/IP protocol, Ethernet.In addition, the present invention also, on the basis of real time communication, provides real-time clock function, and during by built-in school, mechanism provides system-level split-second precision, for distributed system provides consistent time ruler.
The present invention has realized real-time, the definite transmission that completes data with real time communication platform.Real time communication platform has ensured the data real-time effectiveness between application, for the real time data of distributed system provides support alternately; Meanwhile, provide real-time clock function on the basis of real time communication, during by built-in school, mechanism provides system-level split-second precision, ensures the clock consistency of each node in distributed system, for distributed system provides consistent time ruler.
The present invention divides the use of nuclear technology, Intel Virtualization Technology by processor, and the realization of real-time communication protocol stack, can be for the distributed system being built by Windows operating system, ICP/IP protocol, Ethernet provides real time communication ability, the application of distributed system deploy can be carried out by the present invention real-time, definite transmission of data.The processing that the present invention can be real time data provides special processor core, special real time communication network interface card, special communication protocol stack with transmission, with this ensure real time data fast, determine, predictable transmission, and then meet in distributed system the demand of application to real time communication, ensure the data real-time effectiveness between application, for the real time data of distributed system provides support alternately.In addition, the present invention is also providing on the basis of real time communication ability, and real-time clock function is provided, and during by built-in school, mechanism provides system-level split-second precision, ensure the clock consistency of each node in distributed system, for distributed system provides consistent time ruler.
Brief description of the drawings
Fig. 1 is the network topology structure figure of the distributed system of real time communication platform application of the present invention, Fig. 2 is real-time communication system of the present invention (real time communication platform) Organization Chart, Fig. 3 is the subsystem structure figure (real-time communication software host node subsystem structure) of host node while running on school in real time communication platform of the present invention, Fig. 4 is the subsystem structure figure (real-time communication software is from node subsystem structure) from node while running on school in real time communication platform of the present invention, Fig. 5 utilizes the present invention to realize the FB(flow block) (being the real time communication execution between window application) of real-time communication function execution, Fig. 6 utilizes the present invention to realize the FB(flow block) (being the execution of Time synchronization algorithm) that cycle accurate synchronizing function is carried out, Fig. 7 is the host node test result figure that the software that utilizes technical solution of the present invention formation is installed, Fig. 8 be install utilize technical solution of the present invention form software from node test result figure, Fig. 9 is clock accuracy performance test scatter diagram, and Figure 10 is windows-windows communication delay scatter diagram, and Figure 11 is real-time communication software communication delay scatter diagram.
embodiment
Shown in Fig. 1~11, present embodiment describes the present invention:
1, the architecture of real time communication platform based on processor pyrene and virtual machine and the function of each module
Software based on technical solution of the present invention exploitation is mainly used in the distributed system of local, and (traditional distributed system is not have real-time capacity, real time communication cannot be provided, only has the software using based on technical solution of the present invention exploitation, just can there is real time communication ability), its network topology structure is as shown in Figure 1.System forms from node when host node and multiple school during by a school, and each node has two ethernet nics, and one for non-realtime traffic, another real time communication such as during for high accuracy school.This real-time communication software is operated on each node, completes function according to following 2 kinds of mode work, and service is provided:
1), on each node, the real-time protocol (RTP) stack that window application will use this software to provide, carries out the real-time, interactive of data via real time communication network interface card, realize real-time network communication function.
2) when school host node according to IEEE1588PTP precision interval clock synchronous protocol regularly (default is 2 seconds) by real time communication channel during to school from node broadcasts sync message, message while following the schools such as message, the time synchronized message correction local zone time of receiving from node basis when in the school, local zone time and master clock node time are consistent, thereby realize system-level real-time clock.
Therefore, this software provides real-time communication function and real-time clock guarantee, makes window application can possess the real time communication ability of data, ensures that the clock height of each node is consistent simultaneously.
Real-time communication software, according to the difference of running environment, can be divided into 2 parts, while running on school the software section of host node and while running on school from the software section of node.Whole real-time communication system architectural schemes as shown in Figure 2, is carried out real time communication from node by gigabit Ethernet when host node and school when in the school.
, host node expands to basic platform with Windows and RTX when in the school, comprises the functional modules such as the real-time communication protocol stack that runs on RTX, time synchronized main website algorithm, the driving of RTX real-time clock, the driving of RTX network interface card.
When in the school from node taking a point nuclear technology, virtual machine technique is basis, realizes the expansion of Windows real time communication based on real time communication virtual machine., comprise that the real-time communication protocol stack that runs on real time communication virtual machine, time synchronized slave station algorithm, real-time clock drive, network interface card drives and as modules such as the virtual machine monitoring software VMM of Windows driver from node when in the school.
As shown in Figure 2, in the time of school in host node, the service that window application can provide by interface interchange real-time protocol (RTP) stack, carry out the real-time Transmission of data, window application itself is operated on Windows operating system simultaneously, can obtain real-time clock source information by Windows Real Time Drive; Real-time protocol (RTP) stack can utilize RTX network interface card driver module real time communication network interface card to transmit data; Time synchronized main website algorithm can be driven and be obtained clock source information by RTX real-time clock, utilizes the IPC mechanism of RTX to obtain the service that real-time protocol (RTP) stack provides simultaneously, carries out the real-time Transmission of clock data.It should be noted that the clock source that Windows application and time synchronized main website algorithm use is same, can ensure the consistency of system time.
In the time of school, from node, real-time protocol (RTP) stack and time synchronized slave station algorithm are operated on real-time virtual communication equipment, and the Time synchronization algorithm interface that directly invocation protocol stack provides carries out transfer of data; Time synchronized slave station algorithm, according to the time synchronization information of receiving, can directly be changed slave station real-time time chip by VMM virtual memory management module, reaches the time synchronized of slave station and main website; Real-time protocol (RTP) stack also can directly operate real time communication network interface card by VMM virtual memory management module; Windows application in slave station is operated on Windows environment, form by interface with shared drive, communicate with the interface in real-time virtual communication equipment, complete calling real-time protocol (RTP) stack, and then realize the real-time Transmission of data, meanwhile window application is driven and is used the clock chip same with virtual communication machine by Windows real-time clock, ensures the consistency of system time.
Like this, by the synthetic operation between each module, real-time data communication support and the real-time clock guarantee of host node and Windows application from node can complete school time.
The each module general introduction of 1.1 host node
As shown in Figure 3, real-time communication software host node is operated under RTX environment, algorithm master station module, RTX device driver module while mainly comprising real-time communication protocol stack master station module, IEEE1588 school.Wherein, RTX device driver module can be divided into again the driving of RTX Real-time Network card apparatus and the driving of RTX clockwork.The clock source that wherein RTX timepiece drive module is realized at present has three, is respectively level clock second based on mainboard real-time clock RTC chip, the Millisecond clock based on Windows system time and the nanosecond clock based on TSC register.
1.1.1 real-time protocol (RTP) stack master station module:
Real-time communication protocol stack master station module is embodied as the real-time thread form under RTX, and the IPC mechanism providing by RTX provides real-time Socket interface for time synchronized main website algoritic module.The real-time communication protocol stack that this software provides will redesign legacy protocol stack, reach better transmission speed, meet the real-time demand of system.
The transmission environment that traditional TCP/UDP/IP protocol stack is wide area network designs, but we will satisfied distributed system run in the local area network (LAN) taking high speed gigabit Ethernet as communication medium, physical environment and wide area network have a great difference, and these have all caused the service requirement that meets system that traditional Network Protocol Design cannot be best.Therefore, in order to reach needed real time communication demand, need to again develop real-time protocol (RTP) stack, simultaneously, in order to make window application well apply real-time protocol (RTP) stack, the exploitation of protocol stack also will be followed Design hierarchy and the interface specification of conventional TCP/IP.
1.1.2 Time synchronization algorithm master station module:
The time synchronized calibration method of whole software adopts IEEE1588PTP precision interval clock synchronous protocol.Time synchronization algorithm master station module is embodied as the real-time thread form under RTX.Time synchronized main website algorithm thread uses the real-time clock of PC system as clock source.The service that time synchronized main website algorithm uses real-time protocol (RTP) stack to provide by the IPC mechanism of RTX.
This thread moves under the scheduling of RTX real-time subsystem RTSS, can make full use of the Real-Time Scheduling ability of RTX, and the quick send and receive of data while guaranteeing school improves time mark precision.Time synchronized main website algorithm thread uses the real-time clock of PC system as clock source, guarantees the time precision of clock source.Use the real-time clock of PC system as clock source, can also make the application program based on Windows share same clock source with the Time synchronization algorithm thread based on RTX, ensure the consistency of system time.In addition, Time synchronization algorithm thread drives access real-time timepiece chip by the real-time clock of RTX, the service that uses real-time protocol (RTP) stack to provide by the IPC mechanism of RTX.
1.1.3RTX device driver module:
In native system, the device drives of RTX all on host node, can be divided into 2 parts in the time of school, comprises that real-time clock drives and the real-time network interface card of RTX drives.The uniform interface that provides access to be stored in the time data in real-time timepiece chip for RTX thread is provided RTX real-time clock, and the real-time network interface card of RTX drives the uniform interface that access network interface card is provided for RTX thread, and interface all needs to meet RTX driver standard.
These two kinds of drivings are to be all Time synchronization algorithm service.Wherein, RTX real-time clock drives directly for algorithm provides local clock information, as system precision clock source; The real-time network interface card driving of RTX is mainly real-time protocol (RTP) stack provides the operation API to hardware.
1.2 from the each module general introduction of node
As shown in Figure 4, real-time communication software mainly comprises VMM module, real-time protocol (RTP) stack slave station module and the Time synchronization algorithm slave station module of supporting real-time virtual communication equipment from node subsystem., in node subsystem, the operation of real-time network interface card is comprised in real-time protocol (RTP) stack slave station module meanwhile, the operation of clock chip is comprised in Time synchronization algorithm slave station module.
1.2.1 real-time virtual communication equipment module:
When real-time virtual communication equipment VMM is school from the basis of node work.Time synchronized slave station algorithm and real-time protocol (RTP) stack all operate on virtual machine, and meanwhile, VMM carries out equipment control to real time communication network interface card and clock chip.VMM comprises VMM initialization, virtual storage management, three functional modules of virtual device management.
1.2.2 real-time protocol (RTP) stack slave station module:
Real-time communication protocol stack and Time synchronization algorithm are realized in an IMAGE file, by VMM load operating.The protocol stack of host node from the real-time protocol (RTP) stack of node and while running on school while running on school, its both internal module composition is consistent.Different, while running on school, the real-time protocol (RTP) stack of host node, by the form taking real-time process under RTX as other application provide service, uses the standard network interface card that RTX provides to drive interface to complete the bottom transmission of data simultaneously; And will be compiled as image file from the real-time protocol (RTP) stack of node while running on school, directly on real time communication virtual machine, move, provide service by interface for Windows application, and algorithm directly calls while together being run on the school on real time communication virtual machine, simultaneously, to directly operate network interface card from node protocol stack, and without the driving interface of standard.
1.2.3 Time synchronization algorithm slave station module:
In native system, the time synchronized calibration method of software adopts IEEE1588PTP precision interval clock synchronous protocol.Owing to there is no operating system on real-time virtual communication equipment, the real-time communication protocol and the time synchronized slave station algorithm that run in real-time virtual communication equipment are realized in an IMAGE file, by VMM load operating.Time synchronized slave station algorithm uses the real-time clock of PC system as clock source, guarantees the time precision of clock source.Use the real-time clock of PC system as clock source, can also make the application program based on Windows share same clock source with the Time synchronization algorithm thread based on RTX, ensure the consistency of system time.The service that time synchronized slave station algorithm uses real-time protocol (RTP) stack to provide by internal interface, by Hardware I/O instruction access (or amendment) slave station time, guarantees time mark precision.
Execution relation between the each module of 1.3 main and subordinate node
Real-time communication software mainly provides the real-time communication function of each window application between distributed system, and each internodal cycle accurate synchronizing function.
1.3.1 real-time communication function carries into execution a plan:
Real-time communication software, by point nuclear technology, Intel Virtualization Technology and a real-time protocol (RTP) stack technology, is supported the real time communication between each window application in distributed system.In communication process, relate to real-time communication protocol stack module, RTX device driver module, VMM module and each interface.Software execute process is illustrated in fig. 5 shown below.
In figure, square frame content representation is completing between window application in real-time communication function, the functional module from node when host node and school when related school; Four-headed arrow represents the interaction relationship between modules, has also represented that in system, the flow direction of data is two-way, when not only can be from school time, host node application program be to school, from node application transfer data, also can on the contrary.
In figure, comment section is that host node, to sending data instance from node, has been set forth the interaction between each module during with school.In the time of school, in host node, Windows application journey will be by host node application interface (note 1), and the real-time protocol (RTP) stack that cross-system runs on RTX carries out the transmission of data; Running on real-time protocol (RTP) stack (note 2) on RTX also will apply RTX real time communication network interface card and drive (note 3) to complete the transmission of data.Data are transmitted (note 4) on gigabit Ethernet.
In the time of school, from node, run on real-time protocol (RTP) stack on virtual communication machine and by directly carrying under the protection of VMM equipment control, real time communication network interface card is programmed (note 5), when network interface card is received data, produce down trigger data receiver task, obtain data.The real-time protocol (RTP) stack (annotation 6) that Windows application Cheng Ze utilizes the virtual memory management shared drive mechanism of VMM to call to run on virtual communication machine by interface (annotation 7,8), carries out the transmission of data and obtaining of data.
1.3.2, cycle accurate synchronizing function carries into execution a plan:
Real-time communication software, by Intel Virtualization Technology and real-time protocol (RTP) stack technology, is supported each internodal cycle accurate synchronizing function in distributed system.Time synchronized main website, slave station algoritic module, real-time protocol (RTP) stack module, RTX real-time clock driver module, VMM clock chip administration module and VMM network interface card administration module are related to.Be illustrated in fig. 6 shown below.
In figure, square frame content representation is completing between each node in time synchronized function, the functional module from node when host node and school when related school; In figure, four-headed arrow represents that the data flow between modules is two-way, with consistent in upper joint.It should be noted that completing in whole time synchronization process, from upper joint, exist host node to sending message when school from node, also exist from node and send message to host node, therefore simultaneously, although be that host node is initiated, exist two-way data communication when in the school.
In the time of school in host node, the service that time synchronized main website algoritic module is called real-time protocol (RTP) stack RTSS and provided by the IPC mechanism of RTX completes the real time communication (note 2) of data; Meanwhile, time synchronized main website algorithm is driven and is obtained local clock as system precision clock source (note 1) by RTX real-time clock; The real-time protocol (RTP) stack running on RTX has also driven the transmission (note 3,4) of data on gigabit Ethernet by application RTX real time communication network interface card.
In the time of school, from node, the service that time synchronized slave station algorithm directly calls real-time protocol (RTP) stack to be provided completes the communication (annotation 6) of data; Meanwhile, according to Time synchronization algorithm, local clock is upgraded to (annotation 7) by VMM clock chip administration module; The real-time protocol (RTP) stack running on virtual communication machine will directly be programmed to real time communication network interface card by VMM equipment control, completes the transmission (note 4,5) of data on Ethernet.
By the interaction between above modules, can complete each internodal time synchronized function.
2, the software based on technical solution of the present invention exploitation has following innovative point:
This software has mainly been applied processor point nuclear technology and virtual machine technique, on completing the basis of protocol stack real-time reconstruction, independently realize a real-time communication environment, and agreement while having realized on this basis the accurate school of IEEE1588PTP, for each main frame under distributed environment provides communication environment that determine, real-time, and high-precision unified clock.Whole software systems mainly contain following innovative point:
2.1 cannot ensure the constraint of real-time for Windows operating system, we set about from hardware view, the processor core originally being used by Windows is branched away to one, move our real-time communication software, reach real-time communication software operation and do not need to rely on Windows operating system, processor core is had to absolute operation power, provide service taking maximum efficiency as user, with minimum time loss transmission data;
In order to realize the processor pyrene operation of system, need to carry out relevant programmed process to the mainboard of Windows operating system kernel loading process and computer.Mainly comprise: complete the dish out operation (see code snippet 1) of Windows to processor core by change Windows add-in file; Complete the restart operation (seeing code snippet 2) to the core of dishing out by the interrupt mechanism between hardware processor; Interrupt source by mainboard level is divided and network interface card interruption has been set to the bindings (seeing code snippet 3) of the processor core of dishing out etc.
Code snippet 1
Code snippet 2
Code snippet 3
2.2 use hardware virtual machine technology, complete virtual to real time communication machine, to the protection that conducts interviews of internal memory and equipment, shared drive are managed simultaneously.In the processing core of dishing out, the real-time virtual communication equipment software system module that moves our independent development, these software systems mainly comprise: completed interrupt-descriptor table (IDT) arranged simultaneously to handoff processor operational mode to protected mode (seeing code snippet 4) by the system bootstrap routine under real pattern; Complete the setting to GDT (GDT) and then complete the mapping (see code snippet 5) of physical address to virtual address by the boot under protected mode; The form driving by Windows core completes loading and the startup of each boot and interrupt service routine; Complete virtual machine and (seeing code snippet 6) such as communicating by letter of Windows environment by system divides being gone out to the operation of shared drive.
Code snippet 4
Code snippet 5
Code snippet 6
2.3 taking LwIP as blank, and protocol stack is carried out to real-time reconstruction.For existing TCP mechanism, complete and comprised the Optimizing Reconstruction that sends aspects such as starting management, congestion control, overtime re-transmission, packet confirmation management; For UDP mechanism, the packet that has increased lightweight is confirmed management, is selected the optimization of the aspects such as retransmission management; For IP mechanism, complete the Optimizing Reconstruction of the aspects such as fragment and re assembly management, error control, priority management.
Simultaneously, complete on the basis of protocol stack real-time reconstruction, in order to adapt to the deployed environment of this software, also increase service general framework one deck at the top layer of protocol stack, by the use of the mechanism such as semaphore, shared drive, multithreading, responding ability when having completed real-time protocol (RTP) stack to many service requests source.No matter service is from Windows application, or RTSS application, or virtual machine application, implementation agreement stack can be all multiple request source services simultaneously.
2.4 on the basis of real-time communication software, and agreement while having realized the accurate school of IEEE1588PTP, for distributed system provides unified time ruler.In the time realizing school, in protocol procedures, software directly obtains the hardware time from hardware network interface card one deck, the optimum efficiency that the time that reached obtains.Meanwhile, we provide a second level, Millisecond, three kinds of clock sources of nanosecond, under the most accurate condition, can ensure that between main and subordinate node, time error is no more than 200us.
3 software functions and performance demonstration
Algorithm operation demonstration when 3.1 real time communication and school:
According to the demand of Software deployment, we install RTX system at the host node of communicating by letter in the time of school, and on this basis, move our software; From node, first use point nuclear technology to separate a processor core for virtual communication machine, move afterwards our real-time communication software, shown in following Fig. 7 of effect, 8:
From the test of above-mentioned main and subordinate node, when main and subordinate node can school, and principal and subordinate's gap again in 200us when each school.100 groups of data measuring according to us, draw clock accuracy scatter diagram, enter shown in lower Fig. 9:
Can be found out by upper figure, when each school, principal and subordinate's gap can remain in 200us, and mean value, in 130 left and right, have upper and lower fluctuating, but entirety tends to be steady.
The stability demonstration of 3.2 real time communication:
By test, we show that the communication delay scatter diagram under windows-windows environment is illustrated in fig. 10 shown below:
Can be found out by upper Figure 10, under windows-windows environment, its communication delay is also not bery steady, dipping and heaving is larger, and best level is in 145 left and right, and worst case is in 480 left and right, entirety is not very stable, has no idea to provide a comparatively stable and communication environment fast.
Use our real-time communication software, whole distributed system disposed, show that communication delay scatter diagram is illustrated in fig. 11 shown below:
Can be found out by upper Figure 11, under real-time communication software communication environment, its communication delay is very steady, entirely between 182-184, distributes, and dipping and heaving is very little, and mean value is 183.
According to test, this real-time communication software can reach following performance index:
1) system clock source resolution is less than 1us;
2) packet is point-to-point interconnected, and bag size is 1K byte, move 20 times, and each 500 bags, average RTT is less than 150us;
3) low priority UDP bag can not block high priority UDP bag, and high priority UDP packet transmission time and offered load are irrelevant;
4) in system, between all nodes, clocking error is less than 200us, and irrelevant with offered load.

Claims (5)

1. the real time communication platform based on processor pyrene and virtual machine, the distributed real-time systems of the local that described real time communication platform application forms from node when host node and multiple school when by a school, described real time communication platform is synchronous for realizing real time communication and each internodal cycle accurate of each window application between distributed system; It is characterized in that: when it comprises the subsystem of host node while running on school and runs on school from the subsystem of node;
While running on school, the subsystem work of host node is under RTX environment, and it comprises real-time communication protocol stack master station module, Time synchronization algorithm master station module and RTX device driver module,
Real-time communication protocol stack master station module, for providing service with the real-time thread form under RTX, is used the standard network interface card that RTX provides to drive interface to complete the bottom transmission of data simultaneously; The IPC mechanism providing by RTX provides real-time Socket interface for Time synchronization algorithm master station module,
Time synchronization algorithm master station module is when adopting IEEE1588PTP precision interval clock synchronous protocol to the time synchronized school of described real time communication platform, Time synchronization algorithm master station module is embodied as the real-time thread form under RTX, and thread uses the real-time clock of PC system as clock source; The service that Time synchronization algorithm master station module is also used real-time protocol (RTP) stack to provide for the IPC mechanism by RTX,
RTX device driver module comprises RTX real-time clock driven element module and the real-time network interface card driven element of RTX module; RTX real-time clock driven element module is used to RTX thread to provide access to be stored in the uniform interface of the time data in real-time timepiece chip; The real-time network interface card driven element of RTX module is used to RTX thread that the uniform interface of access network interface card is provided, and described interface all needs to meet RTX driver standard; Wherein, RTX real-time clock driven element module is also for providing local clock information, as system precision clock source; The real-time network interface card driven element of RTX module is also used to real-time protocol (RTP) stack that the operation API to hardware is provided;
While running on school, comprise from the subsystem of node VMM module, real-time protocol (RTP) stack slave station module and the Time synchronization algorithm slave station module of supporting real-time virtual communication equipment;
Real-time virtual communication equipment module (real-time virtual communication equipment VMM) is for real time communication network interface card and clock chip are carried out to equipment control, during for school from the basis of node work; Time synchronization algorithm slave station mould and real-time protocol (RTP) stack slave station module all operate in real-time virtual communication equipment module;
Real-time communication protocol stack slave station module will be compiled as image file, directly on real time communication virtual machine, move, provide service by interface for Windows application, and the Time synchronization algorithm slave station module together being run on real time communication virtual machine is directly called, meanwhile, real-time protocol (RTP) stack slave station module will directly operate network interface card;
Time synchronization algorithm slave station module adopts IEEE1588PTP precision interval clock synchronous protocol, uses the real-time clock of PC system as clock source; The service that Time synchronization algorithm slave station module is used real-time protocol (RTP) stack to provide by internal interface, by Hardware I/O instruction access or amendment slave station time, guarantees time mark precision.
2. a kind of real time communication platform based on processor pyrene and virtual machine according to claim 1, is characterized in that: described RTX device driver module comprises RTX Real-time Network card apparatus driver module and RTX clockwork driver module; The clock source that wherein RTX clockwork driver module is realized has three: be respectively level clock second based on mainboard real-time clock RTC chip, the Millisecond clock based on Windows system time and the nanosecond clock based on TSC register.
3. a kind of real time communication platform based on processor pyrene and virtual machine according to claim 2, is characterized in that:
Described RTX Real-time Network card apparatus driver module is for meeting under RTX driving development specifications, the driving exploitation that real-time network card chip is carried out, described module can provide to upper layer module the operation-interface of real-time network interface card, this module is also for completing initialization to network interface card, send data, accepting data manipulation, for real-time protocol (RTP) stack provides the bottom communication ability towards hardware;
Described RTX clockwork driver module is for meeting under RTX driving development specifications, the driving exploitation that real-time timepiece chip is carried out, described module can provide to upper layer module the operation-interface of real-time clock, this module also for complete to clock information obtain, change operation, for each computer node of distributed system provides high accuracy, exercisable clock source.
4. according to a kind of real time communication platform based on processor pyrene and virtual machine described in claim 1,2 or 3, it is characterized in that: described real-time virtual communication equipment module comprises VMM function of initializing module, virtual storage management functional module and virtual device management functional module.
5. a kind of real time communication platform based on processor pyrene and virtual machine according to claim 4, is characterized in that:
Described VMM function of initializing module is the basis of virtual machine operation, has been mainly used in pyrene processing to processor, real time communication network card binding to distribution, the loading virtual communication machine program of the processing of given processor core, core physical memory and has set up relevant VMCS kernel data structure; By these processes, build basic virtual machine environment, during for real time communication and school, the operation of algorithm provides basic operation support;
Virtual storage management functional module is mainly used in providing storage protection and shared drive mechanism for Windows with the virtual machine of communicating by letter, on the one hand, can isolate the access of physical memory, ensure Windows can out-of-bounds access to the privately owned internal memory of communication virtual machine, ensure simultaneously communication virtual machine can out-of-bounds access to the privately owned internal memory of Windows; On the other hand, for the two connection setup shared drive, when can supporting to communicate by letter virtual machine and Windows access, complete data interaction;
Virtual device management functional module has been mainly used in the device access isolation between Windows and communication virtual machine, can intercept and capture the operation of Windows to private network communication card, makes it not affect the work of communication equipment; Also, for intercepting and capturing the operation of communication virtual machine to Windows equipment, make it not affect the work of Windows.
CN201410116628.8A 2014-03-26 2014-03-26 Based on processor pyrene and the real-time communication platform of virtual machine Expired - Fee Related CN103957233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410116628.8A CN103957233B (en) 2014-03-26 2014-03-26 Based on processor pyrene and the real-time communication platform of virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410116628.8A CN103957233B (en) 2014-03-26 2014-03-26 Based on processor pyrene and the real-time communication platform of virtual machine

Publications (2)

Publication Number Publication Date
CN103957233A true CN103957233A (en) 2014-07-30
CN103957233B CN103957233B (en) 2017-03-15

Family

ID=51334456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410116628.8A Expired - Fee Related CN103957233B (en) 2014-03-26 2014-03-26 Based on processor pyrene and the real-time communication platform of virtual machine

Country Status (1)

Country Link
CN (1) CN103957233B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829493A (en) * 2018-06-22 2018-11-16 山东超越数控电子股份有限公司 A kind of virtual machine method for synchronizing time and device
CN109471588A (en) * 2018-09-13 2019-03-15 北京米文动力科技有限公司 A kind of synchronous method and equipment
CN111130895A (en) * 2019-12-27 2020-05-08 天津瑞能电气有限公司 Method for realizing REN protocol master station based on DSP
CN112583656A (en) * 2020-11-10 2021-03-30 深圳市有方科技股份有限公司 Debugging method and device based on LWIP user-state PPP communication function
CN112904932A (en) * 2021-05-08 2021-06-04 鹏城实验室 Clock synchronization method, board card, computer storage medium and terminal equipment
CN114237818A (en) * 2021-12-01 2022-03-25 科东(广州)软件科技有限公司 Method, system, computing device and storage medium for sharing resources among virtual machines

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241365A (en) * 2017-08-14 2017-10-10 中国电子科技集团公司第二十八研究所 A kind of cloud platform method for synchronizing time

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232457A (en) * 2008-02-22 2008-07-30 浙江大学 High-precision real-time synchronization method based on IEEE1588
CN101252404A (en) * 2008-03-31 2008-08-27 重庆大学 Distributed network clock synchronizing system and method based on FPGA
US20110170534A1 (en) * 2010-01-11 2011-07-14 Faro Technologies, Inc. Method and apparatus for synchronizing measurements taken by multiple metrology devices
WO2011085585A1 (en) * 2010-07-23 2011-07-21 华为技术有限公司 Method and device for time synchronization
CN101364863B (en) * 2008-09-27 2011-11-02 华为技术有限公司 Time synchronizing method, apparatus and system for master, slave time clock side in synchronous network

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101232457A (en) * 2008-02-22 2008-07-30 浙江大学 High-precision real-time synchronization method based on IEEE1588
CN101252404A (en) * 2008-03-31 2008-08-27 重庆大学 Distributed network clock synchronizing system and method based on FPGA
CN101364863B (en) * 2008-09-27 2011-11-02 华为技术有限公司 Time synchronizing method, apparatus and system for master, slave time clock side in synchronous network
US20110170534A1 (en) * 2010-01-11 2011-07-14 Faro Technologies, Inc. Method and apparatus for synchronizing measurements taken by multiple metrology devices
WO2011085585A1 (en) * 2010-07-23 2011-07-21 华为技术有限公司 Method and device for time synchronization

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829493A (en) * 2018-06-22 2018-11-16 山东超越数控电子股份有限公司 A kind of virtual machine method for synchronizing time and device
CN109471588A (en) * 2018-09-13 2019-03-15 北京米文动力科技有限公司 A kind of synchronous method and equipment
CN109471588B (en) * 2018-09-13 2021-08-10 北京米文动力科技有限公司 Synchronization method and device
CN111130895A (en) * 2019-12-27 2020-05-08 天津瑞能电气有限公司 Method for realizing REN protocol master station based on DSP
CN111130895B (en) * 2019-12-27 2022-08-09 天津瑞能电气有限公司 Method for realizing REN protocol master station based on DSP
CN112583656A (en) * 2020-11-10 2021-03-30 深圳市有方科技股份有限公司 Debugging method and device based on LWIP user-state PPP communication function
CN112583656B (en) * 2020-11-10 2022-10-04 深圳市有方科技股份有限公司 Debugging method and device based on LWIP user mode PPP communication function
CN112904932A (en) * 2021-05-08 2021-06-04 鹏城实验室 Clock synchronization method, board card, computer storage medium and terminal equipment
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
CN103957233B (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN103957233A (en) Real-time communication platform based on processor nucleus dividing and virtual machine
CN110932839B (en) Network card, time synchronization method, equipment and computer storage medium
CN106992830B (en) A kind of clock synchronizing method in FC-AE-1553 networks
CN101547083B (en) Time synchronizer, time synchronization system and time synchronization method
CN108737468A (en) Cloud platform service cluster, construction method and device
CN102739491B (en) Ethernet communication master station implementation method
CN102907058B (en) The apparatus and method that sync-lock unit transmission is provided in the network for not having central authorities' control
CN105429725A (en) SOPC (System on a Programmable Chip) networking based sub-microsecond level clock synchronizing method and system
CN102447553A (en) Realizing device of accurate time synchronization protocol
US10444788B2 (en) Device, system, and method for synchronizing time partition windows
CN102186275A (en) Method and system for remotely and real-time playing and synchronously controlling light emitting diode (LED) lamp light
CN107295627A (en) Method for synchronizing time, time synchronism apparatus and wireless communication protocol stack system
CN106095601A (en) A kind of multi-course concurrency resolves differential server system and its implementation
EP3626004B1 (en) Method and apparatus for provision of timing for a communication network
CN109194432A (en) Multi-virtual machine time synchronization system under KVM
CN113938356A (en) Intelligent gateway
CN113489563B (en) Clock synchronization method of virtual machine and cloud platform
CN114443226A (en) IDE application on-cloud deployment method and system based on kubernets
CN102760114A (en) Communication emulation method, engine and system for multi-processor system
CN112929206B (en) Method and device for configuring cloud physical machine in cloud network environment
D'souza et al. Time-based Coordination in {Geo-Distributed}{Cyber-Physical} Systems
CN107241365A (en) A kind of cloud platform method for synchronizing time
Tseng et al. NFV deployment strategies in SDN network
CN105515709A (en) Time synchronization device based on domestic FPGA and uclinux operating system
Yongchao et al. A real-time communication platform based on processor separation and virtual machine technology

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
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170315