From owner-freebsd-threads@FreeBSD.ORG Mon Mar 29 21:35:08 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6462316A4CE for ; Mon, 29 Mar 2004 21:35:08 -0800 (PST) Received: from mail1.mail.iol.ie (mail1.mail.iol.ie [193.120.142.151]) by mx1.FreeBSD.org (Postfix) with ESMTP id D61B143D41 for ; Mon, 29 Mar 2004 21:35:05 -0800 (PST) (envelope-from s_sourceforge@nedprod.com) Received: from dialup379.ts524.cwt.esat.net ([194.165.175.123] helo=kate) by mail1.mail.iol.ie with esmtp (Exim 3.36 #9) id 1B8Btv-00020t-00 for freebsd-threads@freebsd.org; Tue, 30 Mar 2004 06:35:04 +0100 From: "Niall Douglas" To: freebsd-threads@freebsd.org Date: Tue, 30 Mar 2004 06:26:12 +0100 MIME-Version: 1.0 Message-ID: <40691304.15123.69C3765@localhost> Priority: normal In-reply-to: References: <4068DA49.24401.5BE9BE4@localhost> X-PM-Encryptor: IDWPGP-PM32, 4 X-mailer: Pegasus Mail for Windows (v4.12a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Subject: Re: GDB 6.0 and FreeBSD threads X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 05:35:08 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 29 Mar 2004 at 22:38, Daniel Eischen wrote: > > > Why not just run all threads SCOPE_PROCESS? Then the system will > > > do that for you. > > > > The pthreads implementations I've seen won't utilise more than one > > processor unless it's SCOPE_SYSTEM. The obviates the reason most > > people use threads, hence the success of the 1:1 model which is a > > very blunt axe. > > That's untrue for libpthread. It creates automatically creates one > KSE for each CPU. You can increase the number of CPUs by setting > sysctls kern.threads.debug=1 and raising kern.threads.virtual_cpu. It > also respects pthread_setconcurrency, but you're limited to > kern.threads.virtual_cpu. Yes, all process scope threads run in these > KSES. My apologies if this is a question already answered many times previously - what's then the difference between specifying SCOPE_SYSTEM and SCOPE_PROCESS on libpthread? Is it basically whether the thread competes with all threads or just with threads within its process for that process' time slice? Cheers, Niall -----BEGIN PGP SIGNATURE----- Version: idw's PGP-Frontend 4.9.6.1 / 9-2003 + PGP 8.0.2 iQA/AwUBQGkE9MEcvDLFGKbPEQJZawCfRWCdhRQsGw9w68NA1UvhmjEQPm8AoOG+ JCTA4487OHDzXKt792tbC6q5 =cabR -----END PGP SIGNATURE-----