Real-time Testing of Operating Systems on Raspberry Pi
Abstract
A subset of operating systems are called ``real time'' operating systems. While a general operating system like Windows or OSX can make no guarantee when a process gets to run, a real time one has the ability to do so. They are used for systems where the quality of the results from the operating system is not only defined by their correctness, but also by when they arrive. These kinds of systems are called Real-time Systems and can be divided into soft, hard and firm. If a deadline is missed in a soft system, the usefulness declines gradually. In a hard system it goes to 0 immediately, an example being a frame in a video arriving after the next one has already arrived. Firm systems are hard systems where a missed deadline is catastrophic, as in nuclear systems or some medical equipment.
This project explores the possibility to test an operating system for these kinds of requirements. It does so by using a tester developed in 2015 at NUTS by Jadaan Diaa \cite{Diaa}. The system that has been tested is the Raspberry Pi 3 with Ubuntu Mate as its operating system. The desire to use the Raspberry Pi comes from its great computing power in regards to price, and its easy to use methods of interacting with other equipment. These tests are carried out as a electronic ping-pong game, where the tester says ``ping'' and waits for the operating system to answer ``pong''. Different methods of setting up the operating system has been explored, using a spectrum of different methods ranging from high energy, CPU consuming methods, to CPU friendly ones.
The results show that the results improve by increasing the amount of CPU time used. This is in line with expectations. It also shows that Ubuntu Mate is not suitable for being a real time operating system, as its responses come at non-deterministic times, often being very late. Another type of test shows how the tester can be used to calculate the time it takes between to points in code, but the results here show that there is some overhead such that results need to be calculated relative to a base-case. The project has shown that the tester made by Diaa works and could be used to classify/test operating systems for real time properties.