0
$\begingroup$

While reading an article, I noticed the use of term 'I/O Task':

Indeed, suppose the currently running process is performing an I/O task (which, by definition, does not need the CPU to be accomplished). Then, the OS may interrupt that process and give the control to one of the other in-main-memory programs that are ready to execute (i.e. process context switching).

However, AFAIK a unit of execution (task definition) is either a thread or a process.

So what does an "I/O Task" mean?

$\endgroup$
1
$\begingroup$

Reading / writing from disk.

Reading / waiting for keyboard / mouse input.

Reading / waiting for network data.

Printing a page.

Basically, as the text says, an I/O task is anything which the CPU can't perform on its own, and has to rely on other components. Usually this involves waiting a long time, compared to the CPU speed, so it's better to switch to another task while waiting.

In this way, even if the browser is waiting for the server to respond, the other running tasks can move on (unless they also need to wait for I/O, of course).

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ So it means a thread performing I/O operations through syscalls? $\endgroup$ – Kais Jan 17 '18 at 17:59
  • 1
    $\begingroup$ @Kais Yes, I'd say so. The informal "OS may interrupt that process" stands for "the process performs an I/O-related syscall, invoking the OS which decides to suspend the process". $\endgroup$ – chi Jan 17 '18 at 18:38
  • $\begingroup$ Perfect, it's more clear now. $\endgroup$ – Kais Jan 17 '18 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.