On Dec 19, 2012, at 7:08 AM, Johnny Billquist wrote:
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 can't imagine any other way of doing it. A copy on write page has to start out
read-only, then when the write occurs the write has to be rejected so the copy can be done
first. The "trap, copy, and write-enable" approach is the common one; for
example, MIPS works exactly this way.
paul