@@ -7,20 +7,20 @@ called ‘the dining philosophers’. It was originally conceived by Dijkstra in
7
7
[ paper ] : http://www.usingcsp.com/cspbook.pdf
8
8
9
9
> In ancient times, a wealthy philanthropist endowed a College to accommodate
10
- > five eminent philosophers. Each philosopher had a room in which he could
11
- > engage in his professional activity of thinking; there was also a common
10
+ > five eminent philosophers. Each philosopher had a room in which she could
11
+ > engage in her professional activity of thinking; there was also a common
12
12
> dining room, furnished with a circular table, surrounded by five chairs, each
13
13
> labelled by the name of the philosopher who was to sit in it. They sat
14
14
> anticlockwise around the table. To the left of each philosopher there was
15
15
> laid a golden fork, and in the centre stood a large bowl of spaghetti, which
16
- > was constantly replenished. A philosopher was expected to spend most of his
17
- > time thinking; but when he felt hungry, he went to the dining room, sat down
18
- > in his own chair, picked up his own fork on his left, and plunged it into the
16
+ > was constantly replenished. A philosopher was expected to spend most of her
17
+ > time thinking; but when she felt hungry, she went to the dining room, sat down
18
+ > in her own chair, picked up her own fork on her left, and plunged it into the
19
19
> spaghetti. But such is the tangled nature of spaghetti that a second fork is
20
20
> required to carry it to the mouth. The philosopher therefore had also to pick
21
- > up the fork on his right. When he was finished he would put down both his
22
- > forks, get up from his chair, and continue thinking. Of course, a fork can be
23
- > used by only one philosopher at a time. If the other philosopher wants it, he
21
+ > up the fork on her right. When she was finished she would put down both her
22
+ > forks, get up from her chair, and continue thinking. Of course, a fork can be
23
+ > used by only one philosopher at a time. If the other philosopher wants it, she
24
24
> just has to wait until the fork is available again.
25
25
26
26
This classic problem shows off a few different elements of concurrency. The
0 commit comments