---
title: "Process vs threads; importance in DS"
subject: "Distributed System"
chapter: 3
key: "semester_7/distributed_system:process-vs-thread"
source: https://www.bctengineer.com/q/semester_7/distributed_system/process-vs-thread
site: BCT Engineering
---

# Process vs threads; importance in DS

Distributed System · Chapter 3: Operating System Support

- Asked in: 2070 Chaitra, 2+2 marks; 2070 Asar, 4 marks; Model question (asked 3 times)
- Video: [L-1.11: Process Vs Threads in Operating System](https://www.youtube.com/watch?v=ITc09gOrqZk) — Gate Smashers
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/process-vs-thread
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-3

## Question

Define and differentiate between process and threads. Explain the importance of threads in distributed system with suitable examples.

## Short answer

A process has its own address space and resources; a thread shares its process's address space, making creation and switching cheap. Threads are crucial in distributed systems for multithreaded servers handling concurrent clients, hiding network latency (e.g., web browser fetching images while rendering), and overlapping I/o and computation to improve scalability.

## Answer

#### Process and thread
- A **process** is a program in execution with its own address space (code, data, heap), resources (open files) and at least one thread of control.
- A **thread** is a lightweight unit of execution inside a process. It has its own program counter, registers and stack, but shares the address space, data and open files of its process.

| Point | Process | Thread |
|---|---|---|
| Address space | Own, protected | Shared with other threads of the process |
| Creation / switch cost | High | Low |
| Communication | Needs IPC (pipes, messages) | Direct through shared memory |
| Protection | Strong isolation | None between threads |
| Failure | One process does not affect another | A faulty thread can crash the process |
| Resources | Own set | Share process resources |
| Also called | Heavyweight process | Lightweight process |

#### Importance of threads in distributed systems
1. **Multithreaded servers:** a server handles many client requests at once. One *dispatcher* thread takes requests and *worker* threads process them, so a slow request (disk or network wait) does not block others. Example: a web server creates a thread per request, a file server serves many clients.
2. **Hiding latency in clients:** a web browser uses one thread to fetch the page while others fetch images and render, so the user is not blocked on network delay.
3. **Overlap of computation and I/O**, which improves performance and throughput, and makes use of multiprocessors.
4. **Cheap communication and switching:** shared memory between threads is more efficient than between processes.
5. **Simpler program structure:** blocking system calls (RPC, RMI) can be used in each thread while the program continues in others.
6. **Better scalability** as a server handles more clients per machine.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What do threads of one process share?
   A. Address space, data and open files
   B. Nothing
   C. Program counter and stack
   D. Registers
   Answer: A. Each thread has its own PC, registers and stack but shares the process address space. (Key point: Sharing)

2. How do threads compare with processes in creation and switching cost?
   A. Higher
   B. Not comparable
   C. Same
   D. Lower
   Answer: D. Threads are lightweight processes. (Key point: Cost)

3. In a multithreaded server, what does the dispatcher thread do?
   A. Only manages disk space
   B. Processes every request itself
   C. Takes incoming requests and hands them to worker threads so slow requests do not block others
   D. Terminates the workers
   Answer: C. This overlaps waiting with computation and serves many clients. (Key point: Multithreaded server)

4. How do threads help a web browser client?
   A. They avoid using the network
   B. One thread fetches the page while others fetch images and render, hiding network latency
   C. They make the browser single-threaded
   D. They encrypt images
   Answer: B. Blocking calls in separate threads keep the program responsive. (Key point: Client latency)

## Related in Distributed System

- [Threads, checkpoint, distributed commit](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Athreads-checkpoint-commit) — Distributed System, chapter 3
- [Autonomous vs distributed system](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aautonomous-vs-distributed) — Distributed System, chapter 1
- [DS as a single coherent system](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Asingle-coherent-system) — Distributed System, chapter 1, asked 2×
- [DS vs centralized; layers of transparency](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Ads-over-centralized-transparency) — Distributed System, chapter 1
- [Centralized vs distributed; design issues](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Acentralized-vs-distributed) — Distributed System, chapter 1
- [Network OS vs distributed OS](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Anos-vs-dos-diff) — Distributed System, chapter 3

## Related in other subjects

- [Process vs thread; user and kernel threads](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprocess-vs-thread-user-kernel-threads) — Operating System, chapter 2
- [Data analytics process and distributed computing](https://www.bctengineer.com/question.md?key=semester_8%2Fbig_data_technologies%3Adata-analytics-distributed-role) — Big Data Technologies, chapter 1
- [Lumped vs distributed analysis, applications, protocols](https://www.bctengineer.com/question.md?key=semester_7%2Frf_and_microwave_engineering%3Alumped-distributed-protocols) — RF and Microwave Engineering, chapter 1
- [User-level versus kernel-level threads](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Auser-vs-kernel-threads) — Embedded System, chapter 6, asked 2×
