Follow

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

Original post: bune.city/2019/05/lynne-teache

***

There are many different system files that Windows needs in order to function. These files are often updated using Windows Update to add new features, fix bugs, patch security issues, and more.

Windows is unable to replace these files while they’re in use. This is for numerous reasons, both technical and practical.

If an update specifies that file X needs to be replaced, and file X is being used by a critical system process, then we have an issue. Closing the critical process would cause Windows to stop working, which is obviously unacceptable behaviour. There’s no way to switch the old version of file X with the new one while the critical process is running, but Windows needs that process.

The only way to safely stop the critical process is to restart Windows. Updated can either be applied before or after you restart. Windows will ensure that the critical process isn’t running yet, replace file X, and then start up normally. Windows can’t start up properly until the new version of file X is in place, so you can’t use Windows while it’s updating.

Not all updates require a restart. Windows Vista introduced a feature that allows system files to be replaced while the system is running under certain conditions. If an update replaces a non-critical file, or a file your computer isn’t using, it’s not necessary to restart.

Unix-based systems like macOS and Linux don’t need to reboot as often, due to the way they handle loading files. In short, Unix systems load critical files in memory and don’t depend on the version on the hard drive, while Windows depends on the files on the hard drive staying the same. If a critical file on Linux needs to be updated, the system will simply swap the old version with the new one while running. Currently running processes will use the old version, but new processes will use the new file. Replacing certain files still requires rebooting. This does, however, pose a security risk, and rebooting to ensure the new files are loaded is still recommended, even if it’s not technically required.

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@lynnesbian this is the reason Fedora asks you to reboot for update about once a week, it?s just more safe and reliable.

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@charlag @lynnesbian Given these two constraints/approaches, how would updates work on *nix servers if they're both uptime- and security-critical?

[Also: best LTT post ('episode'?) so far!]

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@ej @lynnesbian there are some sophisticated things (Canonical even sells one), I guess you have to restart it part by part.
Also, any uptime-critical thing must be redundant, that's 101

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@charlag @lynnesbian The services must be redundant, sure - but the actual server, too? Like, is it considered acceptable to periodically failover during updates?

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@charlag @lynnesbian "Restart it part by part": Oooh! Just made the connection to those sea creatures that put their different brain areas to sleep one at a time..

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@ej @lynnesbian I think it's normal to load balance things between them and use others during downtime.
Can't tell you details tho.

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@charlag @lynnesbian Haha, no worries! And 'fanks - 'tis way more than I knew before!

Lynne Teaches Tech: Why does Windows need to restart to install updates so often? (longish, serious) 

@lynnesbian the part of this I never really got was why windows maintains locks on executables (and DLLs I guess?) instead of just loading them into memory and leaving the files-on-disk alone

Sign in to participate in the conversation
Lynnestodon

@lynnesbian@fedi.lynnesbian.space's anti-chud pro-skub instance for funtimes