Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Q: I understand Pthread is a thread library meeting POSIX standard</p> </blockquote> <p>A: Yes. Actually, "Pthreads" stands for "Posix threads": <a href="http://en.wikipedia.org/wiki/Pthreads" rel="noreferrer">http://en.wikipedia.org/wiki/Pthreads</a></p> <blockquote> <p>Q: It is available in Unix-like OS.</p> </blockquote> <p>A: Actually, it's available for many different OSs ... including Windows, MacOS ... and, of course, Linux, BSD and Solaris.</p> <blockquote> <p>Q: About thread, I read that there are three different models</p> </blockquote> <p>Now you're getting fuzzy. "Threads" is a very generic term. There are many, many different models. And many, many different ways you can characterize and/or implement "threads". Including stuff like the Java threading model, or the Ada threading model.</p> <blockquote> <p>Q: When I call pthread_create() to create a thread, did I create a user level thread?</p> </blockquote> <p>A: Yes: Just about everything you do in user space is "protected" in your own, private "user space".</p> <blockquote> <p>Q: User level thread: the kernel does not know it.</p> </blockquote> <p>A: No. The kernel knows <em>everything</em> :)</p> <blockquote> <p>Q: Kernel level thread: kernel directly supports multiple threads of control in a process.</p> </blockquote> <p>A: Yes, there is such a thing as "kernel threads".</p> <p>And, as it happens, Linux makes EXTENSIVE use of kernel threads. For example, every single process in a Linux system is a "kernel thread". And every user-created pthread is ALSO implemented as a new "kernel thread". As are "worker threads" (which are completely invisible to any user-level process).</p> <p>But this is an advanced topic you do NOT need to understand in order to effectively use pthreads. Here's a great book that discussed this - and many other topics - in detail:</p> <p><a href="http://rads.stackoverflow.com/amzn/click/0672329468" rel="noreferrer">Linux Kernel Development, Robert Love</a></p> <p>Remember: "Pthreads" is an interface. How it's implemented depends on the platform. Linux uses kernel threads; Windows uses Win32 threads, etc.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload