Operating system – What happens when a person says that the computer is “hang” or freezer?

We know that everything that runs on a computer is a huge program co-operated by many people.
So what happens when the computer hangs and we can’t do anything Woolen cloth? In addition, does everything in this scene freeze the content implemented in the program? Or is it like the program counter is stuck and cannot be incremented, so there are some problems in the processor?
The computer may freeze in different situations. These are what I can think of now:

> x86 CLI and HLT instructions. CLI disables interrupts, so there is no asynchronous event (such as timer interrupts or key presses) to move the CS: EIP instruction pointer to another One instruction, HLT will actually stop the processor. The instruction is rarely used, only the kernel allows for example, the initialization routine in the boot code fails. Although restarting is a better choice.

Please note that HLT Only stop running cores, not all cores.
>The window is not responding (usually found on Windows). This is different from the application. More information here.
>Trying to get the resource but it is protected by a lock and already Acquire resources. The process waits (actually is busy looping or spawning another process) until it can finally acquire resources. This is just a temporary state, not…
>stalemate. It can happen in many ways, but A common situation is that two processes are trying to acquire resources that they provide to each other at the same time. No one can handle the acquisition request because both are waiting for other processes, so both processes are ultimately uninterruptible. This is Linux The reason for the uninterrupted process is that although it is sent a signal, it cannot be killed.
>Multitasking on a slow processor or a processor with a small number of threads. A bad scheduling algorithm will make the situation worse.
Since a process occupies at least one thread, the number of processes that are effectively running concurrently is very small. However, this can be stabilized by a very fast processor.
This leads to a longer response time to events such as mouse clicks.

For x86 systems, HLT is the only instruction that really hinders the advancement of the instruction pointer. All other situations are just (possibly infinite) loops or program/operating system errors.

We know that everything that runs on a computer is a huge program that is coordinated by many people.
So what happens when the computer hangs and we can’t do anything? In addition, does everything in this scene freeze the content implemented in the program? Or is it like the program counter is stuck and cannot be incremented, so there are some problems in the processor?

The computer may freeze in different situations. These are what I can think of now:

> x86 CLI And HLT description. CLI disables interrupts, so there is no asynchronous event (such as timer interrupt or key press) to move the CS:EIP instruction pointer to another instruction, HLT will actually stop the processor. Instruction Rarely used, only the kernel allows for example, initialization routines in the boot code to fail. Although restarting is a better choice.

Please note that HLT only stops running cores, not all cores. < br>> The window is not responding (usually found on Windows). This is different from the application. More information here.
> Attempt to acquire the resource but is protected by a lock and has already acquired the resource. The process is waiting (actually a busy loop or Spawn another process) until it can finally acquire resources. This is just a temporary state, not…
> deadlock. It can happen in many situations, but a common situation is that two processes try to acquire them Provide resources to each other at the same time. No one can handle the acquisition request, because both are waiting for other processes, so the two processes are ultimately uninterruptible. This is the reason for the uninterrupted process on Linux, despite being signaled, But it cannot be killed.
>Multitasking on slow processors or processors with a small number of threads. Poor scheduling algorithms can make the situation worse.
Since one process occupies at least one thread, so The number of processes running concurrently is very small. However, this can be stabilized by a very fast processor.
This leads to a longer response time to events such as mouse clicks.

For x86 systems, HLT It is the only instruction that really hinders the advancement of the instruction pointer. All other cases are just (possibly infinite) loops or program/operating system errors.

Leave a Comment

Your email address will not be published.