Top "Critical-section" questions

Critical section refers to either a piece of code that will run concurrently in several threads accessing global data or resources (requiring synchronisation), or a user-level spinlock combined with a mutex object under the Windows operating system.

What is the difference between atomic and critical in OpenMP?

What is the difference between atomic and critical in OpenMP? I can do this #pragma omp atomic g_qCount++; but …

openmp atomic critical-section
How to use lock in OpenMP?

I have two pieces of C++ code running on 2 different cores. Both of them write to the same file. How …

c++ locking openmp critical-section
What is progress and bounded waiting in critical section?

I was reading Critical Section Problem from Operating System Concepts by Peter B. Galvin. According to it 1) Progress is : If …

operating-system synchronization critical-section data-synchronization thread-synchronization
Do I need to lock object when reading from it?

I am writing a program where there is an object shared by multiple threads: A) Multiple write threads write to …

multithreading mutex critical-section
Problems using EnterCriticalSection

I need to work with array from several threads, so I use CRITICAL SECTION to give it an exclusive access …

c++ winapi critical-section
Implementing a critical section in CUDA

I'm trying to implement a critical section in CUDA using atomic instructions, but I ran into some trouble. I have …

cuda synchronization locking critical-section
Is Critical Section always faster?

I was debugging a multi-threaded application and found the internal structure of CRITICAL_SECTION. I found data member LockSemaphore of …

c++ winapi synchronization critical-section
What are Critical sections in threads

I was reading about mutex,semaphores and critical sections. I understand that mutex synchronizes a resource so that only one …

c++ multithreading thread-safety critical-section
How to lock on object which shared by multiple async method in nodejs?

I have one object with different properties in nodejs, there are different async function which access and modify that object …

javascript node.js asynchronous locking critical-section
Win32 Read/Write Lock Using Only Critical Sections

I have to implement a read/write lock in C++ using the Win32 api as part of a project at …

c++ multithreading winapi critical-section