Topic: Ipc Reader-Writer Problem
Topic: Ipc Reader-Writer Problem
Topic: Ipc Reader-Writer Problem
Submitted by
Guided by
Abhijeet Pawar(04) Prof. A W. Sawarkar
What is Inter-Process Communication?
shared memory.
This shared memory section is used by
Function Semaphore allow multiple program threads to access a Mutex allow multiple program thread to access a single
finite instance of resources. resource but not simultaneously.
Ownership Semaphore value can be changed by any process acquiring Mutex object lock is released only by the process that has
or releasing the resource. acquired the lock on it.
Categorize Semaphore can be categorized into counting semaphore Mutex is not categorized further.
and binary semaphore.
Reader and Writer
The readers-writers problem relates to an object such as a file that is
shared between multiple processes. Some of these processes are readers
i.e. they only want to read the data from the object and some of the
processes are writers i.e. they want to write into the object.
The readers-writers problem is used to manage synchronization so
that there are no problems with the object data. For example - If two
readers access the object at the same time there is no problem. However if
two writers or a reader and writer access the object at the same time, there
may be problems.