Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pi_stress(8) [debian man page]

pi_stress(8)						Linux System Administrator's Manual					      pi_stress(8)

NAME
pi_stress - a stress test for POSIX Priority Inheritance mutexes SYNOPSIS
pi_stress [-i|--inversions inversions] [-t|--duration seconds] [-g|--groups groups [-d|--debug] [-v|--verbose] [-s|--signal] [-r|--rr] [-p|--prompt] [-m|--mlockall] [-u|--uniprocessor] pi_stress -h|--help DESCRIPTION
pi_stress is a program used to stress the priority-inheritance code paths for POSIX mutexes, in both the Linux kernel and the C library. It runs as a realtime-priority task and launches inversion machine thread groups. Each inversion group causes a priorty inversion condition that will deadlock if priority inheritance doesn't work. OPTIONS
-i n|--inversions=n Run for n number of inversion conditions. This is the total number of inversions for all inversion groups. Default is -1 for infi- nite. -t n|--duration=n Run the test for n seconds and then terminate. -g n|--groups=n The number of inversion groups to run. Defaults to 10. -d|--debug Run in debug mode; lots of extra prints -v|--verbose Run with verbose messages -s|--signal Terminate on receipt of SIGTERM (Ctrl-C). Default is to terminate on any keypress. -r|--rr Run inversion group threads as SCHED_RR (round-robin). The default is to run the inversion threads as SCHED_FIFO. -p|--prompt Prompt before actually starting the stress test -u|--uniprocessor Run all threads on one processor. The default is to run all inversion group threads on one processor and the admin threads (report- ing thread, keyboard reader, etc.) on a different processor. -m|--mlockall Call mlockall to lock current and future memory allocations and prevent being paged out -h|--help Display a short help message and options. CAVEATS
The pi_stress test threads run as SCHED_FIFO or SCHED_RR threads, which means that they can starve critical system threads. It is advisable to change the scheduling policy of critical system threads to be SCHED_FIFO prior to running pi_stress and use a priority of 10 or higher, to prevent those threads from being starved by the stress test. BUGS
No documented bugs. AUTHOR
Clark Williams <williams@redhat.com> Nov 27, 2006 pi_stress(8)

Check Out this Related Man Page

pthread_rwlock_trywrlock(3)				     Library Functions Manual				       pthread_rwlock_trywrlock(3)

NAME
pthread_rwlock_trywrlock - Attempts to acquire a read-write lock for write access without waiting. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock); PARAMETERS
Address of the read-write lock object to acquire for write access. DESCRIPTION
This routine attempts to acquire the read-write lock referenced by rwlock for write access. If any thread already holds that lock for write access or read access, this routine fails and returns [EBUSY] and the calling thread does not wait for the lock to become available. Results are undefined if the calling thread holds the read-write lock (whether for read or write access) at the time this routine is called. If the read-write lock object referenced by rwlock is not initialized, the results of calling this routine are undefined. Realtime applications can encounter priority inversion when using read-write locks. The problem occurs when a high-priority thread acquires a read-write lock that is about to be unlocked (that is, posted) by a low-priority thread, but the low-priority thread is preempted by a medium-priority thread. This scenario leads to priority inversion in that a high-priority thread is blocked by lower-priority threads for an unlimited period of time. During system design, realtime programmers must take into account the possibility of priority inversion and can deal with it in a number of ways, such as by having critical sections that are guarded by read-write locks execute at a high priority, so that a thread cannot be preempted while executing in its critical section. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The read-write lock could not be acquired for write access because it was already locked for write access or for read access. The value specified by rwlock does not refer to an initialized read-write lock object. The current thread already owns the read-write lock for write or read access. ERRORS
None RELATED INFORMATION
Functions: pthread_rwlock_init(3), pthread_rwlockattr_init(3), pthread_rwlock_rdlock(3), pthread_rwlock_wrlock(3), pthread_rwlock_unlock(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_rwlock_trywrlock(3)
Man Page