Think of an execution context as the information needed to pause a running task and pick it up again. For a process, that includes its executable, address space, and resources such as open files and network connections. section 4.3
For a task running on a processor, the context also includes its current instruction position and CPU state, such as flags and registers. The operating system saves this state before switching to another task and restores it when the first task resumes. section 6.9
Processes and threads are related but distinct: a process has at least one thread, and each thread maintains an independent execution context. Starting a process is heavyweight because it brings together many kinds of state and resources. section 4.3 section 4.6
Returning to a conversation
If a phone call interrupts a conversation, you switch contexts: you attend to the caller, then return to the earlier conversation. A processor similarly saves one task’s context and restores it so the task can continue where it left off. The switch takes time and system resources. section 6.9
