Answered Questions

  • What is synchronization? Why is it used? What are its disadvantages?

    Manoj

    • Apr 10th, 2018

    Synchronisation is a mechanism to make sure that exactly one thread will execute block with fresh values from main memory i.e. it must execute two way memory barrier. When thread enter into sync block then it must invalidate all values from cache and read from Main memory and vica versa

    Shailesh Shinde

    • May 25th, 2017

    Synchronization makes sure that shared resources or data can be accessed by only one thread at a time while execution. its advantage is that it prevent data inconsistency and disadvantage is that it makes execution slower as it makes other thread wait till current thread completes execution.