Consider the following set of processes (arrived at 0ms). The average penalty…

Consider the following set of processes (arrived at 0ms). The average penalty ratio using FCFS scheduling algorithm is :

Answer: 5Answer: Average penalty ratio = 5. Explanation and calculations: Order of execution under FCFS (all arrived at 0 ms): P1 (25 ms), P2 (5 ms), P3 (10 ms), P4 (5…

Attempted by 139 students.

Show answer & explanation

Correct answer: 5

Answer: Average penalty ratio = 5.

image.png

Explanation and calculations:

  • Order of execution under FCFS (all arrived at 0 ms): P1 (25 ms), P2 (5 ms), P3 (10 ms), P4 (5 ms).

  • Waiting times: P1 = 0 ms; P2 = 25 ms (after P1); P3 = 30 ms (after P1+P2); P4 = 40 ms (after P1+P2+P3).

  • Turnaround times (waiting + service): P1 = 25 ms; P2 = 30 ms; P3 = 40 ms; P4 = 45 ms.

  • Penalty ratio (normalized turnaround) = turnaround / service time: P1 = 25/25 = 1; P2 = 30/5 = 6; P3 = 40/10 = 4; P4 = 45/5 = 9.

  • Average penalty ratio = (1 + 6 + 4 + 9) / 4 = 20 / 4 = 5.

Note: The original solution inverted the formulas. The correct relation is response ratio = turnaround time / service time (this is the same as the normalized turnaround or penalty ratio). The numeric result (average = 5) is correct.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…