[comp.os.minix] Comments on recent news

ast@botter.cs.vu.nl (Andy Tanenbaum) (02/03/87)

Here are some more comments on today's news.

It is a pity that MINIX is not POSIX.  POSIX did not exist 5 years ago.
Maybe MINIX will evolve in that direction, although that may be a lot of work.

MINIX definitely understands that hard disks have partitions.  If you want
to have a drive containing both MINIX and MS-DOS partitions, that is no
problem at all.  You just put a command in /etc/rc such as
  /etc/mount /dev/hd2 /usr
to mount partition 2 (for example) on /usr when MINIX boots.   (Of course you
have to mkfs a file system there first, as described in doc/READ_ME.)

Contrary to what was posted today, you CAN remake MINIX from the standard
distribution.  The full sources of MINIX and the binary of the C compiler
are supplied.  You don't need the C compiler sources to recompile the
operating system.  Makefiles to do the recompilation are also supplied.
The whole business is discussed ad nauseum in Appendix D of the book.

Only a couple of programs use separate I & D space.  If you modify one of
these, such as the editor, you have to recompile that program with PC-IX
or an MS-DOS compiler, preferable Computer Innovations C86.    This compiler
is desirable because there are problems converting from MS-DOS .EXE format
to MINIX a.out format, and they have been solved for C86.  For other compilers
they have to be solved anew.  The main problem is that the .EXE file normally
does not contain the program text size, and we have to use a trick to get that
information into the .EXE header.  The trick is to force the first word of
the data space to be a relocatable symbol, so the program size can be derived
from the relocation information.

I talk to Mark Krieger of UniPress.  He agreed to packaging of the MINIX C
to 8088 compiler sources for about $100 to individuals.  One word of caution.
These "sources" consist of a bunch of C programs.  One of these, the front
end (/lib/cem) was produced by a compiler compiler, so it is not the "true"
source.  The compiler compiler in question, LLGEN is a large, complicated
program itself not suited for the PC, but fine on VAXes, SUNs, etc.  LLGEN
produces recursive descent compilers, so the C output is vastly more
readable than YACC output.  If you want the compiler sources to port MINIX
to some other machine, you are probably going to need the full Amsterdam
Compiler Kit, or at least the relevant back end already made.  The $100
source package is fine, however, if you just want to run the compiler on
MS-DOS or some other computer to cross compile to the 8088.  ACK is something
like 6 MB of code and requires at least 20 or 30 MB of scratch space.  It
is really beyond PC class machines, except maybe a 386.  Mark's login is msk,
not mark.

I saw a public domain version of yacc posted to comp.sources.unix today by
Mark Colburn.  It may be of interest to MINIX users.  If anyone plans to 
convert it to V7, please post your plans to avoid duplicate effort.

There has been some discussion again about MINIX vs XINU in terms of size.
MINIX consists of a message passing kernel that runs in "kernel mode"
(or would, if the PC had one).  It also has a file system and memory manager
that run in user mode, along with the utilities.  If you want a very small
bare bones system to "compete" with XINU, just use the MINIX kernel.  All
you need is the code on pages 434-478 of the book (2200 lines, which
includes the assembly code interrupt handlers, etc).  You might also want
some of the drivers listed on subsequent pages, but the first 2200 lines is
sufficient to give you a working message passing system.  The remaining
10,000 lines in the book contains drivers, the memory manager program, and
the file system.  A course on microprocessors could easily restrict itself
to the 2200 line message passing system.  As distributed, user processes
can only send messages to the file system and memory manager, but if you
want a general purpose message passing system, just remove lines 1986-1988
(easy to remember!).

Let me try to reconcile what I said about copying and the copyright notice
in the book that was posted to this group.  At my university, if I collect
a bunch of journal articles that I want reproduced for a course, the 
university repro shop won't do it, claiming that we are violating copyright
law.  The notice in the book is intended to eliminate analogous problems
with professors who want to produce 100 copies of the sources for students.
That is legal and perfectly ok.  With private individuals P-H and I are
politely requesting people to restrict themselves to making a couple of
copies.    This policy is somewhat analogous to AT&T's policy of giving
universities a special deal because universities have a special and important
role in society.  If 4 people each chip in $20 to buy a copy of MINIX from
P-H, that can't be a hardship for many people, but it does generate some
revenue while trying to keep the "open" character of the whole project.  I
suppose this is a funny compromise, but we are willing to take the chance.
Please don't abuse it (and please--no more clogging the news group with
discussions about this subject.  If you have a specific question to which
you want a specific answer, send me mail.)

Andy Tanenbaum (minix@cs.vu.nl)

psfales@ihlpl.UUCP (02/11/87)

> MINIX definitely understands that hard disks have partitions.  If you want
> to have a drive containing both MINIX and MS-DOS partitions, that is no
> problem at all.  You just put a command in /etc/rc such as
>   /etc/mount /dev/hd2 /usr
> to mount partition 2 (for example) on /usr when MINIX boots.   (Of course you
> have to mkfs a file system there first, as described in doc/READ_ME.)

OK, what have I missed here?  I received my copy of the minix book today
and so far as I can see (in an admittedly brief look) is a passing
reference to /dev/hd0 and /dev/hd1 on page 375, but no mention of how
these devices are used or implemented.  In particular, I can find
no references to hard disks in the source code.  

- Are hard disks supported?
-   If so, what kind of hardware (i.e. brand of disk controller)?
-   If so, is the source provided in the software distribution?

Thanks in advance.  I can forsee the possibility of being flooded with
responses, so please mail directly to me and I will summarize for the
net.
-- 
Peter Fales		UUCP:	...ihnp4!ihlpl!psfales
			work:	(312) 979-7784
				AT&T Information Systems, IW 1Z-243
				1100 E. Warrenville Rd., IL 60566

zemon@felix.UUCP (02/19/87)

In article <1725@ihlpl.UUCP> psfales@ihlpl.UUCP (Peter Fales) writes:
>OK, what have I missed here?  I received my copy of the minix book today
>and so far as I can see (in an admittedly brief look) is a passing
>reference to /dev/hd0 and /dev/hd1 on page 375, but no mention of how
>these devices are used or implemented.  In particular, I can find
>no references to hard disks in the source code.  
>
>- Are hard disks supported?
>-   If so, what kind of hardware (i.e. brand of disk controller)?
>-   If so, is the source provided in the software distribution?

Pardon me if I seem rude, but if you have the book, please
read it.  Your questions are specifically answered there.
Sorry, I don't have page numbers; my book is at home.

For those of you who don't have the book [yet :-) ], the
answers are:
- Yes, hard disks are supported.
-   The controller chip must be the same NEC chip used in
    the IBM PC or AT (depends on which driver you use).  I
    *think* the part number is 745 or 765 or some such.
-   The source code for both drivers is on both the PC and
    the AT diskette sets.
-- 
	-- Art Zemon
	   FileNet Corporation
	   Costa Mesa, California
	   ...!hplabs!felix!zemon