Question no 1 Draw Gantt chart and find Average waiting time by FCFS and SRTN. Process P11 Arrival Time Burst Time 2 2 P12 7. P13 7. P14 3. 6. PIS 2 P16 9. 4 P17 10 8. P18 6. P19 4 P20 10
Introduction of CPU Scheduling:
CPU Scheduling is the process in which one process uses the CPU and another process waits for the CPU because of unavailability of any resources and there are mainly FCFS(First Come First Served)Scheduling, SJF(Shortest job first), Priority Scheduling, and Round Robin Scheduling.
FCFS Scheduling: This is the simplest CPU-scheduling algorithm in which the process that requests the CPU first is allocated to the CPU first.
Gantt Chart
P12 | P13 | P11 | P14 | P15 | P18 | P16 | P19 | P17 | P20 |
1 8 15 17 23 25 26 30 34 42 47
Process |
Burst Time (BT) |
Arrival Time (AT) |
Completion time (CT) |
Turn Around Time (TAT)=CT-AT |
Waiting Time (WT)=TAT-BT |
P11 |
2 |
2 |
17 |
15 |
13 |
P12 |
7 |
1 |
8 |
7 |
0 |
P13 |
7 |
1 |
15 |
14 |
7 |
P14 |
6 |
3 |
23 |
20 |
14 |
P15 |
2 |
5 |
25 |
20 |
18 |
P16 |
4 |
9 |
30 |
21 |
17 |
P17 |
8 |
10 |
42 |
32 |
24 |
P18 |
1 |
6 |
26 |
20 |
19 |
P19 |
4 |
9 |
34 |
25 |
21 |
P20 |
5 |
10 |
47 |
37 |
32 |
Step by step
Solved in 3 steps