4.115
Last change
on this file since cdf30f05 was
b6c1578,
checked in by Joel Sherrill <joel.sherrill@…>, on 01/05/14 at 17:17:08
|
rhealstone: Add rh prefix to all test names
This makes them easier to spot as a group in wildcard searches.
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[19e9bf8] | 1 | == Task Switch Benchmark |
---|
| 2 | |
---|
| 3 | This benchmark measures the average time it takes the system to switch between |
---|
| 4 | two independent and active tasks of equal priority. Task switching is synchronous |
---|
| 5 | and non-preemptive. |
---|
| 6 | |
---|
| 7 | === Directives |
---|
| 8 | |
---|
| 9 | * rtems_task_wake_after |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | === Methodology |
---|
| 13 | |
---|
| 14 | This benchmark utilizes rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ) to |
---|
| 15 | achieve a synchronous, non-preemptive task switch. rtems_task_wake_after |
---|
| 16 | used in this context is essentially just a yield. |
---|
| 17 | |
---|
| 18 | As this is an average, we structure the benchmark code in a way that results |
---|
| 19 | in some overhead being included that inflates the total elapsed time. This |
---|
| 20 | overhead includes: |
---|
| 21 | * the time it takes to iterate through the for loops (minimal |
---|
| 22 | * overhead code in rtems_task_wake_after |
---|
| 23 | |
---|
| 24 | We instantiate two tasks, and time how long it takes for them to switch back |
---|
| 25 | and forth between themselves a total of BENCHMARKS * 2 times. We then use |
---|
| 26 | the put_time call to divide this total elapsed time by BENCHMARKS * 2, giving |
---|
| 27 | an average, and subtract out the overhead time we found earlier. |
---|
Note: See
TracBrowser
for help on using the repository browser.