π Solaris Scheduling (76 MCQs)
π From Operating System β’ 6. CPU Scheduling β’ 76 questions available
What is Solaris Scheduling?
Definition:
Solaris employs a multilevel feedback queue with configurable classes (TS, IA, FX, RT), where time-sharing (TS) threads adjust priority based on recent CPU usage and sleep time via decay function .
Example:
An interactive shell thread sleeping frequently retains high TS priority, while a CPU-bound compiler thread gradually demotes to lower priority unless boosted by admin-set limits.
Reason:
Solaris's class-based architecture supports diverse workload coexistence with fine-grained administrative control, enabling enterprise environments to mix real-time, interactive, and batch processing predictably.
π All Solaris Scheduling MCQs
Q1. How many scheduling classes does Solaris use for thread scheduling?
π Explanation: Solaris uses six scheduling classes: Time Sharing (TS), Interactive (IA), Real Time (RT), System (SYS), Fair Share (FSS), and Fixed Priority (FP). Each class has different priorities and scheduling algorithms.
Q2. What is the default scheduling class for a process in Solaris?
π Explanation: The default scheduling class for a process in Solaris is Time Sharing (TS). This class uses a multilevel feedback queue to dynamically alter priorities and assign time slices of different lengths.
Q3. Which Solaris scheduling class uses the same scheduling policy as the time-sharing class but gives windowing applications higher priority?
π Explanation: The Interactive (IA) class uses the same scheduling policy as the time-sharing class but gives windowing applicationsβsuch as those created by KDE or GNOMEβa higher priority for better performance.
Q4. Which Solaris scheduling class is reserved for kernel threads such as the scheduler and paging daemon?
π Explanation: The System (SYS) class is reserved for kernel use, including kernel threads like the scheduler and paging daemon. Once the priority of a system thread is established, it does not change.
Q5. Which Solaris scheduling class uses CPU shares instead of priorities for making scheduling decisions?
π Explanation: The Fair Share (FSS) scheduling class uses CPU shares instead of priorities to make scheduling decisions. CPU shares indicate entitlement to available CPU resources and are allocated to a set of processes known as a project.
Q6. Which Solaris scheduling class has the same priority range as the time-sharing class but does not dynamically adjust priorities?
π Explanation: The Fixed Priority (FP) class, introduced with Solaris 9, has the same priority range as the time-sharing class. However, priorities in this class are not dynamically adjusted, unlike the time-sharing class where priorities change based on behavior.
Q7. What type of scheduling policy does the time-sharing class in Solaris use?
π Explanation: The time-sharing class in Solaris uses a multilevel feedback queue scheduling policy. This policy dynamically alters priorities and assigns time slices of different lengths based on thread behavior and priority levels.
Q8. What is the relationship between priority and time quantum in the Solaris time-sharing class?
π Explanation: In the Solaris time-sharing class, there is an inverse relationship between priorities and time slices. The higher the priority, the smaller the time slice; and the lower the priority, the larger the time slice.
Q9. How many priority levels do the time-sharing and interactive classes in Solaris include?
π Explanation: The time-sharing and interactive scheduling classes in Solaris include 60 priority levels. The dispatch table for these classes covers priorities from 0 to 59, with higher numbers indicating higher priority.
Q10. What is the time quantum for priority 0 in the Solaris time-sharing dispatch table?
π Explanation: In the Solaris dispatch table, priority 0 (the lowest priority) has a time quantum of 200 milliseconds. This reflects the inverse relationship between priority and time quantum, where lower priorities receive larger time slices.
Q11. What is the time quantum for priority 59 in the Solaris time-sharing dispatch table?
π Explanation: In the Solaris dispatch table, priority 59 (the highest priority in the time-sharing class) has a time quantum of 20 milliseconds. This is the smallest time quantum, reflecting the inverse relationship between priority and time quantum.
Q12. What happens to a thread's priority in Solaris when it uses its entire time quantum without blocking?
π Explanation: When a thread uses its entire time quantum without blocking (considered CPU-intensive), its priority is lowered. This is reflected in the 'time quantum expired' column of the dispatch table, which shows the new priority after using the full quantum.
Q13. What happens to a thread's priority in Solaris when it returns from sleeping (e.g., after waiting for I/O)?
π Explanation: When a thread returns from sleeping (such as after waiting for I/O), its priority is boosted. The dispatch table shows that returning threads have their priorities boosted to between 50 and 59, supporting good response time for interactive processes.
Q14. Which Solaris scheduling class has the highest priority?
π Explanation: Threads in the Real Time (RT) class are given the highest priority. A real-time process will run before a process in any other class, allowing it to have a guaranteed response within a bounded period of time.
Q15. How many interrupt threads does the Solaris kernel maintain for servicing interrupts?
π Explanation: The Solaris kernel maintains 10 threads for servicing interrupts. These threads do not belong to any scheduling class and execute at the highest priority (160β169), ensuring immediate response to hardware interrupts.
Q16. What is the priority range for interrupt threads in Solaris?
π Explanation: Interrupt threads in Solaris execute at the highest priority, ranging from 160 to 169. These threads do not belong to any scheduling class and have the highest priority in the system to ensure timely interrupt handling.
Q17. What scheduling algorithm does Solaris use when multiple threads have the same priority?
π Explanation: When there are multiple threads with the same priority, the Solaris scheduler uses a round-robin queue. This ensures fairness among threads at the same priority level by giving each one a chance to run.
Q18. What is the priority range for the time-sharing and interactive classes in Solaris?
π Explanation: The time-sharing and interactive classes in Solaris include 60 priority levels, ranging from 0 to 59. Higher numbers indicate higher priority within these classes, with priority 59 being the highest in these classes.
Q19. What is the global priority range for all Solaris scheduling classes combined?
π Explanation: The global priority range in Solaris spans from 0 to 169. This includes all scheduling classes and interrupt threads. The scheduler converts class-specific priorities into global priorities and selects the thread with the highest global priority to run.
Q20. What happens to a thread selected by the Solaris scheduler?
π Explanation: A selected thread runs on the CPU until it blocks (e.g., for I/O), uses its time slice, or is preempted by a higher-priority thread. This ensures that threads don't monopolize the CPU while still allowing preemption for higher-priority tasks.
Q21. Which two scheduling classes were introduced with Solaris 9?
π Explanation: The Fair Share (FSS) and Fixed Priority (FP) scheduling classes were introduced with Solaris 9. These classes provided additional scheduling options beyond the existing TS, IA, RT, and SYS classes.
Q22. What is a 'project' in the context of Solaris fair-share scheduling?
π Explanation: In the fair-share scheduling class, CPU shares are allocated to a set of processes known as a project. This allows CPU resources to be divided among projects, ensuring that each project receives its entitled share of CPU time.
Q23. What is the priority of a thread that has just returned from sleeping in Solaris?
π Explanation: When a thread returns from sleeping, its priority is boosted to between 50 and 59, according to the dispatch table. This high priority boost ensures that I/O-bound and interactive threads get quick CPU access when the I/O they were waiting for becomes available.
Q24. What is the priority of a CPU-intensive thread that has used its entire time quantum without blocking?
π Explanation: A CPU-intensive thread that uses its entire time quantum without blocking has its priority lowered. This prevents compute-bound threads from monopolizing the CPU and allows other threads to get CPU time.
Q25. What is the lowest priority in the Solaris time-sharing dispatch table?
π Explanation: The lowest priority in the Solaris time-sharing dispatch table is 0. This priority has the largest time quantum (200 milliseconds) and is used for the lowest-priority threads in the time-sharing class.
Q26. What is the highest priority in the Solaris time-sharing dispatch table?
π Explanation: The highest priority in the Solaris time-sharing dispatch table is 59. This priority has the smallest time quantum (20 milliseconds) and is used for the highest-priority threads in the time-sharing class.
Q27. What is the priority of a thread that returns from sleeping in Solaris?
π Explanation: According to the dispatch table, a thread returning from sleep (such as from waiting for I/O) has its priority boosted to between 50 and 59. This high priority ensures that interactive and I/O-bound threads receive excellent response times.
Q28. What is the purpose of the dynamic priority adjustment in the time-sharing class?
π Explanation: The dynamic priority adjustment in the time-sharing class provides good response time for interactive processes (which typically have higher priority) and good throughput for CPU-bound processes (which typically have lower priority). This balances responsiveness with overall system efficiency.
Q29. Which Solaris scheduling class gives windowing applications a higher priority for better performance?
π Explanation: The Interactive (IA) class gives windowing applicationsβsuch as those created by the KDE or GNOME window managersβa higher priority for better performance. This ensures that the user interface remains responsive.
Q30. What is the global priority of interrupt threads in Solaris?
π Explanation: Interrupt threads in Solaris execute at priorities 160-169, which are the highest in the system. This ensures that hardware interrupts are handled immediately, without being delayed by other threads.
Q31. How does the Solaris scheduler select which thread to run next?
π Explanation: The Solaris scheduler converts class-specific priorities into global priorities and selects the thread with the highest global priority to run. This ensures that the most important thread always gets CPU time.
Q32. What is the relationship between time quantum and priority in the Solaris time-sharing class?
π Explanation: In the Solaris time-sharing class, there is an inverse relationship between priority and time quantum. Higher-priority threads get smaller time slices, while lower-priority threads get larger time slices, as shown in the dispatch table.
Q33. Which Solaris scheduling class is not dynamically adjusted?
π Explanation: In the System (SYS) class, once the priority of a system thread is established, it does not change. This is different from the time-sharing and interactive classes, where priorities are dynamically adjusted.
Q34. What is the purpose of the 'time quantum expired' field in the Solaris dispatch table?
π Explanation: The 'time quantum expired' field in the Solaris dispatch table shows the new priority of a thread that has used its entire time quantum without blocking. These threads are considered CPU-intensive and have their priorities lowered.
Q35. What is the purpose of the 'return from sleep' field in the Solaris dispatch table?
π Explanation: The 'return from sleep' field in the Solaris dispatch table shows the priority of a thread that is returning from sleeping (such as after waiting for I/O). These threads have their priorities boosted to between 50 and 59.
Q36. What is the priority range for Solaris interrupt threads?
π Explanation: Solaris interrupt threads execute at the highest priority range of 160-169. These threads do not belong to any scheduling class and are dedicated to servicing hardware interrupts.
Q37. What is the main benefit of the fair-share scheduling class in Solaris?
π Explanation: The fair-share scheduling class uses CPU shares instead of priorities to make scheduling decisions. CPU shares are allocated to a set of processes (known as a project), allowing CPU resources to be divided among projects according to their entitlement.
Q38. Which Solaris scheduling class is reserved exclusively for kernel use?
π Explanation: The System (SYS) class is reserved exclusively for kernel use. Kernel threads such as the scheduler and paging daemon run in this class. User processes running in kernel mode are not in the system class.
Q39. What is the effect of boosting a thread's priority when it returns from sleep?
π Explanation: Boosting a thread's priority when it returns from sleep gives the thread better response time. This is particularly important for interactive and I/O-bound threads, which need to respond quickly when the I/O they were waiting for becomes available.
Q40. What is the priority range for the fair-share class in Solaris?
π Explanation: The fair-share class (FSS) has the same priority range as the time-sharing class (0-59). However, unlike time-sharing, fair-share uses CPU shares instead of priorities to make scheduling decisions.
Q41. What is the priority range for the fixed-priority class in Solaris?
π Explanation: The fixed-priority class (FP) has the same priority range as the time-sharing class (0-59). However, priorities in the fixed-priority class are not dynamically adjusted, unlike in the time-sharing class.
Q42. What is the priority range for the real-time class in Solaris?
π Explanation: The real-time class (RT) in Solaris has priorities in the range of 60-99. These priorities are higher than the time-sharing and interactive classes (0-59), ensuring that real-time threads run before other threads.
Q43. How does Solaris handle threads with the same priority?
π Explanation: When multiple threads have the same priority, the Solaris scheduler uses a round-robin queue. This ensures fairness by giving each thread at the same priority level a chance to run in a cyclic order.
Q44. What is the main purpose of the Solaris scheduling classes?
π Explanation: Solaris uses scheduling classes to provide different scheduling policies for different types of threads. Each class has its own priorities and scheduling algorithms, allowing the system to accommodate threads with different requirements (real-time, interactive, background, etc.).
Q45. What happens to a thread that blocks (e.g., for I/O) in Solaris?
π Explanation: When a thread blocks (for example, waiting for I/O), it is placed in a waiting state. When the I/O becomes available, the thread returns from sleep and its priority is boosted, giving it high priority to continue execution.
Q46. What is the priority range for the system class in Solaris?
π Explanation: The system class (SYS) in Solaris has priorities in the range of 100-139. These priorities are higher than the real-time class (60-99), but lower than interrupt threads (160-169). System threads include the scheduler and paging daemon.
Q47. What is the main difference between the time-sharing and fixed-priority classes in Solaris?
π Explanation: The main difference is that the time-sharing class dynamically adjusts priorities based on thread behavior, while the fixed-priority class does not. This makes fixed-priority suitable for threads that need predictable priorities without dynamic adjustment.
Q48. What is the main purpose of the 'return from sleep' priority boost in Solaris?
π Explanation: The 'return from sleep' priority boost gives high priority to threads that have been waiting for I/O. This improves response times for interactive and I/O-bound threads by ensuring they get CPU time quickly when the I/O they need becomes available.
Q49. What is the priority of a thread that returns from sleep in the Solaris dispatch table?
π Explanation: According to the Solaris dispatch table, a thread returning from sleep is boosted to a priority between 50 and 59. This high priority ensures that interactive and I/O-bound threads get immediate CPU access when they wake up.
Q50. What is the priority of a CPU-intensive thread after using its full time quantum in Solaris?
π Explanation: A CPU-intensive thread that uses its full time quantum without blocking has its priority lowered. This prevents such threads from monopolizing the CPU and ensures fair CPU allocation among threads.
Q51. What is the maximum priority in the Solaris time-sharing class?
π Explanation: The maximum priority in the Solaris time-sharing class is 59. This priority has the smallest time quantum (20 milliseconds) and is used for the highest-priority threads in the time-sharing class.
Q52. What is the minimum priority in the Solaris time-sharing class?
π Explanation: The minimum priority in the Solaris time-sharing class is 0. This priority has the largest time quantum (200 milliseconds) and is used for the lowest-priority threads in the time-sharing class.
Q53. What is the main characteristic of the system class in Solaris?
π Explanation: The system class (SYS) is characterized by fixed priorities. Once the priority of a system thread is established, it does not change. This class is reserved for kernel threads such as the scheduler and paging daemon.
Q54. What is the priority range for interrupt threads in Solaris?
π Explanation: Interrupt threads in Solaris have the highest priority in the system, ranging from 160 to 169. These threads do not belong to any scheduling class and are used exclusively for servicing hardware interrupts.
Q55. What is the relationship between a thread's behavior and its priority in the time-sharing class?
π Explanation: In the time-sharing class, CPU-bound threads (which use their full time quantum) have their priorities lowered, while I/O-bound threads (which return from sleep) have their priorities boosted. This dynamic adjustment provides good response for interactive threads and throughput for CPU-bound threads.
Q56. What is the main benefit of the dynamic priority adjustment in the time-sharing class?
π Explanation: The dynamic priority adjustment provides good response time for interactive processes (which typically have higher priority) and good throughput for CPU-bound processes (which typically have lower priority). This balances responsiveness with overall system efficiency.
Q57. Which Solaris scheduling class is used for kernel threads like the scheduler and paging daemon?
π Explanation: The System (SYS) class is used for kernel threads such as the scheduler and paging daemon. This class is reserved for kernel use, and user processes running in kernel mode are not in the system class.
Q58. What is the purpose of the fair-share scheduling class?
π Explanation: The fair-share scheduling class uses CPU shares instead of priorities to make scheduling decisions. CPU shares indicate entitlement to available CPU resources and are allocated to a set of processes known as a project, allowing fair allocation of CPU time among projects.
Q59. What is the purpose of the fixed-priority class?
π Explanation: The fixed-priority class provides threads with fixed priorities that do not change. This is useful for threads that need predictable priorities without the dynamic adjustment that occurs in the time-sharing class.
Q60. What is the effect of lowering a CPU-bound thread's priority?
π Explanation: Lowering a CPU-bound thread's priority reduces the amount of CPU time it receives relative to higher-priority threads. This prevents CPU-bound threads from monopolizing the CPU and allows interactive and I/O-bound threads to get CPU time.
Q61. What is the effect of boosting an I/O-bound thread's priority?
π Explanation: Boosting an I/O-bound thread's priority increases the amount of CPU time it receives, ensuring that it gets CPU access quickly when the I/O it needs becomes available. This improves system responsiveness.
Q62. What is the priority range for interrupt threads in Solaris?
π Explanation: Interrupt threads in Solaris execute at the highest priorities in the system, ranging from 160 to 169. This ensures that hardware interrupts are handled with the highest priority, without being delayed by other threads.
Q63. What is the relationship between the Solaris scheduling classes and global priorities?
π Explanation: The Solaris scheduler converts class-specific priorities into global priorities. The scheduler then selects the thread with the highest global priority to run. This provides a unified scheduling decision across all classes.
Q64. What is the priority range for the time-sharing class in Solaris?
π Explanation: The time-sharing class in Solaris has priorities in the range of 0-59. This is the widest priority range among the scheduling classes, providing 60 different priority levels for time-sharing threads.
Q65. What is the priority range for the interactive class in Solaris?
π Explanation: The interactive class in Solaris has the same priority range as the time-sharing class (0-59). However, threads in the interactive class receive higher priority for windowing applications, providing better performance for GUI applications.
Q66. What is the priority range for the real-time class in Solaris?
π Explanation: The real-time class in Solaris has priorities in the range of 60-99. These priorities are higher than the time-sharing and interactive classes, ensuring that real-time threads get CPU access before other threads.
Q67. What is the priority range for the system class in Solaris?
π Explanation: The system class in Solaris has priorities in the range of 100-139. These priorities are higher than the real-time class, ensuring that kernel threads get CPU access before real-time threads.
Q68. What is the priority range for interrupt threads in Solaris?
π Explanation: Interrupt threads in Solaris execute at the highest priorities in the system, ranging from 160 to 169. This ensures immediate response to hardware interrupts.
Q69. What is the main purpose of the Solaris dispatcher?
π Explanation: The Solaris dispatcher is responsible for selecting the next thread to run. It converts class-specific priorities into global priorities and selects the thread with the highest global priority, managing the execution of threads on the CPU.
Q70. What is the main purpose of the 'return from sleep' priority boost in Solaris?
π Explanation: The 'return from sleep' priority boost gives high priority to threads that have been waiting for I/O. This improves response times for interactive and I/O-bound threads by ensuring they get CPU time quickly when the I/O they need becomes available.
Q71. What is the main characteristic of the fair-share scheduling class?
π Explanation: The fair-share scheduling class uses CPU shares instead of priorities to make scheduling decisions. CPU shares indicate entitlement to available CPU resources and are allocated to projects, allowing fair allocation of CPU time.
Q72. What is the main characteristic of the fixed-priority scheduling class?
π Explanation: The fixed-priority scheduling class has fixed priorities that do not change. This is different from the time-sharing class, where priorities are dynamically adjusted based on thread behavior.
Q73. What is the global priority range for all Solaris scheduling classes?
π Explanation: The global priority range in Solaris spans from 0 to 169. This includes all scheduling classes (0-59 for TS/IA, 60-99 for RT, 100-139 for SYS) and interrupt threads (160-169), with higher numbers indicating higher priority.
Q74. What is the purpose of the multilevel feedback queue in the time-sharing class?
π Explanation: The multilevel feedback queue in the time-sharing class dynamically alters priorities and assigns time slices of different lengths. Threads that are CPU-intensive have their priorities lowered, while I/O-bound threads have their priorities boosted, providing balanced scheduling.
Q75. What is the main benefit of the interactive class in Solaris?
π Explanation: The interactive class gives higher priority to windowing applications, such as those created by KDE or GNOME. This ensures that GUI applications remain responsive, improving the user experience.
Q76. What is the main purpose of the real-time class in Solaris?
π Explanation: The real-time class provides guaranteed response within a bounded period. Real-time threads have the highest priority among scheduling classes, ensuring they run before any other threads and meet their timing requirements.