Week 6: Memory Management: Fixed partitions Flashcards
What does the process manager determine?
When a process will run
What does the memory manager determine?
Where a process will run.
What is the “first law” of computing?
However much memory a computer has, a program will be written that needs more.
What are the three main types of computer memory?
- Cache (fastest, on or near the processor)
- Primary memory (RAM/ROM)
- Secondary memory (hard disks or offline storage).
How does memory speed compare between types?
- Cache is accessed in nanoseconds
- Primary memory in a few nanoseconds, and
- Hard disks in milliseconds.
Why can’t all memory be cache?
Cache memory is expensive and limited in size due to economic and design constraints.
How does primary memory differ from secondary memory?
Primary memory is directly addressable by the processor, while secondary memory requires data transfer to primary memory for use.
In the simplest memory model, how is memory allocated?
One process is loaded into memory at a time and uses as much memory as needed.
What technique can increase memory availability in a simple model?
Using overlays to load portions of a program as needed.
What is contiguous storage allocation?
Memory is allocated in a single, continuous block with no gaps.
What is non-contiguous storage allocation?
Memory is allocated in multiple blocks or segments that may be scattered in primary memory.
How does multiprogramming improve processor utilization?
By running multiple processes, the processor can stay busy even when one process is waiting for I/O.
How does fixed partition multiprogramming work?
Memory is divided into fixed-size partitions, which may vary in size and are allocated to processes as needed.
What does the operating system track in fixed partitions?
Which partitions are in use and which are free.
What is the downside of multiple partition queues?
Memory can be wasted when large partitions are empty while small jobs wait.
How does a single queue address multiple partition queues issue and what is the downside of this approach?
A single queue reduces wasted memory but may still lead to inefficiencies with small jobs in large partitions.
What does address binding involve?
Assigning memory addresses to data and instructions, such as connecting a function call to its library implementation.
Why is address binding complex in multiprogramming?
The specific memory location of a process is not known beforehand, requiring relocation solutions.
What is the relocation problem?
Memory addresses need to adapt based on where a process is loaded in memory.
How can relocation be handled dynamically?
By using base (or segment) registers to calculate addresses relative to a program’s starting point.
What happens when a process is moved in memory?
The base register is updated, and all address calculations automatically adjust.
How is memory protection enforced?
Using a limit register along with a base register to ensure memory access stays within valid bounds.
What happens if a memory address exceeds the limit?
An error occurs, preventing access to unauthorized memory.