Exploiting Off-the-Shelf Virtual Memory Mechanisms
Author : olivia-moreira | Published Date : 2025-05-28
Description: Exploiting OfftheShelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Paulo Ferreira and João Barreto Exploiting OfftheShelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin
Presentation Embed Code
Download Presentation
Download
Presentation The PPT/PDF document
"Exploiting Off-the-Shelf Virtual Memory Mechanisms" is the property of its rightful owner.
Permission is granted to download and print the materials on this website for personal, non-commercial use only,
and to display it on your personal computer provided you do not modify the materials and that you retain all
copyright notices contained in the materials. By downloading content from our website, you accept the terms of
this agreement.
Transcript:Exploiting Off-the-Shelf Virtual Memory Mechanisms:
Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and João Barreto Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Email: amohtasham@gsd.inesc-id.pt Multicore revolution Chip-multiprocessors are mainstream hardware We must effectively program these systems Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory January 22nd, 2014 Lock-based methods Parallel Programming with traditional locks is difficult There is a trade-off between complexity and performance Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory January 22nd, 2014 Software Transactional Memory Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Software Transactional Memory is: Easy to use Portable Not limited by hardware capacity The dark side of STM STM has more sequential overhead than HTM How can we alleviate this overhead? Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham A typical STM read operation Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Physical Memory Thread#1 X=10 readTx(X) read(X) if isConsistent() then here comes the overhead Our objective Most transactional workloads are Read-Dominated Most of the read operations are consistent Validation is a waste of work for consistent reads Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham Can we actually read directly from memory and avoid the validation? A naïve approach: Direct read operations Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Physical Memory Thread#1 X=10 read(X) Thread#2 write(X) read(X) TX1 TX2 TX3 Is there any safe way to read directly from memory? Inconsistent X=99 An interrupt by hardware! Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Process Virtual Memory MMU is a common component of commodity hardware By relying on the page-level mechanisms in MMU, we can prevent threads from accessing a memory page Amin Mohtasham A more sophisticated approach: Using page protection bits Page Table Physical Memory Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham PageBaseAddress Read Write 0x2FF8000 1 1 Thread#2 Thread#1 write(X) read(X) TX1 TX2 read(X) blocked blocked 0x2FF8000 X=10 X=99 For a given page, how can we give different permissions to different threads? Mapped memory By using memory map functions, we can define different virtual memory regions with different protection levels Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Page Table Physical Memory PageBaseAddress Read Write 0x2FF8000 0x2FF8000 0x2FF8000