> I was wondering if it would make sense to have plex86 be a
> multithreaded app with each different device emulation having its
> own thread?  THe idea behind this would be that each device (in a
> real machine) would have its own onboard slave-processor, and
> should not be talking up time (and costly context switches &
> device acesses) inside of the already heavily loaded main machine
> thread.  Let me know how crazy y'all think I am.  I could expound
> upon this idea if there is interest. ;^)

The MOL emulator ( http://www.maconlinux.org/ ) does exactly this
which I guess makes it a lot easier to do async stuff in device
emulators. It just uses vanilla pthreads which are quite portable.

MOL probably serves as a good example for emulated PCI net, block and
video devices - for instance, the Linux side of the video driver can
do X11, VNC and direct framebuffer - a lot of the code in MOL could be
ported to x86.

For those of you who don't know - MOL is the plex86 equivalent for
PPC. Applications run natively in MOL with only certain instuctions
trapped by the emulator (not sure if PowerPC is intrinsicly more
virtualisable than x86 but I'd guess it would be - coming from IBM).
MOL generally is used to run MacOS but can even run PPC Linux
(although Linux drivers have not yet been written to take advantage of
its emulated PCI devices). MOL can be used to run MacOS on non Mac PPC
hardware. The speed difference between a native Mac and MOL is hardly
noticable - mainly the video speed as MOL doesnt yet emulate an
accelerated video card.

~mc


Reply via email to