Open main menu

CDOT Wiki β

Changes

GPU621/Group 1

1,063 bytes added, 16:52, 5 March 2023
The MESI protocol
'''Invalid''' - Line data is not valid.
 
 
How does it work?
 
Let's say 2 cores (core 1 and core 2) are close to each other physically and are receiving memory from the same cache line. They are reading long values from main memory (value 1 and value 2).
 
core 1 is reading value 1 from main memory. It will proceed to fetch values from memory and store them into the cache line.
 
Once that is done it will mark that cache line as as '''exclusive''' because core 1 is the only core operating in the cache line.
 
For efficiency this core will now read the stored cache value instead of reading the same value from memory when possible this will save time and processing power.
 
 
core 2 also starts to read values but from value 2 from the main memory.
 
Due to core 2 being in the same cache line as core 1 both cores will tag their cache lines as '''shared'''.
 
If core 2 decides to modify the value of 1. It modifies its value in local cache and changes its state from '''shared''' to '''modified'''
 
Lastly. core 2 notifies core 1 of the changes in values. which marks the cache line as '''invalid'''.
== Sources ==