Saturday, 9 November 2019

Scheduling, Synchronization and Deadlock (Quiz)

Question 1
Which of the following scheduling algorithms must be nonpreemptive?
  1. Shortest Job First
  2. Round Robin
  3. First Come, First Served
  4. Priority Algorithms
Solution: First Come, First Served

Question 2
____ scheduling is approximated by predicting the next CPU burst with an exponential average of the measured lengths of previous CPU bursts. 
  1. Shortest Job First
  2. Round Robin
  3. Multilevel queue
  4. First Come, First Served 
 Solution: Shortest Job First

Question 3
With the following process list, what is the Average Turnaround Time for the Round Robin scheduling algorithm with a time quantum of 5ms? 

Submission Time Process Run Time
0ms 10ms
5ms 20ms
15ms 10ms
30ms 20ms
40ms 10ms
60ms 10ms
  1.  20
  2. 23
  3. 25
  4. 27
Solution: 27

Question 4
____ is the number of processes that are completed per time unit.
  1. Response time
  2. Turnaround time
  3. Throughput
  4. CPU utilization 
 Solution: Throughput

Question 5
Which of the following is true of cooperative scheduling?
  1.  A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.
  2. A process switches from the running state to the ready state when an interrupt occurs.
  3. It requires a timer.
  4. It incurs a cost associated with access to shared data. 
Solution: A process keeps the CPU until it releases the CPU either by terminating or by switching to the waiting state.

Question 6
A significant problem with priority scheduling algorithms is _____.
  1. determining the length of the time quantum
  2. complexity
  3. determining the length of the next CPU burst
  4. starvation
Solution: starvation

Question 7
______ allows a thread to run on only one processor.
  1. Load balancing
  2. Processor affinity
  3. Processor set
  4. NUMA
Solution: Processor affinity

Question 8
With the following process list, what is the Average Response Time for the First Come, First Served scheduling algorithm? 
 

Submission Time Process Run Time
0ms 10ms
5ms 20ms
15ms 10ms
30ms 20ms
40ms 10ms
60ms 10ms
  1. 10ms
  2. 7.5ms
  3. 12.5ms
  4. 5ms
Solution: 10ms

Question 9
The ______ occurs in First Come, First Served scheduling when a process with a long CPU burst occupies the CPU. 
  1. waiting time
  2. convoy effect
  3. systemcontention scope
  4. dispatch latency 
 Solution: convoy effect

 

No comments:

Post a Comment