Week 7 - Memory Management Flashcards
What is internal memory fragmentation?
When memory is split into equal size blocks, if the data stored in a block is less than the size of the block, there are gaps in memory that are left unused.
What is external memory fragmentation?
When there is enough space in memory to store new data, but the data can’t be stored in one continuous segment.
What causes internal fragmentation?
Paging and fixed partitioning
What causes external fragmentation?
Segmentation and dynamic partitioning
What is a page fault?
An interrupt that occurs when a process tries to access a block of memory not currently stored in memory
Virtual memory is implemented using demand paging. What is demand paging?
A page is only copied from virtual memory into physical memory when a program tries to access it.
What are the two solutions to prevent thrashing?
Working set model - Define the working set as the set of pages used in the most recent x page references. Keep only the working set in main memory.
Page-fault frequency – Give process additional frames if page fault frequency high. Remove frame from process if page fault rate low.