title: Does dirty bit (of TLB) need to be setted always on a store?
body: <p>Supose this dumb C code:</p>
  <pre><code>int n = 2;
  
  int main(){
      n = 5;
  }
  </code></pre>
  <p>When my professor tought us how TLB and page table entry worked, he told us that, if dirty bit == 1, in an eviction of that page from memory to disk, the page needed to be copied to disk.</p>
  <p>But my question is: in this example we have a store, so will be the dirty bit of TLB (and page table) setted?
  From the professor I understood that yes, but my common sense tells me that no, because when I execute this same program tomorrow I will want to find (at the beginning) that n = 2 and not 5.</p>