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
When is finally block not called?
What is local declaration?
What is an example of a boolean?
What is main string [] args?
If a variable is declared as private, where may the variable be accessed?
What is the definition of tree ?
How do you check if two strings are equal in java?
What is final keyword?
How an object is serialized in java?
How to display names of all components in a Container?
What does null mean in java?
Is null an object java?
How do you convert int to char in java?
Can we inherit a class with private constructor?
What does the exclamation mark mean in java?