Newsgroups: comp.os.minix
Subject: Re: meaning of #define SHADOWING?
References: <slrn7gkeji.m2c.nospam@vivian.zk3.dec.com> <7ednn8$5ml$1@nusku.cts.com>
Organization: Rochester Institute of Technology, Rochester, NY
From: aje9383@osfmail.isc.rit.edu (Andrew Erickson)
NNTP-Posting-Host: grace.isc.rit.edu
X-Original-NNTP-Posting-Host: grace.isc.rit.edu
Message-ID: <370a6e0f.0@isc-newsserver.isc.rit.edu>
Date: 6 Apr 1999 16:26:55 -0500
X-Trace: 6 Apr 1999 16:26:55 -0500, grace.isc.rit.edu
Lines: 36
XPident: aje9383
X-Original-NNTP-Posting-Host: 129.21.3.100
XPident: Unknown
Path: star.cs.vu.nl!newsfeed.amsterdam.nl.net!sun4nl!newspump.monmouth.com!newspeer.monmouth.com!netnews.com!news-peer1.sprintlink.net!news-in-west1.sprintlink.net!news.sprintlink.net!isc-newsserver.isc.rit.edu!aje9383
Xref: star.cs.vu.nl comp.os.minix:35122

In article <7ednn8$5ml$1@nusku.cts.com>, Will Rose <cwr@cts.com> wrote:
>Andy Kahn (replace nospam with kahn) (nospam@zk3.dec.com) wrote:
>: hi all,
>
>: can someone summarize what the SHADOWING define is supposed to
>: indicate?  it's obviously archictecture specific, but that's as far as
>: i've been able to figure out.
>
>Some 68K boxes had no MMU, and no means of relocating code; all binaries
>ran at the same address and had to be swapped to get multi-tasking.  I
>never studied the mechanism, but it was called 'shadowing'.  And it was
>as slow as it sounds.

Actually, only things which fork() but don't (yet) exec() are shadowed.  The
general idea is still the same.  When exec() loads stuff from disk, it can
relocate by adjusting all absolute references in the code to the appropriate
offset.  This does make some things very slow indeed--kermit, for example,
and things which involve a lot of process creation and destruciton (such as
certain makefiles) are particularly annoying.

This can't be done for a fork(), though, because not all the references are
known (namely, pointer variables cannot be distinguished from non-pointer
ones under all conditions, unless far too restrictive coding rules are
followed which cause even greater angst).

The reason many 68K systems did not have mmu stuff, by the way, is probably
because the original 68000 could not recover from a bus error, making demand
paging impossible to implement.

>
>Will
>cwr@crash.cts.com
>

--Andrew Erickson, aje9383@grace.isc.rit.edu

