I’m playing around with linux scheduling with sched.h and bump into some questions.
From what I know, Linux scheduler do not treat threads and processes differently when scheduling. Threads are just like process which shares common resources.
Ok, Say I have Process-A and it is set to CPU core 0 and SCHED_FIFO property is set; which will runs until another higher priority tasks kicks in. If Process-A creates a new thread, will the thread inherit the same property? (i.e. be bind to CPU 0 with SCHED_FIFO properties or will it be DEFAULT?)
Thanks!
You can actually test this with a simple program, but from various man pages:
sched_setaffinity:
pthread_create:
sched_setscheduler: