win32 critical sections vs mutexes

Volpe, Christopher R (CRD) volpecr at crd.ge.com
Fri Mar 17 17:30:09 EST 2000


Folks-
  In Win32, thread synchronization can be done with either "mutexes" or "critical section" objects
(among other things, less relevant here). Mutexes are very expensive (600 clock cycle minimum access
time) but have the advantage that a given mutex can be accessed by the threads of different
processes. A "critical section" object is much lighter weight but can only be used by the threads
within a single process.
  The vtkMutexLock object uses Win32 mutexes. I'm wondering if anybody is relying on the
inter-process (as opposed to merely inTRA-process-inter-thread) capabilities here. If not, I'd like
to change the implementation of vtkMutexLock here for performance reasons. If vtkMutexLock must
remain as-is for whatever reason, I'd be happy to write a vtkWin32CriticalSection object, but I'd
also like to modify vtkTimeStamp to use this (on Win32 only, of course) for synchronizing access to
the mtime counter.

Comments, anyone?

BTW, is the vtkdevelop list defunct?)

Chris

________________________________________
Christopher R. Volpe
Computer Scientist
Computer Graphics & Systems Program
GE Corporate Research & Development
Bldg KW, Room C215
P.O. Box 8, Schenectady, NY 12301

(518) 387-7766, Dial Comm: 8*833-7766, Fax: (518) 387-6981
e-mail: volpecr at crd.ge.com    web: http://www.crd.ge.com/~volpecr


--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list