1.5Free
Your guide: Miss HiraExplains computers with chai, cricket and your phone.
A process is an independent program being executed. It has its own memory space, CPU time and other resources, such as files or network connections. Processes are kept apart, so a problem in one generally does not affect another.
A thread is the smallest unit of execution inside a process. One process can hold many threads, each doing a different task. All threads of a process share its memory and resources, but each runs independently.
Your book's browser is one process. Inside it, one thread loads and draws the web page, a second plays audio or video, and another downloads files. So the page keeps loading while the video plays, and you never wait for one task to finish.
Multithreading is the OS technique of dividing one process's work into threads. Your book gives four benefits: better performance, better responsiveness, support for parallel operations, and efficient use of resources, because threads need fewer resources than separate processes.
Responsiveness example: a word processor lets you keep typing while another thread checks spelling in the background. Parallel work matters most in games, video editing and real-time communication tools.
Step 1 / 7
A process is an independent program being executed. It has its own memory space, CPU time and other resources, such as files or network connections. Processes are kept apart, so a problem in one generally does not affect another.
A thread is the smallest unit of execution inside a process. One process can hold many threads, each doing a different task. All threads of a process share its memory and resources, but each runs independently.
Your book's browser is one process. Inside it, one thread loads and draws the web page, a second plays audio or video, and another downloads files. So the page keeps loading while the video plays, and you never wait for one task to finish.
Multithreading is the OS technique of dividing one process's work into threads. Your book gives four benefits: better performance, better responsiveness, support for parallel operations, and efficient use of resources, because threads need fewer resources than separate processes.
Responsiveness example: a word processor lets you keep typing while another thread checks spelling in the background. Parallel work matters most in games, video editing and real-time communication tools.
Process: own memory, isolated. Thread: inside a process, shares its memory, runs independently. Many threads = one app doing many things at once.
Q1. Long Question 3, second part (p. 17): explain how multithreading improves performance.
Work is split into threads that run in parallel and share memory, so the app is faster, stays responsive and uses fewer resources.
Q2. Your browser's video thread freezes. Why does the whole computer not crash?
The trouble stays inside the browser process; other processes keep their own memory and carry on.
✗ Saying each thread has its own separate memory space.
✓ Threads of one process share the same memory and resources. Separate memory belongs to processes.
✗ Calling a thread a separate program.
✓ A thread lives inside a process; the browser is one process with many threads.
✗ Writing that threads use more resources than processes.
✓ Sharing the parent's memory means threads need fewer resources than separate processes.
1. Threads in the same process:
(b) Exercise MCQ 7 (p. 16); key p. 18; 1.5, p. 11.
2. What is the smallest unit of execution within a process?
(d) 1.5, p. 11.
3. A word processor checks spelling while you keep typing. Which benefit is this?
(a) 1.5.2, p. 11.
4. Why does a problem in one process generally not affect another?
(c) 1.5, p. 10.
5. Why do threads use resources efficiently?
(d) 1.5.2, p. 12.
Found a mistake? Tell us the lesson and the line at exciting@boringeducation.com.
Free right now. No ads. Tell us what to fix.