A process is a resource and isolation boundary. It owns a virtual address space, credentials, and references to kernel objects such as file descriptors. A thread is a schedulable execution context inside that process: it has its own instruction pointer, register state, and stack while sharing the process’s code, heap, and open resources with peer threads.

A program is executable code on storage; executing it creates or replaces a process image; one or more threads run that image. The visual captures that relationship, while the operating-system details below define the boundaries.

Isolation versus coordination

BoundaryProcessThread
Address spaceSeparate by defaultShared with peer threads
Stack and registersContains at least one thread’s statePrivate per thread
CommunicationExplicit inter-process communicationShared memory plus synchronization
Creation/context-switch costUsually higherUsually lower within one process
Failure blast radiusKernel isolation usually contains memory corruptionCorruption or an unhandled fatal failure can terminate the whole process

Thread sharing makes communication cheap and data races possible. A lock, channel, immutable message, or atomic operation is not ceremony: it defines when one thread’s writes become valid input to another. Process isolation gives a stronger fault boundary but moves the protocol into IPC, serialization, and independent lifecycle management.

A .NET Task is not a thread

Task represents an asynchronous operation. CPU-bound work submitted with Task.Run normally executes on a .NET thread-pool worker, which is an OS thread. An asynchronous I/O operation can remain incomplete without occupying a worker thread; when the operating system reports completion, its continuation is scheduled according to the captured context or task scheduler. A task may therefore execute on several threads over time, or complete without owning a dedicated thread at all.

Use a dedicated Thread only when thread identity or lifetime is itself required—for example, a native API with thread affinity. Use tasks for composable completion, cancellation, and error propagation; use bounded channels or other admission control when producing tasks faster than the system can service them.

References