Paged Dynamic System Example - HP MC68040 User Manual

Emulator, graphical user interface
Table of Contents

Advertisement

Chapter 10: Using Memory Management
Understanding Emulation and Analysis Of The Memory Management Unit
in physical memory space each of these programs will be located. The
programmers don't have to worry that some additional code they write in their
programs might overwrite some of the code that was written by another
programmer. The operating system will place all of the code in available memory
space and place appropriate translation mappings in the MMU to ensure that when
the logical address for one of the programs (tasks) is present in the program
counter, the appropriate physical address will appear on the bus to access the
desired physical memory location.
Your HP emulator/analyzer can give you partial support for a non-paged, dynamic
system. When the MMU has been set up to manage memory during execution of
one of the above tasks, you can update the deMMUer to translate addresses for that
task. When that task is executing, the analyzer will be able to make trace
measurements and provide correct results. When any of the other tasks are
executing, trace measurement results will be invalid because the other tasks will
depend on different translation tables in the MMU and there is no way to
automatically update the deMMUer when execution switches from one task to
another.

Paged dynamic system example

Assume you have developed a program that occupies 10 megabytes of logical
address space. Perhaps you have only 2 megabytes of physical address space in
your system. Still, you want to be able to run the entire program. You set up a
specification in the MMU translation control register to divide the address space
into pages (the 68040 lets you divide the memory space into one of two page sizes:
either 4 Kbytes or 8 Kbytes). Assume you set up the MMU to divide the memory
into 4-Kbyte pages. Your program will occupy 2,500 pages of code, and 500 of
these pages can be contained within your physical memory space at any given time.
As your program executes, the operating system moves pages of your program code
into address space in physical memory. When execution goes beyond the addresses
contained on the presently active page, the MMU checks to see if the next logical
address is on a page that has already been placed in physical memory. If it is, the
MMU performs the appropriate translation for the next logical address, placing the
appropriate physical address on the bus, and execution continues. If it is not, the
operating system moves the page that has the next address to be executed up from
an external storage device to physical memory space, overwriting one of the pages
that had occupied physical space before. The operating system updates the
translation tables to identify the new logical address space that now occupies that 4
Kbyte of physical memory, and program execution continues.
372

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ec040Lc04064783a64783b

Table of Contents