3 ms·
Why do you boot the system anyway? Wouldn't it be faster dump the memory of an already booted system and just read that in?
by im3w1l 3y ago
Why do you boot the system anyway? Wouldn't it be faster dump the memory of an already booted system and just read that in?
- hakfoo 3y agoThat paradigm used to be a thing for things like home-computer games-- the game might take 5 minutes for an anemic Commodore 1541 drive to load, so you'd use a "freeze" cartridge that snapshotted RAM after the load finished and produced something smaller; I suspect a major side appeal was that you bypassed copy-protection that involved the loading process. On a more complex system, with external devices active at all times, this gets a lot harder. It would be easy to take a snapshot at the "wrong" time when something is deadlocked on a timer or external device that won't be in an appropriate state at the next power on. A "boot" process ensures everything attached has been roused from their slumber and get them back to a known state. OTOH, I could imagine if you were designing to a specific enough use case, you could design a system that relied on a minimal support devices and a CPU that bit-banged almost everything, so you knew if you were in the idle loop, everything was safe to snapshot.
- RetroTechie 3y agoWould it? Read in small amount of code (or execute directly from flash) & use that to initialize hardware, might just be faster than read memory dump of already-initialized system. Also the "read memory dump" method would include code & data structures which were used on a previous run, but may not be needed for the next run (or only much later). And not re-initialize hardware which may have gone flaky, or changed configuration in the meanwhile (like USB port with different device plugged vs. state that memory dump reflects). Rebooting is just an all around cleaner method to return system to a known state. But of course it all depends on hardware specifics & what type(s) of initialization is done.
- im3w1l 3y agoThe context here is starting a vm really fast on aws firecracker, so those concerns about hardware don't apply.
- bux93 3y agoThat's what windows fast startup does, it starts from a post-boot hibernated state of RAM. Linux mint on the same laptop boots fully in less time.
- astrange 3y agoWould be insecure because nothing would be randomized, all your systems would have the same ASLR slide, etc.