Hi, > >> How does scheduling of multiple threads in a thread group happen? I >> remember reading that each process has a single mm_struct. I assumed >> that all threads would share the same mm_struct and that scheduling >> will be based on these mm_structs. > > nope, scheduling is generally based on priority and sleep time. In > 2.4, there is a consideration to pick thread of the same thread group > over normal process but AFAIK in 2.6 CFS scheduler, it is no longer > taken as consideration. > > However, to prevent inverted priority and to provide fast scheduling > between threads in same group, IIRC there is formula in CFS so that > in certain way, these threads get higher "score", assuming their > dynamic priority is the same. Also, IIRC, the timeslice of a user proces is split up into its threads (processes in the same thread group from kernel perscpective) so that a process cannot bring the system down by creating infinite threads. Thanks, Rajat -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ