Think writing a compiler is difficult? It is—unless you use Parrot, a complete compiler construction kit. With Parrot, crafting a new programming language is as easy as authoring a new website.
Program performance is always a concern, even in this era of high-performance hardware. This article, the first in a two-part series, guides you around the many pitfalls associated with benchmarking Java code. Part 2 covers the statistics of benchmarking and offers a framework for performing Java benchmarking. Because almost all new languages are virtual machine-based, the general principles the article describes have broad significance for the programming community at large.
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…
I recently diagnosed the root cause of a concurrency bug, CR6822370,
and thought it sufficiently interesting to share the details. (CR 6822370 actually represents a
cluster of bugs that are now thought to be related by a common underlying issue).
Briefly, we have a lost wakeup bug in the native C++ Parker::park() platform-specific
infrastructure code that implements java.util.concurrent.LockSupport.park().
The lost wakeup arises from a race that itself arises because of architectural
reordering that in turn occurs because of missing memory barrier instructions.
The lost wakeup may manifest as various 'hangs' or instances of progress failure.
A. Oka, H. Masuhara, T. Imai, and T. Aotani. Companion to the First International Conference on the Art, Science and Engineering of Programming, page 26:1--26:7. New York, NY, USA, ACM, (2017)
H. Pan, B. Hindman, and K. Asanović. Proceedings of the First USENIX conference on Hot topics in parallelism, page 6. Berkeley, CA, USA, USENIX Association, (2009)
R. Brooks, R. Gabriel, and G. Steele Jr.. International Joint Conference on Artificial Intelligence, 2, page 845--849. Karlsruhe, West Germany, William Kaufman, (August 1983)
T. Cutsem, S. Mostinckx, and W. Meuter. Computer Languages, Systems & Structures, 35 (1):
80 - 98(2009)ESUG 2007 International Conference on Dynamic Languages (ESUG/ICDL 2007).
T. Cutsem, S. Mostinckx, and W. Meuter. ICDL '07: Proceedings of the 2007 international conference on Dynamic languages, page 222--248. New York, NY, USA, ACM, (2007)
J. Auerbach, D. Bacon, P. Cheng, and R. Rabbah. OOPSLA '10: Proceedings of the ACM international conference on Object oriented programming systems languages and applications, page 89--108. New York, NY, USA, ACM, (2010)
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)
J. Huang, and C. Zhang. Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, volume 47 of OOPSLA '12, page 451--466. ACM, (October 2012)