This branch implements demand paging for xv6 on ARM. Physical memory is allocated only when pages are actually accessed, not when virtual memory is allocated.
sbrk()calls useallocuvm_demand()- just updates process size, no physical allocation- When process accesses unmapped page → page fault
dabort_handler()catches fault and callshandle_page_fault()- Physical memory allocated and mapped to virtual address
- Process continues execution
vm.c: Addedallocuvm_demand()andhandle_page_fault()trap.c: Modifieddabort_handler()to handle page faultstrap_asm.S: Fixed PC adjustment for ARM data abort returnproc.c: Changedgrowproc()to use demand allocationcopyuvm(): Skip unallocated pages during fork
- Memory only allocated when actually used
- Faster process creation (
sbrk()is immediate) - Better memory utilization
- Detects translation faults using FSR codes 0x5 and 0x7
- Critical PC adjustment in
trap_dabortfor instruction retry - Proper TLB flushing after new page mappings