skip to main content
research-article

Scriptable operating systems with Lua

Published:14 October 2014Publication History
Skip Abstract Section

Abstract

Extensible operating system is a design based on the idea that operating systems can be adapted to meet user requirements by allowing user extensions. In a different scenario, that of application development, there is a paradigm that supports that complex systems should allow users to write scripts to tailor an application to their needs. In this paper we propose the concept of scriptable operating system, which applies scripting development paradigm to the concept of extensible operating systems. Scriptable operating systems support that operating systems can adequately provide extensibility by allowing users to script their kernel. We also present an implementation of a kernel-scripting environment that allows users to dynamically extend Linux and NetBSD operating systems using the scripting language Lua. To evaluate this environment, we extended both OS kernels to allow users to script CPU frequency scaling and network packet filtering using Lua.

References

  1. ISO C standard 1999. Technical report, 1999. URL http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf. ISO/IEC 9899:1999 draft.Google ScholarGoogle Scholar
  2. IEEE Standard for Local and Metropolitan Area Networks-Station and Media Access Control Connectivity Discovery. IEEE Standard 802.1AB, 2009.Google ScholarGoogle Scholar
  3. G. Banga, P. Druschel, and J. C. Mogul. Resource containers: A new facility for resource management in server systems. In OSDI, volume 99, pages 45--58, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. P. Barreto, R. Douence, G. Muller, and M. Sudholt. Programming os schedulers with domain-specific languages and aspects: New approaches for os kernel engineering. In Proceedings of the 1st AOSD Workshop on Aspects, Components, and Patterns for Infrastructure Software, pages 1--6. Citeseer, 2002.Google ScholarGoogle Scholar
  5. M. Belshe and R. Peon. SPDY protocol-Draft 3.1. URL http://www.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3-1.Google ScholarGoogle Scholar
  6. B. Bershad, C. Chambers, S. Eggers, C. Maeda, D. McNamee, P. Pardyak, S. Savage, and E. Sirer. SPIN-an extensible mi- crokernel for application-specific operating system services. ACM SIGOPS Operating Systems Review, 29(1):74--77, 1995. ISSN 0163-5980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. H. Campbell and S.-M. Tan. Choices: an object-oriented multimedia operating system. In Proceedings of the Fifth Workshop on Hot Topics in Operating Systems, 1995 (HotOS-V), pages 90--94. IEEE, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. Engler. The Exokernel operating system architecture. PhD thesis, MIT, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. R. Fielding, J. Gettys, J. Mogul, H. Frystyk, L. Masinter, P. Leach, and T. Berners-Lee. Hypertext Transfer Protocol-HTTP/1.1, 1999.Google ScholarGoogle Scholar
  10. M. Gates, A. Warshavsky, A. Tirumala, J. Ferguson, Jim Dugan, F. Qin, K. Gibbs, J. Estabrook, A. Gallatin, S. Hemminger, J. Nathan, and G. Renker. Iperf, 2008. URL http://iperf.sourceforge.net.Google ScholarGoogle Scholar
  11. A. Graf. PacketScript-a Lua Scripting Engine for in-Kernel Packet Processing. Master's thesis, Computer Science Department, University of Basel, July 2010.Google ScholarGoogle Scholar
  12. M. Grawinkel, T. Suss, G. Best, I. Popov, and A. Brinkmann. Towards Dynamic Scripted pNFS Layouts. In High Performance Computing, Networking, Storage and Analysis (SCC), 2012 SC Companion:, pages 13--17. IEEE, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. G. Hunt and J. Larus. Singularity: rethinking the software stack. ACM SIGOPS Operating Systems Review, 41(2):37--49, 2007. ISSN 0163-5980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Ierusalimschy. Programming in Lua. Lua.org, third edition, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Ierusalimschy, L. de Figueiredo, and W. Celes Filho. Lua-an extensible extension language. Software: Practice and Experience, 26(6):635--652, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. R. Ierusalimschy, L. de Figueiredo, and W. Celes. Lua 5.1 Reference Manual. Lua.org, first edition, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. Ierusalimschy, L. de Figueiredo, and W. Celes. The evolution of Lua. In Proceedings of the third ACM SIGPLAN Conference on History of Programming Languages, pages 2--26. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. R. Ierusalimschy, L. H. de Figueiredo, and W. Celes. Passing a language through the eye of a needle. Communications of the ACM, 54(7):38--43, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. F. Kaashoek, D. R. Engler, G. R. Ganger, and D. A. Wallach. Server operating systems. In Proceedings of the 7th Workshop on Systems Support for Worldwide Applications (ACM SIGOPS European workshop), pages 141--148. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Lampson. On reliable and extendable operating systems. In Proceedings of the Second NATO Conference on Techiniques in Software Engineering, 1969.Google ScholarGoogle Scholar
  21. G. Lefkowitz. Extending vs. embedding-there is only one correct decision, 2003. URL http://twistedmatrix.com/users/glyph/rant/extendit.html.Google ScholarGoogle Scholar
  22. Y. Li, S.-m. Tan, M. L. Sefika, R. H. Campbell, and W. S. Liao. Dynamic Customization in the Choices Operating System. In Proceedings of Reflection'96, 1996.Google ScholarGoogle Scholar
  23. M. K. McKusick, K. Bostic, M. J. Karels, and J. S. Quarterman. The design and implementation of the 4.4 BSD operating system. Pearson Education, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Mochel and M. Murphy. sysfs-The filesystem for exporting kernel objects, 2009. URL http://kernel.org/doc/Documentation/filesystems/sysfs.txt.Google ScholarGoogle Scholar
  25. H. Muhammad and R. Ierusalimschy. C APIs in extension and extensible languages. Journal of Universal Computer Science, 13(6):839--853, 2007.Google ScholarGoogle Scholar
  26. J. Ousterhout. Scripting: Higher-level programming for the 21st century. IEEE Computer, 31(3):23--30, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. V. Pallipadi and A. Starikovskiy. The ondemand governor. In Proceedings of the Linux Symposium, volume 2, pages 215--230, 2006.Google ScholarGoogle Scholar
  28. L. Prechelt. An empirical comparison of seven programming languages. Computer, 33(10):23--29, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Rasiukevicius. NPF-Progress and Perspective. AsiaBS-DCon 2014, page 21, 2014.Google ScholarGoogle Scholar
  30. S. Savage and B. Bershad. Issues in the design of an extensible operating system. In Proceedings of the First USENIX Symposium on Operating Systems Design and Implementation (OSDI), 1994.Google ScholarGoogle Scholar
  31. H. Schulzrinne, S. Casner, R. Frederick, and V. Jacobson. RTP: A Transport Protocol for Real-Time Applications, 2003.Google ScholarGoogle Scholar
  32. M. I. Seltzer, Y. Endo, C. Small, and K. A. Smith. Dealing with disaster: Surviving misbehaved kernel extensions. In OSDI, volume 96, pages 213--227, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. I. Seltzer, Y. Endo, C. Small, and K. A. Smith. Issues in extensible operating systems. Computer Science Technical Report TR-18-97, Harvard University, 2(2.2):1, 1997.Google ScholarGoogle Scholar
  34. C. Small and M. Seltzer. VINO: An Integrated Platform for Operating System and Database Research. Technical report, 1994.Google ScholarGoogle Scholar
  35. T. Voigt, R. Tewari, D. Freimuth, and A. Mehra. Kernel mechanisms for service differentiation in overloaded web servers. In USENIX Annual Technical Conference, General Track, pages 189--202, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. T. Ylonen and C. Lonvick. The Secure Shell (SSH) Transport Layer Protocol, 2006. URL http://www.ietf.org/rfc/rfc4253.txt.Google ScholarGoogle Scholar

Index Terms

  1. Scriptable operating systems with Lua

        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 SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 50, Issue 2
          DLS '14
          February 2015
          146 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2775052
          • Editor:
          • Andy Gill
          Issue’s Table of Contents
          • cover image ACM Conferences
            DLS '14: Proceedings of the 10th ACM Symposium on Dynamic languages
            October 2014
            160 pages
            ISBN:9781450332118
            DOI:10.1145/2661088

          Copyright © 2014 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 14 October 2014

          Check for updates

          Qualifiers

          • research-article

        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!