Skip to contentSkip to conversation

scheduler parameter inheritance on clone()

DISCUSSION Christopher Friesen 1 participant 2 messages Nov 7, 2005

lore
Share & tools
lore
#0 lore raw

The pthreads standard specifies that the default behaviour is that new threads should be created with the SCHED_OTHER policy and a priority of 0.

However, it appears that the kernel will create new tasks (be they threads or processes) with the same settings as the parent.

If CLONE_THREAD is set, should the kernel perhaps set the policy and priority as specified by pthreads?

Chris

#1 lore raw

Re: scheduler parameter inheritance on clone() -- correction

Quoted 2 lines · Friesen, Christopher [CAR:VC21:EXCH] wrote:

The pthreads standard specifies that the default behaviour is that new threads should be created with the SCHED_OTHER policy and a priority of 0.

Sorry, I've since found out that this was actually an issue with the man pages (same problem on two different distros). The man pages were still from LinuxThreads, but the NPTL behaviour was different.

Apparently the spec doesn't actually specify the default behaviour, it's implementation dependent.

My mistake.

Chris