3

Why does Linux Kernel Scheduler code have locks for run queues? Does the scheduler spawn kernel threads, and locks are to prevent two of such threads to avoid modifying run queues at the same time?

0

Each Processor has a run-queue, and might want to access other run-queues of other Processors. Locking is required to avoid corruption when a run-queue is manipulated by two or more Processors.

Reference: Linux Kernel Development by Robert Love ( Partially available at http://www.informit.com/articles/article.aspx?p=101760&seqNum=2 )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.