English
Language : 

MC68030 Datasheet, PDF (354/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Memory Management Unit
To solve the problem of accounting for virtual memory areas assigned to a user task, the
operating system uses the existing translation tables to identify these areas. When a valid
descriptor points to a given virtual address page, this 8K-byte page of memory has been
allocated. This scheme provides areas of memory that are multiples of the 8K-byte page
size. Due to the 8K granularity, this scheme would be inadequate for tasks that continually
request and return virtual memory space. As a result, some other technique would be used
(perhaps auxiliary tables to show virtual space availability). The tasks in this system seldom
request additional memory space; any request made is for a large area. This scheme
suffices. The application programs and utilities that run in the UNIX (r) environment have
similar requirements for memory.
The operating system primitive GetVirtual allocates virtual memory space for tasks. The
input parameter is a block size, in bytes; GetVirtual returns the virtual address for the new
block. GetVirtual first checks that the requested size is not too large. Then it scans the
translation tables looking for an unallocated virtual memory area large enough to hold the
requested block. If it does not find enough space, GetVirtual attempts to increase the page
table size to its maximum. If this does not provide the space, GetVirtual returns an error
indication. When the routine finds enough virtual space for the block, it sets the page
descriptors for the block to virgin status (invalid, but allocated). When these pages are first
used, a page fault is generated. The operating system allocates a page frame for the page
and replaces the descriptor with a valid page descriptor. The status (indicated by a software
flag in the invalid descriptor) tells the operating system that the paging device does not have
a page image for this page; no read operation from the paging device is required.
When the status of an invalid descriptor indicates that a page image must be read in,
primitive SwapInPage, reads in the image. The input parameter for this routine is the invalid
descriptor, which contains the disk address of the page image. Before returning,
SwapInPage replaces the invalid descriptor with a valid page descriptor that contains the
page address. The page is now ready for use.
9-66
MC68030 USER’S MANUAL
MOTOROLA