title: cache - flush and invalidate operation
body: <p>I have some questions on cache synchronization operations.</p>
  
  <p><strong>Invalidate</strong>: Before cpu tries to read  a portion of memory updated by a device, the corresponding memory needs to be invalidated.</p>
  
  <p><strong>Flush</strong>: Before the device read a portion of memory updated by CPU, CPU must flush (write back is also correct?) the contents from cache to memory, so that device reads the contents from memory with updated contents.</p>
  
  <p>If flush is not carried out it may read junk data present in memory as the memory is not still updated with contents written to cache. </p>
  
  <p>Please confirm whether my above understanding is correct?</p>
  
  <p>When do you want to combine both flush and invalidate? I heard that while playing with device control descriptors we need to synchronize by combining flush and invalidate. Why so?</p>
  
  <p>Do we need to follow  a sequence like flush followed by invalidate?</p>
  
  <p>Is there a scenario in which invalidate followed by flush will be useful?</p>