This is a pretty-much theoretical question, but..
How much of an operating system could be written in a language like Python, Ruby, Perl, or Lisp, Haskell etc?
It seems like a lot of the stuff like init.d could trivially be done in a scripting language. One of the firewall-device-OS’s (m0n0wall) uses PHP for its system-configuration (including on boot). And one could argue that ’emacs is an OS, mostly written in Lisp’..
Of course there are bits that would have to be assembly/C, but how much could be regular .py/rb/.pl/.el/.hk files..? It might not have the best performance, but it would be, by far, the most easiest-to-modify OS ever…
Technically, any of it could be, if you write a compiler to do so. OSes have been done in Java (JNode), .NET (MOSA, Singularity, SharpOS, Cosmos), Haskell (HOUSE), Python (Unununium), etc.
Edit: I see a lot of people talking about the very lowest level being an area where this couldn’t be done; this isn’t true.
There’s no reason that the compiler for X language can’t be extended to handle any low-level operation and expose it to the language. All functionality can be achieved from any language, it’s simply a matter of picking the right tool for the job. Sometimes this is Python, sometimes this is C, sometimes this is assembly.
Look to projects like Cosmos and SharpOS to see a pure high-level OS Done Right (TM).