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
What happens if you install 64 bit on 32?
What are significance of semaphores?
What happens if we don’t override a run method?
What is hard disk?
What is load sharing in operating system (os)?
What are the types of files?
Is there a 86 bit operating system?
Explain condition variable.
How do you kill pid?
What does it mean to restore default settings?
Define max, min heap and search time of heap.
Explain the difference between demand-paging and pre-paging?
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?
How do I stop apps from running in the background?
Are 64bit applications faster?