Processes and Threads

An instance of a running application is known as a process. Actually, that's a misnomer. Processes don't actually run—threads do. Every process has at least one thread (the main thread) but can have many. Each thread represents an independent execution mechanism. Any code that runs within an application runs via a thread.

Each process is allotted its own virtual memory address space. All threads within the process share this virtual memory space. Multiple threads that modify the same resource must synchronize access to the resource in order to prevent erratic behavior and possible access violations. A process that correctly serializes access to resources shared by multiple threads is said to be thread-safe.

Each thread in ...

Get Guru's Guide to SQL Server Architecture and Internals, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.