I am reading Directory-Based Cache Coherence Protocols: The Basics of the book Computer architecture A quantitative approach. The following is a picture of the state transition diagram for the directory on the textbook. My question is: why the block in the shared state does not handle the write hit event? In my opinion, if the block is in the shared state and the write hit event occurs, the block should go to the exclusive state. I believe that I read this chapter carefully but did not find any explanation. Is it because the diagram is only for the basic directory-based protocol?
Follow up question: The picture below is the cache state diagram of Snooping protocol. The read-only shared block is able to receive the event called Write miss for this block. Does it imply that writing a read-only block is allowed?
Same as with MESI, a Read-For-Ownership (invalidate request) is needed to invalidate other copies of the line, so they can't get stale read hits after we modify this copy.
Otherwise the cache wouldn't be coherent. This cache doesn't need to actually receive a new copy of the data, but it does need to wait for confirmation that other caches have processed the invalidate message. So it has to go off-core and is basically the same as a cache miss, except it can avoid going to DRAM through the memory controllers.
(Note that in real CPUs, MESI is implemented more like a directory than a shared bus, despite some material defining MESI in terms of a shared bus.)