Leanpub Header

Skip to main content

Topics

Operating Systems

From booting, memory management and scheduling to file systems, the Linux and Windows programming interfaces, kernel debugging and the analysis of memory dumps, operating systems as told through the free samples of the Leanpub books about them.

Created from the free samples of 9 Leanpub books and the descriptions and tables of contents of 13 more, with every source cited.

An operating system is the program that turns a bare computer into something usable. When the power button is pressed, one book on writing such a program begins, the processor starts executing instructions with no help at all: no files, no windows, no notion of a program. The operating system manages the processor, the memory and the devices, and provides services to everything else.[1]

The books here come at the subject from three directions. A few build an operating system, or one part of one, from nothing, on the principle that the way to understand what the bytes on a disk mean is to write the code that puts them there.[2] Others teach the interfaces through which programs ask an existing system for services, on Linux and on Windows.[4][6] The largest group, most of it one author's long series, studies systems from the outside in, by debugging them while they run and by examining the memory they leave behind when they fail.[13][14]

This article covers where to begin, the history, what an operating system does, writing one, file systems and storage, the programming interfaces, and diagnostics, memory dumps and forensics. Its sources are the free samples of the Leanpub books listed at the end, with the descriptions and tables of contents of the books whose samples were not available, and every claim that rests on a source is cited to it.

Where to start

A reader who wants to know how computers work at all can begin with the adjacent Inside the Machine, which climbs from bits and logic through processors and memory to operating systems and files,[12] or, for a career in technical support, with Hardware & Operating Systems, a self-paced guide to hardware and to the features of an operating system as an administrator meets them.[9]

For writing an operating system, Developing a Computer Operating System from Scratch (2025), the most widely sold of the core books, starts with the C and assembly language a beginner needs,[10] and Build Your Own Operating System is a brisk tour for readers who can already program.[1] FAT12 is the book for file systems.[2]

Programmers who write software for an existing system have Linuxsystemprog (2024), with examples for most of the system calls.[4] Engineers who must find out why software failed should begin with Practical Foundations of Windows Debugging, Disassembling, Reversing, Second Edition (2025), a course in the foundations that debugging presupposes,[13] before the courses on live debugging and on the analysis of dumps for each system.[15][16][17]

History

The first operating systems, in the 1950s, were monitors that ran one job after another on a single machine. Time-sharing in the 1960s let many users work at once, and the system written at a telephone company's laboratories at the end of that decade, Unix, set the pattern that most later systems follow: a small kernel, processes, files as the universal abstraction and a shell. Its descendants divided into commercial and free lines, the personal computer acquired first a simple disk operating system and then graphical ones, and in 1991 a student's kernel, Linux, began the system that now runs most servers and telephones.

The books preserve several layers of this. FAT12 is about the file system with which the disk operating system of the first personal computers began, and points out that almost every personal computer sold in the last decade still starts by reading a volume of the same family, because the standard for modern firmware requires it.[2] Build Your Own Operating System chooses the older and simpler of the two ways a personal computer can start.[1] Three Essays on NetBSD collects three essays on one descendant of Unix: in one the author installs its first release in a virtual machine and upgrades it, release by release and from source code, to a version nearly three decades newer, and in another converts a system from one binary format to its successor.[11] The diagnostic literature has its own history: the first volume of Memory Dump Analysis Anthology, Volume 1, Revised Edition consists of articles written in 2006 and 2007 and since revised for a later version of Windows, and Practical Foundations of Windows Debugging, Disassembling, Reversing, Second Edition descends from lectures devised about eighteen years ago to train support engineers.[14][13]

What an operating system does

Build Your Own Operating System reduces the work to five jobs. The first is to boot, to bring the processor from its primitive state at power-on into an environment where ordinary code can run. The second is to manage memory, keeping track of physical memory and handing out pieces of it safely. The third is to manage the processor, making several things appear to run at once on a chip that does one thing at a time. The fourth is to talk to devices, the keyboard, screen, disk and network, which is what drivers are. The fifth is to provide services: a file system, a shell, a graphical interface and eventually a way of running other people's programs. Each job is a chapter or two of the book.[1]

Inside the Machine places the operating system in a longer sequence, from the representation of information through circuits, processors, instructions, storage and input and output to virtual memory and files, with the aim of showing how many layers of hardware and software an apparently simple operation depends on.[12] Hardware & Operating Systems gives the administrator's view of the same functions: configuration and policy, the management of devices, memory, services and drivers, disks and storage, folders and files, security and access to networks, followed by how computers represent numbers and characters and how their performance is judged, by the speed of the processor, the number of its cores, its cache, storage and memory.[9]

Writing an operating system

Build Your Own Operating System is for the person who has used operating systems for years and one day wonders what happens between the power button and the blinking cursor. It goes from the boot sector to a graphical desktop on real hardware in twelve chapters: a boot loader written from scratch, a 64-bit kernel that handles interrupts, managers for physical and virtual memory, a pre-emptive scheduler with the usual primitives for synchronisation, a disk driver, a read-only file system, and graphics with a window manager. It calls itself a brisk tour of about ninety pages where the standard texts run to many hundreds, and recommends reading them alongside. Each chapter introduces one subsystem, shows the code that makes it work, and names the two or three traps that cost the author a weekend on real hardware. The book accompanies a working kernel of about three thousand lines, and its exercises, which it calls the most important part, ask the reader to change that kernel, by adding a system call or substituting another allocator, and not to retype it. The architecture was chosen because it is the commonest and because an emulator allows development without risk to a real machine, with a debugger that can step through the kernel. The destination is a desktop with a terminal and windows that can be dragged, of which the book promises that the reader will recognise every pixel: the background is one call to fill a rectangle, and the text in the terminal is the same grid of characters to which the kernel first wrote in an early chapter.[1]

Developing a Computer Operating System from Scratch is written against the idea that the subject is only for enthusiasts. Newcomers, its description says, are defeated by documentation that is not written for them, so the book teaches first the parts of C and of assembly language that cannot be avoided and then builds a simple system by simple methods, doing without the usual build tools so as to keep the set of tools small.[10] The adjacent Learn programming by programming directly teaches C itself with a related goal: by its tenth chapter the reader has built a miniature virtual machine with its own instruction set, a cycle of fetching, decoding and executing, and managed memory.[8]

File systems and storage

FAT12 promises to explain what the bytes on a disk mean, as distinct from how to call the function that opens a file. It chooses a file system simple enough to hold in the head and real enough to run on bare hardware, the same one found on memory cards and in the start-up partition of modern computers. Its structure is minimal: a single table links the clusters of every file into a chain, with none of the more elaborate structures of later designs, and the root directory has a fixed place and size. Over twelve chapters the reader implements reading, deleting, moving, creating directories, writing and formatting in C, and then starts the same code inside a small kernel in an emulator, with a few megabytes of memory standing in for a disk and no operating system underneath. Appendices replace that memory with a driver for a real disk, take a first look at long file names, and compare the three sizes of the format and the way they are told apart.[2]

The book answers in advance the objection that a language model could generate all this in minutes. The generated code will compile and may list a directory; whether it packs the table's twelve-bit entries correctly is another matter, and an error there does not crash. It silently overwrites four bits of a neighbouring entry, breaks the chain of some other file, and is discovered much later. The method is therefore to decode every structure from a real volume, to check each stage against a dump of the disk image, and to hand the volumes the code writes to Linux's own driver; once the reader knows what the bytes should be, the book says, generated code stops being something to trust and becomes something to review.[2]

Guide to Linux Device Mapper is a ten-page illustrated guide to a layer most engineers treat as a black box. It sets out the path of a request, from an application's call through the virtual file system, the file system and the block layer to the drivers and the hardware, and locates its subject between the block layer and the drivers, where requests are intercepted and remapped to other devices without the file systems above being aware. It asks of its reader an acquaintance with block devices and partitions, with kernel modules and the distinction between kernel and user space, and with the elements of cryptography. On that mechanism rest volumes that span or stripe several disks, the encryption of whole disks, the verification of integrity by trees of hashes, allocation on demand with snapshots, and caching.[3]

The programming interfaces

A program obtains everything from the system through system calls. Linuxsystemprog works through those of Linux in C and C++ for novices and intermediate programmers: the calls that start programs, static and dynamic libraries, error codes, processes and the layout of their memory, daemons, priorities and scheduling, signals, and the ways in which processes communicate, by message queues, shared memory, mapped files and semaphores. Its chapter on signals starts from the familiar case, the keys that interrupt a running program, and goes on to the command that delivers a signal to any process by its number, whose default asks the process to terminate. Advanced readers, the description suggests, can use the book as a reference.[4]

Accelerated Linux API for Software Diagnostics (2023) and Accelerated Windows API for Software Diagnostics, Second Edition (2025) are transcripts of training courses, with sixteen and ten exercises, that study the two interfaces from the diagnostic side. Their descriptions list the trades for which the knowledge is necessary, from development and debugging to the analysis of malicious software and of crashes, and their method is to classify the interface and to observe it in use: one exercise follows a shell's calls into shared libraries through the tables of the executable file, another compares the conventions by which arguments are passed on two processor architectures and finds where an application creates its windows.[5][6]

Diagnostics, memory dumps and forensics

When a program or a whole system crashes or hangs, its memory can be saved to a file and examined afterwards, and a long series by one author teaches how. Practical Foundations of Windows Debugging, Disassembling, Reversing, Second Edition supplies the background, combining two earlier books for 32-bit and 64-bit Windows: registers, pointers, the stack and the recurring shapes of disassembled code, taught in parallel sets of chapters for the two architectures on small projects examined in a debugger.[13] Accelerated Windows Debugging 4D (2024) and Accelerated Linux Debugging 4D (2024) are courses in live debugging, local and remote, of the kernel and of ordinary processes, with sixteen and more than twenty exercises.[15][16] Accelerated Linux Core Dump Analysis, Fourth Edition (2025) covers the dumps of Linux processes and kernels in more than seventy exercises, diagnosing corruption, leaks of memory, spikes in processor use, blocked threads and deadlocks,[17] Accelerated macOS Core Dump Analysis, Third Edition (2022) does the same for applications on Apple's system,[18] and Fundamentals of Physical Memory Analysis (2020) is a short seminar on the analysis of the whole physical memory of a Windows machine, including how it is acquired and how the spaces of user, kernel and physical memory differ.[19] Memory Dump Analysis Anthology, Volume 1, Revised Edition opens a multi-volume reference of revised articles on the same craft, beginning with the basics of crash dumps, the system's stop codes and a catalogue of patterns of analysis and of their opposites.[14]

The same techniques serve investigation. Pattern-Oriented Memory Forensics (2022), the transcript of a lecture, defines memory forensics as the study of the past structure and behaviour of software in acquired memory, and proposes a language of patterns for it, a pattern being a recurrent and identifiable set of signs together with recommendations for a given context, as a remedy for the multiplication of architectures, systems and tools.[7] Accelerated Windows Malware Analysis with Memory Dumps (2022) applies patterns to the detection of malicious software in Windows dumps,[20] Accelerated Linux Disassembly, Reconstruction and Reversing, Second Edition (2023) teaches disassembly and the reconstruction of what a program did,[21] and Windows Never Forgets explains in plain language, in forty-four chapters, the records that Windows keeps of programs run, folders opened and networks joined, and how investigators read them.[22]

Questions about Operating Systems

Which book on operating systems should I start with?

For writing an operating system, Developing a Computer Operating System from Scratch (2025) starts with the C and assembly language a beginner needs, and Build Your Own Operating System is a brisk tour for readers who can already program.[10][1] Programmers who write software for an existing system have Linuxsystemprog (2024), with examples for most of the system calls.[4] Engineers who must find out why software failed should begin with Practical Foundations of Windows Debugging, Disassembling, Reversing, Second Edition (2025), a course in the foundations that debugging presupposes.[13]

What does an operating system do?

Build Your Own Operating System reduces the work to five jobs: to boot, to manage memory, to manage the processor, to talk to devices and to provide services.[1] Managing the processor means making several things appear to run at once on a chip that does one thing at a time, and the services are a file system, a shell, a graphical interface and eventually a way of running other people's programs.[1]

How do I write my own operating system?

Build Your Own Operating System goes from the boot sector to a graphical desktop in twelve chapters: a boot loader written from scratch, a 64-bit kernel that handles interrupts, managers for physical and virtual memory, a pre-emptive scheduler, a disk driver, a read-only file system, and graphics with a window manager.[1] It accompanies a working kernel of about three thousand lines, and its exercises ask the reader to change that kernel and not to retype it.[1] An emulator allows development without risk to a real machine, with a debugger that can step through the kernel.[1]

What is a system call?

A program obtains everything from the operating system through system calls. Linuxsystemprog (2024) works through those of Linux in C and C++: the calls that start programs, processes and the layout of their memory, signals, and the ways in which processes communicate, by message queues, shared memory, mapped files and semaphores.[4]

Can a language model write a file system for me?

FAT12 answers that generated code will compile and may list a directory, and that whether it packs the table's twelve-bit entries correctly is another matter.[2] An error there does not crash: it silently overwrites four bits of a neighbouring entry, breaks the chain of some other file, and is discovered much later.[2] Once the reader knows what the bytes should be, the book says, generated code stops being something to trust and becomes something to review.[2]

What is a memory dump used for?

When a program or a whole system crashes or hangs, its memory can be saved to a file and examined afterwards. Accelerated Linux Core Dump Analysis, Fourth Edition (2025) covers the dumps of Linux processes and kernels in more than seventy exercises, diagnosing corruption, leaks of memory, spikes in processor use, blocked threads and deadlocks.[17] Fundamentals of Physical Memory Analysis (2020) is a short seminar on the analysis of the whole physical memory of a Windows machine, including how it is acquired.[19]

Sources

Every source is a Leanpub book. The note after each says which part of it was read; where no sample was available, only the public description and table of contents were used.

  1. 1.
    Build Your Own Operating System, Noah Parsons Free sample: the preface and the opening of chapter one, on what an operating system is. 2026. Free sample: PDF
  2. 2.
    FAT12, Björn Götz: Understanding and Implementing the Classic File System in C Free sample: the contents and the introduction. 2026. Free sample: PDF · EPUB
  3. 3.
    Guide to Linux Device Mapper, Sumanth Murali Free sample: the title, the contents and the page on the input and output stack. 2026. Free sample: PDF
  4. 4.
    Linuxsystemprog, devnaga Free sample: the contents and the opening of the chapter on signals. 2024. Free sample: PDF
  5. 5.
    Accelerated Linux API for Software Diagnostics, Dmitry Vostokov: With Category Theory in View Free sample: the contents and the first exercise. 2023. Free sample: PDF
  6. 6.
    Accelerated Windows API for Software Diagnostics, Second Edition, Dmitry Vostokov: With Category Theory in View Free sample: the contents and the first exercise. 2025. Free sample: PDF
  7. 7.
    Pattern-Oriented Memory Forensics, Dmitry Vostokov: A Pattern Language Approach, Revised Edition Free sample: the opening slides of the lecture. 2022. Free sample: PDF
  8. 8.
    Learn programming by programming directly, Hafidh Musyaffa: Building a Virtual Machine in C Free sample: the introduction and the opening of chapter one. 2026. Free sample: EPUB
  9. 9.
    Hardware & Operating Systems, Bolakale Aremu: A Practical Guide for Getting Job-ready Skills in Information Technology Free sample: the table of contents. 2026. Free sample: PDF · EPUB
  10. 10.
    Developing a Computer Operating System from Scratch, TINU TOM: An Attempt to Introduce OS Development at Beginner Level No sample: from the description and table of contents. 2025.
  11. 11.
    Three Essays on NetBSD, Chris Pinnock No sample: from the description and table of contents. 2026.
  12. 12.
    Inside the Machine, Mohammad Kamrul Hassan: How Computers Really Work—from Bits and Logic to CPUs, Memory & Operating Systems No sample: from the description. 2026.
  13. 13.
    Practical Foundations of Windows Debugging, Disassembling, Reversing, Second Edition, Dmitry Vostokov: Training Course The free sample is front matter and contents: from those and the description. 2025. Free sample: PDF
  14. 14.
    Memory Dump Analysis Anthology, Volume 1, Revised Edition, Dmitry Vostokov The free sample is front matter and contents: from those and the description. 2025. Free sample: PDF
  15. 15.
    Accelerated Windows Debugging 4D, Dmitry Vostokov: Training Course Transcript and WinDbg Practice Exercises, Fourth Edition The free sample was not used: from the description and table of contents. 2024. Free sample: PDF
  16. 16.
    Accelerated Linux Debugging 4D, Dmitry Vostokov: Training Course Transcript with WinDbg, GDB, LLDB, rr, KDB, KGDB Practice Exercises The free sample was not used: from the description and table of contents. 2024. Free sample: PDF
  17. 17.
    Accelerated Linux Core Dump Analysis, Fourth Edition, Dmitry Vostokov: Training Course Transcript with GDB and WinDbg Practice Exercises The free sample was not used: from the description. 2025. Free sample: PDF
  18. 18.
    Accelerated macOS Core Dump Analysis, Third Edition, Dmitry Vostokov: Training Course Transcript with LLDB Practice Exercises The free sample was not used: from the description. 2022. Free sample: PDF
  19. 19.
    Fundamentals of Physical Memory Analysis, Dmitry Vostokov: Anniversary Edition The free sample was not used: from the description. 2020. Free sample: PDF
  20. 20.
    Accelerated Windows Malware Analysis with Memory Dumps, Dmitry Vostokov: Training Course Transcript and WinDbg Practice Exercises, Third Edition The free sample was not used: from the description and table of contents. 2022. Free sample: PDF
  21. 21.
    Accelerated Linux Disassembly, Reconstruction and Reversing, Second Edition, Dmitry Vostokov: Training Course Transcript and GDB Practice Exercises with Memory Cell Diagrams The free sample was not used: from the description and table of contents. 2023. Free sample: PDF
  22. 22.
    Windows Never Forgets, Emil Valiyev: A Field Guide to What Your PC Remembers, and How Forensic Investigators Read It Back No sample: from the description. 2026.

Further reading

Other books in the library on neighbouring ground, not cited above.

This is an article created from the free samples of 9 Leanpub books and the descriptions and tables of contents of 13 more. We're building these articles to provide you, the Leanpub reader, with a good jumping-off point to discover more Leanpub books that are interesting and relevant to you. We never use material which is paid-only when building these articles: we only use material which is already free on Leanpub. However, Leanpub authors can opt out from inclusion in articles from their book settings page.

Updated November 2026.

In the Leanpub store: 133 books in the Operating System Development category · also filed under Virtualization, Windows API

All topics