From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Mon, 16 Jan 2012 12:00:16 +0700 Subject: Current Thread mapping In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi Santosh :) On Sun, Jan 15, 2012 at 16:32, 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 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