A NEW PAGE TABLE FOR 64-BIT ADDRESS SPACES M. Talluri, M. D. Hill, Y. A. Kalidi University of Wisconsin, Madison Sun Microsystems Laboratories.

Slides:



Advertisements
Similar presentations
Page Table Implementation
Advertisements

Chapter 8 Virtual Memory
Virtual Memory In this lecture, slides from lecture 16 from the course Computer Architecture ECE 201 by Professor Mike Schulte are used with permission.
1 CMPT 300 Introduction to Operating Systems Virtual Memory Sample Questions.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
OS Fall’02 Virtual Memory Operating Systems Fall 2002.
16.317: Microprocessor System Design I
Chapter VIII Virtual Memory Jehan-François Pâris
CSE 490/590, Spring 2011 CSE 490/590 Computer Architecture Virtual Memory I Steve Ko Computer Sciences and Engineering University at Buffalo.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 17, 2003 Topic: Virtual Memory.
Virtual Memory Chapter 8.
Memory Management (II)
1 Lecture 14: Virtual Memory Topics: virtual memory (Section 5.4) Reminders: midterm begins at 9am, ends at 10:40am.
Paging and Virtual Memory. Memory management: Review  Fixed partitioning, dynamic partitioning  Problems Internal/external fragmentation A process can.
CE6105 Linux 作業系統 Linux Operating System 許 富 皓. Chapter 2 Memory Addressing.
1 Virtual Memory Chapter 8. 2 Hardware and Control Structures Memory references are dynamically translated into physical addresses at run time –A process.
Virtual Memory Chapter 8.
Virtual Memory I Chapter 8.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
CS 241 Section Week #12 (04/22/10).
Chapter VIII Virtual Memory Review Questions Jehan-François Pâris
Operating Systems & Memory Systems: Address Translation Computer Science 220 ECE 252 Professor Alvin R. Lebeck Fall 2008.
Lecture 19: Virtual Memory
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
Computer Architecture Memory Management Units Iolanthe II - Reefed down, heading for Great Barrier Island.
Virtual Memory Expanding Memory Multiple Concurrent Processes.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
Virtual Memory Part 1 Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology May 2, 2012L22-1
Virtual Memory. Virtual Memory: Topics Why virtual memory? Virtual to physical address translation Page Table Translation Lookaside Buffer (TLB)
Virtual Memory 1 1.
1 Some Real Problem  What if a program needs more memory than the machine has? —even if individual programs fit in memory, how can we run multiple programs?
1 Lecture 16: Virtual Memory Topics: virtual memory, improving TLB performance (Sections )
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Hardware.
Operating Systems Unit 7: – Virtual Memory organization Operating Systems.
Multilevel Caches Microprocessors are getting faster and including a small high speed cache on the same chip.
Carnegie Mellon Introduction to Computer Systems / Spring 2009 March 23, 2009 Virtual Memory.
Page Table Implementation. Readings r Silbershatz et al:
CHAPTER 3-3: PAGE MAPPING MEMORY MANAGEMENT. VIRTUAL MEMORY Key Idea Disassociate addresses referenced in a running process from addresses available in.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Constructive Computer Architecture Virtual Memory: From Address Translation to Demand Paging Arvind Computer Science & Artificial Intelligence Lab. Massachusetts.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Lectures 8 & 9 Virtual Memory - Paging & Segmentation System Design.
Operating Systems Session 7: – Virtual Memory organization Operating Systems.
CS203 – Advanced Computer Architecture Virtual Memory.
W4118 Operating Systems Instructor: Junfeng Yang.
Memory: Page Table Structure CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
Virtual Memory Chapter 8.
Memory: Page Table Structure
Memory Management Virtual Memory.
Section 8 Address Translation March 10th, 2017 Taught by Joshua Don.
From Address Translation to Demand Paging
CS703 - Advanced Operating Systems
From Address Translation to Demand Paging
Page Table Implementation
Day 21 Virtual Memory.
Day 22 Virtual Memory.
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
Chapter 8 Virtual Memory
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
EECE.4810/EECE.5730 Operating Systems
Page that info back into your memory!
Lecture 29: Virtual Memory-Address Translation
Virtual Memory Hardware
Translation Buffers (TLB’s)
Lecture 34 Syed Mansoor Sarwar
CSE 451: Operating Systems Winter 2005 Page Tables, TLBs, and Other Pragmatics Steve Gribble 1.
Paging Andrew Whitaker CSE451.
Virtual Memory 1 1.
Presentation transcript:

A NEW PAGE TABLE FOR 64-BIT ADDRESS SPACES M. Talluri, M. D. Hill, Y. A. Kalidi University of Wisconsin, Madison Sun Microsystems Laboratories

THE PROBLEM Programs’ memory usage doubles every one or two years. Most processor architectures are now moving from 32-bit to 64-bit virtual address spaces How would current page table organizations scale up? –Will support very large but very sparsely populated address spaces

CURRENT ORGANIZATIONS (I) Three main approaches: – Linear page tables : PTs are too large to be stored in main memory Store PT in virtual memory (VMS solution) Very large page tables need more than 2 levels (3 levels on MIPS R3000)

CURRENT ORGANIZATIONS (II) – Forward-mapped page tables: Virtual Address Physical Address MASTER INDEX Offset 1ary2ary SUBINDEX Frame No Frame Addr. (unchanged)

CURRENT ORGANIZATIONS (III) – Hashed (inverted) page tables : VPN hash VPN PPN VPN = virtual page number PPN = “physical page” number = page frame number

What is wrong with them? None of these solutions scales up to 64-bit addresses: –Linear and forward-mapped page tables require too many levels –Hashed page tables require too much space: Must store the VPN and the next pointer in addition to PPN

CLUSTERED PAGE TABLES Variant of hashed page tables Each entry stores mapping information for a cluster of consecutive page table entries Number of pages in a cluster is called the clustering factor.

How they work VPN hash VPN PPN0 PPN1 Clustering factor = 2 Each entry maps 2 contiguous VPNs

Advantages of clustered PTs Require much less space overhead: only one VPN and one next pointer per cluster Take advantage of the fact that the address space of many programs consists of small clusters of pages Interact much better with the TLB miss handling firmware or software.

Are we really saving space? Assume a clustering factor of 2 –Each entry maps 2 pages and occupies 4×8 bytes VPN PPN0 PPN1

The answer –Without clustering, each entry maps one page and occupies 3×8 bytes Clustering will save space if more than 67% of the page mappings are useful VPN PPN

HANDLING TLB MISSES Page table organization should allow efficient handling of TLB misses by –firmware (classical solution) –software (MIPS, Alpha, UltraSPARC) Should handle two recent TLB advances – subblocking – superpages

Subblocking Associates multiple physical page numbers (PPN’s) with each TLB tag: – Complete subblocking allows the page frames containing the subblock pages to be anywhere in main memory (MIPS 4X00x) – Partial subblocking requires these page frames to be placed in a single, aligned block of main memory; there is one PPN per TLB tag.

Handling complete subblocking Have cluster size of PT equal to subblocking factor VPN hash VPN PPN0 PPN1

Handling partial subblocking Since all page frames are contiguous, have a single PPN per cluster Bitmap ( bm ) indicates which pages are in memory VPN hash VPN0 PPN0 bm

Note Each page table entry maps two virtual pages into two physical pages –Virtual page VPN0 is mapped into physical page PPN0 –Virtual page VPN0 + 1 is mapped into physical page PPN0 + 1 These mappings are valid i f the virtual page is actually in main memory

Problem A virtual memory system has 64-bit addresses and a clustered page table with a clustering factor of 4. If each address occupies 8 bytes, what would be the length of a page table entry for: (a) partial subblocking ? (b) complete subblocking ?

Hint No additional space is required for bitmap If page size is equal to 2 p, page size will occupy 64 - p bits In practice, page size > 1,024 and p > 10 Can use these p bits to store the bitmap

Solution (I) With complete subblocking, each PTE has: –one virtual page number –four physical page numbers –one pointer to next entry 6 entries × 8 bytes = 48 bytes

Solution (II) With partial subblocking, each PTE has: –one virtual page number –one physical page number –four bits of bitmap –one pointer to next entry 3 entries × 8 bytes = 24 bytes

Superpages Sets of pages that are aligned both in virtual and in physical memory Brought in memory and out of memory as a single entity Size is a power-of-two multiple of the page size (MIPS, UltraSPARC, Alpha, PowerPC) Large superpages (256KB and above) are especially useful for kernel data

Handling superpages (I) We can: –Have one PTE for each page in the superpage Simplest solution but does not save space –Have one page table per superpage size (including isolated pages) Each page miss will now have to search several PTs

Handling superpages (II) –Store superpage mappings at the appropriate level of a PT Only works with multi-level PTs having a tree structure –Pick hash function such that all pages that are in the same superpage are in the same bucket Results in larger buckets and longer searches

Handling superpages (III) Best solution seems to be –Use same data structures for small superpages and partial subblocks –Otherwise have one entry for each cluster in the superpage –Support very large superpages on an ad hoc basis There will be very few of them

CONCLUSIONS 64-bit addresses will force a rethinking of page table organization New organizations must support efficient handling of TLB misses Supporting partial subblocking is most important issue because partial subblocking requires simpler OS support than superpages and reduces more effectively page table sizes