- With relocation and limit registers, each logical address must be less than the limit register;
- The MMU maps the logical address dynamically by adding the value in the relocation register. This mapped address is sent to memory (see Fig. 4).
Figure 4:
Hardware support for relocation and limit registers.
|
- When the CPU scheduler selects a process for execution, the dispatcher loads the relocation and limit registers with the correct values as part of the context switch.
- The relocation-register scheme provides an effective way to allow the OS size to change dynamically.
- For example, the OS contains code and buffer space for device drivers.
- If a device driver (or other OS service) is not commonly used, we do not want to keep the code and data in memory.
- Such code is sometimes called transient OS code; it comes and goes as needed.
- Thus, using this code changes the size of the OS during program execution.
Cem Ozdogan
2010-04-20