For example in a multi-threaded program, Global, volatile, extern variables, can come under critical section as they can be accessed by multiple threads at once.
Also shmget() allocates shared memory.
I’d like to know what all other memory types can be critical sections in both user space and kernel space.
For example in a multi-threaded program, Global, volatile, extern variables, can come under critical
Share
Checkout these links for a good understanding on shared memory regions and critical sections in action on real world systems.
bcook.cs.georgiasouthern.edu/cs523/critical.htm
blogs.msdn.com/b/larryosterman/archive/2005/08/24/455741.aspx
ibm.com/developerworks/linux/library/l-linux-synchronization/index.html