Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why is it that ending a task in XP/Vista takes so much longer than ending the underlying process itself? WHat's the relationship between a task and a process from an OS perspective?

share|improve this question

migrated from Aug 10 '09 at 17:00

This question came from our site for professional and enthusiast programmers.

"Task" is the term used by "Task Manager" to - justify its name - show the list of "main windows of the user's processes"(*), if any

"End Task" gives the "task" (message loop for the "main window") a last chance to react to the WM_CLOSE message and times-out on the associated process to finish.(

"End Process" is a rude TerminateProcess, discarding any pending changes to files or other resources.

Commonly, a mini-dump is created for a Microsoft Online Crash Analysis (Dr. Watson) report, which also might take a second or two.

(*) Raymond, I know this is so inaccurate.

share|improve this answer
Actually, I'm not sure that "end process" is that violent, it seems to wait a moment for the program to terminate anyway. It seems like, at least, since it takes more time, compared to Process Explorer (which is clearly not giving a chance and sending a "kill" command). Though I could be wrong, it's only a personal observation. – Gnoupi Aug 10 '09 at 17:11
There is certainly a difference in the way end task behaves between process explorer and the standard WinTask Manager. I think process explorer has implemented the rudest method to terminate a running PID. – Axxmasterr Aug 10 '09 at 17:33

I believe ending the task requests the program to quit gracefully first, whereas ending the process is the Windows equivalent of SIGKILL - the OS just dumps the process with no questions asked.

share|improve this answer

You must log in to answer this question.