Does throughput includes CPU idle time also? I have 3 processes P1,P2,P3 having gantt chart as follows =>



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 ?
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.