Skip to Main content Skip to Navigation
Conference papers

The lock holder and the lock waiter pre-emption problems: nip them in the bud using informed spinlocks (I-Spinlocks)

Abstract : In native Linux systems, spinlock's implementation relies on the assumption that both the lock holder thread and lock waiter threads cannot be preempted. However, in a virtualized environment, these threads are scheduled on top of virtual CPUs (vCPU) that can be preempted by the hypervisor at any time, thus forcing lock waiter threads on other vCPUs to busy wait and to waste CPU cycles. This leads to the well-known Lock Holder Preemption (LHP) and Lock Waiter Preemption (LWP) issues. In this paper, we propose I-Spinlock (for Informed Spinlock), a new spinlock implementation for virtualized environments. Its main principle is to only allow a thread to acquire a lock if and only if the remaining time-slice of its vCPU is sufficient to enter and leave the critical section. This is possible if the spinlock primitive is aware (informed) of its time-to-preemption (by the hypervisor). We implemented I-Spinlock in the Xen virtualization system. We show that our solution is compliant with both para-virtual and hardware virtualization modes. We performed extensive performance evaluations with various reference benchmarks and compared our solution to previous solutions. The evaluations demonstrate that I-Spinlock outperforms other solutions, and more significantly when the number of core increases.
Complete list of metadatas

Cited literature [29 references]  Display  Hide  Download

https://hal.archives-ouvertes.fr/hal-02604135
Contributor : Open Archive Toulouse Archive Ouverte (oatao) <>
Submitted on : Saturday, May 16, 2020 - 9:14:44 AM
Last modification on : Tuesday, June 16, 2020 - 8:33:47 AM

File

Djomgwe-Teabe_22297.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-02604135, version 1
  • OATAO : 22297

Citation

Boris Djomgwe Teabe, Vlad-Tiberiu Nitu, Alain-Bouzaïde Tchana, Daniel Hagimont. The lock holder and the lock waiter pre-emption problems: nip them in the bud using informed spinlocks (I-Spinlocks). European Conference on Computer Systems (EuroSys 2017), Apr 2017, Belgrade, Serbia. pp.286-297. ⟨hal-02604135⟩

Share

Metrics

Record views

13

Files downloads

45