title: Operating System Overheads while profiling?
body: <p>I am doing profiling of a C code in Microsoft VS 2005 on a Intel Core-2Duo platform. 
  I measure the time(secs:millisecs) counsumed by my function. But i have some doubts about the accuracy of this measurement as the operating system will not continuously run my application, but instead schedule others apps/services in between the execution of my code.(Although i have no major applications running while i do the profile run, still windows will have lot of code of its own which it will run by preempting my app.). Because of all this i believe the profiling number(time taken by my app to run) is not accurate. </p>
  
  <p>So my question is there any way to find out the Operating system overheads, scheduling overhead on a typical windows system(I run Windows XP)e.g. if my applications says it ran for 60 milliseconds, out of that 60 msec,  how much time really was used by my app. and how much time it was sitting idle, due to being pre-empted by some other task scheduled by the OS?</p>
  
  <p>or </p>
  
  <p>Atleast is there any ball-park number to get such OS overhead, based on your experience you came across while doing something similar?</p>