• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Quiz for Sudo GATE 2021

Question 1

Which of the following choice(s) is/are correct ? Note - This question is multiple select questions (MSQ).
  • If a table has only one candidate key then table can not be in 2 NF.
  • A relation will be in 2NF if it is in 1NF and all non-key attributes are fully functional dependent on the primary key.
  • First Normal Form (1NF) does not eliminate redundancy, but rather, it’s that it eliminates repeating groups.
  • Relation should not have any attribute in Functional Dependency which is non-prime, the attribute that doesn’t occur in any candidate key.

Question 2

Which of the option(s) is/are correct ? Note - This question is multiple select questions (MSQ).
  • Relation R have attributes {a1, a2, a3,...,an} can have maximum number of super keys are 2(n-1)
  • Relation R have attributes {a1, a2, a3,... ,an} and the candidate key is “a1 a2 a3” then the possible number of super keys are 2(n-3).
  • A relation R(A, B, C, D, E, F, G, H) with set of functional dependencies {CH → G, A → BC, B → CFH, E → A, F → EG} has 120 superkeys.
  • The maximum number of superkeys for the relation schema R(E,F,G,H) with E as the key is 4.

Question 3

Consider the following data for B-tree and B+ tree,
Block size is  8 KB,  
Data pointer is 10 B,  
Block pointer is of 15 B and 
key size is 10 B 
Which of the following option is correct ? Note - This question is multiple select questions (MSQ).
  • Maximum order of leaf node of B-tree is 230
  • Maximum order of leaf node of B+ tree (Q) is 405
  • Difference of maximum order of leaf node of B-tree (P) and maximum order of leaf node of B+ tree (Q) -175
  • All of these are correct.

Question 4

Consider the following statements regarding minimum number of table required in relational algebra for converting ER diagram with cardinality and participation. 1. If there are only Partial participations:
  • One-One: 2 Tables, Merge Relation to any of the side.
  • Many-One or One-Many: 2 Tables, Merge Relation to Many side.
  • Many-Many: 3 tables (separate table for relation)
2. Any one of the side has full participation:
  • Full participation on Many Side: 2 Tables
  • Full Participation on one side: 1 Table
3. Both Side full participations:
  • Always one table irrespective of Cardinality.
Note - This question is multiple select questions (MSQ).
  • Statement 1 is correct
  • Statement 2 is correct
  • Statement 3 is correct
  • All 1, 2, and 3 are false.

Question 5

The following table has two attributes A and C where A is the primary key and C is the foreign key referencing A with on-delete cascade.
A   C
-----
4   6
5   6
6   5
7   4
9   4
11  7
8   6 
The set of all tuples that must be additionally deleted to preserve referential integrity when the tuple (4,6) is deleted is: Note - This question is multiple select questions (MSQ).
  • (11, 7)
  • (7, 4)
  • (4,6)
  • (9, 4)

Question 6

A program is called reentrant if it can be interrupted in the middle of its execution, and then be safely called again ("re-entered") before its previous invocations complete execution. The interruption could be caused by an internal action such as a jump or call, or by an external action such as an interrupt or signal. Once the reentered invocation completes, the previous invocations will resume correct execution. Which of the following program(s) is/are reentrant ? Note - This question is multiple select questions (MSQ).
  • int t;
    
    void swap(int *x, int *y)
    {
        t = *x;
        *x = *y;
    
        // hardware interrupt might invoke isr() here!
        *y = t;
    }
    
    void isr()
    {
        int x = 1, y = 2;
        swap(&x, &y);
    }
    
  • int t;
    
    void swap(int *x, int *y)
    {
        int s;
    
        s = t; // save global variable
        t = *x;
        *x = *y;
    
        // hardware interrupt might invoke isr() here!
        *y = t;
        t = s; // restore global variable
    }
    
    void isr()
    {
        int x = 1, y = 2;
        swap(&x, &y);
    }
    
  • void swap(int *x, int *y)
    {
        int t = *x;
        *x = *y;
    
        // hardware interrupt might invoke isr() here!
        *y = t;
    }
    
    void isr()
    {
        int x = 1, y = 2;
        swap(&x, &y);
    }
    
  • None of these

Question 7

Consider following processes with their arrival time and burst time:
Process ID Arrival Time Bust Time
P1 5 7
P2 2 9
P3 0 5
P4 0 3
P5 1 8
P6 15 25
Which of the following option(s) is/are correct using preemptive shortest job first scheduling algorithm and all the time in nanoseconds. Note - This question is multiple select questions (MSQ).
  • Average waiting time is 9.66 ns
  • Completion time of process P2 is 32
  • Turn Round Time of process P5 is 22
  • Total Turn Round Time is 115

Question 8

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 main memory size of 3 pages frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacements policy. Then Note - This question is multiple select questions (MSQ).
  • For FIFO: total no of page faults are 6
  • For optimal: total no of page faults are 5
  • For LRU: total no of page faults are 10
  • None

Question 9

A shared variable x, initialized to one, is operated on by four concurrent processes W, X, Y, Z as follows. Each of the processes W and X reads x from memory, increments by one, stores it to memory, and then terminates. Each of the processes Y and Z reads x from memory, decrements by two, stores it to memory, and then terminates. Each process before reading x invokes the P operation (i.e., wait) on a counting semaphore S and invokes the V operation (i.e., signal) on the semaphore S after storing x to memory. Semaphore S is initialized to two. Which of the following set(s) has/have possible value of x after all processes complete execution? Note - This question is multiple select questions (MSQ).
  • {-2, -1, 0, 1, 2}
  • {-3, -2, -1, 0, 1, 2}
  • {-3, -2, -1, 0, 1, 2, 3}
  • {-4, -3, -2, -1, 0, 1, 2}

Question 10

Consider the following system there are total 12 instances of resources A, 10 instances of resources B and 11 instances of resources C:
Process   Allocation        Maximum           
          A  B  C           A  B  C         
P0        0  2  3           3  3  6         
P1        2  4  2           2  5  3
P2        3  1  2           3  5  3
P3        5  2  2           6  5  4
If Banker\'s algorithm is applied for deadlock avoidance this system is in safe state. Which of the following option will be permitted with additional request? Note - This question is multiple select questions (MSQ).
  • Request: P3 - 1 instance of A, 2 instances of B, 3 instances of C
  • Request: P2 - 1 instance of A, 2 instances of B, 3 instances if C
  • Request: P1 - 1 instance of A, instances of B, 3 instances of C
  • Request: P0 - 1 instance of A, 2 instances of B, 3 instances of C

There are 55 questions to complete.

Last Updated :
Take a part in the ongoing discussion