Preventing deadlocks in runtime

Provided is a method for preventing deadlocks between competing threads. The method includes receiving a lock request from a first thread and, in response, identifying a potential deadlock with a second thread. In response, the method includes determining whether to deny the lock request, which incl...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Liu, Ming Ran, Zhang, Bao, Zu, Xiang, Tang, Xiao Yan, Liu, Tie, Lu, Jing
Format: Patent
Sprache:eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Provided is a method for preventing deadlocks between competing threads. The method includes receiving a lock request from a first thread and, in response, identifying a potential deadlock with a second thread. In response, the method includes determining whether to deny the lock request, which includes: determining whether a first duration for which the first thread will hold the lock to complete its job is longer than a second duration for which the second thread will hold the lock to complete its job; determining whether the second thread will start to use the lock soon relative to the first duration; and determining whether both the first and second threads will complete their respective jobs within a time limit if the lock is denied to the first thread while the second thread completes its job. The method further includes denying the request for the requested lock from the first thread.