Numerical-I Solved For Belady’s Anomaly Problem

Q1. If the reference string is

0 1 2 3 0 1 4 0 1 2 3 4

then solve by First In First Out Disk Scheduling Algorithm using physical memory of three frames and four frames.

The below figure shows how with 3 frames the number of page faults are 9 while we get 10 page faults with 4 frames.

7 0 1 2 0 3 0 4 2 3 0 3
Frame1 7 7 7 2 2 2 2 4 4 4 0 0
Frame2 0 0 0 0 3 3 3 2 2 2 2
Frame3 1 1 1 1 0 0 0 3 3 3
Faults + + + + + + + + + + +

Page faults = 9 (3 frames)

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

Page faults = 4 (4 frames)

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