A4 - Section 2

278 views
Skip to first unread message

Giuliana Flores

unread,
Apr 28, 2013, 2:52:17 PM4/28/13
to cs49...@googlegroups.com
Answers for Section 2: 
I will attach the work tonight
I don't know how to do question 2, Does anyone of you guys know? I would really appreciate your help on this one. Thanks!

1) 10 
2) ?
3) 2
4) 4
5) 5
6) 5
7) V
8) IV

Christopher Rivas

unread,
Apr 29, 2013, 1:09:21 AM4/29/13
to cs49...@googlegroups.com
for #2 I got 898

FIRST PASS: 4 is LRU. 1 not in map. added to map under 2. (4-2-1)
SECOND PASS: 2 in map. skip. (4-2-1)
THIRD PASS: 4 still LRU, 1 is 2nd to last LRU, 2 is most recent. 3 not in map. add 3 to map under 1. (4-2-1-3)
FOURTH PASS: 4 in map. 4 no longer LRU. 2 is new LRU.
FIFTH PASS: 1 in map.
SIXTH PASS: 2 in map. 2 no longer LRU. 3 is the new LRU.
SEVENTH PASS: map is full. 3 is LRU. swap out 3. 3 was pointing to 898. so it's 898
Reply all
Reply to author
Forward
0 new messages