Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!godot.cc.duq.edu!newsgate.duke.edu!agate!howland.reston.ans.net!newsfeed.internetmci.com!news.dacom.co.kr!bofh.dot!usenet.seri.re.kr!bofh.dot!news.cais.net!nntp.primenet.com!news.sprintlink.net!news-stk-3.sprintlink.net!news2.noc.netcom.net!noc.netcom.net!netcom.com!bakul
From: bakul@netcom.com (Bakul Shah)
Subject: Re: OS implemented in Scheme?
Message-ID: <bakulDszx0q.F52@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <LOU.96Jun12192602@giac1.oscs.montana.edu>
Date: Fri, 14 Jun 1996 15:14:50 GMT
Lines: 23
Sender: bakul@netcom22.netcom.com

lou@giac1.oscs.montana.edu (Louis Glassy) writes:
>Has anyone ever implemented an OS in Scheme?  Is source 
>for such a beast available?  I've seen that Scheme is most
>frequently implemented in either Lisp or C, but could one
>run a Scheme on a naked machine?  If not, what would one have
>to add to R4RS (etc) to make it possible to perform system
>programming with Scheme?

[This is not quite what you asked for and I am not aware of any
such OS but] a conventional OS (like POSIX) implemented in Scheme
for running programs in C, C++, etc. would make for a very
interesting project.  You'll need to implement some very basic
mechanisms in assembly language/C glue.  Things like the  system
call interface, context switching, switching to the interrupt
stack, operations on virtual/physical pages, pagetables, TLBs
(translation lookaside buffer), IO register access etc.  You'll
need to make sure you don't run out of allocable memory at
interrupt time and/or provide an exception mechanism that works
in a memory starved environment.  GC must be stoppable at
interrupt time.... Probably very little more.

Bakul Shah
<bakul@bitblocks.com> or <bakul@netcom.com>
