📖 Explanation
To calculate the effective average instruction execution time, we first determine the Effective Memory Access Time (EAT). For a 2-level paging system, a TLB miss typically incurs two additional memory accesses to resolve the page tables (assuming the data access is included in the instruction's 2 memory accesses). Thus, EAT is:
EAT=h×tmem+(1−h)×(2×tmem)=0.9(150 ns)+0.1(300 ns)=135+30=165 ns
Next, we calculate the contribution of page faults to the execution time. Given a page fault rate p=10−4 and service time tpf=8 ms=8,000,000 ns:
Tpf_penalty=p×tpf=10−4×8,000,000 ns=800 ns
The total instruction execution time is the sum of CPU time, memory access time, and page fault penalty:
Ttotal=tcpu+(nmem×EAT)+Tpf_penalty=100 ns+(2×165 ns)+800 ns=100+330+800=1230 ns