[comp.os.minix] a Macminix question for experts

antonio badia <abadia@copper.ucs.indiana.edu> (06/25/91)

Hi there. Could anybody out there explain to me what the contents of shadow.c
in kernel (in the Mac version of Minix) are about? The beginning of
the file says: "this file performs shadowing, a solution for the
fork() problem on machines that have no relocation hardware." 
My questions are:
- I assume that relocation is the stuff that Tanenbaum mentions in his
book, page 197. But, what exactly is the fork() problem?
- it seems that this file (and consequently, the problem) does not
exist in PCs. How come? I thought that PCs do not have this hardware, either.
- what is the shadowing solution?
-I added a few fields at the end of the proc declaration (proc.h) and
when I launched the new Macboot I received a panic message from the
shadows.c file ("only shadow(s)") while loading!. What is the relation
 between the shadowing stuff and the proc table (kernel part)?
I'd appreciate any information, since my Assistant Instructor says he
doesn't know what's going on and I have an assignment to do anyway.
Thanks,
Antonio
abadia@copper.ucs.indiana.edu
P.S. Joe Pickert, are you still alive out there?

mvharding@cup.portal.com (Michael V Harding) (06/27/91)

	From my reading, 'shadowing' consists of copying the current
running process into the memory it was in before a fork... so there
is a big memory copy going on every process swap.  This apparently
causes problems with programs like kermit, which do a fork and
run two processes.

	808x parts don't have this problem because the process can
be moved to another place in memory and 'relocated' via the segment
registers, so that the forked copy can work in a different place
in memory.
	Am I correct???