Sciweavers

BSDCON
2003

Reasoning about SMP in FreeBSD

13 years 6 months ago
Reasoning about SMP in FreeBSD
While the subject of SMP locking primitives has been well covered in the literature [Val][Schm][Bald][Leh], there has been relatively little discussion on the rationale and process behind the application of these locking primitives. This leads to an inverted problem where the bulk of the work in making a kernel SMP-safe lies above the locking primitives, yet there is little guidance on how and where to lock in the individual subsystems. In this paper, we will discuss our experiences with SMP locking in the FreeBSD kernel and illustrate some of the reasoning concerning the placement or non-placement of SMP locks in the kernel. We hope this will aid other developers in locking up the remaining subsystems and in understanding the locks that are already in place. We start with an overview of general locking strategies followed by many examples of race conditions caused by faulty SMP reasoning and give solutions for correctly locking up the affected piece of code. All our examples are take...
Jeffrey Hsu
Added 31 Oct 2010
Updated 31 Oct 2010
Type Conference
Year 2003
Where BSDCON
Authors Jeffrey Hsu
Comments (0)