# Why does Windows demand that I reboot?

**URL:** <https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716>\
**Category:** Factual Questions\
**Created:** [February 4, 2012, 2:17am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716 "2012-02-04T02:17:22Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![jz78817](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jz78817/32/1028_2.png) [@jz78817](https://boards.straightdope.com/u/jz78817)\
**Post date:** [February 6, 2012, 4:36pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/21 "2012-02-06T16:36:27Z")

</div>

> [@md2000](#):
>
> Of course, once a proram starts running, it reads these values. To simplify things, the entire registry is loaded into memory rather that go fetch from disk each time.

this is false; the files that make up the registry are demand-paged just like any other file:

> **[Registry VS File Philosophy](https://arstechnica.com/civis/threads/registry-vs-file-philosophy.1127464/#post-20990765)**
>
> CrackedCRT had said:
> What do OSX and Linux (Ubuntu for example) use instead of the registry? What is their solution to the issue, and what benefits/problems do these have?
> 
> The answer here is first: a distributed file hierarchy.
> Second: good global...

> **[Why do OS's slow down over time?](https://arstechnica.com/civis/threads/why-do-oss-slow-down-over-time.1125988/page-2#post-20976314)**
>
> Word has styles and style templates. You do NOT have to style everything in every document. If you build your template properly, the typeface is just as irrelevant in Word -- you can inherit all the styles' font from the Normal style.
> 
> At least in...

> **[cleaning index.dat folder](https://arstechnica.com/civis/threads/cleaning-index-dat-folder.81957/#post-2513301)**
>
> Once upon a time, I had a program to clean out the contents of the index.dat files. Somehow, it has gone missing. I have googled, and found several. Does anyone have a particular preference for a cleaner? I don't recognize any of them. I'm...

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [February 6, 2012, 5:29pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/22 "2012-02-06T17:29:35Z")

</div>

> [@Cerowyn](#):
>
> One of the major reasons that Windows has to be rebooted more often than Linux is a design decision that affects how files are used by the operating system. When Linux loads an executable file into memory, it uses the swap partition as virtual memory for that file (so that if parts of the file are not needed as part of virtual memory management, those parts are written to the swap partition for later retrieval). Windows, by contrast, uses the original file image as the swap file, so that it doesn’t have to write anything to storage when it is swapped out as part of virtual memory management. The downside is that Windows files cannot be over-written while they’re in use, because they are acting as the virtual memory swap space. When Windows requires files to be over-written that are in use, it stashes those operations in the registry, and then on the next re-boot, copies them over.

Do you have a cite for this? The way you have described it seems odd. For example “Windows uses the original file image as the swap file”. Eh? A swap file or page file is disk space that is used as if it were RAM. Simply reading directly from a regular file is not really using it as a swap file. I see the similarity of the idea, but I’ve never heard anybody talk about it in those terms.

---

<div class="post-metadata">

**Author:** ![Ximenean](https://avatars.discourse-cdn.com/v4/letter/x/aca169/32.png) [@Ximenean](https://boards.straightdope.com/u/Ximenean)\
**Post date:** [February 6, 2012, 5:39pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/23 "2012-02-06T17:39:46Z")

</div>

[This article](http://technet.microsoft.com/en-us/magazine/2008.11.windowsconfidential.aspx) by Raymond Chen, a Microsoft insider who has or had an excellent blog that explained the reasons behind a lot of Windows design features that people would criticise, seems to explain the real reason. In a nutshell, it’s not that Windows can’t replace DLLs on the fly. It’s just that, having considered the implications, they decided it was a bad idea to allow it. Presumably that means they think the way other OSes handle it is inferior.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [February 6, 2012, 6:14pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/24 "2012-02-06T18:14:49Z")

</div>

> [@Ximenean](#):
>
> [This article](http://technet.microsoft.com/en-us/magazine/2008.11.windowsconfidential.aspx) by Raymond Chen, a Microsoft insider who has or had an excellent blog that explained the reasons behind a lot of Windows design features that people would criticise, seems to explain the real reason. In a nutshell, it’s not that Windows can’t replace DLLs on the fly. It’s just that, having considered the implications, they decided it was a bad idea to allow it. Presumably that means they think the way other OSes handle it is inferior.

His explanation doesn’t make sense. If there’s something still referring to the old file’s methods, and it wasn’t updated, then it will still be referring to the old file’s methods after restart and still break. And if it was updated, why can’t it be updated in place, just like the DLL?

And, anyways, why is an updated version of the same DLL requiring a fundamental change in how that DLL works, anyways? Was not the entire concept of DLLs that they could be updated without affecting backwards compatibility? What good is updating a component that affects multiple programs if only one of those programs will be able to use that component?

---

<div class="post-metadata">

**Author:** ![md2000](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@md2000](https://boards.straightdope.com/u/md2000)\
**Post date:** [February 6, 2012, 6:16pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/25 "2012-02-06T18:16:50Z")

</div>

> [@Ximenean](#):
>
> Do you have a cite for this? The way you have described it seems odd. For example “Windows uses the original file image as the swap file”. Eh? A swap file or page file is disk space that is used as if it were RAM. Simply reading directly from a regular file is not really using it as a swap file. I see the similarity of the idea, but I’ve never heard anybody talk about it in those terms.

> [@Ximenean](#):
>
> [This article](http://technet.microsoft.com/en-us/magazine/2008.11.windowsconfidential.aspx) by Raymond Chen, a Microsoft insider who has or had an excellent blog that explained the reasons behind a lot of Windows design features that people would criticise, seems to explain the real reason. In a nutshell, it’s not that Windows can’t replace DLLs on the fly. It’s just that, having considered the implications, they decided it was a bad idea to allow it. Presumably that means they think the way other OSes handle it is inferior.

I believe what he meant was that Windows does not load entire DLL’s into RAM (which would then swap to the pagefile.sys), but just loads pointers; then loads only the DLL subroutines as needed into RAM. This is the danger, that the DLL gets changed, a completely different routine or one that requires different parameters is substitutd for the expected routine. Obviously, if you change a DLL you may have to change ALL the DLLs , you probably should completely restart the underlying program. If you write a program that never assumes anytihng, under what circumstances should it check for changes and what does it do if it finds inconsistencies? Restart? what if the rror is NOT an upgrade, but a database issue, mising network drive, or one of a hundred other issues? Continuously restart? Quit after 3 tries? What if it’s a key part of the operating system like the disk access?

It is far, far simpler to simply reboot everything than to write for all contingencies.

---

<div class="post-metadata">

**Author:** ![jz78817](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jz78817/32/1028_2.png) [@jz78817](https://boards.straightdope.com/u/jz78817)\
**Post date:** [February 6, 2012, 7:41pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/26 "2012-02-06T19:41:34Z")

</div>

> [@Ximenean](#):
>
> Do you have a cite for this? The way you have described it seems odd. For example “Windows uses the original file image as the swap file”. Eh? A swap file or page file is disk space that is used as if it were RAM. Simply reading directly from a regular file is not really using it as a swap file. I see the similarity of the idea, but I’ve never heard anybody talk about it in those terms.

it’s somewhat ambiguously worded, but it’s in effect true. Windows will not write code (exe/dll) out to the pagefile, only data. If code has to be evicted from RAM, it’s just dumped and if it’s needed later it’s simply re-read from the original file on disk.

---

<div class="post-metadata">

**Author:** ![Blakeyrat](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@Blakeyrat](https://boards.straightdope.com/u/Blakeyrat)\
**Post date:** [February 6, 2012, 9:49pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/27 "2012-02-06T21:49:31Z")

</div>

> [@BigT](#):
>
> His explanation doesn’t make sense. If there’s something still referring to the old file’s methods, and it wasn’t updated, then it will still be referring to the old file’s methods after restart and still break. And if it was updated, why can’t it be updated in place, just like the DLL?

A DLL is linked when it’s initially loaded. (That’s what the acronym means: dynamically-linked library.) If your program loaded Foo.dll version 1.2, it linked function Bar at address 377. Now Foo.dll is version 1.3, some code was added and function Bar moved to address 379, but your program has no way of knowing that, tries to call Bar, then CRASH.

The EXE doesn’t refer to the DLL’s functions by name; it refers to them by address. (At least, after the initial DLL load.) If the addresses change, the program crashes or worse.

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [February 6, 2012, 10:44pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/28 "2012-02-06T22:44:21Z")

</div>

> [@Blakeyrat](#):
>
> A DLL is linked when it’s initially loaded. (That’s what the acronym means: dynamically-linked library.) If your program loaded Foo.dll version 1.2, it linked function Bar at address 377. Now Foo.dll is version 1.3, some code was added and function Bar moved to address 379, but your program has no way of knowing that, tries to call Bar, then CRASH.

If that’s the way you design it then yes you have problems.

There are alternative designs that can allow it, and yes there are lots of considerations to make it bullet-proof, but it certainly can and has been done.

Raymond Chen’s description in the blog is so immediately flawed that it’s not really worth writing it unless his audience was non-technical and he didn’t want to get into the low level issues and was just trying to give a flavor for why it can be a tricky to do.

---

<div class="post-metadata">

**Author:** ![md2000](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@md2000](https://boards.straightdope.com/u/md2000)\
**Post date:** [February 6, 2012, 11:04pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/29 "2012-02-06T23:04:24Z")

</div>

> [@RaftPeople](#):
>
> If that’s the way you design it then yes you have problems.
> 
> There are alternative designs that can allow it, and yes there are lots of considerations to make it bullet-proof, but it certainly can and has been done.
> 
> Raymond Chen’s description in the blog is so immediately flawed that it’s not really worth writing it unless his audience was non-technical and he didn’t want to get into the low level issues and was just trying to give a flavor for why it can be a tricky to do.

But… if the subroutine changes function, reuires extra parameters, or whatever - there is no point in having an adaptable operating system that can still find BAR if, when it does, the program will crash because BAR originally needed parameter 1 and now needs parameters 1 and 2; unless your spec says every DLL always must be backward compatible with every possible earlier version… At a certain point, reboot is a lot simpler to keep running program and its subroutines in sync.

We had a program years ago that would crash randomly. Turned it used a DLL with the same name as another program (smething silly common like crt.dll, IIRC) so if program A ran after program B, then A crashed; if program B ran second, for some reason B did not crash on the DLL problem (path related?).

Some programs rely on other programs or standard DLL’s. This overload of multi-versons of DLLs from all over the map is what Windows deveopers refer to as DLL Hell, I think. (It’s been forever since I looked at WIndows development…)

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [February 7, 2012, 1:43am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/30 "2012-02-07T01:43:18Z")

</div>

> [@md2000](#):
>
> But… if the subroutine changes function, reuires extra parameters, or whatever - there is no point in having an adaptable operating system that can still find BAR if, when it does, the program will crash because BAR originally needed parameter 1 and now needs parameters 1 and 2; unless your spec says every DLL always must be backward compatible with every possible earlier version… At a certain point, reboot is a lot simpler to keep running program and its subroutines in sync.

It all depends on how you approach it and what level of changes you want to allow, etc. There are X% of cases that could benefit from a no-reboot update and Y% of cases that probably wouldn’t.

If you are changing the things you listed, then clearly you have to be careful and manage it somehow, that could be facilitated by the OS and some sort of versioning system, or it could be handled manually.  
I’ve always wondered why Bill Gates was so against versioning with DLL’s, it seems like it provides needed flexibility.

---

<div class="post-metadata">

**Author:** ![The\_Niply\_Elder](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@The\_Niply\_Elder](https://boards.straightdope.com/u/The_Niply_Elder)\
**Post date:** [February 7, 2012, 5:59am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/31 "2012-02-07T05:59:19Z")

</div>

> [@Blakeyrat](#):
>
> A DLL is linked when it’s initially loaded. (That’s what the acronym means: dynamically-linked library.) If your program loaded Foo.dll version 1.2, it linked function Bar at address 377. Now Foo.dll is version 1.3, some code was added and function Bar moved to address 379, but your program has no way of knowing that, tries to call Bar, then CRASH.
> 
> The EXE doesn’t refer to the DLL’s functions by name; it refers to them by address. (At least, after the initial DLL load.) If the addresses change, the program crashes or worse.

So, you’re saying that the internal workings of a “dynamically linked library” are static addresses? Wow, a contradiction if I ever heard of one…

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [February 7, 2012, 8:06am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/32 "2012-02-07T08:06:43Z")

</div>

> [@The\_Niply\_Elder](#):
>
> So, you’re saying that the internal workings of a “dynamically linked library” are static addresses? Wow, a contradiction if I ever heard of one…

Technically, static offsets. It is an efficiency gain. You need to balance the rate of change of a dll (relatively slow) against the cost of doing an entry point lookup by name every time you want to use a function. In some environments (rapid application development/scripting languages) dynamic function name lookup is essential and part of the cost of the flexibility gained (self-modifying code, anyone). For most cases, link-once (on load/first use) with static offsets is certainly the best option.

You could have a signalling mechanism that allows the OS to tell apps that a particular DLL/shared library is being updated, allowing them to unload/reload the library. But the overhead would be significant and not used often, so people don’t bother.

If you want serious uptime while maintaining your systems use an OpenVMS Cluster - cluster uptimes of [years](http://www.openvms.org/stories.php?story=06/01/08/4531954)

Si

---

<div class="post-metadata">

**Author:** ![jz78817](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jz78817/32/1028_2.png) [@jz78817](https://boards.straightdope.com/u/jz78817)\
**Post date:** [February 7, 2012, 12:23pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/33 "2012-02-07T12:23:03Z")

</div>

> [@The\_Niply\_Elder](#):
>
> So, you’re saying that the internal workings of a “dynamically linked library” are static addresses? Wow, a contradiction if I ever heard of one…

“dynamic” means linked at runtime, not at compile time (which is static linking.)

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [February 7, 2012, 3:48pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/34 "2012-02-07T15:48:41Z")

</div>

> [@si\_blakely](#):
>
> You could have a signalling mechanism that allows the OS to tell apps that a particular DLL/shared library is being updated, allowing them to unload/reload the library. But the overhead would be significant and not used often, so people don’t bother.

Or simply have 1 level of indirection to get to the functions so they can move without altering access to them.

---

<div class="post-metadata">

**Author:** ![si\_blakely](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@si\_blakely](https://boards.straightdope.com/u/si_blakely)\
**Post date:** [February 7, 2012, 6:38pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/35 "2012-02-07T18:38:34Z")

</div>

> [@RaftPeople](#):
>
> Or simply have 1 level of indirection to get to the functions so they can move without altering access to them.

An extra level of indirection per invocation is one level too much.

Si

---

<div class="post-metadata">

**Author:** ![Musicat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/musicat/32/20189_2.png) [@Musicat](https://boards.straightdope.com/u/Musicat)\
**Post date:** [February 9, 2012, 7:31am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/36 "2012-02-09T07:31:08Z")

</div>

It looks like system reboots will be with a while longer, but minimized.

From a subscription newsletter put out by Brian Livingston (bolding mine):

> [@](#):
>
> Changes in Windows 8 should make the never-ending task of installing patches a bit easier, by reducing mandatory system restarts.
> 
> \<snip\>
> 
> [Microsoft has] a plan to minimize the number of mandatory system reboots that often take place when Windows automatically adds patches. In fact, Microsoft states that in most cases, Windows 8 users should see only one system restart per month — on Patch Tuesday, when all updates have been installed. The exception would be any out-of-cycle critical patches MS sends out between Patch Tuesdays.
> 
> Although it’s clear that Microsoft is trying to minimize the reboots, it unfortunately can’t get rid of them altogether. **MS hasn’t come up with a way to turn off services temporarily, patch the vulnerable parts, and restart the services — all without a reboot.**

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [February 9, 2012, 7:52am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/37 "2012-02-09T07:52:22Z")

</div>

> [@si\_blakely](#):
>
> An extra level of indirection per invocation is one level too much.
> 
> Si

Rarely yes, generally no.

---

<div class="post-metadata">

**Author:** ![Blakeyrat](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@Blakeyrat](https://boards.straightdope.com/u/Blakeyrat)\
**Post date:** [February 9, 2012, 10:56pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/38 "2012-02-09T22:56:06Z")

</div>

> [@RaftPeople](#):
>
> Rarely yes, generally no.

I guess you should make your own OS, with blackjack. And hookers.

But about half an hour into your design phase, I think you’d come to the realization that Microsoft really does do a pretty damned good job of it overall.

---

<div class="post-metadata">

**Author:** ![RaftPeople](https://avatars.discourse-cdn.com/v4/letter/r/6f9a4e/32.png) [@RaftPeople](https://boards.straightdope.com/u/RaftPeople)\
**Post date:** [February 9, 2012, 11:23pm UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/39 "2012-02-09T23:23:33Z")

</div>

> [@Blakeyrat](#):
>
> I guess you should make your own OS, with blackjack. And hookers.
> 
> But about half an hour into your design phase, I think you’d come to the realization that Microsoft really does do a pretty damned good job of it overall.

I have written my own OS, a long time ago.

You’ll notice that I never made any absolute judgements about Windows design in general, merely on this particular point that it could be done differently - it’s not a herculean task, merely a choice with some effort.

Is it a choice that’s worth the effort? Not sure.

---

<div class="post-metadata">

**Author:** ![jz78817](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jz78817/32/1028_2.png) [@jz78817](https://boards.straightdope.com/u/jz78817)\
**Post date:** [February 10, 2012, 12:10am UTC](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716/40 "2012-02-10T00:10:29Z")

</div>

> [@RaftPeople](#):
>
> I have written my own OS, a long time ago.
> 
> You’ll notice that I never made any absolute judgements about Windows design in general, merely on this particular point that it could be done differently - it’s not a herculean task, merely a choice with some effort.
> 
> Is it a choice that’s worth the effort? Not sure.

the real hard part is making a change like that without breaking every single piece of software which runs on Windows.

[Previous page](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716.md?page=1)

[Next page](https://boards.straightdope.com/t/why-does-windows-demand-that-i-reboot/611716.md?page=3)
