On 1/31/06, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
Thanks a lot Fawad :-)
Got it now .
On 1/31/06, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
>
Spinlock is a busy-wait lock means that a task will spin at the
spinlock (keep processor busy) until it won't able to acquire it. So
on SMP machine one processor can spin on spinlock and the other one
can release the lock after doing stuff with-in lock and unlock ! Now
if the system is uniprocessor and no preemption is enabled tries to
acquire the lock (which is already acquired by some other process, but
the process must schedule itself after acquiring lock to make this
happen as uniprocessor system without preemption won't allow other
process to execute at the same time) then it will spin on the lock and
won't allow the CPU to give time to the other process which is
supposed to release the lock !
Thanks a lot Fawad :-)
Got it now .
--
play the game