Developing a Multi-threaded Kernel From Scratch - Book Edition Volume 1
Learn paging, protected mode and how to build a multi-threaded kernel from scratch capable of loading your own user programs
Usually printed in 3 - 5 business days
Volume 1 is designed to guide you through the creation of your own multitasking operating system and kernel from scratch. It assumes no prior knowledge of kernel programming, making it accessible for beginners.
Real Mode Development
Real mode refers to a legacy operating mode found in all Intel processors, emulating the behavior of the original 8086 Intel chips. This section begins with an exploration of the boot process and memory management. You'll develop a simple boot loader, which you can test on an actual machine, that displays a "Hello World!" message using purely assembly language.
As you progress, you will delve into reading a sector (512 bytes) from the hard disk and mastering interrupts in real mode, setting a solid foundation in kernel development basics.
Protected Mode Development
Moving into protected mode, you will construct a 32-bit multitasking kernel equipped with the FAT16 filesystem. This part of the book covers Intel's memory protection and security mechanisms, which safeguard the kernel and prevent damage from user programs.
You will learn about paging, virtual memory, and memory virtualization—a technique that allows all processes to share the same memory addresses. This section also introduces the creation of a virtual filesystem layer inspired by the Linux kernel, enhancing your understanding with practical, real-world applications.
Further, the design and implementation of the FAT16 filesystem are explained in detail, including how to develop your own FAT16 filesystem driver. The book also covers task and process management and includes a segment on writing keyboard drivers.
An important aspect of kernel development—memory management—is thoroughly explored. You will implement your own versions of the "malloc" and "free" functions, creating a managed heap that tracks memory usage.
Additionally, the book teaches you how to create an ELF file loader, enabling the loading of binary or ELF programs, which are essential for operating systems.
By the end of this book series, you will have developed a fully functional 32-bit multitasking kernel capable of running multiple processes and tasks simultaneously, complete with a working shell.
Details
- Publication Date
- Jun 25, 2024
- Language
- English
- Category
- Computers & Technology
- Copyright
- All Rights Reserved - Standard Copyright License
- Contributors
- By (author): Daniel McCarthy
Specifications
- Pages
- 557
- Binding Type
- Hardcover Case Wrap
- Interior Color
- Black & White
- Dimensions
- US Letter (8.5 x 11 in / 216 x 279 mm)