lkml.org 
[lkml]   [1999]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: AMIGA will use Linux, but Linux has several "multimedia-deficiencies"
    Mike Harrelson wrote:

    > > > model or a more
    > > > complicated model using nonblocking I/O with select()/poll().
    > >
    > > Where poll()/select() is applicable it's very efficient, and in most of
    > > cases easy to use unless the concept is completely foreign to the
    > > programmer.
    >
    > Poll or select w/ nonblocking IO in server applications can get quite complex.
    > I've seen examples of identical servers written with process pools, thread
    > pools, and nonblocking IO(w/ select). The nonblocking versions were by far
    > the largest and most complex. But interestingly enough, they were also the
    > fastest!

    Eh? If you use select or poll directly your code can get a bit messy. However, if
    you build an event oriented library on top of select you can cook up simple elegant
    servers very quickly. I've been doing it for years.

    Threads mean lots of asynchronous behaviour. Asynchronous behaviour means major
    testing problems. The asynchronous behaviour in select based servers is much more
    limited, so their testability is much better. I can cook up simple servers based on
    my event library in a few hours, and they run reliably. A threaded application
    couldn't be tested well in that time.

    Of course, a select based application won't scale to multiple CPUs, but for a
    single CPU environment nothing beats it for simplicity, testability, or - as you
    point out - performance.

    Steve



    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:52    [W:2.348 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site