Memory Management II Flashcards
What is page demanding ?
When a new process starts, a page is loaded.
If an address is called that is outside the page it causes a page fault.
The new page is loaded, forming a resident set.
What is a page table ?
Every processes has a page table. Each page entry has a:
- Present bit (indicates if the page is in real memory)
- Modified bit (shows if the page has been modified)
What is virtual memory ?
Stores unused pages in swap space rather than on the physical memory. Page tables can be large and stored on secondary memory. Retrieving the pages is a lot slower than execution time.
What is a working set of pages ?
A set of pages a process will need in a given time.
What is thrashing ?
When there are too many processes the CPU spends time swapping pages instead of executing. This is fixed by balancing the number of processes and allocating memory wisely.
What are the main page replacement algorithms ?
- Least recently used (LRU), replaces the page not used for the longest time
- Not recently used (NLU), replaces the page not being used in a given time frame
- First in first out (FIFO), replaces the oldest page\
- Second chance algorithm, uses a circular list and a used bit to give pages a second chance before replacing them
Why are paging and segmentation useful ?
Paging allows efficient memory use and optimization
Segmentation allows logical structuring and dynamic memory allocation
How does a paged segmented system work ?
Segment number points to a page table,
Page number points to page frame,
Displacement points to real memory address