Numerical-II Solved For Belady’s Anomaly Problem

Q2. The reference string is:

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

Solve it with 3 frames and 4 frames while using FIFO technique.

Solu: Using 3 frames

1 2 3 4 1 2 5 1 2 3 4 5
Frame1 1 1 1 4 4 4 5 5 5 5 5 5
Frame2 2 2 2 1 1 1 1 1 3 3 3
Frame3 3 3 3 2 2 2 2 2 4 4
Faults + + + + + + + +

Page Fault = 9

Using 4 frames

1 2 3 4 1 2 5 1 2 3 4 5
Frame1 1 1 1 1 1 1 5 5 5 5 4 4
Frame2 2 2 2 2 2 2 1 1 1 1 5
Frame3 3 3 3 3 3 2 2 2 2
Frame4 4 4 4 4 4 4 3 3 3
Faults + + + + + + + + + +

Page Fault = 10

(Problem of Belady’s Ananmoly)

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s