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 do you mean by platform independence? What is an interface?
Why do we use return statement?
What is a parameter used for?
how its run?
What do you mean by ordered and sorted in collections in java?
What is bufferedwriter?
What are the different types of sorting in java?
Are global variables initialized to zero?
What do you understand by soft reference?
What is a package in java? List down various advantages of packages.
Can we override constructor?
What is data movement?
What does the “static” keyword mean?
Why is multithreading important?
Can you start a thread twice in Java?