Operating System: Question Set – 07
What is the difference between batch systems and interactive systems in scheduling?
- Batch systems: Focus on throughput and CPU utilization. Processes are executed without user interaction (e.g., payroll systems).
- Interactive systems: Prioritize response time to ensure a good user experience (e.g., desktop operating systems).
What is the difference between static and dynamic priority scheduling?
- Static priority scheduling: Priority is assigned to a process at creation and doesn’t change during its lifetime.
- Dynamic priority scheduling: Priority can change over time, often to prevent starvation or adapt to system behavior.
What is the role of the ready queue in scheduling?
All processes that are prepared to run but are awaiting CPU allocation are stored in the ready queue. Using the selected scheduling algorithm, the scheduler chooses processes from this queue.
How does process scheduling handle I/O devices?
The I/O queue contains the processes that are awaiting input. An I/O scheduler controls access to I/O devices, guaranteeing efficiency and fairness, whereas the CPU scheduler handles processing.
What is the significance of fairness in scheduling?
Fairness guarantees that no process is starved or delayed indefinitely. It gives every process the chance to run and share system resources.
Why is SRTF considered an optimal scheduling algorithm?
In order to reduce average waiting time, Shortest Remaining Time First (SRTF) preempts the running process in the event that a new process with a shorter remaining burst time arrives.
What is workload balancing in multiprocessor scheduling?
In a multiprocessor system, workload balancing makes ensuring that jobs are split equally among processors, preventing idle processors and enhancing performance.
How do real-time systems handle process scheduling?
Real-time systems use specialized scheduling algorithms like:
- Rate Monotonic Scheduling (RMS): Fixed-priority algorithm based on process periodicity.
- Earliest Deadline First (EDF): Dynamic-priority algorithm that schedules tasks closest to their deadlines.
What is cooperative multitasking, and how does it differ from preemptive multitasking?
- Cooperative multitasking: Processes voluntarily yield control of the CPU, relying on good behavior.
- Preemptive multitasking: The OS forcibly interrupts a process after a time quantum or event.
What is deadline scheduling?
Deadline scheduling, which is frequently utilized in real-time systems (such as industrial automation or video streaming), guarantees that tasks are finished by the designated deadline.
What is meant by burst time in scheduling?
The amount of time a process needs to run on the CPU is known as its burst time. It is sometimes referred to as execution time or CPU time.
What is the main drawback of Priority Scheduling?
If higher-priority processes keep coming in, it can lead to starvation, in which case lower-priority activities are continuously delayed.
Why is context switching considered an overhead?
System efficiency is impacted by context switching, which takes time to save and load process states but does no beneficial work.
How is process affinity handled in multicore systems?
- Soft affinity: The OS makes a best-effort attempt to keep a process on the same core.
- Hard affinity: The OS enforces strict binding of a process to a specific core, often for performance reasons.