CHAPTER 9 Virtual MemoryPractice Exercises9
1 Under what circumstances do page faults occur
Describe the actionstaken by the operating system when a page fault occurs
Answer:A page fault occurs when an access to a page that has not beenbrought into main memory takes place
The operating system verifiesthe memory access, aborting the program if it is invalid
If it is valid, afree frame is located and I/O is requested to read the needed page intothe free frame
Upon completion of I/O, the process table and page tableare updated and the instruction is restarted
2 Assume that you have a page-reference string for a process with mframes (initially all empty)
The page-reference string has length p;n distinct page numbers occur in it
Answer these questions for anypage-replacement algorithms: