vmPTP: Precise Time Protocol for Inter-VM Communication in Embedded Virtualized Systems
- 26 August 2024
- journal article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
- Vol. 44 (3) , 897-910
Abstract
System virtualization techniques are gradually applied to embedded systems with the performance improvement of embedded devices; however, there is a large time offset (i.e., deviation) of hundreds of ms between virtual machines (VMs) due to the drift of the virtualization abstraction layer and the jitter phenomenon. It is urgent to significantly reduce this offset by time synchronization techniques. Unfortunately, the current mainstream time synchronization software (e.g., Chrony and LinuxPTP) cannot be used in the embedded virtualized system connected by the fieldbus, such as controller area network (CAN); meanwhile, drift correction-based time synchronization techniques dedicated to CAN bus cannot be utilized for virtualized systems. In this study, we design a general vmPTP, which is a precise time protocol (PTP) for inter-VM communication in embedded virtualized systems based on Linux kernel-based VM (KVM). This is the first time synchronization work focused on embedded virtualized systems. We implement two vmPTP versions based on VirtIO and inter-VM shared memory (IVSHMEM) according to the four message (i.e., packet) exchanges of PTP. We propose an asymmetry compensation strategy to solve the problem of asymmetric rate of I/O operations in the message exchange process, which optimizes the offset computation. We further produce a convergence stopping approach which can continuously converge the offset until the offset is within the given bound and stop. We conduct experimental evaluations on both X86-64 and ARM64 architectures. For two versions of vmPTP, the experimental results show that: 1) the offsets are always within $1~{\mu }$ s on two architectures; 2) the offsets are less than that of LinuxPTP and Chrony; and 3) the vmPTP’s CPU and memory utilization on the X86-64 architecture are merely 0.3% and 0.1%, respectively, whereas those on the ARM64 architecture are 3.8% and 0.1%, respectively. We experiment with vmPTP in real-time application and the result demonstrates that vmPTP is feasible and reliable in the real platform.Keywords
Funding Information
- Guangxi Major Science and Technology Program (2023AA03006)
- Chongqing Major Science and Technology Program (CSTB2022TIAD-STX0001)
- Changsha Major Science and Technology Program (kh2401002)
- Natural Science Foundation of Chongqing Municipality (CSTB2022NSCQMSX1393, CSTB2022NSCQ-MSX108)
- National Natural Science Foundation of China (62133014, 62321003, 61932010, 62272155, 62402173)
- Natural Science Foundation of Hunan Province (2022JJ10021, 2023JJ40172)
This publication has 47 references indexed in Scilit:
- Hardware Accelerators for Autonomous Vehicles2023
- Embedded Systems and Architectures2022
- Clock Synchronization in Virtualized Distributed Real-Time Systems Using IEEE 802.1AS and ACRNIEEE Access, 2021
- On demand clock synchronization for live VM migration in distributed cloud data centersJournal of Parallel and Distributed Computing, 2020
- Slurm-V: Extending Slurm for Building Efficient HPC Cloud with SR-IOV and IVShmem2016
- Challenges in real-time virtualization and predictable cloud computingJournal of Systems Architecture, 2014
- Distributed management of CPU resources for time-sensitive applications2013
- Understanding and Using the Controller Area Network Communication Protocol2012
- Designing Embedded Systems with PIC Microcontrollers2010
- Internet time synchronization: the network time protocolIEEE Transactions on Communications, 1991