I need to write an Application which continuously monitors the system’s/application’s behavior and mark out the processes which are ‘not responding’ at all.
I mean something like this on Windows :

or like this on Android :

Can someone help me in defining out this ‘hanging’ or ‘not responding’ behaviors so that I can write an application to monitor these parameters.
I could think of just one parameter :
Constantly monitoring the processor usages of each Application, and mark them as not responding if they are consuming above ‘x’% CPU for some ‘y’units of time.
Platform : Linux/Android/Windows
You need something like a watchdog. Either the application has to do some pre-defined activity regularly and you just regularly check if it did this activity. Or you send some kind of request to the application which it has to answer.
Consuming above ‘x’% CPU for some ‘y’ units of time has nothing to do with not responding. An application can consume lots of CPU but still respond to system or user events. Likewise an application can consume no CPU at all because it waits for an input, and does not respond to any other request during that time.