Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2001 14:23:43 -0500
From:      Trent Nelson <tpnelson@switch.com>
To:        freebsd-hackers@FreeBSD.org
Subject:   Network I/O multiplexing questions.
Message-ID:  <20010117142343.A1144@dhcp103-172-16-3.switch.com>

next in thread | raw e-mail | index | archive | help
Hi,

 1. Is there any performance/efficiency gained when read and write
    operations on multiple sockets are grouped together? That is, after
    the I/O multiplexer function returns (i.e. select/poll/kevent), all
    read operations on sockets are done together (say, encapsulated by
    a thread, perhaps) and likewise for write operations.

    I'm looking into writing something that uses the reply from kevent()
    to construct independent lists of read/write/error operations
    pending on multiple sockets. Some sort of executable entity
    (event-thread, state-thread, pthread, etc) will be responsible for
    processing the pending events and I figured the best performance
    would be gained if each execution stream is solely responsible for
    *only* doing read/write operations. Pthreads probably aren't a good
    example of a scheduleable entity given their scheduling criteria
    isn't predictable.

 2. Does "The Design and Implementation of the 4.4BSD Operating System"
    deal with how send/recv operations take place from receiving the
    data from the network interface, traversing the protocol hierarchy
    and eventually passing into user space? Is the text's coverage of
    this outdated in any way?

 3. What conditions, if any, are used to deem whether a read or write
    to a socket will block? Is there any quick and efficient way of
    doing this in userspace? I'm assuming it has something to do with
    the hi/lo watermarks of a socket and its associated I/O buffer. 

    Can anyone point me to instances of kernel source code where a check
    is made to see if a socket will block?

 4. Currently, if a process blocks on network I/O, is it immediately
    switched out of execution by the scheduler? 

 5. Has anyone taken a look at the State-Threads API proposed by SGI?
    Has anyone considered adding support for our kevent/kqueue multi-
    plexing method in addition to the select/poll methods offered?

        (http://oss.sgi.com/projects/state-threads/)

    Thanks in advance.

    Regards,

        Trent.

-- 
Trent Nelson - Software Engineer - tpnelson@switch.com
    "A man with unlimited enthusiasm can achieve 
        almost anything." --unknown



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010117142343.A1144>