Перейти к содержимому

S1-EP01: Source Code to Running Software: The Complete Execution Path

ThinkWithOps

0:00 / 0:00

S1-EP01: Source Code to Running Software: The Complete Execution Path

1 просмотр · 1 дн. назад
ThinkWithOps
57 подписчиков
1 просмотр · 1 дн. назад
You write a small program and it works on your laptop. On another machine, the same command fails before a single line of your own code runs. This video follows one imaginary program, orders, from source code to exit, so you can tell which step a failure belongs to. How can a program fail before it starts? The answer sits at the dynamic linker, and the path to it covers compiling, fork and execve, the process address space, shared libraries, runtime startup and exit status. What's inside: ✅ Source code vs machine code vs the executable file ✅ How C, Python (CPython) and Java differ at startup ✅ fork vs execve: why starting a command needs both ✅ What survives exec, and how scripts start ✅ The process address space: code, data, heap, stack ✅ How the glibc dynamic linker finds shared libraries ✅ Exit status 126, 127 and 128+N ✅ Why 137 means SIGKILL but does not prove an out-of-memory kill 💡 The takeaway: a failure is easier to find once you know which handoff it happened at (shell, exec, linker, runtime or your own code). 📖 In this video: 1. The Program That Fails Before It Starts 2. From Source Code to Something a Processor Can Run 3. From the Shell to a Process 4. What the Process Looks Like Inside 5. Finding Dependencies 6. Runtime Startup 7. How Programs End 8. The Whole Path, and the Opening Puzzle ▶️ Next episode: S01E02, CPU, Memory and Storage for Developers [   • Season 1: How Software & the Internet Work...  ] 📚 SOURCES (primary documentation): Linux man pages (fork, execve, wait, signal, ld.so): https://man7.org/linux/man-pages/ Bash Reference Manual, Exit Status: https://www.gnu.org/software/bash/man... Linux kernel cgroup v2 docs: https://docs.kernel.org/admin-guide/c... Python glossary (bytecode): https://docs.python.org/3/glossary.html JVM Specification SE 21, chapter 5: https://docs.oracle.com/javase/specs/... Node.js process docs: https://nodejs.org/api/process.html 🛠️ Concepts and platforms covered: Linux: fork, execve, signals, /proc, cgroups ELF: executable format and the program interpreter ld.so: the glibc dynamic linker Bash: exit status conventions CPython: source to bytecode JVM / HotSpot: class loading, linking, initialization Node.js: exit code 1 on an uncaught exception Note: orders is an imaginary example program. The dynamic linker behavior shown is for glibc on Linux. #Linux #DevOps #SoftwareEngineering #Debugging #ThinkWithOps