← RTL Design Interviews · SoC Architecture Interviews

Interview Question · Explain the SoC

Trace a Load Through Translation

L1 JuniorL3 Seniorexplain the soc

The Question

The interviewer asks

The TLB has four entries and the page table has two levels. The core loads from 0x00403abc. What information can a TLB hit supply?

Reveal the Model Answer

Look up the virtual page number in the current address space. A valid matching entry supplies a physical frame and access permissions. If the load is allowed, retain the twelve offset bits. S3.23 reads entry 0000245b at 1100c. Frame 09 gives physical address 0x09abc. The ap_soc chip itself uses physical addresses directly.

Self-Check

Tick each key point you covered in your answer.

What Interviewers Want to Hear (Junior)

Keep the offset while replacing the virtual page number.

Choose Your Follow-up

I’ve answered the opening question

Choose the route closest to your reasoning. Answer the follow-up aloud, then open the closing question.

I missed in the TLB.

For page 00403, S3.23 reads 10004 at e2 and 1100c at e3. Why are those different addresses, and what happens at e4?

Reveal the Model Answer

The upper page index selects a root entry pointing to table frame 11. The lower index selects the leaf there, giving frame 09. Refill under the saved virtual page and retry. The access hits at e4, and the next same-page access takes one edge.

Self-Check

Tick each key point you covered in your answer.

Revoke Write Permission

The program keeps its address-space ID. In S3.24 the operating system removes write permission, yet the next store succeeds. What completes the change?

Reveal the Model Answer

Invalidate the cached translation wherever that address space may still use it. Complete the invalidation before relying on the new protection. Retry the store and check that the new entry denies it. Count subsequent walks when pricing invalidation.

Self-Check

Tick each key point you covered in your answer.

I found a valid leaf.

S3.22 allows a user fetch from 00403000. A user store to 00403abc sees the same entry 0000245b. Should the walker look for another mapping?

Reveal the Model Answer

Both addresses share one page. Its execute permission allows the fetch, but W is zero. Report a store page fault and suppress the memory write. Walking again cannot grant permission.

Self-Check

Tick each key point you covered in your answer.

Revoke Write Permission

The program keeps its address-space ID. In S3.24 the operating system removes write permission, yet the next store succeeds. What completes the change?

Reveal the Model Answer

Invalidate the cached translation wherever that address space may still use it. Complete the invalidation before relying on the new protection. Retry the store and check that the new entry denies it. Count subsequent walks when pricing invalidation.

Self-Check

Tick each key point you covered in your answer.

I kept the TLB across switches.

Across ten turns S3.24 counts 20 walks with flushing and four with address-space IDs. What lookup rule earns that saving safely?

Reveal the Model Answer

Include the address-space ID in the match so both programs can retain their own translations. Without IDs, flush old entries on the switch. Otherwise a valid hit could select the previous program’s frame.

Self-Check

Tick each key point you covered in your answer.

Revoke Write Permission

The program keeps its address-space ID. In S3.24 the operating system removes write permission, yet the next store succeeds. What completes the change?

Reveal the Model Answer

Invalidate the cached translation wherever that address space may still use it. Complete the invalidation before relying on the new protection. Retry the store and check that the new entry denies it. Count subsequent walks when pricing invalidation.

Self-Check

Tick each key point you covered in your answer.

I checked read and write permission.

Page 00405 permits user reads and writes. Why do its first load and first store fault in the S3.22 model?

Reveal the Model Answer

A is the accessed bit. With A clear, even the load faults. Setting A permits the load, but a store still faults while D, the dirty bit, is clear. With both set, the store reaches physical address 07000.

Self-Check

Tick each key point you covered in your answer.

Revoke Write Permission

The program keeps its address-space ID. In S3.24 the operating system removes write permission, yet the next store succeeds. What completes the change?

Reveal the Model Answer

Invalidate the cached translation wherever that address space may still use it. Complete the invalidation before relying on the new protection. Retry the store and check that the new entry denies it. Count subsequent walks when pricing invalidation.

Self-Check

Tick each key point you covered in your answer.

I wanted to start the cache lookup sooner.

Which virtual address bits can select a cache set before the physical frame is known?

Reveal the Model Answer

Use index bits entirely within the unchanged page offset, then compare the physical tag. Two names for the same block will select the same set. Taking an index bit from the virtual page number can put one block in two sets with conflicting copies.

Self-Check

Tick each key point you covered in your answer.

Revoke Write Permission

The program keeps its address-space ID. In S3.24 the operating system removes write permission, yet the next store succeeds. What completes the change?

Reveal the Model Answer

Invalidate the cached translation wherever that address space may still use it. Complete the invalidation before relying on the new protection. Retry the store and check that the new entry denies it. Count subsequent walks when pricing invalidation.

Self-Check

Tick each key point you covered in your answer.

What People Get Wrong

Common wrong answers and why they fail.

Half-Truth

Every TLB miss traps to software.

A hardware walker can resolve a valid mapping and retry the access.

Half-Truth

A matching frame lets every access proceed.

The faulty S3.8 hit skips the W check and allows the store to 00403abc. Check the requested access even on a hit.

Learn It, Then Prove It