From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,28b0249f7691568e X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,28b0249f7691568e X-Google-Attributes: gid1164f8,public From: taniwha Subject: Re: Alpha in peril? First Canion, now Pfieffer (I do think so) Date: 1999/05/18 Message-ID: <3741805D.CF315CC5@taniwha.com>#1/1 X-Deja-AN: 479457940 Content-Transfer-Encoding: 7bit References: <371AD875.407C6B83@igs.net> <7g4tng$5ue$1@nnrp1.dejanews.com> <7h7vnn$2ts$15@nntp.Stanford.EDU> <5l4sljqx5d.fsf@tequila.cs.yale.edu> <926495090.942894@haldjas.folklore.ee> <37396C9A.BD7A1D3B@hda.hydro.com> <7hp59g$igr$1@lnews.actcom.co.il> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Zocalo Networking Mime-Version: 1.0 Newsgroups: comp.arch,comp.sys.dec bruce@hoult.actrix.gen.nz (Bruce Hoult) writes: > >Since that's a 68000 with no MMU, in order to get fork() to work I expect >they must have *had* to make all pointer dereferences based -- so that >fork() copies the stack & heap elsewhere and just changes some designated >An register. Assuming that's how it is done, I can't imagine any >practical way to do it other than through compiler support. > I went thru this 17 odd years back when porting (v6) Unix to a single address space machine (it was a vax running vms - each unix kernel ran in a vms process) - I changed the compiler to make all dereferences pointer based - it actually cost 2 registers, one as a base and the other a temp for doing pointer math in (since a swap out can occur on any user mode instruction boundary you need to have something that got reliably relocated so you can do indexing math safely). But the problem's worse than you might think - stacks had to always be in a known state so that on swap in the kernel could go stack frame chasing down the stack to fix up all the return addresses ..... And yup it required a hacked C compiler (and carefully rewritten libraries) that always kept all physical addresses in known places (why you're asking didn't he just use the MMU like it was designed for? .... because it was 1982 and V6 Unix ..... ) Paul