title: Does mmap force a context switch in Linux
body: <p>This is related to another question I have already asked: <a href="https://stackoverflow.com/questions/33128587/why-does-malloc-rely-on-mmap-starting-from-a-certain-threshold">Why does malloc rely on mmap starting from a certain threshold?</a> </p>
  
  <p>I got an answer for most points but we are not sure about if an mmap forces a context switch or not specially for the anonymous case (in the case of file mapping I assume that the process loses that CPU since loading the file from the disk is a time consuming operation)</p>
  
  <p>So my doubts are:</p>
  
  <ol>
  <li>Does the process lose the CPU when mapping an anonymous page? </li>
  <li>Is there a simple way in Linux to check if the process loses the CPU after a specific system call?</li>
  </ol>