Portable OS's (was: Re: Do OS's slow down with age?)

Dominic Dunlop domo at riddle.UUCP
Wed Feb 1 23:03:05 AEST 1989


In article <226 at gp.govt.nz> gpwrdcs at gp.govt.nz (Don Stokes, Govt Print,
	Wellington) writes:
>In article <579 at mcl.UUCP>, stacy at mcl.UUCP (Stacy L. Millions) writes:
>> Being able to modify the OS to run on a new peice of hardware is
>> what I consider portable. I challenge you to port VMS to run on
>> an 80286, pull that off and I will believe the VMS is portable.

[Fulminations against ``MESS-DOS'', comments on limits to VMS portability
deleted]

>The whole purpose of an operating system is to provide a buffer between the
>applications program and the physical hardware and architecture of the machine.
>...
>While I am not convinced that Unix is really "portable", it is as close as 
>you can reasonably expect to get given the vast range of harware it will run 
>on.  Since it is native mode, it has to be source language portable, as 80386
>code will *NOT* run on a 68000 or VAX, no matter how hard you push it.  
>
>Are you asking that *EVERY* machine ever built should be identical so that 
>they can run the same OS code?  I repeat a comment made here already: Get real!

It's a good idea to remember that there is a solution to this problem: make
every machine look the same by implementing an emulator for some
hypothetical standard machine architecture on top of each one.  Then write
your operating system and applications in the machine code of the standard
machine.  Presto!  It runs for any architecture on which you've implemented
the emulator.  (All you have to do is work out how to get your programs
onto each target.)  Writing such an emulator is certainly easier than
writing a whole operating system or bootstrapping a native machine code
compiler onto a new architecture before compiling a source-code-portable
OS.  It's particularly easy if your hypothetical machine is simple, regular
-- and dumb. 

This approach actually works well enough to be used in the real world: UCSD
Pascal is implemented this way, so is Pick.  (There's even a British
product called BOS which, in effect, implements a COBOL engine, and has an
operating system written in... you guessed... COBOL.)  The disadvantage of
the approach is that, as the operating system and all applications are, in
effect, interpreted by the emulator, performance is unlikely to be as good
as could be obtained from programs compiled all the way down to the native
machine code of the target processor.
-- 
Dominic Dunlop
domo at sphinx.co.uk  domo at riddle.uucp



More information about the Comp.unix.questions mailing list