[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Robust and Real-time Mutexes in NPTL

Hi All,

This is a ---prototype implementation--- that extends NPTL with
real-time and robust mutex features.  The intention is to have an
approach to locking that will benefit the applications that care
about responsiveness and robustness of the locks without affecting
other types of applications. Currently this is work in progress, and
the implementation is subject to much flux, both in the user or
kernel code.

- robust mutex
    Applications using a robust mutex can detect whether the previous
owner of the mutex terminated and then pass on the ownership to the
next waiter. The new owner can then attempt to cleanup the state
protected by the mutex, and re-initialize it for continued use.  If
cleanup of the state can't be done, the mutex can be marked
inconsistent so that any future attempts to lock it will get a status
indicating that it is inconsistent.

- priority inheritance mutex
    Applications using a priority inheritance mutex can temporarily
boost the priority of the current owner of the mutex, if a
higher-priority thread is blocked trying to lock the same mutex. This
will help to addresses the priority inversion issue and improve
real-time responsiveness.

All related patches, documents, and test cases have been posted at
http://developer.osdl.org/dev/robustmutexes/, including:

- rtnptl-0.5.patch :  robust and real-time mutexes patch for nptl-0.36.
- README-rtnptl-0.5 :  release notes of rtnptl-0.5.
- INSTALL-rtnptl-0.5 :  a sample step-by-step procedure for building
a simple jail root of rtnptl-0.5 based on nptl-0.36
- rtnptl-test-0.5.tar.gz :  test cases for rtnptl-0.5
- README-rtnptl-tests-0.5 :  release notes of rtnptl-test-0.5
- rtfutex-2_5_67-6.patch:  real-time futex (rtfutex) patch for
- rtfutex-test-6.tar.gz :  test cases for rtfutex-6
- README-rtfutex-6 :  release notes of rtfutex-6
- a few png files to illustrate priority inheritance behavior.

A quick glance at rtnptl-0.5.patch 
 Makefile                                          |    9
 Versions                                          |    5
 init.c                                            |    6
 pthread_mutex_consistent_np.c                     |   16 +
 pthread_mutex_init.c                              |    8
 pthread_mutex_lock.c                              |   26 ++
 pthread_mutex_setconsistency_np.c                 |   22 ++
 pthread_mutex_timedlock.c                         |   33 ++-
 pthread_mutex_trylock.c                           |   37 ++-
 pthread_mutex_unlock.c                            |   30 ++-
 pthread_mutexattr_getprotocol.c                   |   29 +++
 pthread_mutexattr_getrobust_np.c                  |   28 ++
 pthread_mutexattr_init.c                          |    5
 pthread_mutexattr_setprotocol.c                   |   54 +++++
 pthread_mutexattr_setrobust_np.c                  |   36 +++
 sysdeps/pthread/createthread.c                    |   12 +
 sysdeps/pthread/pthread.h                         |   56 +++++
 sysdeps/unix/sysv/linux/fork.c                    |    7
 sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h  |    8
 sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S |  210 ++++++++++
 sysdeps/unix/sysv/linux/i386/lowlevellock.h       |  160 ++++++++++
 sysdeps/unix/sysv/linux/internaltypes.h           |   12 +
 22 files changed, 775 insertions(+), 34 deletions(-)

Bingwei Liu

Not speaking for my employer -- all opinions are my own (and my fault)

 <<README-rtnptl-0.5>>  <<rtnptl-0.5.patch>> 

Attachment: README-rtnptl-0.5
Description: README-rtnptl-0.5

Attachment: rtnptl-0.5.patch
Description: rtnptl-0.5.patch

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]