是什么打破了最佳页面更换中的领带?
假设我们有3个具有值(1,7,0)的过程的帧。现在假设该过程的字符串参考中的其余参考为:4,6,7。对于参考4,将发生页面故障,将来只有7页,因此应在此处更换哪个帧,为1或0?我是否会应用FIFO打破这场平局,还是可以选择其中任何一个代替?
Assume we have 3 frames for a process with values (1,7,0). Now assume that the remaining references in the string reference for that process are : 4,6,7. For the reference 4 , a page fault will occur and only 7 is present in the future , so which frame should be replaced here , 1 or 0 ? Do I apply FIFO to break this tie or I can select any of them to replace ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最佳意味着您将来有所有未来的信息,因此,如果确实不再使用两页,那么您也可以选择并且可以很好。但是,如果您想做LRU或FIFO打破领带,那就可以了(即没关系)。
有趣的是考虑全球最佳应用,而不仅仅是一个过程。如果我们假设其他过程可能以后触摸1或0,则可能是用于做出最佳选择的未来信息的一部分。如果多个CPU也同时触摸内存,最佳决策也将变得更加复杂。
Optimal means you have all future information, so if two pages were truly never to be used again you could pick either and be fine. However if you wanted to do an LRU or FIFO to break the tie, it would be fine (i.e. wouldn't matter).
What would be interesting is thinking about optimal applied globally and not just to a single process. If we assume other processes might touch 1 or 0 later, that could be part of the future information used to make the optimal choice. Optimal decision-making would also become more complicated if multiple cpus are touching memory concurrently as well.