OSDEV[0x1]: Studying Strategy (for Writing an Operating System)


This video is the second part (0x1) of a series on writing an operating system. The creator, Raj, details the comprehensive studying and logging strategy he has designed to tackle this long-term project. The goal is to create a structured approach that fosters deep understanding, maintains motivation, and effectively manages the vast scope of the endeavor.

Introduction and Motivation

  • [00:00:10] Raj introduces the topic: the “studying and logging strat” for his OS project, emphasizing the need for proper preparation and a “generic compass” for a long journey.
  • [00:03:00] He frames writing an OS as a problem that requires true understanding, unlike tasks that can be “handwaved” with AI. This project serves as a personal answer to the question of how to genuinely study complex topics today.
  • [00:05:00] The project is approached as a fun, challenging hobby, with the goal of building a formal, well-documented effort to avoid fizzling out.

Core Logging and Study Strategy

  • [00:07:30] Daily Journaling: Raj uses org-journal in Emacs to log his daily thoughts, questions, and what he’s learning. He dedicates approximately 15 hours per week to the project.
  • [00:09:40] “Meditations” Log: A separate, long-term log is used to capture larger, open-ended questions about systems design, research, and learning strategies. This allows complex ideas to “simmer” over time.
  • [00:15:30] Fundamental Learning: His primary learning resource is the textbook Operating Systems: Three Easy Pieces (OSTEP). He is working through it systematically.
  • [00:17:50] Hands-on C Practice: To rebuild his C programming skills, he is actively coding the examples from OSTEP, tinkering with the source code, and pushing it to a Git repository.
  • [00:20:45] Starting with C: He explains his decision to start with C is to first deeply understand why it is the standard for OS development (e.g., POSIX, memory control, hardware interaction) before he can logically consider alternatives.

Advanced Learning with Emacs and AI

  • [00:26:00] Knowledge Graph with Org-roam: He uses Org-roam not as a static knowledge base, but as a “wisdom generator” to build and visualize connections between concepts. He demonstrates a workflow where he makes his Emacs window transparent to view his knowledge graph in the background.
  • [00:27:50] AI-Generated Outlines: Using the gptel package in Emacs, he sends topics to an LLM to generate concise, jargon-heavy outlines. This helps him quickly identify key areas and create links to other nodes in his knowledge graph.
  • [00:30:15] AI as an Expert Mentor: He uses another tool, aidermacs, with a custom “Unix graybeard” persona. This enables a conversational Q&A format for exploring deep systems programming questions, which has helped him “rediscover” concepts like tickless kernels.

Tooling and Resources

  • [00:12:40] Virtualization: He plans to use KVM and Virtual Machine Manager (VMM) to automate his testing pipeline.
  • [00:36:20] Emacs as the Hub: Emacs is the central tool for his entire workflow—managing journals, reading PDFs, writing code, interacting with LLMs, and accessing man pages.
  • [00:39:50] Supplemental Books: He intends to read other books like Modern C and Hacking: The Art of Exploitation to broaden his knowledge in related areas like security.

Conclusion

  • [00:41:00] Raj concludes that even after a short time, this structured approach has already produced a positive mindset shift and increased his feelings of competence.
  • [00:41:40] He assures his audience, many of whom are Emacs users, that Emacs will remain central to the series, serving as a powerful tool that becomes an “extension of your body” in the “war” of building an OS.