Re: Switching Kernels without Rebooting?

David Balazic (david.balazic@uni-mb.si)
Wed, 11 Jul 2001 11:52:26 +0200


C. Slater (cslater@wcnet.org) wrote :

> Hi, i was just thinking about if it would be possible to switch kernels
> without haveing to restart the entire system. Sort of a "Live kernel
> replacement". It sort of goes along with the hot-swap-everything ideas. I
> was thinking something like
> - Take all the structs related to userspace memory and processes
> - Save them to a reserved area of memory
> - Halt the kernel, mostly
> - Wipe kernel-space memory clean to avoid confusion
> - Load new kernel into memory
> - Replace all saved structures
> - Start kernel running agin
>
> This seems like the easiest way to do it. The biggest problem is that there
> would be somewhere about 30 seconds where all processes would be frozen.

This is not a problem at all, because UNIX does not guarantee that
a process will get at least one CPU slice every X seconds.
( read : UNIX is not a real time system )

soft-suspend "freezes" processes for several hours anyway ...

Note that there is a patch for hot replacing a kernel, which is equivalent
to rebooting, but much faster :
Two Kernel Monte (Linux loading Linux on x86)
http://www.scyld.com/products/beowulf/software/monte.html

> This could cause problems with tcp/ip connections timeing out say on a
> webserver, but it would be more managable than a few minutes downtime to
> restart the machine.

[ rest snipped ]

-- 
David Balazic
--------------
"Be excellent to each other." - Bill & Ted
- - - - - - - - - - - - - - - - - - - - - -
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/