question on multiprocessor use of private caches

A student writes:

	Hello Dr. Patt,

	I have a question regarding write back policy.
	If I understood right, in this policy we just write back the data 
	to the cache, and set the dirty bit in order to update that memory 
	location later. 

You understand correctly.

	My question is when do we exactly write that data to the main memory? 
	Is it just when we want to bring out the corresponding cache line from 
	the cache?

Usually yes, ...unless of course some other processor needs the contents of
that location.

	If that's the case, suppose some memory location is resident in the 
	cache, and it gets updated several times without being written to the 
	main memory. 	What would happen if some other processor (/or any 
	other devices) needed that intermediate data?

Then we would write the data out at that time.  There are several mechanisms
that do exactly that: snoopy cache, broadcast invalidate, directory schemes,
etc.  How they work: that we will spend a lecture on before the end of the

Excellent question.  Thanks for asking.

Yale Patt

	<<name withheld to protect the student who wants the MP lecture now>>