Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Darron Shaffer <darron.shaffer@beasys.com>
Subject: Re: Lots of Threads = Death?
Date: 1998/04/30	[thread overview]
Message-ID: <vza4szbz6b4.fsf@dalibm2.beasys.com> (raw)
In-Reply-To: 3547819c.27638403@149.174.211.108



heiby_u@falkor.chi.il.us (Ron Heiby) writes:

> 
> Dirk Grunwald wrote:
> > each stack entry requires one or more 'pmap' entries. A pmap is a
> > range of virtual -> physical mappings that share the same acccess
> > permissions.
> >
> > Threads tend to chew up a lot of map entries because each heap uses
> > two protection areas (one that is writable, and the guard page that is
> > not accessable).
> 
> This makes sense.
> 
> > I think that kernel parameter is called 'vm-mapentries'.
> 
> According to the manual, that is, indeed, the parameter involved in this.
> 
> My confusion is that my parameter is currently set at the default value of
> 200. Yet, I'm managing to create over 3700 threads before getting into
> trouble. I would think that each thread would require 2 of the 200
> vm-mapentries (at least) -- one for the stack and one for the guard. This
> would tend to say to me that I should have been able to create just under
> 100 threads. I hope that the source of my confusion is evident.
> 

How does that operating system allocate thread stacks?  Does it
support stack growth for threads?

Some Unices (Unixen?) use malloc/sbrk to acquire stacks for new
threads and no stack growth is allowed.  In this case, no mapentries
would be needed for these stacks.  In addition, thread termination
would not necessarily return memory to the kernel.

Almost any user space implementation of threads would have these
characteristics.  Many half kernel/half user implementations would as
well.

Darron Shaffer


-- 
 __  __  _          
 _ ) ___ _\ 		 			
 __) __    \  Enterprise Middleware Solutions	Darron J. Shaffer
              BEA Systems Inc.			Sr. Software Engineer
              17101 Preston Rd			darron.shaffer@beasys.com 
              LB# 115, Ste 260	 		Voice: (972) 738-6137     
              Dallas, TX 75248 			Fax:   (972) 738-6111     
	      http://www.beasys.com



  reply	other threads:[~1998-04-30  4:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-28  4:00 Lots of Threads = Death? Ron Heiby
1998-04-28  4:00 ` Dirk Grunwald
1998-04-29  4:00   ` Jeff Denham
1998-04-29  4:00     ` Charles M Richmond
1998-04-30  4:00     ` Ron Heiby
1998-04-30  4:00       ` Darron Shaffer [this message]
1998-05-01  4:00         ` Casper H.S. Dik - Network Security Engineer
1998-05-01  4:00       ` Jeff Denham
1998-05-05  4:00     ` Ron Heiby
1998-05-06  4:00       ` Rik van Riel
1998-05-06  4:00         ` Ron Heiby
1998-05-06  4:00           ` Rik van Riel
1998-05-07  4:00         ` Ron Heiby
1998-05-08  4:00       ` Lots of Threads = Digital Unix. Period Srikanth Throvagunta
1998-05-11  4:00         ` Ron Heiby
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox