Belady's Extra Frame

Reference string, in order:

1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5

With 3 frames under FIFO, the trace is:

# ref result evict frames (oldest first)
1 1 fault - 1
2 2 fault - 1, 2
3 3 fault - 1, 2, 3
4 4 fault 1 2, 3, 4
5 1 fault 2 3, 4, 1
6 2 fault 3 4, 1, 2
7 5 fault 4 1, 2, 5
8 1 hit - 1, 2, 5
9 2 hit - 1, 2, 5
10 3 fault 1 2, 5, 3
11 4 fault 2 5, 3, 4
12 5 hit - 5, 3, 4

That is 9 faults. Run the same string under FIFO with 4 frames. How many faults?

A

7

B

10

C

8

D

9