> > On Fri, Mar 18, 2005 at 09:16:29AM -0500, Gopu Bhaskar hit keys to > express the following: > > > > > > > There is nothing that prevents me from creating a user thread > > > > without using CLONE_VM. If i specify CLONE_VM to clone system > > > > call it only makes things faster. I strongly believe that user > > > > thread and kernel thread should be distinguished from each other. > > ^^^^^^^^^ Sorry I made a typo > > here, I meant "should not be" > At what level should this distinction (not) be made? Sorry for all the confusion all I wanted to write was that processes and so called user threads should not be distingushed from each other. > Kernel threads cannot access user space at all. They are just for > kernel tasks. > There is a marked and clear distinction between both of these. For > example, when > a kernel thread is created, kernel_thread() hand crafts a pt_regs > structure and > call do_fork(). They cannot be traced (CLONE_UNTRACED). > > > > The term user thread is implementation specific. Mostly clone > I agree with you here. But in linux, the kernel (to keep matters simple and > elegant) has taken a stance of being agnostic to differences > between threads and > processes. > > > > system call is used for creating threads. see man clone. You > > > > would find that you can create threads that share everything else > > > > but VM. > What do you mean? Threads do not share VM? This is what the clone man page says. If CLONE_VM is not set, the child process runs in a separate copy of the memory space of the calling process at the time of clone. Memory writes or file mappings/unmappings performed by one of the processes do not affect the other, as with fork > > -- > "The significant owl hoots in the night." > (Guards! Guards!) -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/