There exists two types of critical sections in programs. I call them update critical sections and reduction critical sections.
Update Critical Sections
Update critical sections occur in the midst of the parallel kernels. They protect shared data which multiple threads try to read-modify-write during the kernel’s execution, instead of waiting till the end of the kernel’s execution. Their execution can be overlapped with the execution of non-critical-section code. The critical section protecting the maze data in the article on “Parallelizing Complex Programs” is a good example of an update critical section.
For simplicity, lets assume a kernel which has only one critical section. Each iteration of the loop spends one unit of time inside the critical section and three units of time outside the critical section. The following chart demonstrates the execution timeline of this critical section intensive application.

Read more: Future chips
QR: