ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > ZSTU-(2020-2021)-1 > student homework > 2018529627020 JE >
HOMEWORK 10 Version 0
👤 Author: by kagenzaclaudiengmailcom 2020-12-08 06:36:16
LRU:
3 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 4 5 1 7 2 -
Frame 2: 2 - 6 3 - -
Frame 3: 3 1 2 - 6 1 6
15 faults

4 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - 6 -
Frame 2: 2 - - - - -
Frame 3: 3 5 3 - -
Frame 4: 4 6 7 1
10 faults

5 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - -
Frame 2: 2 - - - - -
Frame 3: 3 6 - -
Frame 4: 4 3 - -
Frame 5: 5 7
8 faults

6 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - -
Frame 2: 2 - - - - -
Frame 3: 3 - - -
Frame 4: 4
Frame 5: 5 7
Frame 6: 6 - -
7 faults, which is the fewest we can have with 7 pages

FIFO:
3 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 4 6 3 - 2 - 6
Frame 2: 2 - 1 2 - 7 1
Frame 3: 3 5 1 6 3
16 faults

4 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - 5 3 - 1
Frame 2: 2 - 6 7 3
Frame 3: 3 2 - 6 -
Frame 4: 4 1 2 -
14 faults

5 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - 6 - -
Frame 2: 2 - - 1 -
Frame 3: 3 2 - -
Frame 4: 4 3 - -
Frame 5: 5 7
10 faults

6 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - 7
Frame 2: 2 - - - - 1
Frame 3: 3 - - 2
Frame 4: 4 3
Frame 5: 5
Frame 6: 6 - -
10 faults

Optimal:
3 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - 3 - -
Frame 2: 2 - - - 7 2 -
Frame 3: 3 4 5 6 - 1 6
11 faults

4 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - 7 1
Frame 2: 2 - - - - -
Frame 3: 3 - - -
Frame 4: 4 5 6 - -
8 faults

5 frames:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6
Frame 1: 1 - - - -
Frame 2: 2 - - - - -
Frame 3: 3 - - -
Frame 4: 4 7
Frame 5: 5 6 - -
7 faults, which is the best we can do

d) No Belady's anomaly.

e) Recommend some variant of LRU. Pure LRU is too expensive, but several low cost variants perform close to Optimal.

Please login to reply. Login

kagenzaclaudiengmailcom • 2020-12-14 15:07:19
FIFO

 

 

<a href="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/FOFO.png"><img class="alignnone size-medium wp-image-9135" src="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/FOFO-236x300.png" alt="" width="236" height="300" /></a>

&nbsp;

&nbsp;

&nbsp;

LEAST RECENTLY REPLACEMENT ALGORITHM

&nbsp;

&nbsp;

<a href="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/LRR.png"><img class="alignnone size-medium wp-image-9136" src="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/LRR-249x300.png" alt="" width="249" height="300" /></a>

&nbsp;

&nbsp;

&nbsp;

OPTIMAL REPLACEMENT ALGORITHM

&nbsp;

&nbsp;

&nbsp;

<a href="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/ORA.png"><img class="alignnone size-medium wp-image-9137" src="http://www.yvsou.com/wp-content/uploads/sites/30/2020/12/ORA-236x300.png" alt="" width="236" height="300" /></a>

&nbsp; PostVer 0

Please login to reply. Login

Reversion History

Loading...
No reversions found.