[comp.lang.scheme] Re: Schema, a Scheme-based O{S,E} (was Re: Elk 3.0 on Linux)

Francois-Rene Rideau fare@tunes.org
11 May 2000 11:01:21 +0200


--=-=-=
Content-Type: text/plain; charset=""
Content-Transfer-Encoding: quoted-printable


Interesting post by Ken Dickey on comp.lang.scheme

[ Fran=E7ois-Ren=E9 =D0VB Rideau | Reflection&Cybernethics | http://far=
e.tunes.org ]
[  TUNES project for a Free Reflective Computing System  | http://tunes=
.org  ]
Death is only a milestone - albeit one that is dropped on you
from a very great height
	-- Terry Pratchett.


--=-=-=
Content-Type: message/rfc822
Content-Disposition: inline

Path: isdnethub!isdnet!newsfeed.cwix.com!cyclone-east.rr.com!news.rr.com!news-east.rr.com!cyclone-west.rr.com!news.rr.com|news-west.rr.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail
Message-ID: <391A0548.1D1EEEF5@earthlink.net>
From: Kenneth Dickey <kend0@earthlink.net>
Reply-To: kend0@earthlink.net
X-Mailer: Mozilla 4.7 (Macintosh; I; PPC)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.lang.scheme
Subject: Re: Schema, a Scheme-based O{S,E} (was Re: Elk 3.0 on Linux)
References: <66t696q5.fsf@lambda.unlambda.com> <HmAFOfTAOnak6jtktaUBNrCWV0fD@4ax.com> <ya61799l.fsf_-_@lambda.unlambda.com>
Content-Type: text/plain; charset=us-ascii
Lines: 168
Date: Thu, 11 May 2000 00:57:49 GMT
NNTP-Posting-Host: 63.178.69.20
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread2.prod.itd.earthlink.net 958006669 63.178.69.20 (Wed, 10 May 2000 17:57:49 PDT)
NNTP-Posting-Date: Wed, 10 May 2000 17:57:49 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net
Xref: isdnethub comp.lang.scheme:4982

> > On 24 Apr 2000 19:53:22 -0800, The Almighty Root <james@fredbox.com> wrote:
> >
> > > Hey, what do you know!  I've got all that already.  Too bad there's
> > > no operating system written in my favorite language...

Sorry, I am not a regular reader of this list (no time 8^() so the following may be considered as "random input".

There have been some interesting OS research done in Scheme dating back to Mitch Wand's seminal paper:
=============>
Mitchell Wand. Continuation-Based Multiprocessing. Higher-Order and Symbolic Computation,
12(3):285--299, October 1999. Originally appeared in the 1980 Lisp Conference.
      ftp://ftp.ccs.neu.edu/pub/people/wand/papers/hosc-99.ps

Abstract: Any multiprocessing facility must include three features: elementary exclusion, data protection, and process saving. While elementary exclusion must rest on some hardware facility (e.g. a test-and-set instruction), the other two requirements are fulfilled by features already present in applicative languages. Data protection may be obtained through the use of procedures (closures or funargs), and process saving may be obtained through the use of the CATCH operator. The use of CATCH, in particular, allows an elegant treatment of process saving.

We demonstrate these techniques by writing the kernel and some modules for a multiprocessing system. The kernel is very small. Many functions which one would normally expect to find inside the kernel are completely decentralized. We consider the implementation of other schedulers, interrupts, and the implications of these ideas for language design. 
=============<

More Recently, the STING project was very interesting:

=============>
Suresh Jagannathan and James Philbin. A Customizable Substrate for Concurrent Languages. In ACM SIGPLAN '91 Conference on Programming Language Design and Implementation, June 1992. 
    http://www.neci.nj.nec.com/homepages/jagannathan/papers/pldi92.ps

Suresh Jagannathan and James Philbin. A Foundation for an Efficient Multi-Threaded Scheme System. In Proceedings of the 1992 Conference on Lisp and Functional Programming, June 1992. 
    http://www.neci.nj.nec.com/homepages/jagannathan/papers/lfp92.ps
=============<

Note also that PRESCHEME was designed for system's programming [ref Scheme48]:
=============>
Richard Kelsey. Pre-Scheme: A Scheme Dialect for Systems Programming.
	ftp://ftp.nj.nec.com/pub/kelsey/prescheme.ps.gz
=============<

I have also been toying with the idea of using Scheme to build reliable systems (but perhaps on top of a Linix kernel).  The major piece of work seems to be doing a front end for GCC and the associated 'back end' work for GDB that would allow building a decent GUI of the quality of some of the commercial Common Lisp implementations (e.g. MCL).  That in turn would enable both a "seamless" C FFI and allow some of the energy flowing into Linux to be channelled incrementally into building more robust systems (see my "System Principles" scribblings, below).

I find much like particularly in Gambit, PLT/MzScheme, and Scheme48, depending on hw/system resources.

Note that you can today use Scheme's which compile to C to produce ".o"s which are "stand alone" with the work of duplicating (or linking in) the support library pieces required.  In particular, Gambit's compiler info specifies which external routines are called and might be a convenient starting point.  [I have only started looking at MzScheme and like the language and GPL'ed licence a lot but have not yet looked at the compiler & runtime requirements in that environment; I am also very interested in seeing what has been done with Gambit 4.0 when it is available (are you listening Marc?)].


$0.02,
-KenD

=============>
File:       "System Principles"
Implements: Notes on System Principles for reliable, useful, personal
            computing devices
Author:     Ken Dickey
Date:       2000 March 20
Updated:    2000 March 21


SYSTEM PRINCIPLES FOR RELIABLE, USEFUL, PERSONAL COMPUTER SYSTEMS

Over time I have come to the conclusion that there needs to be a radical rethinking of 'consumer computing'.  I had thought that the rise of the comsumer and networking would increase reliability and usability because of consumer demand.  Instead it appears that 'consumers' now put up with crashing cell phones.  

It is time to rethink the fundamental strategies we use to build computing  systems implementing tools and devices for ordinary people.

In accord with modern thinking on health, one should think of 'self healing' systems.


- SELF CENTERING (homeostatic)

    - Model of Self (endomorphic)
    - Consistency monitoring; self check
    - State & feedback driven centering procedures
    - Both HW & SW components can be 'hot swaped'


- STATE CONSISTENCY

    - Component & Data self check (incl checksums) at all levels
    - State is Transacted
        - Schema Evolution
        - Component Update w Compatability (incl version) Constraints 
            [legal component set -> transcient -> legal component set]
    - Backup is continuous (logfile) with transaction completions noted
        - can always delete transcient state, replay inputs from a checkpoint
        - if transactions are local, can undo system state to previous
          [=> special markers for distributed transaction undo]
        - Backup/undo a normal part of system behavior
            - can decide to uninstall a newer version of a component and then 
            replay transactions with old component


- SELF DESCRIBING

    - Can always answer the questions:
        - What can I do here?
        - What is going on? [Activities]
        - What is there? (what hw & sw subsystems/components are installed?)
        - What is this component doing?
        - Why the delay? Is it sane?  What can I do about it?
        - Can I install/uninstall/update this component?  
            -> What is affected?  What required?  What provided?
        
        
- UI RELIABLE AND CONSISTENT    [Visibility & Control]
    
    - UI never 'blocks'; User always feels system is immediately responsive
    - All user interface actions are visible
        - Either immediate (visual) response or visual indicator of an
        action (e.g. mouse click) queued on a specific component.
    - Clean separation between UI layer (always responsive) and underlying
      components/applications (may be waiting, or compute bound)
        - UI able to move, resize, scale, display menu/click/mouse 
        events/actions w/o blocking on component/application response
    - Universal undo/redo (modulo non-local transacted commits)
        - Including component install/uninstall/update
    - Component/App can always indicate what is it doing (continuously or 
      by request) even when it is compute bound or blocked.
   

==============================================================
QUESTIONS:

- What are the rules/rubrics for developers?  How checked?
    - Design for self-test, fault diagnosis & fault repair
    - Break compute bound computations into chunks [Agenda control structure]
    - Provide explanations of actions: Explanatory Model
    - Undo/Redo & Transactions
    - Compatibily Constraints
    - Provides/Requires
    - Save/restore 

- What HW & SW Technologies support the above?
  [E.g. (sw):
        'Garbage Collection' (automatic storage reclamation)
            is a powerful consistency checker;
        Closures aid in undo/state consistency, agenda control structures;
        Object System
        Recoverable Exceptions
        Lexical & Dynamic variables & Dynamic Wind
        Full Programming Environment
        et cetera.. ]
        
        - Use partial evaluation and runtime code generation aid in reducing 
        system footprint in restricted resource environments (e.g. Embeded).

- What Baseline Components are Required?
    - Ontology Database [Explanations; Provides/Requires] [XML]
    - Language Runtime (sub)System(s)
    - Constraint Checker
    - Transaction System
    - Component Manager; Data Manager
    - Regulatory/Healing System
        - Self Test System Manager/Scheduler
        - Diagnostic System
        - Repair System
    - GUI [Manager]
    - Event Manager
    - IO Manager
    - Time Manager
    - Process Manager
    - Device Manager
    - Security Manager
    - Per Task
        - Storage Manager
            Memory, Stable Storage
        - Resource Custodians
            - Threads
            - Events [Eventspaces]
            - IO
                Files, Ports, Network Connections, Transactions


                               --- E O F ---

--=-=-=--