Hi,

I have a C++ program having two threads, out of which thread 1 is cpu
bound and thread 2 is IO bound.
There are two cases for the process
case 1) where both thread needs almost same execution time (say t1)
case 2) Where thread 1 finishes very early then thread 2.

I have a 2 core machine (while doing test I closed all other exe's)

Ideally in case 2 the time to finish the process (process end time -
start time) should be almost equal to /better then case 1. But its
not, and the process runs 10% slower in csae 2.

I suspect that since there are no ready to run thread in case 2 (as
thread 1 finished early) so the OS puts the process in wait queue
whenever thread 2 requests IO, which casue the increase in total time
to finish the process.

the total cpu time as shown by TaskManager is less in case 2, But the
end to end finish time is more.

I want to know is ther any way in windows by which I can find out the
wait time of a process (all the time it spent in ready to run OR
blocked state)