3 ms·
Thank you for the paper reference. It looks like O(1) detection is possible but is possibly expensive. With a periodic deadlock check you end up having to tune
by zohebv 15y ago
Thank you for the paper reference. It looks like O(1) detection is possible but is possibly expensive. With a periodic deadlock check you end up having to tune the periodicity and be able to write a very robust deadlock handler. For ex: what if one module ends up deadlocking leading to huge buffer overflows in a queuing system. What kind of periodic interval can you recommend that would be generally applicable, how should the deadlock handler react in such a situation etc. periodic detection will make the deadlock handler harder to write.
> Java's Date/Time classes have a broken design
They might be. But none of these are JVM issues per se. These are merely Java library issues. Add a library that fixes the issue. The slide deck is apparently about top 10 issues in the JVM. Deadlock/date are problems that can be solved by a library. Some of the issues in there are Java language issues and not strictly JVM issues. The pauseless GC slide is a ridiculous simplification. The slide deck is an obviously random hodge podge collection of disconnected scraps. It is a waste of time to go read through it. The intention of my comment was to save other people's time as the slide deck does not have anything interesting about Top 10 JVM issues or anything close. It is also somewhat disconcerting to know that the speaker is a VP at Oracle though possibly not in charge of JVM development.
- psykotic 15y ago> What kind of periodic interval can you recommend that would be generally applicable, how should the deadlock handler react in such a situation etc. periodic detection will make the deadlock handler harder to write. The question of how the deadlock handler should be respond is what his slide was about. You need to have a way of returning a standardized error from lock() to signal a deadlock. That's the exception type he calls DeadlockError. You send those signals to enough waiters to break the detected cycles in the graph. As for the checking interval, there's no simple answer. Engineering is often like that. It doesn't mean you give up and abandon the idea. We can define desirable criteria and go from there: the interval needs to be adaptive, long-waiting threads might boost the priority of the deadlock detector thread, etc. For what it's worth, I agree with your overall assessment of his suggestions.