Operating System Fundamentals
Prof. Santanu Chattopadhyay
IIT Kharagpur
Assignment 06
Q1. For the following set of processes scheduled using the SJF (Shortest-Job-First, non-
preemptive) process scheduling policy, determine the average turnaround time.
Process Arrival time Burst time
P1 0 6
P2 2 2
P3 5 2
P4 8 6
(A) 5.25
(B) 5.5
(C) 6.25
(D) 6.5
Ans: (C) 6.25
Q2. For the following set of processes scheduled using the SRTF (Shortest-remaining-time-
first, preemptive) process scheduling policy, determine the average waiting time.
Process Arrival time Burst time
P1 0 3
P2 1 1
P3 2 6
P4 3 2
(A) 1.5
(B) 2.0
(C) 2.5
(D) 3.0
Ans: (A) 1.5
Q3. Which of the following statements is/are true?
(A) The performance of the Round Robin scheduling algorithm depends on the size of the
time quantum.
(B) If the time quantum is extremely small, Round Robin algorithm for scheduling can result
in a large number of context switches.
(C) A large time quantum can make Round Robin behave more like First-Come, First-Served
(FCFS).
(D) All of the above statements
Ans: (D) All of the above statements
Q4. Consider the set of five processes whose arrival time and burst time are as given below:
Process Id Arrival Time Burst Time Priority
P1 0 4 1
P2 1 3 2
P3 2 1 3
P4 3 5 4
P5 4 2 5
If the scheduling policy is priority-non-preemptive, what is the average turnaround time?
(Larger the value, higher the priority of the process.)
(A) 7.0
(B) 7.6
(C) 8.6
(D) 9.6
Ans: (B) 7.6
Q5. Consider a round-robin scheduling algorithm with a time quantum of 5 milliseconds. The
ready queue contains four processes in the order P1, P2, P3, P4. The burst times for these
processes are as follows:
P1: 12 ms
P2: 3 ms
P3: 8 ms
P4: 6 ms
What is the average waiting time for these processes?
(A) 14.0
(B) 15.25
(C) 16.0
(D) 16.5
Ans: (B) 15.25
Q6. Which of the following is not a parameter in case of multilevel-feedback-queue
scheduler?
(A) Number of queues
(B) Scheduling algorithms for each queue
(C) A method to determine which queue a process will enter when that process needs
service
(D) None of the above
Ans: (D) None of the above
Q7. Which of the following statements is false for Round Robin (RR) process scheduling?
(A) RR is suitable for a time-sharing system
(B) RR is a preemptive scheduling algorithm
(C) Its turnaround time does not depend on the time quantum
(D) In case of RR algorithm, the priority of all the processes are same
Ans: (C) Its turnaround time does not depend on the time quantum
Q8. Which of the following can be used to avoid starvation problem in a priority-based
scheduler?
(A) Termination of the processes waiting for a long time
(B) Reassign priorities to the processes randomly
(C) Gradually increase the priorities of the processes that have been waiting for a long
time
(D) None of the above
Ans: (C) Gradually increase the priorities of the processes that have been waiting for a long
time
Q9. Which of the following is a potential problem if proper synchronization is not
implemented in the producer-consumer problem?
(A) Deadlock
(B) Starvation
(C) Data inconsistency
(D) All of the above
Ans: (D) All of the above
Q10. Which of the following statement is false for Critical Section Problem?
(A) If a process is executing in its critical section, another process is allowed to enter
into the critical section provided it has higher priority over the earlier executing
process.
(B) Multiple processes share the same data.
(C) A bound must exist on the number of times other processes are allowed to enter the
critical section.
(D) Concurrent access to shared data may result in data inconsistency
Ans: (A) If a process is executing in its critical section, another process is allowed to enter
into the critical section provided it has higher priority over the earlier executing process.