1.3Free
Your guide: Miss HiraExplains computers with chai, cricket and your phone.
A program that is running is called a process. Process management makes sure each process gets the resources it needs, even when many are active, so they run without disturbing each other.
A process has three stages. Creation: you start a program and the OS loads it into memory with CPU time and memory. Execution: it runs and does its work. Termination: it is closed and the OS frees its resources for others.
Multitasking lets one user keep several programs open and switch between them, such as music, a document and a browser. Concurrency means many processes are active, but the CPU works on them one by one in very fast turns, like a chef moving between three dishes.
Because the CPU runs one process at a time, the OS must decide which runs first and for how long. This is scheduling. Your book uses First Come, First Served (FCFS): processes run in the exact order they arrive, like a queue at a shop counter.
In the book's example P1 runs 0â5 s, P2 runs 5â8 s and P3 runs 8â10 s. P3 needs only 2 s but must wait for the longer jobs. FCFS is easy and skips no process, but short jobs stuck behind long ones slow the system: the convoy effect.
Step 1 / 7
A program that is running is called a process. Process management makes sure each process gets the resources it needs, even when many are active, so they run without disturbing each other.
A process has three stages. Creation: you start a program and the OS loads it into memory with CPU time and memory. Execution: it runs and does its work. Termination: it is closed and the OS frees its resources for others.
Multitasking lets one user keep several programs open and switch between them, such as music, a document and a browser. Concurrency means many processes are active, but the CPU works on them one by one in very fast turns, like a chef moving between three dishes.
Because the CPU runs one process at a time, the OS must decide which runs first and for how long. This is scheduling. Your book uses First Come, First Served (FCFS): processes run in the exact order they arrive, like a queue at a shop counter.
In the book's example P1 runs 0â5 s, P2 runs 5â8 s and P3 runs 8â10 s. P3 needs only 2 s but must wait for the longer jobs. FCFS is easy and skips no process, but short jobs stuck behind long ones slow the system: the convoy effect.
FCFS: start time = when the CPU becomes free (or the arrival time, if later). Finish = start + time needed. Waiting time = start â arrival.
Q1. Long Question 5 (p. 17): P1 arrives at 0 s (4 s), P2 at 1 s (3 s), P3 at 2 s (1 s). Find each waiting time and the average.
Waits 0 s, 3 s and 5 s; average â 2.67 s. P3 needs only 1 s but waits 5 s: the convoy effect.
Q2. Long Question 2 (p. 17): explain the process life cycle using a web browser.
Creation (loaded, given resources) â execution (does its work) â termination (resources freed).
â Running the shortest process first in an FCFS question.
â FCFS ignores length. Only arrival order counts, which is why P3 waits in your book's example.
â Starting each process at its arrival time even while another is running.
â A process starts when the CPU is free: at the previous finish time if that is later than its arrival.
â Saying concurrency means the CPU runs all processes at exactly the same moment.
â Your book says the CPU handles them one by one in extremely fast cycles, so they only seem simultaneous.
1. In the FCFS scheduling method, processes are served:
(c) Exercise MCQ 6 (p. 16); key p. 18; 1.3.3, p. 7.
2. In the Activity on p. 9 (P1 0 s/4 s, P2 1 s/5 s, P3 2 s/3 s), when do all processes finish?
(d) P1 0â4, P2 4â9, P3 9â12, so 12 s.
3. Which stage of a process frees its memory and CPU time for others?
(b) 1.3.1, p. 6.
4. Listening to music while a document stays open and you browse the internet is an example of:
(a) 1.3.2, p. 7.
5. Short processes waiting a long time behind longer ones is called the:
(c) Disadvantages of FCFS, p. 9.
Found a mistake? Tell us the lesson and the line at exciting@boringeducation.com.
Free right now. No ads. Tell us what to fix.