delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/10/11/14:02:17

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <470E64AD.9050004@users.sourceforge.net>
Date: Thu, 11 Oct 2007 13:00:13 -0500
From: Matthew Woehlke <mw_triad AT users DOT sourceforge DOT net>
Reply-To: The Cygwin-Talk Malingering List <cygwin-talk AT cygwin DOT com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: interpretation of %CPU in 'procps' output for multi-cpu & hyperthreading
References: <200710111458 DOT l9BEwBoo022386 AT tigris DOT pounder DOT sol DOT net> <fele2v$d9n$1 AT sea DOT gmane DOT org> <200710111639 DOT l9BGdtRm022689 AT tigris DOT pounder DOT sol DOT net>
In-Reply-To: <200710111639.l9BGdtRm022689@tigris.pounder.sol.net>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Tom Rodman wrote:
> On Thu 10/11/07 10:05 CDT Matthew Woehlke wrote:
>> Tom Rodman wrote:
>>> Is there a way to prove that a given process with more than 1 thread,
>>> is still restricted to just one CPU?
>> Unless you have manually set affinity, why would this be true? More 
>> likely, only one thread is actually doing anything.
> 
> Thanks Matthew.
> 
> I meant to ask: 
> 
>   Is there a way to prove that a given process with more than 1
>   thread, must always have all it's threads on a single CPU at
>   any given time ( over the life of the process, I assume the all
>   it's threads could shift from CPU to CPU)?

Well... unless you have set affinity, I don't know of any reason why a 
multi-threaded application would have all of its threads end up on only 
a single CPU to begin with*. As for whether or not threads can migrate, 
I would assume they can, although I don't really know for sure. (On 
Linux, under constant load, they don't seem to. On Windows it seems like 
even single-threaded applications tend to be distributed across multiple 
cores.)

(* for the nitpickers: "unless of course you only /have/ one CPU".)

Anyway, this isn't really a Cygwin question any more, you would do 
better asking on a Windows forum. If you wish to discuss this further, 
it should probably be taken to cygwin-talk.

-- 
Matthew
If a signature
is not read by anyone,
does it make a sound?

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019