>> “Note that this pattern only makes sense for SMP machines.”
That’s precisely why I asked this question! So, finally, is it safe to use
critical sections as my data access serialization objects if I know for sure
that the product I’m working on will be running on multi-CPU machines?
Regards,
Vladimir
-----Original Message-----
From: Rob Fuller [mailto:xxxxx@NSISW.COM]
Sent: Tuesday, April 24, 2001 3:57 PM
To: File Systems Developers
Subject: [ntfsd] RE: off topic: Multiprocessor safety in the User Mode
Win32’s critical sections implement a pattern known as an adaptive mutex.
What this means is that a thread spins waiting for the critical section for
a certain number of cycles before making a system call to be put to sleep.
If the owning thread releases the critical section before the spinning
thread goes to sleep, then the cost of transitioning to privileged mode and
context switching to run another thread is avoided. Note that this pattern
only makes sense for SMP machines.
-----Original Message-----
From: Chtchetkine, Vladimir [mailto:xxxxx@Starbase.com]
Sent: Tuesday, April 24, 2001 4:16 PM
To: File Systems Developers
Subject: [ntfsd] Multiprocessor safety in the User Mode
Hi!
Can anybody confirm or deny that Win32’s critical sections
(EnterCriticalSection/LeaveCriticalSection) are safe in both, multithreaded
and multiprocessor environment? What bothers me is that doc claims that
critical sections are faster than mutexes (spinlocks are N/A in the user
mode, right?). So, since mutexes are “minimal” lockers how can something
been faster and safe at the same time? Or am I too suspicious?
TIA,
Vladimir
You are currently subscribed to ntfsd as: xxxxx@nsisw.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: xxxxx@Starbase.com
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com