Warning, /testsuites/rhealstone/rhdeadlockbrk/rhdeadlockbrk.adoc is written in an unsupported language. File is not indexed.
0001 = Deadlock Break Benchmark
0002
0003 This benchmark measures the average time to break a deadlock that occurs
0004 when a high priority task preempts a low priority task that is holding a
0005 resource that the high priority task needs. In RTEMS, these situations
0006 are mitigated through use of a semaphore with priority inheritance. A
0007 task holding a semaphore with priority inheritance enabled has its
0008 priority boosted to match that of the highest priority task blocked on
0009 that semaphore.
0010
0011 == Directives
0012
0013 * rtems_semaphore_obtain
0014 * rtems_semaphore_release
0015 * rtems_task_suspend
0016 * rtems_task_resume
0017
0018
0019 == Methodology
0020
0021 This benchmark is structured in a way that is very similar to the semaphore-
0022 shuffle benchmark, but instead uses three tasks of differing priorities and
0023 suspend/resume instead of yield directives.
0024
0025 The benchmark is run and timed once with no semaphore operations. This is the
0026 overhead time. The benchmark starts with the high priority task, which suspends
0027 itself, passing control to the mid priority task. The mid priority task then
0028 suspends itself, passing control to the low priority task. The low priority task
0029 resumes the mid priority task, which then resumes the high priority task. The
0030 process is repeated a total of BENCHMARKS times. This process is then executed
0031 with the low priority task holding a semaphore that the high priority task blocks
0032 on when trying to obtain. Due to priority inheritance (the deadlock break
0033 mechanism) the low priority task will execute instead of the mid priority task.
0034 The same system of suspend/resumes then occurs.
0035
0036 The average is found and the overhead (the time of the first run) is subtracted
0037 out in the call to put_time.