开发者

Operating System State Diagram [duplicate]

开发者 https://www.devze.com 2023-03-17 07:11 出处:网络
This question already has an answer here: Closed 11 years ago. Possible Duplicate: State transition diagram for reader writer problem
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

精彩评论

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

关注公众号