Does a pager move or copy a page when handling a page fault?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












When a process accesses a page not in the main memory but in the swap space, a page fault happens, and the pager reads a page from swap space to main memory.



Is the read a move or copy? In other words, is there still a copy of the page in the swap space?



If it is a copy, does it mean that the pager has to update the copy in the swap space whenever there is a change to the copy of the page in the main space?



Thanks.



Operating System Concepts says:




  1. We find a free frame (by taking one from the free-frame list, for example).


  2. We schedule a disk operation to read the desired page into the newly allocated frame.




and this figure also shows copies of some pages (A, C and F) are in both swap space and main memory, and no page only exists in main memory but not in swap space:



enter image description here










share|improve this question

























    up vote
    0
    down vote

    favorite












    When a process accesses a page not in the main memory but in the swap space, a page fault happens, and the pager reads a page from swap space to main memory.



    Is the read a move or copy? In other words, is there still a copy of the page in the swap space?



    If it is a copy, does it mean that the pager has to update the copy in the swap space whenever there is a change to the copy of the page in the main space?



    Thanks.



    Operating System Concepts says:




    1. We find a free frame (by taking one from the free-frame list, for example).


    2. We schedule a disk operation to read the desired page into the newly allocated frame.




    and this figure also shows copies of some pages (A, C and F) are in both swap space and main memory, and no page only exists in main memory but not in swap space:



    enter image description here










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      When a process accesses a page not in the main memory but in the swap space, a page fault happens, and the pager reads a page from swap space to main memory.



      Is the read a move or copy? In other words, is there still a copy of the page in the swap space?



      If it is a copy, does it mean that the pager has to update the copy in the swap space whenever there is a change to the copy of the page in the main space?



      Thanks.



      Operating System Concepts says:




      1. We find a free frame (by taking one from the free-frame list, for example).


      2. We schedule a disk operation to read the desired page into the newly allocated frame.




      and this figure also shows copies of some pages (A, C and F) are in both swap space and main memory, and no page only exists in main memory but not in swap space:



      enter image description here










      share|improve this question













      When a process accesses a page not in the main memory but in the swap space, a page fault happens, and the pager reads a page from swap space to main memory.



      Is the read a move or copy? In other words, is there still a copy of the page in the swap space?



      If it is a copy, does it mean that the pager has to update the copy in the swap space whenever there is a change to the copy of the page in the main space?



      Thanks.



      Operating System Concepts says:




      1. We find a free frame (by taking one from the free-frame list, for example).


      2. We schedule a disk operation to read the desired page into the newly allocated frame.




      and this figure also shows copies of some pages (A, C and F) are in both swap space and main memory, and no page only exists in main memory but not in swap space:



      enter image description here







      linux virtual-memory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 36 mins ago









      Tim

      23.9k67232418




      23.9k67232418

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474605%2fdoes-a-pager-move-or-copy-a-page-when-handling-a-page-fault%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474605%2fdoes-a-pager-move-or-copy-a-page-when-handling-a-page-fault%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)