[comp.lang.c] XINU was: Unix and C

rmartin@clear.com (Bob Martin) (11/11/90)

In <4458@mint39.UUCP> gunda@motcid.UUCP (Indira Gunda) writes:

>richb@railnet.UUCP (Richard Banks) writes:

>>How can Unix be written in C ? I thought all OS`s had to be written
>>in assembly language, else they'd have the same interrupts as the
>>OS you booted your complier language under to write the program ?

>Yes ... Why and how can UNIX be written in C?  I'd also like to know.

There is an excellent book on the subject.  Although I can't think
of the complete title and author, it is a very common book and I am
sure another poster will be able to identify it better than I.

The title of the book is something like "The XINU operating system."

This book contains a complete miniature operating system written 
almost entirely in C.  It is well written and the source can be
obtained magnetically if desired.  Certainly this book is worth
exploring if you are interested in the contstruction of operating 
systems.

-- 
+-Robert C. Martin-----+---------------------------------------------+
| rmartin@clear.com    | My opinions are mine.  They aren't anybody  |
| uunet!clrcom!rmartin | elses.  And thats the way I want to keep it.|
+----------------------+---------------------------------------------+

berggren@eecs.cs.pdx.edu (Eric Berggren) (11/20/90)

rmartin@clear.com (Bob Martin) writes:

>In <4458@mint39.UUCP> gunda@motcid.UUCP (Indira Gunda) writes:

>>richb@railnet.UUCP (Richard Banks) writes:

>>>How can Unix be written in C ? I thought all OS`s had to be written
>>>in assembly language, else they'd have the same interrupts as the
>>>OS you booted your complier language under to write the program ?

>>Yes ... Why and how can UNIX be written in C?  I'd also like to know.

>There is an excellent book on the subject.  Although I can't think
>of the complete title and author, it is a very common book and I am
>sure another poster will be able to identify it better than I.

>The title of the book is something like "The XINU operating system."

>This book contains a complete miniature operating system written 
>almost entirely in C.  It is well written and the source can be
>obtained magnetically if desired.  Certainly this book is worth
>exploring if you are interested in the contstruction of operating 
>systems.

  The name of the book is _Operating System Design: The XINU Approach_,
by Douglas Comer, and it is quite good. I picked it up only a couple of
months ago and I just started typing in the code. There's a "standard"
edition (written for a PDP11, meant to be ported), and a PC edition, of
which I'm working on. It's isn't the best OS, and, of course, wasn't
meant to be, but the code is written openly and the reader is encouraged
to make improvements. 
  If qunda@motcid is really interested in this type of stuff, MINIX might
be interesting, but for around $150.


==============================================================================

     "Round and round the while() loop goes;
           Whether it stops," Turing says, "nobody knows."
==============================================================================

     "Round and round the while() loop goes;
           Whether it stops," Turing says, "nobody knows."

dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) (11/22/90)

In a way XINU nicely complements CP/M.

For many years, the controversy raged:  Was CP/M really an operating
system, or was it just a program loader?  The trouble was that CP/M
merely loaded a file into memory and jumped to it, and little beyond
that.

Well, XINU does most things that operating systems do, *except* load
files into memory.  So:

     XINU + CP/M == OS
--
Rahul Dhesi <dhesi%cirrusl@oliveb.ATC.olivetti.com>
UUCP:  oliveb!cirrusl!dhesi