Skip to main content
7 events
when toggle format what by license comment
Oct 14, 2011 at 21:37 vote accept Dark Templar
Sep 18, 2011 at 1:03 comment added David Schwartz By 1-to-1 I mean that every time you call 'pthread_create', a new context is created that is scheduled by the kernel. In a hybrid approach, the number of contexts scheduled by the kernel is less than the number of threads created -- the kernel schedules one of those contexts, and then threading library schedules one of the threads created by the application.
Sep 17, 2011 at 23:18 comment added Dark Templar "or a hybrid approach (where the kernel schedules a kernel-level thread which then, in user-space, schedules a user-level thread)." Hey David,could you explain this again? I'm not sure what is going on... When you say 1-to-1 mapping are you referring to Thread Control Blocks when mentioning kernel-level theads?
Sep 14, 2011 at 10:02 comment added David Schwartz On all modern (2.6 kernel or later) Linux systems that I know of, the system's default threading implementation is 1-to-1, each user-level thread has a corresponding KSE (kernel scheduling entity -- basically, a thread scheduled by the Linux kernel). The thread you create with 'pthread_create' will be scheduled directly by the kernel. Modern systems generally use NPTL, older systems used LinuxThreads -- they're both 1-to-1.
Sep 14, 2011 at 9:57 comment added yati sagade what is the implementation like on Linux?
Sep 14, 2011 at 9:53 history edited David Schwartz CC BY-SA 3.0
added 1 characters in body
Sep 13, 2011 at 17:12 history answered David Schwartz CC BY-SA 3.0