Take the 2-minute tour ×

We do have the parallel programs which in turn has the critical section which runs sequentially. Basically the size of the critical section is small but do you think this small piece of code behaves differently from the rest of the code? for example: more cache misses or branch mispredictions which makes them more critical?

Some questions: 1)What kind of study will reveal inner details or characteristics of this CS part of the code?

2)What are the real time benchmarks which are having very coarse grained locking or bigger CS?

3)The scientific benchmarks like PARSEC and SPLASH are optimized very well but there should be lot of applications which are parallelized for performance but not really optimized. Do you know any such applications?

I hope the purpose of discussion is clear. If not, please let me know for further clarification.

share|improve this question
Critical sections are used to protect shared data from concurrent access to it by serialising the access, i.e. criticality does not stem from possible cache misses and/or branch mispredictions. (btw, questions mentioning "discussion" are closed pretty fast here) –  Hristo Iliev Jul 30 '12 at 15:49
what kind of characteristics do you expect a CS to have other than Mutual exclusion, deadlock freedom and starvation freedom? –  arunmoezhi Jul 31 '12 at 8:10
There can be some problem with the data cache in terms of temporal or spatial locality as critical section is not visited soo often. There can be additional traffic in the bus due to the locking mechanism which may hinder the traffic. Moreover, people are proposing migration of critical section to different core but no one has classified what kind of core should that be. These things make me think that there can be some significant difference between the parallel and sequential code section. –  Surya Narayanan Jul 31 '12 at 12:22
There are different locking algorithms for various needs. You might want to look at TestAndSet lock, TestTestAndSet lock, exponential backoff lock, ALock, etc. –  arunmoezhi Jul 31 '12 at 15:28
add comment


Your Answer



Browse other questions tagged or ask your own question.