Re: spinlock on uniprocessor systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 1/31/06, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
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

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux