Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

The example input for FIFO that shows the Belady anamoly uses “-n 3”, shouldn the number of page frames be a power of 2?

FIFO input shows uses
0
Posted

The example input for FIFO that shows the Belady anamoly uses “-n 3”, shouldn the number of page frames be a power of 2?

0

The assignment says you can assume the number of pages will be a power of two (so if you rely on this you may not be able to run the FIFO test code made available). However, there is no reason that the number of pages of physical memory must be a power of 2. In reality it would be difficult to purchase memory so that you didn’t have a power of 2 (assuming the page size is also a power of 2), but keep in mind that it is feasible that the OS reserves some pages for itself (so the pages left for the virtual memory software to use could easily be something other than a power of 2). At a minimum, the OS must make sure that the pages that hold the page fault handling software must be kept in memory! We won’t test your code with anything other than a power of 2.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123