4 ms·
I disagree. As discussed in the talk, Network.framework is built on top of their userspace networking stack. This eliminates the kernel-userspace context switch
by doctorsher 8y ago
I disagree. As discussed in the talk, Network.framework is built on top of their userspace networking stack. This eliminates the kernel-userspace context switch and gets rid of one packet copy operation. These are known problems in the socket paradigm, at least as it exists in Linux and every BSD.
- int0x80 8y agoWhere do they say their network stack is userspace? I watched the video but the last 10 minutes and I missed it.
- kccqzy 8y agoPage 105 of their slides.
- doctorsher 8y agoThe userspace networking portion of the talk starts at 46:00. To clarify, the whole networking stack isn't userspace. They still have the classical BSD networking stack. I think the userspace networking stack is used automatically by system libraries like URLSessions and this new Network.framework library. They introduced their userspace networking stack during last year's WWDC: https://developer.apple.com/videos/play/wwdc2017/707 https://developer.apple.com/videos/play/wwdc2017/707
- int0x80 8y agoAh, good. Thank you.
- baybal2 8y agoWell, for as long as the driver is ran in ring0, you have context switching. The water is wet, there are no tricks around that even if you are an Apple.
- eeks 8y agoIt's only for datagrams, apparently.
- dwaite 8y agoMy understanding is that TCP is also partially user-space, but with some kernel management (such as communicating the closing the TCP connections when processes terminate)