Lec30-Classical Synchronization Problems-RW

Lec30-Classical Synchronization Problems-RW - National...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Operating System Operating System Spring 09 Spring 09 National University National University Lec25-Classical Synchronization Problems Lec25-Classical Synchronization Problems Prepared by Prepared by Uzma Maroof Uzma Maroof uzma.maroof@nu.edu.pk uzma.maroof@nu.edu.pk
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 Readers/Writers Readers/Writers Shared database (for example, bank balances, or airline seats) Two classes of users: Readers never modify database Writers read and modify database Using a single lock on the database would be overly restrictive. Want: many readers at a time only one writer at a time
Background image of page 2
Readers/Writers Readers/Writers Constraints 1. Readers can access database when no writers (Condition okToRead ) 2. Writers can access database when no readers or writers (Condition okToWrite ) 3. Only one thread manipulates state variables at a time. The naïve approach is to allow only one thread
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/23/2011 for the course COE 10001 taught by Professor Abad during the Spring '09 term at Alfaisal University.

Page1 / 7

Lec30-Classical Synchronization Problems-RW - National...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online