GATE / CS ARCHIVE

GATE CSE 2024 SET 1 / QUESTION 55

Balance parallel speedup against per-core overhead

Computer Organization & Architecture · Processor Performance · Full GATE CSE 2024 Set 1 paper

GATE 2024 Set 1, Q55 2 marks · NAT
Report issue

Processor Performance

Question 55, GATE 2024: A program takes 100 ns on one 2 GHz core. Work accounting for 90% of that time parallelizes fully and is shared equally among cores. Every additional core adds 10 ns overhead. How many cores minimize total execution time?
Tap to enlarge
Answer & solution

Official answer: 3

Approach: Write a total-time function containing serial work, divided parallel work, and overhead for cores beyond the first.
1. The serial part takes 10 ns regardless of core count. With k≥1 cores, the parallel part takes 90/k ns.
2. There are k−1 additional cores, so overhead is 10(k−1) ns. Thus T(k)=10+90/k+10(k−1)=90/k+10k ns.
3. Treating k temporarily as continuous, T'(k)=−90/k²+10. The stationary point is k²=9, so k=3. Since T''(k)=180/k³>0, this is the unique continuous minimum.
4. It is also a valid integer choice. Check its neighbors: T(2)=65 ns, T(3)=60 ns, T(4)=62.5 ns. The derivative is negative before 3 and positive afterward, excluding more distant improvements.
Answer: 3 cores. The 2 GHz rate is not needed because the baseline and overhead are already specified in time units. Ignoring overhead would incorrectly suggest that more cores always help.

Original paper, page 33 · Answer key