The porting of XINU to the system 370 VM/CMS environment (abstract only)

XINU is a small but complete operating system written by Douglas Comer in the C programming language. Although the entire operation system can execute in 4000 bytes of main store and it has only about 5000 lines of actual C code, it includes all the basic components of an ordinary operating system such as memory management, process management, interprocess communication, real-time clock management, general i/o, device drivers, and a file manager. Furthermore, XINU has the following features: single user multitaskingbinary and counting semaphoressynchronous input and outputa file system which supports concurrent file growth without preallocationsupport for self-initializing routinesprocess control commands: processes can be created, killed, suspended, restarted, and priority of processes can be changedprimitives for acquiring and returning memory from a global heap, and a way to suballocate smaller pools of fixed size buffersDespite its small size XINU retains much of the power of larger systems. XINU seems to be ideal for instructional and demonstrative purposes as it is a simple to understand yet complete operating system. Moreover, it is written in a high level language, is small enough to be put on small machines and has room for further enhancement.XINU was developed on the LSI-11 microcomputer and is concerned with the logical organization of the machine, and not its physical organization. The highlights of the LSI 11/2 hardware that affect the XINU code are:The LSI 11 processor contains eight 16 bit registers and one 16 bit processor status word. Registers RO-R5 are general purpose registers; Ro is the stack pointer and R7 is the program counter.In the LSI 11 the memory locations 0 through 0777 are reserved for vectored interrupts which handle the exceptions and interrupts from external devices.There is no memory management and real memory is limited to 56k bytes, and stacks are usually allocated from the highest available memory address.In the LSI 11, the memory locations from 0160000 to 0177777 are reserved for device addresses. Every memory address corresponds to a specific device.XINU manipulates the LSI 11 stacks when performing important system calls like 'resched.'We are porting XINU to the system 370 (Amdahl 370/v8) environment to be used as a demonstration and programming tool in our undergraduate 'Introduction to Operating Systems' class. XINU will be compiled on the system 370 using the SAS C compiler. To simplify the porting, all XINU I/O will be accomplished via CMS service calls, thus eliminating the need to reinitiate XINU device drivers. Other PDP-11 Assembly Language routines will have to be rewritten. These include:ctxsw - Actually performs the context switch by saving the old registers and stack pointer and program counter and by loading and new stack pointer and Program Counter.inint - I/O interrupts trap here. Original PC and PS are on top of the stack upon entry. Low order 4 bits of the current PS contain the device descriptor. Interrupts are disabled.setclkr - Sets clock runs to 1 if and only if real-time clock exists.clkint - This is a real-time clock interrupt service routine.startup - When XINU first begins, the CPU starts executing at the location labeled start in refile startups.sizmem - Determines the size of real memory on the machine.panic - Prints information about the machine state, including the contents of the registers and the top values on the stack, along with a message explaining the cause of the error.XINU is a complete and simple to understand operating system. It is written in a high level language, namely C language, and is small enough to be put on a small machine. XINU also has room for further enhancement. Once installed, XINU will be used to give the students of the 'Introduction to Operating Systems' class a firsthand view of a basic operating system, and how to write simple programs on it.