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 is a control variable example?
What do you mean by inner class in java?
What is int argc char * argv?
Write a code to create a trigger to call a stored procedure
Why super is first line in java?
Explain serialization and deserialization in java?
How to make a non daemon thread as daemon?
Is java ee a framework?
What is the implementation of destroy method in java. Is it native or java code?
When the constructor of a class is invoked?
Why java is considered dynamic?
How many ways can you break a singleton class in java?
What are the two main uses of volatile in Java?
Is a boolean 1 bit?
What happens if we override private method?