Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

There is some data related to temperatures of different cities. One side(thread), will be updating the values and multiple clients will be reading the values. how do you achieve synchronization?

Answer Posted / mskumar

My Answer was:-

Thread updating the data:- Should acquire the MUTEX lock and update the data & release the MUTEX.

While threads try to read the Data :- Should acquire the lock such that only read access allowed during the lock, not the write lock so that any no.of clients trying to read can read at the same time.

Can some give me thier thoughts if any?

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if you install 64 bit on 32?

953


What are significance of semaphores?

1166


What happens if we don’t override a run method?

1179


What is hard disk?

1007


What is load sharing in operating system (os)?

1259


What are the types of files?

997


Is there a 86 bit operating system?

1029


Explain condition variable.

1025


How do you kill pid?

942


What does it mean to restore default settings?

951


Define max, min heap and search time of heap.

1075


Explain the difference between demand-paging and pre-paging?

1109


What is the cause of thrashing? How does the system detect thrashing? Once it detects thrashing, what can the system do to eliminate this problem?

1440


How do I stop apps from running in the background?

953


Are 64bit applications faster?

935