Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: <miki.miska@email.si>
Subject: Re: How to bind a POSIX thread to a specific CPU?
Date: Fri, 17 Jun 2005 18:50:35 +0200	[thread overview]
Message-ID: <MPG.1d1d1dc4e4c8dda7989694@news.siol.net> (raw)
In-Reply-To: d8rjb1$1ulv$1@ulysses.noc.ntua.gr

In article <d8rjb1$1ulv$1@ulysses.noc.ntua.gr>, 
iev@hpclab.ceid.upatras.gr says...
> 
> miki.miska@email.si wrote:
> 
> > Hm, I remember somthing like pthread_set_concurency()... see man page
> 
> Hello,
> 
> Thank you for answering, but it seems that pthread_setconcurrency() does 
> not do anything on Tru64 5.1. According to the man page it is there only 
> for Single UNIX Specification, Version 2 source code compatibility and 
> has no other effect when called.
> 
> Moreover, this function just gives a hint to the threads implementation 
> libary how many kernel-threads (if the implementation uses both kernel 
> and user-level threads) to have concurrently active. It does not specify 
> where each kernel-thread will run.
> 
> There must be another way.
> 
> Best regards,
> 
> Ioannis
> 
Hi !

Im not sure, if you can control with POSIX library, where each thread 
would go. As I remember, you always have at least two "thread" 
libraries, one which is standard POSIX, and maintain its own scheduler, 
and the native one, which actually depends on a System kernel 
implementation of multithreading. 
I suggest to get some document of Tru64 internals (implementation of a 
processes/thread).

pthread_set_concurency on a Solaris OS sets number of physical thread
active at any time.
Lets say you have 1000 threads, set_concurency set to 5, and 2 CPU's.
From the POSIX view, you have control only to 5 physical threads.
The same way as NFS daemons, or APACHE workers.
And those 5 would be scheduled to 2 CPU's from the kernel.

But when creating PTHREAD, you have one option (I don't remember which 
one), to create physical thread (kernel thread).

But you will probably not be able to send thread to specified CPU.

Im not much into TRU64 unix, but I believe that any multiprocessor 
machine has ability to form CPU groups, and dedicate processes to
them.

Hope it helps a little bit..


  reply	other threads:[~2005-06-17 16:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-15 18:05 How to bind a POSIX thread to a specific CPU? Ioannis E. Venetis
2005-06-16  8:45 ` miki.miska
2005-06-16 10:12   ` Ioannis E. Venetis
2005-06-17 16:50     ` miki.miska [this message]
2005-06-19 19:06 ` Loic Domaigne
2005-06-20 12:13   ` David Butenhof
2005-06-20 12:28     ` Dragan Cvetkovic
2005-06-20 12:38       ` loic-dev
2005-06-20 12:45         ` Dragan Cvetkovic
2005-06-20 16:25           ` loic-dev
2005-06-20 16:43             ` Dragan Cvetkovic
2005-06-20 13:40         ` David Butenhof
2005-06-20 13:26       ` David Butenhof
2005-06-21 13:01     ` Ioannis E. Venetis
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