Operating Systems: Three Easy Pieces

Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau (University of Wisconsin-Madison)

NEW: Security Chapters by Peter Reiher (UCLA)

Blog: Why Textbooks Should Be Free

Quick: Free Book Chapters - Hardcover - Softcover (Amazon) - Buy PDF - EU (Lulu) - Buy in India - Buy Stuff - Donate - For Teachers - Homework - Projects - News - Acknowledgements - Other Books

Welcome to Operating Systems: Three Easy Pieces (now version 1.10 -- see book news for details), a free online operating systems book! 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! Or maybe not so fun?

This book is and will always be free in PDF form, as seen below. For those of you wishing to BUY a copy, please consider the following:

  • Lulu Hardcover (v1.10): this may be the best printed form of the book (it really looks pretty good), but it is also the most expensive way to obtain the black book of operating systems (a.k.a. the comet book or the asteroid book according to students). Now just: $39.75
  • Amazon Softcover (v1.10): Same book as softcover above, but printed through Amazon CreateSpace. Now just: $28.27 (but works with Prime shipping)
  • Downloadable PDF (v1.10): this is a nice convenience and adds things like a hyperlinked table of contents, index of terms, lists of hints, tips, systems advice, and a few other things not seen in the free version, all in one massive DRM-free PDF. Once purchased, you will always be able to get the latest version. Just: $10.00
  • Kindle (still v1.00): Really, just the PDF and does not include all the bells and whistles common in e-pub books.

Warning: Some resellers on Amazon buy old versions of the books and claim to sell them as “new” on Amazon (click here for an example); buy from them at your own risk. In general, buy either directly from Lulu.com or Amazon.com (not a reseller). For Amazon, go to this page and look for Seller Information to be Amazon.com.

Merch: Can't bear to go out in public without OSTEP? How about an Operating Systems: Three Easy Pieces T-shirt or laptop sticker or bathmat or blanket or mug or check out the whole store?

Donate: By popular demand, another way to support this site and its contents: donate! Click to donate $1 - $10 - $20 - $50 - or click here to donate any amount you want! Your donation helps keep this book going. Think about it: if everyone who came to this website donated just one dollar, we'd have at least three dollars. Thanks!

Another way to help the book out: cite it! Here is the BiBTeX entry (seen below); you can also link to the site of the best free operating systems book on the market.

Operating Systems: Three Easy Pieces
Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau
Arpaci-Dusseau Books
November, 2023 (Version 1.10)

And now, the free online form of the book, in chapter-by-chapter form (now with chapter numbers!):

Intro Virtualization Concurrency Persistence Security
Preface 3 Dialogue 12 Dialogue 25 Dialogue 35 Dialogue 52 Dialogue
TOC 4 Processes 13 Address Spaces code 26 Concurrency and Threads code 36 I/O Devices 53 Intro Security
1 Dialogue 5 Process API code 14 Memory API 27 Thread API code 37 Hard Disk Drives 54 Authentication
2 Introduction code 6 Direct Execution 15 Address Translation 28 Locks code 38 Redundant Disk Arrays (RAID) 55 Access Control
7 CPU Scheduling 16 Segmentation 29 Locked Data Structures 39 Files and Directories 56 Cryptography
8 Multi-level Feedback 17 Free Space Management 30 Condition Variables code 40 File System Implementation 57 Distributed
9 Lottery Scheduling code 18 Introduction to Paging 31 Semaphores code 41 Fast File System (FFS)
10 Multi-CPU Scheduling 19 Translation Lookaside Buffers 32 Concurrency Bugs 42 FSCK and Journaling Appendices
11 Summary 20 Advanced Page Tables 33 Event-based Concurrency 43 Log-structured File System (LFS) Dialogue
21 Swapping: Mechanisms 34 Summary 44 Flash-based SSDs Virtual Machines
22 Swapping: Policies 45 Data Integrity and Protection Dialogue
23 Complete VM Systems 46 Summary Monitors
24 Summary 47 Dialogue Dialogue
48 Distributed Systems Lab Tutorial
49 Network File System (NFS) Systems Labs
50 Andrew File System (AFS) xv6 Labs
51 Summary

INSTRUCTORS: If you are using these free chapters, please just link to them directly (instead of making a copy locally); we make little improvements frequently and thus would like to provide the latest to whomever is using it. Also: we have made our own class-preparation notes available to those of you teaching from this book; please drop us a line at ostep.book@gmail.com if you are interested.

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

PROJECTS: While the book should provide a good conceptual guide to key aspects of modern operating systems, no education is complete without projects. We are in the process of making the projects we use at the University of Wisconsin-Madison widely available; an initial link to project descriptions is available here: PROJECTS. Coming soon: the automated testing framework that we use to grade projects.

BOOKS NEWS: Many small things to move to version 1.10. Track changes: NEWS

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

OTHER SYSTEMS BOOKS: Interested in other systems books? Good! Of course, we assume some background in The C Programming Language, so that's a good investment. And Advanced Programming in the UNIX Environment is a must for any shelf. On top of that, here are some OS books that could be worth your time: Operating Systems: Principles and Practice - Operating System Concepts - Operating Systems: Internals and Design Principles (8th Edition) - Modern Operating Systems (4th Edition) - Linux Kernel Development (3rd Edition) - Understanding the Linux Kernel - The Design and Implementation of the FreeBSD Operating System - Solaris Internals: Solaris 10 and OpenSolaris Kernel Architecture - Mac OS X Internals: A Systems Approach - The Design of the UNIX Operating System - UNIX: The Textbook - The Linux Programming Interface: A Linux and UNIX System Programming Handbook.

OTHER BOOKS: So you're looking down here? Well, how about reading something other than tech books all day long? Honestly, you need to be more balanced. Here are some awesome books you should most definitely read. Fiction: Cloud Atlas: A Novel - Life of Pi - A Prayer for Owen Meany: A Novel - All the Light We Cannot See - The Book Thief - The Fault in Our Stars - Tenth of December: Stories - If I Don't Six - A Game of Thrones - To Kill a Mockingbird - The Kite Runner - Ender's Game - Foundation - Slaughterhouse-Five - The Shadow of the Wind - Flowers for Algernon - Holes - Atonement - The Name of the Wind - Beloved - For Whom the Bell Tolls - Different Seasons - Neuromancer - Snow Crash - Cryptonomicon - Shantaram - A Room with a View - Jude the Obscure - Illusions: The Adventures of a Reluctant Messiah - A Canticle for Leibowitz - A Wizard of Earthsea - Black Swan Green - The Stars My Destination - Ancillary Justice - My Brilliant Friend - Crossing to Safety - Possession - The Selected Works of T.S. Spivet - Essential Ellison - The Demolished Man - The Nightingale - The Overstory - The Windup Girl - The Water Knife Non-fiction: Seabiscuit: An American Legend - Unbroken - Surely You're Joking, Mr. Feynman! - On Intelligence - The Language Instinct - Flow - Guns, Germs, and Steel - The Selfish Gene - A Heartbreaking Work of Staggering Genius - Lies My Teacher Told Me - Freakonomics - How the Irish Saved Civilization - Cod - The Devil in the White City - The Swerve: How the World Became Modern - The Drunkard's Walk - The Visual Display of Quantitative Information - Eats, Shoots & Leaves - The Elements of Style - The Design of Everyday Things - Mountains Beyond Mountains - The Soul of A New Machine - Alan Turing: The Enigma - Consider the Lobster - The Vintage Guide to Classical Music

ACKS: The authors wish to acknowledge all the sources of funding for their research over the years. In particular, the authors appreciate the strong support from the National Science Foundation (NSF), which is an essential part of the modern research and educational infrastructure of the USA.

.