1/30
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What are the goals of memory management?
Keep CPU busy; Protect process memory; Allow relocation; Manage allocation efficiently
What does the Memory Management Unit (MMU) do?
Translates logical to physical addresses; Enforces protection; Supports relocation
What is a logical address?
Address generated by CPU; Also called virtual address
What is a physical address?
Actual location in main memory; Used by hardware
When can binding of addresses occur?
At compile time; At load time; At execution time
What are the advantages of dynamic loading and linking?
Load routines when needed; Reduce memory use; Share libraries across programs
What describes contiguous allocation?
Each process in one block; May cause external fragmentation
What causes external fragmentation?
Free memory split into holes; Enough total space but not contiguous
What causes internal fragmentation?
Allocated block larger than needed; Wasted space inside blocks
When is compaction possible?
When relocation is dynamic; To combine free space
What are the three main allocation strategies?
First-fit; Best-fit; Worst-fit
What does paging divide memory into?
Physical frames and logical pages
Advantages of paging?
No external fragmentation; Noncontiguous allocation; Easy sharing
What parts make up a logical address in paging?
Page number; Page offset
What does the page table store?
Frame numbers; Valid/invalid bits; Protection bits
What hardware assists address translation?
MMU; TLB
Disadvantages of paging?
Page-table overhead; Internal fragmentation in last page
Page size trade-offs?
Small pages = less waste but larger tables; Large pages = fewer tables but more waste
Why are large page tables a problem?
Consume memory; Slow lookups
Solutions for large page tables?
Hierarchical paging; Hashed page tables; Inverted page tables
What characterizes an inverted page table?
One entry per frame; Smaller memory use; Needs hashing to search
Purpose of swapping?
Move inactive processes to disk; Increase multiprogramming
Drawbacks of swapping?
High I/O overhead; Slower response time
Requirements of reentrant (shared) code?
Non-self-modifying; Read-only; Separate per-process data
Benefits of shared pages?
Reduced memory usage; Shared libraries; Common code mapped to same frame
How is memory protection achieved?
Valid/invalid bits; Base and limit registers
Fragmentation summary
Contiguous allocation → external; Paging → internal; Segmentation → external
Paging vs segmentation
Paging = fixed-size units; Segmentation = variable-size logical units
Hardware needed for paging
MMU; TLB; Page-table base register
OS responsibilities in memory management
Track used/free space; Allocate and deallocate memory; Manage paging and swapping