Operating systems Memory management assignment 1 Consider a

Operating systems - Memory management assignment

1. Consider a swapping system in which memory consists of the following hole sizes in memory
order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB. Which hole is taken for
successive segment requests of:
a. 12 MB
b. 10 MB
c. 9 MB
d. 8 MB
e. 8 MB
for each of these algorithms: First-fit, Worst-fit, Best-fit

2. For each of the following decimal virtual addresses, compute the virtual page number and offset
for a 4-KB page and for an 8-KB page:
a. 2024
b. 4097
c. 8191
d. 8192
e. 8193

3- A computer whose processes have 1024 pages in their address spaces keeps its page map tables
in memory. The overhead required for reading a word from the PMT is 6 nsec. To reduce this
overhead, the computer has a TLB which holds 32 entries (page/frame pairs) and can do a
lookup in just 1 nsec. What hit ratio must the TLB achieve in order to reduce the average
overhead from 6 to 2 nsec?

Kindly, step by step sloution ..

Solution

Answer :

1. Consider a swapping system in which memory consists of the following hole sizes in memory
order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB. Which hole is taken for
successive segment requests of:
a. 12 MB
b. 10 MB
c. 9 MB
d. 8 MB
e. 8 MB

for each of these algorithms: First-fit, Worst-fit, Best-fit

Answer :

First Fit : 20k , 10k ,18k

Worst Fit : 20k ,18k , 15k

Best Fit   : 12k , 10k ,9k

....................................

3- A computer whose processes have 1024 pages in their address spaces keeps its page map tables
in memory. The overhead required for reading a word from the PMT is 6 nsec. To reduce this
overhead, the computer has a TLB which holds 32 entries (page/frame pairs) and can do a
lookup in just 1 nsec. What hit ratio must the TLB achieve in order to reduce the average
overhead from 6 to 2 nsec?


Answer :

    We consider that, h is the hit rate

   Effective instructon time ----->1h + 6(1 - h)

hit ratio must the TLB achieve in order to reduce the average
overhead from 6 to 2 nsec

        => 1h + 6(1 - h) =2

        => 1h + 6 - 6h = 2

        => 6 - 5h = 2

         => 6 - 2 = 5h

          => 4/5 = h

          => h = 0.8

hit ratio must be 0.8 ,the TLB achieve in order to reduce the average
overhead from 6 to 2 nsec.

.................

First-fit Best-Fit Worst-Fit
12 20 12 20
10 10 10 18
9 18 9 15
Operating systems - Memory management assignment 1. Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB
Operating systems - Memory management assignment 1. Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site