Virtualizing Transactional Memory

Slides:



Advertisements
Similar presentations
Transactional Memory Supporting Large Transactions Anvesh Komuravelli Abe Othman Kanat Tangwongsan Hardware-based.
Advertisements

EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Thread-Level Transactional Memory Decoupling Interface and Implementation UW Computer Architecture Affiliates Conference Kevin Moore October 21, 2004.
Copyright © 2006, CS 612 Transactional Memory Architectural Support for a Lock-Free Data Structure Some material borrowed from : Konrad Lai, Microprocessor.
COMP 3221: Microprocessors and Embedded Systems Lectures 27: Virtual Memory - III Lecturer: Hui Wu Session 2, 2005 Modified.
Nested Transactional Memory: Model and Preliminary Architecture Sketches J. Eliot B. Moss Antony L. Hosking.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
[ 1 ] Agenda Overview of transactional memory (now) Two talks on challenges of transactional memory Rebuttals/panel discussion.
1 Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, “lazy” implementation.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
1 Virtual Memory vs. Physical Memory So far, all of a job’s virtual address space must be in physical memory However, many parts of programs are never.
1 Lecture 24: Transactional Memory Topics: transactional memory implementations.
Virtual Memory and Paging J. Nelson Amaral. Large Data Sets Size of address space: – 32-bit machines: 2 32 = 4 GB – 64-bit machines: 2 64 = a huge number.
Unbounded Transactional Memory Paper by Ananian et al. of MIT CSAIL Presented by Daniel.
1 Lecture 10: TM Implementations Topics: wrap-up of eager implementation (LogTM), scalable lazy implementation.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Memory Management Page replacement algorithms, segmentation Tanenbaum, ch. 3 p Silberschatz, ch. 8, 9 p
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
Chapter 4 Memory Management Virtual Memory.
Kevin E. Moore, Jayaram Bobba, Michelle J. Moravan, Mark D. Hill & David A. Wood Presented by: Eduardo Cuervo.
Review °Apply Principle of Locality Recursively °Manage memory to disk? Treat as cache Included protection as bonus, now critical Use Page Table of mappings.
Introduction to Virtual Memory and Memory Management
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Demand Paging.
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)
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
CDA 5155 Virtual Memory Lecture 27. Memory Hierarchy Cache (SRAM) Main Memory (DRAM) Disk Storage (Magnetic media) CostLatencyAccess.
Memory Management memory hierarchy programs exhibit locality of reference - non-uniform reference patterns temporal locality - a program that references.
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
CS161 – Design and Architecture of Computer
Translation Lookaside Buffer
Lecture 20: Consistency Models, TM
Xen and the Art of Virtualization
Free Transactions with Rio Vista
CS161 – Design and Architecture of Computer
Lecture 12 Virtual Memory.
CS703 – Advanced Operating Systems
Transactional Memory : Hardware Proposals Overview
CS703 - Advanced Operating Systems
Outline Paging Swapping and demand paging Virtual memory.
Section 9: Virtual Memory (VM)
Chapter 9: Virtual Memory
From Address Translation to Demand Paging
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
COMPSCI210 Recitation 12 Oct 2012 Vamsi Thummala
Memory Hierarchy Virtual Memory, Address Translation
Morgan Kaufmann Publishers
CS510 Operating System Foundations
Lecture 28: Virtual Memory-Address Translation
Two Ideas of This Paper Using Permissions-only Cache to deduce the rate at which less-efficient overflow handling mechanisms are invoked. When the overflow.
CSCI206 - Computer Organization & Programming
Virtual Memory 3 Hakim Weatherspoon CS 3410, Spring 2011
Chapter 9: Virtual-Memory Management
Lecture 6: Transactions
CS399 New Beginnings Jonathan Walpole.
Christopher J. Rossbach, Owen S. Hofmann, Donald E. Porter, Hany E
Free Transactions with Rio Vista
Translation Lookaside Buffer
Lecture 22: Consistency Models, TM
CSE 451: Operating Systems Autumn 2005 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
CSC3050 – Computer Architecture
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Lecture 8: Efficient Address Translation
Page Allocation and Replacement
Lecture 23: Transactional Memory
Lecture 9: Caching and Demand-Paged Virtual Memory
Virtual Memory Use main memory as a “cache” for secondary (disk) storage Managed jointly by CPU hardware and the operating system (OS) Programs share main.
Virtual Memory.
Presentation transcript:

Virtualizing Transactional Memory Rajwar, R., Herlihy, M., and Lai, K. 2005 presented by VasilyVolkov, 04/30/08

Motivation Transactional Memory is good Never deadlocks Makes concurrent programming easier But requires programmer to be aware of Transaction buffer size Scheduling quanta Process migration Too low-level issues to be mainstream

Goals Transparently hide resource exhaustion Fast common case In space (cache overflows) In time (scheduling and clock interrupts) *functionality* Fast common case Keep virtualization off the critical path *performance* Sketch of solution keep data in virtual memory if evicted from local buffer

Overview of Data Structures XSW: Transaction Status Word Ultimate authority on transaction’s status One per thread to survive context switch / interrupt Nested transactions are flattened Keeps current transaction state: Running/committing/aborted active/swapped out cached/overflowed No transaction

Overview of Data Structures XADT: Transaction Address Data Table One per process/address space Is in virtual memory Handles overflow Keeps evicted transaction cache lines: Clean and tentative value Data’s virtual address Pointer transaction’s status word (TSW) Same transaction’s entries are linked for faster cleaning Multiple entries per block if accessed by multiple threads Keeps number of overflowed data blocks To quickly check if it is empty

Overview of Data Structures XF: XADT Filter Does an address conflict with XADT? Too slow to walk through XADT every time Use Bloom filter to check quickly if it is not there If Bloom says “may be there” – walk through Use counting Bloom filter to enable removal Estimated to consume up to 10MB of virtual memory Optimizations are possible

Overall Structure of VTM Access to XF and XADT is cached Dashed: software structures Solid: hardware structures

Transaction State Transition R/B/C = running/aborted/committing A/S = active/swapped-out L/O = local/overflowed

Synchronization w/ non-transactions Non-transactional accesses? must not threaten transactions’ atomicity! Can be done by checking XF and XADT Slows down Enough to serialize with transactional accesses Non-transactions can’t read transaction buffer Can’t read value that is later aborted Non-transaction CAN write transactional data “poison” data in cache when data goes to XADT Abort if conflict with other process

Context Switch / Page Faults Flush data to XADT when thread is suspended Both clean and cached states Repopulate on demand when rescheduled Check that stored clean values matches current memory values Abort otherwise – conflict with non-transactional access Do same on page faults Don’t necessarily need to abort on page fault!

Committing and Aborting Update XSW Update local transaction buffer Update XADT Update XF Can be safely interrupted!

Open Challenges Virtual address aliasing 2 processes address same physical data via different virtual addresses Effect of system calls within a transaction is not defined OS should have its own XADT? Exception handling? True nested transactions?