TY - GEN
T1 - Preemptable Ticket spinlocks
T2 - 9th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE 2013
AU - Ouyang, Jiannan
AU - Lange, John R.
PY - 2013
Y1 - 2013
N2 - When executing inside a virtual machine environment, OS level synchronization primitives are faced with significant challenges due to the scheduling behavior of the underlying virtual machine monitor. Operations that are ensured to last only a short amount of time on real hardware, are capable of taking considerably longer when running virtualized. This change in assumptions has significant impact when an OS is executing inside a critical region that is protected by a spinlock. The interaction between OS level spin-locks and VMM scheduling is known as the Lock Holder Preemption problem and has a significant impact on overall VM performance. However, with the use of ticket locks instead of generic spinlocks, virtual environments must also contend with waiters being preempted before they are able to acquire the lock. This has the effect of blocking access to a lock, even if the lock itself is available. We identify this scenario as the Lock Waiter Preemption problem. In order to solve both problems we introduce Preemptable Ticket spinlocks, a new locking primitive that is designed to enable a VM to always make forward progress by relaxing the ordering guarantees offered by ticket locks. We show that the use of Pre-emptable Ticket spinlocks improves VM performance by 5.32X on average, when running on a non paravirtual VMM, and by 7.91X when running on a VMM that supports a paravirtual locking interface, when executing a set of microbenchmarks as well as a realistic e-commerce benchmark.
AB - When executing inside a virtual machine environment, OS level synchronization primitives are faced with significant challenges due to the scheduling behavior of the underlying virtual machine monitor. Operations that are ensured to last only a short amount of time on real hardware, are capable of taking considerably longer when running virtualized. This change in assumptions has significant impact when an OS is executing inside a critical region that is protected by a spinlock. The interaction between OS level spin-locks and VMM scheduling is known as the Lock Holder Preemption problem and has a significant impact on overall VM performance. However, with the use of ticket locks instead of generic spinlocks, virtual environments must also contend with waiters being preempted before they are able to acquire the lock. This has the effect of blocking access to a lock, even if the lock itself is available. We identify this scenario as the Lock Waiter Preemption problem. In order to solve both problems we introduce Preemptable Ticket spinlocks, a new locking primitive that is designed to enable a VM to always make forward progress by relaxing the ordering guarantees offered by ticket locks. We show that the use of Pre-emptable Ticket spinlocks improves VM performance by 5.32X on average, when running on a non paravirtual VMM, and by 7.91X when running on a VMM that supports a paravirtual locking interface, when executing a set of microbenchmarks as well as a realistic e-commerce benchmark.
KW - Lock holder preemption
KW - Paravirtualization
KW - Virtual machines
UR - https://www.scopus.com/pages/publications/84875834205
U2 - 10.1145/2451512.2451549
DO - 10.1145/2451512.2451549
M3 - Conference contribution
AN - SCOPUS:84875834205
SN - 9781450312660
T3 - VEE 2013 - Proceedings of the ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments
SP - 191
EP - 200
BT - VEE 2013 - Proceedings of the ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments
Y2 - 16 March 2013 through 17 March 2013
ER -