Re:Fibers: An Elegant Windows API
by asveikau on Friday March 29, 2019 @06:58PM
(#19526349)
In the user mode piece, a single thread can get told "these 10K descriptors are ready for you to call read(2) upon them", then that thread can read them all using the same buffer. [In practice you might allocate more depending on what's going on, but this is a crude example.] In the IOCP model you need to allocate space for all read requests upfront, even if they're not writing you any data currently.
Kernel mode would have its own buffers, so memory cost per client is not small in this example... except in terms of user-mode buffers.
Kernel mode would have its own buffers, so memory cost per client is not small in this example... except in terms of user-mode buffers.