0
$\begingroup$

I have 3 processes P1,P2,P3 having gantt chart as follows =>

enter image description here

Now, CPU remains idle in 0 - 2 sec and 44 - 47 seconds as I/O is taking place.

Does, this affect throughput as 3 processes can be completed in total 47 sec .

Hence, throughput = 3 / 47 .

Is this correct or am i missing something ?

$\endgroup$

2 Answers 2

1
$\begingroup$

You are correct!

According to the defenition Throughput (in case of scheduling in OS) is :

Number of processes that can be completed in a unit of time.

The process can use both the CPU or the I/O operations. So the I/O time and idle times and CPU time are calculated in throughput.

Note: CPU idle time is not calculated when you want to have the Utilization of the CPU. So in your case CPU Utilization is 42/47.

$\endgroup$
2
  • $\begingroup$ Number of processes that are completed , means i/o and cpu both should be completed right ? $\endgroup$
    – Garrick
    Commented Oct 6, 2016 at 18:44
  • 1
    $\begingroup$ @Willturner yes because a process may use both CPU and I/O! $\endgroup$
    – Peyman.H
    Commented Oct 6, 2016 at 19:03
0
$\begingroup$

But one more thing I want to add, let say first process is available at 2 units then time period from 0 to 2 will not be considered in CPU total time while computing throughput. As processes are not yet available.


Throughput actually includes total time where processes are available and executing doing either computation (in CPU) or I/O.

$\endgroup$
1
  • $\begingroup$ (I don't see need to shout at me.) Did the question (or, at that, your answer) define throughput or refer to one accessible definition? $\endgroup$
    – greybeard
    Commented Dec 13, 2020 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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