

But if any non-preemptive algorithm is being used, this process won't get execution until the currently executing process is finished. Now, if any preemptive algorithm is being used, there are chances that this process will get execution (depending on the criteria). Once a process in waiting finishes its I/O, it now depends on the CPU Scheduler. (It has nothing to do with CPU scheduling as CPU scheduling is handled by Short Term Scheduler and waiting state is handle by Medium Term Scheduler). Thus, it is incorrect to think that SJF favors I/O bound processes.īut, as I/O bound processes spend more time doing I/O than CPU, they will be sent to the waiting state more often. But if we consider SJF or SRTF algorithms, they will definitely prefer process A over B inspite of A being I/O bound and B being CPU bound because A has a lower CPU burst time than that of B. And a process B having a CPU burst time of 10ms and I/O burst time of 5 ms is clearly a CPU-bound process.

Similarly, a process having a very large CPU burst time can still be I/O bound.įor example, consider a process A having CPU burst time of 1ms and I/O burst time of 5 ms. Therefore, a process having a small CPU burst time can also be a CPU-bound process. A CPU-bound process is one that spends most of its execution time at CPU and an I/O-bound process is one that spends most of its execution time at an I/O device. Please verify above answers and explanations.Ĭorrect me if I'm wrong somewhere and provide answers with explanation for the omitted ones.įirst of all, let me clarify that the CPU Burst Time of a process has no relation with being a CPU or I/O bound process. Priority Scheduling? Not able to decide categorically.Multilevel Queue favours I/O bound processes.Įxplanation: Similar to multilevel feedback.A process running in a lower priority queue is interrupted by a process arriving in a higher priority queue. A process in lower priority queue can only execute when higher priority queues are empty. While processes that have large CPU bursts(CPU bound) will slowly have decrement in priority. Multilevel feedback Queue favours I/O bound processes.Įxplanation: Short CPU burst processes(I/O bound processes) are given higher priority.Round Robin? Not able to decide categoricallyĮxplanation: Large CPU burst processes(CPU bound) are given higher priority.Which algorithm favours which type of process?Įxplanation: Short CPU burst processes(I/O bound processes) are given higher priority. Some scheduling algorithms favour CPU bound processes while others favour I/O bound processes.
