Paolo P
2011-07-16 04:19:46 UTC
1. So to make text-segment read-only don't I have to achieve that
through as_define_region. though I don't know I can approach this other
than make a flag to indicate its read-only or making this statement
"as->vaddr = vaddr & readable"
2. In every context switch it always calls as_activate to invalidate the
TLB. From my understanding, it should be invalidated if a new process is
created from fork, is it not?
3. Im confused about how to approach the on-demand loading. In loadelf,
it uses load_segment to load all the pages from the segment in memory. I
assume that I have to use alloc_kpages to allocate a page but I dont
know how to approach two things below without using load_segment
"Load the page, using information from the program’s ELF file to do so"
and
"Update OS/161’s information about this address space."
I appreciate the help in answering my questions
through as_define_region. though I don't know I can approach this other
than make a flag to indicate its read-only or making this statement
"as->vaddr = vaddr & readable"
2. In every context switch it always calls as_activate to invalidate the
TLB. From my understanding, it should be invalidated if a new process is
created from fork, is it not?
3. Im confused about how to approach the on-demand loading. In loadelf,
it uses load_segment to load all the pages from the segment in memory. I
assume that I have to use alloc_kpages to allocate a page but I dont
know how to approach two things below without using load_segment
"Load the page, using information from the program’s ELF file to do so"
and
"Update OS/161’s information about this address space."
I appreciate the help in answering my questions