0% found this document useful (0 votes)
105 views3 pages

PBL 2 Uniprocessor Scheduling

This document discusses scheduling policies for a single processor system. It provides examples of applying shortest remaining time (SRT) and round robin (RR) scheduling policies to sample processes. For each policy, it shows the execution pattern in a Gantt chart, and calculates the finish time, turnaround time, and normalized turnaround time of each process. It then analyzes and compares the throughput, response time, overhead and starvation characteristics of the SRT and RR policies.

Uploaded by

Ammar Jamaludin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views3 pages

PBL 2 Uniprocessor Scheduling

This document discusses scheduling policies for a single processor system. It provides examples of applying shortest remaining time (SRT) and round robin (RR) scheduling policies to sample processes. For each policy, it shows the execution pattern in a Gantt chart, and calculates the finish time, turnaround time, and normalized turnaround time of each process. It then analyzes and compares the throughput, response time, overhead and starvation characteristics of the SRT and RR policies.

Uploaded by

Ammar Jamaludin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

PBL 2

UNIPROCESSOR SCHEDULING

QUESTION 1

Given the following jobs that are to be processed on single processor:

Table 1: Process Scheduling


Process Arrival Time Service Time
in ms in ms
P1 0 5
P2 2 2
P3 4 9
P4 6 4

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)

Execution pattern for each process in SRT →1 Mark each

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

Consider the following set of processes:


Table 2: Process Scheduling
Process Arrival Time Service Time
A 0 3
B 2 5
C 4 2
D 8 5

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

Execution pattern for each process in RR →1 Mark each

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.

You might also like