skip to main content
research-article

Semantics-preserving multitask implementation of synchronous programs

Published:29 January 2008Publication History
Skip Abstract Section

Abstract

We study the implementation of a synchronous program as a set of multiple tasks running on the same computer, and scheduled by a real-time operating system using some preemptive scheduling policy, such as fixed priority or earliest-deadline first. Multitask implementations are necessary, for instance, in multiperiodic applications, when the worst-case execution time of the program is larger than its smallest period. In this case, a single-task implementation violates the schedulability assumption and, therefore, the synchrony hypothesis does not hold. We are aiming at semantics-preserving implementations, where, for a given input sequence, the output sequence produced by the implementation is the same as that produced by the original synchronous program, and this under all possible executions of the implementation. Straightforward implementation techniques are not semantics-preserving. We present an intertask communication protocol, called DBP, that is semantics-preserving and memory-optimal. DBP guarantees semantical preservation under all possible triggering patterns of the synchronous program: thus, it is applicable not only to time-, but also event-triggered applications. DBP works under both fixed priority and earliest-deadline first scheduling. DBP is a nonblocking protocol based on the use of intermediate buffers and manipulations of write-to/read-from pointers to these buffers: these manipulations happen upon arrivals, rather than executions of tasks, which is a distinguishing feature of DBP. DBP is memory-optimal in the sense that it uses as few buffers as needed, for any given triggering pattern. In the worst case, DBP requires, at most, N + 2 buffers for each writer, where N is the number of readers for this writer.

References

  1. Baleani, M., Ferrari, A., Mangeruca, L., and Sangiovanni-Vincentelli, A. 2005. Efficient embedded software design with synchronous models. In 5th ACM International Conference on Embedded Software (EMSOFT'05). 187--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Benveniste, A. and Berry, G. 1991. The synchronous approach to reactive and real-time systems. IEEE Proceedings 79, 1270--1282.Google ScholarGoogle ScholarCross RefCross Ref
  3. Benveniste, A., Caspi, P., Guernic, P. L., Marchand, H., Talpin, J., and Tripakis, S. 2002. A protocol for loosely time-triggered architectures. In Embedded Software (EMSOFT'02). LNCS, vol. 2491. Springer, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Burch, J. and Dill, D. 1994. Automatic verification of pipelined microprocessor control. In CAV'94. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Caspi, P., Pilaud, D., Halbwachs, N., and Plaice, J. 1987. Lustre: A declarative language for programming synchronous systems. In 14th ACM Symp. POPL. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Caspi, P., Curic, A., Maignan, A., Sofronis, C., Tripakis, S., and Niebert, P. 2003. From Simulink to SCADE/Lustre to TTA: A layered approach for distributed embedded applications. In Languages, Compilers, and Tools for Embedded Systems (LCTES'03). ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Chen, J. and Burns, A. 1997. A three-slot asynchronous reader-writer mechanism for multiprocessor real-time systems. Tech. Rep. YCS-286, Department of Computer Science, University of York. May.Google ScholarGoogle Scholar
  8. Clarke, E., Grumberg, O., and Peled, D. 2000. Model Checking. MIT Press, Cambridge, MA.Google ScholarGoogle Scholar
  9. Fersman, E. and Yi, W. 2004. A generic approach to schedulability analysis of real-time tasks. Nordic J. of Computing 11, 2, 129--147. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Halbwachs, N. 1992. Synchronous Programming of Reactive Systems. Kluwer, Academic Publ., Norwell, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Halbwachs, N. 1998. Synchronous programming of reactive systems---a tutorial and commented bibliography. In Computer Aided Verification. 1--16. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Harbour, M., Klein, M., Obenza, R., Pollak, B., and Ralya, T. 1993. A Practitioner's Handbook for Real-Time Analysis: Guide to Rate-Monotonic Analysis for Real-Time Systems. Kluwer, Academic Publ., Norwell, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Huang, H., Pillai, P., and Shin, K. 2002. Improving wait-free algorithms for interprocess communication in embedded real-time systems. In USENIX'02. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Liu, C. and Layland, J. 1973. Scheduling algorithms for multiprogramming in a hard real-time environment. Journal of the ACM 20, 1 (Jan.), 46--61. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Puri, A. and Varaiya, P. 1995. Driving safely in smart cars. In IEEE American Control Conference.Google ScholarGoogle Scholar
  16. Queille, J. and Sifakis, J. 1981. Specification and verification of concurrent systems in CESAR. In 5th Intl. Sym. on Programming. LNCS, vol. 137. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Ratel, C., Halbwachs, N., and Raymond, P. 1991. Programming and verifying critical systems by means of the synchronous data-flow programming language Lustre. In ACM-SIGSOFT Conference on Software for Critical Systems. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Scaife, N. and Caspi, P. 2004. Integrating model-based design and preemptive scheduling in mixed time- and event-triggered systems. In Euromicro conference on Real-Time Systems (ECRTS'04). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sha, L., Rajkumar, R., and Lehoczky, J. 1990. Priority inheritance protocols: An approach to real-time synchronization. IEEE Trans. Computers. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sofronis, C., Tripakis, S., and Caspi, P. 2006. A memory-optimal buffering protocol for preservation of synchronous semantics under preemptive scheduling. In 6th ACM International Conference on Embedded Software (EMSOFT'06). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Stankovic, J., Spuri, M., Ramamritham, K., and Buttazzo, G. 1998. Deadline Scheduling For Real-Time Systems: EDF and Related Algorithms. Kluwer Academic Publ., Norwell, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Tripakis, S. 2002. Description and schedulability analysis of the software architecture of an automated vehicle control system. In Embedded Software (EMSOFT'02). LNCS, vol. 2491. Springer, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Tripakis, S., Sofronis, C., Scaife, N., and Caspi, P. 2005. Semantics-preserving and memory-efficient implementation of inter-task communication on static-priority or EDF schedulers. In 5th ACM International Conference on Embedded Software (EMSOFT'05). 353--360. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Semantics-preserving multitask implementation of synchronous programs

                  Recommendations

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  • Published in

                    cover image ACM Transactions on Embedded Computing Systems
                    ACM Transactions on Embedded Computing Systems  Volume 7, Issue 2
                    February 2008
                    412 pages
                    ISSN:1539-9087
                    EISSN:1558-3465
                    DOI:10.1145/1331331
                    Issue’s Table of Contents

                    Copyright © 2008 ACM

                    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 29 January 2008
                    • Revised: 1 July 2007
                    • Accepted: 1 July 2007
                    • Received: 1 January 2007
                    Published in tecs Volume 7, Issue 2

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • research-article
                    • Research
                    • Refereed

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader