Chapter 1 · Operating Systems: Structure and Services
1.5Processes and Threads
The difference between a process and a thread, and how multithreading makes programs faster and more responsive.
Written and checked by Muhammad Raheel(opens in a new tab)
Full Stack Developer · AI Engineer · Reviewed 6 Oct 2026 · 3 min read
On this page
In topic 1.3 you learned that a running program is called a process. Now we look inside a process. One process can do many jobs at once, using small workers called threads. This topic explains how processes and threads differ, and why threads make programs feel fast.
Every process gets its own memory space, its own share of CPU time and its own resources, such as files or network connections. Processes are kept apart from each other. This keeps the computer stable and secure. If one process has a problem, the others usually keep running.
A "unit of execution" is one piece of work that the CPU can run. One process can hold many threads. Each thread does a different task. All threads of a process share the same memory and resources, but each one runs on its own.
| Process | Thread | |
|---|---|---|
| What it is | An independent running program | The smallest unit of execution inside a process |
| Memory | Has its own memory and resources | Shares the memory and resources of its process |
| Isolation | Kept apart from other processes | Works together with other threads in the same process |
| Cost | Heavier, needs its own resources | Lighter, reuses its parent process's resources |
Multithreading
Multithreading is a way to split one process's work into many threads. Each thread runs on its own, but they all share the process's memory and resources. The result is faster work, quicker response and less waste.
Benefits of Multithreading
The book names four main benefits:
- Enhanced Performance: a big task is split across many threads that run in parallel. So complex work finishes sooner.
- Improved Responsiveness: the app keeps responding, even while one thread is busy. In a word processor, you keep typing while another thread checks your spelling in the background.
- Support for Concurrent (parallel) Operations: many tasks can move forward in the same period. This matters a lot in games, video editing and real-time communication tools.
- Efficient Use of Resources: threads share their parent process's memory and resources. So they need fewer system resources than separate processes.
Practice this topic
Short questions
1.Define a process.3 marks
Answer
A process is an independent program that is currently being executed by the computer. It has its own memory space CPU time, and other resources (such as files or network connections). Processes are isolated from one another to ensure stability and security; a problem in one process generally does not affect another.
2.Define a thread.3 marks
Answer
A thread is the smallest unit of execution within a process. Multiple threads can exist inside a single process, each performing a different task. All threads in the same process share the same memory and resources, but operate independently.
3.Explain the web browser example given in the book to illustrate processes and threads.4 marks
Answer
The entire browser application is one process. Within this process, different threads are responsible for one thread loading and rendering a webpage, the second thread playing audio or video content, and another thread downloading files in the background. Using multiple threads, the browser can continue loading new content while playing a video, without making the user wait for one task to finish before starting another.
4.Define Multithreading.3 marks
Answer
Multithreading is an operating system technique that allows a single process to perform multiple tasks at the same time by dividing its work into smaller units called threads. Each thread runs independently but shares the same memory and resources of the process, enabling faster execution, better responsiveness, and efficient use of system resources.
5.List the four benefits of multithreading.2 marks
Answer
Enhanced Performance, Improved Responsiveness, Support for Concurrent (parallel) Operations, and Efficient Use of Resources.
6.Explain how multithreading improves responsiveness, using the book's example.3 marks
Answer
Applications remain responsive even when one thread is busy with a specific task. Example: A word processor enables continuous typing while another thread checks spelling in the background.
7.Why does multithreading use system resources efficiently?2 marks
Answer
Threads share the same memory space and resources of their parent process, requiring fewer system resources compared to creating separate processes.
Long questions
1.Differentiate between a process and a thread. Explain how they share (or do not share) memory and resources. Illustrate your answer with the web browser example from the book.8 marks
Answer
Cover three parts:
-
Process (verbatim): "A process is an independent program that is currently being executed by the computer. It has its own memory space CPU time, and other resources (such as files or network connections). Processes are isolated from one another to ensure stability and security; a problem in one process generally does not affect another."
-
Thread (verbatim): "A thread, on the other hand, is the smallest unit of execution within a process. Multiple threads can exist inside a single process, each performing a different task. All threads in the same process share the same memory and resources, but operate independently."
-
Web browser example (verbatim): The entire browser application is one process. Within this process, different threads are responsible for:
- One thread is loading and rendering a webpage.
- The second thread is playing audio or video content.
- Another thread is downloading files in the background.
By using the above multiple threads, the browser can continue loading new content while playing a video, without making the user wait for one task to finish before starting another.
Key contrast: processes are isolated (each has its own memory), threads share memory within a single process.
Aim for 220-320 words.
-
2.Define multithreading and explain its four benefits with examples where possible.8 marks
Answer
Structure the answer in two parts:
-
Definition (verbatim): "Multithreading is an operating system technique that allows a single process to perform multiple tasks at the same time by dividing its work into smaller units called threads. Each thread runs independently but shares the same memory and resources of the process, enabling faster execution, better responsiveness, and efficient use of system resources."
-
The four benefits (verbatim, in order):
-
Enhanced Performance: Tasks can be divided into multiple threads and executed in parallel, allowing complex operations to complete more quickly and improving overall system efficiency.
-
Improved Responsiveness: Applications remain responsive even when one thread is busy with a specific task. Example: A word processor enables continuous typing while another thread checks spelling in the background.
-
Support for Concurrent (parallel) Operations: Multiple tasks can progress during the same period, which is particularly important in applications such as games, video editing, and real-time communication tools.
-
Efficient Use of Resources: Threads share the same memory space and resources of their parent process, requiring fewer system resources compared to creating separate processes.
-
Aim for 250-350 words.
-