1

In Linux kernel 2.6.39.4, the sched_fork() will call the corresponding task_fork(), which is not implemented by sched_rt class. While in sched_fair class, task_fork_() will make sure the child runs first if sysctl_sched_child_runs_first is set. What about sched_rt? Does it mean the sysctl_sched_child_runs_first has no effect on the real time processes?

    if (sysctl_sched_child_runs_first && curr && entity_before(curr, se)) {
        // make sure the child runs first
        swap(curr->vruntime, se->vruntime);
        resched_task(rq->curr);
    }
刘卫东
  • 325
  • 1
  • 7
  • Possible duplicate of [Who executes first after fork(): parent or the child?](https://stackoverflow.com/q/8494732/608639) and [Can the order of execution of fork() be determined?](https://stackoverflow.com/q/6696959/608639) – jww Mar 25 '19 at 11:48

0 Answers0