Operating Systems

 

Homework #6

Due: 2004/6/2

 

1.      Name two differences between logical and physical addresses and explain the difference between internal and external fragmentation.

 

2.      Given memory partitions of 100KB, 500KB, 200KB, 300KB, and 600KB (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212KB, 417KB, 112KB, and 426KB (in order)? Which algorithm makes the most efficient use of memory?

 

3.      Consider the following segment table:

 

Segment

 

Base

 

Length

0

 

219

 

600

1

 

2300

 

14

2

 

90

 

100

3

 

1327

 

580

4

 

1952

 

96

 

What are the physical addresses for the following logical addresses?

 

a.       0430

b.      110

c.       2500

d.      3400

e.       4112

 

4.      Consider the following page-replacement algorithms. Rank these algorithms on a five-point scale from gbadh to gperfecth according to their page-fault rate. Separate those algorithms that suffer from Beladyfs anomaly from those that do not.

 

a.       LRU replacement

b.      FIFO replacement

c.       Optimal replacement

d.      Second-chance replacement