TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Why can't computers boot instantly? (2013)

146 点作者 anon35将近 6 年前

33 条评论

diego将近 6 年前
That is not a good answer. It&#x27;s perfectly possible for computers to boot in a fraction of a second.<p>The argument that computers need to go from a useless state S0 to a useful state S1 and <i>that takes a long time</i> is just bullshit. The question is, how close can you bring S0 to S1. This is a question of optimization. What happens is that S1 is different for different computer configurations, and processing needs to happen. Then the question becomes, how much effort do software companies spend optimizing that processing? The answer is &quot;as much as they feel that they need to.&quot;<p>Computer boot times have been constant over many years because performance gains enable companies to add more features. As long as the boot time stays within tolerable bounds for the typical user, there is no need to optimize further. But there are tons of other computer systems in the world (particularly embedded) that must boot instantly, and they do so.
评论 #20254992 未加载
评论 #20255705 未加载
评论 #20258736 未加载
评论 #20255952 未加载
argimenes将近 6 年前
When I was in high school their Amiga would cold boot into a GUI within 3 seconds. It was the same for the Acorn Archimedes in the UK. These computers had the entire GUI OS burnt into the ROM. After that I remember the shock or getting a 386 and waiting minutes for Windows 95 to load. It was like the future had died and was buried by a conspiracy of silence in the industry.
评论 #20258362 未加载
评论 #20258186 未加载
评论 #20259338 未加载
评论 #20255402 未加载
评论 #20258631 未加载
bane将近 6 年前
All of the answers here are missing something. In the old days, the OS was often on a ROM that was simply mapped into some unified memory location. Thus the system went from a state of &quot;off&quot; to &quot;ready to go&quot; pretty much immediately. There wasn&#x27;t a need to copy the data from the ROM to RAM and then execute some stuff to get into an initialized mode.<p>If you hunt around a bit for things like &quot;atari 800 memory map&quot; you can find diagrams showing how this all worked. In fact on some systems, you could selectively map certain things from ROM into the memory map to get more RAM if you wanted.<p>Today, the move to put the OS onto disk, the memory hierarchy, and virtual memory eliminate this approach. You basically have to let the virtual memory system map things from disk into some page space, and often things need to be copied into RAM, work their way up the cache hierarchy and be executed somewhere in order to set the system into an initialized state. I&#x27;ve honestly forgotten nearly all of the details so maybe somebody else can provide a better explanation.<p>So the reason computer can&#x27;t boot instantly:<p>1) We have a complex memory system these days that prevent mapping the OS into the memory address space.<p>2) OS&#x27;s aren&#x27;t in ROM anymore. They sit on disk in a state different than when under operation.<p>3) Simple engineering willpower. Nobody wants to bother to figure it out because once the system is booted it doesn&#x27;t really matter (with modern sleep modes and whatnot).
评论 #20258331 未加载
评论 #20259126 未加载
评论 #20263190 未加载
kstenerud将近 6 年前
There are a number of reasons:<p>1. Hardware<p>Hardware is a big problem for boot times. Most hardware is poorly standardized, or not standardized at all, or doesn&#x27;t even follow the standards, or tries to be backwards compatible with older hardware, or is just plain buggy. This means that the initialization code has to poll and retry and work around a whole bunch of things just in case the hardware happens to be slow in responding or gives a weird response. This is the main reason why POST is so godawful slow, and why the initial linux boot sequence takes so long. Apple hardware can boot quicker because they control what hardware is in the machine and can optimize their initialization code for it.<p>2. Software<p>The operating system stack is HUGE. There&#x27;s a LOT of state that needs to be initialized, and most of it is not very efficient (we tend to optimize the runtime operation vs the startup operation of a software package). You absolutely could cut the software component of an OS boot sequence by an order of magnitude, but the development costs would be massive, and the gains pathetic in terms of the work-over-time the machine will do over its lifespan.<p>3. Protocols<p>A large number of the protocols we use for inter-process and inter-device communication have poorly designed latency characteristics. Either they are too chatty (requiring multiple messages back and forth to do a task), or have ill-defined timeouts (requiring clients to wait longer than they should), or ambiguous states, or some poorly built implementation has become the de facto standard. This is an area I&#x27;m personally tackling.<p>4. Formats<p>We use a number of formats for the wrong kinds of things. Appending to a tgz file, for example, has horrendous time implications, especially as the archive size grows.
评论 #20259798 未加载
verisimilitudes将近 6 年前
Windows is a bloated mess, so it&#x27;s obvious there.<p>As for anything POSIX, it&#x27;s because UNIX is shitware; it took a long time to boot decades ago and it takes a long time to boot now, because more garbage has been piled on top.<p>It&#x27;s possible for a good operating system to boot in less than a second, however. People have simply been conditioned to accept this unacceptable state of affairs, no different than a TV that takes ten seconds to become usable for no reason other than the manufacturer was lazy.
评论 #20254381 未加载
评论 #20254879 未加载
评论 #20255195 未加载
评论 #20254133 未加载
评论 #20257374 未加载
评论 #20258067 未加载
评论 #20254039 未加载
mojuba将近 6 年前
A bigger question for me is, why can&#x27;t monitors boot instantly? So annoying that a monitor that went to sleep can sometimes take 10-20 seconds <i>longer</i> to wake up than the computer it is attached to.
评论 #20254088 未加载
评论 #20255231 未加载
评论 #20265706 未加载
评论 #20255423 未加载
CGamesPlay将近 6 年前
A lot of these answers are why computers <i>don’t</i> boot instantly but none really talk about why they <i>can’t</i>. The accepted answer talks about it on a physical&#x2F;mechanical level but eschews practicality: what can’t computers boot arbitrarily quickly?
评论 #20254389 未加载
评论 #20254502 未加载
kerkeslager将近 6 年前
I remember when Ubuntu was first becoming popular. At the time, Windows boot times were long--I don&#x27;t have timings, but my memory seems to say something like 5 minutes. And Intel processors were in the middle of their highest-energy-use period, so they ran <i>hot</i>, meaning you couldn&#x27;t just leave your laptop on all the time. So reboot time was a significant part of my experience as a Windows user. When I first booted Ubuntu, the boot time was fast, something like a 1 minute, and later I tried Xubuntu which was closer to 30 seconds. This was an advertised advantage of Ubuntu, and it was a big part of why that was &quot;the year of desktop Linux&quot; (if only for me).<p>In the following years, I noticed significant improvements both to boot times in Windows and to their &quot;sleep&quot;-type features. I suspect this was motivated at least in part by competition from Ubuntu.
评论 #20258081 未加载
mehrdadn将近 6 年前
More interesting question to me is why the hell some firmware boots take so long now. I know laptops from years ago much, much faster than what I have now, which is otherwise much faster than them. And the firmware initialization times for some servers I&#x27;ve seen seem completely obscene (on the order of minutes).
评论 #20253923 未加载
评论 #20254122 未加载
评论 #20253968 未加载
ohiovr将近 6 年前
My POST sequence takes longer than the boot process so no matter how blazing fast my drives are it still takes a long time to get to the boot loader.
评论 #20254861 未加载
air7将近 6 年前
This is a good question, and the &quot;answer&quot; avoid it by essentially saying &quot;it can&#x27;t be zero.&quot;<p>Why does boot time take ~10 seconds? CPUs run in GHz, meaning 10^9 operations per second. That means that booting takes around 10^10 operations. Why that order of magnitude and not any other? Obvious answer is &quot;that&#x27;s where the optimization efforts stopped&quot;, but could it be 10^9 or 10^8?<p>Obviously booting time isn&#x27;t just (or mostly) CPU, but the question extends to other peripherals: Harddrives access is in the 10^8 B&#x2F;s range. RAM is 10^9 B&#x2F;s. USB ~ 10^7 B&#x2F;s. Wifi 10^6 B&#x2F;s. etc. Why does booting, with all it&#x27;s internal sub processes still take ~ 10^1 seconds and not any other OoM?
评论 #20256858 未加载
jokoon将近 6 年前
Further question would be:<p>&quot;If I saved all my work, why do I need to properly shut down my computer? Why does it take so long to shut down?&quot;
Bakary将近 6 年前
A silver lining of long boot times is that you can contemplate what you are about to use the computer for and catch yourself in the middle of a habit loop.
评论 #20260419 未加载
评论 #20256059 未加载
评论 #20254961 未加载
swebs将近 6 年前
&gt;When you turn on your computer, it instantly executes code in BIOS or UEFI boot manager. It doesn&#x27;t take much time to execute BIOS or UEFI boot manager. It will initialize your hardware, scan your storage devices for operating system, and run the operating system. It is usually the operating system that requires much time for loading.<p>Eh, it takes from 10-15 seconds on my computer from pressing the power button to getting to GRUB. After that, it&#x27;s only another 10 seconds or so to boot Ubuntu.
评论 #20254941 未加载
basicplus2将近 6 年前
My old valve televisions are up and running long before ANY smart tv, AND its quicker to change channels
vilhelm_s将近 6 年前
It could probably be faster if people cared to optimize it, e.g. some experiments to boot an embedded linux system to the console prompt in less than 1 second (<a href="https:&#x2F;&#x2F;fossforce.com&#x2F;2017&#x2F;01&#x2F;linux-zero-boot-second&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fossforce.com&#x2F;2017&#x2F;01&#x2F;linux-zero-boot-second&#x2F;</a>), or to the Qt Camera Preview app in 3 seconds (<a href="https:&#x2F;&#x2F;www.e-consystems.com&#x2F;Articles&#x2F;Product-Design&#x2F;Linux-Boot-Time-Optimization-Techniques.asp" rel="nofollow">https:&#x2F;&#x2F;www.e-consystems.com&#x2F;Articles&#x2F;Product-Design&#x2F;Linux-B...</a>) or to a Debian desktop in &quot;5 seconds&quot; (<a href="https:&#x2F;&#x2F;wiki.debian.org&#x2F;BootProcessSpeedup#Tests_results_of_users" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;BootProcessSpeedup#Tests_results_of_...</a>).
cookingrobot将近 6 年前
Here&#x27;s a proposal.. Don&#x27;t do any network stuff during boot, and don&#x27;t let it depend on anything super volatile like user files. Then store the boot memory state as an image (like a hyberfile). Whenever a bigger change happens to the system that will affect the boot state, like installing a new driver, or an app that has any kind of background service, recreate a new boot image. But do it right away when the new app is installed, don&#x27;t wait for the next boot, or shutdown (which is annoying), just do it in a virtual machine right away as part of the app&#x2F;driver install. Installing impactful apps will take longer, but that can happen in the background and is not too disruptive, and doesn&#x27;t happen very often anyway.
kzrdude将近 6 年前
I&#x27;m pretty happy with boot times, the longest wait is the boot loader and inputting the password. (Linux with full disk encryption).
MrQuincle将近 6 年前
The more optimization in boot times, the higher the maintenance burden.<p>I think this can only be solved on an architectural level by introducing &quot;specialization&quot; in a &quot;general&quot; manner. In other words, have a supervising process monitor times and adjust the system to the local hardware and software demands. The adjustments to be good probably require some kind of learning mechanisms, which you also don&#x27;t want to have in a kernel itself. Just my two cents.
usernam33将近 6 年前
This reminds me of something I read about memristors. Once they get cheap and fast enough to be sold in gb or tb sticks they might replace ram and ssd&#x27;s&#x2F;hdd&#x27;s for some computers. This would allow a computer to boot once (at the factory) and then just return to the state it was when powered on again.
fulafel将近 6 年前
Trivia: some compuers have a single level memory store, so there are no separate disk and ram concepts from se PoV. I think as&#x2F;400 and maybe Multics are like this. But i don&#x27;t know if they boot instantly from whete they left off, probably not. It would be within relatively easy reach though.
评论 #20256639 未加载
gregw2将近 6 年前
If computer makers put the OS in ROM memory rather than RAM and had a well defined way of overlaying the two so the ROM state could seem to be modified by writes to RAM, you could get instant boot. Early PCs worked that way like the Commodore64, right?
评论 #20254725 未加载
评论 #20260468 未加载
sansnomme将近 6 年前
I have a question too: why does radios take so long to start up and acquire a signal? Same for other I&#x2F;O devices similar to radios,on the embedded side you have keep on polling until finally it acquires the signal.
评论 #20254536 未加载
tbyehl将近 6 年前
What gets me is how long servers take to reach the bootloader from power on. Your average modern Dell&#x2F;HP desktop or laptop is there within a second or two, Windows 10 and systemd-based Linux distros on SSD can be at the login prompt within 5 seconds total. I haven&#x27;t touched a Mac in a long time but I&#x27;d bet they&#x27;re no worse.<p>But a typical server BIOS takes 3-5 minutes do its thing. If you&#x27;re lucky you might be able to disable enough stuff to shave off a minute. Insanity.
评论 #20260437 未加载
Doubl将近 6 年前
Hibernate is my preferred option when going off the computer but Windows doesn&#x27;t offer it out of the box and more. You have to tweak settings. Why is that I wonder?
评论 #20261405 未加载
评论 #20258975 未加载
bin0将近 6 年前
Let me take a moment to vent on the garbage that is the dell UEFI firmware. I have an excellent, new machine, an XPS 15 9570. According to systemd-analyze, it took eight seconds to get past firmware, corroborated by my observations. There is flat-out no reason why it ought to be so slow. Dell makes the absolute worst BIOS.
mschuster91将近 6 年前
You can do warm boot images (Sony&#x27;s Linux-based Alpha cameras do this, for example), but these have to be tailor-made for each model... feasible for a camera manufacturer, impossible for a Linux distribution.<p>But I do wonder why WBI generation and automatic usage upon first boot isn&#x27;t more common (or possible at all)...
评论 #20254891 未加载
lazyjones将近 6 年前
All this guessing and conjecture is pointless. Someone should simply measure what takes so long with the profiling tools available and post an analysis.
jasonhansel将近 6 年前
The real answer: the cost (in developer time) of making computers that boot instantly is too high to justify the benefits.
评论 #20256180 未加载
thrownhwn将近 6 年前
Has someone explored the area of writing software that spits out resume from disk images?
评论 #20254252 未加载
niklasd将近 6 年前
The link in the answer titled &quot;state machines&quot; is a bit misleading, since it directs to the Wikipedia entry about Finite-state machines. But most computers (the ones we are talking about here) are Turing complete rather than being a (computationally much more limited) finite-state machine.
评论 #20255594 未加载
评论 #20254816 未加载
thecopy将近 6 年前
Because of state.
imtringued将近 6 年前
Because everything takes non zero time. If a state transition from turned off to booted takes no time then doesn&#x27;t that mean there is no state transition at all? The only way for it to take zero time for a computer to boot is if it is already booted or there is no difference between an unbooted computer and a booted one.<p>How much time does it take for a circle to become round? None at all. It happened instantly.
评论 #20254281 未加载