开发者

Operating System State Diagram [duplicate]

This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

State transition diagram for reader writer problem

Counter | Write Flag |  Read Flag | Description
________|____________|____________|________________
   0    |      0     |     0      | Write Locked
   0    |      0     |     1      | Invalid
   0    |      1     |     0      | Invalid
   0    |      1     |     1      | Available
n(n>0)  |      0     |     0      | Write Request
n(n>0)  |      0     |     1      | Read Lock
n(n>0)  |      1     |     0      | Invalid
n(n>0)  |      1     |     1      | Invalid
_____________________________________________________

Above are the state descriptions. Draw a state transition diagram including all the valid states with edges labeled with appro开发者_C百科priate events that trigger the state transition. Also, describe why the invalid states are invalid.

Can you help me by telling me which would represent my states and maybe try to describe how my drawing would be and how to do my transitions. Thanks a lot!


Hopefully you know how to draw DFAs. Here's a hint: you have 8 possible states, they're listed on your table. Draw a big circle for each one of them, and label them however you feel like (but the "Description" column seems like a decent idea). Then, draw arrows in between them describing how you go from one state to the other. For example, you might go from Available to Read Lock when a thread demands a read lock.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜