Podcast
Questions and Answers
What is the first step in the virtual memory management process?
What is the first step in the virtual memory management process?
What is the advantage of a larger page size?
What is the advantage of a larger page size?
What is the disadvantage of a larger page size?
What is the disadvantage of a larger page size?
What is the primary advantage of virtual caches?
What is the primary advantage of virtual caches?
Signup and view all the answers
Why are virtual caches not more popular?
Why are virtual caches not more popular?
Signup and view all the answers
What is the alternative approach to getting the best of both virtual and physical caches?
What is the alternative approach to getting the best of both virtual and physical caches?
Signup and view all the answers
What is the primary function of memory modules in RAM construction?
What is the primary function of memory modules in RAM construction?
Signup and view all the answers
What is the advantage of using part of the page offset to index the cache?
What is the advantage of using part of the page offset to index the cache?
Signup and view all the answers
What happens when the row is not open in a DRAM?
What happens when the row is not open in a DRAM?
Signup and view all the answers
What is the main difference between virtual memory and cache?
What is the main difference between virtual memory and cache?
Signup and view all the answers
What is the main difference between virtual and physical caches?
What is the main difference between virtual and physical caches?
Signup and view all the answers
What is the primary goal of virtual memory management?
What is the primary goal of virtual memory management?
Signup and view all the answers
What is the primary function of virtual memory?
What is the primary function of virtual memory?
Signup and view all the answers
What is the term used to describe the mapping of virtual memory to physical memory?
What is the term used to describe the mapping of virtual memory to physical memory?
Signup and view all the answers
What is the result of using a larger page size?
What is the result of using a larger page size?
Signup and view all the answers
What is the size of the blocks used in segmentation in virtual memory?
What is the size of the blocks used in segmentation in virtual memory?
Signup and view all the answers
What is the primary function of the operating system in virtual memory?
What is the primary function of the operating system in virtual memory?
Signup and view all the answers
What is the term used to describe the phenomenon when the processor produces virtual addresses that are translated into physical addresses?
What is the term used to describe the phenomenon when the processor produces virtual addresses that are translated into physical addresses?
Signup and view all the answers
What is the main difference between the memory hierarchy and the file system?
What is the main difference between the memory hierarchy and the file system?
Signup and view all the answers
What is the size of the page table in terms of the page size and PTE size?
What is the size of the page table in terms of the page size and PTE size?
Signup and view all the answers
What is the term used to describe the process of relieving programmers from the overlays?
What is the term used to describe the process of relieving programmers from the overlays?
Signup and view all the answers
What is the purpose of the translation lookaside buffer (TLB)?
What is the purpose of the translation lookaside buffer (TLB)?
Signup and view all the answers
What is the basic OS guideline for page replacement?
What is the basic OS guideline for page replacement?
Signup and view all the answers
What is the approach used by the OS to replace the least recently used block?
What is the approach used by the OS to replace the least recently used block?
Signup and view all the answers
What is the write strategy used in virtual memory management?
What is the write strategy used in virtual memory management?
Signup and view all the answers
Where are page tables typically stored?
Where are page tables typically stored?
Signup and view all the answers
What is the size of the inverted page table (IPT) considering a 512 MiB physical memory?
What is the size of the inverted page table (IPT) considering a 512 MiB physical memory?
Signup and view all the answers
What is the purpose of the hash function in the block identification scheme?
What is the purpose of the hash function in the block identification scheme?
Signup and view all the answers
Study Notes
Virtual Memory
- Virtual Memory (VM) automatically manages two levels of the memory hierarchy represented by main memory and secondary storage.
- Key points of VM include memory space sharing and protection, and memory relocation, which is the mapping of virtual memory to physical memory.
Virtual Memory Size
- PT (Page Table) size = 2^32 / Page Size = 12 × 2^22 = 2^22 (4 MiB) for a page size of 4 KiB.
- In an inverted page table scheme, IPT (Inverted Page Table) size = 2^29 / Page Size = 2^20 (1 MiB) for a page size of 4 KiB and 4 bytes per page table entry.
Translation Lookaside Buffer (TLB)
- TLB is a cache dedicated to reducing address translation time.
- Page tables are stored in main memory and can be large in size, so first, the virtual address is searched in the TLB; if it fails, it is searched in the page table.
Block Identification
- An alternative to page table is to apply a hash function to the virtual address, allowing the data structure to be the length of the number of physical pages in main memory, which is smaller than the number of virtual pages.
Page Replacement
- The basic OS guideline is to minimize page faults.
- Almost all OS try to replace the least recently used (LRU) block.
- The approach uses an "use bit" or "reference bit" which is set whenever the page is accessed, and in a given period, the OS resets the reference bits and records them to check which pages were accessed during that time.
Write Strategy
- Simply, write back with the dirty bit.
- Write through is too costly and not commonly used.
Page Size Selection
- Points in favor of a larger page size:
- Size of the page table is inversely proportional to the page size, so memory can be saved by making pages bigger.
- Larger page size allows for larger caches, leading to fast cache hit times.
- Transferring larger pages to/from secondary storage is more efficient than transferring smaller pages.
- The number of TLB entries is restricted, so larger page size means more memory can be mapped efficiently, reducing the number of TLB misses.
- Points in favor of a smaller page size:
- Conserving storage – less wasted storage when contiguous region of virtual memory is not equal in size to a multiple of the page size.
- Avoiding unused memory in a page, i.e., internal fragmentation.
- Process start-up time, many processes are small, so a large page size would make longer the time to invoke a process.
Virtual and Physical Caches
- Virtual caches are not more popular because OS and user programs may use two different virtual addresses for the same physical address, resulting in duplicate addresses and duplicated information in the cache.
- One alternative to get the best of both virtual and physical caches is to use part of the page offset to index the cache, and in parallel, the virtual part of the address is translated, and the tag match uses physical addresses.
RAM Construction Technology
- Modules are used to facilitate handling and exploit memory interleaving, with memory modules having 4 to 16 memory chips and a 64-bit bus.
- The part of the page offset that is identical in both virtual and physical addresses is used to index the cache.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Quiz on virtual memory, page size, and high performance architectures for ITA students in CSC-25 class.