1

当我的教授说写标志和读标志时,我不理解他的意思。0是否意味着它被触发?他想让我们画一个状态转换图,但我想如果我知道发生了什么,我可以自己做。

+---------+------------+------------+-------------- --+
| 柜台 | 写标志 | 阅读标志 | 口译 |
+---------+------------+------------+-------------- --+
| 0 | 0 | 0 | 写锁定 |
| 0 | 0 | 1 | 无效 |
| 0 | 1 | 0 | 无效 |
| 0 | 1 | 1 | 可用 |
| N | 0 | 0 | 写请求 |
| N | 0 | 1 | 阅读锁定 |
| N | 1 | 0 | 无效 |
| N | 1 | 1 | 无效 |
+---------+------------+------------+-------------- --+
4

1 回答 1

1

The write flag and the read flag are each a boolean value, meaning it can hold a 0 or a 1. The state appears to be defined by the value of the counter and the two flags. I think your professor is asking that you draw a state diagram that shows transitions between different counter/flag value combinations. (My guess is that the intent is that you collapse all the counter>0 sub-states into a single sub-state labeled counter=N.)

于 2011-07-11T18:12:42.070 回答