how_software_works.exe — Running
Lesson 3 of 3 · Software

How
software
works

From a line of Python to pixels on screen. Operating systems, processes, memory, file systems, compilers — all explained so a 12-year-old can understand.

LAYERS: 7
CONCEPTS: 8
SCENARIOS: 4
AGE: 12+
Page 1 of 4

The software stack

Software is not one thing — it's many layers built on top of each other, like floors of a building. Each layer does its own job and provides services to the layer above it. Click any layer to learn more.

software_stack.layers — 7 items — click to expand
Key idea: Each layer only talks to the layer directly above or below it. Your Python script doesn't need to know how the CPU works — it talks to Python's runtime, which talks to the OS, which talks to the hardware. This separation is called abstraction — one of the most powerful ideas in computing.
types_of_software.md
Three types of software
System Software
Manages hardware
Operating system, device drivers, BIOS/UEFI, hypervisors. Runs closest to the hardware.
Utility Software
Helper tools
Antivirus, disk cleanup, backup tools, compression software. Keeps the system healthy.
Application Software
Does the work
Chrome, Word, games, WhatsApp. What you actually use every day. Built on the layers below.
What is software made of?
python · hello.py
# Software is just text — instructions for the computer def greet(name): return f"Hello, {name}! Welcome to computing." message = greet("Arjun") print(message) # Output: Hello, Arjun! Welcome to computing. # This text file → parsed → compiled → machine code → CPU executes it

Software is, at its core, text. A program is a text file with instructions written in a programming language. A compiler or interpreter then translates those instructions into the binary machine code (0s and 1s) that the CPU can actually execute.

Page 2 of 4

Key concepts

Eight ideas that are at the heart of how all software works. Click any card to explore it in depth — with types, real examples, and key facts.

Task Manager — all running processes
LIVE
Name
CPU
Memory
Disk

↑ Simulated task manager — values update every ~2 seconds to show how processes share CPU and RAM

Multi-tasking explained: Your CPU appears to run many processes at once — but really it switches between them so fast (hundreds of times per second) that it feels simultaneous. This is called time-sharing or preemptive multitasking, managed by the OS kernel's scheduler.
Page 3 of 4

How it runs

Pick a scenario and simulate it step by step. Watch how the layers, processes, and kernel work together to execute even a simple task.

Running a Python script

Press the button to simulate this scenario.
Step-by-step breakdown
bash — 80×24
arjun@laptop:~$ python hello.py Hello, Arjun! Welcome to computing. arjun@laptop:~$ ps aux | grep python arjun 12834 4.2 1.1 python hello.py PID=12834 | CPU=4.2% | MEM=1.1% | STATE=Running arjun@laptop:~$ strace python hello.py 2>&1 | head -5 execve("/usr/bin/python3", ["python3", "hello.py"], ...) openat(AT_FDCWD, "hello.py", O_RDONLY) = 3 read(3, "print('Hello, Arjun!')\n", 4096) = 23 write(1, "Hello, Arjun!\n", 14) = 14 ↑ These are raw syscalls — the exact OS calls Python makes
System calls (syscalls) are the bridge between user software and the kernel. Every time a program reads a file, writes output, opens a socket, or allocates memory — it makes a syscall. The kernel handles the request, then returns control to the program. Programs cannot access hardware any other way.
Page 4 of 4

Quick reference

Everything in one place — process lifecycle, OS comparison, programming language types, and a glossary. Use it as your cheat-sheet.

Process lifecycle — click a state or animate
Operating systems compared
OSKernelUsed forOpen source?Famous for
Windows 11 Hybrid NT Desktops, gaming, enterprise No Most used desktop OS, DirectX gaming
macOS Sequoia XNU (hybrid) Creative work, development No Design, polish, Apple Silicon performance
Linux (Ubuntu) Monolithic Servers, development, cloud Yes Free, runs 96% of cloud servers worldwide
Android Linux kernel Mobile phones, tablets Mostly Most-used OS on Earth (3 billion devices)
iOS / iPadOS XNU (hybrid) iPhones, iPads No Security, performance, ecosystem integration
ChromeOS Linux kernel Chromebooks, schools Mostly Simplicity, fast boot, cloud-first
Programming languages — types and uses
LanguageTypeSpeedBest for
C / C++ Compiled (AOT) ⚡ Fastest OS kernels, game engines, embedded systems
Rust Compiled (AOT) ⚡ Fastest Systems programming, safe memory — modern C++ replacement
Java / Kotlin JVM bytecode Fast Android apps, enterprise backend, Android
Python Interpreted Slower AI/ML, data science, automation, scripting
JavaScript JIT compiled (V8) Fast Web (browser + server), mobile apps (React Native)
Swift Compiled (AOT) ⚡ Fast iOS and macOS applications
SQL Declarative Fast Querying and managing databases
Glossary — key terms
Abstraction
Hiding complexity behind a simple interface. You use a car without knowing how the engine works — same idea in software.
API
Application Programming Interface — a defined way for software to ask another piece of software to do something for it.
Syscall
System call — the only way a user program can ask the kernel for hardware access (read file, open socket, allocate memory).
Buffer
A temporary area of memory used to hold data being transferred between two places — like a waiting room for bytes.
Garbage collection
Automatic memory management — the runtime finds and frees heap memory that is no longer being used. Used in Python, Java, JavaScript.
Context switch
When the OS pauses one process and starts running another. It saves the first process's CPU registers and restores the next one's.
Deadlock
Two processes each waiting for the other to release a resource — both freeze forever. Like two people each blocking the other's path.
Race condition
A bug where two threads read/modify shared data simultaneously and the result depends on which one "wins the race" to run first.
Daemon
A background process that runs continuously — print spooler, web server, antivirus. Named after mythological spirits that work unseen.
Interrupt
A signal to the CPU that hardware needs attention (key pressed, packet arrived, timer fired). CPU stops, handles it, then resumes.
Virtual machine
Software that emulates a complete computer — runs a full OS inside another OS. Used for testing, cloud servers, and isolation.
Endianness
The order bytes are stored in memory. Big-endian = most significant byte first. Little-endian = least significant first. x86 CPUs are little-endian.
🎉 Series complete! You've covered all three lessons: Memory & BinaryComputer HardwareHow Software Works. You now understand how a computer works from transistors all the way up to the apps you use every day — a foundation that will make everything in computing click into place.
Home