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

Differentiate between pre-emptive and non-pre-emptive scheduling.

662


How long does chkdsk f'r take?

584


What do you know about system model?

627


What are the 5 stages of chkdsk?

512


What is buffered ram?

631






How do you change File Access Permissions?

624


What first program that the computer runs when the power is turn on?

574


What is the difference between mailbox and queue?

546


why is the context switch overhead of a user-level threading as compared to the overhead for processes? Explain.

592


What are the 3 types of software?

555


What do you know about a pipe? When is it used?

503


Explain some memory components.

598


While running DOS on a PC, which command would be used to duplicate the entire diskette?

4150


Describe Operating system?

606


Explain the dual channel architecture?

556