PBL 2 Uniprocessor Scheduling
PBL 2 Uniprocessor Scheduling
UNIPROCESSOR SCHEDULING
QUESTION 1
a. Illustrate a Gantt chart to show the schedules for Shortest Remaining Time (SRT)
policy.
b. Estimate the finish time, turnaround time, and normalized turnaround time.
(10 Marks)
Process P1 P2 P3 P4
Arrival time 0 2 4 6
Service time (Ts) 5 2 9 4
RR q=1
Finish time (2M) 7 4 20 11
Turnaround time (Tr) (2M) 7 2 16 5
Normalized
(2M) Tr (2M) 1.4 1 1.77 1.25 1.355
QUESTION 2
Perform an analysis for the set of processes in Table 1 to describe Round-robin (q= 1)
scheduling policies performance. In your analysis, you are required to:
a. Illustrate the execution pattern for one cycle.
b. Estimate the finish time, turnaround time, and normalized turnaround time.
(10 Marks)
0 1 2 3 4 5 6 7 8 9 1 1 1 1 1 1
0 1 2 3 4 5
RR(1) A
B
C
D
Process A B C D
Arrival time 0 2 4 8
Service time (Ts) 3 5 2 5
RR q=1
Finish time (2M) 4 11 8 15
Turnaround time (Tr) (2M) 4 9 4 7
Normalized Tr (2M) 1.3 1.8 2 1.4 1.63
QUESTION 3
Discuss the performance of SRT, and Round Robin scheduling policy in terms of:
i. Throughput
ii. Response time
iii. Overhead
iv. Starvation
SRT RR
Throughput High because a short job is Low for small quantum
given immediate preference
to a running longer job.
Response time Good Good for shorter process
Overhead Can be high because Can be high in small
elapsed service times must quantum because handling
be recorded. the clock interrupt and
performing the scheduling.
Starvation Possible for longer process Not possible because fair
because the scheduler must treatment to all process
have an estimate of
processing time to perform
the selection function.