Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8255678

Add Mutex::try_lock version without rank checks

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 16
    • hotspot
    • b26

    Description

      The mutex ranking is used as a deadlock prevention technique that assigns a rank to each Mutex. Mutexes have to be acquired in order of decreasing rank which prevents circular waits. Today we validate this order everytime we acquire ownership of a Mutex. We could relax this validation for try_lock() in cases where failure to acquire ownership will not block the thread's progress, i.e. in cases where the action under the lock is desirable but can be skipped on try_lock() failure. In these cases, even if the Mutex is out of rank order the thread will not block if it already has an owner, so circular waits are not possible.

      Attachments

        Issue Links

          Activity

            People

              pchilanomate Patricio Chilano Mateo
              pchilanomate Patricio Chilano Mateo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: