source: rtems/testsuites/rhealstone/rhtaskswitch/rhtaskswitch.adoc @ 564ce0f

4.115
Last change on this file since 564ce0f 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
Line 
1== Task Switch Benchmark
2
3This benchmark measures the average time it takes the system to switch between
4two independent and active tasks of equal priority. Task switching is synchronous
5and non-preemptive.
6
7=== Directives
8
9  * rtems_task_wake_after
10
11
12=== Methodology
13
14This benchmark utilizes rtems_task_wake_after( RTEMS_YIELD_PROCESSOR ) to
15achieve a synchronous, non-preemptive task switch. rtems_task_wake_after
16used in this context is essentially just a yield.
17
18As this is an average, we structure the benchmark code in a way that results
19in some overhead being included that inflates the total elapsed time. This
20overhead includes:
21  * the time it takes to iterate through the for loops (minimal
22  * overhead code in rtems_task_wake_after
23
24We instantiate two tasks, and time how long it takes for them to switch back
25and forth between themselves a total of BENCHMARKS * 2 times. We then use
26the put_time call to divide this total elapsed time by BENCHMARKS * 2, giving
27an average, and subtract out the overhead time we found earlier.
Note: See TracBrowser for help on using the repository browser.