© 1989 by British Computer Society
Functional Programming and Operating Systems
Department of Computing Science, University of Stirling, Stirling, FK9 4LA, UK
There is a large class of programming problems to which, at first sight, functional programming does not seem suited: interactive programs and programs which must access external resources such as file stores or communications systems. We take operating systems as the archetype of this class of problems. We show how the lazy evaluation of functional programs, in particular lazily evaluated infinite lists, or streams, can be exploited to write interactive programs. This extends quite naturally to a software design paradigm comprising processes and networks, to the control of peripheral devices, and hence to the design of operating systems. We present a design for a simple, single user, multiprogramming operating system. This demonstrates workable solutions to operating system structuring, to low level device interfacing, to high level application program interfacing, and to resource management. We examine the paradigm illustrated, with reference to alternative approaches which have been proposed.
Received November 1988.
* Department of Computing Science, University of Stirling, Stirling, FK9 4LA