Problem Set 4
Problem Set 4
Brian Kidd
4/12/2015
1. (+12) Describe at least 3 general approaches in memory management
than can help solve the external fragmentation problem.
Worst fit finds the largest chunk that is big enough. Best fit finds the smallest chunk that is big enough.
First fit finds the first chunk that is big enough, and next fit finds the next sequential (with respect to the
last block allocated) chunk that is big enough.
2. (+12) A memory manager for a variable-sized region strategy has a
free list of blocks of size 600, 400, 1000, 2200, 1600, and 1050
bytes. What block will be selected to honor a request for:
a.
The block of 2200 bytes will be selected.
b.
The block of 1000 bytes will be selected.
c.
The block of 2200 bytes will be selected.
d.
The block of 2200 bytes will be selected.
e.
The block of 2200 bytes will be selected.
f.
The block of 2200 bytes will be selected.
P2
X
Y
1
2
3
4
5
Y
6
7
RAM
FRAME PAGE
#
#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
X
Y
1
2
3
4
5
6
7
PAGE TABLES
P1
PHYSICAL
FRAME
LOGICAL
PAGE
X
Y
1
2
3
4
5
P1
PHYSICAL
FRAME
LOGICAL
PAGE
1
2
3
4
5
6
7
X
Y
6
7
1
2
8
9
5. (+12) The Least Recently Used (LRU) page replacement policy does not
suffer from Belady's Anomaly. Explain intuitively why this is the
case. Construct an example page fault sequence to illustrate your
point.
Beladays Anomoly points out that by changing the size of the queue, the order in which things are
replaced changes.
LRU
1
2
1
2
3
4
2
3
4
5
3
4
5
6
1
5
6
1
5
6
1
5
4
2
5
4
1
2
1
2
3
1
2
3
4
5
2
3
4
5
6
3
4
1
6
3
4
1
6
5
4
1
6
5
4
1
2
5
4
PAGE FAULT
PAGE FAULT