Subject: Re: two OS'es on two procs of MP system
To: Zeljko Vrba <zvrba@globalnet.hr>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 06/22/2005 20:05:40
On Wed, Jun 22, 2005 at 05:15:43PM +0200, Zeljko Vrba wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: RIPEMD160
> 
> I do not really know the details of multiprocessors and APICs but from
> what I gather, the processors are pretty much independent - each has its
> own GDT, LDT, page tables, etc.
> 
> My idea was to use the boot processor for running one operating system
> and the 1st application processor to run another OS. Of course, each
> would have its dedicated physical memory which the other OS wouldn't touch.
> 
> The setup would be like this:
> - - boot NetBSD on the first processor only, and allocate it e.g. only a
> half of the available physical RAM.
> - - a NetBSD application executes a special code (new system call?) to
> boot the OS on the second processor
> - - while the OS on the 2nd processor is running, NetBSD is halted waiting
> for some kind of an interrupt to wake it up (in which case the 2nd OS
> would become dormant)
> - - both OS-es could share the PCI HW configuration. in fact NetBSD can
> configure all hardware on boot and give the information to the '2nd OS'
> in shared memory.
> 
> Now, since NetBSD on proc0 would be dormant while the 2nd OS is running,
> there would be no contention for hardware. Also the OS-es would use
> distinct physical memory, so there would be no problem either.

However, you have to redo all the hardware initialisation when you switch from
one OS to another, because they would likely configure it differently.
This requires hooks in each drivers, which don't exists yet (although
this would probably be usefull for ACPI deep sleep too)

-- 
Manuel Bouyer <bouyer@antioche.eu.org>
     NetBSD: 26 ans d'experience feront toujours la difference
--