Consider the following set of processes that need to be scheduled on a single CPU. All the times are given in milliseconds. Using the shortest remaining time first scheduling algorithm, the average process turnaround (in milliseconds) is ________.Process Name Arrival Time Execution Time A 0 6 B 3 2 C 5 4 D 7 6 E 10 3
7.2
Shortest remaining time first (SRTF) is the preemptive form of shortest job first: whenever a process arrives, the scheduler compares its burst with the remaining time of the running process and runs whichever is smaller. Turnaround time = completion time − arrival time.
Step 1 — t = 0 to 3: only A is present, so A runs; at t = 3 A has 3 ms left.
Step 2 — t = 3: B arrives with 2 ms, which is less than A's 3 ms, so B preempts A and runs from 3 to 5. B completes at 5.
Step 3 — t = 5: C arrives with 4 ms; A has 3 ms left, so A resumes. At t = 7 D arrives with 6 ms while A has 1 ms left, so A continues and completes at 8.
Step 4 — t = 8: ready are C (4) and D (6), so C runs. At t = 10 E arrives with 3 ms while C has 2 ms left, so C continues and completes at 12.
Step 5 — t = 12: E (3) is shorter than D (6), so E runs 12 to 15, then D runs 15 to 21.
| Process | Arrival | Completion | Turnaround |
|---|---|---|---|
| A | 0 | 8 | 8 |
| B | 3 | 5 | 2 |
| C | 5 | 12 | 7 |
| D | 7 | 21 | 14 |
| E | 10 | 15 | 5 |
Step 6 — Average turnaround = \(\dfrac{8+2+7+14+5}{5} = \dfrac{36}{5} = 7.2\) ms.
The value 8.2 would need a total of 41 ms of turnaround, which no valid SRTF schedule of these bursts produces; 6 and 9 do not match the schedule either (non-preemptive SJF would give 7.4 and the average waiting time is 3).
7.2 option is correct.
What is the average waiting time for these processes with non-preemptive Shortest Job First (SJF) scheduling 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 |
Find the average weighted turnaround time for these process using Highest Response Ratio Next (HRN) Algorithm?
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?
What is the average turnaround time for these Processes with First Come First Serve (FCFS) 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 :
Which of the following statements is not true for Multi Level Feedback Queue processor scheduling algorithm ?
Which of the following statements are true?
A. If the time quantum is extremely small, round robin can result in a large number of context switches.
B. The average turnaround time of a set of processes does not necessarily improve as the time-quantum size increases.
C. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.
Choose the correct answer from the options given below:
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?
| Process | CPU Burst Time (MS) |
| P1 | 24 |
| P2 | 3 |
| P3 | 3 |