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: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Multiprocessor safety in the User ModeYou’ll doubtless get responses from people far better qualified than I to comment, but I think the main difference in overhead stems from the fact that critical sections need only coordinate threads within the same process, hence can be implemented purely in process-local context with the ‘interlocked’ instructions (possibly without even entering kernel mode).

  • bill
    ----- Original Message -----
    From: Chtchetkine, Vladimir
    To: File Systems Developers
    Sent: Tuesday, April 24, 2001 5:16 PM
    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@foo.mv.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