lkml.org 
[lkml]   [1997]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Threads question
On Fri, 25 Apr 1997, David S. Miller wrote:

> Still, though, there are legitimate applications wherein having
> multiple thousands of threads necessary. The most active IRC
> server on the net, from what I understand, is a FreeBSD Pentium
> which can accept ~1500 (this is from memory) connections.
>
> Why do you need 1500 threads to service 1500 connections? The answer
> is you don't
(...)
> Perhaps 30 threads or so to get some extra parallelism in there, but
> really not much more before you start hanging yourself.

Sure, it's not an optimal solution, but it's an _easy_ solution. The
thread model of programming makes it much easier, conceptually, to write
your server. You write a generic deal-with-client function, generate one
thread per client, and let the thread library worry about multiplexing
your i/o, etc.

It seems to me that threads can be and are used as a tool to ease program
complexity through these sorts of methods. Maybe I'm not expressing it
well, but I still think there's a case to be made. Then again, maybe I
never took CS 101. 8^)

__
Todd Graham Lewis MindSpring Enterprises tlewis@mindspring.com


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