Re: Driver optimization.

Scott Laird (scott@laird.com)
Tue, 02 Jul 1996 09:20:01 -0700


In message <199607020626.CAA01755@krakatoa.ccs.neu.edu>, Albert Cahalan writes:
> From: Derrik Pates <dpates@cavern.nmsu.edu>
>> On Sun, 30 Jun 1996, Khan M. Klatt wrote:
>>
>>> What does it take to do "binary compatibility" across platforms? (i.e.
>>> what does it take to run the *same* binary on x86, 68k, alpha, ppc?
>>
>> EMULATION!!!!!!!!!!
>>
>>> It would be nice to be able to say, "hey, if you install Linux
>>> on your machine, it will run all the code for Linux, whether
>>> compiled on PowerMac or on a Pentium"...
>>
>> It's not easy, do you REALLY want to make an even bigger kernel?
>> You'd have to have emulation for EVERY CPU architecture that
>> Linux is written to and THAT would be BIG and SLOW.
>
>Use kerneld I guess.

Why bother? How difficult would it be to write a user-mode i386
emulator for emulating Linux binaries on non-Intel platforms? Once
the emulator's up and running, it should be pretty easy to have the
kernel run it whenever it sees an Intel Linux binary, just like it
runs the Java interpreter on Java binaries now.

>> Nope, not appropriate for your 2.1 wishlist. Maybe (big maybe)
>> 3.0, 3.1, or on down the road (once again, BIG maybe).

With a user-mode emulator this isn't a very big deal. The emulator
itself will take a bit of effort, but patching support for it into the
kernel is a 20-minute hack. If the emulator was ready today, then I
suspect Linus could be talked into including kernel support in later
2.0.x kernels -- what could it break? (Assuming, of course, that you
don't enable i386 emulation on i386 machines :-)

Scott

--
Scott A. Laird   |  "But this goes to 18,446,744,073,709,551,615"
scott@laird.com  |                - Nigel on his new 64-bit computer