This post is an overview of the concurrency features of Java 7. This includes the Fork/Join Framework, the TransferQueue and the ThreadLocalRandom class
We've discussed differences between parallel, computational systems and concurrent, event handling systems. Areas of differences include:
Determinism: desirable vs impossible
Sign of parallel safety: same results vs correct results
Parallelism bugs: easy to pinpoint vs impossible to define
Queues: implementation detail vs part of the interface
Preemption: nearly useless vs nearly essential
In an earlier post I mentioned that one goal of the new introductory curriculum at Carnegie Mellon is to teach parallelism as the general case of computing, rather than an esoteric, specialized subject for advanced students. Many people are incredulous when I tell them this, because it immediately conjures in their mind the myriad complexities…
With the advent of multi-core processors concurrent programming is becoming indispensable. Scala's primary concurrency construct is actors. Actors are basically concurrent processes that communicate by exchanging messages. Actors can also be seen as a form of active objects where invoking a method corresponds to sending a message. The Scala Actors library provides both asynchronous and synchronous message sends (the latter are implemented by exchanging several asynchronous messages). Moreover, actors may communicate using futures where requests are handled asynchronously, but return a representation (the future) that allows to await the reply. This tutorial is mainly designed as a walk-through of several complete example programs Our first example consists of two actors that exchange a bunch of messages and then terminate. The first actor sends "ping" messages to the second actor, which in turn sends "pong" messages back (for each received "ping" message one "pong" message).
CUDA lets you work with familiar programming concepts while developing software that can run on a GP This is the first of a series of articles to introduce you to the power of CUDA -- through working code -- and to the thought process to help you map applications onto multi-threaded hardware (such as GPUs) to get big performance increases. Of course, not all problems can be mapped efficiently onto multi-threaded hardware, so part of my thought process will be to distinguish what will and what won't work, plus provide a common-sense idea of what might work "well-enough". "CUDA programming" and "GPGPU programming" are not the same (although CUDA runs on GPUs). CUDA permits working with familiar programming concepts while developing software that can run on a GPU. It also avoids the performance overhead of graphics layer APIs by compiling your software directly to the hardware (GPU assembly language, for instance), thereby providing great performance.
T. Tu, X. Liu, L. Song, and Y. Zhang. Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems - ASPLOS \textquotesingle19, ACM, (2019)
J. Swalens, J. De Koster, and W. De Meuter. Proceedings of the 8th ACM SIGPLAN International Workshop on Programming Based on Actors, Agents, and Decentralized Control - AGERE 2018, page 33--43. ACM, (November 2018)
D. Aumayr, S. Marr, E. Gonzalez Boix, and H. Mössenböck. Proceedings of the 16th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes, page 157--171. ACM, (October 2019)
Q. Luo, F. Hariri, L. Eloussi, and D. Marinov. Proceedings of the 22Nd ACM SIGSOFT International Symposium on Foundations of Software Engineering, page 643--653. ACM, (2014)
X. Chang, W. Dou, Y. Gao, J. Wang, J. Wei, and T. Huang. Proceedings of the 41st International Conference on Software Engineering, page 631--642. IEEE Press, (May 2019)
H. Sun, D. Bonetta, F. Schiavio, and W. Binder. Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization, page 61--72. IEEE Press, (2019)
C. Hsiao, S. Narayanasamy, E. Khan, C. Pereira, and G. Pokam. Proceedings of the Twenty-Second International Conference on Architectural Support for Programming Languages and Operating Systems, page 193--205. ACM, (2017)
V. Raychev, M. Vechev, and M. Sridharan. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 151--166. ACM, (2013)
R. Utterback, K. Agrawal, J. Fineman, and I. Lee. Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures, page 83--94. ACM, (2016)
A. Yoga, S. Nagarakatte, and A. Gupta. Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, page 833--845. ACM, (2016)
J. Protze, M. Schulz, D. Ahn, and M. Müller. Proceedings of the 27th International Symposium on High-Performance Parallel and Distributed Computing, page 144--155. ACM, (2018)
M. Cao, M. Zhang, A. Sengupta, and M. Bond. Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 20:1--20:13. ACM, (2016)
J. Roemer, K. Genc, and M. Bond. Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 374--389. ACM, (2018)
J. Wang, W. Dou, Y. Gao, C. Gao, F. Qin, K. Yin, and J. Wei. Proceedings of the 32nd IEEE/ACM International Conference on Automated Software Engineering, page 520--531. IEEE Press, (2017)
G. Pinto, W. Torres, and F. Castor. Proceedings of the 6th Workshop on Evaluation and Usability of Programming Languages and Tools, page 39--46. New York, NY, USA, ACM, (2015)
D. Wu, L. Chen, Y. Zhou, and B. Xu. 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), page 1-10. (October 2015)
S. Fowler, S. Lindley, and P. Wadler. 31st European Conference on Object-Oriented Programming (ECOOP 2017), volume 74 of Leibniz International Proceedings in Informatics (LIPIcs), page 11:1--11:28. Dagstuhl, Germany, Schloss Dagstuhl--Leibniz-Zentrum für Informatik, (2017)
N. Cohen, A. Tal, and E. Petrank. Proceedings of the 22Nd ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 17--29. ACM, (2017)
S. Lu, J. Tucek, F. Qin, and Y. Zhou. Proceedings of the 12th International Conference on Architectural Support for Programming Languages and Operating Systems, page 37--48. ACM, (2006)
C. Flanagan, and S. Freund. Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 121--133. ACM, (2009)
T. Elmas, S. Qadeer, and S. Tasiran. Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 245--255. ACM, (2007)
S. Tasharofi, M. Pradel, Y. Lin, and R. Johnson. 2013 28th IEEE/ACM International Conference on Automated Software Engineering, page 114-124. (November 2013)
I. Cassar, and A. Francalanza. Proceedings 13th International Workshop on Foundations of Coordination Languages and Self-Adaptive Systems, page 54--68. (September 2014)
S. Tasharofi, R. Karmani, S. Lauterburg, A. Legay, D. Marinov, and G. Agha. Formal Techniques for Distributed Systems: Joint 14th IFIP WG 6.1 International Conference, FMOODS 2012 and 32nd IFIP WG 6.1 International Conference, FORTE 2012, Stockholm, Sweden, June 13-16, 2012. Proceedings, page 219--234. Springer, (2012)
D. Deng, W. Zhang, and S. Lu. Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, page 785--802. ACM, (2013)
N. Jalbert, and K. Sen. Proceedings of the Eighteenth ACM SIGSOFT International Symposium on Foundations of Software Engineering, page 57--66. New York, NY, USA, ACM, (2010)
J. De Koster, T. Van Cutsem, and W. De Meuter. Proceedings of the 6th International Workshop on Programming Based on Actors, Agents, and Decentralized Control, page 31--40. ACM, (2016)
C. Ritson, and J. Simpson. Communicating Process Architectures 2008, volume 66 of Concurrent Systems Engineering Series, page 293--307. Amsterdam, The Netherlands, IOS Press, (September 2008)
A. Matveev, N. Shavit, P. Felber, and P. Marlier. Proceedings of the 25th Symposium on Operating Systems Principles, page 168--183. New York, NY, USA, ACM, (2015)
J. Swalens, J. De Koster, and W. De Meuter. 30th European Conference on Object-Oriented Programming (ECOOP 2016), volume 56 of Leibniz International Proceedings in Informatics (LIPIcs), page 23:1--23:28. Dagstuhl, Germany, Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik, (2016)
G. Steele, Jr., D. Lea, and C. Flood. Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 453--472. ACM, (2014)
D. Bonetta, L. Salucci, S. Marr, and W. Binder. Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 531--547. ACM, (Nov 2, 2016)(acceptance rate 25%).
B. Daloze, S. Marr, D. Bonetta, and H. Mössenböck. Proceedings of the 2016 ACM International Conference on Object Oriented Programming Systems Languages & Applications, page 642--659. ACM, (Nov 2, 2016)(acceptance rate 25%).
L. Salucci, D. Bonetta, S. Marr, and W. Binder. Proceedings of the 21st ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 40:1--40:2. ACM, (March 2016)
B. Daloze, C. Seaton, D. Bonetta, and H. Mössenböck. Proceedings of the 10th International Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems, (2015)
S. Abramsky. Electronic Notes in Theoretical Computer Science, (2006)Proceedings of the Workshop "Essays on Algebraic Process Calculi" (APC 25)Proceedings of the Workshop "Essays on Algebraic Process Calculi" (APC 25).
S. Marr, E. Gonzalez Boix, and H. Mössenböck. Proceedings of the 9th Arbeitstagung Programmiersprachen, volume 1559 of ATPS'16, page 91--95. CEUR-WS, (Feb 25, 2016)
J. McAffer. ECOOP’95 — Object-Oriented Programming, 9th European Conference, Åarhus, Denmark, August 7–11, 1995, volume 952 of Lecture Notes in Computer Science, Springer Berlin Heidelberg, (1995)
P. Liu, X. Zhang, O. Tripp, and Y. Zheng. Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, page 55--64. ACM, (2015)
Y. Hayduk, A. Sobe, and P. Felber. Distributed Applications and Interoperable Systems, volume 9038 of Lecture Notes in Computer Science, Springer, (2015)
B. Claudel, Q. Sabah, and J. Stefani. Formal Techniques for Distributed Objects, Components, and Systems, volume 9039 of Lecture Notes in Computer Science, Springer, (2015)
Y. Honda, and A. Yonezawa. ECOOP ’88 European Conference on Object-Oriented Programming, volume 322 of Lecture Notes in Computer Science, Springer Berlin Heidelberg, (1988)
F. David, G. Thomas, J. Lawall, and G. Muller. Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages &\#38; Applications, page 291--307. ACM, (2014)
J. Zhou, X. Xiao, and C. Zhang. Proceedings of the 34th International Conference on Software Engineering, page 892--902. Piscataway, NJ, USA, IEEE Press, (2012)
M. Zhang, J. Huang, M. Cao, and M. Bond. Proceedings of the 20th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, page 97--108. ACM, (2015)