RE: [GD-Windows] TryEnterCriticalSection
Brought to you by:
vexxed72
From: Brian S. <bs...@mi...> - 2002-01-07 18:36:12
|
Thought this might be interesting: http://www.cs.rochester.edu/u/michael/PODC96.html Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms Abstract Drawing ideas from previous authors, we present a new non-blocking concurrent queue algorithm and a new two-lock queue algorithm in which one enqueue and one dequeue can proceed concurrently. Both algorithms are simple, fast, and practical; we were surprised not to find them in the literature. Experiments on a 12-node SGI Challenge multiprocessor indicate that the new non-blocking queue consistently outperforms the best known alternatives; it is the clear algorithm of choice for machines that provide a universal atomic primitive (e.g. compare-and-swap or load-linked/store-conditional). The two-lock concurrent queue outperforms a single lock when several processes are competing simultaneously for access; it appears to be the algorithm of choice for busy queues on machines with non-universal atomic primitives (e.g. test-and-set). Since much of the motivation for non-blocking algorithms is rooted in their immunity to large, unpredictable delays in process execution, we report experimental results both for systems with dedicated processors and for systems with several processes multiprogrammed on each processor. --brian -----Original Message----- From: Brian Hook [mailto:bri...@py...]=20 Sent: Thursday, January 03, 2002 11:18 AM To: gam...@li... Subject: [GD-Windows] TryEnterCriticalSection It looks like TryEnterCriticalSection is only available on >=3D NT4 (and according to the docs, it's not available on Win9x at all). To get around this I'm thinking that I could switch to using a mutex and WaitForSingleObject with a timeout of 0 milliseconds, but mutexes are heavier weight than critical sections (I'm not sure how bad this is in practice though). Any opinions, comments or shared experiences with this? Brian _______________________________________________ Gamedevlists-windows mailing list Gam...@li... https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows |