Question

A process is said to be I/O-bound if it requires a lot of I/O operations, whereas a process that consists of mostly computations within the CPU/memory system is said to be compute-bound

Would greater throughput be achieved by a system running two processes in a multi-programming enviroment if both processes were I/O bound or if one were I/O bound and the other were compute-bound? Why?

*EDIT: i think having an i/o bound and a compute-bound processes can achieve a greater throughput,and that's why the i/o bound runs in the background as long as the compute-bound process runs normaly with the help of the cpu. What you think? I need some help over here

Was it helpful?

Solution

A process is said to be I/O bound if it occupies I/O resources while running. A process that occupies CPU resources is called compute-bound.

If you have one task of each kind, then you can keep the I/O channel busy with one task and the CPU busy with the other. Occasionally the CPU must acknowledge I/O operation completion and begin another I/O, and perhaps the compute-bound process needs the disk occasionally. But on the whole the tasks should not slow each other down.

Example of compute-bound task: scrolling through a list of files in the file browser. (Well, back in the day.) Example of I/O bound task: copying a file.

You would expect to be able to do both at the same time, with at most occasional stalls.

If both are I/O bound, that is like copying two files. Unless they are going over different I/O channels (for example back one file to disc and upload another file), you are not going to go faster than a simple task queue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top