Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • There's probably someone here who knows this better than me :-), but I don't think System V itself implemented threads. Commented Jan 1, 2019 at 14:35
  • If you search for Solaris threads, I think you should be able to find information about Solaris userspace's first attempt using M:N threads, and then giving up and switching to 1:1 threads. In M:N threads, the application sees M threads but the kernel is only providing N threads. The C library is multiplexing them, scheduling when each application thread gets to run on one of the N kernel threads. According to Wikipedia "Solaris" proper is based on System V, but it is also described as merging both lines because SunOS was based on BSD (and presumably influenced Solaris). Commented Jan 1, 2019 at 14:35
  • @sourcejedi With Solaris the answer also changed over time, as hardware changed. So early threading was "green" (userspace many-to-one). As you mention, Sun also looked at a many-to-many model, and then a one-to-one model. There's an old whitepaper which goes into detail - web.archive.org/web/20090327002504/http://www.sun.com/software/… Commented Jan 2, 2019 at 0:45
  • @Tim Your assumptions are wrong. A task_struct represents both processes and threads. Commented Jan 2, 2019 at 6:22
  • If you look at the history of threads in Linux, you'll see there have been multiple implementations in the past, for instance LinixThreads, which is a precursor of the current NPTL implementation. There were also other thread libraries available on Linux, many implementing them in userspace, some of which predate the clone syscall. Commented Jan 2, 2019 at 9:45