PI Mutex Test
(updating docs on PI tests) |
|||
Line 6: | Line 6: | ||
== External links == | == External links == | ||
− | * [http://people.redhat.com/williams/tests/pi_tests-1. | + | * [http://people.redhat.com/williams/tests/pi_tests-1.6.tar.gz PI Mutex Test sources] |
This tarball contains the source code for two test programs: | This tarball contains the source code for two test programs: | ||
Line 23: | Line 23: | ||
# pi_stress <options> | # pi_stress <options> | ||
options: | options: | ||
− | |||
--verbose - lots of output | --verbose - lots of output | ||
− | --groups=<n> - set the number of inversion groups | + | --groups=<n> - set the number of inversion groups [10] |
− | --inversions=<n> | + | --inversions=<n>- number of inversions per group [infinite] |
− | --report=<path> - output to file | + | --report=<path> - output to file [/dev/null] |
− | + | --rr - use SCHED_RR for test threads [SCHED_FIFO] | |
− | --rr - use SCHED_RR for test threads | + | |
--prompt - prompt before starting the test | --prompt - prompt before starting the test | ||
+ | --signal - Use Ctrl-C to stop test instea of key press | ||
+ | --uniprocessor - force all threads to run on one processor | ||
--debug - turn on debug prints | --debug - turn on debug prints | ||
--version - print version number on output | --version - print version number on output |
Revision as of 17:45, 20 November 2006
This regression test suite was written by User:Clark to test the classic three-way Priority Inversion deadlock and shows that Priority Inheritance mutexes will avoid this deadlock.
TODO
|
Add documentation about using the test suite
|
External links
This tarball contains the source code for two test programs:
- classic_pi - a program that demonstrates how a PI mutex can resolve a Priority Inversion deadlock
- pi_stress - a stress test that runs groups of threads that cause Priority Inversions
To use, create a directory and untar the archive contents into that directory. Run make, which by default will build the two tests. If things don't compile, chances are your GLIBC does not support the Priority Inheritance attribute for pthread mutexes and you will need to upgrade.
Both programs have usage messages (--help) that explain their options. The classic_pi program is generally just used to show that PI mutexes work, while the pi_stress program is used to exercies the PI C library/kernel code path.
For example:
# pi_stress <options> options: --verbose - lots of output --groups=<n> - set the number of inversion groups [10] --inversions=<n>- number of inversions per group [infinite] --report=<path> - output to file [/dev/null] --rr - use SCHED_RR for test threads [SCHED_FIFO] --prompt - prompt before starting the test --signal - Use Ctrl-C to stop test instea of key press --uniprocessor - force all threads to run on one processor --debug - turn on debug prints --version - print version number on output --help - print this message