🖥️ CS330: Operating Systems

Chapter 5: CPU Scheduling - Comprehensive Exam

⏱️ Duration: 90 minutes
📊 Total Marks: 50
📝 Questions: 15
Section 1: Multiple Choice Questions (20 Marks)
Question 1 Past Exam 2 Marks
Which of the following is NOT a function of the dispatcher?
Question 2 Past Exam 2 Marks
Which scheduling algorithm uses the concept of time-slicing to schedule processes?
Question 3 Past Exam 2 Marks
In Round Robin (RR) scheduling, what is the significance of the time quantum?
Question 4 Past Exam 2 Marks
In the First-Come-First-Serve (FCFS) scheduling algorithm, which process is selected to execute first?
Question 5 Past Exam 2 Marks
Which scheduling algorithm is less likely to cause starvation, preemptive SJF or non-preemptive SJF?
Question 6 Past Exam 2 Marks
What is the difference between preemptive and non-preemptive scheduling?
Question 7 Past Exam 2 Marks
In priority scheduling, how is starvation prevented?
Question 8 2 Marks
What is dispatch latency?
Question 9 Past Exam 2 Marks
Which scheduling algorithm can cause starvation of some processes?
Question 10 Past Exam 2 Marks
What is the main drawback of the First Come First Serve scheduling algorithm?
Section 2: Short Answer Questions (15 Marks)
Question 11 Past Exam 3 Marks
Define the following: (i) Turnaround time of a process (ii) Throughput of a system
Question 12 Past Exam 4 Marks
In Multi-Level Queue Scheduling, how are processes classified into different queues? Explain with an example.
Question 13 4 Marks
What is the convoy effect? Explain how it occurs in FCFS scheduling and provide an example scenario.
Question 14 4 Marks
Explain the relationship between time quantum size and system performance in Round Robin scheduling. What happens if the time quantum is too small or too large?
Section 3: Problem Solving (15 Marks)
Question 15 Past Exam 15 Marks

Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

Process Burst Time Priority
P1 4 3
P2 3 1
P3 8 4
P4 7 2
P5 5 3

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

a) Draw Gantt charts for FCFS and SJF (non-preemptive) scheduling. (5 marks)

b) Calculate the average waiting time for each algorithm. (5 marks)

c) Calculate the average turnaround time for each algorithm. (5 marks)