skip to main content
research-article

Concurrency by modularity: design patterns, a case in point

Published:17 October 2010Publication History
Skip Abstract Section

Abstract

General purpose object-oriented programs typically aren't embarrassingly parallel. For these applications, finding enough concurrency remains a challenge in program design. To address this challenge, in the Panini project we are looking at reconciling concurrent program design goals with modular program design goals. The main idea is that if programmers improve the modularity of their programs they should get concurrency for free. In this work we describe one of our directions to reconcile these two goals by enhancing Gang-of-Four (GOF) object-oriented design patterns. GOF patterns are commonly used to improve the modularity of object-oriented software. These patterns describe strategies to decouple components in design space and specify how these components should interact. Our hypothesis is that if these patterns are enhanced to also decouple components in execution space applying them will concomitantly improve the design and potentially available concurrency in software systems. To evaluate our hypothesis we have studied all 23 GOF patterns. For 18 patterns out of 23, our hypothesis has held true. Another interesting preliminary result reported here is that for 17 out of these 18 studied patterns, concurrency and synchronization concerns were completely encapsulated in our concurrent design pattern framework.

References

  1. }}P. America. Issues in the design of a parallel object-oriented language. Formal Aspects of Computing, 1(4):366--411, 1989. Google ScholarGoogle ScholarCross RefCross Ref
  2. }}N. Benton, L. Cardelli, and C. Fournet. Modern concurrency abstractions for C#. ACM Trans. Program. Lang. Syst., 26(5):769--804, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: safe multithreaded programming for C/C. In Proceedings of the Conference on Object Oriented Programming Systems, Languages and Applications, pages 81--96, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}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 PPOPP, pages 207--216, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel java. In Proceedings of the Conference on Object Oriented Programming Systems, Languages and Applications, pages 97--116, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}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. In Proceedings of the Conference on Object Oriented Programming Systems, Languages and Applications, pages 519--538, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}R. Cunningham and E. Kohler. Tasks: language support for event-driven programming. In Conference on Hot Topics in Operating Systems, Berkeley, CA, USA, 2005.Google ScholarGoogle Scholar
  8. }}D. Dig, J. Marrero, and M. D. Ernst. Refactoring sequential java code for concurrency via concurrent libraries. In ICSE, pages 397--407, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}J. Fischer, R. Majumdar, and T. Millstein. Tasks: language support for event-driven programming. In PEPM, pages 134--143, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}M. Frigo, C. E. Leiserson, and K. H. Randall. The implementation of the Cilk-5 multithreaded language. In the ACM conference on Programming language design and implementation (PLDI), pages 212--223, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}E. Gamma and K. Beck. JUnit. http://www. junit. org.Google ScholarGoogle Scholar
  12. }}E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman Publishing Co., Inc., 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}M. Krohn, E. Kohler, and M. F. Kaashoek. Events can make sense. In USENIX, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}M. Kulkarni, K. Pingali, B. Walter, G. Ramanarayanan, K. Bala, and L. P. Chew. Optimistic parallelism requires abstractions. In PLDI, pages 211--222, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. }}D. Lea. Concurrent Programming in Java. Second Edition: Design Principles and Patterns. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}D. Lea. A Java Fork/Join Framework. In The Java Grande Conference, pages 36--43, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. }}D. Leijen, W. Schulte, and S. Burckhardt. The design of a task parallel library. In Proceedings of the Conference on Object Oriented Programming Systems, Languages and Applications, pages 227--242, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}Y. Long, S. L. Mooney, T. Sondag, and H. Rajan. Implicit invocation meets safe, implicit concurrency. In GPCE '10: Ninth International Conference on Generative Programming and Component Engineering, October 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}C. Lopes. D: A language framework for distributed programming. PhD thesis, Northeastern University, 1997.Google ScholarGoogle Scholar
  20. }}T. G. Mattson, B. A. Sanders, and B. L. Massingill. A Pattern Language for Parallel Programming. Addison Wesley Software Patterns Series, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}M. D. McCool. Structured parallel programming with deterministic patterns. In 2nd USENIX workshop on Hot Topics in Parallelism, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}J. Ousterhout. Why threads are a bad idea (for most purposes). In ATEC, January 1996.Google ScholarGoogle Scholar
  23. }}V. Pankratius, C. Schaefer, A. Jannesari, and W. F. Tichy. Software engineering for multicore systems: an experience report. In IWMSE workshop, pages 53--60, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}P. Pratikakis, J. Spacco, and M. Hicks. Transparent Proxies for Java Futures. In OOPSLA, pages 206--223, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}H. Rajan, Y. Long, S. Kautz, S. Mooney, and T. Sondag. Panini project's website. http://paninij.sourceforge.net, 2010.Google ScholarGoogle Scholar
  26. }}M. C. Rinard and M. S. Lam. The design, implementation, and evaluation of Jade. ACM Trans. Program. Lang. Syst., 20(3):483--545, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}J. Robert H. Halstead. Multilisp: A Language for Concurrent Symbolic Computation. ACM Trans. Program. Lang. Syst., 7(4):501--538, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}Saha, B. ηl. McRT-S™: a high performance software transactional memory system for a multi-core runtime. In PPoPP, pages 187--197, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. }}D. C. Schmidt, H. Rohnert, M. Stal, and D. Schultz. Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects. John Wiley & Sons, Inc., New York, NY, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}B. Shriver and P. Wegner. Research directions in object-oriented programming, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. }}F. Towfic, M. Greenlee, and V. Honavar. Aligning biomolecular networks using modular graph kernels. In 9th International Workshop on Algorithms in Bioinformatics (WABI'09), 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. }}A. Welc, S. Jagannathan, and A. Hosking. Safe Futures for Java. In OOPSLA, pages 439--453, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}A. Yonezawa. ABCL: An object-oriented concurrent system, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}A. Yonezawa and M. Tokoro. Object-oriented concurrent programming, 1990.Google ScholarGoogle Scholar

Index Terms

  1. Concurrency by modularity: design patterns, a case in point

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!