Skip to main content
Log in

Parallel Task for Parallelising Object-Oriented Desktop Applications

  • Published:
International Journal of Parallel Programming Aims and scope Submit manuscript

Abstract

With the arrival of multi-cores for mainstream desktop systems, developers must invest the effort of parallelising their applications in order to benefit from these systems. However, the structure of these interactive desktop applications is noticeably different from the traditional batch-like applications of the engineering and scientific fields. We present Parallel Task (short ParaTask), a solution to assist the parallelisation of object-oriented applications, with the unique feature of including support for the parallelisation of graphical user interface applications. In the simple, but common, cases concurrency is introduced with a single keyword. ParaTask sets itself apart from the many existing object-oriented parallelisation approaches by integrating different task types into the same model and its careful adherence to object-oriented principles. Due to the wide variety of parallelisation needs, ParaTask provides intuitive support for dependence handling, non-blocking notification and exception handling in an asynchronous environment as well as supporting a flexible task scheduling runtime (currently work-sharing, work-stealing and a combination of the two are supported). The performance is excellent compared to traditional Java parallelisation approaches, shown using a variety of different workloads.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Similar content being viewed by others

Notes

  1. Preliminary proof-of-concept development of ParaTask was presented here [15].

  2. To download the latest ParaTask and other related resources, visit www.parallelit.org.

  3. The term task-safe (as opposed to thread-safe) is used to denote parallel-safe code since ParaTask is a tasking-model (not a threading-model). This means that programmers think in terms of tasks rather than threads (explained further in Sect. 4.2.2).

  4. I/O tasks are an intentional exception, but not a general solution to the here discussed issue.

  5. The TaskID is needed if the method being notified accepts TaskID as parameter, otherwise it is omitted. This ensures at compile time that the correct method signature is used.

  6. Cilk Art’s Cilk++ removes this requirement, since all functions are compiled by default to use the Cilk calling convention.

References

  1. Creeger, M.: Multicore CPUs for the masses. Queue 3(7), 63–64 (2005)

    Article  Google Scholar 

  2. Bull, J.M., Smith, L.A., Pottage, L., Freeman, R.: Benchmarking Java against C and Fortran for scientific applications. In: JGI ’01: Proceedings of the 2001 Joint ACM-ISCOPE Conference on Java Grande, New York, NY, USA. ACM, pp. 97–105 (2001)

  3. TIOBE Software BV (2008) TIOBE programming community index. http://www.tiobe.com/tpci.htm

  4. Sutter, H., Larus, J.: Software and the concurrency revolution. Queue 3(7), 54–62 (2005)

    Article  Google Scholar 

  5. Barroso, L.A.: The price of performance. Queue 3(7), 48–53 (2005)

    Article  Google Scholar 

  6. Lea, D.: Concurrent Programming in Java: Design Principles and Patterns, 2nd edn. Addison-Wesley, Reading, MA (1999)

    Google Scholar 

  7. Ludwig, E.: Multi-threaded user interfaces in Java. PhD thesis, University of Osnabrück, Germany MaY 2006

  8. Hyde, P.: Java Thread Programming. Sams, Indianapolis, IN (2001)

    Google Scholar 

  9. Goetz, B., Peierls, T., Bloch, J., Bowbeer, J., Holmes, D., Lea, D.: Java Concurrency in Practice. Addison-Wesley Professional, Reading, MA (2006)

    Google Scholar 

  10. Muller, H., Walrath, K.: Threads and swing. The swing connection. http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html (2008)

  11. Buddhikot, M., Goil, S.: Throughput computing with chip multithreading and clusters. In: Lecture Notes in Computer Science, vol. 3769, pp. 128–136 (2005)

  12. Oaks, S., Wong, H.: Java Threads, 3rd edn. O’Reilly Media Inc, Sebastopol, CA (2004)

    Google Scholar 

  13. Harbulot, B., Gurd, J.R.: Using AspectJ to separate concerns in parallel scientific Java code. In: AOSD ’04: Proceedings of the 3rd International Conference on Aspect-oriented Software Development, New York, NY, USA. ACM Press, pp. 122–131 (2004)

  14. Philippsen, M., Philippsen, M.: A survey of concurrent object-oriented languages. Concurr. Practice Exp. 12(10), 917–980 (2000)

    Article  MATH  Google Scholar 

  15. Giacaman, N., Sinnen, O.: Parallel task for parallelizing object-oriented desktop applications. In: IEEE International Workshop on Parallel and Distributed Scientific and Engineering Computing (PDSEC) held in conjunction with 24th IEEE International Parallel and Distributed Processing Symposium (IPDPS’10), Atlanta, USA (2010)

  16. Microsoft.: Parallel extensions to the .NET framework community technology preview (CTP), June 2008

  17. Oracle.: java.util.concurrent ExecutorService. http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/ExecutorService.html (2010)

  18. Blumofe, R.D.: Executing multithreaded programs efficiently. Ph.D. thesis, Massachusetts Institute of Technology (1995)

  19. Robert, J., Halstead, H.: Multilisp: a language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7(4), 501–538 (1985)

    Article  MATH  Google Scholar 

  20. Sutter, H.: Interrupt politely. Dr. Dobb’s Journal, April 2008

  21. Fisher, A.L., Ghuloum, A.M.: Parallelizing complex scans and reductions. In: PLDI ’94: Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation, New York, NY, USA. ACM, pp. 135–146 (1994)

  22. Giacaman, N., Sinnen, O.: Parallel iterator for parallelising object oriented applications. In: The 7th WSEAS International Conference on Software Engineering, Parallel and Distributed Systems (SEPADS ’08). UK, Cambridge (2008)

  23. Carver, R.H., Tai, K.-C.: Modern multithreading. Wiley, London (2006)

    Google Scholar 

  24. Nokia Corporation.: Signals & slots. http://qt-project.org/doc/qt-4.8/signalsandslots.html (2011)

  25. Gregor, D.: Boost signals. http://www.boost.org/doc/libs/1_49_0/doc/html/signals.html (2004)

  26. Weisfeld, M.: The Object-oriented Thought Process, 3rd edn. Addison-Wesley Professional, Reading, MA (2008)

    Google Scholar 

  27. Matsuoka, S., Yonezawa, A.: Analysis of Inheritance Anomaly in Object-oriented Concurrent Programming Languages. Research Directions in Concurrent Object-oriented Programming, Cambridge, MA, USA. MIT Press, pp. 107–150 (1993)

  28. Milicia G., Sassone V.: The inheritance anomaly: ten years after. In: SAC ’04: Proceedings of the 2004 ACM Symposium on Applied Computing, New York, NY, USA. ACM, pp. 1267–1274 (2004)

  29. Goodenough, J.B.: Exception handling: issues and a proposed notation. Commun. ACM 18(12), 683–696 (1975)

    Article  MathSciNet  MATH  Google Scholar 

  30. Zakhour, S., Hommel, S., Royal, J., Rabinovitch, I., Risser, T., Hoeber, M.: The Java Tutorial: A Short Course on the Basics, 4 edn. Prentice Hall, Englewood Cliffs, NJ (2006)

  31. Sun Microsystems.: JavaCC Home. https://javacc.dev.java.net/ (2009)

  32. Sinnen, O.: Task Scheduling for Parallel Systems. Wiley, London (2007)

    Book  Google Scholar 

  33. Acar, U.A., Blelloch, G.E., Blumofe, R.D.: The data locality of work stealing. In: SPAA ’00: Proceedings of the Twelfth Annual ACM Symposium on Parallel Algorithms and Architectures, New York, NY, USA. ACM, pp. 1–12 (2000)

  34. Lu, W., Gannon, D.: Parallel XML processing by work stealing. In: SOCP ’07: Proceedings of the 2007 Workshop on Service-oriented Computing Performance: Aspects, Issues, and Approaches, New York, NY, USA. ACM, pp. 31–38 (2007)

  35. Burton, W.F., Sleep, R.M.: Executing functional programs on a virtual tree of processors. In: FPCA ’81: Proceedings of the 1981 Conference on Functional Programming Languages and Computer Architecture, New York, NY, USA. ACM, pp. 187–194 (1981)

  36. Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. J. ACM 46(5), 720–748 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  37. Blumofe, R.D., Papadopoulos, D.: The performance of work stealing in multiprogrammed environments (extended abstract). ACM SIGMETRICS Perform. Eval. Rev. 26(1), 266–267 (1998)

    Article  Google Scholar 

  38. Guo, Y., Barik, R., Raman, R., Sarkar, V.: Work-first and help-first scheduling policies for async-finish task parallelism. In: IEEE International Symposium on Parallel and Distributed Processing (IPDPS 2009) (2009)

  39. Campbell, P.J.: Gauss and the eight queens problem: a study in miniature of the propagation of historical error. Historia Mathematica 4(4), 397–404 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  40. Sutter, H.: The pillars of concurrency. Dr. Dobb’s Journal, August 2007

  41. Microsoft.: MSDN library, improving ASP.NET performance. http://msdn.microsoft.com/en-us/library/ff647787.aspx (2012)

  42. Seow, S.C.: Designing and Engineering Time: The Psychology of Time Perception in Software. Addison-Wesley, Reading, MA (2008)

    Google Scholar 

  43. Sun Microsystems Inc.: Concurrency in swing. The Java tutorials. http://java.sun.com/docs/books/tutorial/uiswing/concurrency/index.html (2008)

  44. Briot, J.-P., Guerraoui, R., Lohr, K.-P.: Concurrency and distribution in object-oriented programming. ACM Comput. Surv. 30(3), 291–329 (1998)

    Article  Google Scholar 

  45. Chandra, R., Gupta, A., Hennessy, J.L.: COOL: an object-based language for parallel programming. Computer 27(8), 13–26 (1994)

    Article  Google Scholar 

  46. Hewitt, C.: Viewing control structures as patterns of passing messages. Artif. Intell. 8, 323–364 (1977)

    Article  Google Scholar 

  47. Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge, MA (1986)

    Google Scholar 

  48. Blumofe, R.D., Joerg, C.F., Kuszmaul, B.C., Leiserson, C.E., Randall, K.H., Zhou, Y.: Cilk: an efficient multithreaded runtime system. In: PPOPP ’95: Proceedings of the Fifth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, New York, NY, USA. ACM, pp. 207–216 (1995)

  49. Cilk Arts Inc.: Cilk++ programmer’s guide (2009)

  50. Boehm, M.: KDE 4.0 API reference—introduction to ThreadWeaver. http://api.kde.org/4.0-api/kdelibs-apidocs/threadweaver/html/index.html (2012)

  51. Nokia Corporation.: QtConcurrent. http://doc.trolltech.com/4.4/qtconcurrent.html (2008)

  52. Intel Corporation.: Reference for Intel threading building blocks (2010)

  53. OpenMP Architecture Review Board.: OpenMP application program interface version 3.0 (2008)

  54. Sun Microsystems Inc.: Java platform standard edition 6 API specification, December 2006

  55. Bordet, S.: Foxtrot—easy API for JFC/Swing. http://foxtrot.sourceforge.net/ (2012)

  56. Charles, P., Grothoff, C., Saraswat, V., Donawa, C., Kielstra, A., Ebcioglu, K., von Praun, C., Sarkar, V.: X10: an object-oriented approach to non-uniform cluster computing. In: OOPSLA ’05: Proceedings of the 20th Annual ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications. New York, NY, USA. ACM Press, pp. 519–538 (2005)

  57. Microsoft.: Task Parallel Library (TPL). http://msdn.microsoft.com/en-us/library/dd460717.aspx (2012)

  58. Sutter, H.: Use threads correctly = isolation + asynchronous messages. Dr. Dobb’s Journal, March 2009

  59. École Polytechnique Fédérale de Lausanne.: The Scala programming language. http://www.scala-lang.org/ (2012)

  60. Typesafe Inc.: Akka. http://akka.io (2012)

  61. Danaher, J.S., Lee, I.-T.A., Leiserson, C.E.: Programming with exceptions in JCilk. Sci. Comput. Program. 63(2), 147–171 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  62. Cavé, V., Zhao, J., Shirako, J., Sarkar, V.: Habanero-Java: the new adventures of old X10. In: Proceedings of the 9th International Conference on Principles and Practice of Programming in Java, pp. 51–61 (2011)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nasser Giacaman.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Giacaman, N., Sinnen, O. Parallel Task for Parallelising Object-Oriented Desktop Applications. Int J Parallel Prog 41, 621–681 (2013). https://doi.org/10.1007/s10766-013-0238-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10766-013-0238-9

Keywords

Navigation