Always Shared Sections

Question Text

The pages of which sections in the process virtual address space are always shared between the parent and child process?

Question Answers

  • None, because they are marked copy-on-write

  • Kernel pages because there is only one kernel

  • Non-writable sections, such as .text or .rodata

  • libc pages, because it is a shared library and all processes refer the same memory

Feedback

The name of the mechanism is copy-on-write. Pages are only copied when written to. If you never write data to a page, it will remain shared. You cannot write data to non-writable pages, such as those in the .text or .rodata sections.