Leo Sutic wrote:
No, it doesn't. (Tell it to the person you quoted, though.)

isn't this a group discussion? :-D. Point taken though.


ALT1: Wires are severed immediately, the component is reloaded.

can only do that on a coarse component level, otherwise its unmanageable.


ALT2: Wires are left intact and the new component is loaded in parallell
with the existing component.
>
Disadvantages: A bit of a problem if the component was supposed to be
a singleton

use a barrier :-D


ALT3: Slap a read-write lock on every wire.

Disadvantages: Deadlocks

use a barrier :-D


on an OS level, I think a lot of these things were thought about for a long time, then solved, many years ago, even for large scale distributed OSes. Not really my field though; too much pointer arithmic. From memory, doing it reliably basically always goes something like

1) A active
2) schedule swap of A with B
3) prepare swap to max extend (ie create and initialize B)
4) suspend A and all processes referencing A
5) swap
   1) stop A
   2) kill A (if it doesn't respond)
   3) start B
   4) update reference
6) resume A and all processes referencing A

again, from memory, the real tough part is the barrier that's in place around the reference. With java, barriers are way easier (because of synchronization being available), but very expensive too.

If you want a hotswapping kernel, you probably want to look into hotswapping kernels. Mach (now darwin) is a textbook example I think.

--
cheers,

- Leo Simons

-----------------------------------------------------------------------
Weblog              -- http://leosimons.com/
Component Community -- http://componentplanet.org/
Component Glue      -- http://jicarilla.org/
-----------------------------------------------------------------------
"We started off trying to set up a small anarchist community, but
 people wouldn't obey the rules."
                                                        -- Alan Bennett



Reply via email to