21-Classical+Synchronization+Problems-CS

21-Classical+Synchronization+Problems-CS - and placing the...

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

View Full Document Right Arrow Icon
Cigarette Smoking Problem Mehreen Alam
Background image of page 1

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

View Full DocumentRight Arrow Icon
April 15, 2009 Operating Systems - Mehreen Alam Assume a cigarette requires three ingredients to smoke: Tobacco Paper Match Assume there are also three smokers around a table, each of whom has an infinite supply of one of the three ingredients
Background image of page 2
April 15, 2009 Operating Systems - Mehreen Alam Assume there is also a non-smoking arbiter. The arbiter enables the smokers to make their cigarettes by selecting two of the smokers at random, taking one item out of each of their supplies,
Background image of page 3

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

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

Unformatted text preview: and placing the items on the table. He then notifies the third smoker that he has done this. April 15, 2009 Operating Systems - Mehreen Alam The third smoker removes the two items from the table and uses them (along with his own supply) to make a cigarette, which he smokes for a while. Meanwhile, the arbiter, seeing the table empty, again chooses two smokers at random and places their items on the table. This process continues forever....
View Full Document

Page1 / 4

21-Classical+Synchronization+Problems-CS - and placing the...

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