When a Write miss occurs, the state of the other caches is checked, and if there is data, it is read from the other caches, otherwise it is read from memory. When a Write hit occurs, it enters the Modified state and the other caches enter the Invalid state. If the other caches are in Modified state, the data will be written to memory if there is no data in the other caches, it will be read from memory, and then it will enter Exclusive state. When Read miss, first check the status of other cache, if there is data, read data from other cache, and all will enter Shared state. Shared: data is consistent with memory, and there can be multiple caches with data at the same time.Exclusive: data is consistent with memory and only one cache has data.Modified: data is inconsistent with memory and only one cache has data.If all caches are in Invalid state, then read from memory and modify the cache data to go to Modified state. When a Write miss occurs, if there is another cache in the Modified/Shared state, then read the data from the other cache and put the other cache into the Invalid state, then modify the local data and go to the Modified state. If the state is Modified, the data is modified and the state remains unchanged. ![]() When a Write hit occurs, if it is now in Shared state, put the other Shared cache into Invalid state, then update the data and enter Modified state. If there is Dirty, then write the data from other caches to memory and local cache, and then go to Shared state. If there is Shared, read from other caches. When Read miss, check the status of other caches, if they are all Invalid, read from memory and enter Shared state.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |