I don't really know how feasible this is without pretty significant performance impact (esp. memory usage), but as a research project, it sounds fascinating. Go for it.
> don't really know how feasible this is And I suspect neither does the author. I looked at the previous project (OpenGL Renderer) which comes in at 250 lines of code and barely any functionality. The current project is has no code at all. I'm all for sharing ideas, but this is somewhat lacking. The design document touches on the memory model, but ignores all the other problems an OS has to solve (scheduling, network…
An immutable operating system
61–70 of 153 posts
Re: An immutable operating system
#62Is there a list of research / alternative operating systems anywhere? I don't know how an OS would qualify to get on the list other than not DOS, Windows, OSX (or any of the Apple OSs), Linux (especially not 'ubuntu with a different DE'), or the BSDs (i guess there are exceptions if they're on a toaster).
Those are more serious kernels I think. There are also a ton of research-related kernels. I guess you can find a few for some programming languages.
Re: An immutable operating system
#63I don't really know how feasible this is without pretty significant performance impact (esp. memory usage), but as a research project, it sounds fascinating. Go for it.
My recommendation would be to modify an existing OS, like MINIX, to have two types of processes: mutable and immutable. That way some (not all) of the potential advantages can be tested without having to start from scratch.
Re: An immutable operating system
#64Earlier quoted context omitted.
Sometimes 'toy of professors' (research) is the point. Not everything has to run a social network and not everyone is working on a twitter clone.
Isn't Twitter written in Scala, a programming language designed with immutability in mind?
Re: An immutable operating system
#65Earlier quoted context omitted.
> don't really know how feasible this is And I suspect neither does the author. I looked at the previous project (OpenGL Renderer) which comes in at 250 lines of code and barely any functionality. The current project is has no code at all. I'm all for sharing ideas, but this is somewhat lacking. The design document touches on the memory model, but ignores all the other problems an OS has to solve (scheduling, network…
The author could focus on an existing embedded RTOS and fork from there. Enough cherries to pick one.
Re: An immutable operating system
#66Why make the system language a Lisp instead of a language that is by default immutable? I'd think Haskell is a shoe in for something like this and you'd have a head start with House: http://en.wikipedia.org/wiki/House_(operating_system)
Personally I'm more of a fan of immutability than purity, which is why I haven't considered haskell. As mentioned in the post, though, I'm not sure if the language should be static or dynamic or something else.. And I don't really want to invent my own language either. Food for thought :)
EDIT: Well... not really I guess. But idempotence has similar properties I think.
Re: An immutable operating system
#67I wrote an operating system in a purely functional dialect of Lisp; http://losak.sf.net There are a few things I learned in the process that I think are relevant here: 1. Forget garbage collection in the sense of any variant of mark-and-sweep. For an operating system latency is more important than through put, so you really want real time memory management. If you use reference counting, then there is a lazy variant…
Author here. The language is the part I also dread the most, and is also the part that will be the least unique and the least interesting to "re-invent".. I'll look into finding an existing language that runs on bare metal and that has (or supports) immutable values.
Re: An immutable operating system
#68I gave an un-conference talk at Clojure days Amsterdam called "Purely Functional OS" on this exact topic and we had an incredibly interesting discussion about the topic. The conclusion we kept coming back to is that it's technically not all that difficult to implement, but that to make it usable in the real world would mean that computers would have to get a lot more cautious about source vs. derived data. The main t…
If the CPU has 'now' to consider, and now is Time value [t] and if [t]'s are all there is between states, then 'think about [t1 .. t2]' should be a standard op.
And isn't this the point about immutability, that it has to have had a Time value, to be of any value at all, anyway, to the user?
Re: An immutable operating system
#69I don't really know how feasible this is without pretty significant performance impact (esp. memory usage), but as a research project, it sounds fascinating. Go for it.
My recommendation would be to modify an existing OS, like MINIX, to have two types of processes: mutable and immutable. That way some (not all) of the potential advantages can be tested without having to start from scratch.
Re: An immutable operating system
#70Earlier quoted context omitted.
"When all values are immutable, though, you can defragment the heap by copying a value to another fragment and just swap the internal pointer to the value." Wouldn't that turn shared objects into not-shared objects? Theoretically, that doesn't make a difference in a system without mutable data (assuming you leave out 'identity check', too), but in practice, it likely will blow up memory usage tremendously. Edit: I th…
http://en.wikipedia.org/wiki/Cheney's_algorithm Is quite common in systems and uses "forwarding pointers".