To quote Henessey and Patterson, "The other key aspect of writes is what occurs on a write miss. We first fetch the words of the block from memory. After the block is fetched and placed into the cache, we can overwrite the word that caused the miss into the cache block. We also write the word to main memory using the full address."
I don't seem to comprehend the above statement. If we're overwriting the word in the cache, it means that previously, the index of the address was matching, but the tag value was different. So, the processor stalls and orders to read from the memory and write into the cache. This will obviously replace the previous contents of the block (Take 1 block contains 1 word). Then why do we write the word again into the memory? Didn't we just fetch it from there?
Can someone elaborate on the previous statement specifically, and on write-miss in general? What does write-miss mean?