For 2/16 Flashcards
What does memory management do?
Brings processes together in main memory for execution
What does memory management rely on?
Virtual memory segmentation and paging
What is a hard/fixed partition?
Applications cannot change the size of their memory partitions. The partitions are made in OS design
In hard partitions, how are applications designed if they need more memory?
They are designed to work around the partitions. It’s the programmer’s job
When can the OS swap things in a fixed partition?
If all partitions are full and none are ready or running
What is the major problem with a fixed partition?
If a program cannot fit into a partitions, it needs to use overlays
Why is fixed partition inefficient?
A program can occupy a whole partition if it does not need all that space. This is called internal fragmentation
What is unequal size partitions?
The remedy for fixed partitioning. Larger programs can be accommodated without overlays.
What happens to smaller programs in unequal size partitions?
They use memory inefficiently
What limits processes in unequal sized partitions?
The max amount of partitions
What is dynamic partitioning?
Partitions are of varying size and number. Processes get as much memory as they need
What is external fragmentation?
Dynamically partitioned memory becomes more and more fragmented and utilization declines. Not enough contiguous space to run a process.
What is compaction?
The OS addresses fragmentation by shifting processes so that they are are contiguous. But it wastes CPU time.
Best Fit Placement Algorithm
A block is chosen closest to the request size
First Fit Placement Algorithm
Selects the first block that is big enough to accommodate a process
Next Fit Placement Algorithm
Starts looking for the next block that is large enough from the last placement
What is the buddy system?
A hybrid of fixed and dynamic partitioning schemes.
What happens to available space in the buddy system?
It is all treated as a single block
Logical Address
Reference to a memory location independent of the current assignment of data to memory
Relative Address
Address is expressed relative to some known point
Physical/Absolute Address
Address is that of the actual location in main memory
How does a virtual memory system work?
A small portion of a program is loaded into memory to increase multiprogramming. And there are pointers to secondary memory
What is a problem with virtual memory?
Hard drives are slow
What is paging?
You partition memory into equal size chunks that relatively small, and the process is divided into small chunks the same size of the pages