Question

I studied from book william stalling ,it was written there if we increase the size of page then pagefault first increases and then when pagesize become size of process then pagefault decreases. I am not able to understand why pagefault increases as if i increase the pagesize,any one plz explain the reason. Thank you.

Was it helpful?

Solution

pages are fixed size 'chunks' which are formed by dividing logical memory.if we increase the page size the number of pages will decrease ( consider an example for that matter , if you have to divide a large piece of bread among few people then you have to make sure that pieces are distributed to all now if you cut it into large chunks the number of pieces will not be sufficient enough to feed all people so some will remain hungry).similarly if number of pages decrease the CPU will have a very few addresses to refer to and thus increase the number of page faults.now if page size becomes the size of the process then there will almost as many number of pages as the number of processes so CPU will refer to it with no pagefaults.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top