operating-systeminterpreterosdev

Write OS in interpreted language


Is it possible to write an OS using a language that is not compiled [i.e. interpreted like python] or does not use a runtime [like Java] ? Wouldn't the virtual machine need to run on top of an OS already ?


Solution

  • Microsoft Research has created an OS, called Singularity.

    It IS a research project though, and I think they needed some low level code to initiate the boot process (at some point an OS needs to talk to the hardware).

    Wikipedia says:

    The lowest-level x86 interrupt dispatch code is written in assembly language and C. Once this code has done its job, it invokes the kernel, whose runtime and garbage collector are written in Sing# (an extended version of Spec#, itself an extension of C#) and runs in unprotected mode. The hardware abstraction layer is written in C++ and runs in protected mode. There is also some C code to handle debugging. The computer's BIOS is invoked during the 16-bit real mode bootstrap stage; once in 32-bit mode, Singularity never invokes the BIOS again, but invokes device drivers written in Sing#. During installation, Common Intermediate Language (CIL) opcodes are compiled into x86 opcodes using the Bartok compiler.