Revealed: Why Windows Task Manager took a cuddlier approach to (process) death and destruction
- Reference: 1625053444
- News link: https://www.theregister.co.uk/2021/06/30/windows_task_manager_termination/
- Source link:
During an [2]Oxford University Address , Plummer told his audience that the Task Manager knobs and buttons did not always carry the text and descriptions with which users are familiar.
"About the time that I was putting the finishing touches on the first versions of Task Manager," he said, "a new group had started up within Microsoft called POLCHECK, for policy check.
[3]
"Its sworn duty was to defend our honour by scouring the Microsoft source code and its products for pretty much anything that would make us look stupid, unfeeling, out of touch, and so on."
[4]
[5]
Microsoft? Unfeeling? Out of touch? Surely it can't be true (although anyone [6]looking glumly at a computer purchased three or more years ago might be wonder if the company has changed all that much over the decades).
[7]A hotline to His Billness? Or a guard having a bit of a giggle?
[8]Linux Mint emits fix for memory-gobbling Cinnamon – and future version may insist on some updates
[9]Top tip from the original Task Manager taskmaster: Don't put your phone number on that debug message box
[10]'I wrote Task Manager': Ex-Microsoft programmer Dave Plummer spills the beans
[11]Roughly 30 years after its birth at UK's Acorn Computers, RISC OS 5 is going open source
To be fair, many a programmer's blushes have been spared by a code review over the years and the occasions where the odd profanity or two have made their way into the comments are too numerous to mention. This hack well remembers coming across a module header that consisted of a lengthy apology in poem form to whoever ended up having to make the code actually, you know, work.
Plumber continued: "Other than security experts and a few folks in academia, however, few would actually see our internal Windows source code,". "But many would see the end user product, and that is why it was important that the product design and user interface reflect the new kinder, gentler, Microsoft.
"The days of the harshly angled DOS prompt were over, and Windows was going to be your friend and your confidante, no longer merely a rude adversary," he said with more than a little whimsy. "We were going to take the sharp edges off so that nobody got hurt."
[12]
Checking for swears was easy. "Violent imagery," however, presented more a of problem.
"That's because Task Manager is," said Plummer, "quite frankly, a natural born killer."
Or least it was until more recent versions of Windows defanged the poor thing.
[13]
Back in the day, Windows Task Manager was often the last line of defence and could put a stop to all manner of processes that were running amok. The language used, however, might well frighten the horses.
While aficionados of the command line (as well as the likes of SQL) might be quite happy issuing a "kill" command, Microsoft realised consumers might not be.
"In the computer science world," explained Plummer, "this harsh notion of killing tasks and jobs goes way back to at least the 1950s, as does the notion of parent and child processes.
"It's something a systems programmer could become a little desensitised to over time," he admitted.
Ex-terminate, Ex-terminate, Ex-terminate
However, Plummer and co. understood all too well that a big, red KILL button or menu item would not go down well. Enter the phrase "End Task," conjuring a graceful exit of a process as it tottered gently toward the light, perhaps affording the opportunity of saving some work.
"The harder cases," added Plummer, "where the process wasn't playing nicely, meant we would use the verb 'Terminate', and later, 'End Process'."
And so it went on, with the PolicyCheck team starting to suspect Plummer and his crew had dropped in all the alarming verbiage "just to test their patience and the limits of their system."
Their suspicions regarding the darker side of the engineering team came as they reached the final page, the process page, which is hardly a paragon of user-friendliness to begin with. It was also festooned with verboten verbs: "Kill Process" and the even more alarming "Kill All Children."
The solution? "End Process Tree."
The last, and most nuclear option, was renamed Shutdown and Exit.
"But what did it actually do?," PLumber continued. "Well, as far as functionality, its purpose was to rapidly flush buffers and exit. All apps would stop, a complete service shutdown would occur and then final system exit.
However: "Particularly if the Component Object Model and its threaded apartments were in use, it really came down to 'Kill all children, then kill self, and then burn down the rental apartment'."
We're not entirely sure about the order there, but we'd have to admit that "Shutdown and Exit" sounds a good deal less alarming.
"So, thank goodness for Policy Check," said Plummer, "because the life of a Task Manager can be a dramatic and scary one." ®
Get our [14]Tech Resources
[1] https://www.theregister.com/2020/05/26/task_manager_confession/
[2] https://youtu.be/KclSIRRuBIE
[3] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=2&c=2YNyVJNX1lI35ERHHODNCBAAAAJU&t=ct%3Dns%26unitnum%3D2%26raptor%3Dcondor%26pos%3Dtop%26test%3D0
[4] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YNyVJNX1lI35ERHHODNCBAAAAJU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[5] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YNyVJNX1lI35ERHHODNCBAAAAJU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[6] https://www.theregister.com/2021/06/28/microsoft_windows_11_insider_preview_released/
[7] https://www.theregister.com/2021/06/18/on_call/
[8] https://www.theregister.com/2021/03/02/linux_mint_fix_for_memorygobbling/
[9] https://www.theregister.com/2020/12/14/windows_task_manager_source/
[10] https://www.theregister.com/2020/05/26/task_manager_confession/
[11] https://www.theregister.com/2018/10/23/risc_os_open_source/
[12] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=4&c=44YNyVJNX1lI35ERHHODNCBAAAAJU&t=ct%3Dns%26unitnum%3D4%26raptor%3Dfalcon%26pos%3Dmid%26test%3D0
[13] https://pubads.g.doubleclick.net/gampad/jump?co=1&iu=/6978/reg_software/applications&sz=300x50%7C300x100%7C300x250%7C300x251%7C300x252%7C300x600%7C300x601&tile=3&c=33YNyVJNX1lI35ERHHODNCBAAAAJU&t=ct%3Dns%26unitnum%3D3%26raptor%3Deagle%26pos%3Dmid%26test%3D0
[14] https://whitepapers.theregister.com/
Re: meh
Because it does no longer kill.
Kill and Destroy are known computer paradigms that will perform a specific job with a predetermined success rate. When you alter the paradigm, then you alter the success rate. This is where " what's in a name " actually makes the difference.
Just like garbage collection only works when you are actually working with garbage. Many bits never care about recycling because they do not consider themselves to be garbage. Hence, they stick around. Only a destructive kill would bring them back into the fold.
Re: meh
@Timto
I have used the (various versions of) Process Hacker over the years (whenever possible, some corporate IT places ban it as their AV* stuff does not like some of its low level behaviour, even though you can get the source code, check its benign and build it from source rather than downloading it! ... could be because it lets you kill just about anything so various processes e.g. AV (that are essentially unkillable with windows task manager) could be killed by it if you so chose).
I find it far better at killing processes than the default windows task manager
*AV = anti virus
Re: meh
Process Explorer from Sysinternals works quite well as well, been using that for many years now. I really like the utilisation graphs, and that you can hover the mouse over the graph, and it tells you what task is was running at a specific point in time. I've found it handy for tracking down intermittent high usage task in the past, that have stopped the high CPU utilisation by the time Task Manager opened.
Sysinternals of course is now part of the MS family, but they seem to still keep updating the tools.
Re: meh
SysInternals still provides a command line PSKILL, unlike Windows. Bizarrelyi t's a larger file size than [1]Process Explorer.
[1] https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer
Why so long?
One of the things I have always wondered about windows is when you hit the shutdown button, what is it doing that takes so long? Sometimes it can be minutes until the shutdown occurs, meaning you have time to make a hot beverage of choice and still come back to see the spinning circle of death.
Ok, you need to flush buffers, etc, but it feels like the computer is spending its pending downtime transcribing war and peace using a hammer and chisel
Rather than End Tasks, i would of preferred the "Nuke em" option...
preferable from orbit,
just to be sure
Re: Why so long?
It probably takes a while to upload the last remaining telemetry stored that session to Microsoft's servers. ;)
If you have some Hyper-V VMs (and perhaps WSL), it needs to suspend all this stuff too.
Also "shutdown" doesn't really shut down the computer fully anymore. It puts it in a hibernate state so Microsoft can mislead everyone into believing that Windows boots up faster. If you have a lot of RAM, it needs to write this stuff to disk.
Try a "restart" instead and you might see a speed difference.
Re: Why so long?
> It probably takes a while to upload the last remaining telemetry stored that session to Microsoft's servers. ;)
It's like with humans, when they perish, their soul gets uploaded to whichever organisation they signed a contract up with.
Re: Why so long?
I'm a great fan of the hard power switch on the back of my PSU.
Re: "shutdown" doesn't really shut down the computer fully anymore
You're talking about a laptop.
I can assure you that when my tower case shuts down, it's shut down. The PSU is off, no LEDs are shining and even the USB ports are shut off.
Re: "shutdown" doesn't really shut down the computer fully anymore
"You're talking about a laptop."
No they're not...
Re: "shutdown" doesn't really shut down the computer fully anymore
Come on then anonymous downvoters, explain why you think hibernation mode (as specifically mentioned by the previous commenter) or the Hybrid Shutdown/Fast Startup mode that W10 uses by default when you tell it to "shut down" (and which the previous commenter may have actually been referring to), only apply to laptops?
The PC might be fully powered down, but unless you've tweaked W10 so that selecting "shut down" doesn't perform this hybrid shutdown instead, then the next time you power up the PC and boot into W10, you're NOT booting into the completely clean system that you might assume to be the case given the absence of any power consumption between shutdown and powerup.
It's not therefore unreasonable to argue that "shutdown" doesn't really shut down the computer fully any more, if you're considering the OS state that will be presented to you next time you start up said computer, rather than the power state that said computer will be in between now and then.
Re: "shutdown" doesn't really shut down the computer fully anymore
It isn't a suspend. It is more like a hibernate. The machine is completely off but the RAM is stored in a RAM dump file ready to be restored on bootup.
Some info here:
https://docs.microsoft.com/en-us/windows-hardware/test/weg/delivering-a-great-startup-and-shutdown-experience
Re: "shutdown" doesn't really shut down the computer fully anymore
But the real time clock is ticking and and can wake up the computer at a specified time. There may well be some kind of wake on LAN feature. If you are not careful, on wake up the OS can load in a full image of the previous RAM state and put itself back into the broken configuration that caused you to shut it down.
Re: "shutdown" doesn't really shut down the computer fully anymore
Any computer can go into that state as well, but it might be in hibernation with the operating state saved to the hard disk. All ready for that operating state to be reloaded into ram on power up.
Note that Windows "sleep"and "hibernation" might appear very similar to the user, but are actually very different - something I've had to explain at work when considering the security implications of sleep vs hibernate.
Re: Why so long?
A long time ago, in a galaxy far, far away, back in the day (Win95!) the shutdown process simply pulled the plug on the hardware. That is, Windows simply shut down the drivers and the kernel, and left the hardware in the as-previously configured state.
It would be reasonable to assume that this would not present a problem - when you are finished with the hardware, you can simply disconnect.
Turned out that some hardware did not like that, putting itself into a brain-dead state until it was completely power-cycled.
So Win95 did an orderly shutdown with the kernel sending messages to each hardware driver that it wished to disconnect. The driver was then responsible for placing the hardware into a shutdown or standby state, then reporting to the kernel that all went as requested. The kernel, only then, disconnected the device driver sockets and proceeded to the next driver.
Even then, some hardware did not respond as requested. That was the lengthy Win95 'stuck on shutdown' stall that drove everyone crazy.
Later (sometime in Win98 IIRC) they decided that many (but note, not all) drivers & devices could indeed be killed without an orderly shutdown, so they changed the shutdown procedure to do exactly this. Faster shutdowns ensued, with only occasional hardware hiccups.
It is reasonable to assume that every Windows after Win98 still takes that same approach: some device drivers are simply killed, leaving the hardware in the previous configuration but this not causing issues. However, some hardware needs to be 'nulled' and the driver sets the hardware as such, only then notifying the kernel to proceed with the shutdown. That, and Win10 now also doing things like applying auto-downloaded patches with possibly flush of temporary install files, updating the Registry on last-minute changes, etc etc etc.
Also, note that Windows 10 does not really "shut down" when you select Shut Down; Windows 10 features Fast Startup, which actually is a hybrid shutdown that writes some of the system to the hibernation file. The shutdown might be slower due to the write, but it is balanced off with a faster startup as full system & hardware initialization is not required. They figured that most people are impatient to get started, less so when they finish and are ready to walk away, so they rebalanced the two operations towards a faster startup at the penalty of the slower shutdown. Turn off "Fast Startup" for the faster shutdown at the cost of the slower startup.
Re: Why so long?
Seriously -- Linux shutdown also takes a while. I think (and boy could I be wrong) that both OSes issue some sort of polite shutdown request to all running processes which then close their open files, save cached data that was awaiting an output opportunity, etc, etc, etc. Demons are shut down gracefully. File systems are unmounted -- but you can't do that until processes using them shut down. All that can take a while. And you have to wait for the slowest (and possibly worst coded) process to end.
... something like that anyway.
I invite folks who actually know something about how modern OSes work to straighten out my misconceptions.
Re: Why so long?
My Chromebook shuts down in about 5 seconds - and my 10 year old notebook running Slackware shuts down in about 15 seconds - I guess you are talking about the Debian variants of GNU/Linux...
Re: Why so long?
So upvoting this. Also, why so long to boot up? My laptop can perform billions of calculations and transfer 100s of MB to/from the hard disk per second. So really, what in Hades is it doing all this time just to go from off to on or vice versa?
Serious question, I genuinely have never understood this.
Annoyingly, it's now the same with the telly. There used to be a golden age about 20 years ago when LCD tellies would turn on in an instant because the electron gun didn't need to warm up. Now, the LCD still comes on immediately displaying the manufacture's logo sorry, advert, but now takes an age to boot up the computer that powers it. I'm getting older and every second counts!
Yes - if you have fast start enabled shut down is more or less a version of sleep. That's why memory commits are the same after shut down / power on
No feelings were hurt
That's what I like about the left pondians, so careful about causing offence.
We renamed the 'release' button to 'deploy' because some people may have abandonment issues and 'release' may be traumatic.
What does it do?
It 'deploys' the new Kill Ninja 9000, automatic laser guided child seeking cluster missiles
-9
They never exposed the real nasty though...
kill -9 == with extreme prejudice.
Re: -9
#echo "boo" > /dev/kmem would generally also end up with a stop or restart.
Re: -9
kill -9 -1
Best command ever.
Re: -9
Nothing wrong will kill -9...
it really came down to 'Kill all children, then kill self, and then burn down the rental apartment'."
Can I please have an operating system that says this, so there's no dumb cuddly language and ambiguity, just an honest to god description of what's about to happen...?
I'd pay good money to have it narrated by Frankie Boyle, swears included, like you can get the Big Yin on certain SatNavs...
"Right, so we grabbed th'process and decided to ****in' shove a wee lengthy bit o' knife inty 'em."
gdb --begbie
Right, some &*%$ locked a resource and no &*%$ gets released till we find out which &*%$ locked it.
"We were going to take the sharp edges off "
And now we have rounded corners to avoid to hurt users moving windows around without care?
So, thinking ahead...
I fully expect Windows 11 to invite an errant process to move towards, and indeed cross over, the rainbow bridge. Awww....
Hidden in plain sight
I work in the field of machinery automation and I remember visiting a customer in Italy to conduct an upgrade of some sort. The machine compiled a production report that it spat out on a dot matrix printer at the end of every shift. I guess the original engineer who commissioned the machine some years previously had a falling out with the production manger as ever 8 hours it had been printing out a "W@nker Report"
Comments in code can be hard to kill off too! The common unit of un-quantifiable things around here is the banana. This stems from a comment I wrote in a piece of "C" code many years ago while struggling to commission a machine in the jungles of Indonesia. I had modified an inertia calculation and added the immortal comment: "Add a banana for good luck!
meh
But, could somebody explain, why does "End Process" never damned-well work?