What is synchronization and why it is important?

With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value. This often leads to significant errors.

Bulkmailstack
 
Synchronization is the process of allowing threads to execute one after another.

Synchronization avoids memory consistence errors caused due to inconsistent view of shared memory. When a method is declared as synchronized; the thread holds the monitor for that method's object If another thread is executing the synchronized method, your thread is blocked until that thread releases the monitor.
 
With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one
thread to modify a shared object while another thread is in the process of using or updating that object's value. This often causes dirty data and leads to significant errors.

Deliver2inbox
 
In general (non technical) Synchronization refers to 2 different threads/devices being updated. It's much like information being shared across Cloud where it gets "Synchronized" on each and every user's data base.
 
Back
Top