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


Please Help Members By Posting Answers For Below Questions

When is finally block not called?

580


What is local declaration?

489


What is an example of a boolean?

567


What is main string [] args?

520


If a variable is declared as private, where may the variable be accessed?

546






What is the definition of tree ?

585


How do you check if two strings are equal in java?

577


What is final keyword?

639


How an object is serialized in java?

524


How to display names of all components in a Container?

2488


What does null mean in java?

624


Is null an object java?

534


How do you convert int to char in java?

571


Can we inherit a class with private constructor?

564


What does the exclamation mark mean in java?

586