Readers-Writers Problem

Q1. Explain the Readers-Writers Problem.

Ans. A database is to be shared among several concurrent processes. Some of these processes may want only to read the database, whereas others may want to update the database.

We distinguish between these two types of processes by referring to the former as reader and to the latter as writers.

If a writer and some other thread access the database simultaneously, chaos may ensue. To ensure that these difficulties do not arise, we require that the writers have exclusive access to the shared database. This synchronization problem is referred to as the readers-writers problem.

A solution to either program may result in starvation.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: