Boosting Software Transactional Memory with Virtual Memory Mechanisms

technology from seed n.w
1 / 23
Embed
Share

Explore how off-the-shelf virtual memory mechanisms can enhance software transactional memory to improve performance in multicore systems. Learn about the challenges and solutions in leveraging virtual memory for efficient parallel programming.

  • Software Development
  • Virtual Memory
  • Transactional Memory
  • Multicore Systems
  • Parallel Programming

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. technology from seed Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham, Paulo Ferreira and Jo o Barreto Email: amohtasham@gsd.inesc-id.pt Amin Mohtasham Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory

  2. Multicore revolution technology from seed 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

  3. Lock-based methods technology from seed 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

  4. Software Transactional Memory technology from seed Software Transactional Memory is: Easy to use Portable Not limited by hardware capacity Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  5. The dark side of STM technology from seed 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

  6. A typical STM read operation technology from seed here comes the overhead Thread#1 PhysicalMemory if isConsistent() then readTx(X) read(X) X=10 Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  7. Our objective technology from seed Most transactional workloads are Read-Dominated Most of the read operations are consistent Validation is a waste of work for consistent reads Can we actually read directly from memory and avoid the validation? Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  8. A nave approach: Direct read operations technology from seed Thread#1 Thread#2 PhysicalMemory TX1 read(X) TX2 write(X) X=10 X=99 Inconsistent TX3 read(X) Is there any safe way to read directly from memory? Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  9. An interrupt by hardware! technology from seed Process MMU is a common component of commodity hardware Virtual Memory By relying on the page-level mechanisms in MMU, we can prevent threads from accessing a memory page Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  10. A more sophisticated approach: Using page protection bits technology from seed Thread#1 Thread#2 Page Table PhysicalMemory PageBaseAddress Read Write 1 0 1 0 0x2FF8000 TX1 0x2FF8000 X=10 X=99 write(X) blocked blocked TX2 read(X) read(X) For a given page, how can we give different permissions to different threads? Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  11. Mapped memory technology from seed By using memory map functions, we can define different virtual memory regions with different protection levels Thread#1 Thread#2 Page Table PhysicalMemory PageBaseAddress Read Write read(X) 0x2FF8000 0 0 0x2FF8000 X=10 0x2FF8000 1 1 read(X) [Abadi et al., ACM PPOPP 09] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  12. Proof of concept: PGSTM technology from seed At most, one writer transaction at each time Using a single global lock Multiple read-only transactions can at each time Read-only transactions can execute in parallel, as long as they do not read from pages being written Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  13. PGSTMs Memory Model technology from seed Two different virtual memory regions pointed at same physical memory pages Read-only Region contains either read-only or inaccessible pages In Read/Write region all pages are accessible and updatable Page Table PhysicalMemory Read-only region Shared Data Read/Write region Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  14. PGSTM in action technology from seed Thread#1 Thread#2 Page Table PhysicalMemory PageBaseAddress Read Write 0x2FF8000 1 0 1 0 TX1 0x2FF8000 X=10 X=99 write(X) blocked 0x2FF8000 1 1 TX2 read(X) read(X) Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  15. When to unlock a page? technology from seed Can we unlock the page when the writer commits? It is not safe if there are other active read-only transactions running Unlock only after such active transactions complete Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  16. Evaluation environment technology from seed List look-up benchmark Read-only transactions search for a random element Read/Write transactions modify a random element We compare our results with TML [Dalessandro et al.,Europar 10] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  17. TML: Transactional Mutex Locks technology from seed At most, one writer transaction at each time Using a single global lock Read-only transactions can not run in parallel with the writer transaction With the lowest sequential overhead Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  18. Evaluation: Different contentions technology from seed Less contention Throughput for different contention levels [64 threads, 10% write-load] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  19. Evaluation: Scalability technology from seed Throughput for different number of concurrent threads [2MB List, 10% write-load] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  20. Evaluation: Different write loads technology from seed Throughput for different write loads [2MB List, 64 threads] Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  21. Conclusion technology from seed Using MMU with STMs can lower their sequential overhead We proposed PGTSM as proof of concept PGSTM outperforms TML in low contention scenarios Our preliminary results are promising Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  22. Future works technology from seed Evaluating with non-trivial benchmarks Supporting multiple writers Using finer grained conflict detection Upgrading to a generic accelerator layer that runs on top of any STM Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

  23. technology from seed Thank you! Exploiting Off-the-Shelf Virtual Memory Mechanisms to Boost Software Transactional Memory Amin Mohtasham

Related


More Related Content