101

One thing I remember very well from my childhood is the screen you got at the end of a shutdown process ond old computers:

enter image description here

I don't know if this was a Windows 95/98/2000/ME only thing but I wonder why computers back in those days had to be turned off manually. Was it really that hard to implement a self shut-off? What is the reason it took quite long for computers to feature this.

  • 103
    I suddenly feel very old. – Geo... Jun 20 '18 at 10:21
  • 6
    Windows 2000 comes from the NT lineage (it's the version of Windows NT in between NT 4.0 and Windows XP), not from the Windows 3.x/95/98/ME lineage. Windows 2000 and Windows ME hit the market at around the same time. – a CVn Jun 20 '18 at 14:52
  • 7
    @hojusaram, that did NOT help. :-P – Geo... Jun 20 '18 at 17:44
  • 18
    @Geo... If this is what makes you feel old, you're way overdue for feeling old. – jpmc26 Jun 20 '18 at 19:22
  • 15
    @geo you're not old unless you had to run PARK.COM before turning off the power. – Criggie Jun 21 '18 at 12:48
130

TL;DR: it took a long time (on PCs) because the industry wasn’t ready to push it. Scroll down to “Why did it take so long?” for details.

Shutdown screens

That screen comes from Windows 95 and its successors, 98 and Me. Windows NT showed a plain dialog box with a “Restart” button. Other operating systems which cared about managing the shutdown process had equivalents — OS/2 for example, and all the Unix variants (sometimes it was only a text message on the console). Raymond Chen wrote an amusing blog post illustrating the importance of the instructions in the shutdown screen.

Some history...

Before 1995 and the adoption of the ATX standard, the vast majority of desktop PCs had power switches which were directly connected to the power supply, and acted as mechanical switches only, interrupting the electric circuit when opened. It was therefore impossible for software to control the state of the power supply. But that wasn’t much of a problem initially: when the IBM PC was designed, storage media (including hard drives) had no caches, so when the hardware told the operating system that a write was finished, it really was. Under DOS, the kernel and shell worked together to ensure that when the DOS prompt was displayed, all the buffers were flushed; when software caches appeared, they adhered to this too (at least, the well-behaved ones did). Users were taught to exit programs, wait for the prompt, and wait for drive lights to switch off before powering the system down. (They might also need to PARK the drive heads but that’s another story.) Even with pre-95 versions Windows, users exited to DOS before switching the system off.

Windows 95 and other multi-tasking operating systems changed the picture: they didn’t “exit to DOS” on shutdown (either because they weren’t supposed to, or because there was no DOS to return to), so users couldn’t wait for a prompt to appear before switching off. In most truly multi-tasking systems there’s never really a quiescent state where the system is safe to power off, in normal operation; so most multi-tasking operating systems have a way for the user to say “I want to power the system down, prepare to do so”, and the operating system then needs to tell the user when it’s safe to power off. This ensures that all applications have finished writing the user’s files to disk, and that the system is in a consistent state (ignoring hard drive caches here...).

Shutting down PCs

Two features brought system power under operating system control: APM on the one hand, and ATX on the other. APM, which was designed for laptops initially, provided mechanisms for software to request changes in the system’s power state: fully on, in standby, suspended, or off. ATX changed the physical connections in the system so that power control became possible everywhere: it required that the power button no longer be a switch directly connected to the power supply, but instead that it be connected to the motherboard, and that the motherboard control the power supply itself. The power supply was also changed so that it would supply a small amount of current all the time, allowing the system to be left in “soft off” status, i.e. with enough capabilities to turn itself back on again when requested to do so.

You can see an example of the use of APM to power off a PC in Shutdown, a small assembly-language program written for DOS. Operating systems such as Windows 95 (with the APM drivers installed) would do the same thing.

It was quite exciting (to me anyway) to see APM and ATX roll out progressively in the second half of the nineties, and see systems suddenly acquire the ability to turn themselves off without human intervention, and to turn themselves back on at the press of a key on some systems. This was yet another sign of PCs “growing up” (“real” computers, i.e. Unix workstations in my mind at the time, had had the ability for a while, as had Macs).

Why did it take so long?

All this doesn’t address the actual question:

Was it really that hard to implement a self shut-off? What is the reason it took quite long for computers to feature this.

If you design it in from the start, it’s not all that hard to implement self shut-off, and many systems existed with this ability quite a few years before the PC acquired it.

I think the main reason it took so long is industry fragmentation. IBM designed the first PCs, and the majority of clones in the eighties and early nineties followed the blueprint set by the AT (or rather, the Baby-AT variant and LPX power supplies). But IBM moved on to the PS/2, which was a rather proprietary derivative of the PC, and left the rest of the industry to fend for itself. There was no real driver for big changes for many years: people continued using DOS, on its own then with Windows, and while there were other operating systems, none of them was successful enough to be able to drive change. No hardware manufacturer was dominant enough either. Various ad hoc consortia were created, e.g. for EMS (Lotus, Intel, and Microsoft), and more markedly when it comes to hardware, EISA (the “Gang of Nine”, led by Compaq), VESA, etc. Various de facto standards emerged, but no one was defining the PC platform, and operating system-controlled power-off wasn’t an important enough feature to mobilise the industry.

In the early nineties, surprising as it may seem now, there was a fair amount of uncertainty as to what the computing future held. Apple was making its comeback with cheaper Macs, workstation manufacturers were releasing lower-priced systems (or rather, not-so-expensive systems), a variety of operating systems and platforms were vying for attention (Be, RiscPC...), IBM was still pushing OS/2 and Taligent, Microsoft was pushing Windows NT, etc.

Eventually an alliance of companies took it upon itself to “remedy” this situation: Intel and Microsoft (referred to at the time as Wintel). This started in the early nineties, but wasn’t a done deal for quite a while; when ATX was published in 1995 (by Intel on its own), pundits liked it but weren’t sure it would convince the industry, although they were proved wrong fairly quickly. Windows 95 sealed the deal though and Intel and Microsoft became the definers of the PC platform (with the PC System Design Guide in particular).

On to the present day

APM is now obsolete, and ACPI is the interface which provides access to the power state nowadays (and many other aspects of the system). Pressing the power switch now only informs the system that the button was pressed, and it’s up to whatever’s controlling the system at that point to decide what to do with that information — which is nice because you no longer risk losing your work if someone accidentally presses the button!

(PCs never acquired the other hardware feature I wanted from Macs and Unix workstations, which was the ability to eject floppies without human intervention. Oh well...)

  • 3
    I guess tehre are different opinions on the usefulness. Well, I still not like the way the power 'switch' is implemented, as it's not a real off state, more of a reduced power state, where in fact I want the machine go off. The solution used by the original Siemens PC-D (inherited from the related Unix workstation) was wa more elegant. Here software couldn't switch off the PC, but prevent switching off. Serves the same purpose to avoide inconsistant data during shutdown, but when switched off, it realy was off, as the holding circuit was part of the mains side bridgeing the mechanical switch. – Raffzahn Jun 20 '18 at 8:25
  • 3
    @Raffzahn I agree that the usefulness of “soft off” is limited, there aren’t many PCs which need to switch themselves back on. I flip the power switch on the PSU once my non-BMC-controlled systems are off ;-). – Stephen Kitt Jun 20 '18 at 8:28
  • 11
    It took quite a long time (and a lot of nasty data losses) until the industry had educated the users that you simply shouldn't switch off a Windows (or Unix, for that matter) system while it's still running, but rather have to put it into an orderly shutdown - DOS users were used to flip their switches whenever they saw the DOS prompt. Once you tell people "never switch off your computer", you obviously need to tell them somehow when it's safe to do the opposite. – tofro Jun 20 '18 at 10:51
  • 2
    The Amiga was a multitasking system with hard-switched PSU. The correct procedure was to watch for indication on the drive LEDs that disk activity had completed, then switch off. I think all in-built disk caches were write-through. – Brian H Jun 20 '18 at 14:18
  • 7
    IIRC it was, at least in some circumstances, possible to execute DOS commands when Windows 95 displayed the "it's now safe to turn off your computer" image because what it really did under the hood was to exit to a DOS prompt, but leave the monitor in graphics mode. So if you wanted to, you could in principle type WIN and hit Enter to restart the GUI. Not sure how well that worked in practice. – a CVn Jun 20 '18 at 14:55
36

Was it really that hard to implement a self shut-off?

Yes. Yes it was.

Until Windows 95, all power switches were that - a switch. On or off, nothing else, and there was no "self shut-off". Nor was there a requirement for it.

The advent of Windows 95 and the possibility of the system saving state before shutting down cleanly created a market requirement for power-off to be controlled by software. This led to the development of the standardised ACPI interface and ATX power supplies to implement the new requirement, a year after Win95 had exposed the need for it.

But until this had been designed, implemented in the OS, and implemented in the BIOS, of course the only way of powering off your PC was with the on/off switch. Hence the famous message.

  • 7
    Under DOS the file system was always up to date, so you didn't have to go through a shutdown procedure. All you had to do was turn the thing off. What's what Windows 95 changed, and the hardware eventually changed to match. +1. – Pete Becker Jun 21 '18 at 16:57
  • 1
    Wow, I had no idea about this. This seems like the real answer. Thanks! +1 – Mehrdad Jun 21 '18 at 18:08
  • 1
    @PeteBecker : That depends. SMARTDRV /N much? docs – Eric Towers Jun 22 '18 at 2:12
  • 1
    @Pete Becker - That's what I always thought - to save disk cache in memory. There where two exceptions. After disk compression started to be used on DOS machines, turning the computer off during encryption or compression could render the entire hard drive useless. You just waited until the drive light stopped flickering. – jwzumwalt Jun 22 '18 at 5:08
  • 1
    @jwzumwalt -- good point about disk compression. My rule was to wait until everything I'd started had finished before turning the machine off. The change with Windows was that you also had to wait until everything Windows had started had finished. – Pete Becker Jun 22 '18 at 15:25
6

The versions of Windows that displayed that message used the FAT filesystem. FAT does not have any atomic write capability - that is, if power is lost while data is being written it can corrupt the filesystem. This was such a common problem that Microsoft included a tool (chkdsk) that would detect and attempt to fix it every time the machine booted.

To avoid this happening users were told not to simply turn their computers off. Other systems around at that time, such as the Amiga, Mac and DOS based PCs, could simply be turned off when the user was finished using them, with a few caveats such as waiting for floppy drive lights to go out. Windows 95 introduced virtual memory and write caching for performance reasons, which required a clean shut down to avoid filesystem corruption.

Since older AT machines could not power themselves off like newer ATX ones could, Windows would display this message when it was ready to be switched off.

  • 8
    Corruption is a possibility in any system when powered off without warning, regardless of the file system — some file systems handle it better than others, but there’s no absolute guarantee. Also, Macs couldn’t be switched off just like that, you had to shut them down properly. The page file wasn’t a source of corruption because its allocation never changed (and that’s what FAT cares about). – Stephen Kitt Jun 20 '18 at 9:15
  • 4
    @StephenKitt Corruption at the file system level is not nearly as big a deal as corruption at the application level. I've never seen corruption of the file system arising from sudden power loss that couldn't be fixed with fsck or equivalent. But if you pull the plug before the application has finished saving your data or before the data has been flushed from the cache onto the physical disk, you will never see that data again. Furhthermore, it could leave you with files that are perfectly fine at the file system level but corrupted from the application's POV. – JeremyP Jun 20 '18 at 9:49
  • 2
    @user we have had file systems with atomic semantics for decades, but no file system can fully handle sudden loss of power on its own. Systems which handle loss of power have additional hardware to do so: UPSs, disk caches with battery backups or flash storage, etc. Current Windows still runs its version of CHKDSK on boot; if it was truly resistant as you claim, it wouldn’t need to... In any case, JeremyP’s point stands, and file system coherence isn’t sufficient — you need the applications to have finished writing too. – Stephen Kitt Jun 20 '18 at 10:29
  • 3
    @user The logging feature of the modern Windows NTFS implementation only protects metadata, not the data in files themselves. Unexpected power loss can still cause corruption of data. – Ross Ridge Jun 20 '18 at 14:53
  • 6
    An important difference between Windows 95 and most common Windows 3.1 installations is that the latter would generally only write to disk in response to user actions; the system would be unlikely to spontaneously start writing data to disk at unpredictable times. Under Windows 95, there was no general way to predict whether the system might start writing data to disk just as one was about to hit the switch. – supercat Jun 20 '18 at 21:27
-1

This was purely a PC thing. Older retro computers (8/16 Bit Homecomputer) had always physical switches you needed to operate manually. Also as they were missing HDs, you could switch them off anytime (risking only to break the current floppy if it was just written to).

PC was build from standard components and a lot of manufacturers needed to cooperate:

  • mainboards needed to support the feature
  • cases needed to support that "new powerswitch"
  • OS needs to have a "driver" to switch off and on
  • CPU (?)
  • may forgot more components here

The first implementation was called APM (Advanced Power Management) and was defined by Microsoft and Intel in January 1992 (1.0), 1.1 was released in September 1993 and 1.2 was released in 1996.
APM was succeeded by ACPI(Advanced Configuration and Power Interface) in December 1996 which also added functions for HW detection (for example Multiprocessor environment and Plug and Play).

  • 8
    This answer is really vague and you haven't talked about ATX motherboard which was a game changer for such feature. – Aybe Jun 20 '18 at 7:57
  • 6
    The Macintosh II had a software power-off function in 1988. One common source of annoyance was that the shutdown and restart options were right next to each other, so if the mouse slipped while trying to select "Shut off", one would have to wait for a reboot before trying again. One clever solution to this was an INIT (startup program) which would check if Option was held, and shut off the system if so. In any case, all of this came long before Windows 95. – supercat Jun 20 '18 at 14:49
  • 1
    I'm pretty sure APM allowed for software to turn off the computer, and APM came before ACPI. – a CVn Jun 20 '18 at 17:45
  • @Michael yes, APM 1.2 provided this ability, ten months before ACPI was published. – Stephen Kitt Jun 21 '18 at 18:11
  • I think this is the best and most clear answer, despite the voting scores. It is particularly funny that the topvoted answer thinks that ATX was created by the Win95... – peterh Jun 23 '18 at 1:24

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.