Memory Management Flashcards
What is the Memory Manager OS responsible for?
- Allocating memory to processes
- Loading and unloading individual processes without impacting others
When is memory management used?
To ensure RAM is used efficiently and not wasted.
Otherwise RAM would rapidly run out and fill up with unneeded data so no new applications could run
2 types of memory management
1) Paging
2) Segmentation
Paging
- Uses fixed size divisions
- Memory is divided physically
- A page table is used to map page location
- Easier for OS to manage pace locations as they can be stored non-contiguously (not touching each other)
Segmentation
- Uses varying size divisions
- Causes external fragmentation
- Works better contiguously
- Errors can cause memory leakage which could cause the system to crash
Similarities between paging and segmentation
- Both allow programs to run despite there not being enough memory
- Stored on a disk
- Transferred into memory when needed
Differences between paging and segmentation
- Pages are fixed size. Segments are different sizes
- Pages are made to fit sections of memory. Segments are complete sections of programs. Pages are physical divisions. Segments are logical divisions
When is virtual memory used?
When RAM is full to enable applications to continue to run
How is data transferred between RAM and VM
Data is transferred out of RAM into VM to free up space and then transferred back again when needed
Why is VM useful?
RAM is much more expensive so VM saves buying more RAM
What happens if you over use VM?
System slows down