Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Looks like this question has been asked several times but never fully answered.

ID: 3742456 • Letter: L

Question

Looks like this question has been asked several times but never fully answered.

Consider a paging system with the page table in memory.

If a memory reference takes 100 nanoseconds, how long does a paged memory reference take?

B. 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 for the TLBs takes 20 nanoseconds.)

           

C. It takes 750 milliseconds to service a page fault. The page fault rate is .001. What is the EAT? Include the TLB hit

    and miss portions of the equation.

                 

D. What is the purpose of a TLB?

     

E. What is the purpose of paging?

Explanation / Answer


A) if a memory reference takes 100 nanoseconds, how long does a paged memory reference take?
---> In Paged Memory reference, CPU generates logical address but data is stored in actual physical address.So paged memory reference needed 2 memory access - one to find actual address from logical address ( so one lookup in page table i.e - 100 ns for page lookup) and then 100 ns required access actual address.
Total time - 100+100 = 200ns

B) 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 for the TLBs takes 20 nanoseconds.  
---> Effective memory reference time :- TLBmisstime*(1-TLB_hit_rate)+TLBhittime*(TLB_hit_rate)
TLBmisstime = (TLBsearch time+ 2*memory access time) // as TLBmiss happens so we have to look at page table to find actual address so (2 times memory access : 1(page lookup) + 1(actual memory access))
TLBhittime = (TLBsearch time + memory access time)  
( TLB_hit_rate = number of times page found in TLB i.e = 0.75,
TLB_miss_rate = 1-TLB_hit_rate i.e. = 1-0.75 = 0.25 ,
TLBsearch time = 20ns
memory access time = 100ns)
now on putting values
Effective memory reference time = (TLBsearch time+2*memory access time)*TLB_miss_rate + (TLBsearch time+memory access time)*TLB_hit_rate
= (20+2*100)*0.25 + (20+100)*0.75
= 220*0.25 + 120*0.75
= 55+90
= 145ns ANS.

C) What is the purpose of a TLB?
---> in short -> IT's a hardware support for the speed up the paging concept.(high speed cache)
in long ->
page number -> logical address
frame number -> physical address
when CPU generates Logical address,but the page/data is stored in physical memory. so we have required to place a physical address to fetch a page. for this purpose os keep a table called page table that is a mapping between page number and frame number (logical adddress -> physical address). so to find actual physical addres os has to looked up page table. so to speed this process, there is TLB(a translation lookaside buffer). it works as a high speed cache. it contains most recently used/accessed page to frame numbers).so when logical address is generated, search start with checking in very fast caches. if it is notthere so os has to look for memory's physical address. now at this time TLB is checked for quick lookup to find location in memory.

D) What is purpose of paging ?
---> Paging is a memory management scheme in which memory is partitioned into fixed size pages. so it dividing up whole process into multiple smaller set of instructions and store them on Random Access Memory. ( and can be at different indexes or in a non contiguous manner).
It discards the requirement of contiguous allocation of physical memory.i.e. physical address space of a programme need not to be contiguous.It solves the problem of external fragmentation. external fragmentation is problem -> when total memory space is enough for a procee but it is not contoguous so paging minimises it.