scheduler parameter inheritance on clone()
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
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_OTHERpolicy 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