C# Interview Question #67

What is the difference between a process and a thread?

Async/Await, Tasks & Multithreading Mid-Level Intermediate

Quick Interview Answer

A process is an operating-system container for a running application. It has its own virtual address space and resources.

Detailed Explanation

A process is an operating-system container for a running application. It has its own virtual address space and resources.

A thread is an execution unit inside a process. Threads in the same process share the process's memory and many resources, which makes communication efficient but also creates synchronization concerns when shared mutable state is accessed concurrently.

One process can contain multiple threads.