[openbeos] Re: Add-ons/Module problems/ideas??

  • From: Timothy Covell <timothy.covell@xxxxxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx, Isaac Yonemoto <ityonemo@xxxxxxxxxxxx>
  • Date: Wed, 31 Jul 2002 20:28:58 -0400

On Wed July 31 2002 20:08, Isaac Yonemoto wrote:
> Is it possible to have a kernel that can reboot itself?  I think I posted
> this on the suggestions list, but I didn't get much of a response.
>
> 1.  The kernel suspends each thread, recording the priority of each thread
> as they are taken down.
>
> 2.  The kernel takes the entire memory space and transfers it to a
> known position on disk.
>
> 3.  The kernel records (whatever other critical information it needs).
>
> 4.  The kernel shuts down.  (either shutting down the machine, also, or
> rebooting the kernel).
>
> On bootup (if say, spacebar is pressed), then it boots up normally,
> clearing out all of the previously recorded information.
>
> Otherwise, after the FS is loaded, it transfers the entire memory space
> back up to the machine from disk, and whatever other information was
> transferred.  Then it one-by-one turns on each thread.
>
> I guess there are a few important things that need to be addressed (what
> to do with semaphores floating about, thread_ids, port_ids, area_ids
> needing to be conserved, et cetera)...
>
> Are there real problems with this idea?  Because, it seems to me, that
> implementing something like this would allow us to do reboot-less kernel
> upgrades, and neato instant-on features.  Perhaps this belongs in
> glasselevator, but I don't see why something like this wouldn't be "R5
> compliant", binary or codewise.
>
> Isaac

Yes it is possible.  Linux, for example, now has an experimental 
suspend-to-disk implementation.  I haven't tried it since the 2.5.x kernels 
almost never compile completely.   The interface isn't so simple because it 
writes out the system state to a swap space.  On reboot, one must give a 
special resume flag to the kernel, otherwise the swap space will try to 
initialize (and it's hard to pass flags with Grub, and somewhat still a bit 
annoying with Lilo.).  Also, after restoring, the swap space must be 
reinitialized with mkswap and swapon.   Also, I doubt that one could ever 
return to the EXACT same state, especially with any kernel upgrades which 
change drivers, API, etc. because I would expect a lot of core dumps and
even kernel panics.

-- 
timothy.covell@xxxxxxxxxxxx
Unix Systems Administrator

Other related posts: