user3398928
user3398928

Reputation: 63

Calculating effective address translation time

Does anyone know the formula for calculating the effective address-translation time?

For example, how to solve following problem:

Given an information as below:

  • The TLB can hold 1024 entries and can be accessed in 1 clock cycle (1 nsec).

  • A page table entry can be found in 100 clock cycles or 100 nsec.

  • The average page replacement time is 6 msec.

If page references are handled by the TLB 99% of the time, and only 0.01% lead to a page fault, what is the effective address-translation time?

So is it 1 nsec + (0.01% x 100 nsec) ?

Upvotes: 2

Views: 3674

Answers (2)

Nirmal Aryal
Nirmal Aryal

Reputation: 1

All correct but u just need to add one time memory access too. bcz ur formula says what time it will take if hit and same if miss but after that

Upvotes: -1

VividD
VividD

Reputation: 10534

Based on the data in the question, in case of address translation (virtual-to-physical), following would happen:

  • with 0.99 probability, needed physical address would be in TLB (access time 1 ns)
  • with 0.01 probability, needed physical address would not be in TLB, and for such cases
    • with 0.0001 probability, page fault would happen (access time 6000000 ns)
    • with 0.01-0.0001 = 0.0099 probability, page fault would not happen (access time 100 ns)

The average access time would than be 0.99 * 1 ns + 0.0001 * 6000000 ns + 0.0099 * 100 ns = 601.98 ns.

Upvotes: 2

Related Questions