Why does ending a task from task manager work better than canceling a program?

733 views

When a computer starts to freeze or operate slowly and doesn’t respond, ending the task(s) from the task manager usually ends the program and the problem. Why does this work better than simply canceling the task with ALT+F4/pressing the cancel button in the window?

In: Technology

26 Answers

Anonymous 0 Comments

The simplest version is that the operating system controls virtually all access between software and the hardware. The application itself can send instructions to the operating system to say “Hey, I’m good to shut myself down”, which the operating system will then accept and process…killing the task. If you use Task Manager, you are more closely interacting with the operating system itself (technically, using a different application with higher privileges) – and your instruction is to “stop executing that task”, which the OS is happy to oblige, usually, and usually quickly.

The reasons why Task Manager is quicker at the job:

* if the application has any house cleaning to do before it shuts down like freeing up used memory or saving inprogress files it will complete them before asking to be shut down
* if it’s busy doing …whatever it is that it is supposed to do…or if anything has gone wrong and it’s stuck in an infinite loop – there may not be enough instruction cycles left for it to actively monitor the X button for clicks, so it never, or very slowly queues the command to shut itself down.
* Task manager doesn’t care about those things – it just looks at the list of tasks that get allocated processor time, and removes the task/threads associated. That program ceases to exist.

When you say ‘work better’ – it works better at killing the program more quickly, but can do damage to files that may be in the process of being written, only getting part of the data computed or stored before the app stops.

You are viewing 1 out of 26 answers, click here to view all answers.