[Gllug] Max number of pthreads in Linux ?

Richard Jones rich at annexia.org
Sat Mar 29 22:58:33 UTC 2008


On Sat, Mar 29, 2008 at 01:32:34PM +0000, Progga wrote:
> On Sat, Mar 29, 2008 at 12:44:08PM +0000, Nix wrote:
> > 
> > Threads strike me as one of those ideas that's really great where
> > necessary (e.g. when sharing is unavoidable, e.g. in kernel space) and
> > otherwise really silly.
> 
> But don't they save memory space even on Unices?

How so?  With the important memory being whatever can be cached in L1
and L2, and that being the code and data which is accessed, I can't
see how threads save memory.

<rant>

It seems clear (to me) that the issues confronting programmers in the
future will be (a) how to write code that isn't so godawful bad and
(b) how to utilise 10s or 100s of individually rather slow cores where
memory will look very NUMA.

Issue (a) will no doubt come to a head once programmers who sell their
software are held properly liable for the losses and damage it causes
to others, rather like mature engineering professions such as, say,
bridge or building engineers are today.  Programmers who deal with
*any* software which interacts with safety, transport, money,
engineering, etc. should be licensed and need to be using the best
possible languages and safe programming techniques.

Issue (b) is a natural progression when clock speeds aren't increasing
very much but transistor budgets are still growing according to
Moore's law -- you get a chip with 80 cores [1] but each core has its
own private memory.  It is impossible to build thread-friendly (ie
SMP) architectures when the number of cores grows beyond 8 or 16.
I've got a 4 core (single socket) processor in my desktop right now,
and > 16 cores in each socket is only 2 to 4 years away.

Rich.

[1] http://www.intel.com/pressroom/archive/releases/20070204comp.htm

-- 
Richard Jones
Red Hat
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list