Where is page table stored in Linux?

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











up vote
0
down vote

favorite












I want know where Linux stores page tables. Is it in kernel virtual memory?




It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me know. And in order to answer the question myself I read some lines from a book says:



(23.2 page 8)




... Linux virtual address space consists of user portion and kernel portion...







... the kernel portion is the same across processes.




So the address space provided by kernel is in a sense a space for processes to share something? So if the page tables are put in kernel virtual memory would this mean processes can share their page tables?




The book I read: http://www.ostep.org










share|improve this question

























    up vote
    0
    down vote

    favorite












    I want know where Linux stores page tables. Is it in kernel virtual memory?




    It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me know. And in order to answer the question myself I read some lines from a book says:



    (23.2 page 8)




    ... Linux virtual address space consists of user portion and kernel portion...







    ... the kernel portion is the same across processes.




    So the address space provided by kernel is in a sense a space for processes to share something? So if the page tables are put in kernel virtual memory would this mean processes can share their page tables?




    The book I read: http://www.ostep.org










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I want know where Linux stores page tables. Is it in kernel virtual memory?




      It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me know. And in order to answer the question myself I read some lines from a book says:



      (23.2 page 8)




      ... Linux virtual address space consists of user portion and kernel portion...







      ... the kernel portion is the same across processes.




      So the address space provided by kernel is in a sense a space for processes to share something? So if the page tables are put in kernel virtual memory would this mean processes can share their page tables?




      The book I read: http://www.ostep.org










      share|improve this question













      I want know where Linux stores page tables. Is it in kernel virtual memory?




      It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me know. And in order to answer the question myself I read some lines from a book says:



      (23.2 page 8)




      ... Linux virtual address space consists of user portion and kernel portion...







      ... the kernel portion is the same across processes.




      So the address space provided by kernel is in a sense a space for processes to share something? So if the page tables are put in kernel virtual memory would this mean processes can share their page tables?




      The book I read: http://www.ostep.org







      linux linux-kernel virtual-memory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 10 at 5:09









      ptr_user7813604

      1186




      1186




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote



          accepted










          Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls. After a successful system call the processor enters a privileged state in which the kernel address space is available.






          share|improve this answer




















          • Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
            – ptr_user7813604
            Dec 10 at 6:35







          • 1




            Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
            – Johan Myréen
            Dec 10 at 6:46










          • Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
            – ptr_user7813604
            Dec 10 at 7:18











          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          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%2f487052%2fwhere-is-page-table-stored-in-linux%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote



          accepted










          Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls. After a successful system call the processor enters a privileged state in which the kernel address space is available.






          share|improve this answer




















          • Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
            – ptr_user7813604
            Dec 10 at 6:35







          • 1




            Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
            – Johan Myréen
            Dec 10 at 6:46










          • Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
            – ptr_user7813604
            Dec 10 at 7:18















          up vote
          2
          down vote



          accepted










          Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls. After a successful system call the processor enters a privileged state in which the kernel address space is available.






          share|improve this answer




















          • Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
            – ptr_user7813604
            Dec 10 at 6:35







          • 1




            Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
            – Johan Myréen
            Dec 10 at 6:46










          • Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
            – ptr_user7813604
            Dec 10 at 7:18













          up vote
          2
          down vote



          accepted







          up vote
          2
          down vote



          accepted






          Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls. After a successful system call the processor enters a privileged state in which the kernel address space is available.






          share|improve this answer












          Yes, the page tables are stored in the kernel address space. Each process has its own page table structure, which is set up so that the kernel portion of the address space is shared between processes. The kernel address space is not accessible from user space, however. The user space code communicates with the kernel in a controlled manner using system calls. After a successful system call the processor enters a privileged state in which the kernel address space is available.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 10 at 6:24









          Johan Myréen

          7,33611423




          7,33611423











          • Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
            – ptr_user7813604
            Dec 10 at 6:35







          • 1




            Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
            – Johan Myréen
            Dec 10 at 6:46










          • Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
            – ptr_user7813604
            Dec 10 at 7:18

















          • Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
            – ptr_user7813604
            Dec 10 at 6:35







          • 1




            Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
            – Johan Myréen
            Dec 10 at 6:46










          • Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
            – ptr_user7813604
            Dec 10 at 7:18
















          Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
          – ptr_user7813604
          Dec 10 at 6:35





          Can I say that: Each process has an address space, and its page table is stored in the kernel portion of this address space. And all kernel portion of each process are actually maps to the same address space in kernel, and sharing happens at there. Correct?
          – ptr_user7813604
          Dec 10 at 6:35





          1




          1




          Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
          – Johan Myréen
          Dec 10 at 6:46




          Yes, all processes share the kernel's address space, but only kernel code can access that part of memory. The kernel is free to do what it wants with it, but the memory is not shared between processes in the sense that user level code in one process could freely write to it and another read it. The kernel can set up memory pages to be shared between processes, but then non-kernel addresses are used, since kernel addresses are always off limit for non-kernel code.
          – Johan Myréen
          Dec 10 at 6:46












          Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
          – ptr_user7813604
          Dec 10 at 7:18





          Thanks for your kindness and time, now I understand it! Since my question is ask about Linux, but can I take this as a general understand for other OS? (Or it's not recommend?)
          – ptr_user7813604
          Dec 10 at 7:18


















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f487052%2fwhere-is-page-table-stored-in-linux%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay