Read the following and answer the questions that follow. Consider the following set of processes with the arrival time and length of CPU Burst time given in milli-seconds (ms):Process Arrival Time Burst Time P1 0 5 P2 2 3 P3 2 2 P4 5 3 P5 6 1
What is the average turnaround time for these Processes with First Come First Serve (FCFS) scheduling Algorithm?
7.0 ms
First Come First Serve runs processes strictly in arrival order, each to completion. Turnaround time = completion time − arrival time.
Step 1 — Arrival order: P1 (0), P2 and P3 (both 2, taken in index order), P4 (5), P5 (6).
Step 2 — Gantt chart: P1 0–5, P2 5–8, P3 8–10, P4 10–13, P5 13–14.
| Process | Arrival | Burst | Completion | Turnaround |
|---|---|---|---|---|
| P1 | 0 | 5 | 5 | 5 |
| P2 | 2 | 3 | 8 | 6 |
| P3 | 2 | 2 | 10 | 8 |
| P4 | 5 | 3 | 13 | 8 |
| P5 | 6 | 1 | 14 | 8 |
Step 3 — \(\text{Average turnaround time} = \dfrac{5+6+8+8+8}{5} = \dfrac{35}{5} = 7.0\ \text{ms}\). Serving P3 before P2 gives turnarounds 5 and 8 for them, the same total of 35.
6.4 ms is the average turnaround under Highest Response Ratio Next for this set, 5.3 ms is too small for the 35 ms total, and 8.2 ms would need a total of 41 ms.
7.0 ms option is correct.
Which of the following statements is not true for Multi Level Feedback Queue processor scheduling algorithm ?
Consider a uniprocessor system where new processes arrive at an average of five processes per minute and each process needs an average of 6 seconds of service time. What will be the CPU utilization ?
Match the following :
| List - I | List - II |
| a. Multilevel feedback queue | i. Time-slicing |
| b. FCFS | ii. Criteria to move processes between queues |
| c. Shortest process next | iii. Batch processing |
| d. Round robin scheduling | iv. Exponential smoothening |
Codes :
Match List - I with List - II.
| List - I (Algorithms) | List - II (Characteristics) |
|---|---|
| (A) First Come First Served (FCFS) | (I) Each process is assigned a priority. |
| (B) Shortest Job First (SJF) | (II) Ensures fair allocation of CPU time by assigning time slice. |
| (C) Round Robin (RR) | (III) Processes are executed in the order they arrive. |
| (D) Priority Scheduling | (IV) Select the process for execution with smallest next Burst time. |
Choose the correct answer from the options given below :
When we apply Shortest Job First (SJF) scheduling Policy/algorithm, Process (P2) faces partial starvation and waits for the longer time to execute. Which one of the following non-preemptive algorithms addresses this problem?
Find the average weighted turnaround time for these process using Highest Response Ratio Next (HRN) Algorithm?
Calculate the average response time for these processes with nonpreemptive priority Scheduling algorithm? Priority of the process are as follows and consider that all the processes came at zero (0) time. (Note low numbers represent high priority).
| Process | Burst Time | Priority |
|---|---|---|
| P1 | 5 | 3 |
| P2 | 3 | 1 |
| P3 | 2 | 5 |
| P4 | 3 | 4 |
| P5 | 1 | 2 |
What is the average waiting time for these processes with non-preemptive Shortest Job First (SJF) scheduling Algorithm?
Given the following processes with their times and priority (lower number indicates higher priority)
| Process | Burst Time | Priority |
|---|---|---|
| P1 | 10 | 3 |
| P2 | 1 | 1 |
| P3 | 2 | 4 |
| P4 | 1 | 5 |
| P5 | 5 | 2 |
Which of the following is a value of average waiting time using priority scheduling algorithm?
Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds.
| Process Name | Arrival Time | Execution Time |
|---|---|---|
| A | 0 | 6 |
| B | 3 | 2 |
| C | 5 | 4 |
| D | 7 | 6 |
| E | 10 | 3 |
Using the shortest remaining time first scheduling algorithm, the average process turnaround (in milliseconds) is ________.
Consider the following table about processes, their burst time and arrival time
| Process | Burst Time | Arrival Time |
| P1 | 09 | 0 |
| P2 | 30 | 0 |
| P3 | 04 | 0 |
| P4 | 08 | 2 |
| P5 | 11 | 6 |
Now which of the process shall finish second last as per the respective GANTT charts for the non- preemptive SJF and Round Robin (time quantum = 10) scheduling methods.
| Process | CPU Burst Time (MS) |
| P1 | 24 |
| P2 | 3 |
| P3 | 3 |
| Process | Burst Time | Priority |
|---|---|---|
| $P_1$ | 10 | 3 |
| $P_2$ | 1 | 1 |
| $P_3$ | 2 | 4 |
| $P_4$ | 1 | 5 |
| $P_5$ | 5 | 2 |