From 3dc844c1dfea604bc43890794a5cbc4c5fdef89d Mon Sep 17 00:00:00 2001 From: Adam NAILI Date: Mon, 2 Apr 2018 16:14:45 +0200 Subject: PageException created and LRU,Second Chance Handling --- fifo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fifo.py') diff --git a/fifo.py b/fifo.py index 61e70f5..c48629f 100644 --- a/fifo.py +++ b/fifo.py @@ -4,6 +4,7 @@ # Pacien TRAN-GIRARD et Adam NAILI from mem import Memory +from pageexception import * class FifoPaginator: @@ -18,7 +19,7 @@ class FifoPaginator: return overwritten def load(self, page): - if not self.mem.page_in_range(page): raise IndexError + if not self.mem.page_in_range(page): raise PageException if page in self.mem.main: return if page in self.mem.virt: self.mem.remove_virt(page) overwritten = self._put_main(page) -- cgit v1.2.3