1. Which scheduling algorithm is generally preferred for multiprocessor systems to achieve good performance and fairness?
A) FCFS
B) Dedicated Processor Scheduling
C) Global Multiprocessor Scheduling
D) Gang Scheduling
2. What is an 'aperiodic task' in real-time scheduling?
A) A task that executes at regular, fixed intervals.
B) A task that executes only when an interrupt occurs.
C) A task that arrives sporadically and does not have a fixed period.
D) A task that executes continuously.
3. What is a 'periodic task' in real-time scheduling?
A) A task that executes only once.
B) A task that executes at irregular intervals.
C) A task that executes at regular, fixed intervals.
D) A task that executes only when an interrupt occurs.
4. In real-time systems, what is the 'schedulability analysis' used for?
A) To determine the average waiting time of tasks.
B) To ensure that all tasks will meet their deadlines under a given scheduling algorithm.
C) To measure the CPU utilization of the system.
D) To predict the number of context switches.
5. Which scheduling algorithm is known for its dynamic priority assignment based on deadlines?
A) Rate Monotonic Scheduling (RMS)
B) Shortest-Remaining-Time-First (SRTF)
C) Earliest Deadline First (EDF)
D) First-Come, First-Served (FCFS)
6. What is the primary advantage of using Earliest Deadline First (EDF) scheduling?
A) It is simple to implement and has low overhead.
B) It is optimal for periodic tasks.
C) It can theoretically schedule any set of tasks if they are schedulable.
D) It guarantees a fixed priority for each task.
7. In Rate Monotonic Scheduling (RMS), how are priorities assigned?
A) Based on the longest period (lowest frequency).
B) Based on the shortest period (highest frequency).
C) Based on the task's burst time.
D) Based on arrival time.
8. Which real-time scheduling algorithm is optimal if the system is fully preemptible and all tasks are periodic?
A) FCFS
B) Round Robin
C) Rate Monotonic Scheduling (RMS)
D) Shortest-Job-First
9. What is a 'soft real-time system'?
A) A system where missing a deadline is catastrophic.
B) A system where missing a deadline is undesirable but the system can still function.
C) A system with strict timing constraints.
D) A system that guarantees completion of all tasks within a fixed time.
10. What is a 'hard real-time system'?
A) A system where missing a deadline is undesirable but not catastrophic.
B) A system where missing a deadline is catastrophic.
C) A system with no deadlines.
D) A system where tasks can be delayed indefinitely.
11. What is a primary characteristic of real-time scheduling?
A) Maximizing CPU utilization
B) Minimizing average waiting time
C) Meeting deadlines and predictability
D) Fairness among all processes
12. What is 'asymmetric multiprocessing' (AMP) system?
A) A system where all CPUs are treated equally.
B) A system where one CPU (master) controls the system and schedules tasks for other CPUs (slaves).
C) A system with a large number of loosely coupled processors.
D) A system that uses only FCFS scheduling.
13. What is a 'symmetric multiprocessing' (SMP) system?
A) A system where one CPU is designated as master and others as slaves.
B) A system where all CPUs are treated equally and can perform any task.
C) A system with only one CPU.
D) A system where CPUs are specialized for different tasks.
14. What is 'load balancing' in the context of multiprocessor scheduling?
A) Ensuring that one processor is overloaded while others are idle.
B) Distributing processes or threads evenly across all available processors to maximize utilization.
C) Prioritizing certain processors over others.
D) Minimizing the communication between processors.
15. What is 'hard affinity' in multiprocessor scheduling?
A) A policy where threads are allowed to migrate freely between processors.
B) A strict policy that a thread must run on a specific processor.
C) A scheduling approach that aims to balance the load across all processors.
D) A method to reduce context switching.
16. What is 'soft affinity' in multiprocessor scheduling?
A) A strict requirement that a thread must run on a specific processor.
B) An attempt to keep a thread on the same processor, but not a strict requirement.
C) A scheduling policy where threads are evenly distributed across all processors.
D) A policy where processors are assigned to threads based on priority.
17. In multiprocessor scheduling, what is 'affinity'?
A) The tendency for a processor to become available.
B) The tendency for a thread to run on a particular processor.
C) The speed of communication between processors.
D) The number of threads a processor can handle.
18. What is 'hybrid thread model' scheduling?
A) A model where the kernel schedules only user-level threads.
B) A model where the kernel schedules only kernel-level threads.
C) A model that combines user-level threads with kernel-level threads, allowing for both flexibility and concurrency.
D) A model that uses FCFS for all threads.
19. What is a major disadvantage of kernel-level thread scheduling?
A) It is difficult to implement.
B) Thread switching is slower because it requires a mode switch to the kernel.
C) It does not support multiprocessor systems.
D) All threads within a process must run on the same CPU.
20. What is a major advantage of kernel-level thread scheduling?
A) Thread switching is very fast.
B) If one thread blocks, other threads of the same process can be scheduled by the kernel.
C) No kernel overhead is involved.
D) The kernel is unaware of the threads.
21. What is 'kernel-level thread scheduling'?
A) Scheduling of threads handled by a user-level library.
B) Scheduling of threads managed directly by the operating system kernel.
C) Scheduling of threads by the application program.
D) Scheduling of threads based on their memory usage.
22. What is a major disadvantage of user-level thread scheduling?
A) Kernel can schedule different threads of the same process concurrently on multiple CPUs.
B) If one thread blocks on a system call, all threads within the process block.
C) It requires kernel support for each thread.
D) It has very high context switching overhead.
23. What is a major advantage of user-level thread scheduling?
A) Kernel is aware of thread scheduling.
B) Faster thread switching as it does not involve kernel mode transition.
C) Guaranteed CPU time for each thread.
D) Increased security.
24. What is 'user-level thread scheduling'?
A) Scheduling of threads handled entirely by the kernel.
B) Scheduling of threads managed by a thread library within the user process.
C) Scheduling of threads by the hardware.
D) Scheduling of threads based on their priority in the operating system.
25. In many operating systems, what is the relationship between a process and its threads regarding scheduling?
A) The operating system schedules processes, and the threads within a process are scheduled by the process itself.
B) The operating system schedules threads directly, and threads from different processes can be interleaved.
C) The operating system schedules processes, and all threads within a process are executed sequentially.
D) The operating system schedules processes, and the threads within a process are scheduled by the user.
26. What is the primary responsibility of the operating system in thread scheduling?
A) To manage the memory for each thread
B) To allocate CPU time to threads
C) To handle I/O operations for threads
D) To manage the parent process of the threads
27. How does thread scheduling differ from process scheduling?
A) Threads share the process's resources, making scheduling less complex.
B) Processes are scheduled by the OS, while threads are scheduled by the application.
C) Thread scheduling is only relevant in real-time systems.
D) Processes have lower overhead than threads.
28. What is a 'thread' in the context of operating systems?
A) A separate process with its own memory space
B) A lightweight unit of execution within a process
C) A hardware component that performs computations
D) A mechanism for inter-process communication
29. In Multilevel Feedback Queue Scheduling, what is the purpose of allowing processes to move between queues?
A) To increase the complexity of the scheduler
B) To prevent starvation and adapt to the process's behavior
C) To ensure all processes get an equal share of CPU time
D) To reduce the number of context switches
30. What is the difference between Multilevel Queue Scheduling and Multilevel Feedback Queue Scheduling?
A) Multilevel Feedback Queue allows processes to move between queues.
B) Multilevel Queue allows processes to move between queues.
C) Multilevel Feedback Queue does not use priorities.
D) Multilevel Queue is always preemptive.
31. In Multilevel Queue Scheduling, how is scheduling done between queues?
A) Each queue has an equal priority
B) Scheduling between queues is typically done using fixed priority preemptive scheduling
C) Processes in lower-priority queues can preempt processes in higher-priority queues
D) Processes are scheduled based on their arrival time across all queues
32. Multilevel Queue Scheduling divides the ready queue into several separate queues. What is a common basis for this division?
A) Process arrival time
B) Process priority or type (e.g., foreground, background)
C) CPU burst time
D) Memory requirements
33. Which technique can be used to mitigate the starvation problem in priority scheduling?
A) Increasing the priority of all processes
B) Aging - gradually increasing the priority of processes that have been waiting for a long time
C) Reducing the time quantum
D) Implementing FCFS
34. What is a potential problem with priority scheduling?
A) It always leads to maximum throughput
B) It can cause starvation, where low-priority processes may never get to execute
C) It is the fairest scheduling algorithm
D) It minimizes response time
35. Priority scheduling assigns a priority level to each process. How is the CPU allocated?
A) To the process that arrived first
B) To the process with the highest priority
C) To the process with the shortest burst time
D) To the process that has been waiting the longest
36. Which factor significantly impacts the performance of Round Robin scheduling?
A) The number of processes
B) The size of the ready queue
C) The length of the time quantum
D) The priority of the processes
37. What happens if a process's CPU burst time is longer than the time quantum in Round Robin scheduling?
A) The process is immediately terminated
B) The process continues executing until it completes
C) The process is preempted and moved to the end of the ready queue
D) The time quantum is increased for that process
38. What is the primary characteristic of Round Robin (RR) scheduling?
A) Processes are executed in the order of their arrival
B) Processes are executed based on their priority
C) Processes are given a fixed time slice (time quantum) of CPU time
D) The process with the shortest burst time is executed first
39. In SRTF, if a new process arrives with a CPU burst length shorter than the remaining time of the currently executing process, what happens?
A) The new process is put in the ready queue
B) The currently executing process continues
C) The CPU is preempted and allocated to the new process
D) The new process is immediately terminated
40. Preemptive Shortest-Job-First is also known as:
A) FCFS
B) Priority Scheduling
C) Shortest-Remaining-Time-First (SRTF)
D) Round Robin
41. What is the main challenge in implementing SJF scheduling in a real-time system?
A) It is difficult to determine the exact burst time of a process in advance
B) It always leads to starvation of long processes
C) It requires a large amount of memory
D) It has a high context switching overhead
42. Which scheduling algorithm guarantees the minimum average waiting time?
A) FCFS
B) SJF (Shortest-Job-First)
C) Round Robin
D) Priority Scheduling
43. Shortest-Job-First (SJF) scheduling is an example of which type of scheduling?
A) Preemptive
B) Non-preemptive
C) Round Robin
D) Priority-based
44. What is a significant disadvantage of the FCFS scheduling algorithm?
A) It is complex to implement
B) It can lead to the convoy effect, where short processes get stuck behind long ones
C) It requires a lot of memory
D) It has high overhead
45. In First-Come, First-Served (FCFS) scheduling, how is the CPU allocated?
A) Based on the shortest burst time
B) In the order processes arrive in the ready queue
C) Based on priority
D) Using a time quantum
46. Which scheduling criterion aims to keep the CPU as busy as possible?
A) Waiting time
B) Response time
C) Throughput
D) CPU utilization
47. What does 'turnaround time' refer to in CPU scheduling?
A) The time a process spends waiting in the ready queue
B) The total time from submission of a process to its completion
C) The time a process spends executing on the CPU
D) The time taken for context switching
48. Which of the following is a primary goal of CPU scheduling?
A) Maximize disk I/O operations
B) Minimize CPU utilization
C) Maximize CPU utilization and throughput
D) Increase context switching overhead