Why does Windows need to restart every time it updates while Linux doesn't?

15,230

Solution 1

Restarts are sometimes a necessary evil when an update installs on windows, simply because the files that need to be updated are in use and can't be modified until the PC reboots. On other hand, a linux system can be upgraded in real time while it is working and still have a hundred percent uptime and all that needs to be done to start using the upgraded program is to restart it. It all comes down to how linux and the file system handles files. When linux runs an executable, it loads the whole file into memory and accesses it from there. This means that there is no connection to the physical file on the disk drive. When the program is closed and all connections to the file are cut, the file is deleted from memory so while the program is running, from memory, the physical file on the disk can be updated or changed at will and the running program is not affected.

Now Microsoft claims that Win 8 OS requires fewer restarts after a patch, bug fix, or other Windows update finishes installing as it will consolidate all restarts for the month to coordinate on the day of Microsoft's familiar Patch Tuesday. This means that any update requiring a restart will wait until the second Tuesday of each month, essentially prompting you to reboot your PC only once a month. Exceptions would be made only in the case of critical security updates that need to be applied immediately.

Solution 2

Windows doesn't ask to reboot every time an update is installed. For example, it doesn't ask to reboot if the definitions for Windows Defender are updated, using Windows Update, or it doesn't ask to reboot when a new device and the related driver is installed/updated. In the latest versions of OS, the restart is strictly required in case of major updates, like security updates for the system or its modules, like updates for .NET Framework.

The reason of the restarts in Windows is that Windows isn't able to update important files while they're in use, because they're locked while the OS is running. When the OS restarts, the files doesn't have a lock and they could be overwritten and updated. The difference with Linux is the different architecture. While Windows locks its important files, Linux doesn't and the files could be updated or deleted in an easier way than Windows. For this reason, Linux asks the user to reboot only few times.

Share:
15,230

Related videos on Youtube

kmonsoor
Author by

kmonsoor

Updated on September 18, 2022

Comments

  • kmonsoor
    kmonsoor almost 2 years

    Even the smallest update of one package or security patch makes Windows need to restart. Why?

    If an anti-virus application doesn't need it after patch update, why Windows need it after updating Security Essentials' virus-signature files?

    On the other hand, Linux mostly doesn't need it except when it upgrades its kernel.

    Note: I am talking especially about Windows 7. I don't know much about Windows 8, or the Server editions.

    • Keltari
      Keltari over 10 years
      This explains it in a nutshell: howtogeek.com/182817/…
    • luchonacho
      luchonacho almost 4 years
      When someone thinks exactly the same question than you do... I'm amazed there aren't better, more robust answers.
  • Onkelborg
    Onkelborg over 10 years
    The processes that are already running (on Linux) during the upgrade, they will continue to be security risks until they are restarted - the 100% uptime has to be broken unless you have redundancy and a load balancer. (However, restarting a single process will probably generate a very short downtime compared to restarting the whole computer.) (Most people tend to "forget" about this, maybe remembering that the kernel need a reboot, but not the processes.)
  • JdeBP
    JdeBP over 10 years
    The part about loading executables wholly into memory is wrong. Rather, one can remove all links to the program image file(s) of a running executable.
  • stuckj
    stuckj over 6 years
    I don't buy this. I just installed an update to adobe flash. That was the only update. And it's asking to restart my computer. For flash. It's basically a browser plugin. Not a system process. <sigh> Having run Linux for years as my primary OS And only recently switched back to Windows...I'm beginning to remember why I hated running Windows.
  • Basic
    Basic almost 6 years
    Windows already has shadow copies, and if having handles to a file on disk is the only issue, it seems like on that should be simple to address. I'd imagine routing calls to the new kernel would likely be a bigger problem, but other OSes have cracked that too, so it's hard not to conclude Microsoft has been caught short by how frequently they need to patch and havent bothered to out a system that's fit for purpose into place.
  • kbolino
    kbolino almost 4 years
    This is a good explanation of why a single update can need a single restart. It doesn't explain why a single update can need multiple restarts (I saw around 5, for example, on the latest Windows 10 update). Even 2 makes some sense, one to enter a safe mode then another to return to normal mode, but not 3+.
  • Moab
    Moab almost 4 years
    Some Registry changes do not go into effect until restart is the main reason windows needs to restart and Linux does not