Chapter 20 Smaller Tables Chien-Chung Shen CIS, UD

Slides:



Advertisements
Similar presentations
1 CMPT 300 Introduction to Operating Systems Virtual Memory Sample Questions.
Advertisements

4/14/2017 Discussed Earlier segmentation - the process address space is divided into logical pieces called segments. The following are the example of types.
Virtual Memory Chapter 18 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S. Dandamudi.
Lecture 7 Memory Management. Virtual Memory Approaches Time Sharing: one process uses RAM at a time Static Relocation: statically rewrite code before.
Chapter 19 Translation Lookaside Buffer Chien-Chung Shen CIS, UD
Misc Exercise 2 updated with Part III.  Due on next Tuesday 12:30pm. Project 2 (Suggestion)  Write a small test for each call.  Start from file system.
1 COMP 206: Computer Architecture and Implementation Montek Singh Mon., Nov. 17, 2003 Topic: Virtual Memory.
Memory Management (II)
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
Chapter 91 Translation Lookaside Buffer (described later with virtual memory) Frame.
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.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
CS 346 – Chapter 8 Main memory –Addressing –Swapping –Allocation and fragmentation –Paging –Segmentation Commitment –Please finish chapter 8.
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.
Lecture Topics: 11/17 Page tables TLBs Virtual memory flat page tables
COSC 3407: Operating Systems Lecture 13: Address Translation.
Chapter 18 Paging Chien-Chung Shen CIS, UD
1 Address Translation Memory Allocation –Linked lists –Bit maps Options for managing memory –Base and Bound –Segmentation –Paging Paged page tables Inverted.
Chapter 4 Memory Management Virtual Memory.
Address Translation. Recall from Last Time… Virtual addresses Physical addresses Translation table Data reads or writes (untranslated) Translation tables.
Chapter 21 Swapping: Mechanisms Chien-Chung Shen CIS, UD
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Virtual Memory Hardware.
PA1 due in one week TA office hour is 1-3 PM The grade would be available before that.
Lecture 7 TLB. Virtual Memory Approaches Time Sharing Static Relocation Base Base+Bounds Segmentation Paging.
Paging Paging is a memory-management scheme that permits the physical-address space of a process to be noncontiguous. Paging avoids the considerable problem.
Address Translation Andy Wang Operating Systems COP 4610 / CGS 5765.
Address Translation Mark Stanovich Operating Systems COP 4610.
CHAPTER 3-3: PAGE MAPPING MEMORY MANAGEMENT. VIRTUAL MEMORY Key Idea Disassociate addresses referenced in a running process from addresses available in.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
Memory Management. 2 How to create a process? On Unix systems, executable read by loader Compiler: generates one object file per source file Linker: combines.
CS203 – Advanced Computer Architecture Virtual Memory.
Chapter 18 Paging Chien-Chung Shen CIS/UD
Chapter 19 Translation Lookaside Buffer
CS161 – Design and Architecture of Computer
Memory Management Virtual Memory.
Review: Memory Virtualization
Section 8 Address Translation March 10th, 2017 Taught by Joshua Don.
CS161 – Design and Architecture of Computer
CS703 - Advanced Operating Systems
Paging COMP 755.
143A: Principles of Operating Systems Lecture 6: Address translation (Paging) Anton Burtsev October, 2017.
Chien-Chung Shen CIS/UD
Memory Hierarchy Virtual Memory, Address Translation
PA1 is out Best by Feb , 10:00 pm Enjoy early
Paging Review: Virtual address spaces are broken into pages
CSE 153 Design of Operating Systems Winter 2018
Sarah Diesburg Operating Systems CS 3430
Lecture 6 Memory Management
Paging Lecture November 2018.
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
Virtual Memory Hardware
CSE 451: Operating Systems Autumn 2005 Memory Management
Virtual Memory Overcoming main memory size limitation
Andy Wang Operating Systems COP 4610 / CGS 5765
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Andy Wang Operating Systems COP 4610 / CGS 5765
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Lecture 7: Flexible Address Translation
Memory Management CSE451 Andrew Whitaker.
Andy Wang Operating Systems COP 4610 / CGS 5765
Andy Wang Operating Systems COP 4610 / CGS 5765
Paging and Segmentation
CS703 - Advanced Operating Systems
CSE 153 Design of Operating Systems Winter 2019
EECE.4810/EECE.5730 Operating Systems
Andy Wang Operating Systems COP 4610 / CGS 5765
Sarah Diesburg Operating Systems COP 4610
CS703 - Advanced Operating Systems
Virtual Memory 1 1.
Presentation transcript:

Chapter 20 Smaller Tables Chien-Chung Shen CIS, UD

Problem Big page table 32-bit address space (2 32 bytes) with 4KB (2 12 byte) pages and 4-byte page table entry 2 32 /2 12 pages and 4MB page table per process Problem: how to make page table smaller? The simplest way –bigger pages –e.g., 16KB pages -> 1MB page table –internal fragmentation

Hybrid Approach Paging + segmentation PFN valid prot present dirty 10 1 r-x — rw — rw rw- 1 1 Any thing bad? –too many invalid PTEs

Paging + Segmentation One page table per segment –base (physical address of page table) + bounds –3 page tables for code, heap, and stack –on TLB miss, use Seg to decide which base/bounds SN = (VirtualAddress & SEG_MASK) >> SN_SHIFT // Seg VPN = (VirtualAddress & VPN_MASK) >> VPN_SHIFT AddressOfPTE = Base[SN] + (VPN * sizeof(PTE)) Issues: –segmentation is not quite flexible (e.g., sparsely- used heap) –external fragmentation caused by page tables

Multi-level Page Tables How to get rid of those invalid regions in page table (instead of keeping them in memory) ? –turns linear page table into something like a tree –chop up page table into page-sized units –if an entire page of PTEs is invalid, don’t allocate that page of page table at all –page directory PFN valid prot present dirty 10 1 r-x — rw — rw rw- 1 1

Multi-level Page Tables Page directory entry (PDE)

Multi-level Page Tables Pros page-table space allocated is proportional to amount of address space used growing page table by getting more page frames (which could be anywhere in physical memory Cons on TLB miss, need two memory accesses to get translation info (one for page directory and one for PTE itself) time-space trade-off complexity: perfection is finally attained not when there is no longer anything to add, but when there is no longer anything to take away -- Antoine de Saint-Exupery

Detailed Example 16 KB address space + 64-byte pages –14-bit virtual address space –Assume 1 KB page table

Inverted Page Table Instead of having many page tables (one per process), a single page table that has an entry for each physical page of the system –which process is using this page (frame) –which virtual page of that process maps to this physical page