A program is a passive file of instructions on disk; a process is a running instance with its own address space, registers, open files and execution state. One program can have many processes.
Typical layout from low to high addresses: text (code, read-only), data (initialized globals), BSS (uninitialized globals, zeroed), heap (dynamic allocation, grows upward), and stack (function calls and local variables, grows downward), with memory-mapped regions in between.
Loading…