Why does Task Manager force-close applications more effectively (Windows 10)?

763 views

When an application isn’t responding, the obvious response is to attempt to close it with the red “X” in the top right corner of the application window, but often if the app is frozen or otherwise unresponsive, that button is likewise unresponsive and accomplishes nothing. At this point, you might try to right click on the app icon in the taskbar and select “Close Window”, which (in my experience) seems to work more often than the red X does. However, sometimes neither of those solutions does anything at all and the only option left is to open Task Manager and instruct Task Manager to shut down the process, which typically works immediately. So why the hell doesn’t Windows just run whatever script is executed by Task Manager when I press the red X or select “Close Window”? Why are there three seemingly unique approaches to ending a process with varying levels of success when the developers of Windows are clearly fully capable of designing one which works in all cases?

In: Technology

12 Answers

Anonymous 0 Comments

Close window closes/terminates the processing tree/requests/PIDs. When you go straight to the Task Manager 90% of the time you’re going to have some sort of reputable session so the account just pregs off of your permissions.

Like, if you were running an app in windows 10 as an admin and try to close it, it’ll reject because it reflects the binaries of your REG files.

Basically, like was said… It’s like clicking the “x” is saying close from some persistence due to the processing. However, when you’re the teacher and you click the “x” you know damn well every PID better stop immediately. 😂

It’s confusing to explain. Gotta understand the layers to understand it.

Anonymous 0 Comments

It’s basically the difference between the teacher asking you to stop talking or the teacher physically pushing you out of the classroom door.

Well, you asked to have it explained like you’re five 🙂

In more detal: Essentially, what the “Close” button (or right-clicking the task bar and selecting “Close”… or even pressing Alt-F4 … does is send a message to the application to please end itself. It may still ask the user if the data should be saved, close the database connection, etc. and even allow the user to cancel the process.

The task manager “end application” is not so kind: it simply removes the app from the list of running programmes (meaning: it won’t get any processor time any more), free all the memory (which can be reclaimed by other applications) and does a few other cleanups – but it never asks the program if it actually wants to be ended, nor will it give the user any opportunity to save data, etc.

Needless to say: use the task manager quitting function only when the other way fails. Things can go wrong in these “cleanups” and there is a risk that e.g. some memory or some other resources are not freed, or that there is still some interrupt pointing to the now defunct application, etc. This doesn’t happen much, but it *could* happen, and then you need to restart the computer to get back to a clean state.

Anonymous 0 Comments

In short, Operating System can in most cases easily get rid of a program.

However, it’s alse extremely beneficial to make sure that program is given a chance to shut down properly, without corrupting your files or breaking other perhaps valuable things just by pressing red X. That’s why red X is handled usually by the program itself. It just receives it as a “please shut down now” type suggestion. Program has plenty of microseconds or even milliseconds to finish what it was doing and clean up after itself to make sure closing it down ends without a mess.

But if OS decides to just force close the program, well, that’s it. If the program was writing a file, say, saving your progress, that file might very well be rendered unusable. Any kinds of changes the the system could even just brick your computer if there was some important enough change underway and next restart your computer can’t figure out what was going on.

So yeah, OS forcibly closing the program is not that great to have as your first method of trying to shut things down.

Anonymous 0 Comments

The red X is part of the program. When you click on it, it calls a routine in the program. Developers put all of their cleanup stuff in there — saving settings, closing files, freeing leftover memory, etc. The program closes when this cleanup is done. Clicking close on the taskbar is the same as clicking the X.

Closing an application through Task Manager just kills the process. That cleanup routine is not run. This can be a bad thing, and certainly not something you want to do regularly. It’s only for when a program has frozen so badly that it can’t accept the request to run that program close cleanup routine.

Anonymous 0 Comments

Imagine you’re in a crowded grocery store.

Hitting the close button is politely saying excuse me to the person in front of you. Normally, the person hears you and moves. It may take them a moment to adjust their cart or stop what they’re doing but they’re able to get to it pretty quick.

Now imagine the person in front of you is on the phone. They’re super busy with their task, they don’t hear you. It doesn’t help that the store is crowded and loud. You could wait and hopefully they process that someone is behind them waiting, or you could take the task manager approach which is essentially chanting a Ludacris song while shoving past them.

Scenario 1. No hard feelings between you and the person. When you might again things are cool.

Scenario 2. Because of the negative interaction, there may be issues next time you cross paths.

Edit: Windows is trying to aim for scenario 1 when it can.

Anonymous 0 Comments

> one which works in all cases?

Heh, as an IT guy I can assure you sometimes you still have to use the fourth option.

Anonymous 0 Comments

I don’t know exactly the protocol on windows 10, but the idea is that when you try to close the program by clicking in the “X”, you are passing the instruction to the software, and the software will decide how to handle the request. It may only close after other instructions are finished (and in the case the program is frozen, that instruction may never be complete), it may tell the OS to do some stuff before closing, or it may never really close (there are a bunch of apps on windows that keep running on background after you close them).

Killing the process on the task manager, you are telling to the OS to stop that process. It won’t care if the software has any protocols that it should follow before it closes, it just ends it.

Think of it like the difference between asking a person to leave your house, and using brute force to throw him through the window. If you ask him to leave, he may call for a taxi, and only leave after it appears, he may ask to use the bathroom before, or maybe he lost his cellphone somewhere, and will only leave after finding it, or maybe he decides that he will be living hidden inside your attic. If you kick him out of your house, it solves the issue, but is not the ideal way to deal w.ith the situation

Anonymous 0 Comments

Think of it as the emergency stop button (big red button) on any machine. Typically machines will have a cool down procedure before turning completely off but the emergency stop button cuts off all power to the machine… Similar to the table saw that kills itself it touches any part of your finger. It has a turn off option that slowly draws the blade to a stop but the kill switch of destroying itself if it touches your finger… When you hit X on the screen, it is trying to save data before completely closing out but the Task Manager is the kill switch or the emergency stop button that closes the application and destroying any possible saved data that it would normally save in that process…

Anonymous 0 Comments

When you click the X you are asking the application to finish up whatever it is doing and shut itself down safely.

When you kill it with the task manager, you are telling the operating system to turn it off hard – just deallocate its memory and stop any code it is executing.

Analogy – the x is your mother asking you to pause your game and come to dinner. The task manager is your mother unplugging your computer and dragging you by the hair to dinner.

Anonymous 0 Comments

There’s essentially two ways of shutting down an application. Once is graceful, and one isn’t.

When you hit the close button on the window, it starts a graceful shutdown. This means that the program is allowed to interrupt this process. For example, it might ask you to save the document you’re working on. This means that if the application is misbehaving, it might not respond to this signal and not actually close.

When you do a force close from Task Manager, it does a non-graceful shutdown of the application. This means the application is not allowed to interrupt it. Instead, the shutdown happens entirely from the OS side.

Essentially, it’s the difference between asking someone to resign and having them clean out their desk, versus having to have security escort them out.