Given that main memory is composed of three page frames for public use and that a seven page program (with pages a, b, c, d, e, f, g) requests pages in the following order:

a, b, a c, d, a, e, f, g, c, b, g
a. Using the FIFO page removal algorithm, do pages trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios.

b. Increase the size of memory so it contains four page frames for public used. Using the same page requests as above and FIFO do another page trace analysis and compute the failure and success ratios.
c. Did the result correspond with your intuition? Explain.

a. Using the FIFO page removal algorithm, do pages trace analysis indicating page faults with asterisks (*). Then compute the failure and success ratios.

:

a. Using the FIFO page replacement algorithm, we will simulate the page trace analysis for the given order of page requests.

Initially, all three page frames in the main memory are empty.

Page Request: a
Main Memory: a * *
Page Faults: 1

Page Request: b
Main Memory: a b *
Page Faults: 2

Page Request: a
Main Memory: a b *
Page Faults: 2 (Page a was already in memory)

Page Request: c
Main Memory: a b c
Page Faults: 3

Page Request: d
Main Memory: b c d
Page Faults: 4

Page Request: a
Main Memory: a c d
Page Faults: 5

Page Request: e
Main Memory: a c e
Page Faults: 6

Page Request: f
Main Memory: a c e f
Page Faults: 7

Page Request: g
Main Memory: a c e g
Page Faults: 8

Page Request: c
Main Memory: a c e g
Page Faults: 8 (Page c was already in memory)

Page Request: b
Main Memory: a c e g
Page Faults: 8 (Page b was already in memory)

Page Request: g
Main Memory: a c e g
Page Faults: 8 (Page g was already in memory)

Failure ratio = Total page faults / Total number of page requests
Failure ratio = 8 / 12 = 0.67

Success ratio = 1 - Failure ratio
Success ratio = 1 - 0.67 = 0.33

b. Let's increase the size of memory to four page frames and repeat the simulation.

Page Request: a
Main Memory: a * * *
Page Faults: 1

Page Request: b
Main Memory: a b * *
Page Faults: 2

Page Request: a
Main Memory: a b * *
Page Faults: 2 (Page a was already in memory)

Page Request: c
Main Memory: a b c *
Page Faults: 3

Page Request: d
Main Memory: b c d *
Page Faults: 4

Page Request: a
Main Memory: b c d a
Page Faults: 5

Page Request: e
Main Memory: c d a e
Page Faults: 6

Page Request: f
Main Memory: d a e f
Page Faults: 7

Page Request: g
Main Memory: a e f g
Page Faults: 8

Page Request: c
Main Memory: a e f g
Page Faults: 8 (Page c was already in memory)

Page Request: b
Main Memory: a e f g
Page Faults: 8 (Page b was already in memory)

Page Request: g
Main Memory: a e f g
Page Faults: 8 (Page g was already in memory)

Failure ratio = 8 / 12 = 0.67

Success ratio = 1 - Failure ratio
Success ratio = 1 - 0.67 = 0.33

c. Yes, the result corresponds with intuition. Increasing the size of memory did not affect the failure and success ratios in this case. This is because the page requests were already repetitive, and having an extra page frame did not prevent the occurrence of page faults. In both cases, the failure ratio remained at 0.67 and the success ratio remained at 0.33.

Given that main memory is composed of three page frames for public use and that a seven-page program (with pages a, b, c, d, e, f, g) requests pages in the following order: