1 year ago

#224489

test-img

genji_god

xv6 lazy page allocation

While implementing lazy page allocation in xv6, I noticed while tracing back through gdb that the copyout function needs to be changed in order to make sure it is not writing to a page table entry that has not been allocated yet.

Alternatively, eagerly allocation user stack in exec() can also fix the bug.

But I do not understand why is there no page fault being raised in exec() or copyout(). It is the same with copy-on-write implementation, where you need to change copyout() to handle writing to a copy-on-write shared page between lets say a parent and child process.

Shouldn't the system raise an interrupt to handle the page fault in this case?

interrupt

xv6

copy-on-write

0 Answers

Your Answer

Accepted video resources