locked
How can Windows detect a process which doesn't respond RRS feed

  • Question

  • Hi. I've been wondering about this for a while, and I didn't find any real answers to my question, which is the following:

    When a program stops responding (i.e a form appears on the desktop saying "program has stopped working"), how does Windows detect it and what needs to go wrong in order for the error message to appear?

    I'm sorry if this thread doesn't belong in this part of the forums, but I didn't really know where to place it.

    Saturday, June 21, 2014 8:52 AM

Answers

  • Hi,

    When you are notified a program is not responding (i.e you're in Firefox and all of a sudden it goes white and then says 'Firefox has stopped responding' and you get the spinning circle/cursor) this implies it's a hung process. The process still exists in memory, and it's trying to once again become responsive (and actually can depending on what's causing the hang), so that's how Windows knows it's not responding.

    We'll use this as an example (of many possibilities behind a hang):

    You launch program A.

    Within program A, you tell it to do something.

    You have a pre-existing program running, we'll call that program B.

    Program A requests the same information that program B does at the exact same time.

    We now have a deadlock, which is program A's transaction cannot complete until program B's transaction completes, but program B's transaction obviously cannot complete until program A's does. This will never end unless it's broken by an external process, or if you kill the process(es) manually.

    Regards,

    Patrick

    “Be kind whenever possible. It is always possible.” - Dalai Lama



    Saturday, June 21, 2014 11:40 AM
  • hey tokfrans,

    This is a really good question, and pretty simple because it is not common was pretty hard to find her the answer.

    I found you a link that contains information and reasons how the computer recognizes the process as not responding.

    http://www.reddit.com/r/askscience/comments/1ywe1i/what_is_happening_in_an_operating_system_when_a/


    Please Mark This As Answer if it helps to solve the issue

    Tzuri Ben Ezra | My Certifications: CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP |
    FaceBook: Tzuri FaceBook | vCard: Tzuri vCard | 
    Microsoft ID: Microsoft Transcript 
     |
     

    Sunday, June 22, 2014 7:23 AM

All replies

  • Hi,

    When you are notified a program is not responding (i.e you're in Firefox and all of a sudden it goes white and then says 'Firefox has stopped responding' and you get the spinning circle/cursor) this implies it's a hung process. The process still exists in memory, and it's trying to once again become responsive (and actually can depending on what's causing the hang), so that's how Windows knows it's not responding.

    We'll use this as an example (of many possibilities behind a hang):

    You launch program A.

    Within program A, you tell it to do something.

    You have a pre-existing program running, we'll call that program B.

    Program A requests the same information that program B does at the exact same time.

    We now have a deadlock, which is program A's transaction cannot complete until program B's transaction completes, but program B's transaction obviously cannot complete until program A's does. This will never end unless it's broken by an external process, or if you kill the process(es) manually.

    Regards,

    Patrick

    “Be kind whenever possible. It is always possible.” - Dalai Lama



    Saturday, June 21, 2014 11:40 AM
  • Hi,

    Just checking in to see if the suggestions I proposed are helpful. Please let us know if you would like further assistance.

    If the reply is helpful, please remember to mark it as answer which can benefit our Community members.


    Kate Li
    TechNet Community Support

    Thursday, June 26, 2014 8:11 AM