0% found this document useful (0 votes)
7 views11 pages

Operating System (CPU Scheduling) MCQ

The document discusses various CPU scheduling algorithms, their advantages, disadvantages, and key concepts such as waiting time and turnaround time. It covers algorithms like First-Come, First-Served (FCFS), Shortest Job First (SJF), Round Robin, and Priority Scheduling, highlighting their operational characteristics and performance implications. Additionally, it addresses issues like starvation and the convoy effect, providing a comprehensive overview of CPU scheduling principles.

Uploaded by

moksh8394
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views11 pages

Operating System (CPU Scheduling) MCQ

The document discusses various CPU scheduling algorithms, their advantages, disadvantages, and key concepts such as waiting time and turnaround time. It covers algorithms like First-Come, First-Served (FCFS), Shortest Job First (SJF), Round Robin, and Priority Scheduling, highlighting their operational characteristics and performance implications. Additionally, it addresses issues like starvation and the convoy effect, providing a comprehensive overview of CPU scheduling principles.

Uploaded by

moksh8394
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

CPU Scheduling

1. What is the primary goal of CPU scheduling?

o a) To increase the process execution time

o b) To optimize CPU usage

o c) To increase waiting time

o d) To minimize memory usage


Answer: b) To optimize CPU usage

2. In the First-Come, First-Served (FCFS) scheduling algorithm, which


process is executed first?

o a) The process with the shortest burst time

o b) The process that arrives first

o c) The process with the highest priority

o d) The process with the longest burst time


Answer: b) The process that arrives first

3. Which of the following is a disadvantage of FCFS scheduling?

o a) High throughput

o b) Low response time

o c) Convoy effect

o d) Non-preemptive
Answer: c) Convoy effect

4. What is the main advantage of Shortest Job First (SJF) scheduling?

o a) Lower waiting time

o b) Higher throughput

o c) Simpler implementation

o d) Low response time


Answer: a) Lower waiting time

5. Which of the following is a key disadvantage of the SJF scheduling


algorithm?

o a) It can lead to starvation of longer processes

o b) It requires prior knowledge of process burst times


o c) It may increase response time
o d) It has a high overhead
Answer: a) It can lead to starvation of longer processes

6. Which type of scheduling algorithm is non-preemptive?

o a) Round Robin

o b) FCFS

o c) Priority Scheduling

o d) SJF
Answer: b) FCFS

7. What is preemption in the context of CPU scheduling?

o a) The process is removed from the ready queue

o b) The process is executed for a fixed time

o c) The process is interrupted and put back into the ready queue

o d) The CPU allocates all resources to one process


Answer: c) The process is interrupted and put back into the ready
queue

8. Which CPU scheduling algorithm gives priority to the process with the
smallest burst time?

o a) Round Robin

o b) SJF

o c) FCFS
o d) Priority Scheduling
Answer: b) SJF

9. In Priority Scheduling, what happens if two processes have the same


priority?

o a) They will be executed randomly

o b) They are executed in the order of arrival

o c) They are executed based on their burst time

o d) Both processes are executed simultaneously


Answer: b) They are executed in the order of arrival

10. Which of the following scheduling algorithms is most appropriate for


real-time systems?

o a) SJF
o b) Round Robin

o c) Priority Scheduling

o d) FCFS
Answer: c) Priority Scheduling

11. What is the purpose of the "waiting time" concept in CPU scheduling?

o a) To measure how long a process waits in the ready queue

o b) To determine the process burst time

o c) To calculate the average turnaround time

o d) To calculate how long a process runs on the CPU


Answer: a) To measure how long a process waits in the ready
queue

12. Which of the following algorithms is associated with the shortest burst
time scheduling?

o a) Round Robin

o b) SJF

o c) Priority Scheduling

o d) FCFS
Answer: b) SJF

13. Which of the following does NOT affect the CPU scheduling
performance?

o a) Throughput

o b) Waiting time

o c) Turnaround time
o d) Process burst time
Answer: d) Process burst time

14. Which scheduling algorithm is based on giving each process an equal


time slice or quantum?

o a) Round Robin

o b) SJF

o c) Priority Scheduling

o d) FCFS
Answer: a) Round Robin
15. What is the time complexity of the FCFS scheduling algorithm?

o a) O(1)

o b) O(n)

o c) O(n^2)

o d) O(log n)
Answer: b) O(n)

16. Which of the following algorithms can cause starvation?

o a) SJF

o b) FCFS

o c) Round Robin

o d) None of the above


Answer: a) SJF

17. In which scheduling algorithm does a process with higher priority get
executed before processes with lower priority?

o a) Round Robin

o b) Priority Scheduling

o c) SJF

o d) FCFS
Answer: b) Priority Scheduling

18. What is a major issue with using FCFS scheduling in a system?

o a) It is difficult to implement

o b) It often causes high average waiting time

o c) It does not handle high-priority processes well

o d) It requires too much CPU time


Answer: b) It often causes high average waiting time

19. What is the main objective of the Round Robin scheduling algorithm?

o a) To minimize response time


o b) To allocate CPU time equally among processes

o c) To prioritize shorter jobs

o d) To allocate CPU to the highest priority process


Answer: b) To allocate CPU time equally among processes
20. Which of the following algorithms is used for priority-based scheduling?

o a) Shortest Job First

o b) First-Come, First-Served

o c) Priority Scheduling

o d) Round Robin
Answer: c) Priority Scheduling

21. Which of the following is true about Priority Scheduling?

o a) It is always preemptive

o b) It can cause starvation of low-priority processes

o c) It guarantees the shortest waiting time

o d) It never uses a time quantum


Answer: b) It can cause starvation of low-priority processes

22. What happens when two processes have the same priority in Priority
Scheduling?

o a) The process with the longest burst time is executed first

o b) The process with the shortest burst time is executed first

o c) They are executed in the order of arrival

o d) Both are executed simultaneously


Answer: c) They are executed in the order of arrival

23. In a CPU scheduling algorithm, which of the following measures the


time spent by the CPU to execute a process after it has been scheduled?

o a) Waiting time

o b) Turnaround time

o c) Execution time

o d) Response time
Answer: c) Execution time

24. What is the effect of larger time quantum in Round Robin scheduling?

o a) It leads to increased context switching

o b) It causes processes to run indefinitely

o c) It results in lower turnaround time


o d) It behaves like FCFS
Answer: d) It behaves like FCFS

25. Which of the following scheduling algorithms is ideal for interactive


systems?

o a) Round Robin

o b) SJF

o c) FCFS

o d) Priority Scheduling
Answer: a) Round Robin

Waiting Time, Turnaround Time, and Scheduling Concepts (25 Questions)

26. What is the formula for calculating the waiting time for a process?

o a) Waiting Time = Turnaround Time - Burst Time

o b) Waiting Time = Arrival Time - Completion Time

o c) Waiting Time = Completion Time - Arrival Time - Burst Time

o d) Waiting Time = Completion Time - Arrival Time


Answer: c) Waiting Time = Completion Time - Arrival Time - Burst
Time

27. How is the turnaround time of a process calculated?

o a) Turnaround Time = Completion Time - Arrival Time


o b) Turnaround Time = Waiting Time + Burst Time

o c) Turnaround Time = Burst Time + Waiting Time

o d) All of the above


Answer: d) All of the above

28. What is the main advantage of using Shortest Job First (SJF)
scheduling?

o a) It minimizes response time

o b) It minimizes waiting time

o c) It prioritizes longer processes

o d) It is easy to implement
Answer: b) It minimizes waiting time
29. What is the primary drawback of Priority Scheduling?
o a) It can lead to starvation of low-priority processes

o b) It requires precise knowledge of process burst times

o c) It may increase the average waiting time

o d) It is a non-preemptive algorithm
Answer: a) It can lead to starvation of low-priority processes

30. Which scheduling algorithm has the lowest average waiting time?

o a) FCFS

o b) SJF

o c) Round Robin

o d) Priority Scheduling
Answer: b) SJF
31. What is the primary disadvantage of Round Robin scheduling?

o a) High turnaround time


o b) High response time

o c) High waiting time

o d) Low CPU utilization


Answer: a) High turnaround time

32. In which CPU scheduling algorithm does a process run until it is


finished or its time quantum expires?

o a) Round Robin

o b) SJF

o c) FCFS

o d) Priority Scheduling
Answer: a) Round Robin

33. In which scenario is SJF scheduling optimal?

o a) When processes have varying burst times

o b) When the CPU must handle I/O-bound processes


o c) When processes have equal burst times

o d) When the CPU has limited processing power


Answer: a) When processes have varying burst times
34. Which of the following is true for a process with high priority in Priority
Scheduling?

o a) It is executed last
o b) It may starve other processes

o c) It must have the smallest burst time

o d) It is executed first regardless of its arrival time


Answer: b) It may starve other processes

35. What happens in the Round Robin scheduling algorithm when all
processes are ready at the same time?

o a) They are all executed in a sequence based on priority

o b) They are executed in a rotating order with a fixed time slice

o c) They are executed according to the shortest burst time

o d) They are executed based on arrival time


Answer: b) They are executed in a rotating order with a fixed time
slice

36. How does the time quantum affect the performance of Round Robin
scheduling?

o a) Smaller time quantum leads to better performance

o b) Larger time quantum leads to better performance

o c) Time quantum does not affect performance

o d) It affects response time but not turnaround time


Answer: b) Larger time quantum leads to better performance

37. What is meant by "starvation" in CPU scheduling?

o a) A process is not allowed to execute because higher-priority


processes keep preempting it

o b) A process gets executed repeatedly

o c) A process runs indefinitely


o d) A process completes before its expected burst time
Answer: a) A process is not allowed to execute because higher-
priority processes keep preempting it

38. What is the primary factor affecting the performance of CPU scheduling
algorithms?

o a) Number of processes
o b) Process burst time

o c) Time quantum

o d) Arrival time
Answer: b) Process burst time

39. Which of the following scheduling algorithms is ideal for batch


systems?

o a) Round Robin

o b) SJF

o c) Priority Scheduling

o d) FCFS
Answer: b) SJF

40. How does the Average Waiting Time (AWT) relate to system performance
in CPU scheduling?

o a) The lower the AWT, the better the performance

o b) A higher AWT always leads to better performance

o c) AWT does not affect performance

o d) AWT is only affected by burst time


Answer: a) The lower the AWT, the better the performance

41. What is the effect of the time slice or quantum on Round Robin
scheduling?

o a) A larger time slice reduces context switching

o b) A smaller time slice increases CPU utilization

o c) A smaller time slice increases context switching


o d) The time slice has no effect on Round Robin performance
Answer: c) A smaller time slice increases context switching

42. Which of the following is true for the "convoy effect" in FCFS
scheduling?

o a) Short processes experience long waiting times due to long


processes

o b) Long processes experience long waiting times due to short


processes
o c) All processes experience the same waiting time
o d) Short processes are always executed first
Answer: a) Short processes experience long waiting times due to
long processes

43. What is the relationship between process burst time and waiting time in
SJF?

o a) Short burst times lead to high waiting times

o b) Long burst times lead to high waiting times

o c) Burst time does not affect waiting time


o d) Burst time and waiting time are inversely proportional
Answer: b) Long burst times lead to high waiting times

44. In CPU scheduling, what does "turnaround time" include?

o a) Waiting time only

o b) Burst time only

o c) Waiting time and execution time

o d) Waiting time, burst time, and I/O time


Answer: c) Waiting time and execution time

45. What does the term "context switching" refer to in CPU scheduling?

o a) Switching between processes in the CPU

o b) Switching between threads in a process

o c) Switching between different priorities


o d) Switching between scheduling algorithms
Answer: a) Switching between processes in the CPU

46. What is the effect of the "convoy effect" in CPU scheduling?


o a) It increases the system's throughput

o b) It causes long waiting times for short processes

o c) It causes all processes to be executed simultaneously

o d) It reduces the turnaround time of all processes


Answer: b) It causes long waiting times for short processes

47. In which scheduling algorithm does the CPU allocate time slices to
processes in a cyclic order?

o a) Round Robin
o b) Priority Scheduling
o c) SJF

o d) FCFS
Answer: a) Round Robin
48. What is the key characteristic of the FCFS algorithm?

o a) It uses priorities to schedule processes

o b) It runs processes in a first-come, first-served order

o c) It gives the CPU to the process with the shortest burst time

o d) It allows preemption based on process priority


Answer: b) It runs processes in a first-come, first-served order

49. Which algorithm is most likely to produce the shortest average waiting
time?

o a) FCFS

o b) Round Robin

o c) Priority Scheduling

o d) SJF
Answer: d) SJF

50. What is the worst-case scenario for the FCFS scheduling algorithm?

o a) High throughput
o b) Low throughput

o c) Long waiting time for short processes

o d) Short processes finish before long processes


Answer: c) Long waiting time for short processes

You might also like