Skip to main content
Back to USENIX
  • Conferences
  • Students
Sign in

USENIX Conference Policies

  • Event Code of Conduct
  • Conference Network Policy
  • Statement on Environmental Responsibility Policy

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 taken from actual committed versions of the FreeBSD source.

Jeffrey Hsu, The FreeBSD Project

BibTeX
@inproceedings {270125,
author = {Jeffrey Hsu},
title = {Reasoning about {SMP} in {FreeBSD}},
booktitle = {BSDCon 2003 (BSDCon 2003)},
year = {2003},
address = {San Mateo, CA},
url = {https://www.usenix.org/conference/bsdcon-2003/reasoning-about-smp-freebsd},
publisher = {USENIX Association},
month = sep
}
Download

Links

Paper: 
http://www.usenix.org/events/bsdcon03/tech/full_papers/hsu/hsu.pdf
Paper (HTML): 
http://www.usenix.org/events/bsdcon03/tech/full_papers/hsu/hsu_html/index.html
  • Log in or register to post comments

© USENIX
EIN 13-3055038

  • Privacy Policy
  • Contact Us