If more than one program is to run at a time, this can be a problem. It is this function that currently executes programs in Nachos. Nachos starts a program by opening the file and passing the OpenFile pointer to the AddrSpace constructor. The AddrSpace constructor is where most of the difficult work is done. First it sets up the page table and zeros out the memory.
Memory is divided into fixed-size pages.
A page is the smallest unit of memory that can be allocated to a program. A page table maps virtual pages to physical pages. As stated above, the program itself believes it starts at zero. It also believes that each of its pages are contiguous in memory. The program views its memory as a big undivided array that it can step through with ease.