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 the difference between preparedstatement and statement in java?
Explain the protected field modifier?
What is time complexity algorithm?
What is the lifetime and scope of a variable?
Can private class be extended java?
What is assembly language?
Why static functions are used?
What is the main use of java?
What is a stringbuffer?
What is listnode in java?
Is arraylist a class in java?
What is the use of StringTokenizer class?
Can java cast null?
Why main method is static in java?
What is a flag and how does it work?