On Sat, 09 Dec 2017 11:04:09 +0330, alireza sanaee said:
> I think if it works in that way, it doesn't make sense at all!!!! Parent
> and child ordering rules should preserve even on different cores!
Find where in kernel/sched.c there's specific code to guarantee that
if the child/parent is started on one core, the other isn't scheduled again
until after the first one runs, rather than run immediately because it's
able to run on an otherwise idle core, so you don't get a 'first' or
'last', but 'at the same time'.
And if they run concurrently, the printf output will have a race
condition. At that point, the order of output is probably determined
by something other than which one scheduled first (the I/O stack
or exit() processing being the primary suspects).
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies