what is mean by synchronization?
Answer Posted / p.nanda kishore
Synchronization is a process of accessing a shared resource in a multithreaded environment by one thread at a time.
Generally in Multithreaded applications all the threads start execution at a time(i.e doing multiple task at a time) . In this situation we need a piece of code to used by one thread at a time then we need to use Synchronization.
When a thread access a Synchronized code it establishes lock with that code and all the other threads will be there in waiting state. The Lock will be released once the thread as finished it task and other thread waiting will acquire the lock.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
what type of questions asked for barclays technologies pune please send urgent
What is an object in java?
Can we modify the throws clause of the superclass method while overriding it in the subclass?
Explain differences between collection api and stream api?
What do you understand by a Static Variable?
What is :: operator in java?
What is array list in java?
When super keyword is used?
Can we make a constructor final?
describe method overloading
What is Major and importance difference between for and foreach loop ?
Why is singleton class used?
Differences between external iteration and internal iteration?
Is there any difference between synchronized methods and synchronized statements?
What is the difference between yield() and sleep()?