Q: 1 CPU scheduling is the basis of –
Multiprogramming Operating System
Large Memory Sized Systems
Multiprocessor Systems
None of the mentioned
[ Option A ]
CPU Scheduling is the foundation of a Multiprogramming Operating System. In multiprogramming, several processes are kept in memory at the same time, and CPU scheduling decides which process will be given the CPU when it becomes available. This ensures efficient CPU utilization by keeping the processor busy as much as possible. CPU scheduling ensures that the CPU is never idle when there are processes ready to execute, improving throughput.
Q: 2 Which of the following, best represents an event to invoke medium-term scheduler?
Clock interrupts
I/O interrupts
New process creation
Need of swapping
[ Option D ]
In an Operating System, the CPU scheduling process involves three levels of schedulers:
Q: 3 What is the “Convoy effect” in CPU scheduling?
A situation where multiple processes arrive at the CPU at the same time.
A condition where all I/O-bound processes are executed before CPU-bound processes.
A scenario in which one long CPU-bound process delays many shorter I/O-bound processes, reducing overall system utilization.
A technique used to prioritize processes with the shortest burst time.
[ Option C ]
The Convoy Effect is a performance problem that occurs in CPU scheduling, especially in algorithms like First-Come, First-Served (FCFS). In this situation, a long CPU-Bound process gets the CPU first. Meanwhile, several I/O-Bound processes have to wait in the Ready Queue.
Since the CPU is busy executing the long process, the shorter I/O-bound processes are delayed. As a result, the CPU stays idle when those I/O-bound processes later perform I/O operations, and overall system utilization drops.
| TYPE OF PROCESS | EXPLANATION |
|---|---|
| CPU-Bound | Uses the CPU heavily with few I/O operations. When it runs first, it keeps the CPU busy for a long time, delaying other processes waiting in the queue. |
| I/O-Bound | Performs frequent I/O operations with short CPU bursts. These processes must wait for the long CPU-bound process to finish, leading to poor CPU and I/O utilization. |
Q: 4 Which of the following statements are true?
I. Shortest Remaining Time First (SRTF) scheduling may cause starvation.
II. Preemptive scheduling may cause starvation.
III. Round robin is better than FCFS in terms of response time.
I only
I & III only
II and III only
I, II and III
[ Option D ]
SRTF (Shortest Remaining Time First) is a Preemptive Scheduling algorithm where the process with the shortest remaining execution time is given the CPU. A long-running process might never get to execute if there is a continuous stream of new, short-burst processes arriving in the ready queue. The long-running process would always have a longer remaining time and would be repeatedly preempted, leading to starvation.
Preemptive scheduling may cause starvation, this is a general statement that is true. Starvation is a common problem in any Preemptive Scheduling algorithm that uses a priority or time-based approach, like SRTF or a Priority-Based Scheduler where low-priority processes might never get to run if there is a constant flow of high-priority processes.
Round Robin (RR) scheduling allocates CPU time in small time slices (quantum) to each process fairly, leading to better responsiveness compared to FCFS (First-Come, First-Serve), where a process waits (even short-burst ones) until the previous one completes because its Non-Preemptive Scheduling algorithm.
Q: 5 Match the correct description :
| Column – I | Column – II |
|---|---|
| a. Throughput | i. Time from process submission to its first response being produced. |
| b. Turnaround Time | ii. Number of processes completed per unit of time. |
| c. Waiting Time | iii. Total time a process spends in the ready queue waiting for the CPU. |
| d. Response Time | iv. Total time from process submission to its completion, doing I/O, waiting in the ready queue, and executing on the CPU. |
Choose the correct option:
a – iv, b – ii, c – iii, d – i
a – ii, b – iii, c – iv, d – i
a – ii, b – iv, c – i, d – iii
a – ii, b – iv, c – iii, d – i
[ Option D ]
In an operating system, CPU scheduling determines the order in which processes are executed. To evaluate scheduling algorithms, we use certain key performance metrics, Throughput, Turnaround Time, Waiting Time, and Response Time.
| METRIC | DEFINITION | FORMULA |
|---|---|---|
| Throughput | Number of processes completed per unit of time. It shows how efficiently the system is processing tasks. | Throughput = (Number of Processes Completed) / (Total Time Taken) |
| Turnaround Time (TAT) | Total time taken from process submission to its completion. | TAT = Completion Time – Arrival Time |
| Waiting Time (WT) | Total time a process spends waiting in the ready queue before execution. | WT = Turnaround Time – Burst Time |
| Response Time (RT) | Time from process submission to the first response (first CPU allocation). | RT = First Response Time – Arrival Time |
| Turnaround Time (Average) | Average of turnaround times of all processes. | Average TAT = Σ(TAT) / Number of Processes |
| Waiting Time (Average) | Average of waiting times of all processes. | Average WT = Σ(WT) / Number of Processes |
Q: 6
Consider the five processes with given arrival and service times. What will be the average turnaround time for Shortest Process Next (SPN) scheduling algorithm?
| Process | Arrival Time | Service Time (Ts) |
|---|---|---|
| A | 0 | 3 |
| B | 2 | 6 |
| C | 4 | 4 |
| D | 6 | 5 |
| E | 8 | 2 |
7.6
7.2
7.8
8
[ Option A ]
SPN (Shortest Process Next), also known as Shortest Job First (SJF) (non-preemptive), is a CPU scheduling algorithm that selects the ready process with the shortest service (burst) time for execution next. The goal is to minimize the average waiting and turnaround times.
Turnaround Time (TAT) = Completion Time − Arrival Time.
| PROCESS | ARRIVAL | COMPLETION | TURNAROUND TIME |
|---|---|---|---|
| A | 0 | 3 | 3 – 0 = 3 |
| B | 2 | 9 | 9 – 2 = 7 |
| E | 8 | 11 | 11 – 8 = 3 |
| C | 4 | 15 | 15 – 4 = 11 |
| D | 6 | 20 | 20 – 6 = 14 |
Total Turnaround Time = 3 + 7 + 3 + 11 + 14 = 38
Average Turnaround Time = 38 / 5 = 7.6
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.