4 ms·
This is an excellent introduction not only to work being done on the JVM, but on some of the implementation challenges of userspace concurrency/greenthreads and
by zbentley 9y ago
This is an excellent introduction not only to work being done on the JVM, but on some of the implementation challenges of userspace concurrency/greenthreads and M:N scheduling in general.
The detail, nuance, and humility present in this article give me some hope that pathological misbehavior of other M:N scheduling models (see Bryan Cantrill's rant/paper about this for more info) may be avoided if something like that comes to the JVM. However, the sheer complexity of the existing JVM code, as the authors point out, may present an obstacle to that quality. Figuring out yield points for coroutines across a large java codebase seems like it would be . . . painful, to say the least.
- dboreham 9y agoExecutive summary : It will probably all end in tears. It would be nice just to have TLS that works with NIO[2].
- deleted 9y ago[deleted]
- hyperpape 9y agoDoes his rant/paper refer to the 1996 paper, or something else? http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50.4682&rep=rep1&type=pdf http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.50....
- pron 9y agoI wrote the proposal, and I did not mention this paper because that would be going into too much detail. However: 1. The paper discusses an implementation of lightweight threads in cooperation with the kernel, in a way that requires switching back and forth between user and kernel mode. 2. The paper was written before the advent of work-stealing schedulers (first popularized in Cilk). Work stealing schedulers have proven themselves to be very efficient for scheduling lightweight threads that block often (on IO or communication with other threads), and have been used with great success in both Erlang and Go. They address the scheduling problems discussed in the paper.
- hyperpape 9y agoThanks. I was not meaning to comment on whether Cantrill was right. His name comes up on this topic, and I wasn't sure whether it all stemmed from that paper, or if there were further complaints from him.