---
title: "Scheduling algorithms in interactive systems"
subject: "Operating System"
chapter: 2
key: "semester_6/operating_system:interactive-scheduling-algorithms"
source: https://www.bctengineer.com/q/semester_6/operating_system/interactive-scheduling-algorithms
site: BCT Engineering
---

# Scheduling algorithms in interactive systems

Operating System · Chapter 2: Process Management

- Asked in: 2069 Bhadra, 8 marks
- Video: [CPU scheduling algorithms in  interactive systems | Round Robin RR| Multiple  feedback queue](https://www.youtube.com/watch?v=fVi0nfamt3Y) — Noor Tube
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/operating_system/interactive-scheduling-algorithms
- Whole chapter: https://www.bctengineer.com/md/semester_6/operating_system/chapter-2

## Question

Explain scheduling algorithms in interactive system.

## Short answer

Interactive scheduling uses preemptive algorithms for short response: Round Robin with time quantum; Priority scheduling with aging to prevent starvation; Multilevel feedback queues give short quantums to interactive jobs; Shortest Process Next estimates next burst; Lottery and Fair-share share CPU proportionally.

## Answer

In an interactive system (time-sharing, servers, PCs) the aim is a quick response to users; scheduling must be preemptive so that no process can hog the CPU. The main algorithms are:

#### 1. Round Robin (RR)
Each process gets a small time slice (quantum). When it expires, the process is preempted and put at the tail of the ready queue. It is simple and fair. A quantum that is too small wastes time in context switches; one that is too large behaves like FCFS (a typical value is 20-50 ms). Average waiting time is often long.

#### 2. Priority scheduling
Each process has a priority and the highest-priority ready process runs. It may be preemptive. Priorities may be static or dynamic. A problem is **starvation** of low-priority processes, solved by **aging** (gradually raising the priority of waiting processes).

#### 3. Multiple (multilevel feedback) queues
Priority classes use several ready queues. Queue 1 has the highest priority and a small quantum; a process that uses up its quantum moves to a lower queue with a bigger quantum. CPU-bound jobs sink, while I/O-bound and interactive jobs stay on top. It is flexible but complex to tune.

#### 4. Shortest Process Next / Shortest Remaining Time
The process with the shortest expected next CPU burst is chosen. The burst is estimated by aging: τₙ₊₁ = a·tₙ + (1 − a)·τₙ, where tₙ is the most recent measured burst and τₙ is the previous estimate (0 ≤ a ≤ 1). It minimises average waiting time but may starve long jobs.

#### 5. Guaranteed scheduling
The system promises each of n users 1/n of the CPU. It computes the ratio (actual CPU time used)/(entitled time) and runs the process with the lowest ratio.

#### 6. Lottery scheduling
Each process holds lottery tickets for the CPU; at each scheduling decision a random ticket is drawn and its owner runs. More tickets means a larger share. It is simple, responsive and fair, and cooperating processes can exchange tickets.

#### 7. Fair-share scheduling
The CPU is divided among users, not processes, so a user with many processes does not get more CPU time than a user with one.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the trade-off in choosing the round-robin quantum?
   A. Too small wastes time in context switches; too large behaves like FCFS
   B. Too small behaves like FCFS; too large wastes time in context switches
   C. Quantum has no effect on performance
   D. A larger quantum always lowers average waiting time
   Answer: A. A tiny quantum causes many context switches, while a huge quantum lets each process finish its burst, so RR degenerates to FCFS. (Key point: Round robin quantum)

2. What problem can priority scheduling cause and how is it solved?
   A. Deadlock; solved by aging
   B. Starvation of low-priority processes; solved by aging
   C. Starvation of high-priority processes; solved by lottery
   D. Context-switch overhead; solved by a larger quantum
   Answer: B. Low-priority processes may never run; aging gradually raises the priority of waiting processes. (Key point: Starvation and aging)

3. In multiple (feedback) queues, what happens to a process that uses up its whole quantum?
   A. It moves to a lower-priority queue with a bigger quantum
   B. It moves to a higher-priority queue with a smaller quantum
   C. It is terminated
   D. It stays in the same queue forever
   Answer: A. CPU-bound jobs sink to lower queues with larger quanta while I/O-bound and interactive jobs stay on top. (Key point: Multilevel feedback queues)

4. How does lottery scheduling give a process a larger CPU share?
   A. By giving it a shorter burst time
   B. By giving it more lottery tickets
   C. By running it first in each round
   D. By lowering its ratio of used to entitled time
   Answer: B. A random ticket is drawn at each decision, so more tickets means a higher chance and a higher share; the ratio rule belongs to guaranteed scheduling. (Key point: Lottery and guaranteed scheduling)

## Related in Operating System

- [Scheduling algorithms with numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Ascheduling-algorithms-numerical) — Operating System, chapter 2
- [Disk scheduling algorithms with numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-scheduling-algorithms-numerical) — Operating System, chapter 6
- [Batch vs interactive OS suitability](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Abatch-interactive-os-applications) — Operating System, chapter 1
- [Disk scheduling with 100 cylinders](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-100-cyl-fcfs-sstf-look-cscan-scan) — Operating System, chapter 6, asked 2×
- [Real-time scheduling; two-processor numerical](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Arealtime-two-processor-fcfs-sjf-priority-rr) — Operating System, chapter 2
- [Disk scheduling, 1000 cylinders, head at 345](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Adisk-1000-cyl-fifo-sstf-scan) — Operating System, chapter 6

## Related in other subjects

- [Preemptive priority scheduling (4, 10, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-10-5-p4) — Embedded System, chapter 6, asked 2×
- [Priority and SJF scheduling with P4 and P5](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-and-sjf-5-process) — Embedded System, chapter 6, asked 2×
- [Round robin scheduling (5, 8, 7 ms, q=2)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-rr-5-8-7-q2) — Embedded System, chapter 6
- [LTI system and closed loop in modern systems](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Alti-define-cl-pronounced) — Control Systems, chapter 1
