GATE CS
    Previous Year Papers
    Verified Solutions Included

    GATE CS 2024_Set1 Question Paper with Solutions: 65 Questions, Answer Key & Section-wise Analysis

    GATE CS 2024_Set1 previous year paper: 65 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    65 Qs

    Total Questions

    Not provided

    Total Marks

    Not provided

    Duration

    Free Solved Questions with Step-by-Step Solutions

    Authentic examination problems with detailed derivations and answer keys.

    Question 1

    TCP client P successfully establishes a connection to TCP server Q. Let denote the sequence number in the SYN sent from P to Q. Let denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?

    Question 2

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

    Question 3

    Consider the following read-write schedule over three transactions and , where the subscripts in the schedule indicate transaction IDs:

    Which of the following transaction schedules is/are conflict equivalent to ?

    Question 4

    Consider the following recurrence relation:

    Which one of the following options is CORRECT?

    Question 5

    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?

    Question 6

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

    Unlock All 65 Questions in Real Examination Mode

    Practice with the authentic timer, on-screen calculator, instant percentile ranking, and section-wise analytics.

    More GATE CS Previous Year Papers

    Free preview ends here

    Login to view the complete paper and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    GATE CS 2024_Set1 Question Paper with Solutions: 65 Questions, Answer Key & Section-wise Analysis

    GATE CS 2024_Set1 previous year paper: 65 questions with answer key and detailed solutions, section-wise breakdown and free sample questions.

    Paper breakdown

    65 questions.

    Free sample questions from GATE CS 2024_Set1 Question Paper

    Question 1 · Computer Networks MSQ

    TCP client P successfully establishes a connection to TCP server Q. Let denote the sequence number in the SYN sent from P to Q. Let denote the acknowledgement number in the SYN ACK from Q to P. Which of the following statements is/are CORRECT?

    1. A.

      The sequence number is chosen randomly by P

    2. B.

      The sequence number is always 0 for a new connection

    3. C.

      The acknowledgement number is equal to

    4. D.

      The acknowledgement number is equal to

    Correct Answer:

    ["A","D"]

    Step-by-Step Solution

    Insight: TCP handshakes synchronize initial sequence numbers (ISNs), which are randomized for security, and the ACK number always points to the next expected byte (ISN + 1 for a SYN).

    Exam route: P's SYN has Seq = . SYN consumes 1 sequence number. Q's SYN-ACK must ACK the next expected byte from P, which is . ISNs are random to prevent spoofing.

    Learning route:

    1. In TCP, the initial sequence number (ISN) is chosen randomly by the sender to prevent sequence prediction attacks. Thus, is random, not always 0. (A is correct, B is wrong).
    2. When P sends a SYN with Seq = , the SYN flag itself consumes 1 sequence number, even though it carries no data.
    3. The receiver (Q) must acknowledge the next expected sequence number. The next expected byte from P is .
    4. Therefore, in Q's SYN-ACK segment, the Acknowledgement number is exactly . (D is correct, C is wrong).
    Question 2 · Computer Organization and Architecture MSQ

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

    1. A.

      A read miss in WBC never evicts a dirty block

    2. B.

      A read miss in WTC never triggers a write back operation of a cache block to main memory

    3. C.

      A write hit in WBC can modify the value of the dirty bit of a cache block

    4. D.

      A write miss in WTC always writes the victim cache block to main memory before loading the missed block to the cache

    Correct Answer:

    ["B","C"]

    Step-by-Step Solution

    Key idea: This is a cache write policy and replacement tracing question. We must evaluate each statement based on the rules of Write-Back Cache (WBC) and Write-Through Cache (WTC).

    Step 1: Analyze Option A.

    "A read miss in WBC never evicts a dirty block."

    In WBC, blocks can be modified (dirty). If the cache is full and a read miss occurs, the LRU policy will select a victim. If the LRU block is dirty, it will be evicted (and written back to memory). Thus, it CAN evict a dirty block. Option A is False.

    Step 2: Analyze Option B.

    "A read miss in WTC never triggers a write back operation of a cache block to main memory."

    In WTC, every write operation immediately updates both the cache and main memory. Therefore, no block in the cache is ever marked as dirty. When a block is evicted, it is already consistent with main memory, so no write-back is needed. Option B is True.

    Step 3: Analyze Option C.

    "A write hit in WBC can modify the value of the dirty bit of a cache block."

    If a clean block (dirty bit = 0) in WBC receives a write hit, its data is updated in the cache, and the dirty bit is changed to 1 to indicate it is now dirty. Option C is True.

    Step 4: Analyze Option D.

    "A write miss in WTC always writes the victim cache block to main memory before loading the missed block to the cache."

    As established in Step 2, WTC maintains memory consistency at all times. The victim block is never dirty. Therefore, it never needs to be written back to main memory upon eviction. Option D is False.

    Answer: ["B", "C"]

    Question 3 · Databases MSQ

    Consider the following read-write schedule over three transactions and , where the subscripts in the schedule indicate transaction IDs:

    Which of the following transaction schedules is/are conflict equivalent to ?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    ["B","C","D"]

    Step-by-Step Solution

    Insight: Conflict equivalence depends entirely on the precedence graph. If the graph is acyclic, any topological sort is a conflict-equivalent serial schedule.

    Exam route: Identify all conflicting pairs (different transactions, same data, at least one write). Draw directed edges from the earlier to the later transaction. Find all valid topological sorts.

    Learning route:

    1. List operations per data item:
    • z: r1(z), w1(z) (only T1)
    • x: r2(x), w2(x) (only T2)
    • y: r3(y), w3(y), r2(y), w2(y)
    1. Identify conflicts on y:
    • w3(y) precedes r2(y) => T3 -> T2
    • w3(y) precedes w2(y) => T3 -> T2
    • r3(y) precedes w2(y) => T3 -> T2
    1. No conflicts involve T1, as it only accesses z.
    2. The precedence graph has a single edge: T3 -> T2.
    3. Topological sorts must have T3 before T2. T1 is independent and can be placed anywhere.

    Valid orders: T1 T3 T2, T3 T1 T2, T3 T2 T1.

    These match options B, C, and D.

    Question 4 · Algorithms MCQ

    Consider the following recurrence relation:

    Which one of the following options is CORRECT?

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    A

    Step-by-Step Solution

    Key idea: This is a recurrence relation with a square root argument, recognizable because the recursive call is .

    Why this method applies: Standard Master Theorem does not apply directly to . We must use a change of variables to transform it into a standard divide-and-conquer recurrence.

    Step 1: Let . Then .

    Step 2: Substitute this into the recurrence: .

    Step 3: Divide the entire equation by to simplify: .

    Step 4: Define a new function . The recurrence becomes .

    Step 5: This is a standard recurrence. By the Master Theorem (or simple expansion), .

    Step 6: Substitute back . We get .

    Step 7: Since , we have , which implies .

    Answer: Option A is correct.

    Question 5 · Computer Organization and Architecture MSQ

    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?

    1. A.

      In a pipelined execution, forwarding means the result from a source stage of an earlier instruction is passed on to the destination stage of a later instruction

    2. B.

      In forwarding, data from the output of the MEM stage can be passed on to the input of the EX stage of the next instruction

    3. C.

      Forwarding cannot prevent all pipeline stalls

    4. D.

      Forwarding does not require any extra hardware to retrieve the data from the pipeline stages

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Key idea: This is a conceptual MSQ on data forwarding in pipelines, recognisable because it asks which statements about forwarding are correct in a standard 5-stage pipeline.

    Step 1: Evaluate option A. Forwarding (bypassing) means taking the result produced at a later pipeline stage (e.g., EX or MEM output) of an earlier instruction and routing it directly to an earlier stage (e.g., EX input) of a later instruction, avoiding the wait for register writeback. This is the standard definition. Option A is CORRECT.

    Step 2: Evaluate option B. In a 5-stage pipeline, the MEM stage output holds the result of the previous instruction. This data can be forwarded to the EX stage input of the next instruction via a MEM-to-EX forwarding path. This is a standard forwarding path. Option B is CORRECT.

    Step 3: Evaluate option C. Forwarding resolves most RAW hazards, but it cannot resolve the load-use hazard. When a load instruction is immediately followed by an instruction that uses the loaded value, the data is only available at the end of the MEM stage, but the next instruction needs it at the beginning of EX. A 1-cycle stall is unavoidable even with forwarding. Option C is CORRECT.

    Step 4: Evaluate option D. Forwarding requires additional hardware: multiplexers at the ALU inputs to select between register file data and forwarded data, plus dedicated wiring (forwarding paths) from pipeline registers to those multiplexers. It is not free. Option D is INCORRECT.

    Answer: A, B, C

    Question 6 · Quantitative Aptitude MCQ

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

    1. A.

    2. B.

    3. C.

    4. D.

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: The ratio given is of the number of coins, not their monetary value. You must convert the count ratio into a value ratio by multiplying each part by its denomination.

    Exam route: Let the number of coins be . Their values are , , and . Total value . The percentage in ₹5 coins is .

    Learning route:

    Step 1: Assign the multiplier . The number of ₹1, ₹5, and ₹10 coins are , and respectively.

    Step 2: Convert the number ratio into a value ratio by multiplying each count by its denomination.

    • Value of ₹1 coins
    • Value of ₹5 coins
    • Value of ₹10 coins

    Step 3: Total amount .

    Step 4: Required percentage .

    Trap warning: Option B () comes from taking , which is the ratio of the number of ₹5 coins to the total number of coins. The question asks for the percentage of the amount, not the count.

    Verification: If , coins are 5, 3, 13; values are ₹5, ₹15, ₹130; total ₹150; ₹15 is exactly 10%.

    Other GATE CS papers