W7 - Virtual Memory (1) Flashcards
Define virtual address space.
Virtual storage assigned to a process
Distinguish difference between real memory and virtual memory.
Real memory: main memory, actual RAM
Virtual memory: memory on disk, multiprogramming
What are the 2 characteristics fundamental to memory management?
1) all memory references that are logical addresses are dynamically translated into physical addresses at runtime
2) a process may be broken up into a number of pieces that don’t need to be continuously located in main memory during execution
True or False:
An interrupt is generated when an address is needed that is not in main memory.
True
Name some support functions required for virtual memory.
1) hardware must support paging and segmentation
2) operating system must include software for managing the movement of pages and/or segments between secondary memory and main memory
Paging
Each process has its own page table. Each page table entry contains the frame number of the corresponding page in main memory
What do the 2 extra bits need to indicate in paging?
1) whether the page is in main memory or not
2) whether the contents of the page has been altered since it was last loaded
What is an alternative to page table problem?
A problem is that the type of page tables, is that their size if proportional to that of the virtual address space. Our solution is inverted page table.
How are inverted page table efficient?
1) Use hashmap to map out tables
2) fixed proportion of real memory is required for the table regardless of number of processes
3) indexes page table entries by frame number than virtual page number
What information does an inverted page table include?
Page number
Process identifier
Control bits
Chain pointer
What is the purpose of Translation Lookaside Buffers (TLB)?
To overcome the problem of storing 2 physical memory accesses for page table and its data. It contains page table entries that have been most recently used
Briefly describe the TLB operation.
1) given virtual address
2) if page table entry present (TLB hit)
3) if page table entry absent (TLB miss)
4) check if page already in main memory
5) TLB updated to include new page entry
Describe pro and cons of different page sizes.
The smaller page size, the more pages required per process
Larger page tables means large portion of page tables in virtual memory