GATE / CS ARCHIVE

SUBJECT COLLECTION

Operating Systems · Virtual Memory & Paging

76 questions, newest first

GATE CSE has asked 76 questions on Virtual Memory & Paging (Operating Systems) from 1992 to 2026, in 43 of the 46 papers; the most recent is in GATE CSE 2026 Set 2. In the last five years it carried 3 marks per 100-mark paper on average, against 2.1 since 2003. Since 2014 the questions have been 17 NAT, 8 MCQ and 4 MSQ. 8 groups of questions here are solved the same way; “One per method” keeps the newest of each.

Browse topics
Show
2 marks · MSQ
Report issue

TLB, page-table and physical-cache outcomes

Virtual Memory & Paging

Question 54, GATE 2026: A cache is physically addressed. An MMU has a TLB, and eviction of a page invalidates that page’s cache blocks. Which sequences cannot occur for a reference: A TLB miss/page-table hit/cache hit; B TLB hit/page-table miss/cache hit; C TLB miss/page-table miss/cache hit; D TLB miss/page-table miss/cache miss?
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

Givens and goal

A cache is physically addressed. An MMU has a TLB, and eviction of a page invalidates that page’s cache blocks. Which sequences cannot occur for a reference: A TLB miss/page-table hit/cache hit; B TLB hit/page-table miss/cache hit; C TLB miss/page-table miss/cache hit; D TLB miss/page-table miss/cache miss?

Approach

Distinguish a missing cached translation from a nonresident page, and apply the cache invalidation condition.

Step-by-step solution

1. Interpret a page-table miss here as a nonresident page (a page fault), not as a cache miss while fetching the page-table entry. The cache is physically addressed, so the ordinary sequence first resolves virtual-to-physical translation and then accesses the referenced cache block.
2. A TLB miss can occur even when the page is resident: the translation may simply not be cached in the TLB. After a successful page-table lookup the data block may still be present in the cache. Therefore A is possible.
3. In a correctly maintained translation system, a TLB hit supplies a valid resident-page translation, and a page-table walk is not needed for that reference. It cannot simultaneously be the page-table-fault sequence described in B. Thus B is impossible.
4. If the referenced page is absent from memory, the stated invalidation rule prevents its data blocks from remaining valid in the cache. Therefore the page-fault-plus-cache-hit sequence C is impossible. A TLB miss, page fault and absence of the data block from cache, as in D, is possible.

Interpretation note: These are hit/miss conditions for the original reference before fault recovery. Fault servicing can populate memory or cache and then retry the instruction; hits on that later retry are not the same event sequence. Correct TLB invalidation is implicit in a functioning virtual-memory system.

Possible-state examples help separate the two misses. A resident page whose translation has been displaced from the small TLB, but whose recently used data still sits in cache, gives A. A never-loaded virtual page gives a TLB miss and page fault; since it has no valid physical cached block, its initial data access is also a cache miss, matching D. “Page-table miss” is not being used to mean that the page-table entry itself missed in a processor cache.

Original paper, page 42 · Answer key

2 marks · NAT
Report issue

Computing TLB storage from reach

Virtual Memory & Paging

Question 54, GATE 2026: A TLB reaches 1 MB with 4 KB pages. Virtual space is 64 GB and physical space 1 GB. Each entry stores a 4-bit process ID, virtual page number, physical frame number, and 2 control bits. Find the TLB size in bytes, with binary K,M,G.
Tap to enlarge
Answer & solution

Official answer: 1536

Step through it (6 steps)

Givens and goal

A TLB reaches 1 MB with 4 KB pages. Virtual space is 64 GB and physical space 1 GB. Each entry stores a 4-bit process ID, virtual page number, physical frame number, and 2 control bits. Find the TLB size in bytes, with binary K,M,G.

Approach

Find entry count and entry width independently, then multiply.

Step-by-step solution

1. TLB reach is number of entries times page size. Therefore the number of entries is 2²⁰/2¹²=2⁸=256.
2. Virtual space 64 GB equals 2³⁶ bytes, requiring a 36-bit address. A 4 KB page has a 12-bit byte offset. The virtual page number therefore has 36−12=24 bits.
3. Physical space 1 GB equals 2³⁰ bytes, requiring a 30-bit address. Removing the same 12-bit offset leaves an 18-bit physical frame number.
4. One entry contains 4+24+18+2=48 bits, or 6 bytes. Total storage is 256×6=1536 bytes.
5. The page offset is not stored as part of a translation entry because it passes through unchanged. This answer includes exactly the specified fields and assumes no unmentioned padding, replacement information, or other implementation metadata.

Original paper, page 39 · Answer key

1 mark · MCQ
Report issue

Sizing a virtual page table

Virtual Memory & Paging

Question 14, GATE 2025: A byte-addressable demand-paged machine has 32-bit logical addresses, 20-bit physical addresses, and 2048-byte pages. What is the maximum number of entries in a conventional page table? A 2^21; B 2^20; C 2^22; D 2^24.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (5 steps)

Approach: Count virtual pages, because a conventional page table has one possible entry per virtual page.
The page size is 2048=211 bytes, so the low 11 bits of a logical address identify a byte within its page. The remaining 32−11=21 bits identify the virtual page. There are therefore 221 possible virtual-page numbers, selecting A.
Equivalently, the virtual address space has 232 bytes and dividing by 211 bytes per page gives 221 pages. Physical-address width is not the numerator in this calculation. It determines that physical memory can contain 220−11=29 frames and that a frame number needs 9 bits.
Demand paging may leave many entries invalid or pages absent from physical memory, but that does not reduce the maximum number of distinct virtual pages the table must represent.

Original paper, page 14 · Answer key

2 marks · NAT
Report issue

Simulating four-reference lookahead replacement

Virtual Memory & Paging

Question 54, GATE 2025: Three page frames start empty. References are 1,3,2,4,2,3,1,2,4,3,1,4. A modified optimal replacement algorithm predicts only a window of four references including the current request, evicting the resident page used farthest in that window, or absent from it. Count page faults.
Tap to enlarge
Answer & solution

Official answer: 6

Step through it (14 steps)

Approach: Simulate each request, and on a full-frame miss inspect only the allowed lookahead window.
Requests 1,3,2 fill the empty frames and cause three faults, leaving {1,2,3}. At request 4 (position 4), the window is [4,2,3,1]. Among resident pages, 1 is used farthest away, so evict 1 and load 4: fault 4, frames {2,3,4}. The next requests 2 and 3 hit.
At position 7, request 1 misses. The window [1,2,4,3] places resident 3 farthest in the future, so evict 3: fault 5, frames {1,2,4}. Requests 2 and 4 then hit.
At position 10, request 3 misses. Only [3,1,4] remains. Resident 2 is absent from that window, so evict 2: fault 6, frames {1,3,4}. The last two requests, 1 and 4, hit.
There are six faults, at positions 1,2,3,4,7,10. No replacement tie affects this trace. The current request is included in the four-reference horizon, so the prediction is of at most three additional future accesses, not four.

Original paper, page 54 · Answer key

2 marks · MSQ
Report issue

Virtual Memory & Paging

Question 47, GATE 2025: A demand-paging system has three initially empty frames and reference string [1,2,3,4,5,4,1,6,4,5,1,3,2]. In frame order, the resident triples after each reference are:
1:(1,−,−); 2:(1,2,−); 3:(1,2,3); 4:(1,4,3); 5:(1,4,5); 6:(1,4,5); 7:(1,4,5); 8:(6,4,5); 9:(6,4,5); 10:(6,4,5); 11:(6,1,5); 12:(6,1,3); 13:(2,1,3).
Which policies could produce this trace? A. LRU; B. LFU; C. MFU; D. optimal/farthest-next-use. Frequency-counter lifetime and tie-breaking are not stated.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: D

Our answer: D with lifetime counters; C;D with reset-on-load counters

Test policies at the first point where their required choice disagrees with the trace. LRU fails at reference 4: among pages 1,2,3, page 1 was used least recently, but the trace evicts page 2. LFU fails at reference 8: before loading page 6, resident reference counts are page 1:2, page 4:2, page 5:1. The trace evicts page 1 rather than the least frequent page 5. These counts agree under both lifetime and reset-on-load conventions at that point.

Optimal replacement is possible. At reference 4, pages 1,2,3 are next used at positions 7,13,12, so evict 2. At reference 5, residents 1,4,3 are next used at 7,6,12, so evict 3. At reference 8, residents 1,4,5 are next used at 11,9,10, so evict 1. At references 11,12,13, the displayed victim is never used again, so the trace can choose it among tied infinite-next-use victims. Thus D is valid.

MFU requires a convention. With lifetime counts, reference 11 loads page 1 with its cumulative count now 3. At reference 12, residents have counts 6:1,1:3,5:2, but the trace evicts 5, not 1. So lifetime MFU fails already there; the final eviction also contradicts it.

With counts reset on each page load, however, MFU can reproduce the whole trace: early victims 2 and 3 are tied at 1; at reference 8 choose page 1 tied with 4 at 2; at reference 11 evict 4 at 3; at reference 12 evict 5 at 2; at reference 13 all residents have count 1 and 6 may be evicted. Therefore C,D are possible under this interpretation. Preserve official answer D and discrepancy CS-2025-S2-Q47-MFU-COUNTERS. The ambiguity is about unspecified counters, not an error in the displayed trace.

Original paper, page 36 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 58, GATE 2025: A byte-addressable logical space has 2^32 bytes and uses two-level paging with 4096-byte pages. Each inner-page-table entry takes 8 bytes, and an inner table occupies one page. An address contains b outer-index bits, an inner-table entry index, and a data-page offset. Find b.
Tap to enlarge
Answer & solution

Official answer: 11

A 4096-byte data page needs log2(4096)=12 offset bits. An inner page table stored in one 4096-byte page holds 4096/8=512=29 entries. Selecting one of those entries therefore needs 9 bits.

The complete logical address has 32 bits, so the remaining outer index has b=32−12−9=11 bits. As a coverage check, each inner table maps 512 data pages, or 512·4096=221 bytes. A 232-byte space therefore needs 232−21=211 such inner-table slots in its outer table.

Do not allocate 12 independent address bits to the inner entry index just because an inner-table page is 4096 bytes. Entries are 8 bytes each; their byte offsets are aligned, leaving only 9 independent selection bits. The question does not require the entire outer table to fit a single page. Answer: 11.

Original paper, page 44 · Answer key

2 marks · NAT
Report issue

Translate a page number while preserving the offset

Virtual Memory & Paging

Question 62, GATE 2024: Pages are 2 KB, with addresses starting at zero. Virtual pages 0,1,2,3 occupy physical frames 1,3,2,0 respectively. What decimal physical address corresponds to decimal virtual address 2500? Use 1 KB=1024 bytes.
Tap to enlarge
Answer & solution

Official answer: 6596

Step through it (5 steps)

Approach: Split the virtual address into a page number and page offset. The page table replaces only the page number; the offset stays unchanged.
1. Page size is 2×1024=2048 bytes. Compute 2500=1×2048+452, so the virtual page is 1 and the offset within it is 452 bytes.
2. The mapping for virtual page 1 is physical frame 3. It is the second listed mapping because page numbering starts at 0.
3. Physical frame 3 begins at address 3×2048=6144. Add the same offset: 6144+452=6596.
Answer: 6596. The result lies within frame 3's address range [6144,8191], and subtracting its start recovers offset 452. Using page 2 or frame 1 would confuse zero-based numbering with the order in which the mappings are listed.

Original paper, page 35 · Answer key

1 mark · MSQ
Report issue

Hardware translation versus OS allocation

Virtual Memory & Paging

Question 24, GATE 2024: Which are MMU responsibilities in a paging system? A allocate a new process’s page table; B translate virtual to physical addresses with the page table; C trap on a missing/invalid page-table mapping; D trap on a write to a read-only page.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C, D

Approach: Separate fast hardware checks from policy and resource management performed by the operating system.

1. Derivation. The OS allocates a new process’s page-table structures, so A is not an MMU duty. The MMU uses the mappings to translate addresses, detects absent/invalid mappings and raises page-fault exceptions, and checks permissions such as write protection. Thus B, C, D. A TLB miss alone is not the same as a page being absent from the page table.

2. Explanation and checks. The MMU interprets the mapping and protection information supplied by the OS. For a valid writable mapping it can complete a write translation; for a nonpresent page or forbidden write it transfers control through an exception so the OS can decide what to do. Creating the table and allocating its memory belong to OS management. A TLB cache miss may be resolved by a page-table walk without any missing mapping or page-in operation.

Original paper, page 17 · Answer key

2 marks · NAT
Report issue

Minimize and maximize two-level page-table storage

Virtual Memory & Paging

Question 64, GATE 2024: A 32-bit byte-addressed system uses 4 KiB pages and 4-byte PTEs. Each process receives one outer directory page. Inner table pages are allocated only when they hold a valid mapping. A process accesses 2000 distinct pages and none is swapped out. Let X and Y be minimum and maximum total page-table pages over both levels. Find X+Y; do not count data pages.
Tap to enlarge
Answer & solution

Official answer: 1028

Approach: Compute how many data-page mappings each inner table can hold and how many inner tables the directory can address.

1. Derivation. A4KB table page holds 4096/4=1024 entries. The32-bit address divides into 10 outer-index bits, 10 inner-index bits and 12 offset bits, allowing 1024 inner table pages. Minimum table storage for 2000 mapped pages packs them into ceil(2000/1024)=2 inner pages plus the allocated outer page: X=3. Maximum spreads mappings across all 1024 distinct outer entries, possible with 2000 pages, giving Y=1024+1=1025. Thus X+Y=1028. Data pages themselves are not counted.

2. Explanation and checks. To achieve the minimum, map 1024 data pages through one outer entry and the remaining 976 through a second. To achieve the maximum, use at least one data page in each of the 1024 outer regions; the remaining 976 accesses can fall in regions already used. This construction shows the upper bound is attainable, not just theoretical. An outer entry does not itself map one data page: it selects an entire inner table, so counting 2000 table pages would be incorrect.

Original paper, page 40 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 57, GATE 2023: Row-major C array int D[128][128] is accessed by for i=0..127, for j=0..127, D[j][i]*=10. A page holds 512 array elements and 30 frames are available under LRU demand paging. Count faults in the intended page-aligned, initially nonresident array model; disclose these implicit assumptions.
Tap to enlarge
Answer & solution

Official answer: 4096

Under the usual page-aligned, initially nonresident array model, one page holds four complete rows because 512/128=4. The inner loop scans down a column and touches 32 pages in order, with four consecutive accesses per page. Only the first access of each four-row group faults. A cyclic traversal of 32 distinct pages with only 30 LRU frames has a miss on each page at every column: the reuse distance is 31 other pages. Hence 128 columns times 32 faults per column gives 4096. The standard answer implicitly assumes the array starts at a page boundary and ignores unrelated memory references. A non-page-aligned placement or a different initial residency can change the count; these are not specified explicitly.

Teaching detail. For aligned storage, element D[j][i] has page number floor((128j+i)/512)=floor(j/4) for each fixed i∈[0,127]. The page stream per column is therefore 0 repeated four times, 1 repeated four times, through 31 repeated four times. Only the first access to each repeated group faults. Between two uses of any page in successive columns are 31 distinct other pages, exceeding the 30-frame capacity, so no page survives until its next reuse. Multiplying 32 by 128 gives the count; multiplying 128² would ignore within-page hits.

Original paper, page 60 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 58, GATE 2023: A 57-bit virtual address uses an L-level tree of page tables. Pages are 4 KiB; each page-table entry is 8 bytes at every level. Find L under the conventional one-page-per-table-node layout.
Tap to enlarge
Answer & solution

Official answer: 5

Step through it (8 steps)

A 4 KiB page has a 12-bit offset. Under the conventional one-page-per-page-table-node layout, each node holds 4096/8=512 entries and contributes 9 index bits. The virtual page number has 57-12=45 bits, requiring L=45/9=5 levels. The page-sized table-node convention is implicit in this standard multilevel-paging calculation.

Teaching detail. The address must be partitioned into a page offset and a sequence of table indexes. Offset bits select one byte within 4096 bytes, so there are 12. Each page-sized table contains 512 entries, whose selection requires 9 bits. Five indexes account for 45 virtual-page bits and, together with the 12-bit offset, exactly cover 57 bits. In cases where this division is not exact, the top-level index can be shorter; here no partial level is needed. The result depends on page-sized table nodes, not merely on entry width alone.

Original paper, page 61 · Answer key

2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 38, GATE 2022: Identify the intended FALSE virtual-memory statement: A a TLB searches all valid entries associatively in parallel by virtual page number; B a TLB hit followed by a cache miss guarantees the word is in main memory; C a given inverted page table has identical access time for all virtual addresses; D distinct virtual addresses hashing to the same value necessarily have different memory access times. Retain literal-model qualifications.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Our answer: C in the intended textbook model; D is also overbroad literally

Inverted page-table lookup can scan or follow collision chains of different lengths, so access time is not always identical: C is false. The intended model treats A as a fully associative TLB search and B as a valid, coherent TLB translation implying resident data memory. D is intended to distinguish positions in a serial hash collision chain, but its literal universal claim is not valid: two distinct virtual byte addresses in the same virtual page share the same hashed page entry and may have identical access time. Other collision-resolution and caching implementations also defeat the asserted necessity. Preserve official C, while disclosing that the question needs distinct-page, serial-chain and textbook TLB assumptions to make it uniquely false.

An inverted table has one entry per physical frame and needs to locate a process/virtual-page pair; search or hash-chain length can vary by input. In a serial collision chain, different pages at different positions may take different time, explaining the intended D. But distinct byte addresses with the same page number use the same entry, providing a concrete counterexample to its unqualified wording.

Original paper, page 25 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 64, GATE 2022: Four initially empty demand-paging frames use LRU. References: 7,2,7,3,2,5,3,4,6,7,7,1,5,6,1. Find page faults/accesses rounded to one decimal.
Tap to enlarge
Answer & solution

Official answer: 0.6

Step through it (17 steps)

Simulating four LRU frames gives faults at reference positions 1, 2, 4, 6, 8, 9, 10, 12, 13, for the values 7, 2, 3, 5, 4, 6, 7, 1, 5. The other six references hit. In particular, the second consecutive 7 hits, and the last 6 and 1 both remain resident. Hence the fault rate is 9/15=0.6.

Maintain recency oldest→newest after each access: [7]; [7,2]; [2,7]; [2,7,3]; [7,3,2]; [7,3,2,5]; [7,2,5,3]; [2,5,3,4]; [5,3,4,6]; [3,4,6,7]; [3,4,6,7]; [4,6,7,1]; [6,7,1,5]; [7,1,5,6]; [7,5,6,1]. On a full-frame miss remove the oldest before appending; on a hit move the referenced page to newest.

Original paper, page 40 · Answer key

1 mark · MSQ
Report issue

Virtual Memory & Paging

Question 11, GATE 2021: Select all correct paging statements. A paging addresses external fragmentation; B page size has no impact on internal fragmentation; C paging incurs memory overhead; D multilevel paging is necessary to support different page sizes.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: A; C

Fixed-size page frames avoid external fragmentation, while partially filled pages still incur internal fragmentation whose amount depends on page size. Page tables and related translation metadata require memory overhead. Multiple page sizes can be supported without requiring multilevel page tables, so that mechanism is not logically necessary. Thus A, C.

External fragmentation means sufficient free space exists but is scattered into unusable variable-size gaps. Equal-sized frames avoid that requirement for contiguous allocation. Internal fragmentation occurs inside the final allocated page, potentially wasting almost one page per allocation. Translation requires page-table entries and sometimes additional levels or supporting structures. The number of page-table levels and the set of supported page sizes are separate design choices.

Original paper, page 17 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 48, GATE 2021: 39-bit virtual address splits as 9-bit level1,9-bit level2,9-bit level3,12-bit offset. Pages are 4KB and all PTEs 8 bytes. Process maps 2GB virtual to 2GB physical. Find minimum total page-table memory in KB, with binary KB/GB.
Tap to enlarge
Answer & solution

Official answer: 4108

Each page-table page holds 4096/8=512 entries. The2GB mapping needs 231/212=219 leaf entries, hence 1024 level3 pages. Packing these contiguously minimizes higher levels: 1024/512=2 level2 pages and one level1 root page. Total=(1024+2+1)*4KB=4108KB. This is the minimum with allocated whole page-table pages and a densely placed virtual mapping.

Each level-2 page indexes up to 512 level-3 pages, which collectively map 512×512×4KB=1GB. Thus the 2GB region can occupy two such subtrees under one root. Sparse placement could require more page-table pages; the word minimum permits contiguous, suitably aligned placement. Physical page contents consume 2GB but are not part of page-table overhead.

Original paper, page 85 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 53, GATE 2020: A one-level page table is in main memory. Main-memory access=100 ns, TLB lookup=20 ns, each disk page transfer=5000 ns. TLB hit ratio=95%, stated page-fault rate=10%, dirty victim on 20% of page faults, negligible TLB-update time. Find average access time to one decimal. The source does not explicitly state what conditions the fault rate.
Question 53, GATE 2020: A one-level page table is in main memory. Main-memory access=100 ns, TLB lookup=20 ns, each disk page transfer=5000 ns. TLB hit ratio=95%, stated page-fault rate=10%, dirty victim on 20% of page faults, negligible TLB-update time. Find average access time to one decimal. The source does not explicitly state what conditions the fault rate.
Tap to enlarge
Answer & solution

Official answer: 154.5 to 155.5

Our answer: 155.0 under conditional page-fault convention

Worked explanation

Under the intended conditional model, split all references into disjoint cases: TLB hit probability .95 and time 120; nonfaulting TLB miss probability .05×.9=.045 and time 220; clean-victim fault probability .05×.1×.8=.004 and time 5220; dirty-victim fault probability .05×.1×.2=.001 and time 10220. These probabilities sum to 1. Weighted contributions are 114,9.9,20.88,10.22 ns, totaling 155.0 ns. The 220 ns baseline counts lookup, page-table read and final data access; the faults add one or two disk transfers. This arithmetic follows the official convention, not a uniquely specified real-system fault handler. An unconditional 10% page-fault rate cannot coexist with 95% valid resident TLB hits in this simple model.

Derivation and answer

A TLB hit costs 20+100=120 ns; a nonfaulting miss costs 20+100+100=220 ns. Average disk work per page fault is 5000+0.20*5000=6000 ns. Interpreting the stated 10% page-fault rate as conditional on a TLB miss gives 0.95*120+0.05*(220+0.10*6000)=155.0 ns, within the official 154.5–155.5 range. The question does not explicitly say conditional: an unconditional 10% fault probability is inconsistent with a 95% valid resident TLB hit ratio in this standard model, since faults can occur only among the 5% misses. Official scoring therefore depends on the conditional interpretation and neglects extra fault-handler/restart overhead.

Original paper, page 16 · Answer key

2 marks · MCQ
Report issue

Virtual address coverage of a TLB

Virtual Memory & Paging

Question 33, GATE 2019: A word-addressable machine has 64-bit virtual addresses, 48-bit physical addresses, 8 kB pages, 4-byte words, and 128 valid TLB entries. Find the maximum distinct virtual word addresses translatable without a TLB miss: A 16×2^10, B 256×2^10, C 4×2^20, D 8×2^20.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. One TLB entry caches the translation for an entire virtual page, not just one word. Every offset within a cached page can use that same entry.
2. Using the intended binary memory units, a page contains 8×1024=8192 bytes. Since an address identifies a four-byte word, the number of addressable words per page is 8192/4=2048=211.
3. To maximize coverage, let the 128=27 valid entries represent different virtual pages. The number of distinct covered word addresses is 27×211=218=262144.
4. Rewriting 262144 as 256×210 identifies option B. The cached byte span would be 1 MiB, but reporting that number of addresses would ignore word addressability.
5. The 64-bit and 48-bit widths bound the larger virtual and physical spaces; they do not change the number of offsets covered by these 128 page translations.

Original paper, page 11 · Answer key

1 mark · MCQ
Report issue

Page-fault probability from mean access time

Virtual Memory & Paging

Question 10, GATE 2018: A memory access costs M when resident and total D when it faults. Observed mean is X. Find fault rate: A (D−M)/(X−M); B (X−M)/(D−M); C (D−X)/(D−M); D (X−M)/(D−X).
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Method

Partition accesses into the two mutually exclusive outcomes. With fault probability f, their probabilities are f and 1−f, not two independent rates. The weighted mean X=M+f(D−M) interpolates between M at f=0 and D at f=1. These endpoints immediately distinguish the fault probability from C, which is the hit probability. For ordinary D>M, valid observations satisfy M≤X≤D.

Solution

If f is the fault rate, X=(1−f)M+fD=M+f(D−M). Therefore f=(X−M)/(D−M), B, assuming the stated fault access time D is the total fault-case time and D≠M.

Original paper, page 6 · Answer key

2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 40, GATE 2017: Belady’s anomaly means page faults may increase when allocated frames increase. S1 random replacement suffers from it; S2 LRU suffers from it. A both true; B S1 true,S2 false; C S1 false,S2 true; D both false.
Tap to enlarge
Your answer
Answer & solution

Official answer: B

1. For LRU, order all pages by recency after each reference. The k-frame cache contains the k most recent distinct pages; those pages are included in the first k+1 pages of that same order.

2. This stack inclusion means a reference hitting with k frames cannot miss with k+1. Increasing LRU capacity therefore never increases faults for a fixed reference string, so S2 is false.

3. Random replacement has no such nested-set guarantee: its eviction choices can retain different useful pages, and an adverse larger-cache realization may fault more. S1 is interpreted as possibility, not inevitability or a claim about every run. Hence B.

Original paper, page 18 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 47, GATE 2016: A system has 40-bit virtual addresses,16-kilobyte pages and a one-level page table per process. Each entry occupies 48 bits. Find the per-process page-table size in megabytes, using binary memory units.
Tap to enlarge
Answer & solution

Official answer: 384.0 : 384.0

Our answer: 384

Step through it (6 steps)

A16 KiB page uses 14 offset bits, leaving 40−14=26 virtual-page bits. There are 226 page-table entries, each 48 bits=6 bytes, totaling 6*226 bytes=384 MiB. The official answer uses binary kilobyte/megabyte conventions and excludes unspecified table metadata.

Page-table storage depends on the number of virtual pages, not the physical RAM capacity, which is not given. Offset bits are log 2(16×1024)=14; the remaining 26 bits index 226 entries. Convert the 48-bit entry into 6 bytes before multiplying. The product 402653184 bytes divided by 220 bytes per MiB is 384. Confusing 48 bits with 48 bytes would inflate the answer by a factor 8.

Original paper, page 18 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 49, GATE 2016: There are 10 initially empty physical page frames. The reference sequence is a1,a2,...,a 20,a1,a2,...,a 20, with 20 distinct pages. Find the difference between LIFO and optimal replacement in total page faults.
Tap to enlarge
Answer & solution

Official answer: 1.0 : 1.0

Our answer: 1

Assume initially empty frames. Both policies fault on all 20 first-pass pages. LIFO retains a 1 through a 9 and the most recently inserted page a 20. The second pass hits on a 1..a 9 then faults on a 10..a 20, giving 31 faults total. OPT can retain a 1..a 9, a 20 after the first pass, then uses frames of already-consumed pages to service a 10..a 19 while retaining a 20, giving 30. At least 10 second-pass faults are unavoidable because only 10 of 20 distinct pages can initially be resident, so OPT is optimal. Difference 31−30=1.

Under LIFO, page hits do not change insertion order. Once frames fill with a1 through a 10, every first-pass fault replaces the newest page in the same slot; a1 through a9 remain throughout. In the second pass, these nine hit and the other eleven fault. OPT has ten resident pages at the start of the second pass and can fault on exactly the ten absent pages by discarding pages whose final reference has already occurred. The total faults are therefore 31 versus 30, not counts of distinct pages alone.

Original paper, page 18 · Answer key

1 mark · MCQ
Report issue

Virtual Memory & Paging

Question 20, GATE 2016: Which page-replacement policy can suffer a higher page-fault rate when more frames are allocated? A LRU; B OPT; C MRU; D FIFO.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

FIFO exhibits Belady’s anomaly. For reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5, FIFO produces 9 faults with 3 frames but 10 with 4. LRU and OPT obey inclusion/optimality monotonicity; MRU is also an inclusion policy under consistent recency/tie handling. Thus D.

With three FIFO frames the example’s fault positions are 1,2,3,4,5,6,7,10,11. With four they are 1,2,3,4,7,8,9,10,11,12. More capacity changes eviction order, not merely how many pages fit at one instant. The inclusion property prevents this anomaly when every smaller resident set is contained in the larger one.

Original paper, page 30 · Answer key

1 mark · NAT
Report issue

Virtual Memory & Paging

Question 29, GATE 2015: Byte-addressable memory has 32-bit logical addresses, 4-kilobyte pages, and 4-byte page-table entries. Find the single-level page-table size in megabytes.
Tap to enlarge
Answer & solution

Official answer: 4

Step through it (6 steps)

There are 232 addressable bytes and 212 bytes per page, so the virtual address space contains 220 pages. Each needs one entry even though physical memory size is not given. Multiply entries by bytes per entry: 220×4=222 bytes=4 MiB. The question labels binary MiB as MB; the answer is not the page size itself.

Solution: A4 KiB page uses 12 offset bits, leaving 20 page-number bits in a 32-bit address. A single-level table needs 220 entries of 4 bytes, totaling 222 bytes=4 MiB. Thus4 under the question’s binary MB convention.

Original paper, page 11 · Answer key

2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 57, GATE 2015: Five initially empty page frames receive 3,8,2,3,9,1,6,3,8,9,3,6,2,1,3. Compare FIFO and LRU faults. A same; B FIFO has two more; C LRU has two more; D FIFO has one more.
Tap to enlarge
Your answer
Answer & solution

Official answer: A

Step through it (2 policies)

After filling with 3,8,2,9,1, FIFO removes 3 for 6, then 8 for 3, then 2 for 8; the repeated hits do not change its queue. LRU updates recency at every hit, so it evicts 8 when 6 arrives, then 2 when 8 returns. Continuing through the full sequence gives nine faults for each, although different victims and fault positions occur. Equal totals in this example do not imply the policies behave identically or have equal performance on all strings.

Solution: Starting with empty frames, FIFO faults at reference positions 1, 2, 3, 5, 6, 7, 8, 9, 13; LRU faults at 1, 2, 3, 5, 6, 7, 9, 13, 14. Each has 9 faults, though at different references. Thus A. The simulation updates LRU recency on hits but does not change FIFO insertion order on hits.

Original paper, page 21 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 43, GATE 2015: Physical addresses 32 bits, pages 8 KB. PTE has valid bit, dirty bit, 3 permission bits, and frame translation. Maximum page table 24 MB. Under packed entries, find virtual address width.
Tap to enlarge
Answer & solution

Official answer: 36

An8 KiB page uses 13 offset bits. A physical frame number needs 32−13=19 bits, and the five status/permission bits make a 24-bit (3-byte) packed PTE. A24 MiB table then holds 223 entries, giving 23+13=36 virtual address bits. This assumes the entries are packed into 3 bytes rather than padded and the maximum table maps the full virtual page space.

An8KiB page needs 13 offset bits. From 32 physical bits, 19 remain for the physical frame number. Add 1 valid+1 dirty+3 permission bits to obtain 24 bits=3 bytes per packed entry. A24MiB table holds 24×220/3=8×220=223 entries, one per virtual page. Therefore the virtual address has 23 page-number bits plus 13 offset bits=36. Alignment that padded entries to 4 bytes would define a different organization, so packing is an explicit assumption.

Original paper, page 40 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 33, GATE 2014: Three page frames are initially empty. For page references 1,2,3,4,2,1,5,3,2,4,6, how many page faults occur with optimal replacement?
Tap to enlarge
Answer & solution

Official answer: 7

Step through it (13 steps)

1. Method and setup. On a fault with full memory, evict the resident page whose next reference is farthest in the future, treating never-used-again pages as infinitely far away. This uses future knowledge and is an optimal benchmark, not LRU. Mark hits explicitly so that each reference contributes at most one fault.

2. Work through the result and its assumptions. Load1, 2, 3 (three faults). At4 evict 3, whose next use is later than 1/2 (fourth fault). Hits2, 1 follow. At5 evict 1, never used again (fifth). At3 evict 5, never reused (sixth). Then2 and 4 hit; 6 causes the seventh fault. This is Belady’s farthest-future policy.

Original paper, page 15 · Answer key

2 marks · MCQ
Report issue

Virtual Memory & Paging

Question 33, GATE 2014: Twenty physical frames initially contain pages 101 through 120. A program references pages 1,2,…,100 in order and repeats that access sequence THRICE. Which replacement policy has the same fault count as optimal replacement? A LRU; B FIFO; C LIFO; D MRU. Retain the source's occupied-frame condition and its wording about repetitions.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Our answer: Official D needs initially reclaimable frames; literal initial occupancy makes no listed policy optimal

1. Set up the reasoning. Analyze the initially occupied frames before using the familiar result that MRU works well on repeated scans. After MRU loads page 1, that new page becomes the most recently used frame and is the next victim.

2. Derive the result. MRU is often optimal for cyclic scans larger than memory when frames initially fill with the scan’s pages. Here all 20 frames already contain irrelevant 101–120. Literal MRU evicts one old page for 1, then evicts the newly referenced 1 for 2, and so on, retaining 19 irrelevant pages forever. Every requested page therefore faults. LIFO likewise keeps 19 irrelevant pages; LRU/FIFO also fault on every pass because the cycle exceeds 20 frames. OPT discards the never-used initial pages and retains useful pages for later passes: for three total passes an explicit farthest-future simulation gives 260 faults instead of 300. Even simply preserving 19 useful pages across passes beats all-fault behavior. Official D requires treating the initial frames as free/reclaimable before MRU, a missing convention.

3. Check the interpretation. The official D cannot simply be explained by an initially empty-cache simulation. Literal occupied-frame MRU leaves nineteen irrelevant pages resident, unlike OPT. The inherited discrepancy remains open; the phrase about repetitions also needs a clearly stated pass-count convention when numerical simulations are quoted.

Original paper, page 38 · Answer key

1 mark · NAT
Report issue

Virtual Memory & Paging

Question 20, GATE 2014: Three initially empty page frames use LRU replacement. Count faults for page references 4,7,6,1,7,6,1,2,7,2.
Tap to enlarge
Answer & solution

Official answer: 6

Step through it (12 steps)

Step 1: Maintain recency on hits as well as on insertions. Write resident pages from least to most recently used. The first three references fault and produce [4], [4,7], [4,7,6]. Step 2: Reference 1 faults and evicts 4, giving [7,6,1]. The following hits on 7,6,1 change the order to [6,1,7], [1,7,6], [7,6,1]. Step 3: Reference 2 faults, evicting 7 and giving [6,1,2]. Next 7 faults, evicting 6 and giving [1,2,7]. Final 2 hits and gives [1,7,2]. Faults occur at positions 1,2,3,4,8,9: total 6.

Original paper, page 57 · Answer key

2 marks · NAT
Report issue

Virtual Memory & Paging

Question 33, GATE 2014: A paging system has a TLB; all pages and the entire page table reside in physical memory. TLB search takes 10 milliseconds, physical-memory access 80 milliseconds, and the TLB hit ratio is 0.6. Find effective access time in milliseconds.
Tap to enlarge
Answer & solution

Official answer: 122

Step 1: On a TLB hit, address translation takes 10 ms and the requested memory access takes 80 ms, totaling 90 ms. Step 2: On a TLB miss, after the same 10 ms lookup, one memory access reads the page-table entry and another reads the requested data: 10+80+80=170 ms. There is no disk page-fault penalty because all pages are resident. Step 3: Average over the two cases: 0.6×90+0.4×170=122 ms. The source's milliseconds are intentionally retained; the model assumes serial lookup and a single-level page-table access.

Original paper, page 60 · Answer key

2 marks · MCQ
Report issue

Page size in a three-level page table

Virtual Memory & Paging

Question 52, GATE 2013: A46-bit virtual/32-bit physical address machine uses 3-level paging. T1 fits exactly one page; T1 entries point to page-sized T2 blocks; T2 entries point to page-sized T3 blocks of 32-bit PTEs. Under32-bit table entries throughout, page size: A2, B4, C8, D16 KB. Shared data:1MB16-way virtually indexed physically tagged cache, 64-byte block.
Question 52, GATE 2013: A46-bit virtual/32-bit physical address machine uses 3-level paging. T1 fits exactly one page; T1 entries point to page-sized T2 blocks; T2 entries point to page-sized T3 blocks of 32-bit PTEs. Under32-bit table entries throughout, page size: A2, B4, C8, D16 KB. Shared data:1MB16-way virtually indexed physically tagged cache, 64-byte block.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Let each page contain 2p bytes. Under the standard fixed-width organization, a 32-bit PTE or physical-address entry occupies four bytes, so each page-sized table contains 2p−2 entries and each of the three levels uses p−2 index bits. The page offset uses p bits. Covering the 46-bit virtual address therefore gives 3(p−2)+p=46, hence 4p=52 and p=13. The page size is 213 bytes=8 KiB, labeled 8 KB in the options, so C. This uses 32-bit entries at the upper levels as well as the stated 32-bit leaf PTE, page-sized table blocks, full address-space coverage, and the usual binary KB convention.

A page of 2^pbytes contains 2p/4=2p−2table entries when each occupies 4 bytes. Hence each level contributes p−2 index bits and the final byte offset contributes pbits. With three levels, the address budget is(p−2)+(p−2)+(p−2)+p=46. Solving gives p=13and8192 bytes. The result is conditional on the usual fixed-width pointer entries at upper levels; the problem explicitly gives the leaf PTE size and implies that conventional organization.

Original paper, page 12 · Answer key

2 marks · MCQ
Report issue

Compare FIFO, LRU and optimal page faults

Virtual Memory & Paging

Question 42, GATE 2012: Consider the virtual page reference string
             1, 2, 3, 2, 4, 1, 3, 2, 4, 1
        on a demand paged virtual memory system running on a computer system that has main memory
        size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number
        of page faults under the corresponding page replacement policy. Then
        (A) OPTIMAL < LRU < FIFO                                     (B) OPTIMAL < FIFO < LRU
        (C) OPTIMAL = LRU                                            (D) OPTIMAL = FIFO
Tap to enlarge
Your answer
Answer & solution

Official answer: B

Step through it (3 policies)

Number the ten references from 1. FIFO faults at positions 1, 2, 3, 5, 6, 8: six faults. LRU faults at 1, 2, 3, 5, 6, 7, 8, 9, 10: nine faults. Optimal replacement faults at 1, 2, 3, 5, 8: five faults; at reference 5 evict page 2, whose next use is later than those of 1 and 3, and at reference 8 evict page 3, which is never used again. Thus OPTIMAL=5 < FIFO=6 < LRU=9, B.

Check: A hit updates recency in LRU but does not move a page in FIFO’s arrival order. This distinction first matters after reference 4, a hit on page 2: LRU remembers page 2 as recent, while FIFO still regards page 1 as the oldest arrival.

Original paper, page 10 · Answer key

1 mark · MCQ
Report issue

Effective memory time with rare page faults

Virtual Memory & Paging

Question 20, GATE 2011: Memory access takes 20 ns on average, a page fault takes 10 ms to service, and one page fault occurs per 10^6 memory accesses. Find the effective access time.

(A) 21 ns
(B) 30 ns
(C) 23 ns
(D) 35 ns
Tap to enlarge
Your answer
Answer & solution

Official answer: B

The fault probability is 10−6 and 10ms=107 ns. Average fault overhead contributes 10 ns per access, in addition to the 20 ns memory time, giving approximately 30 ns, B. If fault service is taken as a replacement rather than added time, the weighted result 29.99998 ns has the same rounded answer.

Convert all units before averaging: 1 ms=106 ns, so the fault penalty is ten million nanoseconds. Although the event is rare, multiplying that large penalty by 1/1000000 adds 10 ns to the average. This is half the normal access time, so ignoring faults because they are rare would be a large relative error. Conversely, adding the full 10 ms to every access would wrongly assume every reference faults.

Original paper, page 5 · Answer key

1 mark · MCQ
Report issue

FIFO forward and reverse page scan

Virtual Memory & Paging

Question 24, GATE 2010: A FIFO page-replacement system has four frames, initially empty. It accesses 100 distinct pages in some order, then accesses those same 100 pages in the reverse order. How many page faults occur?
Options: (A) 196; (B) 192; (C) 197; (D) 195.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

The first 100 distinct references all fault. The four resident pages are then the last four in forward order, and the reverse scan hits these four first. Every one of the other 96 reverse references is to a page not yet resident; those faults evict only pages already visited in the reverse scan. Therefore faults total 100+96=196, option A. Hits do not refresh FIFO order.

Name the forward sequence p₁,…,p₁₀₀. The reverse sequence starts p₁₀₀,p₉₉,p₉₈,p₉₇, all already resident. Then p₉₆,…,p₁ must each fault because none remains from the forward scan. There are 200 total references and exactly four hits, giving 200−4=196 independently of the original ordering.

Original paper, page 5

1 mark · MCQ
Report issue

Belady anomaly policy

Virtual Memory & Paging

Question 9, GATE 2009: For which listed page replacement policy may Belady’s anomaly occur? A FIFO; B optimal; C LRU; D MRU.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

FIFO can incur more faults with more frames: the standard reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 has 9 faults with 3 frames and 10 with 4. LRU and optimal replacement have the stack-inclusion property; ordinary MRU also preserves inclusion for nested initially empty caches. Thus FIFO is the supplied policy exhibiting the anomaly, A.

FIFO can evict a page because it arrived long ago even if it will be reused immediately; adding frames changes that queue order and can increase faults. The classic reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 produces 9 FIFO faults with three frames and 10 with four. LRU and optimal have the inclusion/stack property that prevents this anomaly. The intended listed answer is FIFO; the baseline qualification concerning the exact MRU model remains important.

Original paper, page 2

1 mark · MCQ
Report issue

Essential conventional page-table entry

Virtual Memory & Paging

Question 10, GATE 2009: What is essential in each conventional page-table entry? A virtual page number; B physical page-frame number; C both numbers; D access-right information.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

A conventional page table is indexed by the virtual page number, so that number need not be stored again in each entry. Its essential mapping result is the physical page-frame number, B. Permission and status bits may also be included; inverted/hashed organizations have different entry layouts and are not the conventional indexed table assumed here.

A conventional page table is indexed by virtual page number, so that number is implicit in the entry’s position rather than necessarily stored again. The essential translation payload identifies the physical frame. Protection, valid and dirty information may also be stored, but access rights alone cannot perform address translation. Thus B is the expected minimum translation information; hashed or inverted page-table organizations can require additional explicit tags.

Original paper, page 2

2 marks · MCQ
Report issue

Space benefit of multilevel page tables

Virtual Memory & Paging

Question 34, GATE 2009: Why prefer multilevel over single-level page tables? A shorter memory access time; B reduced page-table storage for a process virtual address space; C required by a TLB; D fewer replacement page faults.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

A sparse virtual address space need not allocate lower-level page tables for unused regions. This can reduce the resident page-table storage compared with a full flat table, B. Extra levels do not inherently shorten a page walk, eliminate page faults or become mandatory merely because a TLB exists.

A flat table allocates an entry for every possible virtual page even when most virtual regions are unused. A multilevel table can omit entire lower-level tables for absent regions, saving storage. This is the purpose captured by B. The price may be additional memory references on a TLB miss, not a guaranteed speedup. Neither a TLB nor the page-replacement policy logically requires a multilevel representation.

Original paper, page 8

2 marks · MCQ
Report issue

Pointer bits in a three-level page table

Virtual Memory & Paging

Question 67, GATE 2008: A processor has 36-bit physical and 32-bit virtual addresses, 4-KiB page frames, and 4-byte page-table entries. Its three-level translation indexes level 1 with VA bits 30–31, level 2 with bits 21–29, level 3 with bits 12–20; bits 0–11 are page offset. How many address bits in entries at levels 1,2,3 identify the next table or final frame, respectively?

(A) 20,20,20
(B) 24,24,24
(C) 24,24,20
(D) 25,25,24
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. Each second- and third-level table has 29 entries of 4 bytes, so it occupies 211 bytes. With compact 2-KiB-aligned tables in a 36-bit physical address space, a pointer to either table needs 36−11=25 bits.
2. A data page frame occupies 212 bytes and its frame number needs 36−12=24 bits. The result is (25,25,24), option D.
3. This uses the intended natural table-size alignment; forcing every table to a separate 4-KiB frame would instead produce 24-bit table-frame pointers.

Original paper, page 14

2 marks · MCQ
Report issue

FIFO anomaly and locality of reference

Virtual Memory & Paging

Question 56, GATE 2007: A virtual-memory system uses FIFO replacement with a fixed allocation of frames. P: increasing a process’s frame allocation sometimes increases its page-fault rate. Q: some programs do not exhibit locality of reference. Which statement is true?
Options:
(A) Both true and Q explains P
(B) Both true but Q does not explain P
(C) P false,Q true
(D) Both false
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Approach. Separate truth from causation. Belady’s anomaly is possible because FIFO does not retain a nested set of resident pages as frame count grows; locality is not the defining cause.

2. Derivation and interpretation. P is true: FIFO can exhibit Belady's anomaly. For example, reference string 1,2,3,4,1,2,5,1,2,3,4,5 incurs 9 faults with three initially empty frames but 10 with four. Q is also true: programs can make accesses without useful locality, for example broadly scattered independent random accesses. Q does not explain the anomaly; the issue is FIFO's failure of the stack-inclusion property, not simply the presence or absence of locality. Stack algorithms such as LRU do not exhibit this anomaly even on reference strings without locality. Thus B.

Original paper, page 14

2 marks · MCQ
Report issue

Optimal replacement page-fault count

Virtual Memory & Paging

Question 82, GATE 2007: A process has three initially empty page frames and reference string 1,2,1,3,7,4,5,6,3,1. How many page faults occur with optimal replacement?
Options:
(A) 7
(B) 8
(C) 9
(D) 10
Question 82, GATE 2007: A process has three initially empty page frames and reference string 1,2,1,3,7,4,5,6,3,1. How many page faults occur with optimal replacement?
Options:
(A) 7
(B) 8
(C) 9
(D) 10
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Step through it (12 steps)

1. Approach. At a miss with full frames, evict the page whose next reference lies farthest in the future, treating never-used-again pages as farthest. Keeping pages 1 and 3 is valuable because both are referenced at the end.

2. Derivation and interpretation. For references 1,2,1,3,7,4,5,6,3,1 with three initially empty frames, first load 1,2,3 (the second reference to 1 hits). When 7 arrives, discard 2 because it is never needed again. Retain 1 and 3 while replacing the third frame successively by 7,4,5,6; each of these pages has no future use. The final 3 and 1 then hit. Faults are on 1,2,3,7,4,5,6, totaling 7, option A. Seven distinct pages also give a matching lower bound.

Original paper, page 20

2 marks · MCQ
Report issue

Extra faults from LRU replacement

Virtual Memory & Paging

Question 83, GATE 2007: A process has three initially empty page frames and reference string 1,2,1,3,7,4,5,6,3,1. How many more faults does LRU incur than optimal replacement?
Options:
(A) 0
(B) 1
(C) 2
(D) 3
Question 83, GATE 2007: A process has three initially empty page frames and reference string 1,2,1,3,7,4,5,6,3,1. How many more faults does LRU incur than optimal replacement?
Options:
(A) 0
(B) 1
(C) 2
(D) 3
Question 83, GATE 2007: A process has three initially empty page frames and reference string 1,2,1,3,7,4,5,6,3,1. How many more faults does LRU incur than optimal replacement?
Options:
(A) 0
(B) 1
(C) 2
(D) 3
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step through it (2 policies)

1. Approach. LRU uses past recency rather than future references. Maintain a least-recent-to-most-recent list and move a page to the end even on a hit; then compare the full LRU count with the optimal count.

2. Derivation and interpretation. LRU faults on references 1,2,3,7,4,5,6,3,1; only the early repeated 1 hits. After loading 3, the least-recent order is 2,1,3; successive new pages evict 2, then 1, then 3, then 7. Therefore final references 3 and 1 also fault. LRU has 9 faults versus the optimal 7, an excess of 2, option C.

Original paper, page 20

2 marks · MCQ
Report issue

Removing virtual-address translation

Virtual Memory & Paging

Question 63, GATE 2006: A system has both 32-bit virtual and 32-bit physical addresses. Its designers remove virtual memory because the address-space sizes are equal. Which claimed consequence is true?
Options:
(A) Efficient multiuser support becomes impossible
(B) The cache organization can be made more efficient
(C) Hardware memory-management support is no longer needed
(D) CPU scheduling can be made more efficient
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Equal virtual and physical address widths do not make virtual memory redundant: address-space isolation, relocation, and protection still matter. Nevertheless removing address translation can simplify cache lookup, avoid translation-related latency and virtual alias issues, and thus permit a more efficient cache organization (B says can, not must).

2. Multi-user operation remains possible with other protection mechanisms; memory-management hardware can still be needed, and CPU scheduling does not automatically improve.

3. Teaching check: Equal address widths do not imply an identity mapping or a single shared address space. Different processes can map the same virtual address to different physical pages. The question’s true claim is only that cache organization can become simpler without translation, not that deleting virtual memory is generally desirable.

Original paper, page 9

1 mark · MCQ
Report issue

Purpose of swap space

Virtual Memory & Paging

Question 21, GATE 2005: What is disk swap space for? A temporary HTML; B process data; C filesystem superblock; D device drivers.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Swap space stores process memory contents that have been evicted from RAM and may later be paged back in. Thus saving process data, B, rather than caching HTML pages or storing filesystem superblocks.

A process may have memory pages that cannot all remain in physical RAM. Swap space provides backing storage for evicted process contents, allowing them to be brought back when needed. Thus B. It is distinct from a browser cache, filesystem metadata and the ordinary files holding drivers, even though all may reside on the same physical disk.

Original paper, page 3

1 mark · MCQ
Report issue

Why additional RAM can improve performance

Virtual Memory & Paging

Question 22, GATE 2005: Why does increasing RAM typically help? A more virtual memory; B larger chips are intrinsically faster; C fewer page faults; D fewer segmentation faults.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

More physical memory can retain a larger working set, reducing expensive page faults and disk paging, C. Capacity does not inherently make memory chips faster, nor does it repair illegal accesses that cause segmentation faults. Improvement depends on the workload being memory-constrained.

When working sets exceed physical memory, pages are repeatedly fetched from much slower secondary storage. Additional RAM can hold more of those pages and reduce paging, hence C. It does not automatically enlarge the architecture’s virtual address width, accelerate each DRAM access, or make an illegal address valid. The performance benefit is workload-dependent rather than guaranteed for every program.

Original paper, page 3

1 mark · MCQ
Report issue

Architectural minimum frame allocation

Virtual Memory & Paging

Question 21, GATE 2004: What determines the minimum number of page frames that must be allocated to a running process in a virtual-memory environment?
Options:
(A) Instruction set architecture
(B) Page size
(C) Physical memory size
(D) Number of processes in memory
Tap to enlarge
Your answer
Answer & solution

Answer: A under a fixed paging configuration (no official key was published)

1. The instruction set determines which instruction bytes and operands may have to be resident together to complete/restart one instruction without endless page faults. Thus A is the standard determinant of the minimum required frame count, rather than a count based simply on concurrent processes or total RAM.

2. Exact numerical requirements also depend on the fixed page size, operand placement, and restart implementation; the answer identifies the architectural constraint, not independence from all those details.

3. Teaching check: The minimum is about making forward progress on an instruction, not fitting the whole working set. For example, an instruction may simultaneously need its code page and multiple operand pages. The ISA constrains these requirements; page geometry and restart details matter when calculating an actual number.

Original paper, page 3

2 marks · MCQ
Report issue

Two-level paging effective instruction time

Virtual Memory & Paging

Question 47, GATE 2004: A two-level paging system has regular memory access time 150 ns and page-fault service time 8 ms. An average instruction uses 100 ns CPU time and two memory accesses. TLB hit ratio is 90%; page faults occur once per 10,000 instructions. What is effective average instruction time? TLB lookup time and caching of page-table levels are unspecified.
Options:
(A) 645 ns
(B) 1050 ns
(C) 1215 ns
(D) 1230 ns
Tap to enlarge
Your answer
Answer & solution

Answer: 1260 ns under literal two-level page-table model; no listed option (no official key was published)

1. Assuming negligible TLB lookup time and a true two-level page table, a TLB hit costs 150ns and a miss costs three memory accesses: two page-table reads plus the requested data access,450ns. Two accesses per instruction therefore cost 2(0.9×150+0.1×450)=360ns.

2. Add100ns CPU time and 8,000,000/10,000=800ns amortized fault service:1260ns. None of 645,1050,1215,1230 matches.

3. Option D=1230ns results from counting only TWO total memory accesses per TLB miss:100+2(0.9×150+0.1×300)+800. That requires a single-level translation model or an unstated cached first-level entry.

4. Treat the result as model-dependent rather than silently forcing D. Minor whether-fault-service-includes-retry conventions do not account for the 30ns discrepancy.

5. Teaching check: A true two-level TLB miss reads level 1, level 2 and data: three memory accesses. The page-fault rate is per instruction, so add the 800-ns average penalty once, not twice. The closest-looking listed value must not erase the extra translation read.

Original paper, page 7

1 mark · MCQ
Report issue

Size of a flat page table

Virtual Memory & Paging

Question 26, GATE 2003: With 32-bit virtual addresses and 1 KB pages, why is a one-level page table impractical? A. Large internal fragmentation; B. Large external fragmentation; C. Large memory overhead for page tables; D. Large computation overhead in translation.
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. A 1 KB page means 2¹⁰ byte offsets, so a virtual address splits into 22 page-number bits and 10 offset bits. Even a sparsely used process address space requires all 2²² slots in a flat table. Four-byte entries are an illustration, not an additional given: they would occupy 16 MiB per table.

2. A 1 KiB page uses 10 offset bits, leaving 22 virtual-page bits in a 32-bit address. A flat table therefore needs 222 entries per address space; at 4 bytes each this is 16 MiB. The large memory overhead, C, motivates multilevel or other sparse organizations.

Original paper, page 3

2 marks · MCQ
Report issue

Memory used by sparse two-level page tables

Virtual Memory & Paging

Question 79, GATE 2003: A byte-addressable processor has 32-bit virtual and physical addresses and two-level page tables stored in main memory. Address bits are split 10 bits for first-level index, 10 for second-level index, and 12 for page offset. All page-table entries are 4 bytes. TLB hit rate is 96%, physical-cache hit rate 90%; TLB and cache access each take 1 ns, and main memory takes 10 ns. A process maps only two contiguous code pages starting at 0x00000000, two contiguous data pages starting at 0x00400000, and one stack page starting at 0xFFFFF000. How much storage is needed for its page tables?
A. 8 KB  B. 12 KB  C. 16 KB  D. 20 KB
Question 79, GATE 2003: A byte-addressable processor has 32-bit virtual and physical addresses and two-level page tables stored in main memory. Address bits are split 10 bits for first-level index, 10 for second-level index, and 12 for page offset. All page-table entries are 4 bytes. TLB hit rate is 96%, physical-cache hit rate 90%; TLB and cache access each take 1 ns, and main memory takes 10 ns. A process maps only two contiguous code pages starting at 0x00000000, two contiguous data pages starting at 0x00400000, and one stack page starting at 0xFFFFF000. How much storage is needed for its page tables?
A. 8 KB  B. 12 KB  C. 16 KB  D. 20 KB
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

1. A 10-bit index selects 1024 entries. At four bytes per entry each full table occupies 4096 bytes, one 4 KiB page.
2. One second-level table covers 1024 virtual pages, or 1024×4096=4 MiB. The code pages fall in the first 4 MiB region, top-level index 0. The data begins exactly at 4 MiB, index 1. The stack address has index 1023.
3. The two contiguous code pages share one second-level table, as do the two data pages. The stack needs a third second-level table. Add one top-level table: four tables total.
4. Storage=4×4096=16384 bytes=16 KiB, option C. Mapped content pages are not additional page-table storage.

Solution: Each page-table level has 210 entries of four bytes, so each allocated table uses 4096 bytes. The two code pages occupy top-level index 0; the two data pages starting at 0x00400000 occupy index 1; the stack page at 0xFFFFF000 occupies index 1023. Three second-level tables are therefore required, plus the first-level table. Total page-table storage is 4×4096=16384 bytes=16 KiB, option C. The five mapped code/data/stack pages are not themselves included in page-table storage.

Original paper, page 12

1 mark · MCQ
Report issue

Optimal replacement victim

Virtual Memory & Paging

Question 1.23, GATE 2002: Which page does optimal page replacement evict?
(A) The one unused for the longest past interval.
(B) The one whose next use is farthest in the future.
(C) The one used the fewest times.
(D) The one used the most times.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Compare future reuse times.

Step 2: If resident pages will next be requested after 2,5 and 10 accesses, evict the page needed after 10. Evicting the page needed after 2 causes a miss sooner while retaining a page that is not yet useful. This exchange argument can be repeated to match an optimal schedule. The method is a theoretical benchmark because the future reference string is generally unavailable online.

Conclusion: Choose the resident page whose next use lies farthest in the future, treating no further use as infinity. Exchanging any earlier-needed victim for this one cannot increase future faults, yielding Belady’s optimal policy, B. Past recency describes LRU instead.

Original paper, page 3

Descriptive
Report issue

Two-level address translation with equal index widths

Virtual Memory & Paging

Question 19(a), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(a): Draw how a virtual address translates to a physical address.
Question 19(a), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(a): Draw how a virtual address translates to a physical address.
Tap to enlarge
Answer & solution

Answer: Virtual address: 10-bit outer index | 10-bit inner index | 12-bit offset; physical address: 20-bit frame number | 12-bit offset. (no official key was published)

A 4 KiB page has 212 bytes, so the low 12 address bits are the unchanged page offset. The remaining 32−12=20 virtual-page bits split equally into two 10-bit indices. The translation is:
VA[31:22] --index--> first-level table --second-level table base
VA[21:12] --index into that table--> second-level entry --20-bit physical frame number
PA = (physical frame number << 12) | VA[11:0].
More explicitly, the first entry is at first_table_base + 4·VA[31:22]; it identifies the second-level table. The second entry is at second_table_base + 4·VA[21:12]; it identifies the data page frame. Validity and protection flags are checked along the way; absent or disallowed mappings fault. The diagram describes a successful translation and does not require a TLB assumption.

Original paper, page 10

Descriptive
Report issue

Entries per page-table page

Virtual Memory & Paging

Question 19(b), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(b): How many page-table entries fit in one page?
Question 19(b), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(b): How many page-table entries fit in one page?
Tap to enlarge
Answer & solution

Answer: 1024 entries. (no official key was published)

Step through it (7 steps)

Each page contains 4 KiB=4096 bytes and each page-table entry occupies 4 bytes. Thus one page holds 4096/4=1024=210 entries, matching either 10-bit index. A first-level table and each populated second-level table can each occupy one page.

Original paper, page 10

Descriptive
Report issue

Page-table bits available for metadata

Virtual Memory & Paging

Question 19(c), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(c): How many bits in each entry remain for protection/other information?
Question 19(c), GATE 2002: Virtual and physical addresses are 32 bits, byte addressed, page size 4 KB, two-level page tables with equal index widths, each entry 4 bytes. Original19(c): How many bits in each entry remain for protection/other information?
Tap to enlarge
Answer & solution

Answer: 12 bits per page-table entry. (no official key was published)

Step through it (8 steps)

There are 232 addressable physical bytes and frames of 212 bytes, so a physical frame number needs 32−12=20 bits. Each page-table entry is 4 bytes=32 bits, leaving 32−20=12 bits for valid, protection, reference, dirty, or other information. The page offset is supplied by the virtual address and is not separately stored in each entry. First-level entries likewise point to page-aligned second-level tables.

Original paper, page 10

1 mark · MCQ
Report issue

Virtual memory and context-switch overhead

Virtual Memory & Paging

Question 1.8, GATE 2001: Which virtual-memory claim is false? It translates program addresses to physical addresses; allows a program larger than primary memory; increases possible multiprogramming; or reduces context-switch overhead.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step 1: Virtual memory translates virtual addresses, permits only part of a program to be resident, and can accommodate more simultaneously active processes than whole-program residency allows. These explain the usual claims A–C.

Step 2: A context switch still saves/restores CPU state and may change page-table context or invalidate/repopulate translation caches. Virtual memory does not inherently remove that work and can add translation-related overhead.

Thus D is the false general claim. The benefit in multiprogramming is a capability, not a guarantee against thrashing under every workload.

Original paper, page 2

1 mark · MCQ
Report issue

Location of swap space

Virtual Memory & Paging

Question 1.20, GATE 2001: Where does conventional swap space reside: RAM, disk, ROM, or on-chip cache?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Swapping moves memory contents out of RAM so that physical frames become available for other uses. The displaced contents must survive while those RAM frames are reused.

Step 2: Conventional swap space is reserved secondary-storage space, typically a disk partition or file, so B. ROM is not a normal writable swap target; CPU cache and RAM do not provide the intended backing store. This historical answer includes modern disk-like secondary storage such as SSDs.

Original paper, page 3

1 mark · MCQ
Report issue

FIFO page replacement and additional frames

Virtual Memory & Paging

Question 1.21, GATE 2001: With FIFO page replacement, what can increasing the number of frames do for an arbitrary reference string: always decrease faults, always increase faults, sometimes increase faults, or never change faults?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Step 1: FIFO evicts the page loaded earliest, without maintaining the stack-inclusion property of LRU. Adding frames can change future FIFO victim order.

Step 2: For reference string 1,2,3,4,1,2,5,1,2,3,4,5 from empty memory, FIFO incurs 9 faults with 3 frames but 10 with 4. This is Belady’s anomaly. Other strings can benefit or show no change.

Therefore additional frames can sometimes increase faults, C; neither a universal decrease nor universal increase is valid.

Original paper, page 3

2 marks · MCQ
Report issue

Estimating a flat page-table size

Virtual Memory & Paging

Question 2.21, GATE 2001: A machine has 64 MiB physical memory, 32-bit virtual addresses, and 4 KiB pages. Estimate a flat page-table size from choices 16,8,2,24 MiB, and state the necessary page-entry-size assumption.
Question 2.21, GATE 2001: A machine has 64 MiB physical memory, 32-bit virtual addresses, and 4 KiB pages. Estimate a flat page-table size from choices 16,8,2,24 MiB, and state the necessary page-entry-size assumption.
Tap to enlarge
Your answer
Answer & solution

Answer: C under a two-byte-entry assumption (no official key was published)

Step 1: A 4 KiB page has 12 offset bits. A 32-bit virtual address therefore has 20 virtual-page bits, requiring 220 entries in a full single-level page table.

Step 2: Physical memory 64 MiB=226 bytes contains 214 frames, so a physical frame number needs 14 bits. Rounding that field to two bytes gives 220·2=2 MiB, option C, with only limited room for additional status bits.

Qualification: The entry size and organization are not specified. Four-byte entries would require 4 MiB, not listed; multilevel allocation can use a different amount. Therefore 2 MiB is a conventional estimate, not uniquely determined by the stated capacities alone.

Original paper, page 6

2 marks · MCQ
Report issue

Effective memory time with rare page faults

Virtual Memory & Paging

Question 2.22, GATE 2000: Memory access takes 1 μs, average page-fault service 10 ms, and hit ratio is 99.99%. Choose effective time from 1.9999 ms,1 ms,9.999 μs,1.9999 μs.
Tap to enlarge
Your answer
Answer & solution

Answer: D under the inclusive fault-service convention (no official key was published)

Step 1: Convert 10 ms to 10,000 μs and use fault probability 1−0.9999=0.0001.

Step 2: If the fault-case time is the stated total service, expected time is 0.9999·1+0.0001·10,000=0.9999+1=1.9999 μs, D.

If “service” excludes the final retried access, add another 0.0001 μs to obtain 2 μs. This tiny convention difference is explicit; neither interpretation gives a millisecond-scale average.

Original paper, page 6

2 marks · MSQ
Report issue

Benefits of virtual memory

Virtual Memory & Paging

Question 2.11, GATE 1999: Select advantages: A faster average accesses,B protected address spaces,C linker addresses independent of physical loading,D programs larger than RAM.
Tap to enlarge
Select all that apply
Answer & solution

Answer: B,C,D (no official key was published)

Translation associates each process’s virtual addresses with controlled physical mappings, enabling separate protected spaces: B. Link-time virtual addresses need not equal final physical frame addresses, enabling C. Keeping only a working set resident while backing other pages on storage permits an address space larger than RAM: D. Translation and page faults add overhead rather than intrinsically speeding memory access, so A is not a general advantage. Protection permissions and backing-store support are the conventional virtual-memory system assumptions.

Original paper, page 4

2 marks · Descriptive
Report issue

Size a one-page segment page table

Virtual Memory & Paging

Question 19(a), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. Find the smallest power-of-two page size for which one segment’s page table occupies at most one page.
Question 19(a), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. Find the smallest power-of-two page size for which one segment’s page table occupies at most one page.
Question 19(a), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. Find the smallest power-of-two page size for which one segment’s page table occupies at most one page.
Tap to enlarge
Answer & solution

Answer: 128 bytes (no official key was published)

The eight segments need 3 segment-number bits, leaving 13 bits of segment offset. Each segment therefore contains 216/8=213=8192 bytes. If page size is P=2p bytes, the segment contains 8192/P pages and needs that many page-table entries. At 2 bytes each, its table occupies 16384/P bytes. The one-page requirement is 16384/P≤P, or P²≥16384=214. Thus p≥7 and the smallest allowed power of two is P=128. Verification: 8192/128=64 entries occupy 128 bytes exactly. The preceding power of two, 64 bytes, would need 128 entries or 256 bytes, exceeding one page. The hardware segment table does not add to the per-segment page-table storage being bounded.

Original paper, page 8

1 mark · Descriptive
Report issue

Split the direct-mapped TLB address

Virtual Memory & Paging

Question 19(b), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, a direct-mapped TLB holds 16 virtual-page translations. How many tag bits per entry are needed?
Question 19(b), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, a direct-mapped TLB holds 16 virtual-page translations. How many tag bits per entry are needed?
Tap to enlarge
Answer & solution

Answer: 3 tag bits (no official key was published)

A 512-byte page has 9 offset bits. Therefore the full 16-bit virtual address has 7 virtual-page-number bits. A 16-entry direct-mapped TLB uses 4 of those bits as its index, leaving 7−4=3 tag bits. In this segmented layout the address can be drawn as [segment:3 | page within segment:4 | byte offset:9]. Indexing by the low 4 virtual-page bits chooses the page number within a segment; the stored 3-bit segment tag distinguishes the eight segments that map to that same TLB slot. Page offset bits neither select a translation nor belong in its tag. This is the tag for the single address space described; unmentioned address-space identifiers or additional implementation status are not included.

Original paper, page 8

2 marks · Descriptive
Report issue

Allocate page-entry aging bits

Virtual Memory & Paging

Question 19(c), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, each entry has 1 valid bit, 3 protection bits and 1 dirty bit. How many bits remain for aging information?
Question 19(c), GATE 1999: A byte-addressed segmented-paging system has 2^16 bytes in each of its virtual and physical address spaces, divided into 8 equal virtual segments. The hardware segment table points to each segment’s page table in main memory. Each page-table entry is 2 bytes. GateForum visibly prints 2^16; GFG loses exponent formatting and appears as 216. With 512-byte pages, each entry has 1 valid bit, 3 protection bits and 1 dirty bit. How many bits remain for aging information?
Tap to enlarge
Answer & solution

Answer: 4 aging bits (no official key was published)

There are 216/29=27 physical page frames, so a page-table entry needs 7 bits for the physical frame number. The offset is supplied by the original virtual address and is not stored in the entry. Each entry is 2 bytes=16 bits. The stated non-address metadata occupies 1+3+1=5 bits. Thus the aging budget is 16−7−5=4 bits. A valid field allocation is [frame number:7 | valid:1 | protection:3 | dirty:1 | aging:4], totaling 16. Subtracting a full 16-bit physical byte address would be wrong because a page frame is aligned and its low 9 offset bits need not be recorded. This answer assumes no additional unspecified fields consume the remaining capacity.

Original paper, page 8

2 marks · MCQ
Report issue

Amortized page-fault cost

Virtual Memory & Paging

Question 2.18, GATE 1998: An instruction takes i microseconds; one page fault per k instructions adds j microseconds. Find effective instruction time.
Tap to enlarge
Your answer
Answer & solution

Answer: A: i+j/k (no official key was published)

Over k instructions, ordinary execution costs ki microseconds. The average one fault adds j, so the total for that block is ki+j. Divide by k to obtain i+j/k per instruction, option A. The word additional matters: the base instruction cost is already counted and must not be divided away or counted twice. This is an average-cost calculation and does not require faults to occur at perfectly periodic positions.

Original paper, page 5

1 mark · MCQ
Report issue

Meaning of temporal locality

Virtual Memory & Paging

Question 3.5, GATE 1997: A page reference always repeats the previous page, is likely among recently used pages, always hits resident memory, or always faults.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Temporal locality is the tendency to reuse recently accessed data or instructions, for example within a loop. Hence the next page reference is likely to be among a recent working set, B. This is a statistical tendency, not an absolute guarantee. A program can move to a new phase and access a different page, and whether that page is resident depends on available memory and replacement history. Thus the three statements containing always are too strong.

Original paper, page 3

1 mark · MCQ
Report issue

What thrashing means

Virtual Memory & Paging

Question 3.9, GATE 1997: Thrashing reduces page I/O, decreases multiprogramming by definition, implies excessive page I/O, or improves performance?
Tap to enlarge
Your answer
Answer & solution

Answer: C (no official key was published)

Thrashing occurs when processes repeatedly fault because their active working sets do not fit in available frames. The system spends excessive time moving pages rather than executing useful instructions, so C describes it. It increases rather than reduces paging traffic and degrades performance. Reducing the degree of multiprogramming may be a remedy, but is not automatically the meaning or inevitable direct effect of thrashing, so B confuses response with condition.

Original paper, page 3

1 mark · MCQ
Report issue

Purpose of the dirty bit

Virtual Memory & Paging

Question 3.10, GATE 1997: Does a page dirty bit avoid unnecessary disk writes, record LRU order, enforce read-only access, or none?
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

A dirty bit records whether a page has been modified since its backing-store copy was synchronized. On eviction, a clean page can be discarded because an up-to-date copy already exists; a dirty page normally needs writeback. This avoids unnecessary writes for unchanged pages, A. Recent use is tracked by reference/access information or timestamps, while write protection uses permission bits. Those functions should not be confused with modification status.

Original paper, page 3

Descriptive
Report issue

Update an LRU list

Virtual Memory & Paging

Question 7(i), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Give the new list after each access.
Question 7(i), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Give the new list after each access.
Tap to enlarge
Answer & solution

Answer: [17,1,63,0]; [17,63,0,1]; [63,0,1,16]; [0,1,16,17]. (no official key was published)

The offset occupies eight bits because a page has 28 bytes. Discard the low two hexadecimal digits to obtain decimal page references 0,1,16,17. Physical memory holds 1024/256=4 pages.

At 00FF, page 0 is absent: fault, load into the free frame, order [17,1,63,0]. At 010D, page 1 is present: hit, remove it from its old LRU position and append it, order [17,63,0,1]. At 10FF, page 16 is absent and memory is full: evict 17, append 16, order [63,0,1,16]. At 11B0, page 17 is absent because the previous reference evicted it: evict 63, append 17, order [0,1,16,17].

A page fault need not cause a replacement when a free frame exists; this distinction matters for the first reference. The initial figure shows three residents despite four-frame capacity. If an unprinted fourth resident was intended instead, its identity and recency are necessary for a unique trace. We do not invent that page or silently change memory capacity to three frames.

Original paper, page 7

Descriptive
Report issue

Identify page faults

Virtual Memory & Paging

Question 7(ii), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Identify the accesses causing page faults.
Question 7(ii), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Identify the accesses causing page faults.
Tap to enlarge
Answer & solution

Answer: Faults at 00FF,10FF,11B0; 010D is a hit. (no official key was published)

The offset occupies eight bits because a page has 28 bytes. Discard the low two hexadecimal digits to obtain decimal page references 0,1,16,17. Physical memory holds 1024/256=4 pages.

At 00FF, page 0 is absent: fault, load into the free frame, order [17,1,63,0]. At 010D, page 1 is present: hit, remove it from its old LRU position and append it, order [17,63,0,1]. At 10FF, page 16 is absent and memory is full: evict 17, append 16, order [63,0,1,16]. At 11B0, page 17 is absent because the previous reference evicted it: evict 63, append 17, order [0,1,16,17].

A page fault need not cause a replacement when a free frame exists; this distinction matters for the first reference. The initial figure shows three residents despite four-frame capacity. If an unprinted fourth resident was intended instead, its identity and recency are necessary for a unique trace. We do not invent that page or silently change memory capacity to three frames.

Original paper, page 7

Descriptive
Report issue

Identify page replacements

Virtual Memory & Paging

Question 7(iii), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Identify page replacements, if any.
Question 7(iii), GATE 1996: A demand-paged system has 16-bit virtual addresses, 256-byte pages, 1 KiB physical memory, and LRU order [17,1,63] from least to most recent. Process hexadecimal addresses 00FF,010D,10FF,11B0 in order. Only three initial residents are listed, so assume the fourth frame is free. Identify page replacements, if any.
Tap to enlarge
Answer & solution

Answer: 00FF: free frame; 010D: none; 10FF: replace 17 with 16; 11B0: replace 63 with 17. (no official key was published)

The offset occupies eight bits because a page has 28 bytes. Discard the low two hexadecimal digits to obtain decimal page references 0,1,16,17. Physical memory holds 1024/256=4 pages.

At 00FF, page 0 is absent: fault, load into the free frame, order [17,1,63,0]. At 010D, page 1 is present: hit, remove it from its old LRU position and append it, order [17,63,0,1]. At 10FF, page 16 is absent and memory is full: evict 17, append 16, order [63,0,1,16]. At 11B0, page 17 is absent because the previous reference evicted it: evict 63, append 17, order [0,1,16,17].

A page fault need not cause a replacement when a free frame exists; this distinction matters for the first reference. The initial figure shows three residents despite four-frame capacity. If an unprinted fourth resident was intended instead, its identity and recency are necessary for a unique trace. We do not invent that page or silently change memory capacity to three frames.

Original paper, page 7

1 mark · MCQ
Report issue

Paging a segment table

Virtual Memory & Paging

Question 1.7, GATE 1995: Why might a paged-segmented memory scheme give the segment table itself a page table?
Tap to enlarge
Your answer
Answer & solution

Answer: A: the segment table can be too large for one page (no official key was published)

A large segment table can span multiple pages. Paging that table lets its pieces be placed in separate physical frames and, where supported, brought in on demand. A page table is then needed to translate addresses of the segment-table pages themselves. This is distinct from the page tables belonging to individual program segments. The wording “must” is architecture dependent: a small segment table or an architecture requiring contiguous resident tables need not use this extra paging level. A describes the motivation within the assumed paged-table design.

Original paper, page 1

1 mark · MCQ
Report issue

Belady’s anomaly

Virtual Memory & Paging

Question 1.8, GATE 1995: Which replacement policy can have more page faults after increasing the frame count: OPT, LRU, FIFO, or OPT and FIFO?
Tap to enlarge
Your answer
Answer & solution

Answer: C: FIFO (no official key was published)

FIFO removes the page that has been resident longest, independent of recent use or future demand. Its resident sets with different frame counts need not be nested, so adding a frame can alter the eviction order disadvantageously. The classic string 1,2,3,4,1,2,5,1,2,3,4,5 gives nine FIFO faults with three frames and ten with four. LRU and OPT have the stack-inclusion property and do not suffer this anomaly. Therefore C is the correct policy.

Original paper, page 1

2 marks · MCQ
Report issue

Page faults with a single frame

Virtual Memory & Paging

Question 2.7, GATE 1995: With 100 records per page and one initially free frame, access 0100,0200,0430,0499,0510,0530,0560,0120,0220,0240,0260,0320,0370. How many faults?
Question 2.7, GATE 1995: With 100 records per page and one initially free frame, access 0100,0200,0430,0499,0510,0530,0560,0120,0220,0240,0260,0320,0370. How many faults?
Tap to enlarge
Your answer
Answer & solution

Answer: C: 7 (no official key was published)

Treating addresses as the stated decimal record numbers, integer division by 100 gives pages 1,2,4,4,5,5,5,1,2,2,2,3,3. With just one frame, a fault occurs on the first reference and each change of page. The seven consecutive runs are 1 | 2 | 4,4 | 5,5,5 | 1 | 2,2,2 | 3,3. Thus there are seven faults. Leading zeros are address formatting here, not C octal literals; interpreting them as octal would be incompatible with the printed digit 9.

Original paper, page 3

2 marks · MCQ
Report issue

Address space versus installed storage

Virtual Memory & Paging

Question 2.16, GATE 1995: Must the CPU-addressable virtual space be smaller or larger than physical memory and secondary storage?
Tap to enlarge
Your answer
Answer & solution

Answer: C under the textbook larger-than-RAM/smaller-than-backing-store model; no universal “must” (no official key was published)

Virtual memory commonly lets a process use an address space larger than the currently installed RAM, with inactive pages backed by secondary storage. Under a simple fully backed textbook model, this motivates larger than physical memory and smaller than backing storage, choice C. But address-bit width defines a possible address space, not a promise that every possible address is allocated or backed simultaneously. Sparse mappings, demand-zero pages and reservation policies break the claimed universal inequality. Thus the word “must” is too strong without the fully allocated/backed model, and actual capacity ratios are architecture and configuration dependent.

Original paper, page 4

Report issue

Evicting a heavily used old page

Virtual Memory & Paging

Question 1.13, GATE 1994: A heavily used page was loaded early and remains in constant use. Which listed policy can evict it because of its age: LRU, FIFO, generic replacement, or none?
Question 1.13, GATE 1994: A heavily used page was loaded early and remains in constant use. Which listed policy can evict it because of its age: LRU, FIFO, generic replacement, or none?
Tap to enlarge
Your answer
Answer & solution

Answer: B: FIFO (no official key was published)

FIFO orders resident pages by when they entered memory, ignoring later references. A page loaded early can therefore reach the front of the eviction queue even while frequently accessed. LRU updates recency information when the page is used, so constant recent use protects it relative to less recently referenced pages. The question contrasts these policy criteria, not an absolute guarantee that a page can never be evicted under any workload. FIFO’s load-age rule is the specific explanation.

Original paper, page 2

Descriptive
Report issue

LRU page-fault trace

Virtual Memory & Paging

Question 21(a), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under LRU.
Question 21(a), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under LRU.
Question 21(a), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under LRU.
Tap to enlarge
Answer & solution

Answer: 9 faults, at reference positions 1,2,3,4,7,8,11,12,13. (no official key was published)

Step through it (16 steps)

The first four distinct references each fault and fill the four frames. On a later miss, evict the oldest entry in the policy order below. For LRU that means least recently used; for FIFO it means earliest loaded. LRU moves a referenced resident page to most-recent position even on a hit. Thus after references 5 and 6 the order is 2,4,1,3, and page 2 is evicted for page 5 at reference 7.

The full trace lists reference position, requested page, result, and policy order from eviction candidate to newest:
1: page 1, fault, order 1
2: page 2, fault, order 1,2
3: page 3, fault, order 1,2,3
4: page 4, fault, order 1,2,3,4
5: page 1, hit, order 2,3,4,1
6: page 3, hit, order 2,4,1,3
7: page 5, fault, order 4,1,3,5
8: page 2, fault, order 1,3,5,2
9: page 1, hit, order 3,5,2,1
10: page 5, hit, order 3,2,1,5
11: page 4, fault, order 2,1,5,4
12: page 3, fault, order 1,5,4,3
13: page 2, fault, order 5,4,3,2
14: page 3, hit, order 5,4,2,3

There are 9 faults. Positions are reported rather than only page values because the same page can fault more than once. Initially empty frames cause compulsory faults too; omitting them would undercount.

Original paper, page 13

Descriptive
Report issue

FIFO page-fault trace

Virtual Memory & Paging

Question 21(b), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under FIFO.
Question 21(b), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under FIFO.
Question 21(b), GATE 1993: Four initially empty page frames receive [1, 2, 3, 4, 1, 3, 5, 2, 1, 5, 4, 3, 2, 3]. Identify each page fault under FIFO.
Tap to enlarge
Answer & solution

Answer: 8 faults, at reference positions 1,2,3,4,7,9,13,14. (no official key was published)

Step through it (16 steps)

The first four distinct references each fault and fill the four frames. On a later miss, evict the oldest entry in the policy order below. For LRU that means least recently used; for FIFO it means earliest loaded. FIFO changes its insertion order only on a fault. Hits at references 5 and 6 do not refresh pages 1 and 3. Therefore page 1, the oldest arrival, is evicted for page 5 at reference 7.

The full trace lists reference position, requested page, result, and policy order from eviction candidate to newest:
1: page 1, fault, order 1
2: page 2, fault, order 1,2
3: page 3, fault, order 1,2,3
4: page 4, fault, order 1,2,3,4
5: page 1, hit, order 1,2,3,4
6: page 3, hit, order 1,2,3,4
7: page 5, fault, order 2,3,4,5
8: page 2, hit, order 2,3,4,5
9: page 1, fault, order 3,4,5,1
10: page 5, hit, order 3,4,5,1
11: page 4, hit, order 3,4,5,1
12: page 3, hit, order 3,4,5,1
13: page 2, fault, order 4,5,1,2
14: page 3, fault, order 5,1,2,3

There are 8 faults. Positions are reported rather than only page values because the same page can fault more than once. Initially empty frames cause compulsory faults too; omitting them would undercount.

Original paper, page 13

Descriptive
Report issue

More frames can mean more faults

Virtual Memory & Paging

Question 3(v), GATE 1992: Which page-replacement policy can have more faults when memory size increases?
Question 3(v), GATE 1992: Which page-replacement policy can have more faults when memory size increases?
Tap to enlarge
Answer & solution

Answer: FIFO: Belady’s anomaly (no official key was published)

FIFO evicts the page loaded earliest, not necessarily the least useful page. With different frame counts, the order of subsequent evictions can change so that the larger memory performs worse. For example the reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5 has nine FIFO faults with three frames but ten with four. LRU and optimal replacement have the stack-inclusion property and avoid this anomaly. The question asks for a policy that sometimes exhibits it, not a claim that adding frames always hurts FIFO.

Original paper, page 5

Descriptive
Report issue

Working-set faults and average frames

Virtual Memory & Paging

Question 12(b), GATE 1992: With working-set window Δ=4, process the page references c c d b c e c e a d. Initially W(0)={a,d,e}; the latest initial references are a at t=0, d at t=−1, and e at t=−2. Find each working set, the total faults, and average frames used.
Tap to enlarge
Answer & solution

Answer: 5 page faults; average |W(t)| for t=1…10 is 3.2 frames. (no official key was published)

Use the standard discrete-reference window W(t) containing pages referenced at times t−3 through t, i.e. the last four references including the current one. Immediately before reference t, resident pages are W(t−1); a fault occurs exactly when the requested page is absent there. After serving the request, remove pages no longer in the new window. The specified W(0) fixes initial residency; any unspecified t=−3 reference expires at t=1 and does not affect the trace.

t  page   W(t)       size  fault?
0  a      {a,d,e}     3    initial state
1  c      {a,c,d,e}   4    yes
2  c      {a,c,d}     3    no
3  d      {a,c,d}     3    no
4  b      {b,c,d}     3    yes
5  c      {b,c,d}     3    no
6  e      {b,c,d,e}   4    yes
7  c      {b,c,e}     3    no
8  e      {c,e}       2    no
9  a      {a,c,e}     3    yes
10 d      {a,c,d,e}   4    yes

For example at t=6 the four references are d,b,c,e, whereas at t=8 they are c,e,c,e, using only two distinct frames. The last d reference at t=3 has expired by t=7, so d faults again at t=10. Fault times are 1,4,6,9,10: five faults.

The frame sum over the ten requested-reference instants is 4+3+3+3+3+4+3+2+3+4=32, so the conventional post-reference average is 32/10=3.2 frames. If one instead includes the supplied initial snapshot as an eleventh sample, the average is 35/11; if averaging pre-reference residency W(0)…W(9), it is 31/10. These are different sampling conventions, not different working-set traces. The reported 3.2 explicitly averages W(1)…W(10).

Original paper, page 8