<< Chapter < Page | Chapter >> Page > |
For our simple producer/consumer model, what is the basic property we'd like to guarantee?Roughly, ``each product is consumed exactly once''. That is, Produce and Consume are called alternatingly,starting with Produce. (In particular, as stated this precludes modeling``produce twice and queue the results''.)
Expressing this actually requires several clauses. Give colloquial English translations of the followingLTL formulas. We can make the generic model a bit concrete byinterpreting and as starting and finishing the production of a fine, hand-craftedale, with , corresponding to enjoying such an ale. (The more health-concious reader might preferto instead interpret these as start/finish the training for a marathon,and start/finish running a marathon, respectively.)
In the previous exercise , the formulas entailed that production of an item could noteven begin until the previous object had been entirely consumed. This requirement might make sense forthe interpretation of marathon training/running, but it doesn't seem essential to theproduction of hand-crafted ale, even if we do want to preserve the policy of never queuing up products.
Suppose we have a computer network port whose buffer can store only one web page's data at a time.The producer could correspond to some server sending a web page to that computer,and the consumer might be a browser which processes the data being received.
Note that we want to include the possibility that nothing is ever producedwe don't always want to enforce weak fairness. Consider an operating system's code for a print serverit is truly important that not owning a printer doesn't mean the OS always crashes!
Notification Switch
Would you like to follow the 'Model checking concurrent programs' conversation and receive update notifications?