CSE330 Operating Systems
Summer 2018: Test 2 (30 mins)
Answer all questions.
Be brief and to the point. Neatness counts.
Open book open notes
1. (10 points)
a) P1 arrived at 0 and need 10 units burst time, P2 is arrived at 1 and need 8 units of
burst time, process P3 is arrived at 2 and need 6 units of burst time and process P4
arrived at 3 and need 4 units of burst time. No I/O in any jobs.
Assume that context switch takes one unit of time. Draw that gnat chart and find
the average waiting time, turnaround time using SJF non-preemptive scheduling. (5
b) Five jobs are waiting to be run (no I/O). Their expected run times are 9, 6, 3, 5, and 10.
In what order should they be run to minimize average response time? Explain why. (5
First letter of your (official) last
2. (10 points) The following are the CPU and I/O behavior of three processes, timings in
Process P1 has 1 second CPU burst followed by 3s I/O followed by 3s CPU burst
Process P2 has 2 second CPU burst followed by 2s I/O followed by 4s CPU burst
Process P2 has 4 second CPU burst followed by 1s I/O followed by 2s CPU burst
Please provide approximate sketches of Gantt charts, and average turnaround times
for the following scheduling algorithms:
1. Round Robin with a smallish time quanta (below 0.1s)
Mark only one answer
2. In multilevel feedback scheduling algorithm
a) a process can move to a different ready queue
b) classification of ready queue is permanent
c) processes are not classified into groups
d) none of the mentioned
3. Which of the following process scheduling algorithm may lead to starvation
b) Round Robin
c) Shortest Job Next
d) None of the above
4. A scheduling algorithm assigns priority proportional to the waiting time of a process.
Every process starts with priority zero (the lowest priority). The scheduler re-evaluates
the process priorities every T time units and decides the next process to schedule.
Which one of the following is TRUE if the processes have no I/O operations and all
arrive at time zero?
a) This algorithm is equivalent to the first-come-first-serve algorithm
b) This algorithm is equivalent to the round-robin algorithm.
c) This algorithm is equivalent to the shortest-job-first algorithm..
d) This algorithm is equivalent to the shortest-remaining-time-first algorithm
5. What happens when time quanta for Round Robin Scheduling becomes comparable to
context switching time?
a) CPU utilization becomes closer to 50%
b) Response time increases
c) Wait time increases
d) None of the above
6. Which statement is true for Shortest Job First with Aging
a) It has the same average turn around time as SJF
b) The turnaround time for larger jobs is likely to reduce
c) It still has the starvation for larger jobs
d) It cannot be implemented in practice