22

Like many people, I run dual systems on my computer. Important updates require constant reboots on Windows, while I don't think this ever happened to me on Linux. What properties of each OS decides whether or not this is possible?

5
  • 5
    I still have to reboot my Linux systems to install a kernel update. I know there are ways around even that, but I don't require such extreme uptime. While there's rarely a kernel update for my servers or long-term-support installations, I do get occasional kernel updates on my more bleeding edge systems – I don't see much of a difference between Linux and Windows here. However, Linux updates are way less obstructive than Windows updates, since they don't turn rebooting into a waiting game. – amon Oct 14 '15 at 18:40
  • 1
    Well, actually... 1. This is less of a problem with Windows today than it used to be. When it does happen, it's usually because someone forgot to close an application that's locking some files that Windows needs to update, and rather than failing the install, Windows simply registers those file changes for the next boot. 2. A cold restart on my current machine running Windows 10 takes about 15 seconds, half of which is POST time. – Robert Harvey Oct 14 '15 at 20:09
  • @Robert-What is your definition of finishing startup? Getting to the login/desktop screen isn't so bad, it's waiting for all those services to get started so you can actually use the computer that is a pain. If your time includes starting the services then what is your setup? Granted I don't have the latest and greatest but I do have decent enough computers and my work computer takes about 3 minutes and my home about 2 1/2 before I can start working on them. – Dunk Oct 14 '15 at 20:15
  • @Dunk: Buy an SSD. – Ben Voigt Oct 14 '15 at 20:58
  • @Ben-I am not next in line at my house for a new computer but my son is. So I'll be building him one for Christmas and will check it out first hand. However, benchmark test reports that I've read show about 50% speed improvements, not 1000% like Robert sees over my systems. 1000% is definitately worth the hassle of an upgrade. 50% not so much. – Dunk Oct 14 '15 at 21:05
50

It's a consequence of engineering decisions.

On a Linux system, it's possible to delete a file that's still in use; the file system uses what's essentially a form of reference counting, and having the file open is simply another reference to it. When you close it, the file will be cleaned up. As a consequence of this, it's possible to replace core OS code and data files without needing to shut them down and restart them (aka reboot).

On Windows, opening a file locks it in the file system, and it can't be deleted. This means that currently-running code can't be updated without a reboot. But this also means that you can always know exactly what version is running on your system; under the Linux model, it's possible to receive an important system software update, successfully apply it, and still not have it operational on your system, because the old, un-updated version is still running.

It's an engineering tradeoff, like most things in computing.

22
  • 6
    @Ian No, you can restart your services to apply the updates. Or, in the case of the kernel, you can use ksplice, kpatch, etc., or the new features in Linux 4.0. – nanny Oct 14 '15 at 19:13
  • 2
    @Deduplicator, sure; I'm just pessimistic about adoption rate. One development team I work with has announced that they're no longer going to accept any patches adding support for optional systemd features after a bug in sufficiently ancient systemd releases' notify-socket-based-watchdog support resulted in a new copy of their daemon being spun up (in addition to the old ones!) once a second. – Charles Duffy Oct 14 '15 at 20:53
  • 1
    @krlmlr: That doesn't allow you to delete a file that's open. From the documentation: "The DeleteFile function marks a file for deletion on close. Therefore, the file deletion does not occur until the last handle to the file is closed" You can still replace it, using MoveFile to get the old one out of the way. – Ben Voigt Oct 14 '15 at 21:02
  • 1
    @Ian, by "trivial" I mean anyone responsible for building a Linux distribution's update system will know how to make it happen off the top of their head, so the question becomes whether it's a good idea to run automatically (or how to expose it to the user), not whether it's possible. – Charles Duffy Oct 14 '15 at 21:55
  • 2
    @CharlesDuffy I don't know how it works under the hood, but the Debian needrestart package does the job you are describing, i.e. automatically restart services whose executables/libraries have just been updated. – zwol Oct 14 '15 at 23:38
4

It's a consequence of view of predicted user expectations.

Linux systems are modeled after unix run on servers. Uptime was a bragging point in these communities. Anything that reduced up time was bad. And this is a side effect of the expectation that the computer had multiple users and that scheduling downtime had to be coordinated with multiple users.

Windows was designed for the pc market. At the time that it was introduced the knowing that you could quit one program and start another without rebooting was the sign of an experienced computer user. Because of this there was no reason to not use filenames as the primary identifier when designing ntfs.

Not the answer you're looking for? Browse other questions tagged or ask your own question.