CN103853597B - Method for realizing high-frequency data collection of embedded virtual machine platform - Google Patents

Method for realizing high-frequency data collection of embedded virtual machine platform Download PDF

Info

Publication number
CN103853597B
CN103853597B CN201410060284.3A CN201410060284A CN103853597B CN 103853597 B CN103853597 B CN 103853597B CN 201410060284 A CN201410060284 A CN 201410060284A CN 103853597 B CN103853597 B CN 103853597B
Authority
CN
China
Prior art keywords
hypervisor
virtual machine
data
internal memory
interrupt
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.)
Active
Application number
CN201410060284.3A
Other languages
Chinese (zh)
Other versions
CN103853597A (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 Shenzhou Aerospace Software Technology Co.,Ltd.
Original Assignee
BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY 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 BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd filed Critical BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co Ltd
Priority to CN201410060284.3A priority Critical patent/CN103853597B/en
Publication of CN103853597A publication Critical patent/CN103853597A/en
Application granted granted Critical
Publication of CN103853597B publication Critical patent/CN103853597B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Memory System Of A Hierarchy Structure (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method for realizing high-frequency data collection of an embedded virtual machine platform. The method comprises the following steps that an internal memory mapping mechanism and an interrupt trap mechanism provided by Hypervisor are utilized, and a virtual machine partition registers a calling interface of an interrupt preprocessing function and a corresponding interrupt internal memory mapping partition in a Hypervisor space, so the privileged operation in the high-frequency data collection and the interrupt fast response can be directly completed in the Hypervisor. The method provided by the invention is mainly used in high-real-time-performance and high-safety-requirement embedded systems such as aerospace and energy source control, safety mechanisms of temporal and spatial isolation and the like provided by using virtualization technology are utilized, and meanwhile, the problem of excessive expenditure for responding high-frequency interrupt in the traditional virtualization technology is solved, so the high-real-time-performance and high-safety-requirement embedded virtualization systems can be realized.

Description

Realize embedded type virtual machine platform high-frequency data acquisition method
Technical field
The invention belongs to virtual machine field, specifically, is related to one kind and realizes embedded type virtual machine platform high-frequency data Acquisition method.
Background technology
Comprehensively modularized avionics system (IMA) with 653 specifications of ARINC as representative has become forth generation aviation The actual standard of electronic system, has obtained commonly used in Aero-Space, energy national defence.And with Intel Virtualization Technology Development, the virtual machine partitions mechanism provided using Hypervisor providing safety, isolation, durability, extensively application with High-performance calculation, commerce server field, and derive many employing virtual methods and realize the embedded of 653 standards of ARINC Real time operating system, such as XtratuM, Integrity, PikeOS etc..
In space industry, especially in the aerospace craft control system such as rocket, guided missile, manned spaceship, need in fortune Constantly gather substantial amounts of external sensor information between the departure date, need the data of collection to belong to different sub-systems, and some data The frequency of collection may very high (multiple sensing datas are gathered per 10ms), gathered data will cause to enter the orbit or fixed not in time Position precision is reduced, cannot complete task dispatching consequence.
Traditional virtual technology, does not consider that the numerous areas control systems such as Aero-Space, energy national defence are rung to interrupting Answer the consideration of real-time demand.As Xen employs separation equipment model (Split Driver Model), driving is processed before being divided into End (Front-End) is carried out with rear end (Back-End), during rear end drives the privileged partition for operating in such as Domain0, is responsible for Actual hardware is accessed by Hypervisor, and Front End is operated in the subregion of the equipment of being actually needed, which need not run Privileged instruction, it is only necessary to data are obtained by loop buffer from privileged partition, when certain application virtual machine subregion needs to visit When asking equipment, forward end drives and sends request, and front-end driven will ask to be sent to fortune by circular buffer (Ring Buffer) Rear end of the row in privileged partition drives, and after privileged partition starts to perform, the equipment for being obtained in circular buffer one by one is accessed Request, is accessed actual hardware by Hypervisor respectively, and data is preserved by shared drive, notified by loop buffer Application partition is obtaining equipment.So as on the one hand realize the share and access of equipment, equipment passes through front and back end device Driver Model Directly hardware access, reduces the performance cost that device emulation brings;On the other hand equipment access request is entered by relief area Row buffering, reduces the expense that frequent subregion switching brings.Separation equipment model is conducive to block device (block device) Access efficiency.
In embedded type virtual operating system XtratuM, in order to improve the time response velocity fails of system, in ARINC Outside the event subregion scheduling of 653 specifications definition, the method based on priority scheduling is employed, so that high priority subregion Can meet with a response as early as possible, so as to improve the response speed of the tasks such as input data collection, signal response.The side of priority scheduling Formula can only meet high priority subregion is dispatched as early as possible, can be met with a response in time when external event arrives, but subregion Between switching with dispatch expense it is still relatively large.
In some studies, hardware interrupt is mapped directly in the virtual machine partitions specified by research worker, is interrupted Signal directly passes to virtual machine partitions by way of virtual interrupt, and the interrupt service routine of virtual machine partitions directly can ring The device interrupt that should be bound, so as to improve the virtual timer response speed of virtualized partition.
In embedded especially space industry, there are the following problems for said method:
Equipment access request is delayed by the front and back end device model that traditional virtual technology is adopted by circular buffer Punching, and physical device operation is collected by special subregion by privileged partition, it is suitable for the shared biography of the block device of big data quantity It is defeated.But for a device request, need in relief area, wait privileged partition to read, and need to carry out many subzone switchings Primary equipment access can be just completed, it is embedded for altofrequency, small data quantity, the sensor acquisition of hard real time, data exchange etc. For Hard Real Time Systems, application demand cannot be met in many cases.
By priority scheduling, the response speed of high-priority task can be accelerated as far as possible, but priority with interrupt Response frequency has application characteristic and service logic to be determined without direct correlation, the high application partition of interrupt response frequency, its Priority is not necessarily highest.Therefore, altofrequency interrupt response subregion is once seized by high priority subregion, its data acquisition Window will be missed, so as to cause the loss of data.
In embedded platform especially space flight embedded platform, the embedded processings such as SPARC, ARM are used in a large number Device, it is impossible to which APIC modules are provided, its hardware interrupts resource relatively limited (such as SPARC V8, only 16 interrupt numbers), it is impossible to Independent interrupt number is provided for each sensor, thus cannot be improved in subregion using the direct mapping mode of above-mentioned interruption The method of disconnected response speed.
The content of the invention
The technical problem to be solved in the present invention is to overcome drawbacks described above, there is provided a kind of to cause high-frequency data collection and interrupt Privileged operation in quick response is done directly in Hypervisor, reduces Hypervisor multiple with partition operating system Switching, so as to realize that high-frequency data collection realizes embedded type virtual machine platform high-frequency data with rapid responding mechanis are interrupted Acquisition method.
To solve the above problems, the technical solution adopted in the present invention is:
One kind realizes embedded type virtual machine platform high-frequency data acquisition method, it is characterised in that:Step is as follows:Utilize The internal memory mapping mechanism that Hypervisor is provided is absorbed in mechanism with interruption, and in Hypervisor spaces, registration is interrupted for virtual machine partitions The calling interface of preconditioned functions (PISR), and corresponding interruption internal memory map sub-region (IMM) so that high-frequency data is gathered It is done directly in Hypervisor with the privileged operation in quick response is interrupted, reduces Hypervisor and partition operating system Multiple switching, so as to realize high-frequency data collection with interrupt rapid responding mechanis.
The step of acquisition method, is as follows:
1), in the spacecraft flight control platform based on Intel Virtualization Technology, virtual machine monitor Hypervisor is built, and Internal memory mapping mechanism and interrupt response mechanism are provided;
2) special kernel code space and data space are provided in Hypervisor, there is provided Hypercall is called and connect Mouthful, it is allowed to the virtual machine partitions of non-privileged are stored in preconditioned functions PISR is interrupted in corresponding kernel code space, and can To apply for certain interruption internal memory map sub-region IMM, preserve for the data in front half section code running;
3), obtain what certain sensor (Sensor1) was gathered when virtual machine partitions 1 (VM1) need to sample by AD per 20ms External data, then VM1 can register corresponding kernel for Sensor1 Sampling interrupts and interrupt preconditioned functions (PISR1), and Shen Please interrupt internal memory map sub-region IMM1, PISR1 is operated in Hypervisor spaces, and IMM1 is mapped to VM1 by Hypervisor, When AD Sampling interrupts are reached, Hypervisor can call PISR1 to complete AD data without switch to privileged partition or VM1 Read work, data are stored in IMM1 successively, and continue the normal process of work at present;When the time window into VM1 Afterwards, VM1 can pass through the data gathered before internal memory mapping mechanism is obtained, and data are processed;
4), when virtual machine partitions 2 (VM2) need per 10ms to be that DPRAM1 and redundant system enter line number by two-port RAM According to synchronization, VM2 can interrupt the corresponding kernel of registration for DPRAM1 synchronizing signals and interrupt preconditioned functions PISR2, and apply Interrupt internal memory map sub-region IMM2, PISR2 is operated in Hypervisor spaces, and IMM2 is mapped to VM2 by Hypervisor, when When two-port RAM synchronizing signal is reached, it is not necessary to be switched to privileged partition or VM1, Hypervisor directly invoke PISR2 and complete Simultaneously operating, synchrodata is stored in IMM2, and continues the normal process of work at present;When the time window into VM2 Afterwards, VM2 can pass through the data of the preamble of internal memory mapping mechanism acquisition, and data are processed.
As a result of above-mentioned technical proposal, compared with prior art, the invention provides one kind is in virtual platform Complete high-frequency data collection and interrupt rapid responding mechanis, using the internal memory mapping mechanism and middle rift of Hypervisor offers Enter mechanism, the calling interface for interrupting preconditioned functions, and corresponding interruption are registered in virtual machine partitions in Hypervisor spaces Internal memory map sub-region so that high-frequency data gathers directly complete in Hypervisor with the privileged operation interrupted in quick response Into the multiple switching of reduction Hypervisor and partition operating system, so as to realizing high-frequency data collection and interrupting quickly sound Answer mechanism.
Description of the drawings
Working plans of the Fig. 1 for an embodiment of the present invention.
Specific embodiment
Embodiment:
One kind realizes embedded type virtual machine platform high-frequency data acquisition method, and step is as follows:Carried using Hypervisor For internal memory mapping mechanism and interruption be absorbed in mechanism, in Hypervisor spaces, preconditioned functions are interrupted in registration for virtual machine partitions (PISR) calling interface, and corresponding interruption internal memory map sub-region (IMM) so that high-frequency data is gathered and interrupted quickly Privileged operation in response is done directly in Hypervisor, and reduction Hypervisor is repeatedly cut with partition operating system Change, so as to realizing high-frequency data collection and interrupting rapid responding mechanis.
As shown in figure 1, the specific implementation step of acquisition method is as follows:
1), in the spacecraft flight control platform based on Intel Virtualization Technology, virtual machine monitor Hypervisor is built, and Internal memory mapping mechanism and interrupt response mechanism are provided.
2) special kernel code space and data space are provided in Hypervisor, there is provided Hypercall is called and connect Mouthful, it is allowed to the virtual machine partitions of non-privileged are stored in preconditioned functions PISR is interrupted in corresponding kernel code space, and can To apply for certain interruption internal memory map sub-region IMM, preserve for the data in front half section code running.
3), obtain what certain sensor (Sensor1) was gathered when virtual machine partitions 1 (VM1) need to sample by AD per 20ms External data, then VM1 can register corresponding kernel for Sensor1 Sampling interrupts and interrupt preconditioned functions (PISR1), and Shen Please interrupt internal memory map sub-region IMM1, PISR1 is operated in Hypervisor spaces, and IMM1 is mapped to VM1 by Hypervisor, When AD Sampling interrupts are reached, Hypervisor can call PISR1 to complete AD data without switch to privileged partition or VM1 Read work, data are stored in IMM1 successively, and continue the normal process of work at present;When the time window into VM1 Afterwards, VM1 can pass through the data gathered before internal memory mapping mechanism is obtained, and data are processed.
4), when virtual machine partitions 2 (VM2) need per 10ms to be that DPRAM1 and redundant system enter line number by two-port RAM According to synchronization, VM2 can interrupt the corresponding kernel of registration for DPRAM1 synchronizing signals and interrupt preconditioned functions PISR2, and apply Interrupt internal memory map sub-region IMM2, PISR2 is operated in Hypervisor spaces, and IMM2 is mapped to VM2 by Hypervisor, when When two-port RAM synchronizing signal is reached, it is not necessary to be switched to privileged partition or VM1, Hypervisor directly invoke PISR2 and complete Simultaneously operating, synchrodata is stored in IMM2, and continues the normal process of work at present;When the time window into VM2 Afterwards, VM2 can pass through the data of the preamble of internal memory mapping mechanism acquisition, and data are processed.
Present invention is mainly used in the embedded system of the hard real time such as Aero-Space, energy control, high safety requirement, in profit While the security mechanisms such as the space-time isolation provided with Intel Virtualization Technology, solve traditional virtual technology response altofrequency and interrupt The excessive problem of expense, so as to realize the embedded type virtual system of hard real time, high safety.
Presently preferred embodiments of the present invention is the foregoing is only, not to limit the present invention, all essences in the present invention Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.

Claims (1)

1. one kind realizes embedded type virtual machine platform high-frequency data acquisition method, it is characterised in that:Step is as follows:Utilize The internal memory mapping mechanism that Hypervisor is provided is absorbed in mechanism with interruption, and in Hypervisor spaces, registration is interrupted for virtual machine partitions The calling interface of preconditioned functions PISR, and corresponding interruption internal memory map sub-region IMM so that high-frequency data is gathered with Privileged operation in disconnected quick response is done directly in Hypervisor, reduces Hypervisor many with partition operating system Secondary switching, so as to realizing high-frequency data collection and interrupting rapid responding mechanis;
The step of acquisition method, is as follows:
1), in the spacecraft flight control platform based on Intel Virtualization Technology, virtual machine monitor Hypervisor is built, and is provided Internal memory mapping mechanism and interrupt response mechanism;
2) special kernel code space and data space are provided in Hypervisor, there is provided Hypercall calling interfaces, is permitted Perhaps the virtual machine partitions of non-privileged are stored in preconditioned functions PISR is interrupted in corresponding kernel code space, and are applied certain Interruption internal memory map sub-region IMM, in front half section code running data preserve;
3), the external data of certain sensor Sensor1 collections is obtained when virtual machine partitions VM1 needs to sample by AD per 20ms, Then VM1 registers corresponding kernel interruption preconditioned functions PISR1 for Sensor1 Sampling interrupts, and applies interrupting internal memory mapping Subregion IMM1, PISR1 are operated in Hypervisor spaces, and IMM1 is mapped to VM1 by Hypervisor, when AD Sampling interrupts are arrived Up to when, Hypervisor can call PISR1 to complete the work of AD digital independents without switch to privileged partition or VM1, by number According to being stored in IMM1 successively, and continue the normal process of work at present;After time window into VM1, VM1 passes through internal memory The data that mapping mechanism is gathered before obtaining, and data are processed;
4), when virtual machine partitions VM2 needs per 10ms to be that DPRAM1 and redundant system carry out data syn-chronization by two-port RAM, VM2 interrupts the corresponding kernel of registration for DPRAM1 synchronizing signals and interrupts preconditioned functions PISR2, and applies interrupting internal memory mapping Subregion IMM2, PISR2 are operated in Hypervisor spaces, and IMM2 is mapped to VM2 by Hypervisor, when two-port RAM it is same When step signal is reached, it is not necessary to be switched to privileged partition or VM1, Hypervisor directly invoke PISR2 and complete simultaneously operating, will Synchrodata is stored in IMM2, and continues the normal process of work at present;After time window into VM2, VM2 is by interior The data of the preamble of mapping mechanism acquisition are deposited, and data are processed.
CN201410060284.3A 2014-02-21 2014-02-21 Method for realizing high-frequency data collection of embedded virtual machine platform Active CN103853597B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410060284.3A CN103853597B (en) 2014-02-21 2014-02-21 Method for realizing high-frequency data collection of embedded virtual machine platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410060284.3A CN103853597B (en) 2014-02-21 2014-02-21 Method for realizing high-frequency data collection of embedded virtual machine platform

Publications (2)

Publication Number Publication Date
CN103853597A CN103853597A (en) 2014-06-11
CN103853597B true CN103853597B (en) 2017-04-19

Family

ID=50861286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410060284.3A Active CN103853597B (en) 2014-02-21 2014-02-21 Method for realizing high-frequency data collection of embedded virtual machine platform

Country Status (1)

Country Link
CN (1) CN103853597B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107278293B (en) * 2017-05-08 2020-11-06 深圳前海达闼云端智能科技有限公司 Sensor implementation device and method for virtual machine
CN109542610B (en) * 2018-12-04 2023-06-30 中国航空工业集团公司西安航空计算技术研究所 Method for realizing virtual interrupt standard component of multi-partition operating system
CN110147265A (en) * 2019-04-26 2019-08-20 王云飞 A method of the integrated virtualization system based on microcontroller platform
CN113407298A (en) * 2020-03-17 2021-09-17 阿里巴巴集团控股有限公司 Method, device and equipment for realizing message signal interruption
CN114520825B (en) * 2022-01-07 2023-12-26 中汽创智科技有限公司 Hypervisor micro-kernel architecture based on distributed mode, communication method and equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271401A (en) * 2008-04-23 2008-09-24 北京航空航天大学 Server cluster unit system with single system image
CN101271436A (en) * 2007-03-19 2008-09-24 联想(北京)有限公司 Virtual machine system and access processing method of its advanced programmable interrupt controller
CN101377745A (en) * 2007-08-28 2009-03-04 张玉昆 Virtual computer system and method for implementing data sharing between each field
CN101539868A (en) * 2009-04-10 2009-09-23 北京大学 Client operating system nucleus code dynamic replacement method of virtual machine manager
CN101727351A (en) * 2009-12-14 2010-06-09 北京航空航天大学 Multicore platform-orientated asymmetrical dispatcher for monitor of virtual machine and dispatching method thereof

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007510198A (en) * 2003-10-08 2007-04-19 ユニシス コーポレーション Paravirtualization of computer systems using hypervisors implemented in host system partitions
US20090113111A1 (en) * 2007-10-30 2009-04-30 Vmware, Inc. Secure identification of execution contexts
US8789042B2 (en) * 2010-09-27 2014-07-22 Mips Technologies, Inc. Microprocessor system for virtual machine execution

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101271436A (en) * 2007-03-19 2008-09-24 联想(北京)有限公司 Virtual machine system and access processing method of its advanced programmable interrupt controller
CN101377745A (en) * 2007-08-28 2009-03-04 张玉昆 Virtual computer system and method for implementing data sharing between each field
CN101271401A (en) * 2008-04-23 2008-09-24 北京航空航天大学 Server cluster unit system with single system image
CN101539868A (en) * 2009-04-10 2009-09-23 北京大学 Client operating system nucleus code dynamic replacement method of virtual machine manager
CN101727351A (en) * 2009-12-14 2010-06-09 北京航空航天大学 Multicore platform-orientated asymmetrical dispatcher for monitor of virtual machine and dispatching method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
虚拟化技术在综合化航电系统中的应用;张炯等;《北京航空航天大学学报》;20100228;第36卷(第2期);第127-130页 *

Also Published As

Publication number Publication date
CN103853597A (en) 2014-06-11

Similar Documents

Publication Publication Date Title
CN103853597B (en) Method for realizing high-frequency data collection of embedded virtual machine platform
Pena et al. A complete and efficient CUDA-sharing solution for HPC clusters
CN103853598B (en) Realize embedded type virtual machine strong when virtual timer response method
EP2807555B1 (en) Para-virtualized asymmetric gpu processors
CN101620547B (en) Virtual physical interrupt processing method of X86 computer
US10169075B2 (en) Method for processing interrupt by virtualization platform, and related device
US10365651B2 (en) Control system for autonomous locomotion devices
CN108366018B (en) DPDK-based network data packet processing method
CN103942178A (en) Communication method between real-time operating system and non-real-time operating system on multi-core processor
EP0377991A3 (en) Data processing systems
CN103197949A (en) Method and assembly for use of a resource of a hardware platform with at least two virtual machines
EP2977899A2 (en) Integrating execution of computing analytics within a mapreduce processing environment
CN102822802A (en) Multi-core processor sytem, control program, and control method
CN107577539B (en) Shared memory structure for communication between kernel mode and user mode and application thereof
US20180239629A1 (en) Virtual processor scheduling via memory monitoring
US10002016B2 (en) Configuration of virtual machines in view of response time constraints
CN104598298A (en) Virtual machine dispatching algorithm based on task load and current work property of virtual machine
CN108196946A (en) A kind of subregion multinuclear method of Mach
US20220188123A1 (en) Computational array microprocessor system with variable latency memory access
CN109144698B (en) Data acquisition method, event distributor, device, medium, and unmanned vehicle
CN112363799A (en) Avionics device simulator based on layered decoupling architecture
US20090172676A1 (en) Conditional batch buffer execution
Wu et al. Oops! it's too late. your autonomous driving system needs a faster middleware
EP4372576A1 (en) Sensor data access system
Bruzzone et al. Standard Linux for embedded real-time robotics and manufacturing control systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100094 No. 28, Yongfeng Road, Beijing, Haidian District

Patentee after: Beijing Shenzhou Aerospace Software Technology Co.,Ltd.

Address before: 100094 No. 28, Yongfeng Road, Beijing, Haidian District

Patentee before: BEIJING SHENZHOU AEROSPACE SOFTWARE TECHNOLOGY Co.,Ltd.