Operating system is no longer black box to me.
Operating Systems: Three Easy Pieces, or OSTEP, in fact I’ve heard about it before teachyourselfcs.com, and tried to read it once since I was tinkering with Linux and wanted to dig deeper. The book suggests readers to read CSAPP first at the very beginning in the introduction chapter, I just ignored and kept reading, then I realized I could barely follow, hehe … So don’t be arrogant, take some advices, and be patient, Rome wasn’t built in one day.
OSTEP is like an extended version of the last part of CSAPP, but from a different perspective, I would call it a system designer’s perspective. It’s also a pragmatic version, since the examples in the book are based on real systems.
The most important thing I got from the reading is it helped me consolidating this common framework in my head to understand computer system, which is, there’s always a giant byte array, you create some data structure to manage it, with some header blocks following with data blocks or so, and there’s always some cache layers sit between some components for the sake of performance or bandwidth, according to spatial or temporal locality.
It also reveiled how things work under the hood about something I’ve already used before or something I’ve heard from tech news, such as shell redirection, segmentation fault, thread-safe, copy-on-write, defragmentation, TLC/QLC in SSD etc.
The Appendix part of the book is great.
There’s a chapter about virtual machine in the appendix part, this topic is
one of my top motivations of learning operating system, since I’ve already
tinkered with QEMU a lot. The laboratory tutorial about how to compile C project
is practical, I’ve already encountered make command when compiling packages
manually but never digged into it, this tutorial let me learn what happenned
behind the scenes.
Errata: Chapter 40 File System Implementation, page 13, “one to write the bitmap (to reflect its new state to disk)” should be “write the inode bitmap”.
The next book is The Algorithm Design Manual, to be continued.