[previous] [index] [next]

Example 11: Measuring Timing Jitter

Real-time code should execute with more deterministic timing than normal Linux process code. How much more deterministic is it? This example measures the variation in the actual timing of a pure periodic task, using the Pentium's built-in Time Stamp Counter (TSC), and shows a plot something like this:

Refer to the commented real-time source code and the commented application source code for the details.

Principle of Operation

Running the Demo

To run the demo, change to the 'ex11_jitter' subdirectory of the top-level tutorial directory, and run the 'run' script by typing
./run
Alternatively, change to the top-level tutorial directory and run the 'runall' script there by typing
./runall
and selecting the "Jitter Testing" button.

You'll see a plot window showing the magnitude of the jitter.

See the Real-Time Task Code

See the Linux Application Code


Next: Example 12, Floating Point in Real Time Tasks

Back: Example 10, Determining Stack Size