Hostname: page-component-78c5997874-fbnjt Total loading time: 0 Render date: 2024-11-04T18:07:37.130Z Has data issue: false hasContentIssue false

NixOS: A purely functional Linux distribution

Published online by Cambridge University Press:  15 October 2010

EELCO DOLSTRA
Affiliation:
Department of Software Technology, Delft University of Technology, Postbus 5031, 2600 GA Delft, The Netherlands (e-mail: e.dolstra@tudelft.nl)
ANDRES LÖH
Affiliation:
Department of Information and Computing Sciences, Utrecht University, Postbus 80. 089, 3508 TB Utrecht, The Netherlands (e-mail: andres@cs.uu.nl)
NICOLAS PIERRON
Affiliation:
EPITA Research and Development Laboratory, 14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre cedex, France (e-mail: nicolas.b.pierron@gmail.com)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Existing package and system configuration management tools suffer from an imperative model, where system administration actions such as package upgrades or changes to system configuration files are stateful: they destructively update the state of the system. This leads to many problems, such as the inability to roll back changes easily, to deploy multiple versions of a package side-by-side, to reproduce a configuration deterministically on another machine, or to reliably upgrade a system. In this paper we show that we can overcome these problems by moving to a purely functional system configuration model. This means that all static parts of a system (such as software packages, configuration files and system startup scripts) are built by pure functions and are immutable, stored in a way analogous to a heap in a purely functional language. We have implemented this model in NixOS, a non-trivial Linux distribution that uses the Nix package manager to build the entire system configuration from a modular, purely functional specification.

Type
Articles
Copyright
Copyright © Cambridge University Press 2010

References

Anderson, Rick. 2000 (Jan.). The end of DLL hell. MSDN, http://msdn2.microsoft.com/en-us/library/ms811694.aspx.Google Scholar
Beshers, Clifford, Fox, David, & Shaw, Jeremy. (2007). Experience report: using functional programming to manage a Linux distribution. In ICFP'07: Proceedings of the 2007 ACM SIGPLAN International Conference on Functional Programming, Hinze, R. and Ramsey, N. (eds.), New York, NY, USA: ACM, pp. 213218.CrossRefGoogle Scholar
Boehm, Hans-Juergen. 1993 (June). Space efficient conservative garbage collection. Pages 197–206 of: Proceedings of the ACM SIGPLAN '93 Conference on Programming Language Design and Implementation. SIGPLAN Notices, no. 28/6.Google Scholar
den Breejen, Wouter. 2008 (Mar.). Managing state in a purely functional deployment model. M.Phil. thesis, Dept. of Information and Computing Sciences, Utrecht University. INF/SCR-2007-053.Google Scholar
Burgess, Mark. (1995). A site configuration engine. Computing systems, 8 (3), 309337.Google Scholar
Clemm, G. (February 1986) The Odin System — an Object Manager for Extensible Software Environments. Ph.D. thesis, University of Colorado at Boulder.Google Scholar
Clemm, G. (1995) The Odin system. In Selected Papers from the ICSE SCM-4 and SCM-5 Workshops on Software Configuration Management. Lecture Notes in Computer Science, no. 1005. Springer-Verlag, pp. 241262.Google Scholar
Cosmo, R. D., Zacchiroli, S. & Trezentos, P. (2008) Package upgrades in FOSS distributions: details and challenges. In HotSWUp '08: Proceedings of the 1st International Workshop on Hot Topics in Software Upgrades. New York, NY, USA: ACM, pp. 15.Google Scholar
den Breejen, W. (March 2008). Managing State in a Purely Functional Deployment Model. M.Phil. thesis, Dept. of Information and Computing Sciences, Utrecht University. INF/SCR-2007-053.Google Scholar
DeTreville, J. (2005) Making system configuration more declarative. In HotOS X: 10th Workshop on Hot Topics in Operating Systems. USENIX, pp. 6166.Google Scholar
Dolstra, E. (November 2005). Secure sharing between untrusted users in a transparent source/binary deployment model. In 20th IEEE/ACM International Conference on Automated Software Engineering (ASE 2005), pp. 154–163.Google Scholar
Dolstra, E. (2006) The Purely Functional Software Deployment Model. Ph.D. thesis, Faculty of Science, Utrecht University, The Netherlands.Google Scholar
Dolstra, E. (2008) Maximal laziness — an efficient interpretation technique for purely functional DSLs. In Eighth Workshop on Language Descriptions, Tools and Applications (LDTA 2008). Electronic Notes in Theoretical Computer Science, vol. 238, no. 5. Elsevier Science Publishers, pp. 8199.Google Scholar
Dolstra, E., Visser, E. & de Jonge, M. (2004) Imposing a memory management discipline on software deployment. In Proceedings of the 26th International Conference on Software Engineering (ICSE 2004). IEEE Computer Society, pp. 583592.CrossRefGoogle Scholar
Feldman, S. I. (1979) Make—a program for maintaining computer programs, Soft.—Prac. Exp., 9 (4), 255265.CrossRefGoogle Scholar
Foster-Johnson, E. (2003) Red Hat RPM Guide. John Wiley & Sons. Also Available at: http://fedora.redhat.com/docs/drafts/rpm-guide-en/Google Scholar
FreeBSD Project. (2009) FreeBSD Ports Collection. Available at: http://www.freebsd.org/ports/Google Scholar
Hallgren, T., Jones, M. P., Leslie, R. & Tolmach, A. (2005) A principled approach to operating system construction in Haskell. In ICFP '05: Tenth ACM SIGPLAN International Conference on Functional Programming. ACM, pp. 116128.Google Scholar
Hart, J. & D'Amelia, J. (2002) An analysis of RPM validation drift. In Proceedings of the 16th Systems Administration Conference (LISA '02). USENIX, pp. 155166.Google Scholar
Heydon, A., Levin, R. & Yu, Y. (2000) Caching function calls using precise dependencies. In ACM SIGPLAN '00 Conference on Programming Language Design and Implementation. ACM, pp. 311320.Google Scholar
Heydon, A., Levin, R., Mann, T. & Yu, Y. (March 2001). The Vesta Approach to Software Configuration Management. Tech. Rep. Research Report 168. Compaq Systems Research Center.Google Scholar
Hudak, P. (1989) Conception, evolution, and application of functional programming languages. ACM Comput. Surv., 21 (3), 359411.Google Scholar
Kanies, L. (2003) ISconf: Theory, practice and beyond. In Proceedings of the 17th USENIX Conference on System Administration (LISA '03). USENIX, pp. 115124.Google Scholar
Pendry, J.-S. & McKusick, M. K. (1995) Union mounts in 4.4BSD-Lite. Proceedings of the USENIX 1995 Technical Conference. USENIX, pp. 2533.Google Scholar
Peyton Jones, S. (1992) Implementing lazy functional languages on stock hardware: The Spineless Tagless G-machine. J. Funct. Program., 2 (2), 127202.Google Scholar
Peyton Jones, S. (ed). (2004) Haskell 98 Language and Libraries: The revised Report. Cambridge University Press.Google Scholar
Schneier, B. (1996) Applied Cryptography. 2nd ed.John Wiley & Sons.Google Scholar
Sloane, A. M. (2002) Post-design domain-specific language embedding: A case study in the software engineering domain. In Proceedings of the 35th Annual Hawaii International Conference on System Sciences (HICSS'02). Washington, DC, USA: IEEE Computer Society, pp. 281289.Google Scholar
Stevens, W. R. & Rago, S. A. (2005) Advanced Programming in the UNIX Environment. 2nd ed.Addison-Wesley.Google Scholar
TIS Committee. (May 1995) Tool Interface Specification (TIS) Executable and Linking Format (ELF) Specification, Version 1.2.Google Scholar
Traugott, S. & Brown, L. (2002) Why order matters: Turing equivalence in automated systems administration. In Proceedings of the 16th Systems Administration Conference (LISA '02). USENIX, pp. 99120.Google Scholar
Tucker, D. B. & Krishnamurthi, S. (2001) Applying module system research to package management. In Tenth International Workshop on Software Configuration Management (SCM-10).Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.