But you are right that there is a price for elegance. It becomes an easier choice to make when you factor in things like latency and long term reliability / stability / correctness. Those can weigh much heavier than mere throughput.
But you are right that there is a price for elegance. It becomes an easier choice to make when you factor in things like latency and long term reliability / stability / correctness. Those can weigh much heavier than mere throughput.
(this is used under-the-hood on macOS: NSXPCConnection -> libxpc -> MIG -> mach messages)
The same idea occurred to me a while ago too, which is how I originally found that link :)
Disclaimer: I don't actually know what I'm talking about, lol
(Of course I'm being vague about the cutoff for "large" and "smaller" buffers. Always benchmark!)
For small messages (open), the userspace malloc is going to have packed small buffers into a single page - so there's a chance you'd need to copy to a new userspace page, the two copies might work out better.
The lower a transparent policy lies in the OS, the worse it contorts the system. Even mechanisms necessarily constrain policy, if only slightly. I strongly believe that microkernels will only be improved by adhering ever closer to true minimality. If backwards compatibility is important, put the policy in a library. But I think transparent policies are generally advisable only when user feedback indicates benefit.
Contrary to QNX, I'm not entirely convinced that network transparency by default is ultimately best, though that is a separate concern.