On Sun, 4 Apr 1999, Richard Adams wrote:
> According to Akintayo Holder: While burning my CPU.
> >
> > Is there a way of telling if a program is not responding ?
>
> Surely just by using the running program one would be able to tell.
>
> > A sure way of differentiating between a hung program and a slow one ala
> > widows.
This is much too general to answer. I have written programs with
bugs that are infinite loops in them. The program is certainly "doing"
something, but not what I wanted. If 'top' shows that the "TIME" is
accumulating, then the system thinks the program is doing something.
Whether it is waiting on an answer from a slower activity depends upon
many things. Possibly the program is "polling" the slower activity to see
when it is ready. So, your program could be diligently polling but not
obviously going anywhere. Better programming practice would be to use
interrupts in a case like this, but you wouldn't notice anything from the
outside, except that the "TIME" from 'top' would behave differently.
Gordon A. Gallup Dept. of Physics and Astronomy
University of Nebraska-Lincoln Lincoln, NE 68588-0111
Voice: (402)472-1230 FAX: (402)472-2879
http://physics.unl.edu/directory/gallup/gallup.html
http://www.unl.edu/Dissatt/