Preemption-based avoidance of priority inversion for Java
- 1 January 2004
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 529-538 vol.1
- https://doi.org/10.1109/icpp.2004.1327963
Abstract
Priority inversion occurs in concurrent programs when low-priority threads hold shared resources needed by some high-priority thread, causing them to block indefinitely. Shared resources are usually guarded by low-level synchronization primitives such as mutual-exclusion locks, semaphores, or monitors. There are two existing solutions to priority inversion. The first, establishing high-level scheduling invariants over synchronization primitives to eliminate priority inversion a priori, is difficult in practice and undecidable in general. Alternatively, run-time avoidance mechanisms such as priority inheritance still force high-priority threads to wait until desired resources are released. We describe a novel compiler and run-time solution to the problem of priority inversion, along with experimental evaluation of its effectiveness. Our approach allows preemption of any thread holding a resource needed by higher-priority threads, forcing it to release its claim on the resource, roll back its execution to the point at which the shared resource was first acquired, and discard any updates made in the interim. The compiler inserts code at synchronization points, permitting rollback of thread execution, and efficient revocation of interim updates. Our design and implementation are realized in the context of IBM's Jikes RVM, a high-quality compiler and runtime system for Java. Our performance results show that throughput of high-priority threads using our scheme can be improved by 30% to 100% when compared with a classical scheduler that does not address priority inversion.Keywords
This publication has 17 references indexed in Scilit:
- Software transactional memory for dynamic-sized data structuresPublished by Association for Computing Machinery (ACM) ,2003
- Alleviating priority inversion and non-determinism in real-time CORBA ORB core architecturesPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Transactional lock-free execution of lock-based programsPublished by Association for Computing Machinery (ACM) ,2002
- Ownership types for safe programmingPublished by Association for Computing Machinery (ACM) ,2002
- Effective fine-grain synchronization for automatically parallelized programs using optimistic synchronization primitivesACM Transactions on Computer Systems, 1999
- Implementing jalapeño in JavaPublished by Association for Computing Machinery (ACM) ,1999
- Software transactional memoryPublished by Association for Computing Machinery (ACM) ,1995
- Priority inheritance protocols: an approach to real-time synchronizationIEEE Transactions on Computers, 1990
- Priority inversion and its control: An experimental investigationPublished by Association for Computing Machinery (ACM) ,1988
- On optimistic methods for concurrency controlACM Transactions on Database Systems, 1981