Engineer Computer System common mistakes
Engineer Computer System · Understand the traps and how to avoid them.
When asked to compute the effective memory access time (EMAT) of a two-level TLB plus paging scheme, the candidate averages the hit and miss latencies (e.g., takes (hit + miss)/2) instead of weighting each path by its probability and summing the sequential accesses along the miss path.
Textbook latency numbers are memorized as isolated values, so the candidate treats the problem as a simple average of two numbers. They forget that EMAT = hit_ratio × (TLB + memory) + (1 − hit_ratio) × (TLB + page-table walks + memory), and that each page-table level adds another memory access.
What to do instead
Before touching numbers, draw the access path as a timeline: TLB lookup, then either one memory access (hit) or k page-table accesses plus the final data access (miss). Write the weighted-sum formula symbolically first, substitute values second, and sanity-check that the result lies strictly between the best-case and worst-case path. Practice with 1-, 2-, and 3-level tables until the pattern is automatic.
The candidate converts between two's complement, sign-magnitude, and one's complement by flipping the sign bit and leaving the magnitude unchanged, producing the wrong bit pattern for negative values and then carrying that error into range and overflow questions.
The candidate conflates the representations because all three use a leading sign bit. Two's complement additionally inverts all bits and adds one, which shifts the representable range to −2^(n−1) through 2^(n−1) − 1, and this asymmetry is easily forgotten.
What to do instead
For any negative number, apply the mechanical rule: write the positive magnitude, invert every bit, add one, and verify by adding the result back to the original - it must wrap to zero in n bits. Memorize the ranges side by side (two's complement −2^(n−1)…2^(n−1)−1; sign-magnitude and one's complement ±(2^(n−1)−1) with two zeros in one's complement). Recompute a couple of small 4-bit examples by hand until the mechanics are reflexive.
When asked whether a signed addition overflows, the candidate checks only the carry-out of the most significant bit, or checks the sign of the result against zero, rather than comparing the signs of the two operands with the sign of the result.
Carry-out and overflow are taught together, so the candidate assumes they are the same phenomenon. In two's complement, carry-out is irrelevant to signed overflow; overflow occurs only when two operands of the same sign produce a result of the opposite sign.
What to do instead
Apply the rule explicitly: overflow iff (a ≥ 0 and b ≥ 0 and result < 0) or (a < 0 and b < 0 and result ≥ 0). For subtraction, negate the subtrahend first and reuse the same rule. Distinguish this from unsigned carry-out, which is detected by the carry flag alone. Work through one positive and one negative example in 8 bits to confirm both directions.
The candidate computes the average seek time, rotational latency, and transfer time of a disk access but then omits the queueing delay or applies the full seek time instead of half the track-to-track value, and reports a single number without stating the assumption used.
Formulas are recalled as a single equation (seek + rotation/2 + transfer) without the modelling assumptions behind them. The candidate also forgets that average rotational latency is half a revolution and that average seek is not the same as full-stroke seek.
What to do instead
Write the formula with each term labelled and its assumption stated: average seek (half-stroke unless told otherwise), rotational latency = 60/(2 × RPM) seconds, transfer = block size / transfer rate, plus queueing if a request rate is given. Show units at every step (ms vs. s) and state which quantities are averages. If the problem gives a request arrival rate, check whether it is a queueing problem before applying the simple sum.
The candidate analyzes a recursive algorithm by writing T(n) = 2T(n/2) + n and then asserts the answer is O(n log n) without applying the Master Theorem or substitution, and mislabels the case when the recurrence is T(n) = 2T(n/2) + n².
The candidate pattern-matches recurrences to familiar results (merge sort, binary search) instead of comparing the work at the leaves with the work at the root. When the non-recursive term dominates, the matched pattern gives the wrong bound.
What to do instead
For every recurrence, identify a, b, and f(n), compute n^(log_b a), and compare it with f(n) to select the Master Theorem case; if the theorem does not apply, use the substitution method or a recursion tree. Always verify the claimed bound by checking the base case and one level of expansion. Practice distinguishing T(n) = 2T(n/2) + n (Θ(n log n)) from T(n) = 2T(n/2) + n² (Θ(n²)).
When asked for the output of a small C or Java program involving integer division, unsigned arithmetic, or short-circuit evaluation, the candidate evaluates expressions left to right as if all operators had equal precedence and ignores side effects in the unevaluated operand.
The candidate reads code as prose and relies on intuition about what the programmer meant. Precedence, associativity, integer truncation toward zero, and short-circuit rules are language-specific and are not applied mechanically.
What to do instead
Before evaluating, annotate the expression with parentheses according to the language's precedence table, then substitute values step by step. For short-circuit operators, mark which operands are actually evaluated and which side effects (increments, function calls) therefore do not occur. Confirm integer division truncates toward zero in C and Java, and check unsigned wraparound explicitly rather than assuming mathematical arithmetic.
The candidate normalizes a relation to 3NF or BCNF by removing partial and transitive dependencies but leaves a candidate key out of the decomposition, so the resulting schema loses a functional dependency or cannot enforce a key constraint.
Normalization is treated as a checklist of dependency types rather than as a decomposition that must be lossless and dependency-preserving. The candidate forgets that every relation needs at least one candidate key and that 3NF allows some redundancy only when dependency preservation requires it.
What to do instead
For each relation, first list all functional dependencies and compute the attribute closure of each determinant to find all candidate keys. Then apply the synthesis algorithm: create a relation for each dependency, add a relation for a candidate key if none of the created relations contains one, and verify losslessness by checking that the join attribute of each split is a superkey of at least one side. Test the final schema by re-deriving every original dependency.
The candidate answers a subnetting question by computing the number of hosts per subnet but then assigns the network and broadcast addresses to hosts, or picks a subnet mask that overlaps an existing subnet, producing an address plan that cannot be routed.
The candidate memorizes 2^n − 2 as a formula without tracking which two addresses are reserved, and does not check that subnets are aligned on their mask boundaries. Overlapping ranges are easy to miss when the plan is written in decimal rather than binary.
What to do instead
Convert the address and mask to binary, mark the network and host portions, and list the first, last usable, and broadcast address for each subnet. Verify alignment by confirming that every subnet's network address has all host bits zero and that the next subnet begins at the next multiple of the block size. Finally, check for overlap by comparing ranges in the same notation and confirm that the block sizes sum correctly within the parent prefix.
The candidate computes availability as 1 − (sum of individual downtimes) or multiplies MTBF by the number of components, instead of combining component availabilities according to whether they are in series (multiply) or parallel/redundant (1 − product of failure probabilities).
The candidate mixes up MTBF, MTTR, and availability, and applies a single formula regardless of the system topology. Series and parallel reliability behave in opposite ways, and summing downtimes silently assumes independence that does not exist.
What to do instead
Draw the reliability block diagram first: series components multiply availabilities (A = A1 × A2), parallel redundant components combine as A = 1 − (1 − A1)(1 − A2). Compute availability as MTBF/(MTBF + MTTR) for each component before combining. For N+1 or 2N redundancy, state the assumption about common-cause failure and independent repair. Sanity-check that adding redundancy raises availability and adding series components lowers it.
When a question involves a professional or ethical obligation (confidentiality, conflict of interest, safety-critical disclosure), the candidate selects the answer that follows the employer's instruction or the client's preference rather than the obligation owed to the public and the applicable code of ethics.
The candidate reads the scenario as a workplace-loyalty question rather than a professional-duty question, and does not recall that public safety and the integrity of the profession take precedence over commercial interests in most engineering codes.
What to do instead
Apply a fixed priority order: public safety and welfare first, then competence and honesty, then confidentiality owed to employer or client, then other interests. Identify the specific obligation triggered by the scenario (whistleblowing, conflict disclosure, refusal of unsafe work, data protection) and cite the principle rather than the outcome. Where a standard or regulation is named, check that the chosen action complies with it before considering whose preference it satisfies.