On Sat, 8 Jan 2000 14:43:14 +0100,
>A system using Paging.Each side is 64k. System can hold 4 Pages. In the
>system there are
>the following pages 1(oldest) 2,3 and 4(newest).
>Request in order: 1,5,4,6,5,4,3,7,6,5,3,1,2,1,4,6,4,2,3,4
>FIFO in use...
>The answer Should be 9 fault.
>My Question are. How do i calculate this. Glad for tip.
Okay, it holds 4 pages. Initially, pages 1,2,3,4 are loaded.
* The request for page 1 is found already in-memory; no fault
is generated.
1: The request for page 5 cannot be fulfilled from the in-memory
pages; a fault is generated. Page 1, the oldest (FIFO,
remember) is dropped, and page 5 is added as the newest
page. Pages 2,3,4,5 are now loaded.
* The request for page 4 is found already in-memory; no fault
is generated.
2: The request for page 6 cannot be fulfilled from the in-memory
pages; a fault is generated. Pages 3,4,5,6 are now loaded.
* The request for page 5 is fulfilled from an in-memory page.
* The request for page 4 doesn't fault either.
* Likewise, the page 3 request doesn't fault.
3: Request for page 7 faults, resulting in 7,3,4,6.
4 through 9: by now you should be able to figure out what goes
on. To check, you should find that the the in-core page groups
will run through: 6375, 3751, 7513, 5124, 1246, 2463.
Now, with that understanding, how does the following sequence
give you the same answer? 1234.563712463
--Ken Pizzini