Read a paragraph in this book:
In kernel 2.6, the calculation of the time slice is decentralized, the specific calculation time can be Task_timeslice (), or other methods can be used.
A. When a process is created, halve the time slice of the parent process to the child process, while the time slice of the parent process is halved.
B. After the process runs out of time slices, the time slice needs to be recalculated and the process inserted into the appropriate run queue.
C. When a process exits, it determines whether to return the child process's time slice to the parent process, based on the value of the First_timeslice.
Question: For a, the child process's time slice is divided from the parent process, that is, the parent process also has time to complete the task of the child process, then simply do not need to create a subprocess. The child process is divided into the time slice of the parent process, so how to create a process can increase the parallelism of the machine.
For B, does this "recalculate time slice" get rid of the limitation of the time slice that the child process has from the parent process, and whether the time slice of the parent-child process still has some kind of relationship.
For multi-core machines, what is the time slice division of the subprocess and the parent process? How to coordinate the length of time slices between multi-core.
I hope Daniel can give some hints ...