Re: [algogeeks] Re: posix threads
@anshu:thats means you say that pthreads are either kernel -level or hybrid in nature @lalit:mapping dependsfor user-level kernel isn't aware of threads,m-m is for kernel-level ,m-n for hybrid kinda does anbody knows whether pthreads are user-level or hybrid? On 5/30/11, anshu mishra wrote: > PS dont forget to bind ith thread with ith processor > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: posix threads
PS dont forget to bind ith thread with ith processor -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
Re: [algogeeks] Re: posix threads
write these three lines in ur function, it will bind that particular thread to (id)th processor wher void func(int id) { unsigned long mask; mask = 1
[algogeeks] Re: posix threads
In Linux, there is no difference between threads and process. It is like, a thread is merely a process that shares certain resources with other processes. Each thread has its own process descriptor and appears to kernel as a normal process - threads just happen to share resources, such as an address space, etc The approach is different in other OS such as Microsoft Windows or Sun Solaris, which have explicit kernel support for threads. To these threads are an abstraction to provide a lighter, quicker execution unit than the heavy process. Suppose you have a process with four threads. In Windows you will have one process descriptor that points to all its threads. In Linux you would have four process descriptors with some sharing between them. Source: 'Linux Kernel Development' by 'Robert Love' On May 28, 12:05 am, jagannath wrote: > hi guys, > i know that pthread is an user-level thread and an user-level > can't take the advantage of SMP. Then what is the point of creating > user-level threads if they can't be scheduled on multiple cores?Please > clear my doubt which has been hitting me for long... -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.