While libraries tend not to have state and drivers do, drivers also typically run in the kernel, which typically works just like lingofreak describes. It is mapped into each address like a library, but it shares its state across processes and is in a separate protection domain.Brendan wrote:You're talking about 2 extremely different things.
This is useful because it lets the kernel (and in lingofreak's scenario, the drivers) directly access the process's address space. For example, sharing buffers without the cache misses, TLB misses, and pointer fixups from accessing the page tables to map them across address spaces.
As far as "pointless duplication" goes, the Mill actually has only the one form of protection domains as it's single-address-space.
But none of this is directly relevant to Brendan's design, which involves passing messages to components potentially on other machines in a cluster. Perhaps it would make sense as an optimization on machines that are capable of it.