Lec31-Classical Synchronization Problems II

Lec31-Classical Synchronization Problems II - 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 Lec26-Classical Synchronization Problems II Lec26-Classical Synchronization Problems II 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 same time only one writer at same 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. Waiting/Active Writers should be given priority over
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 / 13

Lec31-Classical Synchronization Problems II - 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