map bss to addr zero
ritesh.harjani at gmail.com
Sat Sep 1 15:23:17 EDT 2012
On Mon, Aug 27, 2012 at 2:01 AM, Srinivas Ramanan <
srinivas.ramanan at gmail.com> wrote:
> Hi all,
> This is an interview question.
> "What is the implication of mapping BSS to the Virtual Memory Segment 0?"
> I was not able to find the answer from web. So posting here.
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
The bss section typically includes all uninitialized variables declared
with the static keyword.
The zero page which is a copy-on-write page that reads as zero is used to
map the BSS segment. Any process referencing the zero page sees the page
filled with zeos and if it tries to writes to the page, it ends up
modifying a private copy. (LDD ch15. page 429)
Why it will generate a page fault later when process will tries to
reference it, while it already has mapped with the zero page?
Sorry if i am wrong anywhere.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Kernelnewbies