skip to main content
article

A principled approach to operating system construction in Haskell

Published:12 September 2005Publication History
Skip Abstract Section

Abstract

We describe a monadic interface to low-level hardware features that is a suitable basis for building operating systems in Haskell. The interface includes primitives for controlling memory management hardware, user-mode process execution, and low-level device I/O. The interface enforces memory safety in nearly all circumstances. Its behavior is specified in part by formal assertions written in a programming logic called P-Logic. The interface has been implemented on bare IA32 hardware using the Glasgow Haskell Compiler (GHC) runtime system. We show how a variety of simple O/S kernels can be constructed on top of the interface, including a simple separation kernel and a demonstration system in which the kernel, window system, and all device drivers are written in Haskell.

References

  1. F. Bellard. QEMU. http://fabrice.bellard.free.fr/qemu/.Google ScholarGoogle Scholar
  2. E. Biagioni, R. Harper, and P. Lee. A Network Protocol Stack in Standard ML. Higher Order Symbol. Comput., 14(4):309--356, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Cardelli, J. Donahue, L. Glassman, M. Jordan, B. Kalsow, and G. Nelson. Modula-3: Language definition. http://www.research.compaq.com/SRC/m3defn/html/complete.html.Google ScholarGoogle Scholar
  4. S. Carlier and J. Bobbio. hOp. http://www.macs.hw.ac.uk/~sebc/hOp/, 2004.Google ScholarGoogle Scholar
  5. A. Cheadle, T. Field, S. Marlow, S. Peyton Jones, and L. While. Exploring the Barrier to Entry: Incremental Generational Garbage Collection for Haskell. In Int. Symp. on Memory Management, pages 163--174, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. J. Cupitt. A brief walk thourgh KAOS. Techical Report 58, Computing Laboratory, Univ. of Kent at Canterbury, February 1989.Google ScholarGoogle Scholar
  7. Cyclone. http://www.research.att.com/projects/cyclone/.Google ScholarGoogle Scholar
  8. K. Fraser, S. Hand, R. Neugebauer, I. Pratt, A. Warfield, and M. Williamson. Safe hardware access with the Xen virtual machine monitor. In Proc. OASIS ASPLOS Workshop, 2004.Google ScholarGoogle Scholar
  9. G. Fu. Design and implementation of an operating system in Standard ML. Master's thesis, University of Hawaii, August 1999.Google ScholarGoogle Scholar
  10. Glasgow haskell compiler. http://www.haskell.org/ghc.Google ScholarGoogle Scholar
  11. Grub. http://www.gnu.org/software/grub/.Google ScholarGoogle Scholar
  12. T. Hallgren. The House web page. http://www.cse.ogi.edu/~hallgren/House/, 2004.Google ScholarGoogle Scholar
  13. Intel Corp. IA-32 Intel Architecture Software Developer's Manual Volume 3: System Programming Guide, 2004.Google ScholarGoogle Scholar
  14. T. Jim, G. Morrisett, D. Grossman, M. Hicks, J. Cheney, and Y.Wang. Cyclone: A Safe Dialect of C. In USENIX Annual Technical Conference, pages 275--288, June 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. P. Jones. Functional programming with overloading and higherorder polymorphism. In Advanced Functional Programming, 1st Int. Spring School on Advanced Functional Programming Techniques-Tutorial Text, pages 97--136, London, UK, 1995. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. P. Jones. Bare Metal: A Programatica model of hardware. In High Confidence Software and Systems Conference, Baltimore, MD, March 2005.Google ScholarGoogle Scholar
  17. K. Karlsson. Nebula: A functional operating system. Technical report, Programing Methodology Group, University of Göteborg and Chalmers University of Technology, 1981.Google ScholarGoogle Scholar
  18. R. B. Kieburtz. P-logic: Property verification for Haskell programs. ftp://ftp.cse.ogi.edu/pub/pacsoft/papers/Plogic.pdf, August 2002.Google ScholarGoogle Scholar
  19. S. Liang, P. Hudak, and M. Jones. Monad transformers and modular interpreters. In POPL '95: Proc. 22nd ACM Symp. on Principles of programming languages, pages 333--343, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. Noble. Lazy Functional Components for Graphical User Interface. PhD thesis, University of York, November 1995.Google ScholarGoogle Scholar
  21. The OSKit Project. http://www.cs.utah.edu/flux/oskit/.Google ScholarGoogle Scholar
  22. The Programatica Project home page. www.cse.ogi.edu/PacSoft/projects/programatica/, 2002.Google ScholarGoogle Scholar
  23. The SPIN project. http://www.cs.washington.edu/research/projects/spin/www/, 1997.Google ScholarGoogle Scholar
  24. W. Stoye. Message-based functional operating systems. Science of Computer Programming, 6:291--311, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. L. Team. L4 eXperimental Kernel Reference Manual, January 2005.Google ScholarGoogle Scholar
  26. Video Electronics Standards Association. VESA BIOS EXTENSION (VBE) - Core Functions Standard, Version: 3.0, September 1998. www.vesa.org.Google ScholarGoogle Scholar
  27. M. Wallace. Functional Programming and Embedded Systems. PhD thesis, Dept of Computer Science, Univ. of York, UK, January 1995.Google ScholarGoogle Scholar
  28. M. Wallace and C. Runciman. Lambdas in the Liftshaft - Functional Programming and an Embedded Architecture. In FPCA '95: Proc. 7th Int. Conf. on Functional Programming Languages and Computer Architecture, pages 249--258, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A principled approach to operating system construction in Haskell

          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 40, Issue 9
            Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
            September 2005
            330 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/1090189
            Issue’s Table of Contents
            • cover image ACM Conferences
              ICFP '05: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
              September 2005
              342 pages
              ISBN:1595930647
              DOI:10.1145/1086365

            Copyright © 2005 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: 12 September 2005

            Check for updates

            Qualifiers

            • article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader