Interesting networking talk
levi at cold.org
Fri Feb 10 21:51:27 MST 2006
On Feb 10, 2006, at 11:26 AM, Bryan Sant wrote:
> You still have to talk to hardware though. Eventually you have to
> talk to the ethernet controller. If my user space program uses it's
> own TCP/IP stack, but that stack has to talk to the ethernet
> controller, aren't I making the same number of system calls (or more)?
> Also, I'm possiblity bypassing any kernel based security (my
> userspace stack would have to know that you can't listen on ports
> <1024 if you're not root, etc).
There are always tradeoffs when you go for maximum performance. In
this case, his final example had the network card buffer mapped
directly into memory, and the user-space process got notified when
new data arrived. No system calls involved at all, and almost no
kernel activity either.
Of course, it throws away a lot of useful abstractions, so it's
probably not something you want to use for your everyday networking
applications. It's good to question your assumptions every once in a
while, though, and see what you can get when you go at things from a
More information about the PLUG