Real-time Linux (Xenomai)

 Radboud University Nijmegen

Exercise #8: Measuring Jitter and Latency


Note: This excercise is intended for a real hardware platform, although the program for scheduling measurements could be tried first on VirtualBox

Introduction

In real-time programming one usually has to guarantee that certain deadlines are always met. Hence, predictability of timing is crucial. In this exercise we investigate a few aspects of predictability by measuring scheduling jitter and interrupt latency.


Objectives

The primary objectives of this exercise are:


Description

Terminology

We start with a definition of a number of terms, using a figure from the presentation Real Time
in Embedded Linux Systems
by Petazzoni & Opdenacker:

task latency

Interrupt latency:
the time between the occurrence of the interrupt and the start of the interrupt handler.

Scheduler latency: the time elapsed after completion of the handler and before execution the scheduler.

Scheduling latency, also called task latency: the time between the occurrence of the interrupt that makes a sleeping task runnable again and the moment the task is resumed.

Scheduling jitter: the unwanted variation of the release times of a periodic task. It can be characterized in various ways such as an interval around the desired release time, a maximal deviation from the desired time point, or a standard deviation from the mean value.

Exercises

Exercise 8a.

Write a program to collect data about the periodic scheduling of a task on a Raspberry Pi and plot this data.

Approach:

Note: to avoid the influence of startup effects the results might be improved by omitting the first few values.

Exercise 8b.

The breadbord of exercise 7 and the setup of exercise 7b are used to measure interrupt latency by means of three tasks: Let your program calculate the difference between the arrays of generated and catched interrupts. Similar to 8a, caculate the avarage value and print it.

Are the results different when the worker task is omitted?


Last Updated: 17 July 2019 (Jozef Hooman)
Created by: Harco Kuppens
h.kuppens@cs.ru.nl