As for as I know,when process/Thread is in runqueue,then may have allocate some resource even they do not running right now,In order to keep the data consistent(can not be modified by other processes/threads) ,we should use spinlock to protect the data.
在2007-09-19,"Mansha Linux" <mansha.linux@xxxxxxxxx> :
Hi all,
Could you please explain me why do we need the spinlocks on uniprocessor machines?
Is this the only reason that the kernel is preemptive ?
--
regards,
Mansha
杀70万种木马病毒,瑞星2008版免费