UNC Technical Report TR08-010
Total Page:16
File Type:pdf, Size:1020Kb
OSPERT 2008 Proceedings of the Fourth International Workshop on Operating Systems Platforms for Embedded Real-Time Applications Prague, Czech Republic July 1, 2008 In conjunction with: The 20th Euromicro International Conference on Real-Time Systems, Prague, Czech Republic, July 2-4, 2008 Supported by: The ARTIST2 Network of Excellence on Embedded Systems Design FOREWORD This volume contains the final proceedings of the Fourth International Workshop on Operating Systems Platforms for Embedded Real-Time Applications (OSPERT), which was held on July 1, 2008 in Prague, Czech Republic, in conjunction with the 20th Euromicro International Con- ference on Real-Time Systems. Prior to the workshop, a pre-proceedings was made available, and authors were given the opportunity to modify their papers following the workshop to reflect issues and suggestions raised during the workshop. These final papers are contained herein. Although OSPERT is a relatively new workshop, it has quickly become an important venue for exchanging ideas about operating-systems issues related to real-time and embedded systems. This volume contains the nine papers presented at the workshop. This year’s workshop also featured an invited talk by Peter Zijlstra of Red Hat, entitled “Linux-rt: Turning a General Purpose OS into a Real-Time OS.” Peter’s talk focused on the linux-rt project, its history, current state, and future. The contributed papers were read and evaluated by the Program Committee, but were not formally refereed; it is expected that more polished versions of many of these papers will appear in conferences and fully refereed scientific journals. The Program Committee would like to thank all authors who submitted papers for consideration. The efforts of three external reviewers, Dario Faggioli, Su Fang Hsiao, and Po-Liang Wu, who aided in the review process, are also acknowledged. Partial funding for the workshop was provided by the ARTIST2 Network of Excellence on Embedded Systems Design. This support is gratefully acknowledged. The efforts of Alan Burns, Gerhard Fohler, Zdenek Hanz´aek, and Giuseppe Lipari in helping to organize this event are also appreciated. These proceedings are available on-line at the conference website (http://www.cs.unc.edu/ ∼anderson/meetings/ospert08/OSPERT.html) and can be cited as Technical Report TR08- 010, Department of Computer Science, The University of North Carolina at Chapel Hill. Program Committee James H. Anderson, University of North Carolina, Chapel Hill, USA, Chair Neil Audsley, University of York, UK Ted Baker, Florida State University, USA Scott Brandt, University of California, Santa Cruz, USA Alfons Crespo, Universitat Polit`ecnica de Val`encia, Spain Tommaso Cucinotta, Scuola Superiore Sant’Anna, Italy Kevin Elphinstone, University of New South Wales, Australia Michael Gonzalez Harbour, University of Cantabria, Spain Tei-Wei Kuo, National Taiwan University, Taiwan Jork L¨oser, Microsoft Corp. Paul McKenney, IBM Linux Technology Center ii INVITED PRESENTATION Linux-rt: Turning a General Purpose OS into a Real-Time OS Peter Zijlstra, Red Hat Talk Abstract This talk will be about the linux-rt project, its history, current state and future. It will cover the design decisions we made and highlight some of the practical techniques like run-time lock validation and latency tracers that helped us to quickly spot and fix problems. It will touch upon some of the recent developments in linux-rt such as rwlocks with full priority inheritance support and adaptive spins for mutexes as well as talk about some of the work that is currently in progress. The talk will also focus on current and future challenges and how academic real-time researchers can help solving those and by doing so bring our two communities closer together. Speaker Bio Peter Zijlstra is a professional Linux kernel hacker who has made significant contributions to various core Linux subsystems including the VM and scheduler. He is one of the maintainers of the lockdep/lockstat infrastructure and an active contributor to the linux-rt effort. He is currently employed by Red Hat. iii TABLE OF CONTENTS Real-Time on Linux An Efficient Implementation of the BandWidth Inheritance Protocol for Handling Hard and Soft Real-Time Applications in the Linux Kernel Dario Faggioli, Giuseppe Lipari, and Tommaso Cucinotta . ....................1 Energy Models of Real Time Operating Systems on FPGA Saadia Dhouib, Jean-Philippe Diguet, Eric Senn, and Johan Laurent . ...........11 Evaluation of a Minimal POSIX Tracing Service Profile for Real Time Embedded Systems Pablo Parra, Martin Knoblauch, Cesar Rodr´ıguez, Oscar Rodr´ıguez, Sebastian S´anchez, andAitorViana ...........................................................................18 Coordinated Management of Multiple Resources or Components An Integrated Model for Performance Management in a Distributed System Scott A. Brandt, Carlos Maltzahn, Anna Povzner, Roberto Pineiro, Andrew Shewmaker, andTimKaldewey ........................................................................25 Integrating Real Time and Power Management in a Real System MartinP.Lawitzky,DavidC.Snowdon,andStefanM.Petters .......................35 Middleware for MPSoC Real-Time Embedded Applications: Task Migration and Allocation Services Elias Teodoro Silva Jr., Carlos Eduardo Pereira, and Fl´avioRechWagner ............45 Scheduling-Related Issues Scheduling as a Learned Art Christopher Gill, William D. Smart, Terry Tidwell, and Robert Glaubius . ............53 Towards Hierarchical Scheduling in VxWorks Moris Behnam, Thomas Nolte, Insik Shin, Mikael Asberg,andReinderJ.Bril˚ ........63 Estimating Context Switch Cost: A Practitioner’s Approach RobertKaiser ........................................................................73 iv An efficient implementation of the BandWidth Inheritance protocol for handling hard and soft real-time applications in the Linux kernel ∗ Dario Faggioli, Giuseppe Lipari and Tommaso Cucinotta e-mail: [email protected], [email protected], [email protected] Scuola Superiore Sant’Anna, Pisa (Italy) Abstract it already provides many of the needed services: it has an open source license and an huge base of enthusiastic pro- This paper presents an improvement of the Bandwidth grammers as well as a lot of software running on it. Fur- Inheritance Protocol (BWI), the natural extension of the thermore, it presents a standard programming interface. well-known Priority Inheritance Protocol (PIP) to resource Due to the increasing interest from the world of embed- reservation schedulers. The modified protocol allows for a ded applications, Linux is also being enriched with more better management of nested critical section, removes un- and more real-time capabilities [13], usually proposed as needed overheads in the management of task block and un- separate patches to the kernel, that are progressively being block events, and introduces a run-time deadlock detection integrated into the main branch. For example, a small group mechanism at no cost. of developers has proposed the PREEMPT RT patch which Also, an implementation of the new protocol on the Linux greatly reduces the non preemptable sections of code in- kernel is presented, along with experimental results gath- side the kernel, thus reducing the worst-case latencies. The ered while running some synthetic application load. Pre- support for priority inheritance can be extended to in-kernel sented results prove the effectiveness of the proposed solu- locking primitives and a great amount of interrupt handling tion in reducing latencies due to concurrent use of resources code has been moved to schedulable threads. From a pro- and in improving temporal isolation among groups of inde- gramming point of view, Linux now supports almost en- pendent tasks. Also, we show that the introduced overhead tirely the Real-Time POSIX extensions, but the mainstream is low and negligible for the applications of interest. kernel still lacks support for such extensions like sporadic servers or any Resource Reservation techniques, that would 1 Introduction allow the kernel to provide temporal isolation. Resource Reservation (RR) is an effective technique to Embedded systems are nowadays part of our everyday schedule hard and soft real-time applications and to pro- life. As their popularity and pervasiveness increases, these vide temporal isolation among them in open and dynamic devices are required to provide more and more functional- systems. According to this technique, the resource band- ity, thus their complexity grows higher and higher. In par- width is partitioned between the different applications, and ticular, embedded systems now not only find application in an overrun in one of them cannot influence the temporal be- the domain of self-contained, hard real-time, safety critical havior of the others. systems, but their applicability is undergoing a tremendous In standard Resource Reservation theory, tasks are con- growth in the range of soft real-time applications, with var- sidered as independent. In practical applications, instead, ious degrees of time-sensitiveness and QoS requirements. tasks may interact due to the concurrent access to a shared The requirements on the real-time operating system plat- resource, which commonly requires the use of a mutex form on which such applications are implemented increases semaphorein order to serialize those accesses. For example, in parallel. The RTOS must be robust (also to timing faults), a Linux application may consist of one multi-threaded pro- secure