Menu

#132 Extend the QXK mutex to support also simple operation without the priority-ceiling protocol

QP-C-C++
closed
None
1
2017-09-29
2017-09-28
No

A commercial customer requests to extend the QXK mutex facility (QXMutex class) to support also a simple operation without applying the priority-ceiling protocol. This simpler QXMutex usage mode (no priority-ceiling) should NOT require or use any thread priority levels in QP. The QXMutex should continue to offer the priority-ceiling protocol mode, but only when the ceiling priority is specified.

Proposed feature design:

  1. allow the ceiling==0 argument in the mutex initialization QXMutex::init().
  2. a mutex initialized with ceiling==0 (QXMutex::init(0)) means "no ceiling", so such mutex will NOT use the priority-ceiling protocol.
  3. in this case the mutex will NOT require a unique priority level
  4. in this case the mutex will not change (boost) the priority of the holding thread in the QXMutex::lock() operation.
  5. in this case the mutex will still support nesting of locks (as before), up to 255 levels of nesting.
  6. when initialized with ceiling>0, QXMutex WILL use the priority-ceiling protocol, as before. It will require that the ceiling priority be unique and not used by any other thread or mutex. In other words, the previous functionality remains unchanged.

--MMS

Discussion

  • Quantum Leaps

    Quantum Leaps - 2017-09-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,11 +1,11 @@
     A commercial customer requests to extend the QXK mutex facility (QXMutex class) to support also a simple operation without applying the priority-ceiling protocol.
    
     Specifically:
    -* allow the `ceiling==0` argument in the mutex initialization `QXMutex::init()`.
    -* a mutex initialized with `ceiling==0` (`QXMutex::init(0)`) means "no ceiling", so such mutex will **NOT** use the priority-ceiling protocol.
    -* in this case the mutex will **NOT** require a unique priority level
    -* in this case the mutex will not change (boost) the priority of the holding thread in the `QXMutex::lock()` operation.
    -* in this case the mutex will still support nesting of locks (as before), up to 255 levels of nesting.
    -* when initialized with `ceiling>0`, `QXMutex` **WILL** use the priority-ceiling protocol, as before. It will require that the ceiling priority be unique and not used by any other thread or mutex. In other words, the previous functionality remains unchanged.
    +1. allow the `ceiling==0` argument in the mutex initialization `QXMutex::init()`.
    +2. a mutex initialized with `ceiling==0` (`QXMutex::init(0)`) means "no ceiling", so such mutex will **NOT** use the priority-ceiling protocol.
    +3. in this case the mutex will **NOT** require a unique priority level
    +4. in this case the mutex will not change (boost) the priority of the holding thread in the `QXMutex::lock()` operation.
    +5. in this case the mutex will still support nesting of locks (as before), up to 255 levels of nesting.
    +6. when initialized with `ceiling>0`, `QXMutex` **WILL** use the priority-ceiling protocol, as before. It will require that the ceiling priority be unique and not used by any other thread or mutex. In other words, the previous functionality remains unchanged.
    
     --MMS
    
     
  • Quantum Leaps

    Quantum Leaps - 2017-09-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,6 @@
    -A commercial customer requests to extend the QXK mutex facility (QXMutex class) to support also a simple operation without applying the priority-ceiling protocol.
    +A commercial customer requests to extend the QXK mutex facility (`QXMutex` class) to support also a simple operation without applying the priority-ceiling protocol. This simpler `QXMutex` usage mode (no priority-ceiling) should NOT require or use any thread priority levels in QP. The `QXMutex` should continue to offer the priority-ceiling protocol mode, but only when the ceiling priority is specified.
    
    -Specifically:
    +Proposed feature design:
    
     1. allow the `ceiling==0` argument in the mutex initialization `QXMutex::init()`.
     2. a mutex initialized with `ceiling==0` (`QXMutex::init(0)`) means "no ceiling", so such mutex will **NOT** use the priority-ceiling protocol.
     3. in this case the mutex will **NOT** require a unique priority level
    
     
  • Quantum Leaps

    Quantum Leaps - 2017-09-29
    • status: open --> closed
     
  • Quantum Leaps

    Quantum Leaps - 2017-09-29

    Implemented in QP/C/C++ 5.9.9.
    --MMS

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB