GateAI
Cache Memory and Hierarchy

GATE CSE 2024 Set 1 · Q55

NAT2 marksMedium

Time

The baseline execution time of a program on a 2 GHz single core machine is 100 nanoseconds (ns\textit{ns}). The code corresponding to 90% of the execution time can be fully parallelized. The overhead for using an additional core is 10 ns\textit{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 answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 3

Cache Memory and Hierarchy

Let T1=100 nsT_1 = 100\text{ ns} be the single-core baseline execution time.

  • Non-parallelizable (serial) portion: Tserial=10%×100 ns=10 nsT_{\text{serial}} = 10\% \times 100\text{ ns} = 10\text{ ns}

  • Parallelizable portion: Tparallel=90%×100 ns=90 nsT_{\text{parallel}} = 90\% \times 100\text{ ns} = 90\text{ ns}

When using pp cores, the number of additional cores used is (p−1)(p - 1). The overhead for using (p−1)(p - 1) additional cores is (p−1)×10 ns(p - 1) \times 10\text{ ns}.

The total execution time T(p)T(p) on pp cores is:

T(p)=Tserial+Tparallelp+10(p−1)T(p) = T_{\text{serial}} + \frac{T_{\text{parallel}}}{p} + 10(p - 1)
T(p)=10+90p+10p−10=90p+10pT(p) = 10 + \frac{90}{p} + 10p - 10 = \frac{90}{p} + 10p

Evaluating T(p)T(p) for integer values of p≥1p \ge 1:

  • For p=1p = 1: T(1)=901+10(1)=100 nsT(1) = \frac{90}{1} + 10(1) = 100\text{ ns}

  • For p=2p = 2: T(2)=902+10(2)=45+20=65 nsT(2) = \frac{90}{2} + 10(2) = 45 + 20 = 65\text{ ns}

  • For p=3p = 3: T(3)=903+10(3)=30+30=60 nsT(3) = \frac{90}{3} + 10(3) = 30 + 30 = 60\text{ ns}

  • For p=4p = 4: T(4)=904+10(4)=22.5+40=62.5 nsT(4) = \frac{90}{4} + 10(4) = 22.5 + 40 = 62.5\text{ ns}

  • For p=5p = 5: T(5)=905+10(5)=18+50=68 nsT(5) = \frac{90}{5} + 10(5) = 18 + 50 = 68\text{ ns}

The execution time is minimized when the number of cores p=3p = 3, giving T(3)=60 nsT(3) = 60\text{ ns}.

Thus, the number of cores that minimizes execution time is 3.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Cache Memory and Hierarchy previous year question is Q55 of the GATE CSE 2024 Set 1 paper. Find more GATE CSE PYQs on Cache Memory and Hierarchy in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Cache Memory and Hierarchy PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Cache Memory and Hierarchy in GATE CSE

Cache Memory and Hierarchy has 47 GATE CSE PYQs across 23 papers from 2011 to 2026. 16 of them are 2-mark NAT questions like this one, and GATE CSE 2024 Set 1 has 4.

How GATE tests Cache Memory and Hierarchy

More from GATE CSE 2024 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 1 · Q55 · NAT

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 …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.