Doing it better 1999-02-08 f ### From Reuben. > On the contrary, a portable VM is quite high level. Not true. We are getting bogged down in different philosophical views of the same thing. Only I'm not even sure what the thing is. I'm beginning to feel a bit adrift after reading a lot of web pages about various OSes over the past few days (see in doc/info/computing/core (core = OS/VM) for what I've gleaned). > See below. Also, how does one organise via typing? Typing allows you to separate a unity and add efficiency, e.g. my primitive ports/threads can be specialised into objects, processes, channels &c. via typing. > To write a VM, you need a heap, however primitive. I'm just going to use malloc. Later the heap can be written into the system. > higher level than *a* heap, so why not *the* heap? An interface to > lower-level code is more efficient, and reuses code better, than a > higher-level reimplementation of the same thing. You do have to expend > effort making it a portable interface, though... One of my main insights is that with typing and a suitably flexible system you can reimplement at a lower level, so the VM can be low-level conceptually (it implements the simplest abstractions), but need not be at the bottom in terms of operating system levels. > But don't we want a nice program environment at the lowest possible > level? Yes. But again, my model of communication is much simpler than yours. It can be specialised and made more efficient later. > and build on top of them my VM. We definitely need something restrictive > above the communication primitives before we hand development over to joe > compiler-writer. Quite so. My initial system is not enough to start writing an OS on, or to program on. You need to add communication and process models for the former and an object model for the latter first. What I'm doing barely gets you off the ground. But it does get you far enough: portability. > I suppose the question is: Is it easier to write a VM in a native > environment and communication primitives and another VM in a portable > environment, or is it easier to write communication primitives and a VM in > a native environment? You reckon the former, and I the latter, or at least > we did yesterday. I just like the idea of having a portable base. It's not so much that it's easier to work with (though I think it is) as that it's easier to port (for distribution &c.). It's also much cleaner. It's also easier to define, reason about, and tinker with. -- http://www.cl.cam.ac.uk/users/rrt1001/ | maxim, n. wisdom for fools