Result:
OS Functions |
Original C Code (# of cycles) |
Modified C Code (# of cycles) |
OSSendMess( ) |
505 |
199 |
OSGetMess( ) |
479 |
162 |
ISRSendMess( ) |
505 |
199 |
OSGetMessScr( ) |
212 |
93 |
OSGetAck( ) |
428 |
127 |
OSSendAck( ) |
2546 |
2404 |
OSSetOwnAck( ) |
219 |
100 |
OSSetState( ) |
219 |
100 |
OSGetState( ) |
212 |
86 |
The table represents a comparison of machine cycles required for switching tasks.
This comparison is generated with ctest2.c. This particular program records the time it takes to switch from task 0 and task 1. As soon as task 0 has been executed by the OS, the timer starts counting until the function in task 1 is ready to be executed. Each task contains a different function calls. The results are documented in the table above. For the most part, the OS functions improved by more than half of the original time except for OSSendAck( ).
Questions? Contact Nick Liu