0

I saw this question online preparing for a job interview:

Given a Non-Preemptive kernel which type of process will get effected more in terms of performance and why?

  1. I\O bound

  2. CPU bound


I know that:

A CPU-bound process gets long quanta but with low priority Whereas an I/O-bound process gets short quanta with high priority.

At first I though I\O bound will get effected more since it Must wait for readings from disk to finish (and not just to ask the OS to wake it up when something is ready) But I think this is wrong since even in Non-Preemptive kernel a process can decide by itself to finish its job and let another work.

I am looking for detailed answer to deeply understand what I am missing here.

1
  • I/O bound processes are given scheduling priority in the hopes that they'll quickly produce more I/O, and block. This keeps the slow (slower than the CPU) I/O devices busy. This has been the case, in my experience, in all schedulers, since multitasking was invented. I started in 1967.
    – waltinator
    Jun 4, 2021 at 2:02

1 Answer 1

0

Not true that "A CPU-bound process gets long quanta but with low priority Whereas an I/O-bound process gets short quanta with high priority."

It would be ideal if this were the case - but its often the case that each process gets pretty much the same timeslice. An I/O bound process would relinquish the CPU fairly quickly.

Arranging for different priorities dynamically or otherwise would be very hard to do and since the kernel can't pre-empt, its not clear how this prioritization would be implemented.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .