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

Why use string handling in Java?

583


What is nextint java?

549


What are generic methods?

537


Explain about the interpreter in java?

625


How does hashset works in java?

535






How many JVMs can run on a single machine and what is the Just-In-Time(JIT) compiler?

582


What java ide should I use?

571


How can I become a good programmer?

492


What is charat java?

543


What is the default size of arraylist in java?

509


What is lazy programming?

569


What is meant by javabeans?

616


Is char * a string?

541


How do you find the maximum number from an array without comparing and sorting?

641


In java, how many ways you can take input from the console?

524