Low Level Concurrency
When a program runs, the OS creates a process – an isolated container with its own address space and resources. Inside that process, the OS or language runtime can create threads. A thread is an independent execution path with its own program counter, registers, and stacks, but it shares the heap, globals, and open resources with other threads in the same process. Concurrency exists whenever multiple threads can make progress independently and their execution can overlap. Even in a single-core environment, the OS rapidly switches between threads and interleaves their instructions.