0% found this document useful (0 votes)
4 views1 page

Memory Paging Example(2)

Uploaded by

Arb Dandnha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Memory Paging Example(2)

Uploaded by

Arb Dandnha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Memory Paging Example:

Consider a system of 2 GB (231 B) of memory with a frame size of 4 KB (212 B) and a process P with a logical
address space of size 250 KB. Assume that the page table allocates frame number K+1,000 to page K of
this process. Answer the following questions showing all steps in your solution.

1. What is the physical address of the logical address 443322?


Logical Address = 443322
Virtual Logical Address = (FLOOR (443322/4096), 443322%4096) = (108, 954)
Virtual Physical Address = (1000+108, 954) = (1108, 954)
Physical Address = 1108*4096 + 954 = 4,539,322

2. What is the amount of internal fragmentation, if any?


Internal Fragmentation = Page Size – (Process Size % Page Size)
Internal Fragmentation = 4 KB – (250 KB % 4 KB) = 4 KB - 2 KB =2 KB

3. How many pages are needed to represent this process?


Number of pages = CEIL (Process Size / Page Size) = CEIL (250 KB / 4 KB) = 63 pages

4. How many frames are there in this system?


Number of system frames = Memory Size / Frame Size = 2 GB / 4 KB = 231 /212 = 219 frames

5. How many bits are needed to represent the following:


a. The page number: CIEL(log2 (number of pages)) = CEIL (log2 (63)) = 6 bits
b. The offset : log2 (page size) = log2 (4096) = 12 bits

6. If an entry in the page table consists of a frame number and the offset, what is the size of the
page table for this process in bits?

Page Table Size = (#Bits to represent frame + #Bits to represent offset) * number of pages

= (19 + 12) * 63

= 31 * 63 = 1953 bits

You might also like