User-Level Programs on the SPIN OSF/1 Unix Server

Updated for spin-20: 8 April 1996

So you want to run a user-level program on SPIN

These instructions will tell you what to do. Unfortunately, you can't run emacs or Netscape on the SPIN server ... yet ...

Setting up your machine

The server will look for some files on the local machine as it boots. Follow these instructions to get set up:
1. Become superuser at the root of the filesystem.
2. rm -rf /spinbin; cp -r /afs/cs/project/spin/ddion/spinbin .
3. cd mach_servers
4. mv mach_init mach_init.old
5. ln -s /spinbin/spin_init mach_init

Setting up SPIN

As of 31 May 1996, the OSF/1 server runs directly on the SPIN trunk. Occasionally, though, by tweaking a few things in your kernel you can improve performance and reduce irritability. These tweaks evolve as SPIN evolves, but they often involve

If you find any other problems running the server on your out-of-the-box kernel, please submit a bug report or contact ddion.

Setting up the UNIX system call extensions

The OSF/1 Unix extensions should build by default with other extensions. The source is under
spin/user/mach
See the current release build notes for building extensions.

Booting the server

1. Boot SPIN.
2. Run the Unix init script:
script ~/spin/scripts/unix.spininit
3. Exec the server:
exec -noreturn /spin/ddion/vmunix.OSFSRV1.stable

Note: Do NOT run script -b. What the server needs from script -b is subsumed by the unix.spininit script. At this point, the OSF/1 server and nanny don't get along so well. This is future work.

Using the user-level shell

Type help at the SPIN shell prompt to see your builtin options.

The first set of programs available to you are those in /spinbin. They are

  • spin_init: I wouldn't recommend running this from the shell.
  • init: debuggable version of /sbin/init (does not yet work)
  • shell: the program currently running.
  • ls: lists the contents of a directory.
  • hello: simple exec test.
  • type: displays the contents of a file.
  • copy: tests writable file system (does not yet work)
  • io: lib I/O test
  • send: sends small UDP packets using the socket interface
  • float: tests some floating point operations
  • getpid: times a simple system call Note: Upkeep of these programs is not guaranteed. spin_init and the shell should be current until the server switches to /sbin/init and /sbin/sh.

    The source for these programs is in /afs/cs/project/spin/ddion/spin_init/. If you want to build your own user-level programs, start with the makefile located here. There are some limitations, though:

    If you discover other things to add to this list, please let me know. As I said, simple user-level programs have not been extensively tested.

    There are some additional system calls available to you. Their main purpose is to facilitate debugging, avoiding complicated asynchronous console I/O.

    Lately it has also been possible to run some programs in /sbin. These are programs which were not modified at all and have no idea they are running over SPIN. These programs tend to consume more memory than the programs in /spinbin, hence the SPIN garbage collector will probably slow things down. Also, programs in /sbin tend to do a lot of asynchronous console I/O. This is fairly thread intensive, and will increase the probability of the GC-threads bug popping up.


    ddion@cs.washington.edu