* Current Thread mapping
@ 2012-01-15 9:32 SaNtosh kuLkarni
2012-01-15 9:56 ` rohan puri
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: SaNtosh kuLkarni @ 2012-01-15 9:32 UTC (permalink / raw)
To: kernelnewbies
HI everyone just wanted to know whats the current implementation of user||
kernel space thread mapping ...is it 1:1 or does it depend on the needs ?
For example say if i have 12k user space thread running ,,,how many kernel
space thread would be managing them... as far as i know there is 1:1 mappin
Thanks
--
*Regards,
Santi*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120115/2b1aa9f8/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Current Thread mapping
2012-01-15 9:32 Current Thread mapping SaNtosh kuLkarni
@ 2012-01-15 9:56 ` rohan puri
2012-01-15 10:32 ` Andi
2012-01-16 5:00 ` Mulyadi Santosa
2 siblings, 0 replies; 5+ messages in thread
From: rohan puri @ 2012-01-15 9:56 UTC (permalink / raw)
To: kernelnewbies
On Sun, Jan 15, 2012 at 3:02 PM, SaNtosh kuLkarni <
santosh.yesoptus@gmail.com> wrote:
> HI everyone just wanted to know whats the current implementation of user||
> kernel space thread mapping ...is it 1:1 or does it depend on the needs ?
> For example say if i have 12k user space thread running ,,,how many kernel
> space thread would be managing them... as far as i know there is 1:1 mappin
>
> Thanks
>
> --
> *Regards,
> Santi*
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
Hi,
It basically depends on the threading library's implementation, AFAIK, for
pthreads its 1:1 mapping.
- Rohan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120115/542b9bd3/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Current Thread mapping
2012-01-15 9:32 Current Thread mapping SaNtosh kuLkarni
2012-01-15 9:56 ` rohan puri
@ 2012-01-15 10:32 ` Andi
2012-01-15 13:37 ` SaNtosh kuLkarni
2012-01-16 5:00 ` Mulyadi Santosa
2 siblings, 1 reply; 5+ messages in thread
From: Andi @ 2012-01-15 10:32 UTC (permalink / raw)
To: kernelnewbies
Hi Santi,
I'm no sure that I've fully understood the question. What do you mean
about mapping?
If you mean kernel/user memory memory mapping, in the kernel there is
not a mapping of the memory user task in the kernel.
If with mapping you mean the relation between userspace task and
scheduling entries, then the relation is 1:1.
Remember that the kernel doesn't really know that there is a difference
between process and threads, it's why they are called tasks, threads,
process at the same way. The only difference is the way you create it in
userspace. As soon as you create it in your userspace process, the
kernel links it to a kernel structure called 'struct task_struct'
(linux/sched.h) which contains many descriptions on the thread/process
you have just created.
1 userpace thread:1 struct task_struct, this is what I mean with 1:1 mapping
Andi
On 01/15/2012 10:32 AM, SaNtosh kuLkarni wrote:
> HI everyone just wanted to know whats the current implementation of
> user|| kernel space thread mapping ...is it 1:1 or does it depend on
> the needs ? For example say if i have 12k user space thread running
> ,,,how many kernel space thread would be managing them... as far as i
> know there is 1:1 mappin
>
> Thanks
>
> --
> *Regards,
> Santi*
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120115/ab4d817d/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Current Thread mapping
2012-01-15 10:32 ` Andi
@ 2012-01-15 13:37 ` SaNtosh kuLkarni
0 siblings, 0 replies; 5+ messages in thread
From: SaNtosh kuLkarni @ 2012-01-15 13:37 UTC (permalink / raw)
To: kernelnewbies
Thanks Andi ,,Rohan,,,,for the quick reply
ya you are rite ..i was asking bout kernel side scheduling user space
threads and how they handle them....
On Sun, Jan 15, 2012 at 4:02 PM, Andi <andi.shyti@gmail.com> wrote:
> **
> Hi Santi,
>
> I'm no sure that I've fully understood the question. What do you mean
> about mapping?
> If you mean kernel/user memory memory mapping, in the kernel there is not
> a mapping of the memory user task in the kernel.
> If with mapping you mean the relation between userspace task and
> scheduling entries, then the relation is 1:1.
> Remember that the kernel doesn't really know that there is a difference
> between process and threads, it's why they are called tasks, threads,
> process at the same way. The only difference is the way you create it in
> userspace. As soon as you create it in your userspace process, the kernel
> links it to a kernel structure called 'struct task_struct' (linux/sched.h)
> which contains many descriptions on the thread/process you have just
> created.
> 1 userpace thread:1 struct task_struct, this is what I mean with 1:1
> mapping
>
> Andi
>
> On 01/15/2012 10:32 AM, SaNtosh kuLkarni wrote:
>
> HI everyone just wanted to know whats the current implementation of user||
> kernel space thread mapping ...is it 1:1 or does it depend on the needs ?
> For example say if i have 12k user space thread running ,,,how many kernel
> space thread would be managing them... as far as i know there is 1:1 mappin
>
> Thanks
>
> --
> *Regards,
> Santi*
>
>
> _______________________________________________
> Kernelnewbies mailing listKernelnewbies at kernelnewbies.orghttp://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
--
*Regards,
Santosh Kulkarni*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120115/d61a58c1/attachment.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Current Thread mapping
2012-01-15 9:32 Current Thread mapping SaNtosh kuLkarni
2012-01-15 9:56 ` rohan puri
2012-01-15 10:32 ` Andi
@ 2012-01-16 5:00 ` Mulyadi Santosa
2 siblings, 0 replies; 5+ messages in thread
From: Mulyadi Santosa @ 2012-01-16 5:00 UTC (permalink / raw)
To: kernelnewbies
Hi Santosh :)
On Sun, Jan 15, 2012 at 16:32, SaNtosh kuLkarni
<santosh.yesoptus@gmail.com> wrote:
> HI everyone just wanted to know whats the current?implementation?of user||
> kernel space thread mapping ...is it 1:1 or does it depend on the needs ?
> For example say if i have 12k user space thread running ,,,how many kernel
> space thread would be managing them... as far as i know there is 1:1 mappin
For NPTL based threading (Native Posix Threading Library), glibc and
linux kernel together maintain 1:1 mapping, that is one user mode
thread represented handled by one kernel mode thread.
Before NPTL, IIRC it's M:1, that is more than one user mode threads
are represented by one kernel mode thread. In user space, there's
somekind of "coordinator" or "master" that does cooperative switching
between threads. In NPTL, all threads are under the management of
Linux process scheduler directly.
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-16 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-15 9:32 Current Thread mapping SaNtosh kuLkarni
2012-01-15 9:56 ` rohan puri
2012-01-15 10:32 ` Andi
2012-01-15 13:37 ` SaNtosh kuLkarni
2012-01-16 5:00 ` Mulyadi Santosa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).