skip to main content
10.1145/2647508.2647514acmconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

Habanero-Java library: a Java 8 framework for multicore programming

Published: 23 September 2014 Publication History

Abstract

With the advent of the multicore era, it is clear that future growth in application performance will primarily come from increased parallelism. We believe parallelism should be introduced early into the Computer Science curriculum to educate students on the fundamentals of parallel computation. In this paper, we introduce the newly-created Habanero-Java library (HJlib), a pure Java 8 library implementation of the pedagogic parallel programming model [12]. HJlib has been used in teaching a sophomore-level course titled "Fundamentals of Parallel Programming" at Rice University.
HJlib adds to the Java ecosystem a powerful and portable task parallel programming model that can be used to parallelize both regular and irregular applications. By relying on simple orthogonal parallel constructs with important safety properties, HJlib allows programmers with a basic knowledge of Java to get started with parallel programming concepts by writing or refactoring applications to harness the power of multicore architecture. The HJlib APIs make extensive use of lambda expressions and can run on any Java 8 JVM. HJlib runtime feedback capabilities, such as the abstract execution metrics and the deadlock detector, help the programmer to obtain feedback on theoretical performance as well as the presence of potential bugs in their program.
Being an implementation of a pedagogic programming model, HJlib is also an attractive tool for both educators and researchers. HJlib is actively being used in multiple research projects at Rice and also by external independent collaborators. These projects include exploitation of homogeneous and heterogeneous multicore parallelism in big data applications written for the Hadoop platform [20, 43].

References

[1]
The Computer Language Benchmarks Game. URL http://benchmarksgame.alioth.debian.org/.
[2]
Habanero Extreme Scale Software Research Project, 2014. URL https://wiki.rice.edu/confluence/display/HABANERO/Habanero+Extreme+Scale+Software+Research+Project.
[3]
Chapel Educator Resources, 2014. URL http://chapel.cray.com/education.html.
[4]
COMP 322: Fundamentals of Parallel Programming, 2014. URL https://wiki.rice.edu/confluence/display/PARPROG/COMP322.
[5]
Habanero-Java Library Javadoc, 2014. URL http://www.cs.rice.edu/~vs3/hjlib/doc/.
[6]
Java Concurrency Utilities, 2014. URL http://docs.oracle.com/javase/8/docs/technotes/guides/concurrency/.
[7]
G. Agha. Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge, MA, USA, 1986. ISBN 0-262-01092-5.
[8]
E. Allan, D. Chase, J. Hallett, V. Luchangco, J.-W. Maessen, G. L. Ryu, Sukyoung Steele Jr., and S. Tobin-Hochstadt. The Fortress Language Specification Version 1.0, March 2008. URL http://research.sun.com/projects/plrg/fortress.pdf.
[9]
R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall, and Y. Zhou. Cilk: An Efficient Multithreaded Runtime System. In Proceedings of the fifth ACM SIGPLAN symposium on Principles and Practice of Parallel Programming, PPOPP '95, pages 207--216, New York, NY, USA, 1995. ACM. ISBN 0-89791-700-6.
[10]
C. Cao Minh, J. Chung, C. Kozyrakis, and K. Olukotun. STAMP: Stanford Transactional Applications for Multi-Processing. In IISWC '08: Proceedings of The IEEE International Symposium on Workload Characterization, September 2008.
[11]
V. Cavé, Z. Budimlić, and V. Sarkar. Comparing the Usability of Library vs. Language Approaches to Task Parallelism. In Evaluation and Usability of Programming Languages and Tools, PLATEAU '10, pages 9:1--9:6, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0547-1. URL http://doi.acm.org/10.1145/1937117.1937126.
[12]
V. Cavé, J. Zhao, Y. Guo, and V. Sarkar. Habanero-Java: the New Adventures of Old X10. In Proceedings of the 9th International Conference on Principles and Practice of Programming in Java, PPPJ '11, pages 51--61, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0935-6. URL http://doi.acm.org/10.1145/2093157.2093165.
[13]
B. L. Chamberlain, D. Callahan, and H. P. Zima. Parallel Programmability and the Chapel Language. International Journal of High Performance Computing Applications, 21(3):291--312, August 2007. ISSN 1094-3420. URL http://dx.doi.org/10.1177/1094342007078442.
[14]
P. Charles, C. Grothoff, V. Saraswat, C. Donawa, A. Kielstra, K. Ebcioglu, C. von Praun, and V. Sarkar. X10: An Object-Oriented Approach to Non-uniform Cluster Computing. SIGPLAN Not., 40: 519--538, Oct. 2005. ISSN 0362-1340.
[15]
S. Davies, J. A. Polack-Wahl, and K. Anewalt. A Snapshot of Current Practices in Teaching the Introductory Programming Sequence. In T. J. Cortina, E. L. Walker, L. A. S. King, and D. R. Musicant, editors, Proceedings of the 42Nd ACM Technical Symposium on Computer Science Education, SIGCSE '11, pages 625--630. ACM, 2011. ISBN 978-1-4503-0500-6. URL http://doi.acm.org/10.1145/1953163.1953339.
[16]
K. Ebcioglu, V. Saraswat, and V. Sarkar. X10: An Experimental Language for High Productivity Programming of Scalable Systems. In Proceedings of the Second Workshop on Productivity and Performance in High-End Computing (PPHEC-05), January 2005. URL http://dist.codehaus.org/x10/documentation/papers/P-PHEC05-paper.pdf.
[17]
EPCC. The Java Grande Forum Multi-threaded Benchmarks. URL http://www2.epcc.ed.ac.uk/computing/research_activities/java_grande/threads/s1contents.html.
[18]
Goetz, Brian. State of the Lambda: Libraries Edition, 2013. URL http://cr.openjdk.java.net/~briangoetz/lambda/lambda-libraries-final.html.
[19]
M. I. Gordon, W. Thies, and S. Amarasinghe. Exploiting Coarse-Grained Task, Data, and Pipeline Parallelism in Stream Programs. SIGOPS Oper. Syst. Rev., 40:151--162, October 2006. ISSN 0163-5980.
[20]
M. Grossman, M. Breternitz, and V. Sarkar. HadoopCL: MapReduce on Distributed Heterogeneous Platforms Through Seamless Integration of Hadoop and OpenCL. In Proceedings of the 2013 IEEE 27th International Symposium on Parallel and Distributed Processing Workshops and PhD Forum, IPDPSW '13, pages 1918--1927, Washington, DC, USA, 2013. IEEE Computer Society. ISBN 978-0-7695-4979-8. URL http://dx.doi.org/10.1109/IPDPSW.2013.246.
[21]
Y. Guo, R. Barik, R. Raman, and V. Sarkar. Work-First and Help-First Scheduling Policies for Async-Finish Task Parallelism. In Proceedings of the 2009 IEEE International Symposium on Parallel&Distributed Processing, IPDPS '09, pages 1--12, Washington, DC, USA, 2009. IEEE Computer Society. ISBN 978-1-4244-3751-1.
[22]
S. Gupta and V. K. Nandivada. IMSuite: A Benchmark Suite for Simulating Distributed Algorithms. CoRR, abs/1310.2814, 2013.
[23]
R. H. Halstead. Multilisp: A Language for Concurrent Symbolic Computation. ACM Transactions on Programming Languages and Systems, 7:501--538, October 1985. ISSN 0164-0925.
[24]
S. Imam and V. Sarkar. Integrating Task Parallelism with Actors. In Proceedings of the ACM international conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '12, pages 753--772, New York, NY, USA, 2012. ACM. URL http://doi.acm.org/10.1145/2384616.2384671.
[25]
S. Imam and V. Sarkar. Cooperative Scheduling of Parallel Tasks with General Synchronization Patterns. In Proceedings of the 28th European conference on Object-Oriented Programming, ECOOP '14, New York, NY, USA, 2014. ACM.
[26]
I. Karlin, J. Keasler, and R. Neely. LULESH 2.0 Updates and Changes. Technical Report LLNL-TR-641973, August 2013.
[27]
D. Lea. A Java Fork/Join Framework. In Proceedings of the ACM 2000 Conference on Java Grande, JAVA '00, pages 36--43, New York, NY, USA, 2000. ACM. URL http://doi.acm.org/10.1145/337449.337465.
[28]
D. Leijen, W. Schulte, and S. Burckhardt. The Design of a Task Parallel Library. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA '09, pages 227--242, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-766-0. URL http://doi.acm.org/10.1145/1640089.1640106.
[29]
Luontola, Esko. Retrolambda: Use Lambdas on Java 7, 2013. URL https://github.com/orfjackal/retrolambda.
[30]
C. G. Mason, M. and M. Raadt. Trends in Introductory Programming Courses in Australian Universities - Languages, Environments and Pedagogy. In M. Raadt and A. Carbone, editors, Australasian Computing Education Conference (ACE2012), volume 123 of CR-PIT, pages 33--42, Melbourne, Australia, 2012. ACS. URL http://crpit.com/confpapers/CRPITV123Mason.pdf.
[31]
Miller, Alex. Set your Java 7 Phasers to stun, 2008. URL http://tech.puredanger.com/2008/07/08/java7-phasers/.
[32]
OpenMP. OpenMP Application Program Interface, Version 3.0. http://www.openmp.org/mp-documents/spec30.pdf, May 2008.
[33]
J. Ponge. Fork and Join: Java Can Excel at Painless Parallel Programming Too!, 2011. URL http://www.oracle.com/technetwork/articles/java/fork-join-422606.html.
[34]
R. Raman, J. Zhao, V. Sarkar, M. Vechev, and E. Yahav. Efficient Data Race Detection for Async-Finish Parallelism. In Proceedings of the First international conference on Runtime verification, RV'10, pages 368--383, Berlin, Heidelberg, 2010. Springer-Verlag. ISBN 3-642-16611-3, 978-3-642-16611-2.
[35]
D. P. Reed and R. K. Kanodia. Synchronization with Eventcounts and Sequencers. Commun. ACM, 22(2):115--123, Feb. 1979. ISSN 0001-0782. URL http://doi.acm.org/10.1145/359060.359076.
[36]
J. Reinders. Intel Threading Building Blocks. O'Reilly & Associates, Inc., Sebastopol, CA, USA, first edition, 2007. ISBN 9780596514808.
[37]
J. Shirako, D. M. Peixotto, V. Sarkar, and W. N. Scherer. Phasers: a Unified Deadlock-Free Construct for Collective and Point-to-Point Synchronization. In Proceedings of the 22nd Annual International Conference on Supercomputing, ICS '08, pages 277--288, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-158-3. URL http://doi.acm.org/10.1145/1375527.1375568.
[38]
J. Shirako, V. Cavé, J. Zhao, and V. Sarkar. Finish Accumulators: An Efficient Reduction Construct for Dynamic Task Parallelism. In The 4th Workshop on Determinism and Correctness in Parallel Programming (WoDet), March 2013.
[39]
J. Shun, G. E. Blelloch, J. T. Fineman, P. B. Gibbons, A. Kyrola, H. V. Simhadri, and K. Tangwongsan. Brief Announcement: The Problem Based Benchmark Suite. In Proceedings of the Twenty-fourth Annual ACM Symposium on Parallelism in Algorithms and Architectures, SPAA '12, pages 68--70, New York, NY, USA, 2012. ACM. ISBN 978-1-4503-1213-4. URL http://doi.acm.org/10.1145/2312005.2312018.
[40]
R. Surendran, R. Raman, S. Chaudhuri, J. Mellor-Crummey, and V. Sarkar. Test-Driven Repair of Data Races in Structured Parallel Programs. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '14, pages 15--25, New York, NY, USA, June 2014. ACM. ISBN 978-1-4503-2784-8. URL http://doi.acm.org/10.1145/2594291.2594335.
[41]
S. Taşirlar and V. Sarkar. Data-Driven Tasks and their Implementation. In Proceedings of the International Conference on Parallel Processing (ICPP) 2011, ICPP '11, pages 652--661, Washington, DC, USA, September 2011. IEEE Computer Society. ISBN 978-0-7695-4510-3. URL http://dx.doi.org/10.1109/ICPP.2011.87.
[42]
The GPars team. The GPars Project - Reference Documentation, 2014. URL http://www.gpars.org/guide/.
[43]
Zhang, Yunming and Cox, Alan and Sarkar, Vivek. HJ-Hadoop: An Optimized MapReduce Runtime for Multi-core Systems. In 5th USENIX Workshop on Hot Topics in Parallelism (HotPar '13), June 2013. Accepted as poster with accompanying paper.

Cited By

View all
  • (2024)Game Programming Meets Parallel Computing: Teaching Parallel Computing Concepts to Game ProgrammersProceedings of the 4th International Conference on Advances in Computational Science and Engineering10.1007/978-981-97-2977-7_2(17-31)Online publication date: 3-Sep-2024
  • (2023)Efficient Parallel Functional Programming with EffectsProceedings of the ACM on Programming Languages10.1145/35912847:PLDI(1558-1583)Online publication date: 6-Jun-2023
  • (2023)Responsive Parallelism with SynchronizationProceedings of the ACM on Programming Languages10.1145/35912497:PLDI(712-735)Online publication date: 6-Jun-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PPPJ '14: Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java platform: Virtual machines, Languages, and Tools
September 2014
214 pages
ISBN:9781450329262
DOI:10.1145/2647508
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 September 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Habanero-Java library
  2. Java task parallel library
  3. lambda expressions
  4. task parallelism

Qualifiers

  • Research-article

Funding Sources

Conference

PPPJ '14
Sponsor:

Acceptance Rates

Overall Acceptance Rate 29 of 58 submissions, 50%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Game Programming Meets Parallel Computing: Teaching Parallel Computing Concepts to Game ProgrammersProceedings of the 4th International Conference on Advances in Computational Science and Engineering10.1007/978-981-97-2977-7_2(17-31)Online publication date: 3-Sep-2024
  • (2023)Efficient Parallel Functional Programming with EffectsProceedings of the ACM on Programming Languages10.1145/35912847:PLDI(1558-1583)Online publication date: 6-Jun-2023
  • (2023)Responsive Parallelism with SynchronizationProceedings of the ACM on Programming Languages10.1145/35912497:PLDI(712-735)Online publication date: 6-Jun-2023
  • (2022)Supercharging the APGAS Programming Model with Relocatable Distributed CollectionsScientific Programming10.1155/2022/50924222022Online publication date: 1-Jan-2022
  • (2022)Entanglement detection with near-zero costProceedings of the ACM on Programming Languages10.1145/35476466:ICFP(679-710)Online publication date: 31-Aug-2022
  • (2022)Automated Assessment Tools for grading of programming Assignments: A review2022 International Conference on Computer Communication and Informatics (ICCCI)10.1109/ICCCI54379.2022.9740769(1-4)Online publication date: 25-Jan-2022
  • (2021)Task parallel assembly language for uncompromising parallelismProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3460969(1064-1079)Online publication date: 19-Jun-2021
  • (2021)An ownership policy and deadlock detector for promisesProceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming10.1145/3437801.3441616(348-361)Online publication date: 17-Feb-2021
  • (2021)Provably space-efficient parallel functional programmingProceedings of the ACM on Programming Languages10.1145/34342995:POPL(1-33)Online publication date: 4-Jan-2021
  • (2021)Teaching High Productivity and High Performance in an Introductory Parallel Programming Course2021 IEEE 28th International Conference on High Performance Computing, Data and Analytics Workshop (HiPCW)10.1109/HiPCW54834.2021.00010(21-28)Online publication date: Dec-2021
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media