Pre-fetch
Bruce Robertson
bruce at stride.UUCP
Fri Jul 12 04:49:18 AEST 1985
In article <891 at bunker.UUCP> reno at bunker.UUCP (Jim Reno) writes:
>
>Suppose
>you have a shared text program where the code is exactly some multiple
>of the basic block size used by the MMU (1k on our system). Further
>suppose that your kernel allocates exactly that amount of memory.
>If the processor prefetches, the MMU will fault (and the
>program dump core) when the very last instruction is executed.
>The MMU, of course, has no way of knowing that the processor would
>never have actually used those bytes.
Actually, this shouldn't cause a problem on most systems, because the data
segment is allocated on the next page immediately following the text
segment, so the prefetch will come from the first few bytes of the data
segment. If you have separated I/D on your 68000, though, you do have a
problem.
A similar problem is if you have your stack located at the very top of
memory, and you pop your registers from the stack with a MOVEM instruction.
This instruction prefetches from the data space, and will cause the same
problem. Under UNIX, however, the problem is nicely avoided by the fact
that you have your arguments and environment sitting between the very top of
memory and the top of the stack.
--
Bruce Robertson
UUCP: {ucbvax!menlo70,seismo}!unr70!unrvax!stride!bruce
More information about the Comp.unix.wizards
mailing list