source: rtems/testsuites/rhealstone/rhtaskswitch/rhtaskswitch.adoc @ b6c1578

Last change on this file since b6c1578 was b6c1578, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 5, 2014 at 5:17:08 PM

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
1== Task Switch Benchmark
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.
7=== Directives
9  * rtems_task_wake_after
12=== Methodology
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.
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
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.