CDA 4630/5636: Embedded Systems
Midterm (Duration: 50 minutes)
March 1, 2017
This is a
50 minutes (50 points)
You are allowed to bring
on one side
of a US letter size paper, and a
This exam contains
(including this one) and
Write all answers on the white space provided below the question.
Make reasonable assumptions when you think the question is not providing all necessary details. Points will be
deducted if you make an assumption to simplify the problem when the information is directly/indirectly available.
] Consider the following predicate/transition Petri Net model for the dining philosopher problem with
philosophers. Both (left and right) forks are needed for eating. Assume that the following arrangement in a linear (not
circular) dining table: f1 P1 f2 P2 f3 P3 f4 P4 f5 P5 f6. In this case, P1 has left fork of f1 and right fork of f2, etc.
Here, the five philosopher tokens are P1 to P5, and six fork tokens are f1 to f6. In this figure
, ‘x’ is the philosopher, ‘t’
implies thinking, ‘f’ implies forks, ‘e’ implies eating, and ‘l(x)’ and ‘r(x)’ implies left and right forks, respectively, of
has two transitions, ‘u’ and ‘v’, that indicate start
-eating and done-eating, respectively.
 Show the tokens
assuming philosophers 2 and 4 are eating. No explanation required.
 List all possible combinations
(scenarios) of philosophers that can be in eating state at the same time. In
other words, each entry in your list can have one or more philosophers that can eat together while satisfying the
constraints outlined above. For example, only P1 eating is a valid scenario. No explanation required.
P1, P3, P5