- 1. Introduction 2m 10s
- 2. Course Detail 8m 1s
- 3. 64 Bit Long Mode Explained 11m 44s
- 4. Downloading and building a 64 bit cross compiler 13m 27s
Developing a Multithreaded Kernel From Scratch: Part Two - Module One
About this course
This course is the continuation of Part 1, where we built PeachOS, a fully functioning 32-bit multitasking operating system. In Part 2, we take the project to the next level: building a 64-bit multi-threaded kernel that runs in long mode with a graphical user interface (GUI) capable of rendering interactive, clickable, and draggable windows. Need the part one course click here
This isn’t just theory—you’ll be building a complete, modern OS step by step, starting from the bootloader all the way up to a graphical desktop environment.
Part 2 - Module 1 Overview
In the first module of Part 2, we focus on the foundations of a modern 64-bit kernel. We migrate from 32-bit protected mode into 64-bit long mode, create a UEFI bootloader, and lay down the critical systems that will later allow us to support GUIs, multitasking, and advanced storage.
Here’s what we cover in detail:
🔹 Graphics & Display
— Capture and take control of the UEFI framebuffer, giving us the ability to write pixels directly to the screen.
— Implement full support for loading images and fonts.
— Build a terminal system that uses pixel-based fonts to render text directly onto the display.
— Design a graphical subsystem on which the terminal itself is built. This includes:
— Relative drawing anywhere on the screen.
— Hierarchical graphics (parents and children, with relative offsets).
— A system that allows complex UI elements to be composed cleanly and drawn efficiently.
🔹 Memory Management
— Rebuild the heap allocator so that it dynamically uses the E820 memory map provided by UEFI/BIOS, instead of relying on a fixed memory region.
— Develop a multi-heap system, capable of merging multiple heaps into a unified allocator that intelligently chooses blocks for allocation.
— Implement a paging-based memory defragmenter that can remap scattered free regions into a single continuous block of memory—solving fragmentation issues and maximizing usable RAM.
🔹 Disk & Partitions
— Extend our FAT16 filesystem to support multiple GPT partitions.
— Mount each partition as a virtual drive, allowing the OS to work with multiple logical disks simultaneously.
— Redesign and abstract the disk system to support this multi-partition model, preparing the kernel for future support of modern storage hardware like SSDs.
✅ By the end of Module 1, you’ll have:
— A 64-bit kernel bootable on modern UEFI systems.
— A fully functional terminal with a graphical foundation underneath.
— An advanced heap allocator with defragmentation support.
— A multi-partition disk subsystem capable of treating different GPT partitions as separate drives.
— The core building blocks required for a GUI-based operating system.
Module 2 builds directly on this foundation and focuses on turning the kernel into a full graphical operating system with multitasking, drivers, and a rich user experience.
You will:
— Expose standard C library functions (fopen, fread, etc.) to userspace through isr80h.
— Build the complete windowing system, with support for fully interactive GUI elements.
— Implement an NVMe SSD driver, enabling high-speed reads from modern solid-state storage.
— Add full PCI/PCIe support, including bridges, making the kernel capable of scanning and interacting with a wide variety of devices.
— Access a GitHub repository of user programs that you can run directly on your OS. You’ll even be able to submit pull requests to share your own user-space programs with other students in the course.
By the end of Part 2, you’ll have created a multi-threaded, 64-bit, GUI operating system from scratch—bootable on modern hardware and extensible enough to run real user applications.
What you'll learn
- This course is the continuation of Part 1, where we built PeachOS, a fully functioning 32-bit multitasking operating system.
- In Part 2, we take the project to the next level: building a 64-bit multi-threaded kernel that runs in long mode with a graphical user interface (GUI) capable of rendering interactive, clickable, and draggable windows.
- Need the part one course click here
- This isn’t just theory—you’ll be building a complete, modern OS step by step, starting from the bootloader all the way up to a graphical desktop environment.
Curriculum
103 Lessons • 21H 11M- 1. Cloning PeachOS and preparing our project 6m 51s
- 2. How do you get to long mode 11m 59s
- 3. Rewriting our bootloader to get to 64 bit long mode 33m 29s
- 4. Getting from kernel.asm back to kernel.c in long mode 11m 4s
- 1. Restoring simple terminal functionality 3m 58s
- 2. Restoring heap functionality 7m 36s
- 3. Changing pages from 2MB to 4KB 11m 43s
- 4. Restoring and Improving Page Mapping Systems In Our C Code - Part One 19m 23s
- 5. Restoring and Improving Page Mapping Systems In Our C Code - Part two 49m 24s
- 6. Restructuring build files 4m 14s
- 7. Abstracting out kernel paging functionality 3m 11s
- 8. Allowing kernel heap to have a dynamic size 14m 9s
- 9. E820 Memory Maps 6m 55s
- 10. Building the E820 Memory Map functionality 22m 11s
- 11. Multi-heap explained 11m 3s
- 12. Building our multi-heap - Part 1 47m 44s
- 13. Page Mapping Present only available E820 memory 6m 23s
- 14. Building our multi-heap - Part 2 6m 43s
- 15. Building our multi-heap - Part 3 16m 37s
- 16. Building our multi-heap - Part 4 11m
- 17. Building our multi-heap - Part 5 14m 29s
- 18. Creating callback handlers for our individual heaps 7m 30s
- 19. Building our multi-heap - Part 6 18m 1s
- 20. Building our multi-heap - Part 7 15m 35s
- 21. Building our multi-heap - Part 8 12m 23s
- 22. Building our multi-heap - Part 9 25m 28s
- 23. Implementing the paging_get and missing paging functions 10m 15s
- 24. Calling multiheap_ready 2m 43s
- 25. Reimplementing the IO to work for 64 bit 8m 16s
- 26. Loading more sectors of our kernel in boot.asm 42s
- 27. 64 Bit pushad and popad and making IDT 64 bit 3m 35s
- 28. Remaking idt.asm to work with 64-bit code 4m 39s
- 29. Remaking idt.c to work with 64-bit code 13m 58s
- 30. Testing our upgraded 64 bit idt 7m 59s
- 31. Adding user segment descriptors to the GDT 2m 51s
- 32. Rebuilding the task system to be 64-bit 20m 47s
- 33. Rebuilding the task system to be 64-bit - Part two 5m 42s
- 34. Rebuilding the process system to be 64 bit 5m 7s
- 35. Implementing paging_desc_free in paging.c 6m 49s
- 36. Implementing kernel_desc and moving paging prototype function 1m 27s
- 37. Testing our changes 5m 48s
- 38. Bringing FAT16 into 64 bit mode 2m 38s
- 39. Bringing the disk functionality into 64 bit mode 2m
- 40. Bringing process functionality into 64 bit mode 1m 51s
- 41. Building GDT and TSS C Code 14m 31s
- 42. Finalizing TSS code and Initializing it in the kernel 18m 53s
- 43. Creating GDT Descriptors for TSS 2m 10s
- 44. Restoring the disabled IDT functionality 4m 7s
- 45. Restoring the keyboard 2m 18s
- 46. Registering the isr80h commands 4m 8s
- 47. Loading the TSS 2m 9s
- 48. Refactoring the isr80h commands to work in 64 bit long mode 5m 17s
- 49. Calling initializers of many subsystems we have refactored 3m 6s
- 50. Creating a simple user program ready for 64-bit loading 6m 46s
- 51. Loading our simple user program part 1 4m 52s
- 52. Loading our simple user program part 2 4m 53s
- 53. Remapping the PIC 11m 48s
- 54. Rebuilding STDLIB to work with 64 bit long mode 12m 54s
- 55. Re-enabling ELF files and making the loader work on long mode 5m 36s
- 56. Filesystem and Disk bug fixes 19m 26s
- 57. Refactoring our ELF32 loader to load ELF64 files 25m 39s
- 58. Fixing a bug in the IDT and running our first ELF program in 64 bit mode 1m 56s
- 59. Implementing the IRQ C code to allow us to enable or disable PIC interrupts 11m 5s
- 60. Updating our keyboard driver to re-enable the keyboard IRQ + Testing shell.elf 3m 13s
- 1. Understanding UEFI and EFI SDK 15m 20s
- 2. Downloading and setting up EDK2 SDK 13m 43s
- 3. Compiling and executing our EDK2 module 20m 18s
- 4. The changes we will make to our filesystem and disk drivers 4m 58s
- 5. Loading kernel.asm bootloader from UEFI 47m 27s
- 6. Fixing kernel.asm to survive the UEFI boot process 9m 30s
- 7. Being able to detect free memory regions again 21m 41s
- 8. Solving unmapped kernel problem 4m 41s
- 1. Writing code to read and decode the partition tables 23m 14s
- 2. Creating the ability to have virtual disks that point to partitions 28m 40s
- 3. Creating the ability to be able to read the volume name from a filesystem 10m 35s
- 4. Building the krealloc function 22m 11s
- 5. Path parsing symbolic link to system filesystem 5m 36s
- 6. Compiling our GPT and calling gpt_init 3m 8s
- 7. Improving our disk streamer 6m 33s
- 8. FAT16 changes and running our user program again 5m 15s
- 1. Graphics, Windows And Framebuffers 14m 29s
- 2. Injecting the framebuffer pointers into our kernel from UEFI 21m 11s
- 3. Graphic Foundations and Creating simple graphics in our kernel 1h 36s
- 4. Opening image files in our kernel part 1 image abstraction 27m 5s
- 5. Opening image files in our kernel part 2 BMP image loader 34m 13s
- 6. Drawing images to the screen 10m 27s
- 7. The Font system explained 7m 1s
- 8. Implementing the font system - part 1 26m 14s
- 9. Implementing ability to redraw graphics to the framebuffer at a rectangle region 15m 14s
- 10. Implementing the font system - part 2 10m 3s
- 11. Drawing text to the screen 6m 5s
- 12. Creating the terminal functionality - part 1 15m 47s
- 13. Creating the terminal functionality - part 2 27m 34s
- 14. Creating the terminal functionality - part 3 19m 24s
- 15. Implementing graphics transparency and ignore keys and drawing of rectangles 6m 21s
- 16. Creating the terminal functionality - part 4 13m 46s
- 17. Redrawing the enitre background as black and testing our terminal 1m 10s
- 18. Running programs in the shell and making fonts 4m 16s
- 19. Module 1 summary 1m 20s
- 0.00 instructor rating
- 1 courses
- Systems students worldwide
Daniel McCarthy
Learn from DragonZap instructors with practical, build-first lessons focused on systems, low-level programming, compilers, kernels, and real-world engineering fundamentals.
Student reviews
===== 26/03/29/sun 09:58 ===== Wow! Your lecture is the best. I learned about Kernel and bootloaders. Thank you very, very much!
.
Perfect
Thanks you for the course. It helped me learn and get confident in all aspects of Operating System. Thanks Daniel.
I watched a couple of videos and and feel interested in completing the course, I'm going after the certificate for my cv :)