Chapter 37 — Directories, SYS_READDIR, and ls

Chapter 37 — Directories, SYS_READDIR, and ls
This entry is part 34 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 36, Toyix gained file metadata: The shell could now do: Now we are ready for the next filesystem milestone: This chapter adds: After this chapter: For compatibility with the previous chapters, /programs will remain a regular text file for now: The root directory / becomes the first actual directory. 1. What this chapter

Chapter 21 — Process Teardown and Address-Space Cleanup

Chapter 21 — Process Teardown and Address-Space Cleanup
This entry is part 20 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 20, we added the TOYEXE loader: But there is still a lifecycle problem. The process can exit, but we are not yet reclaiming everything it owns. Right now this leaks: This chapter closes that loop. After this chapter, the process lifecycle becomes: The milestone output will look like: 1. What this chapter adds

Chapter 9 — Cooperative Multitasking and Kernel Threads

This entry is part 9 of 35 in the series Writing A Linux Style Operating System From Scratch

We now have enough foundation to start multitasking: This chapter adds the first scheduler. Not a preemptive scheduler yet. A cooperative scheduler. That means each kernel thread keeps running until it voluntarily calls: “` cthread_yield(); textkernel thread objectper-thread kernel stackready queuex86 context switch assemblythread_create()thread_yield()thread_exit()round-robin cooperative schedulingtwo-thread test textcreate two kernel threadsswitch between them cooperativelyprove both

Chapter 7 — A Real Virtual Memory Mapping Layer

Chapter 7 — A Real Virtual Memory Mapping Layer
This entry is part 7 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 5 we enabled paging, but only with a fixed identity map: In Chapter 6 we built a heap, but it still had an important weakness: because only the first 16 MiB were identity-mapped. Now we fix the architectural problem. This chapter adds a small virtual memory manager, or VMM: This lets the kernel

Chapter 6 — Building the First Kernel Heap

Chapter 6 — Building the First Kernel Heap
This entry is part 6 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 5, we enabled paging with a simple identity map: That gave us a working paged kernel, but not yet a comfortable way to allocate variable-sized objects. The physical memory manager gives us whole pages: But kernel code usually needs smaller objects: So this chapter builds the first kernel heap. We will keep it

Building the i686-elf-gcc Cross-Compiler

Together, these tools allow us to assemble, compile, link, inspect, and transform kernel binaries without using the host operating system’s normal compiler target.

Why GAMBAS BASIC Deserves a Place in Your Development Toolbox

One of GAMBAS’s biggest advantages is its fully integrated development environment (IDE), which resembles VB6 and offers an easy-to-use graphical interface. This makes creating forms, handling events, and connecting to databases significantly faster than using more complex frameworks.

An Introduction to C–: A Dive into an Intermediate Language for Compiler and Language Research

Explore the evolution of C– – an intermediate language designed for compiler and language research. Delve into its origins, syntax, and the significance it holds in the realm of programming languages and compiler development.

Rebuttal to Eric Normand’s Article: “How is Haskell Faster than C?”

Delve into the nuanced debate between Haskell and C programming languages. This article dissects the claims about Haskell’s speed superiority over C, emphasizing the importance of well-crafted code and developer expertise in determining programming efficiency. Discover the complex interplay of factors that influence the performance of these languages in real-world applications.

Introduction to Compilers

This entry is part 1 of 1 in the series Introduction to Compilers

Introduction: Welcome to our series on compiler development using Python! In this series of articles, we will explore the fundamentals of grammars and their role in defining the syntax of programming languages. We’ll also discuss different notation systems used to express grammars, such as BNF, EBNF, and PEG, and their relation to lexical analysis. Understanding