Chronos-RTOS

A timing analysis tool with integrated RTOS analysis

Overview

Traditionally, a WCET analyzer only consider the execution time of an application in isolation. If the application is running on top of a RTOS, the timing effects of the operating system (e.g. interrupts, system calls) have to be analyzed separately, and later combined with the computed WCET of the application. This causes the worst case timing of the application to be too pessimistic.

Chronos-RTOS integrates RTOS analysis with WCET computation of an application to reduce such pessimism. The key observation behind our analysis is to capture the timing effects of system calls and/or interrupts, as well as their effects on the micro-architectural states, compositionally via a damage function. This damage function is then composed in a controlled fashion to result in a RTOS-aware, micro-architecture-aware timing analysis of an application.

Chronos-RTOS is an extension of Chronos 4.2, our WCET analyzer tool for single core platforms, by adding the following features:

The following developers have contributed to the implementation of Chronos-RTOS:

Distribution

The source code for Chronos-RTOS can be downloaded from this link.

The distribution of Chronos-RTOS contains the following directories:

How to run

For our implementation, Chronos-RTOS is compiled under 64-bit Ubuntu 14.04 operating system. To compile, the user can simply run the "make" command in the directory "est". The binary for our tool will be generated in the same directory.

From the root directory, you can run the timing analyzer using the following command:

cmd> ./est/est -config <processor_config> -lpsolver <lp_solver_dir> <app_dir>
<processor_config> is the file providing micro-architectural configuration, <lp_solver_dir> is the path to the directory containing the LP solver, and <task_config> is the file providing task information. Please follow the description below for the formats of the required input files:

processor_config:

processor_config describes the micro-architectural configurations. The micro-architectural configuration follow the same format as simplescalar tool in which Chronos is based on. A typical processor configuration file looks as follows (description shown beside after # sign):

        -cache:il1 il1:128:32:4:f             # 4-way associative, 16 KB L1 instruction FIFO cache

        -cache:il1lat 1                       # L1 instruction cache hit latency = 1 cycle

        -cache:dl1 dl2:256:32:4:l             # 4-way associative, 32 KB L1 data FIFO cache

        -cache:dl1lat 1                       # L1 data cache hit latency = 1 cycle

        -mem:lat 70 2                         # memory latency = 70 cycles

        -bpred nottaken                       # branch predictor with not-taken policy

        -issue:inorder true                   # in-order processor

        ...

Numerous processor configuration examples are provided in directory "est/processor_config/".

app_dir:

The path to the directory containing:

Benchmark

The distribution for Chronos-RTOS includes a robot controller application as a benchmark for our timing analyzer. The precompiled binary for the robot controller is located in the directory "arm_benchmarks/newrobot". To analyze the application, the user can run the following command from the root directory:

cmd> ./est/est -config est/processor_config/arm926ejs.opt -lpsolver lp_solve arm_benchmarks/newrobot/newrobot

The robot controller application contains 3 tasks and 4 interrupt service routines (ISRs):

Task/ISR Priority Description
balance 4 (highest) Calculation to keep balance using input from gyroscope and inclinometer.
navigation 6 (lowest) Auto navigate to destination while avoiding obstacles.
balance 5 Receive remote command via infrared.
tick_isr - Periodic OS tick.
gyro_isr - Process interrupt from gyroscope.
inclino_isr - Process interrupt from inclinometer.
infrared_isr - Process interrupt from infrared sensor.

Contact

Contact Chong Lee Kee (cleekee@comp.nus.edu.sg) for any enquiry or feedback.