Operating Systems: From 0 to 1
Second edition
Tu, Do Hoang
- Preface
- 0 Setting up the development environment
- Part I: Preliminary
- Part II: Groundwork
-
Part III: Kernel Programming
- 9 Protected mode and x86 descriptors
-
10 Talking to
devices: the serial port and the VGA text console
- 10.1 Why output comes first
- 10.2 How a CPU talks to a device
- 10.3 Inline assembly: io.h
- 10.4 The serial port
- 10.5 The VGA text console
- 10.6 A console, a string library and kprintf
- 10.7 Who made this CPU
- 10.8 The kernel talks
- 10.9 Debugging with the serial port and gdb
- 10.10 Exercises
- 10.11 Check your understanding
- 11 Interrupts
- 12 Memory management
-
13 Processes: context
switching, scheduling, user mode and system calls
- 13.1 Concepts
- 13.2 What a context is on x86
- 13.3 Kernel threads
- 13.4 The scheduler
- 13.5 User mode
- 13.6 System calls
- 13.7 Timekeeping and sleeping
- 13.8 Locks and concurrency on one processor
- 13.9 Protection in action: the rogue task
- 13.10 Validating what user mode hands us
- 13.11 Building, testing and debugging
- 13.12 Exercises
- 13.13 Check your understanding
- 14 File system
- 15 Address spaces: fork and exec
- 16 When it does not boot: debugging a kernel
- 17 Epilogue: long mode, UEFI, SMP and where to go next
- A Toolchain and flags reference
- B Errata of the first edition
- C A minimal long-mode bootstrap
- D Reading the Intel and AMD manuals
-
E Answers to
the Check your understanding questions
- E.1 Chapter 0: Setting up the development environment
- E.2 Chapter 1: Domain documents
- E.3 Chapter 2: From hardware to software: Layers of abstraction
- E.4 Chapter 3: Computer Architecture
- E.5 Chapter 4: x86 Assembly and C
- E.6 Chapter 5: The Anatomy of a Program
- E.7 Chapter 6: Runtime inspection and debug
- E.8 Chapter 7: Bootloader
- E.9 Chapter 8: Linking and loading on bare metal
- E.10 Chapter 9: Protected mode and x86 descriptors
- E.11 Chapter 10: Talking to devices: the serial port and the VGA text console
- E.12 Chapter 11: Interrupts
- E.13 Chapter 12: Memory management
- E.14 Chapter 13: Processes: context switching, scheduling, user mode and system calls
- E.15 Chapter 14: File system
- E.16 Chapter 15: Address spaces: fork and exec
- E.17 Chapter 16: When it does not boot: debugging a kernel
- Glossary
- Bibliography