Memory Management
Memory Management
Process scheduling can improve CPU utilization and responsiveness, but achieving this improvement requires keeping multiple processes in memory.
The CPU obtains instructions and data through registers, caches, and main memory. Data in secondary storage must first be moved into memory before the CPU uses it.
To give each process its own memory space, base and limit registers determine the legal addresses and range it can access.
Logical and Physical Addresses
An address generated by the CPU is a logical address; an address seen by a memory unit is a physical address.
In this relocation model, the user program uses logical addresses. Memory accesses relocate legal logical addresses relative to the base register to obtain physical addresses.
From the CPU's address to a memory byte
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
Calculate three memory addresses
A process starts at physical address 8000 and occupies 1000 bytes. Addresses are measured in bytes.
- Fill in the table: for each logical address, decide whether it is valid and calculate its physical address if valid.
- What is the last physical byte address this process can access?
| Logical address | Inside 0–999? | Physical address |
|---|---|---|
| 120 | ? | ? |
| 999 | ? | ? |
| 1000 | ? | ? |