skip to main content
research-article

Synchronous programming of device drivers for global resource control in embedded operating systems

Published:21 March 2013Publication History
Skip Abstract Section

Abstract

In embedded systems, controlling a shared resource like a bus, or improving a property like power consumption, may be hard to achieve when programming device drivers individually. In this article, we propose a global resource control approach, based on a centralized view of the devices' states. The solution we propose operates on the hardware/software interface. It involves a simple adaptation of the application level, to communicate with the hardware via a control layer. The control layer itself is built from a set of simple automata: the device drivers, whose states correspond to functional or power consumption modes, and a controller to enforce global properties. All these automata are programmed using a synchronous language, and compiled into a single piece of C code. We take as example the node of a sensor network. We explain the approach in details, demonstrate its use and benefits with an event-driven or multithreading operating system, and draw guidelines for its use in other contexts.

References

  1. Abdelzaher, T., Diao, Y., Hellerstein, J. L., Lu, C., and Zhu, X. 2008. Introduction to control theory and its application to computing systems. In Performance Modeling and Engineering, Z. Liu and C. H. Xia, Eds., Springer US, 185--215. Google ScholarGoogle ScholarCross RefCross Ref
  2. Altisen, K., Clodic, A., Maraninchi, F., and Rutten, É. 2003. Using controller-synthesis techniques to build property-enforcing layers. In Proceedings of the 12th European Conference on Programming (ESOP'03). Springer-Verlag, Berlin, 174--188. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Benveniste, A., Caspi, P., Edwards, S. A., Halbwachs, N., Le Guernic, P., and de Simone, R. 2003. The synchronous languages 12 years later. Proc. IEEE 91, 1, 64--83. Google ScholarGoogle ScholarCross RefCross Ref
  4. Bhatti, S., Carlson, J., Dai, H., Deng, J., Rose, J., Sheth, A., Shucker, B., Gruenwald, C., Torgerson, A., and Han, R. 2005. MANTIS OS: an embedded multithreaded operating system for wireless micro sensor platforms. Mob. Netw. Appl. 10, 563--579. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bouhadiba, T., Sabah, Q., Delaval, G., and Rutten, É. 2011. Synchronous control of reconfiguration in fractal component-based systems—a case study. In Proceedings of the 11st ACM International Conference on Embedded Software (EMSOFT'11). ACM, New York, NY. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Buettner, M., Yee, G. V., Anderson, E., and Han, R. 2006. X-MAC: a short preamble MAC protocol for duty-cycled wireless sensor networks. In Proceedings of the 4th International Conference on Embedded Networked Sensor Systems (SenSys'06). ACM, New York, NY, 307--320. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Caspi, P., Pilaud, D., Halbwachs, N., and Plaice, J. A. 1987. LUSTRE: a declarative language for real-time programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL'87). ACM, New York, NY, 178--188. (The Lustre compiler is available at http://www-verimag.imag.fr/The-Lustre-Toolbox.html.) Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Caspi, P., Scaife, N., Sofronis, C., and Tripakis, S. 2008. Semantics-preserving multitask implementation of synchronous programs. ACM Trans. Embed. Comput. Syst. 7, 15:1--15:40. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Cha, H., Choi, S., Jung, I., Kim, H., Shin, H., Yoo, J., and Yoon, C. 2007. RETOS: Resilient, expandable, and threaded operating system for wireless sensor networks. In Proceedings of the 6th International Conference on Information Processing in Sensor Networks (IPSN'07). ACM, New York, NY, 148--157. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Chandra, V., Huang, Z., and Kumar, R. 2003. Automated control synthesis for an assembly line using discrete event system control theory. IEEE Trans. Syst. Man and Cybernetics 33, 2, 284--289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Chis, A., Fleury, E., and Fraboulet, A. 2009. An optimized MAC layer to physical device mapping methodology. In Proceedings of the 6th International Conference on Mobile Technology, Application & Systems (Mobility'09). ACM, New York, NY, 47:1--47:8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Choi, H., Yoon, C., and Cha, H. 2008. Device driver abstraction for multithreaded sensor network operating systems. In Proceedings of the 5th European Conference on Wireless Sensor Networks (EWSN'08). Springer-Verlag, Berlin, 354--368. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Delaval, G., Marchand, H., and Rutten, É. 2010. Contracts for modular discrete controller synthesis. In Proceedings of the ACM SIGPLAN/SIGBED 2010 Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES'10). ACM, New York, NY, 57--66. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dunkels, A., Gronvall, B., and Voigt, T. 2004. Contiki - A lightweight and flexible operating system for tiny networked sensors. In Proceedings of the 29th Annual IEEE International Conference on Local Computer Networks (LCN'04). IEEE Computer Society, Los Alamitos, CA, 455--462. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dunkels, A., Schmidt, O., Voigt, T., and Ali, M. 2006. Protothreads: simplifying event-driven programming of memory-constrained embedded systems. In Proceedings of the 4th International Conference on Embedded Networked Sensor Systems (SenSys'06). ACM, New York, NY, 29--42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Eswaran, A., Rowe, A., and Rajkumar, R. 2005. Nano-RK: An energy-aware resource-centric RTOS for sensor networks. In Proceedings of the 26th IEEE International Real-Time Systems Symposium. IEEE Computer Society, Los Alamitos, CA, 256--265. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Fraboulet, A., Chelius, G., and Fleury, E. 2007. Worldsens: development and prototyping tools for application specific wireless sensors networks. In Proceedings of the 6th International Conference on Information Processing in Sensor Networks (IPSN'07). ACM, New York, NY, 176--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., and Culler, D. 2003. The nesC language: A holistic approach to networked embedded systems. In Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation (PLDI'03). ACM, New York, NY, 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Girault, A. and Rutten, É. 2009. Automating the addition of fault tolerance with discrete controller synthesis. Form. Methods Syst. Des. 35, 190--225. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Hill, J., Szewczyk, R., Woo, A., Hollar, S., Culler, D., and Pister, K. 2000. System architecture directions for networked sensors. SIGOPS Oper. Syst. Rev. 34, 93--104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. INRIA 2008. SensTools. INRIA. http://senstools.gforge.inria.fr/.Google ScholarGoogle Scholar
  22. Klues, K., Handziski, V., Lu, C., Wolisz, A., Culler, D., Gay, D., and Levis, P. 2007. Integrating concurrency control and energy management in device drivers. SIGOPS Oper. Syst. Rev. 41, 251--264. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Lorincz, K., Chen, B.-r., Waterman, J., Werner-Allen, G., and Welsh, M. 2008. Resource aware programming in the Pixie OS. In Proceedings of the 6th ACM Conference on Embedded Network Sensor Systems (SenSys'08). ACM, New York, NY, 211--224. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Maraninchi, F. and Rémond, Y. 2001. Argos: an automaton-based synchronous language. Comput. Lang. 27, 1--3, 61--92. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Marchand, H., Bournai, P., Le Borgne, M., and Le Guernic, P. 2000. Synthesis of discrete-event controllers based on the signal environment. Discrete Event Dynamic Syst. 10, 325--346. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Ramadge, P. J. G. and Wonham, W. M. 1989. The control of discrete event systems. Proc. IEEE 77, 1, 81--98. Google ScholarGoogle ScholarCross RefCross Ref
  27. Sorber, J., Kostadinov, A., Garber, M., Brennan, M., Corner, M. D., and Berger, E. D. 2007. Eon: a language and runtime system for perpetual systems. In Proceedings of the 5th International Conference on Embedded Networked Sensor Systems (SenSys'07). ACM, New York, NY, 161--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Wang, Y., Lafortune, S., Kelly, T., Kudlur, M., and Mahlke, S. 2009. The theory of deadlock avoidance via discrete control. In Proceedings of the 36th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'09). ACM, New York, NY, 252--263. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Whitaker, A., Shaw, M., and Gribble, S. D. 2002. Scale and performance in the Denali isolation kernel. SIGOPS Oper. Syst. Rev. 36, 195--209. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Zeng, H., Ellis, C. S., Lebeck, A. R., and Vahdat, A. 2002. ECOSystem: managing energy as a first class operating system resource. In Proceedings of the 10th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-X). ACM, New York, NY, 123--132. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Synchronous programming of device drivers for global resource control in embedded operating systems

                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

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader
                About Cookies On This Site

                We use cookies to ensure that we give you the best experience on our website.

                Learn more

                Got it!