Reputation: 689
I am having a general doubt regarding synchronization ->
When we say mutual exclusion is satisfied between 2 processes, i mean it is property which is desirable. It is not a problem to be solved.
Similarly, deadlock, race condition are problems to be solved
So, synchronization is also a property which should be maintained, that is, "Is it something desirable" or "a problem which needs to be solved" ?
Upvotes: 1
Views: 71
Reputation: 96385
The desireable properties are
thread-safety, or preserving the integrity of some data structure from changes made concurrently that could corrupt the contents of that data structure, and
liveness, which is the ability of your threads to make progress.
Synchronization is a means to the end of preserving the integrity of shared data without impeding liveness. It is only one of a number of techniques which aim at preserving thread safety.
Synchronization can become a problem if you have a deadlock, or if a bottleneck develops (if too many threads need to acquire the same lock and most of them can't make progress), so that the program may be thread-safe but liveness becomes an issue.
Upvotes: 1