Why can't turning a computer on be analogous to turning on a light?

The process relationship of BIOS, boot, OS load, etc. is understood. That is the way the system is designed…
Unlike a light; To actually be ready for use, three minutes after “turning the switch on”.

My question is why, in this day and age of dirt cheap volatile and non volatile memory, are computers still
relegated to starting up like a 1920’s hand-crank Ford? The whole acquisition-load process, over and over again,
for every startup, seems quaint like an old Ford, but unnecessary.

Because there’s no point in changing.
The boot process is useful - it allows the user to decide what configuration to run, what devices to load, and for driver updates to get installed (among lots of other things).
Ever use an iPad? It only “boots” after a major update - otherwise it’s state is stored, and it sleeps. It’s available instantly when it’s woken up, and it can sleep on battery power for weeks.

That’s the model that is being followed today.

I have a machine that hasn’t been rebooted in 7 years (granted, I haven’t done any system updates to it in that time). I don’t understand people who shut their machine down every night - my goal is to never reboot my Macs - they sleep when not in use, and are available instantly when I need them.

Just set your PC to hibernate or sleep instead of powering off. My PCs only reboot after an update.

Short answer: Because computers can operate in a lot more states than light bulbs can, and it takes time from a cold start to transition through the vast state space to a useful state.

A lot of work has been done in the last decade or so to make cold reboots a lot less necessary, by introducing a “sleep” state that consumes less power but retains system state so it doesn’t have to be reconstructed from scratch, and making the software and OS more reliable so it more rarely transitions to an undesired state that you can’t get out of except with a cold reboot. In a great number of cases waking a computer from a sleep state is as fast as flicking a light switch (maybe with a fluorescent bulb on the other end :slight_smile: ).

Lots of points:

  1. To some extent, that’s the price you pay for plug-and-play convenience: in order to detect newly-added (or removed) hardware on startup, the system does have to look for it.

  2. With the advent of reliable sleep and hibernate, lots of people rarely actually boot their computers. If you only boot your computer, say, once a month (to install OS updates) it doesn’t matter so much if it takes 30 seconds to boot or 3 minutes.

  3. Tons of effort does get put in to optimizing the boot process and decreasing boot times. Windows 8, for example, introduced new feature called “fast boot” that lets it do much of that initialization once and then save the results for future boots: http://blogs.msdn.com/b/olivnie/archive/2012/12/14/windows-8-fast-boot.aspx

  4. Some of the slowness is from extra junk OEMs add that runs on startup. Try a clean install from MS install media and you’ll typically see a big difference.

  5. Some of it it due to the new features/services of new OSes. Run an older OS like XP on a brand new machine with lots of RAM and a fast SSD and it will start very quickly.

there are operating systems that can boot very fast. solid state memory will also speed things up.

you could be up in seconds.

I’ve got an SSD, and Opensuse greatly decreased boot time the last few versions, Boot time is about 15 seconds, log-in time ( to whatever environment selected as autologin ) is maybe 50 seconds with KDE.

I only turn it off for big upgrades, and one can cut the log-in time by turning off unneeded services. And other tweaks applicable to your OS, and hardware ( such as the SSD ).

You also need to consider that as computers have gotten faster, operating systems have gotten more complex. Of you had a modern computer and it was running DOS 5.0, it would start up pretty damn quickly.

I run Mac OS 9 in an emulator under OS X.
Even though it is going through two layers of emulation (different processor / different OS), it still boots the virtual machine about 5x as fast as a real machine of that era.

Though the question has already been answered, herewith my 2¢ …

The tremendous complexity of computers is managed through hierarchical modularity, of hardware as well as software. The boot process reflects the ordered sequential activation of those hierarchical modules, which is (a) the only way to get things started initially, (b) is subsequently the only reliable structured way to manage certain kinds of changes, and © is a way to perform a complete reset should that be required.

In practice it isn’t an issue. Most desktop computers tend to be rarely rebooted. My laptop does, since I always shut it down, but with Win 7 and an SSD it boots in almost no time. (I can power up and boot the laptop and start a browser in about a quarter of the time it takes me just to start a browser on one of my clunker desktops!) My tablet takes an obnoxiously long time to boot, but there’s almost never any need to do so. Like a cat, it spends most of its life sleeping. Turning on (waking) the tablet is exactly like turning on a light.

3 minutes to boot?
You are clearly not using Linux :slight_smile:

My laptop takes 30~40" (Linux Mint Rebecca)
As does my desktop (Ubuntu Utopic Unicorn)

Windows7 was on the laptop when I bought it. Pain in the bum and slow to boot. Linux far and away faster.

I understand a computer is more complex system than a lightbulb. However, is it more complex than say, the entire power grid? Perhaps… Perhaps not.

The point is: Not which is more sophisticated, but rather, why the aforementioned computer functions are not held in stasis in a power down condition,
ready for instant use upon pressing the power button, as a light is when one throws the switch. To make a comparative generalization: When I initialize
my light bulb’s ON state, I don’t send a request to the power company to start mining coal, to somehow transport, to eventually generate power,
to have them subsequently install the necessary switchgear, to eventually route me to their power source… I simply turn it on. The forgone conclusion
is that by switching the light switch to ON, I want the light to turn on NOW, not LATER… Perchance the 37583 x 10 to the Nth power possibility
that I may desire something else.

Hibernation, sleep, low power, “never turning it off”, My computer really boots FAST", Et al, (Describe it as you choose) is an evasion of the fundamental question, and is the subject
of another discussion as to the pros and cons of each alternative, based on the existing operational architectures.

As to the explanation that the laborious start up process is required for the auto recognition of new devices, system and driver updates, etc., it is
my understanding that, the OS needs to be up and running PRIOR to these actions, not after. This seems to negate that reasoning, per the question at hand.

Heck, I may still have an old Commodore 64 that starts up faster than that (if it still starts up at all).

If you wanted a computer to start instantly from a completely powered off state, it would have to always keep almost every bit of information it uses in non-volatile memory (memory that doesn’t ‘forget’ when it has no power applied). As technology stands now, non-volatile memory (such as SSDs or flash drives) is slower than volatile memory (such as RAM), so such a computer would be slow.

That is a truly excellent way to operate. I think that I will do the same from now on.

While my iPad boots a h–l of a lot faster than other computers I have used, if I actually turn it off (hold down the button on top until prompted) it certainly doesn’t boot instantly when I turn it back on. Other computers can “sleep” too.

A lot of this is also simply accidents of history. Computers had nearly always had high speed volatile memory and low speed non-volatile. There was a time when computers were built with core memory - which was non-volatile. You could turn some of those off, and then on again, and potentially have it run exactly where it left off with essentially light switch performance.

But computers with volatile memory lose that when the power goes off. Modern machines can sleep, and keep the memory running with less power, and get the same effect as old machine with core memory, but if the power really does go the still lose all the volatile state. So when really powering up again that state has to be rebuilt. No matter what, that will take time. And modern computer operating systems set up a lot of initial state.

There is an intermediate way. As noted above you can get the operating system to create a lot of that state once, and store it on disk, ready for the next boot. You can, in principle, go further, and build a persistent operating system, one where the roles volatile and non-volatile memory are in a sense reversed. In most operating systems disk is viewed as a way of creating a file system where you explicitly put stuff you want to keep past the execution time of the program that created it. (The file system also does double duty by providing a name space for identifying stuff.) So there is an implicit divide between volatile and persistent state. The alternate view is to start with the notion of a large addressable persistent space, and regard volatile memory as a useful high speed cache of that space. So the state of your system is always what is on disk, and the operating system spends time ensuring that the in-memory state is reflected in a consistent image on disk. So loss of power will always leave an on disk image of a useful state of the system. (It might be a few seconds in the past from when you lost power, but it will be consistent and you can continue computing with it.) A system like this can, in principle, boot into an operating state almost instantly. It will be initially be a bit sluggish as it demand pages state from disk, but it will not be spending large amounts of time rebuilding state, and even your open programs can reopen where they were before.

The IBM AS400 was a commercial system that was close to this ideal, and there have been research systems built, plus some older systems, such as the Xerox Alto and successors, that came close. Plus the doomed Linn Reckursiv that was designed from the outset this way.

But history has pushed us the other way.

Off Topic: Having written firmware for SCSI drives on the AS400, I was think of that machine reading the rest of your comment.
Interesting architecture, for sure. Classic example of following the spec, but taking a bunch of options along the way that the other systems skipped. One of my first projects professionally - I learned a lot.

huh? Does the entire power grid just come up in an instant? No. it’s as you say a grid of interconnected generation sites. as far as a single power plant is concerned, it can take many hours for a single power plant to go from shutdown to generating useful power.

in many cases it is. “Sleep” or “standby” modes for modern PCs/Macs is exactly that. The state of system memory is maintained (the DRAM controller stays active to keep the contents of RAM alive,) the CPU is in a low-power state, and most other peripherals are off. When you “wake” the system, it more or less “picks up” where you left off though many operating systems will require your password to unlock it. But as has already been said, DRAM is volatile. It’s built based on capacitors, and it needs both power and a refresh signal to maintain its contents. if it loses power or the refresh signals, everything it held is gone.

“Hibernate” means the system transfers the entire contents of RAM to the hard drive, then completely shuts the system down. But when you wake it from hibernate, it takes time for it to transfer everything back from the drive to RAM.

but even this isn’t instant. Why? few reasons. one is the system power supply. at least for a desktop PC, when it’s asleep the remaining functions are powered solely through the +5 volt standby feed from the power supply. At wake, the power supply is signaled to turn on all of its outputs, which means the system has to wait for the “PWR_OK” output to go high before everything turns on. Plus, if you have a traditional hard drive, you need to wait for the platters to come up to normal rotating speed.

that’s because when you flip a switch to turn on a light, all you’re doing is conducting power (which is already there) to a piece of tungsten wire which has no choice other than to glow white hot in an instant.

powering up a PC is a lot like the scenario you described. Pressing the power button on your PC sets these things in motion:

  1. the mainboard sees the power button press and pulls the PS_ON pin low.
  2. the power supply senses this and turns on all of its outputs.
  3. after verifying the power outputs are stable, the power supply asserts (pulls high) PWR_OK which signals the system it’s OK to start booting.
  4. the clock generator and PLLs on the mainboard power up and deliver the clock signals to whatever ICs need one
  5. the CPU powers up, and pulls code from the system firmware, transfers it to RAM, and executes it.
  6. the CPU finds the bootloader code from storage, and starts booting the OS (transferring OS code and data from storage to RAM.)
  7. the OS does whatever shit it needs to do, which entails transferring crap from disk to RAM. (this is the slow part. especially if you have a regular hard disk drive and not an SSD.)

Look, you’d do well to dispense with the fluffy language, it doesn’t make you look smart.

Look, the short answer to your question is that a light bulb comes on instantly because it’s nothing more than a damn piece of tungsten wire connected across a voltage/current supply which is already there. A computer is not a simple piece of wire. It has shit to do before it’s ready for you to fuck with it.

it really is just that simple.

For what it’s worth, light bulbs no longer “boot” as fast as they used to. LED bulbs (and to a lesser extent CFLs) have a sophisticated internal power supply. When you apply power, capacitors have to be charged, the switch-mode regulator IC comes up to operating frequency, and the light is not enabled until the voltage is stable.

The delay is small but noticeable. It could be fixed if lights were wired with three wires–two for an always-on hot and neutral wire, and a third for whether the light should be on or not. Or have a wireless system, though that introduces its own delay.

There is a remote possibility that we’ll get back to the “good old days” of core memory like Francis Vaughan described. There are a few types of memory out there that at least have the potential to be as fast as DRAM while still being non-volatile, and at an acceptable cost. FRAM and memristor memory are two that come to mind. Unfortunately, they’re still pretty far away from replacing DRAM and flash, and might never catch up.

Also, this doesn’t fix everything. Computers have a lot of state that isn’t in the memory, like registers and caches. You can keep the chip powered just enough to retain this state, but that takes power. You can store this state in your NV memory, but that takes time.