GATE 2025 (Session 2)
65 questions
MCQ 32 · MSQ 18 · NAT 151-mark 30 · 2-mark 35
Questions 46–50 of 65
Consider the following relational schema along with all the functional dependencies that hold on them.
Which of the following statement(s) is/are TRUE?
Which of the following statement(s) is/are TRUE?
One or more options are correct.
Answer: (C), (D)
R1(A,B,C,D,E) with .
A and D never appear on the right side of any FD, so no FD can give them. Every candidate key must contain both. Check : using we get . Next, gives . Then gives all of . So is a key. Any key must contain A and D, so it is the only candidate key.
Now test for 3NF. Is a superkey? No, since alone only reaches . Is a prime attribute (part of a candidate key)? No, since the only key is and it does not contain . Neither condition holds, so this FD breaks 3NF. R1 is NOT in 3NF.
R2(A,B,C,D) with .
C never appears on the right side of any FD, so every candidate key must contain C. Check : using we get . Then gives all of . So alone is the only candidate key.
Now test . Is a superkey? No, since alone reaches and misses . Is prime? No, since the key is only . This FD also breaks 3NF. R2 is NOT in 3NF.
So (A) and (B) are false, and (C) and (D) are true.
Answer: (C), (D)
A and D never appear on the right side of any FD, so no FD can give them. Every candidate key must contain both. Check : using we get . Next, gives . Then gives all of . So is a key. Any key must contain A and D, so it is the only candidate key.
Now test for 3NF. Is a superkey? No, since alone only reaches . Is a prime attribute (part of a candidate key)? No, since the only key is and it does not contain . Neither condition holds, so this FD breaks 3NF. R1 is NOT in 3NF.
R2(A,B,C,D) with .
C never appears on the right side of any FD, so every candidate key must contain C. Check : using we get . Then gives all of . So alone is the only candidate key.
Now test . Is a superkey? No, since alone reaches and misses . Is prime? No, since the key is only . This FD also breaks 3NF. R2 is NOT in 3NF.
So (A) and (B) are false, and (C) and (D) are true.
Answer: (C), (D)
Consider a demand paging system with three frames, and the following page reference string:
1 2 3 4 5 4 1 6 4 5 1 3 2. The contents of the frames are as follows initially and after each reference (from left to right):
The *-marked references cause page replacements.
Which one or more of the following could be the page replacement policy/policies in use?
The *-marked references cause page replacements.
Which one or more of the following could be the page replacement policy/policies in use?
One or more options are correct.
Answer: (D)
Read the replacements from the table. Reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2 (positions 1 to 13).
Page 4 (position 4) replaces 2 in {1, 2, 3}. Page 5 (position 5) replaces 3 in {1, 4, 3}. Page 6 (position 8) replaces 1 in {1, 4, 5}. Page 1 (position 11) replaces 4 in {6, 4, 5}. Page 3 (position 12) replaces 5 in {6, 1, 5}. Page 2 (position 13) replaces 6 in {6, 1, 3}.
Optimal evicts the page whose next use is farthest away, or that is never used again.
Position 4: next uses are 1 at 7, 2 at 13, 3 at 12, so 2 goes. Match.
Position 5: next uses are 4 at 6, 1 at 7, 3 at 12, so 3 goes. Match.
Position 8: next uses are 4 at 9, 5 at 10, 1 at 11, so 1 goes. Match.
Positions 11, 12, 13: every page in the frames is never used again, so any choice is optimal, and the evictions 4, 5, 6 are allowed. So the trace is consistent with Optimal.
LRU evicts the page used longest ago. At position 4 the frames hold 1, 2, 3 and page 1 was used earliest, but the trace evicts 2. Not LRU.
LFU evicts the page with the smallest use count. At position 8 the frames hold 1 (used at 1 and 7, count 2), 4 (used at 4 and 6, count 2) and 5 (count 1). LFU evicts 5, but the trace evicts 1. Not LFU.
MFU evicts the page with the largest use count. Counting all uses from the start of the string (counts are not reset when a page is reloaded), at position 12 the frames hold 6 (count 1), 1 (count 3, at positions 1, 7, 11) and 5 (count 2). MFU evicts 1, but the trace evicts 5. Not MFU. (If counts restarted at each reload, 1 would have count 1 and this step would fit, so the whole-history count is what rules MFU out.)
Answer: (D)
Page 4 (position 4) replaces 2 in {1, 2, 3}. Page 5 (position 5) replaces 3 in {1, 4, 3}. Page 6 (position 8) replaces 1 in {1, 4, 5}. Page 1 (position 11) replaces 4 in {6, 4, 5}. Page 3 (position 12) replaces 5 in {6, 1, 5}. Page 2 (position 13) replaces 6 in {6, 1, 3}.
Optimal evicts the page whose next use is farthest away, or that is never used again.
Position 4: next uses are 1 at 7, 2 at 13, 3 at 12, so 2 goes. Match.
Position 5: next uses are 4 at 6, 1 at 7, 3 at 12, so 3 goes. Match.
Position 8: next uses are 4 at 9, 5 at 10, 1 at 11, so 1 goes. Match.
Positions 11, 12, 13: every page in the frames is never used again, so any choice is optimal, and the evictions 4, 5, 6 are allowed. So the trace is consistent with Optimal.
LRU evicts the page used longest ago. At position 4 the frames hold 1, 2, 3 and page 1 was used earliest, but the trace evicts 2. Not LRU.
LFU evicts the page with the smallest use count. At position 8 the frames hold 1 (used at 1 and 7, count 2), 4 (used at 4 and 6, count 2) and 5 (count 1). LFU evicts 5, but the trace evicts 1. Not LFU.
MFU evicts the page with the largest use count. Counting all uses from the start of the string (counts are not reset when a page is reloaded), at position 12 the frames hold 6 (count 1), 1 (count 3, at positions 1, 7, 11) and 5 (count 2). MFU evicts 1, but the trace evicts 5. Not MFU. (If counts restarted at each reload, 1 would have count 1 and this step would fit, so the whole-history count is what rules MFU out.)
Answer: (D)
consists of all active processes in an operating system. consists of single instances of distinct types of resources in the system.
The resource allocation graph has the following assignment and claim edges.
(the assignment edge means resource is assigned to process , and so on for others)
(the claim edge means process is waiting for resource , and so on for others)
Which of the following statement(s) is/are CORRECT?
The resource allocation graph has the following assignment and claim edges.
(the assignment edge means resource is assigned to process , and so on for others)
(the claim edge means process is waiting for resource , and so on for others)
Which of the following statement(s) is/are CORRECT?
One or more options are correct.
Answer: (C), (D)
Draw the resource-allocation graph and check for cycles. Every resource has a single instance, so a cycle means deadlock.
Cycle A: , which involves .
Cycle B: , which involves .
Both cycles have in common. Aborting by itself breaks both cycles at the same time, because removing the edges of collapses both. The system becomes deadlock-free.
Aborting by itself breaks only Cycle A. Cycle B never involved , so it stays intact and the system is still deadlocked. In the same way, aborting by itself touches only Cycle A. Cycle B is left as it is, so the system is still deadlocked.
Aborting both and together: removing frees , so the wait of is resolved. Removing frees , so the wait of for is resolved. With both freed, the rest of the chain () can unwind fully. The system is deadlock-free.
Answer: Aborting P2 alone works; and aborting both P1 and P4 together works.
Cycle A: , which involves .
Cycle B: , which involves .
Both cycles have in common. Aborting by itself breaks both cycles at the same time, because removing the edges of collapses both. The system becomes deadlock-free.
Aborting by itself breaks only Cycle A. Cycle B never involved , so it stays intact and the system is still deadlocked. In the same way, aborting by itself touches only Cycle A. Cycle B is left as it is, so the system is still deadlocked.
Aborting both and together: removing frees , so the wait of is resolved. Removing frees , so the wait of for is resolved. With both freed, the rest of the chain () can unwind fully. The system is deadlock-free.
Answer: Aborting P2 alone works; and aborting both P1 and P4 together works.
Three floating point numbers are stored in three registers , respectively in IEEE 754 single precision format as given below in hexadecimal:
Which of the following option(s) is/are CORRECT?
Which of the following option(s) is/are CORRECT?
One or more options are correct.
Answer: (A), (B), (C)
IEEE 754 single precision: 1 sign bit, 8 exponent bits (bias 127), 23 fraction bits. Value .
RX = 0xC1100000 . Sign 1 (negative). Exponent . Fraction , so the mantissa is 1.125. .
RY = 0x40C00000 . Sign 0. Exponent . Fraction , so the mantissa is 1.5. .
RZ = 0x41400000 . Sign 0. Exponent . Mantissa 1.5. .
Check each option:
(A) . Correct.
(B) . Correct.
(C) . Correct.
(D) . Wrong.
Answer: (A), (B), (C)
RX = 0xC1100000 . Sign 1 (negative). Exponent . Fraction , so the mantissa is 1.125. .
RY = 0x40C00000 . Sign 0. Exponent . Fraction , so the mantissa is 1.5. .
RZ = 0x41400000 . Sign 0. Exponent . Mantissa 1.5. .
Check each option:
(A) . Correct.
(B) . Correct.
(C) . Correct.
(D) . Wrong.
Answer: (A), (B), (C)
Which of the following Boolean algebraic equation(s) is/are CORRECT?
One or more options are correct.
Answer: (B), (C), (D)
Check each equation.
(A) The left side has minterms (ABC) 000, 011, 100, 101, 111, that is {0, 3, 4, 5, 7}. The right side: gives {3, 7}, gives {0, 4}, gives {0, 1}, so {0, 1, 3, 4, 7}. They differ: at the left side is 1 and the right side is 0. False.
(B) This is the consensus theorem: the term is redundant because it is covered by and . True.
(C) by the consensus theorem. True.
(D) By De Morgan, the complement of the product of four sums is the sum of the complements of each sum: . Now , and is absorbed by . So the result is . True.
Answer: (B), (C), (D)
(A) The left side has minterms (ABC) 000, 011, 100, 101, 111, that is {0, 3, 4, 5, 7}. The right side: gives {3, 7}, gives {0, 4}, gives {0, 1}, so {0, 1, 3, 4, 7}. They differ: at the left side is 1 and the right side is 0. False.
(B) This is the consensus theorem: the term is redundant because it is covered by and . True.
(C) by the consensus theorem. True.
(D) By De Morgan, the complement of the product of four sums is the sum of the complements of each sum: . Now , and is absorbed by . So the result is . True.
Answer: (B), (C), (D)