RTSS 2014
vMPCP: A Synchronization Framework for Multi-Core Virtual Machines
Hyoseung Kim* Shige Wang† Raj Rajkumar * General Motors R&D
* †
hyoseung@cmu.edu shige.wang@gm.com raj@ece.cmu.edu
vMPCP: A Synchronization Framework for Multi-Core Virtual Machines - - PowerPoint PPT Presentation
RTSS 2014 vMPCP: A Synchronization Framework for Multi-Core Virtual Machines Hyoseung Kim * Shige Wang Raj Rajkumar * shige.wang@gm.com raj@ece.cmu.edu hyoseung@cmu.edu * General Motors R&D RTSS 2014 Benefits of Multi-Core
RTSS 2014
* †
hyoseung@cmu.edu shige.wang@gm.com raj@ece.cmu.edu
RTSS 2014
2/24
RTSS 2014
Multi-core CPU Real-Time Hypervisor
3/24
RTSS 2014
VCPU1 Task
Task Scheduler
Task
VCPU2 Task
Task Scheduler
Task
Physical Core 1 (PCPU1) VCPU Scheduler
VCPU3 Task
Task Scheduler
Task
VCPU4 Task
Task Scheduler
Task
Physical Core 2 (PCPU2) VCPU Scheduler
4/24
RTSS 2014
5/24
RTSS 2014
[1] R. Rajkumar et al. Real-time synchronization protocols for multiprocessors. In RTSS, 1988 [2] P. Gai et al. A comparison of MPCP and MSRP when sharing resources in the Janus multiple-processor on a chip platform. In RTAS, 2003. [3] A. Block et al. A flexible real-time locking protocol for multiprocessors. In RTCSA, 2007. [4] F. Nemati et al. Independently-developed real-time systems on multi-cores with shared resources. In ECRTS, 2011. [5] R. I. Davis and A. Burns. Resource sharing in hierarchical fixed priority pre-emptive systems. In RTSS, 2006. [6] M. Behnam et al. SIRAP: a synchronization protocol for hierarchical resource sharing in real-time open systems. In EMSOFT, 2007. [7] M. Asberg et al. Resource sharing using the rollback mechanism in hierarchically scheduled real-time open systems. In RTAS, 2013.
6/24
RTSS 2014
7/24
RTSS 2014
8/24
RTSS 2014
𝑤, 𝑈𝑗 𝑤)
𝑤: Maximum execution budget
𝑤: Budget replenishment period
𝑗
– 𝐷𝑗,𝑘: WCET of j-th normal execution segment – 𝐹𝑗,𝑘: WCET of j-th critical section segment – 𝑈𝑗: Period – 𝑇𝑗: The number of critical section segments Alternating sequence of normal execution and critical section segments 9/24
RTSS 2014
Physical Core 1 (PCPU1) VCPU Scheduler Global resources (Hypervisor resources)
VCPU1 Task
Task Scheduler
Task
Local resources VCPU2 Task
Task Scheduler
Task
Local resources Global resources (Guest VM resources)
VCPU3 Task
Task Scheduler
Task
Local resources VCPU4 Task
Task Scheduler
Task
Local resources Global resources (Guest VM resources) Physical Core 2 (PCPU2) VCPU Scheduler VCPU1 VCPU3 VCPU2 VCPU4
Resources shared among tasks on the same VCPU Local blocking
Resources shared among tasks on
10/24
RTSS 2014
11/24
RTSS 2014
VCPU
v8
VCPU
v5
VCPU
v4
Task
τ5
Task
τ2
Task
τ8
Task
τ9
Task
τ6
Task
τ3
VCPU
v1
Task
τ7 Waiting list
Task
τ1
(1) Ordered by VCPU priorities (2) Ordered by task priorities Head
No need to compare task priorities in one VPCU with those in other VCPUs Good for different guest OSs (ex, μc/os-ii and Linux) 12/24
RTSS 2014
13/24
RTSS 2014
Hardware Guest OS Hypervisor Tasks Modification Guest OS Tasks Modification
14/24
RTSS 2014
15/24
RTSS 2014
– Worst-case response time of VCPU ≤ VCPU period
– Worst-case response time of task ≤ Task deadline VCPU budget overrun Blocking time Higher-priority VCPUs Local and remote blocking times Higher-priority tasks in the same VCPU VCPU budget and budget replenishment period 16/24
RTSS 2014
17/24
RTSS 2014
Number of global critical sections per task VCPU period Size of a global critical section Utilization of tasks within each VCPU Number of lockers per mutex
18/24
RTSS 2014
20 40 60 80 100 1 2 4 8 16 32 64 Schedulable tasksets (%)
Number of global critical sections per task
PSwO DSwO PSnO DSnO 20 40 60 80 100 10 20 30 40 50 60 70 80 Schedulable tasksets (%)
VCPU period (msec)
PSwO DSwO PSnO DSnO
19/24
RTSS 2014
20 40 60 80 100 10 25 50 75 100 125 150 175 200 225 250 275 300 Schedulable tasksets (%)
Size of a gcs (μsec)
PSwO DSwO PSnO DSnO 20 40 60 80 100 15.0 17.5 20.0 22.5 25.0 27.5 30.0 Schedulable tasksets (%)
Task utililization per VCPU (%)
PSwO DSwO PSnO DSnO
20/24
RTSS 2014
Cost for vMPCP para-virtualization 21/24
RTSS 2014
PCPU 1 PCPU 2 PCPU 3 PCPU 4
VM 1 VM 2
VCPU 1 VCPU 3 VCPU 5 VCPU 7 VCPU 2 VCPU 4 VCPU 6 VCPU 8 Task
Task
Task
Task
Task
Task
Task
Task
22/24
RTSS 2014
(μsec)
(μsec)
23/24
RTSS 2014
24/24