question on Thread synchronization

Answer Posted / dayanand pujer (from gokak)

Threads commonly share the same memory space area, that’s
why they can share the resources. Threads commonly
communicate by sharing access to fields and the objects
reference fields refer to. This communication type is
extremely efficient, but makes two kinds of problems: thread
interference and memory consistency errors. By the
synchronization tool we can avoid this problem. In other
words, There is very critical situation where we want only
one thread at a time has to access a shared resources. For
example, suppose two people each have a checkbook for a
single account same as like two different threads are
accessing the same account data.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the differences between abstract class and interface?

513


What are advantages of using Java?s layout managers than windowing systems?

1861


Explain about abstract classes in java?

588


Can a final variable be null?

547


What is basic syntax?

551






What is the use of flag?

583


What is internal variable?

540


what r advatages of websphere? & how to deploy?

1636


What is the size of int in 64-bit jvm?

552


Why unicode is important?

467


Is 0 a real number?

590


Can a java program have 2 main methods?

548


What is the difference between overriding & overloading?

566


What is the history of java?

547


What is method in research paper?

575