Systems · English usage comparison
Thread vs Process: English Usage Guide for IT Professionals
A process is an independent running program with its own memory space. A thread is a lighter unit of execution that runs inside a process and shares its memory. Multiple threads in one process can work in parallel but share state — leading to race conditions if not managed carefully.
Side-by-side comparison
| Aspect | Thread | Process |
|---|---|---|
| Memory | Shared within the process | Separate — each process has its own space |
| Startup cost | Cheap — lightweight | Expensive — OS must allocate resources |
| Communication | Shared memory (fast but risky) | IPC, pipes, sockets (safer but slower) |
| Crash isolation | A crashed thread can corrupt the process | A crashed process doesn't affect others |
Example sentences
Thread
- "The web server spawns a new thread per request to handle concurrent connections."
- "A race condition between two threads corrupted the shared in-memory counter."
Process
- "Each Node.js worker runs as a separate process — a crash in one doesn't bring down the others."
- "The OS schedules hundreds of processes concurrently using time-slicing."
Exercises: choose the correct English usage
Select the best answer for each question, then check your reasoning.
1. "Two ___ share the same memory space and a race condition can corrupt data." Which word?
Explanation: Threads share memory within a process — making them fast but susceptible to race conditions.
2. "A crashed ___ doesn't affect other running programs because each has its own memory." Which word?
Explanation: Processes have isolated memory — a crash stays contained within that process.
3. Which is cheaper to create?
Explanation: Threads are lighter than processes — they don't require separate memory allocation.
4. "The server handles 1,000 concurrent requests using a ___ pool." Which word?
Explanation: "Thread pool" is the standard term for a set of pre-created threads that handle work concurrently.
5. What is a "race condition"?
Explanation: A race condition occurs when the outcome depends on the relative timing of two concurrent operations on shared state.
Frequently asked questions
What is "concurrency" vs "parallelism"?
Concurrency is dealing with multiple tasks at once (interleaving on one CPU). Parallelism is doing multiple tasks simultaneously on multiple CPUs. Threads can be both; the OS scheduler decides.
What is a "race condition"?
A bug where the program's behaviour depends on the timing of concurrent operations. Two threads reading then writing the same value can result in one update being lost.
What is a "mutex"?
A synchronisation primitive that ensures only one thread accesses a shared resource at a time. From "mutual exclusion".
What is a "deadlock"?
When two or more threads are each waiting for a resource held by the other — none can proceed. The system hangs.
What is a "goroutine"?
Go's lightweight concurrency unit — cheaper than OS threads and managed by the Go runtime. Similar concept to threads but much lighter.
What is a "thread pool"?
A set of pre-created threads ready to execute tasks. Reusing threads avoids the overhead of creating/destroying them for every task.
What is "IPC"?
Inter-Process Communication — mechanisms for processes to share data: pipes, sockets, shared memory, message queues. Slower than thread communication but safer.
What is a "fork" in a Unix process context?
"fork()" is a Unix system call that creates a child process — a copy of the parent. The child runs independently from that point.
What does "single-threaded" mean?
A process that uses only one thread — operations execute sequentially. JavaScript's event loop is single-threaded (with async I/O handled outside the main thread).
What is "async/await" vs threads?
Async/await uses cooperative multitasking within a single thread (a coroutine model). Threads use preemptive multitasking managed by the OS. Async is often cheaper for I/O-bound work.