rt-muse: measuring real-time characteristics of execution platforms

Real-Time Systems, Jul 2017

Operating systems code is often developed according to principles like simplicity, low overhead, and low memory footprint. Schedulers are no exceptions. A scheduler is usually developed with flexibility in mind, and this restricts the ability to provide real-time guarantees. Moreover, even when schedulers can provide real-time guarantees, it is unlikely that these guarantees are properly quantified using theoretical analysis that carries on to the implementation. To be able to analyze the guarantees offered by operating systems’ schedulers, we developed a publicly available tool that analyzes timing properties extracted from the execution of a set of threads and computes the lower and upper bounds to the supply function offered by the execution platform, together with information about migrations and statistics on execution times. rt-muse evaluates the impact of many application and platform characteristics including the scheduling algorithm, the amount of available resources, the usage of shared resources, and the memory access overhead. Using rt-muse, we show the impact of Linux scheduling classes, shared data and application parallelism, on the delivered computing capacity. The tool provides useful insights on the runtime behavior of the applications and scheduler. In the reported experiments, rt-muse detected some issues arising with the real-time Linux scheduler: despite having available cores, Linux does not migrate SCHED_RR threads which are enqueued behind SCHED_FIFO threads with the same priority.

Article PDF cannot be displayed. You can download it here:

https://link.springer.com/content/pdf/10.1007%2Fs11241-017-9284-5.pdf

rt-muse: measuring real-time characteristics of execution platforms

Real-Time Syst (2017) 53:857–885 DOI 10.1007/s11241-017-9284-5 rt-muse: measuring real-time characteristics of execution platforms Martina Maggio1 · Juri Lelli2 · Enrico Bini3 Published online: 30 June 2017 © The Author(s) 2017. This article is an open access publication Abstract Operating systems code is often developed according to principles like simplicity, low overhead, and low memory footprint. Schedulers are no exceptions. A scheduler is usually developed with flexibility in mind, and this restricts the ability to provide real-time guarantees. Moreover, even when schedulers can provide realtime guarantees, it is unlikely that these guarantees are properly quantified using theoretical analysis that carries on to the implementation. To be able to analyze the guarantees offered by operating systems’ schedulers, we developed a publicly available tool that analyzes timing properties extracted from the execution of a set of threads and computes the lower and upper bounds to the supply function offered by the execution platform, together with information about migrations and statistics on execution times. rt-muse evaluates the impact of many application and platform characteristics including the scheduling algorithm, the amount of available resources, the usage of shared resources, and the memory access overhead. Using rt-muse, we show the impact of Linux scheduling classes, shared data and application parallelism, on the delivered computing capacity. The tool provides useful insights on the runtime behavior of the applications and scheduler. In the reported experiments, rt-muse detected some issues arising with the real-time Linux scheduler: despite having avail- B Martina Maggio Juri Lelli Enrico Bini 1 Department of Automatic Control, Lund University, Lund, Sweden 2 ARM, Cambridge, UK 3 University of Turin, Turin, Italy 123 858 Real-Time Syst (2017) 53:857–885 able cores, Linux does not migrate SCHED_RR threads which are enqueued behind SCHED_FIFO threads with the same priority. Keywords Supply functions · Resource measurement · Linux kernel · Tools 1 Introduction Real-time resource allocation policies are usually developed together with theoretical results that support claims about their behavior. However, these claims apply to ideal conditions and it is unknown if they hold when the policies are implemented in real operating systems (OSes). For this reason, these results are often confined to theory. OS developers are resistant to the adoption of real-time algorithms, mostly because general purpose OSes are designed for flexibility and to operate in complex and variable scenarios compared to the one assumed in real-time systems. The gap between theory and practice can be closed by making the implementation of real-time policies more accessible to non-kernel experts. A notable example in this direction is LITMUSRT (Calandrino et al. 2006). LITMUSRT offers a simple environment to implement sophisticated scheduling policies with a reasonably low effort. PD2 (Anderson and Srinivasan 2001) and RUN (Regnier et al. 2011) are just two examples of scheduling policies implemented in LITMUSRT . Another way to fill the gap is to determine real-time characteristics of existing schedulers’ implementations. rt-muse aims to go in this second direction. The timing properties of scheduling policies can indeed be monitored. Feather-Trace (Brandenburg and Anderson 2007), trace-cmd,1 and kernelshark2 are just examples of tools, which help to monitor and to visualize some properties of the execution of threads. However, the analysis of the large amount of data produced by these tracing tools often needs to be extracted and interpreted by experts. rt-muse is an easy-to-use tool to extract the real-time characteristics of an execution platform in an interpretable way. Contribution rt-muse measures real-time characteristics of platforms by running experiments with a synthetic taskset with user-defined characteristics and extracting sequences of timestamps from the run. These sequences are then analyzed for real-time features like supply functions and the number of migrations, together with statistics on the response times of jobs. The analysis performed by rt-muse is organized in modules, making the tool easily extensible. The advantage of a modular analysis is that the user can specify the analysis of interest for any thread or for the taskset. A modular analysis allows creating new modules easily. In rt-muse, implementing a new module requires the creation of a Matlab/Octave function to perform the desired operations. This paper extends the previous contribution of rt-muse (Maggio et al. 2016) adding a new analysis module, the statistical module presented in Sect. 3.4. This paper also presents a broad set of experiments, covering several scheduling policies and settings. Some of the experiments are particularly insightful and sug1 https://lwn.net/Articles/410200/. 2 http://rostedt.homelinux.com/kernelshark/. 123 Real-Time Syst (2017) 53:857–885 859 gest that the current implementation of the Linux scheduling classes may actually be improved. For example, the experiment described in Sect. 6.3 shows that threads that could migrate and execute do not receive any CPU because of a problem with the push/pull migration. As a new contribution of this paper over the previous publication (Maggio et al. 2016), two new sets of experiments are introduced, respectively in Sects. 6.2 and 6.5, to further demonstrate the results that the tool allows one to obtain. In particular, the experiment presented in Sect. 6.2 describes the behavior of SCHED_OTHER and shows that it cannot be used as a real-time scheduling policy, since it does not provide any guarantee on the computation time allocated to the threads in the taskset and the set of experiments presented in Sect. 6.5 analyze the SCHED_DEADLINE scheduling class both from the perspective of how it manages a single reservation and in the presence of an additional load. The results of the experiments performed by rt-muse are reproducible, as we rely on tools that are integrated into the Linux kernel. 2 Overview of rt-muse The goal of rt-muse is to measure the real-time characteristics of execution platforms (Sect. 3 describes precisely the real-time characteristics extracted by rt-muse). The platform includes the hardware, the operating system and all of its components, among which the scheduler. rt-muse achieves its goal by analyzing the traces of the execution of a set of experiments, properly constructed in accordance to the user’s specifications. The steps for using rt-muse are illustrated in Fig. 1. The first step is the creation of a set-up file (in JSON format) that specifies the characteristics of the platform that we want to extract. The format of the configuration file is described in Sect. 5. To avoid the bias introduced by the measuring infrastructure, the target machine that runs the experiments and the host machin (...truncated)


This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007%2Fs11241-017-9284-5.pdf
Article home page: https://link.springer.com/article/10.1007/s11241-017-9284-5

Martina Maggio, Juri Lelli, Enrico Bini. rt-muse: measuring real-time characteristics of execution platforms, Real-Time Systems, 2017, pp. 857-885, Volume 53, Issue 6, DOI: 10.1007/s11241-017-9284-5