On 2012-12-19 03:27, Clem Cole wrote:
The page size on the VAX is 512 bytes and it lacked COW (copy-on-write)
HW (long, long story as to why, which I will not try to repeat). In
the end, this would be a huge problem with all VAX OSses and HW - take
look any of the sources.
[...]
Well, what it lacks (and I'm sure you know this) is really a modified bit in the page
table.
However, it's extremely easy to implement it, and the cost is acceptable, I guess. You
just keep the page read-only, and get a trap when someone wants to write. At that time you
change the protection, and mark it as modified. There are even a couple of bits in the
page entry that are reserved for software use, and you can just decide that one of them is
your modified bit.
This is what we do in NetBSD/vax.
I don't know of any architecture that has any kind of copy-on-write semantics in the
MMU. I think that is way to complex to actually be possible in the MMU itself. OSes
normally do copy-on-write by having the page read-only, and when a write happens, the page
gets cloned, and then you have your own private copy, to which you can write.
But that implies allocating a new page, copy the contents of the old page over, and change
the current page table. If you know of an MMU that can do that, I'm interested in
hearing about it.
Johnny