[Top] [All Lists]

Re: mapping a userspace thread to a kernelspace thread

To: "Kevin D. Kissell" <>
Subject: Re: mapping a userspace thread to a kernelspace thread
From: "Suprasad Mutalik Desai" <>
Date: Fri, 28 Sep 2007 12:36:01 +0530
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=GxPE3qHyhZ65PiHNdoFqYotw2SXY9oHkSwPO/Hy8NOg=; b=Tc7o8QrqiGNZ+s4ZZtSsbV6/1IkHsIOxRfDHeg9hcgyw8IU3dL9/G1xWa//NiVgQtBm4od3ufRzuOF0fva/sBfjoSnpklpFu9Z1+WAyr84/onV0Pf10utdAE+s7KHdUCTPX9BVhA3n1QZLNMOa1nggttntuuh6OY6YENNYpSHlM=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P1FuZikI0fjYM1N5TNH0wNerHxOQcZgZNlxwm4tOH33eKnoFEZ1yOuuQ+MIKpvaMNy2cQpQsjurM8XDz/0Z2SwPYSOJrQ92GOBV0ktttNcr4H0qowuNMeiKZ2WdaHvjBKKRe2eHAytxmz8b6T4KfaBfh2aNfHLhDOiPUSeTmAc4=
In-reply-to: <002801c80196$003f4dd0$10eca8c0@grendel>
Original-recipient: rfc822;
References: <> <002801c80196$003f4dd0$10eca8c0@grendel>
Hi Kevin ,

            Thanks for the info .Now if i want to manage the
thread->CPU binding explicity in an SMTC environment where we see TC
(thread context) as a CPU . Then How can i make a kernel thread which
is inturn created in response to the pthread_create , monopolize a CPU
(TC) such that whenever i run a userspace program it should run on
that particular TC (CPU) . Can i use the same
sys_sched_setaffinity() system call  ? .

Thanks and Regards,

On 9/28/07, Kevin D. Kissell <> wrote:
> You seem to be laboring under a misconception or two, here.  NPTL is a 1:1 
> threading
> model (it would have been damned convenient for me for it not to have been).  
> Both
> linuxthreads and NPTL will create a native, known-to-the-kernel thread, which 
> is what
> I think you mean by a "kernel thread", in response to a pthread_create().  
> The new thread
> will start life on the same CPU that created it, but normal load balancing 
> will generally
> migrate it elsewhere pretty quickly.  If you want to manage thread->CPU 
> binding
> explicitly, the sys_sched_setaffinity() system call can be used.
>            Regards,
>            Kevin K.
> ----- Original Message -----
> From: "Suprasad Mutalik Desai" <>
> To: <>
> Sent: Friday, September 28, 2007 7:23 AM
> Subject: mapping a userspace thread to a kernelspace thread
> > Hi list ,
> >
> >             I want to know how can we map a userspace thread to a
> > kernel thread as mentioned in 1:1 threading model (linuxthreads) or
> > M:N model (NPTL)  . Does this happen by just calling a
> > pthread_create() in the userspace program or i need to do something
> > more in the kernel space . i am using 2.6.20 kernel  .
> >        I want to use this for multi threading operation in a SMP
> > environment where in i want to schedule a userspace program on another
> > processor by spawning a thread  . Can anyone help me in this.
> >
> > Thanks and regards,
> > Suprasad.
> >
> >

<Prev in Thread] Current Thread [Next in Thread>