[TUHS] If forking is bad, how about buffering?

Bakul Shah via TUHS tuhs at tuhs.org
Sun May 19 11:50:57 AEST 2024


On May 18, 2024, at 6:40 PM, Bakul Shah <bakul at iitbombay.org> wrote:
> 
> On May 18, 2024, at 6:21 PM, Larry McVoy <lm at mcvoy.com> wrote:
>> 
>> On Sat, May 18, 2024 at 06:04:23PM -0700, Bakul Shah via TUHS wrote:
>>> [1] This brings up a separate point: in a microkernel even a simple
>>> thing like "foo | bar" would require a third process - a "pipe
>>> service", to buffer up the output of foo! You may have reduced
>>> the overhead of individual syscalls but you will have more of
>>> cross-domain calls!
>> 
>> Do any micro kernels do address space to address space bcopy()?
> 
> mmapping the same page in two processes won't be hard but now
> you have complicated cat (or some iolib)!

And there are other issues. As Doug said in his original message
in this thread: "And input buffering must never ingest data that
the program will not eventually use." Consider something like this:

(echo 1; echo 2)|(read; cat)

This will print 2. Emulating this with mmaped buffers and copying
will not be easy....




More information about the TUHS mailing list