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

4

6

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?

Autism answered 29/5, 2011 at 5:42 Comment(0)
V
3

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.

Vallation answered 1/6, 2011 at 18:32 Comment(0)
C
1

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

Cedillo answered 16/7, 2013 at 13:32 Comment(1)
Elaborate more on your answer. Add references, make it useful.Juvenility
M
1

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

Mayotte answered 22/5, 2019 at 7:24 Comment(0)
H
0

IO BOUND PROCESS : Io bound process spends more time doing io than computations,many short cpu burst. COU BOUND PROCESS : process spends more time doing computations;few very long cpu bursts.

Hermilahermina answered 12/4, 2015 at 14:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.