I'm trying to solve a MESI Cache problem. I have four processors (P0, P1, P2, P3) each with 4 states set to Invalid. Offset bits are to be ignored. If I read on P0 on address 11010 with two index bits and 3 tag bits I get IIEI for P0. Now I have another Read for P2 on the address 01010. Now in general I would say that P0 should turn to IISI and P2 also to IISI because it's the same index but I'm not sure what difference the tag bits make here. The next action comes from P1 who again Reads the address 11010 which would definitely now make it IISI for P1 and P2 but not sure if also for P0. Thanks for your help in advance!
I think you should try to understand the tag-index-offset concept first.
[11010|offset] and [01010|offset] addressed cache lines are completely different. They point to different cachelines on memory. Indexing just helps the placement of the datas in caches. 2 addresses with same indexes, means you should place these datas to the same row in the cache. If tags are different and you are using a set-associative/full-associative cache, you can place 2 datas in the same indexed row but different ways(columns), but they points different datas.
Your answer hidden in your question. You are not sure the difference tag bits make. To understand cache coherence, first you should completely understand the basics of the caching.
Some other advice, for exclusive state, you should be sure that you can claim a cache line is exclusive before you do. You can be sure by 2 different ways, you can send an invalidation, or you get an exclusive response from bus. That differs by the bus protocol you are using for cache coherence.
Concept is not simple that study on it like an hour and completely understand.