1 / 6

Java Meets Fine-grain Multithreading

Java Meets Fine-grain Multithreading. Yoshihiro Oyama Kenjiro Taura Akinori Yonezawa {oyama,tau,yonezawa}@is.s.u-tokyo.ac.jp University of Tokyo. Goal. We are planning to implement Java system realizing Thread creation with very very low cost High scalability. Sample Program.

selma
Download Presentation

Java Meets Fine-grain Multithreading

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java MeetsFine-grain Multithreading Yoshihiro Oyama Kenjiro Taura Akinori Yonezawa {oyama,tau,yonezawa}@is.s.u-tokyo.ac.jp University of Tokyo

  2. Goal We are planning to implement Java systemrealizing • Thread creation with very very low cost • High scalability

  3. Sample Program class Pfib { public static int pfib(int n) { if (n < 2) return 1; else { int x, y; sync { fork { x = pfib(n-1); } fork { y = pfib(n-2); } } return x + y; } } } Synchronization block Thread creation

  4. Prototype Implemented • On top of the Extensible Java PreProcessor Kit EPP (by Y. Ichisugi in ETL, Japan) • Java source to source translation • one fork ⇔ one Java thread creation • Only 500-line EPP code • Its performance is out of the question

  5. How to Implement? Q: How can we reduce thread creation cost? A: Lazy Task Creation (LTC) technique seems useful Problem Traditional compilers based on LTC: Stack is managed tricky by compilers and/or runtimes E.g., stack frame info is put into a data structure explicitly But... Java allows to manipulate stack only with call/return/throw even in a bytecode level

  6. Alternativesto Implement Fine-grain Threads • Extending an existing native compiler? • Extending an existing JVM/JIT? • Writing Java source to source translator?

More Related