Operating Systems: Three Easy Pieces

Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau

NEWS FLASH: OPERATING SYSTEMS JUST GOT EASIER! As described further below, we've simplified the book, moving to three easy pieces instead of four. The older version of the book is available here. The fourth piece, the topic of distributed systems, is so large as to warrant its own book, alas; watch for such an effort in the (somewhat distant) future.

FURTHER NEWS FLASH: OPERATING SYSTEMS JUST GOT EASIER TO TEACH TOO! We're in the process of making all of our class notes, handouts, and code snippets available for instructors, to reduce class preparation time. Please just send email to remzi@cs.wisc.edu for details on how to download the current snapshot of this resource.

Welcome to this book! As you might notice, it is a work in progress - so please be patient. Feedback is appreciated! And indeed, rewarded, with an acknowledgment on the errata page; just send email!

The book is centered around three conceptual pieces that are fundamental to operating systems: virtualization, concurrency, and persistence. In understanding the conceptual, you will also learn the practical, including how an operating system does things like schedule the CPU, manage memory, and store files persistently. Lots of fun stuff!

This book is and will always be free in PDF form, as seen below. NEW: For those of you wishing for a print copy, please visit this website. Just a few bucks (well, the least they let us charge) and you get a beautiful soft-cover version of OSTEP; as it is bound in black, some call it the black book. ONE MORE NEW THING: You can even buy the entire PDF here, for only ten dollars! This is an easy way to get the entire thing as a single PDF, and also perhaps an indicator as to why online publishing is taking off (hint: it's cheaper!). These paid methods are both brought to you by the demand of various students and professors; they are also a nice way to show your pecuniary appreciation to the authors.

Intro Virtualization Concurrency Persistence Appendices
Preface Dialogue Address Spaces Dialogue Dialogue Dialogue
Contents Processes Memory API Intro Devices VMM Intro
Dialogue Process API Translation Thread API Disks *VMMMem*
Intro code Direct Execution Segmentation Locks RAID Dialogue
Scheduling Free Space *Locks: Usage* Files and Directories Monitors
MLFQ Paging Condition Variables FS Implementation Dialogue
Lottery Faster Semaphores Fast File System Lab Tutorial
*Multiple CPUs* Smaller Deadlock Journaling Systems Labs
Summary Beyond Physical *Real-life Bugs* Log-structured FS xv6 Labs
Policies Summary *Modern File Systems*
VAX/VMS *Summary*
Summary Dialogue
Dist: Intro
Sun's NFS
Andrew FS
*Summary*

Homeworks: Some of the chapters have homeworks at the end, which require simulators and other code. More details on that, including how to find said code, can be found here: homework

Current Status: We have just simplified the book a bit, focusing on just three easy pieces and only a short introduction to distributed systems as the last part of the third piece on persistence. The older form of the book, with four easy pieces, is available here (and always will be). We are thus on version 0.5, with a goal of having a complete set of chapters this upcoming year. Track recent changes to the book here.

Acknowledgments: These students have greatly contributed to this effort, through endless bug reports and other comments. Your name could go here! (as well as in any final, printed book): errata