Date: Fri, 6 Feb 2004 18:11:57 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Julian Elischer <julian@elischer.org> Cc: perky@freebsd.org Subject: Python and system vs process scope threads (was Re: python ports broken (sem_destroy: Resource temporarily) Message-ID: <Pine.GSO.4.10.10402061803580.18636-100000@pcnet5.pcnet.com> In-Reply-To: <Pine.BSF.4.21.0402061458450.24800-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
A brief synopsis: The python port uses system scope threads, or at least the test_threaded_import.py test in /usr/local/lib/python2.3/test does. Is there a reason python uses system scope threads instead of process scope threads? It is more efficient and consumes less resources in FreeBSD if it were to use scope process threads. You can use either system or process scope threads, or even have a mix of them in FreeBSD, but I wonder if python just defaults to system scope threads because that is what Linux and now Solaris threads default to. On Fri, 6 Feb 2004, Julian Elischer wrote: > > On Fri, 6 Feb 2004, Daniel Eischen wrote: > > > > > > Why? > > > > System scope threads each have their own KSEG/KSE pair. > > The default thread limits in the kernel are: > > > > kern.threads.max_threads_per_proc: 150 > > kern.threads.max_groups_per_proc: 50 > > > > By default there are 2 KSEGs for a threaded process in > > libpthread: one for scope process threads and one for > > the signal handling thread. That leaves 48 for left for > > application use. > > > > Those limits are arbitrary, so you can raise/lower them > > if you don't like them. I thought you came up with those > > limits ;-) > > > I know all that :-) > > Why do they make system scope threads? > :-) > couldn't part of a freebsd port patch be to make them process scoe > threads.. it'd be more efficient.. > > > > > -- > > Dan Eischen > > > > > -- "Some folks are into open source, but me, I'm into open bar." -- Spencer F. Katt
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10402061803580.18636-100000>