Question 1
EasyWhich of these CPU scheduling algorithms can cause starvation?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Operating Systems
Which of these CPU scheduling algorithms can cause starvation?
First Come First Serve
Round Robin
Shortest Job First
None of these
Answer: C
In SJF, a long process can wait forever if shorter processes keep arriving. FCFS serves in arrival order and Round Robin gives every process a time slice, so neither starves a process.
How does First-Come, First-Served (FCFS) scheduling choose the next process?
By highest priority, with preemption
By shortest burst time
Randomly
In order of arrival, without preemption
Answer: D
FCFS runs processes in arrival order, each to completion (non-preemptive).
What does Round Robin scheduling use to share the CPU?
A fixed time quantum for each process in turn
Process priorities only
The shortest job first
The order of process IDs
Answer: A
Each ready process runs for at most one time quantum before the next one gets the CPU.
How is turnaround time calculated?
Completion time − burst time
Burst time − waiting time
Waiting time + arrival time
Completion time − arrival time
Answer: D
Turnaround time is the total time from arrival to completion.
How is waiting time calculated?
Completion time + burst time
Burst time − arrival time
Turnaround time − burst time
Arrival time − completion time
Answer: C
Waiting time is the time spent in the ready queue: turnaround minus the time actually running.
Which algorithm gives the minimum average waiting time for a given set of processes?
First-Come, First-Served
Round Robin
Priority with aging
Shortest Job First
Answer: D
Running shorter jobs first lowers the waiting of every later job, so SJF is provably optimal for average waiting time.
Which of these scheduling algorithms is preemptive?
Round Robin
FCFS
Non-preemptive priority
Non-preemptive SJF
Answer: A
Round Robin takes the CPU away when the time quantum ends.
What technique prevents starvation in priority scheduling?
Thrashing
Aging
Spooling
Paging
Answer: B
Aging gradually raises the priority of processes that have waited a long time, so they eventually run.
Which of the following CPU scheduling algorithms is inherently non-preemptive and can suffer from the 'Convoy Effect'?
Round Robin (RR)
Shortest Remaining Time First (SRTF)
First-Come, First-Served (FCFS)
Priority Preemptive Scheduling
Answer: C
FCFS (First-Come, First-Served) is a non-preemptive scheduling algorithm.
When a CPU-intensive process with a large burst time arrives first, all shorter I/O-bound processes are forced to wait behind it in the ready queue, causing the Convoy Effect.
What is the job of the short-term (CPU) scheduler?
To install new programs
To choose the screen resolution
To decide which files to delete
To choose which ready process gets the CPU next
Answer: D
The CPU scheduler picks one process from the ready queue each time the CPU becomes free.