dimanche 28 juin 2015

The use of need_resched flag and schedule() routine within Linux kernel [2.4]

As per my understanding when the kernel finds out that the current running process should be striped of the CPU, it enables the need_resched flag. The flag is checked before returning to user space, and if the flag enabled the kernel initiates call for schedule(). However I have noticed that within sys_sched_yield() routine we don't use the need_resched flag but explicitly call the schedule() routine. Why?

Aucun commentaire:

Enregistrer un commentaire