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 do you mean by a JVM?

556


Why bytecode is called bytecode?

578


What is generic class?

640


Which data type is class in java?

545


What do you mean by ternary operator in java?

552






What is scanner in java?

530


How do you compare arrays in java?

494


What are the methods of object class ?

557


How many tetrahedral voids are there in bcc?

537


what are Hostile Applets?

1597


Why does my function print none?

516


Is empty in java?

576


Is cout buffered?

680


Why arraylist is used in java?

539


Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).

2225