Consider a system running 2 (two) CPU-bound tasks (C1- C2) and 1 (one) I/O-bound tasks (I1). I/O bound task issues an I/O operation (of 10 milliseconds duration) for every 1 millisecond of CPU time. A CPU-bound task issues an I/O operation (of 1 millisecond duration) for every 10 milliseconds of CPU time. A CPU- bound task requires 20 milliseconds of CPU to complete and an I/O-bound task requires 2
Consider a system running 2 (two) CPU-bound tasks (C1- C2) and 1 (one) I/O-bound tasks (I1). I/O bound task issues an I/O operation (of 10 milliseconds duration) for every 1 millisecond of CPU time. A CPU-bound task issues an I/O operation (of 1 millisecond duration) for every 10 milliseconds of CPU time. A CPU-
bound task requires 20 milliseconds of CPU to complete and an I/O-bound task requires 2
millisecond of CPU time.
• Assume that there is only one I/O device (so multiple I/O requests may have to
queue).
• Assume that CPU context switch time is 1 millisecond.
• Assume that the ready queue has C1, I1, C2 jobs in that order with C1 at the front
of the queue. There are no jobs in the system at time 0.
• Assume FCFS scheduling for both CPU and I/O.
Show through Gantt charts (as a table) how the I/O and CPU are allocated and compute
the average turnaround times for the CPU-bound and I/O-bound tasks. (Note: Each CPUbound
job ends with an I/O operation which is unusual. But that is okay for this
example.)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images