Discussion:
on-demand page loading for elf content
(too old to reply)
Greg Wang
2011-07-19 04:13:17 UTC
Permalink
hey,

I think I got the question correct, just wanna double check.

For the on-demand page loading, is that means we should remove all loadelf
from runprogram and execv, so that nothing got loaded into physical frames
before the thread start to run?

If so, are we gonna manully use load-elf in vm_fault?
As well, once the program require to read part of the code segement, are we
loading the entire ELF file into memory or just the part that is required?

Thx,
Greg Wang
cs350
2011-07-19 21:37:07 UTC
Permalink
You should load the contents of the ELF file one page at a time. You can
do it using code similar to load_segment. However, keep in mind that
load_segment uses userspace virtual addresses, which may not be what you
want.

-Alex
Post by Greg Wang
hey,
I think I got the question correct, just wanna double check.
For the on-demand page loading, is that means we should remove all loadelf
from runprogram and execv, so that nothing got loaded into physical frames
before the thread start to run?
If so, are we gonna manully use load-elf in vm_fault?
As well, once the program require to read part of the code segement, are we
loading the entire ELF file into memory or just the part that is required?
Thx,
Greg Wang
Loading...