title: how to detect if a thread or process is getting starved due to OS scheduling
body: <p>This is on Linux OS. App is written in C++ with ACE library.</p>
  
  <p>I am suspecting that one of the thread in the process is getting blocked for unusually long time(5 to 40 seconds) sometimes. The app runs fine most of the times except couple times a day it has this issue. There are other similar 5 apps running on the box which are also I/O bound due to heavy socket incoming data. </p>
  
  <p>I would like to know if there is any thing I can do programatically to see if the thread/process are getting their time slice.</p>