Explain the difference between a process and a thread.

Explain the difference between a process and a thread.

Approach: Compare execution units and memory allocation.

A process is an independent execution unit with its own virtual address space and resources. A thread is a subset of a process that shares the process's memory and resources but has its own stack and registers.

Follow-up: Which is more expensive to context switch?

Key concepts: address space, context switching, shared memory.