{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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 [email protected] [email protected]
Background image of page 1

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

View Full Document Right 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 Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

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 bookmark
Ask a homework question - tutors are online