Ques - Chapter 03 - 1 - Sum2019

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Chapter 03 – Memory management

I. Problems

3.1. Consider a swapping system in which memory consists of the following hole
sizes in memory order: 10 KB, 4 KB, 20 KB, 18 KB, 7 KB. 9 KB, 12 KB, and 15
KB. Which hole is taken for successive segment requests of 12 KB, 10 KB, 9 KB for
first fit? Now repeat the question for best fit, worst fit, and next fit.
3.2. If there are 64 pages and the page size is 2048 words, what is the length of
logical address?
3.3. Suppose a virtual address space of 2^28 words and the page size is 2^12 words.
If the virtual address is 1234567 in Hexadecimal, what would be the page number in
Hexadecimal?
3.4. A machine with 512 MB memory has 64 bit memory word. If the frame size is
16 KB, how many bits are used to indicate the frame number?
3.5. A machine with 512 MB memory has 64 bit memory word. If the frame size is
16 KB, how many bits are used to indicate the page offset?
3.6. A computer with a 32-bit address uses a two-level page table. Virtual addresses
are split into a 9-bit top-level page table field, and 11-bit second-level page table
field, and an offset. How many pages are there in the address space?
3.7. A computer with a 32-bit address uses a two-level page table. Virtual addresses
are split into a 10-bit top-level page table field, and 12-bit second-level page table
field, and an offset. How large are the pages?
3.8. A computer has four page frames. The time of loading, time of last access, and
the R and M bits for each page are as shown below (the times are in clock ticks):
Page Loaded Last ref. R M
----------------------------------------------------------------------
0 226 280 0 0
1 160 265 0 1
2 110 270 1 0
3 120 285 1 1
Which page will LRU replace?
Which page will FIFO replace?
Which page will NRU replace?
Which page will Second chance method replace?
3.9. Using the page table of Fig. 4-10, give the physical address corresponding to
each of the following virtual addresses:
(a) 20
(b) 4100
(c) 8300
.

a) 82xx b) 41xx

Figure 4-10. The relation between virtual addresses and physical memory addresses
is given by the page table

II. Review questions

1. What is the problem with no memory abstraction?

2. What is swapping?

3. What are the two methods of keep track of memory usages?

4. What are the advantages of the linked list method?

5. Understand algorithms to allocate memory: first fit, next fit, best fit, worst fit

6. What is the unit of virtual memory, and of physical memory?

7. What is the page table mainly for?

8. What is TLB and what is that for?

9. Explain the term Segmentation?

You might also like