GATE 2024 (Session 1)
65 questions
MCQ 29 · MSQ 20 · NAT 161-mark 30 · 2-mark 35
Questions 21–25 of 65
In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
Answer: (A)
Take a B+ tree of order . Every node, whether internal or leaf, must be at least half full. The only exception is the root.
The root may have as few as 2 children (or a single key, if it is also a leaf). Without this exception, a tree with only a few keys could not exist.
The other options are wrong: leaf nodes and non-root internal nodes must be at least half full, and the leftmost leaf has no special rule.
Answer: (A)
The root may have as few as 2 children (or a single key, if it is also a leaf). Without this exception, a tree with only a few keys could not exist.
The other options are wrong: leaf nodes and non-root internal nodes must be at least half full, and the leftmost leaf has no special rule.
Answer: (A)
Which of the following statements about a relation R in first normal form (1NF) is/are TRUE ?
One or more options are correct.
Answer: (A), (C)
1NF only needs every attribute value to be atomic: no multi-valued or composite attributes.
- (A) is TRUE. A key can have several attributes, for example (roll_no, course_id). This is about keys, not about values.
- (B) is FALSE. 1NF sets no limit on foreign keys.
- (C) is TRUE. A composite attribute is not atomic, so it must be split into simple attributes.
- (D) is FALSE. 1NF places no limit on the number of candidate keys, so a relation can have many.
Answer: (A), (C)
- (A) is TRUE. A key can have several attributes, for example (roll_no, course_id). This is about keys, not about values.
- (B) is FALSE. 1NF sets no limit on foreign keys.
- (C) is TRUE. A composite attribute is not atomic, so it must be split into simple attributes.
- (D) is FALSE. 1NF places no limit on the number of candidate keys, so a relation can have many.
Answer: (A), (C)
Let be two regular languages and a language which is not regular. Which of the following statements is/are always TRUE?
One or more options are correct.
Answer: (C), (D)
(A) only says . Equality also needs . For example, and satisfy the condition but are not equal. False.
(B) Take . Then is regular. Not always true.
(C) If were regular, its complement would be regular, because regular languages are closed under complement. That contradicts the given. So is not regular. True.
(D) Regular languages are closed under complement and union, so is regular. True.
Answer: (C), (D)
(B) Take . Then is regular. Not always true.
(C) If were regular, its complement would be regular, because regular languages are closed under complement. That contradicts the given. So is not regular. True.
(D) Regular languages are closed under complement and union, so is regular. True.
Answer: (C), (D)
Which of the following statements about threads is/are TRUE?
One or more options are correct.
Answer: (D)
Let us look at each statement one by one:
- Threads can be built in user space too (user-level threads) FALSE.
- The file descriptor table is part of the process, and all its threads use it together FALSE.
- Each thread has its own stack (and its own registers and PC) FALSE.
- All threads use the same address space, so one thread can read or overwrite the data of another thread. They are not protected from each other TRUE.
Answer: Threads belonging to a process are by default not protected from each other
- Threads can be built in user space too (user-level threads) FALSE.
- The file descriptor table is part of the process, and all its threads use it together FALSE.
- Each thread has its own stack (and its own registers and PC) FALSE.
- All threads use the same address space, so one thread can read or overwrite the data of another thread. They are not protected from each other TRUE.
Answer: Threads belonging to a process are by default not protected from each other
Which of the following process state transitions is/are NOT possible?
One or more options are correct.
Answer: (B), (C)
Let us check each transition:
- Running Ready: possible (preemption, or the time slice is over).
- Waiting Running: NOT possible. When the I/O is done, the process moves to Ready. Only the scheduler can then move it to Running.
- Ready Waiting: NOT possible. A process can block (ask for I/O) only when it is running.
- Running Terminated: possible (exit).
Answer: Waiting to Running, Ready to Waiting
- Running Ready: possible (preemption, or the time slice is over).
- Waiting Running: NOT possible. When the I/O is done, the process moves to Ready. Only the scheduler can then move it to Running.
- Ready Waiting: NOT possible. A process can block (ask for I/O) only when it is running.
- Running Terminated: possible (exit).
Answer: Waiting to Running, Ready to Waiting