Main Memory Template

  1. Assuming a 1-KB page size, indicate the page numbers and offsets for the following address references (provided as decimal numbers) in the table below:
Address Reference Page Offset
  1. 3085
   
  1. 42095
   
  1. 215201
   
  1. 650000
   
  1. 2000001
   

 

  1. Consider a logical address space of 256 pages with a 4-KB page size, mapped onto a physical memory of 64 frames.
  1. How many bits are required in the logical address? Explain how you arrived at this solution.

Answer: ____________________________

Explanation:

 

  1. How many bits are required in the physical address? Explain how you arrived at this solution.

Answer: ____________________________

Explanation:

 

  1. 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?

Logical Addresses Physical Addresses
  1. 0,430
 
  1. 1,10
 
  1. 2,500
 
  1. 3,400
 
  1. 4,112
 

 

  1. Consider a paging system with the page table stored in memory.
  1. If a memory reference takes 50 nanoseconds, how long does a paged memory reference take? Explain how you arrived at this solution.

Answer: ______________________________________________________

  1. If we add TLBs, and 75 percent of all page-table references are found in the TLBs, what is the effective memory reference time? (Assume that finding a page-table entry in the TLBs takes 2 nanoseconds, if the entry is present.) You must show your calculations to receive full credit.

Answer: ______________________________________________________

  1. Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and 125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in order)? First-fit is already done for you as an example.
  2. First-fit:

115 KB is put in 300 KB partition, leaving (185 KB, 600 KB, 350 KB, 200 KB, 750 KB, 125 KB)

500 KB is put in 600 KB partition, leaving (185 KB, 100 KB, 350 KB, 200 KB, 750 KB, 125 KB)

358 KB is put in 750 KB partition, leaving (185 KB, 100 KB, 350 KB, 200 KB, 392 KB, 125 KB)

200 KB is put in 350 KB partition, leaving (185 KB, 100 KB, 150 KB, 200 KB, 392 KB, 125 KB)

375 KB is put in 392 KB partition, leaving (185 KB, 100 KB, 150 KB, 200 KB, 17KB, 125 KB)

 

  1. Best-fit
  2. Worst-fit

 

  1. Rank the algorithms in terms of how efficiently they use memory. Explain how and why you ranked them as you did.

 

  1. In a minimum of 100 words, explain the difference between internal and external fragmentation.
  2. In a minimum of 100 words, compare the memory organization schemes of contiguous memory allocation, pure segmentation, and pure paging with respect to the following issues:
  3. External fragmentation
  4. Internal fragmentation
  5. Ability to share code across processes