Question
Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read in from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal place) is _______.
Official answer and solution
- Accepted answers
- 154.5 to 155.5
- From
- Official GATE 2020 answer key
Solution
Calculate effective memory access time by combining TLB hit, page table access, and page fault service paths.
System parameters:
- TLB access time:
- Main memory access time:
- Disk page transfer time:
- TLB hit ratio:
- Page fault rate: (on TLB miss)
- Dirty page write-back proportion: of page faults
Case 1: TLB Hit (probability 0.95):
- Address translation found in TLB (20 ns), then data accessed in main memory (100 ns):
Case 2: TLB Miss (probability 0.05):
- TLB lookup performed first ().
- Page table in main memory accessed ().
- Subcase 2a: No Page Fault (probability ):
- Data accessed in main memory ().
- Total time = .
- Subcase 2b: Page Fault (probability ):
- Disk service: 20% need write-back and read (), 80% need only read ().
- Average disk transfer time = .
- Then data accessed in main memory ().
- Total time = .
- Subcase 2a: No Page Fault (probability ):
- Average TLB miss time:
Average Memory Access Time (AMAT):
(Accepted range: 154.5 to 155.5 ns).
155.0
The answer is the one in the official GATE answer key. The solution is this site's own explanation.
Source
- Paper
- GATE 2020 Computer Science and Information Technology (CS)
- Question
- 63 of 65, printed as CS Q.53
- Section
- Computer Science and Information Technology
Report an error in this question
GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.