↑ Real Time Systems: Assignments |
Due Dates and Times: (See the Course Calendar.)
Summary:
You are to set up a test framework to measure the execution time demand of another program, using the subtractive method. You will test it using a solution to the gizmo control program,
This is a team assignment. You may work with one or two other people. However, for variety, if you worked in a team on the last assignment you are required to choose a new partner for this one.
Objectives:
Tasks:
(preliminaries) Package up your solution to the gizmo controller assignment and deliver it to me (baker@cs.fsu.edu) in a standard format that can be compiled and used by other students. That is, send me a file gizmo.tgz that anyone can compile and execute using the following sequence of commands:
mkdir gizmo cd gizmo tar xvpf ../gizmo.tgz make gizmo ./gizmo
I will post all of these on the course website, each in a separate directory, for everyone in the class to access.
Before sending it to me, modify the code if necessary, to ensure that it can be used for the time demand measurement experiment you will be doing in step 2 below. Specifically, make certain that:
Write and debug a program named timeit that will measure the CPU load of an executable program that is provided as a command line parameter, and produce a file gizmo.pts containing output that is suitable for input to the gnuplot program, in the format that will be described below. The shell script may call programs that you provide, as well as the program gizmo. You should provide a Makefile so that a person can execute make timeit to build whatever programs are needed in order to execute timeit. That is, one should be able to test a gizmo controller and then view a plot of the processor load by the following sequence of commands in the bash shell:
mkdir gizmo cd gizmo tar xvpf ../gizmo.tgz make gizmo cd .. mkdir timeit cd timeit tar xvpf ../timeit.tgz make timeit cd .. mkdir test cd test ../timeit/timeit ../gizmo/gizmo ../plotload gv load.eps
where the file plotload above is the following shell script:
#!/bin/sh gnuplot << EOF set terminal postscript enhanced eps "Times-Roman" 20 set data style linespoints set output "load.eps" set yrange [0:1.1] plot \ "gizmo.pts" using 1:2 title "interference" with lines lt 1 lw 1,\ EOF
The ../timeit/timeit ../gizmo/gizmo step should not take longer than 5 minutes of real time to run.
The output of timeit should be a text file containing data in two columns, suitable for input to gnuplot, as follows:
The values in column 1 should be numbers of milliseconds, unique and in increasing order. The values in column 2 should be in the range 0.0 to 1.0, and should be the maximum observed interfering load over several intervals of the length given in the first column.
Turn in the following:
Advice:
The program timeit will need to use fork() and exec() calls to run the gizmo program. If you have not used these before, as me for help.
Do not expect to be able to follow the subtractive measurement scheme in the class notes exactly, since this is a slightly different problem. Specifically, I recommend the following variation from the example - with tasks T1 (pink, foreground) and T2 (blue, background) -- in the notes. Task T1 should run at the top realtime (SCHED_FIFO) priority, and task T2
should run at the next-to-highest priority.Please report progress and problems, so that I can provide advice in time to be of help.
Do not expect a time extension on this assignment. Based on experience with the last assignment, I have already added an extra time margin.
Assessment:
The solutions will be judged primarily on how well they perform, including repeatability of the results. They will also be judged on the simplicity, readability, clarity, and documentation of the implementation code.
T. P. Baker. ($Id$) |