Page 101 - DCAP403_Operating System
P. 101
Operating System
Notes The processes are assumed to have arrived in the order P , P , P , P , P all at time 0.
1 2 3 4 5
(a) Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms: FCFS, SJF, non-preemptive priority (a smaller
priority number implies a higher priority), and RR (quantum = 1).
(b) What is the turnaround time of each process for each of the scheduling algorithms in
part a?
(c) What is the waiting time of each process for each of the scheduling algorithms in part
a?
8. Consider the following set of processes, with the length of the CPU burst and arrival time
given in milliseconds.
Process Burst Time Priority
P 1 8 0
P 2 4 0.4
P 1 1
3
(a) Draw four Gantt charts that illustrate the execution of these processes using the
following scheduling algorithms: FCFS, SJF, (the algorithm can look into the future
and wait for a shorter process that will arrive).
(b) What is the turnaround time of each process for each of the scheduling algorithms in
part a?
(c) What is the waiting time of each process for each of the scheduling algorithms in part
a?
9. Explain the differences in the degree to which the following scheduling algorithms
discriminate in favor of short processes:
(a) First Come First Served
(b) Round Robin
(c) Multilevel Feedback Queues
10. Write short notes on:
(a) Waiting time
(b) Response time
(c) Throughput
Answers: Self Assessment
1. ready-queue 2. CPU 3. processes
4. allocated 5. Shortest remaining time
6. non preemptive priority 7. Medium term 8. minimize the expected runtime
9. Global 10. Round-robin
94 LOVELY PROFESSIONAL UNIVERSITY