The PYQ practice room

GATE CS 2024 Set 1

All 65 solved GATE CS 2024 Set 1 questions in exam order. Open a question, commit to an answer, and learn from the step-by-step solution. One question at a time.

Attempt before revealInstant answer feedbackExplore questions
Go beyond PYQs with Success TrackerAI-powered personalised practice and doubt support. Unlimited practice on eligible plans; AI usage limits apply.

Questions

65

Paper marks

100

Question formats

3

MCQ · MSQ · NAT

Revision mode

Self-paced

No timer. Focus on understanding.

Difficulty mixEasy 24Medium 37Hard 4

Explore the questions

65 of 65 questions

General Aptitude (GA)

10
  1. Think it through. Then check your answer.

    Question

    If ‘→\rightarrow’ denotes increasing order of intensity, then the meaning of the words [dry →\rightarrow arid →\rightarrow parched] is analogous to [diet →\rightarrow fast →\rightarrow ________ ].
    Which one of the given options is appropriate to fill the blank?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    If two distinct non-zero real variables xx and yy are such that (x+y)(x + y) is proportional to (x−y)(x - y) then the value of xy\frac{x}{y}
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    Consider the following sample of numbers:9,18,11,14,15,17,10,69,11,139, 18, 11, 14, 15, 17, 10, 69, 11, 13The median of the sample is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

    The number of coins of ₹1, ₹5, and ₹10 denominations that a person has are in the ratio 5:3:13. Of the total amount, the percentage of money in ₹5 coins is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    For positive non-zero real variables pp and qq, iflog⁡(p2+q2)=log⁡p+log⁡q+2log⁡3,\log (p^2 + q^2) = \log p + \log q + 2 \log 3 ,then, the value of p4+q4p2q2\frac{p^4 + q^4}{p^2 q^2} is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    In the given text, the blanks are numbered (i)–(iv). Select the best match for all the blanks.
    Steve was advised to keep his head _____(i)____ before heading _____(ii)______ to bat; for, while he had a head _______(iii)_______ batting, he could only do so with a cool head _____(iv)______ his shoulders.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

    A rectangular paper sheet of dimensions 54 cm×4 cm54 \text{ cm} \times 4 \text{ cm} is taken. The two longer edges of the sheet are joined together to create a cylindrical tube. A cube whose surface area is equal to the area of the sheet is also taken.
    Then, the ratio of the volume of the cylindrical tube to the volume of the cube is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    The pie chart presents the percentage contribution of different macronutrients to a typical 2,000 kcal diet of a person.
    Pie chart showing macronutrient energy contribution
    The typical energy density (kcal/g) of these macronutrients is given in the table.
    MacronutrientEnergy density (kcal/g)
    Carbohydrates4
    Proteins4
    Unsaturated fat9
    Saturated fat9
    Trans fat9
    The total fat (all three types), in grams, this person consumes is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    A rectangular paper of 20 cm×8 cm20 \text{ cm} \times 8 \text{ cm} is folded 3 times. Each fold is made along the line of symmetry, which is perpendicular to its long edge. The perimeter of the final folded sheet (in cm) is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    The least number of squares to be added in the figure to make AB a line of symmetry is
    A grid with shaded squares and a horizontal dashed line AB representing an axis of symmetry.
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page

Computer Science and Information Technology

55
  1. Think it through. Then check your answer.

    Question

    Let f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} be a function such that f(x)=max⁡{x,x3},x∈Rf(x) = \max\{x, x^3\}, x \in \mathbb{R}, where R\mathbb{R} is the set of all real numbers. The set of all points where f(x)f(x) is NOT differentiable is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  2. Think it through. Then check your answer.

    Question

    The product of all eigenvalues of the matrix [123456789]\begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  3. Think it through. Then check your answer.

    Question

    Consider a system that uses 5 bits for representing signed integers in 2’s complement format. In this system, two integers AA and BB are represented as A=01010A=01010 and B=11010B=11010. Which one of the following operations will result in either an arithmetic overflow or an arithmetic underflow?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  4. Think it through. Then check your answer.

    Question

    Consider a permutation sampled uniformly at random from the set of all permutations of {1,2,3,…,n}\{1, 2, 3, \dots, n\} for some n≥4n \geq 4. Let XX be the event that 1 occurs before 2 in the permutation, and YY the event that 3 occurs before 4. Which one of the following statements is TRUE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  5. Think it through. Then check your answer.

    Question

    Which one of the following statements is FALSE?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  6. Think it through. Then check your answer.

    Question

    A user starts browsing a webpage hosted at a remote server. The browser opens a single TCP connection to fetch the entire webpage from the server. The webpage consists of a top-level index page with multiple embedded image objects. Assume that all caches (e.g., DNS cache, browser cache) are all initially empty. The following packets leave the user’s computer in some order.
    (i) HTTP GET request for the index page
    (ii) DNS request to resolve the web server’s name to its IP address
    (iii) HTTP GET request for an image object
    (iv) TCP SYN to open a connection to the web server
    Which one of the following is the CORRECT chronological order (earliest in time to latest) of the packets leaving the computer ?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  7. Think it through. Then check your answer.

    Question

    Given an integer array of size NN, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  8. Think it through. Then check your answer.

    Question

    Consider the following C program:
    #include <stdio.h>
    int main(){
     int a = 6;
     int b = 0;
     while(a < 10) {
      a = a / 12 + 1;
      a += b;}
     printf("%d", a);
     return 0;}
    
    Which one of the following statements is CORRECT?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  9. Think it through. Then check your answer.

    Question

    Consider the following C program:
    #include <stdio.h>
    void fX(); 
    int main(){ 
     fX(); 
     return 0;} 
    
    void fX(){
     char a;
     if((a=getchar()) != '\n')
     fX();
     if(a != '\n')
     putchar(a);}
    
    Assume that the input to the program from the command line is 1234 followed by
    a newline character. Which one of the following statements is CORRECT?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  10. Think it through. Then check your answer.

    Question

    Let S be the specification: "Instructors teach courses. Students register for courses. Courses are allocated classrooms. Instructors guide students." Which one of the following ER diagrams CORRECTLY represents S?
    Four ER diagrams labeled (i), (ii), (iii), and (iv) depicting relationships between Instructor, Course, Student, and Classroom
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  11. Think it through. Then check your answer.

    Question

    In a B+B^+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  12. Think it through. Then check your answer.

    Question

    Which of the following statements about a relation R\mathbf{R} in first normal form (1NF) is/are TRUE ?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  13. Think it through. Then check your answer.

    Question

    Let L1,L2L_1, L_2 be two regular languages and L3L_3 a language which is not regular. Which of the following statements is/are always TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  14. Think it through. Then check your answer.

    Question

    Which of the following statements about threads is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  15. Think it through. Then check your answer.

    Question

    Which of the following process state transitions is/are NOT possible?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  16. Think it through. Then check your answer.

    Question

    Which of the following is/are Bottom-Up Parser(s)?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  17. Think it through. Then check your answer.

    Question

    Let AA and BB be two events in a probability space with P(A)=0.3P(A) = 0.3, P(B)=0.5P(B) = 0.5, and P(A∩B)=0.1P(A \cap B) = 0.1. Which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  18. Think it through. Then check your answer.

    Question

    Consider the circuit shown below where the gates may have propagation delays. Assume that all signal transitions occur instantaneously and that wires have no delays. Which of the following statements about the circuit is/are CORRECT?
    A logic circuit with input $X$ branching into an AND gate directly and through a NOT gate. The output is $Y$.
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  19. Think it through. Then check your answer.

    Question

    TCP client PP successfully establishes a connection to TCP server QQ. Let NPN_P denote the sequence number in the SYN sent from PP to QQ. Let NQN_Q denote the acknowledgement number in the SYN ACK from QQ to PP. Which of the following statements is/are CORRECT?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  20. Think it through. Then check your answer.

    Question

    Consider a 5-stage pipelined processor with Instruction Fetch (IF), Instruction Decode (ID), Execute (EX), Memory Access (MEM), and Register Writeback (WB) stages. Which of the following statements about forwarding is/are CORRECT?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  21. Think it through. Then check your answer.

    Question

    Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  22. Think it through. Then check your answer.

    Question

    Let AA and BB be non-empty finite sets such that there exist one-to-one and onto functions (i) from AA to BB and (ii) from A×AA \times A to A∪BA \cup B. The number of possible values of ∣A∣|A| is __________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  23. Think it through. Then check your answer.

    Question

    Consider the operator precedence and associativity rules for the integer arithmetic operators given in the table below.
    OperatorPrecedenceAssociativity
    +HighestLeft
    −HighRight
    ∗MediumRight
    /LowRight
    The value of the expression 3+1+5∗2/7+2−4−7−6/23 + 1 + 5 * 2 / 7 + 2 - 4 - 7 - 6 / 2 as per the above rules is __________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  24. Think it through. Then check your answer.

    Question

    The number of spanning trees in a complete graph of 4 vertices labelled A, B, C, and D is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  25. Think it through. Then check your answer.

    Question

    Consider the following two relations, R(A,B) and S(A,C):
    Relation R
    AB
    1020
    2030
    3040
    3050
    5095
    Relation S
    AC
    1090
    3045
    4080
    The total number of tuples obtained by evaluating the following expressionσB<C(R⋈R.A=S.AS)\sigma_{B<C}(R \bowtie_{R.A=S.A} S)is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  26. Think it through. Then check your answer.

    Question

    Consider a network path P—Q—R between nodes P and R via router Q. Node P sends a file of size 10610^6 bytes to R via this path by splitting the file into chunks of 10310^3 bytes each. Node P sends these chunks one after the other without any wait time between the successive chunk transmissions. Assume that the size of extra headers added to these chunks is negligible, and that the chunk size is less than the MTU.
    Each of the links P—Q and Q—R has a bandwidth of 10610^6 bits/sec, and negligible propagation latency. Router Q immediately transmits every packet it receives from P to R, with negligible processing and queueing delays. Router Q can simultaneously receive on link P—Q and transmit on link Q—R.
    Assume P starts transmitting the chunks at time t=0t = 0.
    Which one of the following options gives the time (in seconds, rounded off to 3 decimal places) at which R receives all the chunks of the file?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  27. Think it through. Then check your answer.

    Question

    Consider the following syntax-directed definition (SDD).
    ProductionSemantic Rules
    S → DHTU{S.val=D.val+H.val+T.val+U.val;}\{ S.val = D.val + H.val + T.val + U.val; \}
    D→"M"D1D \to \text{"M"}D_1{D.val=5+D1.val;}\{ D.val = 5 + D_1.val; \}
    D→ϵD \to \epsilon{D.val=−5;}\{ D.val = -5; \}
    H→"L"H1H \to \text{"L"}H_1{H.val=5∗10+H1.val;}\{ H.val = 5 * 10 + H_1.val; \}
    H→ϵH \to \epsilon{H.val=−10;}\{ H.val = -10; \}
    T→"C"T1T \to \text{"C"}T_1{T.val=5∗100+T1.val;}\{ T.val = 5 * 100 + T_1.val; \}
    T→ϵT \to \epsilon{T.val=−5;}\{ T.val = -5; \}
    U→"K"U \to \text{"K"}{U.val=5;}\{ U.val = 5; \}
    Given "MMLK" as the input, which one of the following options is the CORRECT value computed by the SDD (in the attribute S.valS.val)?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  28. Think it through. Then check your answer.

    Question

    Consider the following grammar GG, with SS as the start symbol. The grammar GG has three incomplete productions denoted by (1), (2), and (3).S→daT∣‾(1)S \rightarrow daT \mid \underline{\hspace{1cm}} (1)T→aS∣bT∣‾(2)T \rightarrow aS \mid bT \mid \underline{\hspace{1cm}} (2)R→‾(3)∣ϵR \rightarrow \underline{\hspace{1cm}} (3) \mid \epsilonThe set of terminals is {a,b,c,d,f}\{a, b, c, d, f\}. The FIRST and FOLLOW sets of the different non-terminals are as follows.FIRST(S)={c,d,f},FIRST(T)={a,b,ϵ},FIRST(R)={c,ϵ}\text{FIRST}(S) = \{c, d, f\}, \text{FIRST}(T) = \{a, b, \epsilon\}, \text{FIRST}(R) = \{c, \epsilon\}FOLLOW(S)=FOLLOW(T)={c,f,$},FOLLOW(R)={f}\text{FOLLOW}(S) = \text{FOLLOW}(T) = \{c, f, \$\}, \text{FOLLOW}(R) = \{f\}.
    Which one of the following options CORRECTLY fills in the incomplete productions?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  29. Think it through. Then check your answer.

    Question

    Consider the following pseudo-code.
    L1:   t1 = -1
    L2:   t2 = 0
    L3:   t3 = 0
    L4:   t4 = 4 * t3
    L5:   t5 = 4 * t2
    L6:   t6 = t5 * M
    L7:   t7 = t4 + t6
    L8:   t8 = a[t7]
    L9:   if t8 <= max goto L11
    L10:  t1 = t8
    L11:  t3 = t3 + 1
    L12:  if t3 < M goto L4
    L13:  t2 = t2 + 1
    L14:  if t2 < N goto L3
    L15:  max = t1
    
    Which one of the following options CORRECTLY specifies the number of basic blocks and the number of instructions in the largest basic block, respectively ?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  30. Think it through. Then check your answer.

    Question

    Consider the following two threads T1 and T2 that update two shared variables a and b. Assume that initially a = b = 1. Though context switching between threads can happen at any time, each statement of T1 or T2 is executed atomically without interruption.
    T1T2
    a = a + 1;b = 2 * b;
    b = b + 1;a = 2 * a;
    Which one of the following options lists all the possible combinations of values of a and b after both T1 and T2 finish execution?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  31. Think it through. Then check your answer.

    Question

    An array [82,101,90,11,111,75,33,131,44,93][82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  32. Think it through. Then check your answer.

    Question

    Consider the following recurrence relation:T(n)={nT(n)+nfor n≥1,1for n=1.T(n) = \begin{cases} \sqrt{n}T(\sqrt{n}) + n & \text{for } n \ge 1, \\ 1 & \text{for } n = 1. \end{cases}Which one of the following options is CORRECT?
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  33. Think it through. Then check your answer.

    Question

    Consider a binary min-heap containing 105 distinct elements. Let kk be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values of kk is
    Your answer

    Choose one option, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  34. Think it through. Then check your answer.

    Question

    The symbol →\rightarrow indicates functional dependency in the context of a relational database. Which of the following options is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  35. Think it through. Then check your answer.

    Question

    Let GG be a directed graph and TT a depth first search (DFS) spanning tree in GG that is rooted at a vertex vv. Suppose TT is also a breadth first search (BFS) tree in GG, rooted at vv. Which of the following statements is/are TRUE for every such graph GG and tree TT?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  36. Think it through. Then check your answer.

    Question

    Consider the following read-write schedule SS over three transactions T1,T2T_1, T_2, and T3T_3, where the subscripts in the schedule indicate transaction IDs:S:r1(z);w1(z);r2(x);r3(y);w3(y);r2(y);w2(x);w2(y);S: r_1(z); w_1(z); r_2(x); r_3(y); w_3(y); r_2(y); w_2(x); w_2(y);Which of the following transaction schedules is/are conflict equivalent to SS ?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  37. Think it through. Then check your answer.

    Question

    Consider a Boolean expression given by F(X,Y,Z)=∑(3,5,6,7)F(X, Y, Z) = \sum(3,5,6,7).
    Which of the following statements is/are CORRECT?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  38. Think it through. Then check your answer.

    Question

    Consider the following C function definition.
    int f(int x, int y) {
     for (int i=0; i<y; i++) {
       x=x+x+y;
     }
     return x;
    }
    
    Which of the following statements is/are TRUE about the above function?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  39. Think it through. Then check your answer.

    Question

    Let AA be any n×mn \times m matrix, where m>nm > n. Which of the following statements is/are TRUE about the system of linear equations Ax=0Ax = \mathbf{0} ?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  40. Think it through. Then check your answer.

    Question

    Consider the 5-state DFA MM accepting the language L(M)⊂(0+1)∗L(M) \subset (0 + 1)^* shown below. For any string w∈(0+1)∗w \in (0 + 1)^* let n0(w)n_0(w) be the number of 0's in ww and n1(w)n_1(w) be the number of 1's in ww.
    A 5-state DFA with states labeled 1 through 5. State 1 is the start state and the only final state. Transitions are: 1 on 0 to 2, 1 on 1 to 4; 2 on 0 to 3, 2 on 1 to 1; 3 on 0 to 1, 3 on 1 to 2; 4 on 0 to 1, 4 on 1 to 5; 5 on 0 to 4, 5 on 1 to 1.
    Which of the following statements is/are FALSE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  41. Think it through. Then check your answer.

    Question

    The chromatic number of a graph is the minimum number of colours used in a proper colouring of the graph. Let GG be any graph with nn vertices and chromatic number kk. Which of the following statements is/are always TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  42. Think it through. Then check your answer.

    Question

    Consider the operators ⋄\diamond and □\Box defined by a⋄b=a+2ba \diamond b = a + 2b, a□b=aba \Box b = ab, for positive integers. Which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  43. Think it through. Then check your answer.

    Question

    Consider two set-associative cache memory architectures: WBC, which uses the write back policy, and WTC, which uses the write through policy. Both of them use the LRU (Least Recently Used) block replacement policy. The cache memory is connected to the main memory. Which of the following statements is/are TRUE?
    Your answer

    Select all that apply, then check your answer.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  44. Think it through. Then check your answer.

    Question

    Consider a 512 GB hard disk with 32 storage surfaces. There are 4096 sectors per track and each sector holds 1024 bytes of data. The number of cylinders in the hard disk is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  45. Think it through. Then check your answer.

    Question

    The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns). The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns when running on a multicore system. Assume that all cores in the multicore system run their share of the parallelized code for an equal amount of time.
    The number of cores that minimize the execution time of the program is ________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  46. Think it through. Then check your answer.

    Question

    A given program has 25% load/store instructions. Suppose the ideal CPI (cycles per instruction) without any memory stalls is 2. The program exhibits 2% miss rate on instruction cache and 8% miss rate on data cache. The miss penalty is 100 cycles. The speedup (rounded off to two decimal places) achieved with a perfect cache (i.e., with NO data or instruction cache misses) is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  47. Think it through. Then check your answer.

    Question

    Consider the following code snippet using the fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.
    int x = 3;
    while(x > 0) {
     fork();
     printf("hello");
     wait(NULL);
     x--;
    }
    
    The total number of times the printf statement is executed is _______
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  48. Think it through. Then check your answer.

    Question

    Consider the entries shown below in the forwarding table of an IP router. Each entry consists of an IP prefix and the corresponding next hop router for packets whose destination IP address matches the prefix. The notation “/N” in a prefix indicates a subnet mask with the most significant NN bits set to 1.
    PrefixNext hop router
    10.1.1.0/24R1
    10.1.1.128/25R2
    10.1.1.64/26R3
    10.1.1.192/26R4
    This router forwards 20 packets each to 5 hosts. The IP addresses of the hosts are 10.1.1.16, 10.1.1.72, 10.1.1.132, 10.1.1.191, and 10.1.1.205 . The number of packets forwarded via the next hop router R2 is _______
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  49. Think it through. Then check your answer.

    Question

    Let G=(V,Σ,S,P)G = (V, \Sigma, S, P) be a context-free grammar in Chomsky Normal Form with Σ={a,b,c}\Sigma = \{a, b, c\} and VV containing 10 variable symbols including the start symbol SS. The string w=a30b30c30w = a^{30}b^{30}c^{30} is derivable from SS. The number of steps (application of rules) in the derivation S→∗wS \rightarrow^* w is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  50. Think it through. Then check your answer.

    Question

    The number of edges present in the forest generated by the DFS traversal of an undirected graph GG with 100 vertices is 40. The number of connected components in GG is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  51. Think it through. Then check your answer.

    Question

    Consider the following two regular expressions over the alphabet {0,1}\{0,1\}:r=0∗+1∗r = 0^* + 1^*s=01∗+10∗s = 01^* + 10^*The total number of strings of length less than or equal to 5, which are neither in rr nor in ss, is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  52. Think it through. Then check your answer.

    Question

    Consider a memory management system that uses a page size of 2 KB2\text{ KB}. Assume that both the physical and virtual addresses start from 00. Assume that the pages 0,1,2,0, 1, 2, and 33 are stored in the page frames 1,3,2,1, 3, 2, and 0,0, respectively. The physical address (in decimal format) corresponding to the virtual address 25002500 (in decimal format) is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  53. Think it through. Then check your answer.

    Question

    A bag contains 10 red balls and 15 blue balls. Two balls are drawn randomly without replacement. Given that the first ball drawn is red, the probability (rounded off to 3 decimal places) that both balls drawn are red is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  54. Think it through. Then check your answer.

    Question

    Consider a digital logic circuit consisting of three 2-to-1 multiplexers M1, M2, and M3 as shown below. X1X_1 and X2X_2 are inputs of M1. X3X_3 and X4X_4 are inputs of M2. A,B,A, B, and CC are select lines of M1, M2, and M3, respectively.
    Circuit diagram with three 2-to-1 multiplexers M1, M2, M3
    For an instance of inputs X1=1,X2=1,X3=0,X_1=1, X_2=1, X_3=0, and X4=0X_4=0, the number of combinations of A,B,CA, B, C that give the output Y=1Y=1 is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page
  55. Think it through. Then check your answer.

    Question

    Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _________
    Your answer

    Enter a number. Decimals, negative values and scientific notation are accepted.

    Restoring your progress…

    The solution stays hidden until you check.
    Open question page