Computer Sciences > GATE 2025 SET-2 > CPU Scheduling
Processes P1, P2, P3, P4 arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times.
Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
A
22
B
15
C
37
D
19

Explanation

Correct : a

Average Turnaround Time: 19 milliseconds

Using Shortest Remaining Time First (SRTF) scheduling for processes P1, P2, P3, and P4 with arrival times 0, 1, 2, and 8 ms and burst times 10, 13, 6, and 9 ms respectively.

Gantt Chart:

P1 (0-1)
P3 (1-2)
P3 (2-8)
P1 (8-13)
P4 (13-22)
P2 (22-35)
0128132235

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science