Chapter 24 — User argc / argv and a Real Initial Stack

Chapter 24 — User argc / argv and a Real Initial Stack
This entry is part 22 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 23, we crossed another major boundary: But the user program still started like this: That is not how we want user programs to look long-term. This chapter adds a real initial user stack with: Then crt0.S will pass those arguments to: This moves us closer to a normal process startup model. ELF process

Chapter 23 — Building a Real User C Program and Embedding Its ELF

Chapter 23 — Building a Real User C Program and Embedding Its ELF
This entry is part 21 of 35 in the series Writing A Linux Style Operating System From Scratch

In Chapter 22, the kernel gained a first ELF32 loader. That was a big step, but our test ELF was still built by hand inside process.c: This chapter removes that artificial piece. We will add a tiny userland build pipeline: GNU objcopy is specifically designed to copy and transform object files between formats; we will

Chapter 22 — First ELF32 Loader Milestone

Chapter 22 — First ELF32 Loader Milestone

In Chapter 21, we completed the process lifecycle: Now we can replace the temporary TOYEXE format with the first real executable-loader milestone: ELF32. ELF is the Executable and Linkable Format used by many Unix-like systems. The ELF specification defines the file header, program header table, and how loadable segments describe a process image; the generic

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

Understanding Modbus, SCPI, and GPIB Protocols and Their Implementation in Embedded Systems

Understanding Modbus, SCPI, and GPIB Protocols and Their Implementation in Embedded Systems
Control-Bus Image

A Beginners Guide Introduction Communication protocols are vital for enabling embedded devices to interact effectively. Three prominent protocols, Modbus, Standard Commands for Programmable Instruments (SCPI), and General Purpose Interface Bus (GPIB), stand out due to their widespread adoption in various industrial and testing environments. Recently, I had the opportunity to work on an embedded project

Building Robust Systems: The Properties of Fault-Tolerant Applications

Building robust, fault-tolerant applications is crucial in today’s fast-paced digital landscape. This comprehensive article explores the essential properties of fault-tolerant applications, including isolation, concurrency, failure detection, live code upgrade, stable storage, and more. Learn about techniques used in critical environments like aerospace, and discover how organizations like NASA handle fault tolerance and remote code upgrades.

Understanding the Chord Algorithm: Implementation, Uses, Strengths, and Weaknesses

Dive into the world of distributed systems with our comprehensive guide on the Chord algorithm. Understand its applications, advantages, and limitations. Explore a Python implementation, gaining hands-on insights into this powerful distributed hash table protocol.