Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- From: "Rohit" <rksindhu@xxxxxxxxx>
- Date: 25 Apr 2006 03:28:01 -0700
Hi All,
I have a typical problem regarding KeAquireSpinLock which is not
Blocking other Threads in Same CPU.
The Scenario is I've created 2 threads and in the first thread i call
KeAquireSpinLock to the same global KSPIN_LOCK variable, while its
locked by the first thread which is running the critical section, i
call the same lock in the second thread, and that also gets the lock
and starts running the critical section.
Ideally when first thread has got the lock second should wait, right?
In other words in a Single CPU Scenario a SpinLock should work like a
simple Mutex, right?? Or i'm mistaken, it doen't work at all in case of
Single CPU??
Or is it like, when one thread has got the Lock, means jumped to
Dispatch Level, other Threads will simply remain blocked??
Whatever be the Reason when Thread 1 has got the lock and thread 2 in
same CPU tries to get the same lock is not blocking untill the first
Thread releases it?? Am i doing something worng??
please Help me out, SpinLock is a new topic for me...
thanks and waiting for reply,
Rohit
.
- Follow-Ups:
- Prev by Date: Re: The problem:How to get current process full image path?
- Next by Date: Re: Network file write speed
- Previous by thread: The problem:How to get current process full image path?
- Next by thread: Re: Help me for a typical problem regarding KeAquireSpinLock which is not Locking other Thread in Same CPU
- Index(es):
Relevant Pages
|