java on scalable memory architectures
play

Java on Scalable Memory Architectures University of Crete , 25th of - PowerPoint PPT Presentation

Java on Scalable Memory Architectures University of Crete , 25th of October 2016 Foivos S. Zakkak Except where otherwise noted, this presentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. Third


  1. Java on Scalable Memory Architectures University of Crete , 25th of October 2016 Foivos S. Zakkak Except where otherwise noted, this presentation is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. Third party marks and brands are the property of their respective holders.

  2. Outline 1 Introduction 2 Java Distributed Memory Model 3 Designing DiSquawk 4 Modeling DiSquawk 5 Implementation & Evaluation 6 Conclusions

  3. 1 Introduction 1.1 Hardware Trends 1 / 31 Moore’s Law, Power Wall & Coherence Protocols [Kaxiras et al. 2010, Choi et al. 2011] Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ The size of a transistor shrinks to half every ~ 18 months [Krzanich2015] ■ Due to the power wall frequency scaling stopped ■ The extra transistors are used for extra cores ■ Cache coherency not scaling in terms of performance and energy consumption

  4. 1 Introduction 1.1 Hardware Trends 2 / 31 Emerging Trends Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ Hundreds of cores per U (rack unit) ■ Lack of global memory coherence ■ Faster communication (TCP-IP vs RDMA)

  5. 1 Introduction 1.1 Hardware Trends 3 / 31 Architectures EuroServer [Durand et al. 2014] Figure Source: Durand et al. 2014 Runnemede [Carter et al. 2013] Figure Source: Carter et al. 2013 Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr

  6. 1 Introduction 1.2 Programming Languages 4 / 31 Managed Programming Languages Highlights Mechanisms Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ Language Specifjcation ■ Consistent behavior across difgerent platforms ■ Memory Model ■ Abstract away hardware details ■ Process Virtual Machine ■ Shorter time to market (TTM) ■ Portability: “write once run everywhere”

  7. 1 Introduction 1.2 Programming Languages 4 / 31 Managed Programming Languages Highlights Mechanisms Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ Language Specifjcation ■ Consistent behavior across difgerent platforms ■ Memory Model ■ Abstract away hardware details ■ Process Virtual Machine ■ Shorter time to market (TTM) ■ Portability: “write once run everywhere”

  8. 1 Introduction 1.2 Programming Languages Ph.D. Thesis Defense [PPPJ’16] [JTRES’16] F. Zakkak - zakkak@ics.forth.gr [ISMM’14] Contributions 31 5 / ■ Java Distributed Memory Model (JDMM) □ Extension of JMM that exposes memory management operations □ Adheres to JMM □ Allows same optimizations as JMM ■ Process Virtual Machine Design and Implementation □ Design of novel algorithms for software caching and synchronization □ Implementation of a distributed JVM for non-cache-coherent architectures □ Evaluation on Formic, a 512-core Emulator ■ Distributed Java Calculus (DJC) □ Mathematical model of the implementation □ Proof of adherence to JMM

  9. Outline 1 Introduction 2 Java Distributed Memory Model 3 Designing DiSquawk 4 Modeling DiSquawk 5 Implementation & Evaluation 6 Conclusions

  10. 2 Java Distributed Memory Model 2.1 Background 6 / 31 What is a memory model? Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ Formal specifjcation that describes the behavior of a program ■ Models all possible executions of a program (legal or not) ■ Provides rules that determine which executions are legal

  11. 2 Java Distributed Memory Model 2.1 Background 7 / 31 What is it good for? Ph.D. Thesis Defense F. Zakkak - zakkak@ics.forth.gr ■ Contract between language or machine designers, implementers, and end-users ■ Language requirements regarding interaction of threads through memory ■ Helps language implementers build the runtime and/or the compiler ■ Helps developers understand a program’s behavior

  12. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  13. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  14. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  15. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  16. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  17. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  18. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  19. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

  20. 2 Java Distributed Memory Model object1.field1 = 24; Ph.D. Thesis Defense Cache action Regular action Synchronization action ≤ ℎ𝑐 : happens-before ≤ 𝑡𝑥 : synchronizes-with ≤ 𝑡𝑝 : synchronization order ≤ 𝑞𝑝 : program order … 2.1 Background … } // ... F. Zakkak - zakkak@ics.forth.gr thread1.join(); } temp1 = object1.field1; synchronized (object1) { 8 / } 31 The Java Memory Model run() { // Thread 1 // ... thread2.start(); synchronized (object1) { object1.field1 = 42; } Sp Sp L W U Fi Fi B F U J St St L R W run() { // Thread 2

Recommend


More recommend