ITPEC FE Morning April 2019 Question 18
ITPEC FE Morning April 2019 — Question 18 of 80
Buffer overflow condition — find minimum buffer size when send speed exceeds receive speed.
Given: send speed S, receive speed R, duration T, buffer size L, where S > R.
- •Data entering buffer per second:
S - •Data leaving buffer per second:
R - •Net accumulation per second:
S - R - •Over
Tseconds, buffer must hold:(S - R) × T
Buffer does not overflow when: `L ≥ (S - R) × T`
Answer: (d)
Why not others:
- (a) L < (R - S) × T — R - S is negative (since S > R), and < means overflow
- (b) L < (S - R) × T — correct difference but < means buffer is too small
- (c) L ≥ (R - S) × T — R - S is negative, so L ≥ negative is always true (meaningless)
Key rule: When producer is faster than consumer, net accumulation = (S - R) × T; buffer must be ≥ this value.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.