Dan, he asked about the basic principles and you answered with a
tremendous amount of implementation detail, some of which seems a little
suspect to me, and I’ve read the source. I asked the guy who wrote the
code to point me at the academic articles that were the source of his
inspiration. He gave me this.
http://portal.acm.org/citation.cfm?id=103729&coll=ACM&dl=ACM&CFID=332427
4&CFTOKEN=45136296
Happy reading, everybody.
Jake Oshins
Windows Kernel Group
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
Subject: Re: How do QueuedSpinLocks work???
From: “Dan Partelly”
Date: Tue, 9 Jul 2002 13:54:52 +0300
X-Message-Number: 15
Starting with Windows 2000, MS engineeres added a new advanced mechanism
for
spin locks management , primarely used
to manage global OS spin locks. The kernel allocates and intializes
the
global locks into an array. Here you can find spin locks which are
responsable for serializing access to critical OS data structures.
KeAcquireQueuedSpinLock take as parameter an index into the system
queued
locks array. The OS will index based on this into the system maintined
queued spin lock array, acquiring the desired one. The actual spin lock
implementation is that of a normal lock on uniprocessor kernel, but
quite
different on SMP, allowing a queue of “processors waiting for lock”.
This
gurantees that the spin lock will be acquired on a first come - first
served
basis.Nothing of interes here, UNLESS you are after some black magic,
for
example parsing the Pfn array manually for whatever dirty purpose, and
you
wish (you have to) to synchronize access with core OS components to some
data structures. if you need to know implementation details I can tell
you
more.
KeAcquireInStackQueuedSpinLock simply expose this new mechanism to the
device driver writter , for CUSTOM spin locks,
not for access to the system spinlock queue. It was introduced only
starting with Windows XP and is documented in DKK.
Device drive writters are encouraged to switch to this new mechanism.
Dan
----- Original Message -----
From: “Konstantin Manurin”
To: “NT Developers Interest List”
Sent: Tuesday, July 09, 2002 1:21 PM
Subject: [ntdev] How do QueuedSpinLocks work???
> Hi everybody.
>
> In Windows XP InStackQueued and Queued SpinLocks were introduced. So
my
> question is: what the basic working principles and gains of these new
> spinlocks??? By the way I saw these spinlocks in Windows 2K SP2
HAL.DLL
> module. It’s a great pity but Windows XP DDK doesn’t say anything
specific
> about this new stuff.
>
> Many thanks in advance, any info will be highly appreciated.
>
>
> Konstantin Manurin
> Programmer
> Nival Interactive
> mailto:xxxxx@nival.com
>
> 10a bld. 5, 1st Volokolamsky proezd
> Moscow 123060 Russia
> Tel: +7 (095) 363-9630
> Fax: +7 (095) 363-9631
> http://www.nival.com
> http://www.etherlords.com
> http://www.evil-islands.com
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>
Jake, thank you for the link.
> some of which seems a little suspect to me
Just out of curiosity, which ones ?
Regards , Dan
----- Original Message -----
From: “Jake Oshins”
To: “NT Developers Interest List”
Sent: Thursday, July 11, 2002 4:22 AM
Subject: [ntdev] RE: How do QueuedSpinLocks work??? - an academic reference
Dan, he asked about the basic principles and you answered with a
tremendous amount of implementation detail, some of which seems a little
suspect to me, and I’ve read the source. I asked the guy who wrote the
code to point me at the academic articles that were the source of his
inspiration. He gave me this.
http://portal.acm.org/citation.cfm?id=103729&coll=ACM&dl=ACM&CFID=332427
4&CFTOKEN=45136296
Happy reading, everybody.
Jake Oshins
Windows Kernel Group
This posting is provided “AS IS” with no warranties, and confers no
rights.
-----Original Message-----
Subject: Re: How do QueuedSpinLocks work???
From: “Dan Partelly”
Date: Tue, 9 Jul 2002 13:54:52 +0300
X-Message-Number: 15
Starting with Windows 2000, MS engineeres added a new advanced mechanism
for
spin locks management , primarely used
to manage global OS spin locks. The kernel allocates and intializes
the
global locks into an array. Here you can find spin locks which are
responsable for serializing access to critical OS data structures.
KeAcquireQueuedSpinLock take as parameter an index into the system
queued
locks array. The OS will index based on this into the system maintined
queued spin lock array, acquiring the desired one. The actual spin lock
implementation is that of a normal lock on uniprocessor kernel, but
quite
different on SMP, allowing a queue of “processors waiting for lock”.
This
gurantees that the spin lock will be acquired on a first come - first
served
basis.Nothing of interes here, UNLESS you are after some black magic,
for
example parsing the Pfn array manually for whatever dirty purpose, and
you
wish (you have to) to synchronize access with core OS components to some
data structures. if you need to know implementation details I can tell
you
more.
KeAcquireInStackQueuedSpinLock simply expose this new mechanism to the
device driver writter , for CUSTOM spin locks,
not for access to the system spinlock queue. It was introduced only
starting with Windows XP and is documented in DKK.
Device drive writters are encouraged to switch to this new mechanism.
Dan
----- Original Message -----
From: “Konstantin Manurin”
To: “NT Developers Interest List”
Sent: Tuesday, July 09, 2002 1:21 PM
Subject: [ntdev] How do QueuedSpinLocks work???
> Hi everybody.
>
> In Windows XP InStackQueued and Queued SpinLocks were introduced. So
my
> question is: what the basic working principles and gains of these new
> spinlocks??? By the way I saw these spinlocks in Windows 2K SP2
HAL.DLL
> module. It’s a great pity but Windows XP DDK doesn’t say anything
specific
> about this new stuff.
>
> Many thanks in advance, any info will be highly appreciated.
>
>
> Konstantin Manurin
> Programmer
> Nival Interactive
> mailto:xxxxx@nival.com
>
> 10a bld. 5, 1st Volokolamsky proezd
> Moscow 123060 Russia
> Tel: +7 (095) 363-9630
> Fax: +7 (095) 363-9631
> http://www.nival.com
> http://www.etherlords.com
> http://www.evil-islands.com
>
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to %%email.unsub%%
>
—
You are currently subscribed to ntdev as: xxxxx@rdsor.ro
To unsubscribe send a blank email to %%email.unsub%%