Real-Time Systems: Notes |
The directory dssadacode contains one version of the Ada source code for Teguh Ghazalie's simulation of various aperiodic servers, including the Deadline Sporadic Server, as later modified and adapted by myself to correct some problems with the original simulation. This is the simulation that was the basis of the paper "Aperiodic Servers in A Deadline Environment" ( http://www.cs.fsu.edu/~baker/papers/dss.pdf).
It is provided as an example of a real-time scheduling simulation and as a possible starting point for students who intend to write their own simulation. The archive from which I gathered this included several source directories, with different versions of files. The I no longer remember for certain which of these versions was the latest and greatest. I believe this version looks most recent, but it seems to have some bugs (see below). However, I am not sure it is actually the final version, since it seems to have at least one bug (see more below). It suspect I may have lost the final version by backing up the wrong version at the time I deleted the on-line project directory.
Most modules have two files. The files with names ending in ".ads" are Ada specifactions (interfaces). The files with name ending in ".adb" are Ada bodies (implementations).
Makefile | execute "make" to build simulation | |
plots | gnuplot and LaTeX files for results | |
psizes.adb | program to estimate maximum allowable server sizes | |
sizes.ads | task execution times, periods, etc. | |
test_rms.adb | main program to test servers in rate monotonic scheduling context | |
test_all.adb | main program to test servers in EDF scheduling context | |
pls.ads | pls.adb | polling server |
bgs.ads | bgs.adb | background server |
dds.ads | dds.adb | deadline deferrable server |
dss.ads | dss.adb | deadline sporadic server |
dxs.ads | dxs.adb | deadline exchange server |
generic_queue.ads | generic_queue.adb | generic priority queue |
random_tools.ads | random_tools.adb | random number generation and distributions |
system_type.ads | system_type.adb | common datatypes for tasks |
cycles.ads | cycles.adb | tools for extracting properties of periodic tasks |
You can compile the code using the command "make", with no command-line arguments. You can run the two simulations and put the output data into the "plot" subdirectory using the command "make data". If you cd into the plots subdirectory and execute "doplots" you will run gnuplot and LaTeX to generate postscript files showing plots of the response times of the deadline-based servers. The command "dorms" does similarly for the fixed-priority servers. If you are on a system that does not have Gnuplot, Latex, or Ghostview installed these scripts will fail, and you will then need to find a system with the software installed, or modify the scripts.
This version appears to still have some bugs. It was originally compiled and run using the Verdix (not Rational) Ada 83 compiler. I made the minimum set of changes necessary to compile using the Gnat Ada 95 compiler. When I ran the simulations (./test_rms and ./test_all) I noticed two surprises:
I regret that the code is not better structured. This is the way Teguh designed it, more or less. It took nearly two years for the referees to get back with their comments on this paper. The comments indicated the need for some refinements to the simulation. By that time Teguh was no longer around to redo the simulation, so I modified the code enough to get the data needed to satisfy the referees. I made a few improvements, and was tempted to restructure the code completely at the same time, but decided that would take more time than to stick with the Teguh's design. I mention this because I do not want any student to take this as an example of a mature or standard Ada programming style and think badly of the language because of it.
If I were to design an Ada simulation today, especially today I would do it differently. In particular, I would:
$Id |