mutable-shared data – source of all concurrency hazard

Consistency, liveness, deadlock, mutex, synchronization … and all the concurrency complexities have a necessary conditions — mutable shared data. Without this single condition, all these headaches disappear or become unnecessary.

If all mutable data are non-shared and all shared data are immutable, then you can create a great many threads and they will run faster than under synchronization

Note “data” doesn’t imply classes. In java/c#, such data is an instance of a class or struct. In non-OO languages like C, “data” can be global variable or any heapy thingy, manipulated by a pointer.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s