Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (a) Program counter is used to get the next instruction
- (b) MMU checks to see if the VM is in the VM cache, it isn't
- (c) MMU checks to see if it's in the TLB, it isn't
- (d) MMU reads the page table entry
- (e) MMU checks the valid bit to see if it's in memory, it isn't, starts page fault trap
- (f) Handler determines that it's on disk (not illegal address)
- (g) Handler obtains the frame from which it will be read
- i. If a free page is non-emtpy, take it
- ii. Otherwise runs page replacement algorithm to choose victim
- iii. Sets the victim page to invalid in the page table
- iv. If victim is dirty, write it out to disk
- (h) Reads page from disk into physical frame
- (i) Saves context of current process and places into queue awaiting page fault resolution
- (j) Invokes scheduler to schedule another ready-to-run process
- (k) Interrupt generated by disk controller when the read has completed, starting disk interrupt service routine
- i. Virtual to physical mapping placed in process's PTE
- ii. Page marked as valid
- iii. Process placed in the ready-to-run queue
- (l) At some later point in time, the process will be scheduled as current process
- (m) Instruction is restarted
Advertisement
Add Comment
Please, Sign In to add comment