Questions on CPU scheduling(SJF)

QUE1-  Avg TAT=? and WT=?

P No. AT BT
1 1 7
2 2 5
3 3 1
4 4 2
5 5 8
Solution- gantt sol 5
P No. AT BT TAT WT
1 1 7 7 0
2 2 5 14 9
3 3 1 6 5
4 4 2 7 5
5 5 8 19 11
      53/5=10.6 30/5=6
Que2- If BT for process are matching, then schedule process which is having lowest arrival time.
P No. AT BT
1 6 1
2 3 3
3 4 6
4 1 5
5 2 2
6 5 1
Solution- gantt sol 6
P No. AT BT TAT WT
1 6 1 1 0
2 3 3 10 7
3 4 6 15 9
4 1 5 5 0
5 2 2 8 6
6 5 1 3 2
      42/6=7 24/6=4
]]>

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top