How to distinguish between I/O bound and CPU bound jobs ?

10,239

Solution 1

Generally, the CPU scheduler assigns time slices to processes/threads and switches between them whenever a) the time slice has run out or b) the process/thread blocks for I/O.

An I/O-bound job will be blocking for I/O very often, while a process/thread that always makes use of his full time slice can be assumed to be CPU-bound. So by distinguishing whether a process/thread blocks at the end of the time slice or by calling some wait_for_io_completion() function, you can effectively characterize those types of processes.

Note, that in real life, things get more complicated, because most of the time applications are not either I/O-bound or CPU-bound but switch roles all the time. This is why scheduling is about heuristics and not about correct solutions, because you cannot (always) predict the future.

Solution 2

answered by tumaini kami david Answers. Generally, the CPU scheduler assigns time slices to processes/threads and switches between them whenever a) the time slice has run out or b) the process/thread blocks for I/O. ... CPU bound uses more of its time doing computations than I/O bound.strong text

Solution 3

CPU bound uses more of its time doing computations than I/O bound.

Share:
10,239

Related videos on Youtube

user764178
Author by

user764178

Updated on June 01, 2022

Comments

  • user764178
    user764178 almost 2 years

    How does a long term scheduler decide which job is I/O bound and which one is CPU bound?

    I heard that by using cpu burst we can distinguish between I/O bound and CPU bound jobs, but how is the CPU burst calculated without processing the program?

  • Omar
    Omar almost 11 years
    Elaborate more on your answer. Add references, make it useful.