Assignment 2
Assignment 2
Assignment 2
Question #1
a) There are many possible CPU-scheduling algorithms. How could we select one particular
algorithm for a particular system? Discuss various evaluation methods.
b) Suppose that processes P1, P2,. .., P5 arrive for execution at the times indicated in
Table .Each process will run for the amount of time listed and will be assigned a priority ranging
from 0 (highest) to 10 (lowest). No more processes will arrive until the last process
completes.
In answering the questions, base all decisions on the information you have at the time the
decision must be made
Question #2
Draw four Gantt charts that illustrate the execution of these processes using the following
scheduling algorithms and compare your results.
a) FCFS
b) Preemptive and Non-preemptive SJF
Preemptive priority (SJF if priority is equal)
e)
RR (quantum=2).
c) Preemptive priority (SJF if priority is equal)
d) RR (quantum=2).
In addition:
a) What is the turnaround time of each process for each of these four scheduling
algorithms?
b) What is the waiting time of each process for each of these four scheduling
algorithms?
In addition:
a) What is the turnaround time of each process for each of these four scheduling algorithms?
b) What is the waiting time of each process for each of these four scheduling algorithms?
Which of the algorithms results in the minimum average waiting time (over all
processes)?
c) Which of the algorithms results in the minimum average waiting time (over all
Processes)?
Question #3
A scheduling algorithm determines the order in which an operating system will execute
processes. How quickly a process will finish depends on the size of the job and the scheduling
algorithm used.
Some jobs are sent to be processed. The times shown are in minutes.
In which order will the jobs complete under each of the following scheduling algorithms?