An approach to functional operating systems