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

d) Now consider that we are executing one of these programs for the very first t

ID: 3699204 • Letter: D

Question

d) Now consider that we are executing one of these programs for the very first time. Assume we have a memory system with TLB, L1 I-cache, L1 Dcache, L2 cache and 2-level Page Table Virtual Memory system. List all the steps that will/may happen as we load instructions or data from memory. You will also need to list the steps taken when target instructions or data are not in cache or page tables. i.e. the steps to handle misses. Load instructions 1. Read instruction: check TLB if instruction is in memory by looking up its virtual page number. 2. If virtual page number is not present in TLB, read miss. Check L1 page table to see if virtual page number is present.

Explanation / Answer

Scenario: Instructions are executed for the first time

1. Read instruction

2. Check TLB => TLB miss (since first time execution).If present bring the page into main memory.

3. Check L1-Icache(I-cache has to be checked for instructions and D-cache for data) page table, miss

4. Check L2-cache, miss

5. Check Virtual memory system page table, miss

6. Bring a page containing instruction into the main memory

7. Update TLB, L1-Icache, L2-cache & virtual memory for new page