• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2022

Question 11

Consider the resolution of the domain name www.gate.org.in by a DNS resolver. Assume that no resource records are cached anywhere across the DNS servers and that an iterative query mechanism is used in the resolution. The number of DNS query-response pairs involved in completely resolving the domain name is_____________. 

  • 4

  • 3

  • 7

  • 5

Question 12

Which one of the following is the closed form for the generating function of the sequence {an}n≥0 defined below?

  • [Tex]\frac{x(1+x^{2})}{(1-x^{2})^{2}} + \frac{1}{1-x}[/Tex]

  • [Tex]\frac{x(3-x^{2})}{(1-x^{2})^{2}} + \frac{1}{1-x}[/Tex]

  • [Tex]\frac{2x}{(1-x^{2})^{2}} + \frac{1}{1-x}[/Tex]

  • [Tex]\frac{x}{(1-x^{2})^{2}} + \frac{1}{1-x}[/Tex]

Question 13

Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of

  • A3

  • A3 divided by 2

  • A3 divided by 3 

  • A3 divided by 6 

Question 14

Which one of the following statements is FALSE?

  • The TLB performs an associative search in parallel on all its valid entries using the page number of the incoming virtual addresses.

  • If the virtual address of a word given by the CPU has a TLB hit, but the subsequent search for the word results in a cache miss, then the word will always be present in the main memory

  • The memory access time using a given inverted page table is always the same for all incoming virtual addresses.

  • In a system that uses hashed page tables, if two distinct virtual addresses V1 and V2 map to the same value while hashing, then the memory access time of these addresses will not be the same.

Question 15

Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Ti, respectively. Consider the schedule S with four transactions. 

S: R4(x)R2(x)R3(x)R1(y)W1(y)W2(x)W3(y)R4(y) 

Which one of the following serial schedules is conflict equivalent to S?

  • [Tex]T_{1} \to T_{3}\to T_{4}\to T_{2}[/Tex]

  • [Tex]T_{1} \to T_{4}\to T_{3}\to T_{2}[/Tex]

  • [Tex]T_{4} \to T_{1}\to T_{3}\to T_{2}[/Tex]

  • [Tex]T_{3} \to T_{1}\to T_{4}\to T_{2}[/Tex]

Question 16

Consider a digital display system (DDS) shown in the figure that displays the contents of register X. A 16-bit code word is used to load a word in X, either from S or from R. S is a 1024-word memory segment and R is a 32-word register file. Based on the value of mode bit M, T selects an input word to load in X. P and Q interface with the corresponding bits in the code word to choose the addressed word. Which one of the following represents the functionality of P, Q, and T? 

  • P is 10:1 multiplexer; Q is 5:1 multiplexer; T is 2:1 multiplexer

  • P is 10:210 decoder; Q is 5:25 decoder; T is 2:1 encoder

  • P is 10:210 decoder; Q is 5:25 decoder; T is 2:1 multiplexer

  • P is 1:10 de-multiplexer; Q is 1:5 de-multiplexer; T is 2:1 multiplexer

Question 17

Consider three floating-point numbers A, B, and C stored in registers RA, RB, and RC, respectively as per IEEE-754 single-precision floating-point format. The 32-bit content stored in these registers (in hexadecimal form) is as follows.

RA= 0xC1400000RB = 0x42100000 RC = 0x41400000 

Which one of the following is FALSE? 

  • A+ C= 0

  • C= A+B

  • B = 3C

  • (B-C)> 0

Question 18

Consider four processes P, Q, R, and S scheduled on a CPU as per round-robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?

  • P = 4, Q = 10, R = 6, S = 2 

  • P = 2, Q = 9, R = 5, S = 1

  • P = 4, Q = 12, R = 5, S = 4

  • P = 3, Q = 7, R = 7, S = 3 

Question 19

What is printed by the following ANSI C program?

#include<stdio.h> 
int main(int argc, char *argv[]) 
{ 
           int a[3][3][3] = 
           {{1, 2, 3, 4, 5, 6, 7, 8, 9}, 
           {10, 11, 12, 13, 14, 15, 16, 17, 18}, 
           {19, 20, 21, 22, 23, 24, 25, 26, 27}}; 
     int i = 0, j = 0, k = 0; 
     for( i = 0; i < 3; i++ ){ 
           for(k = 0; k < 3; k++ ) 
                 printf("%d ", a[i][j][k]); 
     printf("\n"); 
   } 
   return 0; 
}
  • 1 2 3 

    10 11 12 

    19 20 21

  • 1 4 7 

    10 13 16 

    19 22 25

  • 1 2 3 

    4 5 6 

    7 8 9

  • 1 2 3 

    13 14 15

    25 26 27 

Question 20

What is printed by the following ANSI C program? 

#include<stdio.h> 
int main(int argc, char *argv[]){ 
   char a = 'P'; 
   char b = 'x'; 
   char c = (a & b) + '*'; 
   char d = (a | b) - '-'; 
   char e = (a ^ b) + '+'; 
   printf("%c %c %c\n", c, d, e); 
   return 0; 
} 

ASCII encoding for relevant characters is given below

  • z K S

  • 122 75 83

  • * - +

  • P x +

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion