title: Can a process start executing with 0 Pages in main memory?
body: <p>I am reading a Book on <strong>Operating System (Galvin</strong>). While explaining <strong>Demand Paging</strong> it says</p>
  
  <p>In the extreme case, <strong>we can start executing a process with no pages in
    memory</strong>. When the operating system sets the instruction pointer to the first
    instruction of the process, which is on a non-memory-resident page, the process
    immediately faults for the page. </p>
  
  <p>My question is how OS can set the instruction pointer for a process for which not even single page is in memory (because the address in instruction pointer cannot be a disc or secondary memory address, It has to be a main memory address but 0 pages means nothing is in memory). </p>