Re: why spinlock raises IRQL to DISPATCH
- From: "Don Burn" <burn@xxxxxxxxxxxxxxxx>
- Date: Mon, 16 May 2005 08:42:29 -0400
Because a spinlock has other threads spin on the lock. If you do not
disable scheduling you can create a situation where most of your systems CPU
time is spent spinning on locks, and where a low priority thread has
acquired the lock then is starved by spinning to the point that it taks a
long time to release it.
Spin locks are spupposed to be low overhead locks for short periods of use.
Note: on a uniprocessor implementation the lock is never set, the
implementation is just raise to dispatch to disable scheduling.
--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Bajamani" <bajamani@xxxxxxxxxxx> wrote in message
news:1116246989.835297.82030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Why does spinlock implementation raise the irql to dispatch level? just
> acquiring the lock at passive level should prevent other threads from
> accessing the same lock.
>
.
- Follow-Ups:
- Re: why spinlock raises IRQL to DISPATCH
- From: Arkady Frenkel
- Re: why spinlock raises IRQL to DISPATCH
- References:
- why spinlock raises IRQL to DISPATCH
- From: Bajamani
- why spinlock raises IRQL to DISPATCH
- Prev by Date: why spinlock raises IRQL to DISPATCH
- Next by Date: Re: about ZwSetInformationToken
- Previous by thread: why spinlock raises IRQL to DISPATCH
- Next by thread: Re: why spinlock raises IRQL to DISPATCH
- Index(es):
Relevant Pages
|