L5process synchronizationa

Page 23

Readers-Writers Problem A data set ( or database) is shared among a number of concurrent processes  Readers – processes that only read the data set; they do not perform any updates  Writers – processes that can both read and write.  Readers-Writers Problem  allow multiple readers to read at the same time.  Only one single writer can access the shared data at the same time ( writers have exclusive access to the shared database).  Variations of the problem: 1. No readers should wait for other readers to finish simply because a writer is waiting 2. If a writer is waiting to access the object, no new readers may start reading.  In both cases, starvation may result. In the first case writers may starve In the second case readers Prof. Dr. Hanafy Ismail 6.23 may starve. Ref: Operating System Concepts with Java – 7 Edition, Nov 15, 2006 

th


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.