*BSD News Article 92594


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.maxwell.syr.edu!news.apfel.de!fu-berlin.de!unlisys!blackbush.xlink.net!news.ppp.net!sep.hamburg.com!hmo
From: hmo@sep.hamburg.com (Helge Oldach)
Subject: Re: Sys V Streams Vs. BSD Sockets
Message-ID: <E7x8rM.4rE@sep.hamburg.com>
X-Disclaimer: Bei diesem News-Artikel handelt es sich um ein mit Bedacht und Sorgfalt formuliertes und liebevoll gesetztes Pamphlet. Ihn als "polemisch" zu bezeichnen, ist zweifelsohne =?iso-8859-1?Q?=FCrtrieben?=, nichtsdestotrotz ist er nicht immer g=?iso-8859-1?Q?=E4nzlich?= unernst gemeint.
Sender: hmo@sep.hamburg.com (Helge Oldach)
Organization: Somebody Else's Problem
References: <5h4rte$92a@news.interlog.com> <3337E127.7BEA@xnet.com> <87913ay08y.fsf@plm.xs4all.nl>
Date: Mon, 31 Mar 1997 18:59:45 GMT
Lines: 22
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38287

In <87913ay08y.fsf@plm.xs4all.nl> Peter Mutsaers <plm@xs4all.nl> writes:
| Streams is cleaner, it is a general message passing mechanism to
| implement drivers. But it is also much slower, amongst others because
| of extra copying.

Er, basically no. Streams does in fact avoid copying buffers as much as
possible, just like BSD sockets. The trick is to move pointers up and
down the module chain, and chopping or adding headers and trailers from
the pre-allocated space.

The reason why it's slower is indeed the more general approach of
pushing task-specific modules onto the stack, so you can design your
mission-specific protocol stack at run-time. One might consider this
overkill, given that most protocol functionality will remain unchanged
over time.

Helge
-- 
3 RX+ 2a --[100 Ohm]----+     ---------- /      ----------
4 TX+ 1a --[100 Ohm]--+ |    | 87654321 |      | 12345678 |
5 TX- 1b -------------+ |    |__      __|/     |/_      /_|
6 RX- 2b ---------------+       |____|            |/___|