Path: utzoo!attcan!uunet!philmtl!atha!rwa From: rwa@cs.AthabascaU.CA (Ross Alexander) Newsgroups: comp.sys.mac.hardware Subject: Re: Why no VM on a 68K? (was: Re: Why 68000?) Keywords: MMU virtual memory Sys. 7.0 low-end Message-ID: <1672@aurora.AthabascaU.CA> Date: 19 Feb 90 10:34:34 GMT References: <1990Feb11.154304.19943@smsc.sony.com> <3919@hub.UUCP> <10223@hoptoad.uucp> <1990Feb15.155556.5319@uncecs.edu> <19472@dartvax.Dartmouth.EDU> Organization: Athabasca University Lines: 31 tga@eleazar.dartmouth.edu (Greg Ames) writes: >And I may be going out on a limb saying this, but didn't the original >Sun's (the 1/XX series) use a 68000 to run Unix and virtual memory? >I was under the impression that they came out before the 68010. If so, >how did Sun do it? The MMU could be implemented in custom hardware, >but what about restarting instructions in mid-stream? (I was under >the impression the 1/XX's used 68000's, the 2/XX's used 68010's, and >the 3/XX's used 020's and, later, 030's). Sun 1's indeed use 68K's. They _don't_ do VM. 7th edition doesn't need VM. Ask anyone who runs minix ( obligatory :-) on an Atari ST or a Mac. Or Xenix on a Tandy 6000, to name a more common example. 7th edition requires protection and relocation, nothing more. Restartable instructions aren't needed; PDP-11's didn't have them. An external base-and-limit register (a hardware hack) watching the bus and diddling the addresses visible to memory is all that's needed to do this on the 68K. Maybe 10 chips in MSI. You do need to keep track of what kind of bus cycle you are looking at (User data/instr/stack, intr, Super data/instr/stack, & c.) This is not hard. A trick you can use in a 7th edition environment to _fake_ growable stack segs it to insert a "tst -nnn(sp)" where nnn is the size of the stack frame for the function being entered as the first instruction of every function. If the instr faults, the OS trap handler adjusts the limit register value for the stack segment and finds your process a little more memory. It's easy to restart a tst instruction (it has the nice property of being idempotent :-). This is an optimization, however, and isn't compulsory. -- -- Ross Alexander (403) 675 6311 rwa@aungbad.AthabascaU.CA VE6PDQ