
Alpha version is more mature than x86 version, and we are now able to run nontrivial applications including many X clients on Alpha. On x86, only helloworld works.
However, lots of features are still missing. There is no uid/gid mechanism; character device control is very weak(especially signals).
Sphinx provides some features not present in other UNIX systems. Those include profiling control and add-on systemcall extension support. The doc is in Yaz's mind only. Bug him.
The OSF/1 Server is a complicated piece of code. It arguably stresses SPIN services harder than any other application. For this reason, it is not as stable as Dlib. It will continue to evolve as the SPIN kernel evolves. At this point, it can be booted into single-user mode, where it can run simple OSF/1 3.2 programs.
The easiest way for user-level programs to interact with the kernel is
through system calls. By default, SPIN handles a very small
number of system calls via
usyscall service(usyscall has to be loaded beforehand by typing
nanny touch USyscall from the shell).
Sphinx and the Mach/OSF Server emulations provide handlers for additional system calls. Users can specify kernel routines for new system calls by installing a handler on the MachineTrap.Syscall event. SIEG is a tool which simplifies writing system call handlers and transferring data across the user-kernel boundary. Sphinx systemcall interface and transaction systemcall interface are written using SIEG.
The primary advantage to building your user-level program from scratch is that you can fine-tune user-kernel interaction to the needs of your application. For instance, you could optimize argument marshalling to pass small record datatypes through argument registers. The primary disadvantage is that you have to work out many machine-dependent details which are already worked out in Sphinx, SIEG, and Unix server.
eax is used as return value reg.
cflag is set when error happens, and
edx is set to hold the errno.
int fd; extern int errno;
if ((fd = open("/etc/passwd", O_RDWR, 0)) < 0) {
/* ERROR! */
printf("Error! errno = %d\n", errno);
} else {
printf("File open. fd = %d\n", fd);
}
SPIN also allows programs to react to specify low-level reaction to faults in user-space. For instance, an application can install an handler on the Access Violation event. Then, if the application attempts an illegal memory access, the handler will be notified and it can perform application specific duties to clean up the fault.
Because of the flexibility SPIN offers, clients can define arbitrary mechanisms for communicating error conditions between their extensions and user-level programs. Sphinx and the OSF/1 extensions have adopted the UNIX approach for compatibility with existing UNIX applications.