Running Unix programs under LispOS

Mike McDonald mikemac@titian.engr.sgi.com
Fri, 02 May 1997 00:30:49 -0700


>To: lispos@math.gatech.edu
>Subject: Running Unix programs under LispOS
>From: cwg@deepeddy.com
>Date: Fri, 02 May 1997 01:20:13 -0500

>2)  To run existing applications within our environment so we don't have to 
>reimplement everything from tar to netscape.
>
>I may be talking through my hat here, but it seems plausible to me to support 
>a mini-unix environment *within* our lisp universe, but keep it isolated from 
>the world that we're running.  What I imagine is a subsystem which can run ELF 
>binaries in their own protected memory.  You might write lisp code that looks 
>something like this:

  If you look at what a OS kernel is and does, it's a program that
sets up a, typically protected, memory space for an app to run it and
supposedly well specified interfaces for that app to get out of that
protected memory to acquire services from the OS. Nothing says that
the program we call the "OS" couldn't be written in lisp while the
programs we call "apps" were written in something else like C. One
could even provide different "OS" interfaces to different kinds of
apps, like the normal syscall interface for C apps and a much more
open interface for lisp worlds. In the microkernel view, the "OS" does
nothing but direct service requests to the "right" app that implements
that service. So socket requests could be forwarded to a lisp image
that implements the TCP/IP stack. Syscall requests could be routed to
a lisp image that emulates Unix syscalls.

>In practice could this be as simple as the concept sounds to me?

  The concept is simple, it's the implementation that's hard. Despite
protests to the contrary, the kernel and library interfaces that an
app uses aren't as well defined and clean as one would like.
Reproducing all the different interactions is a pain. And Unix kernel
hackers like to add all sorts of garbage to the kernel inorder to save
an instruction or two. (I could tell some real horror stories but then
I'd get in trouble. Now, over beers where there's plausible
deniability, that's a different case. :-)

>I could also see running DOS or Windows binaries in a similar fashion.
>
>Chris

  This is how things like SoftWindows, Wine, WABI, and that mac
emulator work. In theory.

  Mike McDonald
  mikemac@engr.sgi.com