Skip to main content

Cumulative Review

World-Class Evidence Integration

Include one transfer question from the World-Class Strand that connects current work to the previous semester and two semesters back.

This review mixes Semester 4 heavily with prerequisite habits from earlier semesters. Answer everything from memory first, then repair the gaps using your own notes and the module references.


Instructions​

caution

Do not treat this like a recognition quiz. Write short, explicit answers, code sketches, diagrams, or command lines. If you cannot produce those, the knowledge is not stable enough yet.

Use this sequence:

  1. Do Questions 1-20 closed-book.
  2. Do Questions 21-30 with a terminal if needed.
  3. Review weak answers by module.
  4. Repeat only the weak block two days later.

Questions​

Module 1: C Programming Fundamentals​

  1. Name the stages from source.c to a runnable executable and state what each stage outputs.
  2. Explain the difference between a declaration and a definition in C with one example of each.
  3. Why does an array sometimes behave like a pointer and sometimes not? Give one example of each case.
  4. Explain why printf("%d", 3.14); is wrong and what kind of bug it creates.
  5. Sketch the file layout for a small multi-file C program with headers, implementation files, and a Makefile.

Module 2: Memory, Pointers & Machine Representation​

  1. Convert one 8-bit pattern to unsigned decimal, signed two's-complement decimal, and hex.
  2. Explain what pointer arithmetic means for int *p vs char *p.
  3. Draw a memory diagram for a function with one local array, one heap allocation, and one global variable.
  4. Explain the difference between a dangling pointer, an uninitialized pointer, and a NULL pointer.
  5. Given a struct with char, int, and double fields, explain why field order changes sizeof.

Module 3: Computer Organization & Architecture​

  1. Explain what an ISA is and how it differs from a microarchitecture.
  2. In a short loop with an if branch, explain what the program counter, registers, and stack pointer are doing.
  3. Explain why row-major traversal can outperform column-major traversal on the same matrix.
  4. What is the difference between a cache miss, a page fault, and a branch misprediction?
  5. Explain the role of the TLB during virtual-address translation.

Module 4: Systems-Level Programming​

  1. Explain the normal fork -> exec -> waitpid flow in parent and child.
  2. Explain what file descriptors 0, 1, and 2 represent and how dup2 enables shell redirection.
  3. Why can read or write return fewer bytes than requested, and how should correct code respond?
  4. Explain the difference between a process and a thread in terms of address space and scheduling.
  5. Name one question answered best by each of these tools: gdb, strace, perf, and AddressSanitizer.

Module 5: Abstraction & Interpretation​

  1. Explain the difference between procedural abstraction and data abstraction using one concrete example.
  2. Explain what a closure captures and why that matters for correctness.
  3. What problem does the environment model solve that the substitution model handles poorly?
  4. Explain what eval and apply do inside a tiny interpreter.
  5. Explain one case where mutation is simpler and one case where it makes reasoning harder.

Cross-Module Synthesis​

  1. Write a short explanation connecting compiler warnings, undefined behavior, and memory bugs.
  2. Explain how a bug in C source can become visible as either a crash in gdb or a strange pattern in disassembly or sanitizer output.
  3. Describe a small UNIX-style tool you could build now and identify which Semester 4 modules it depends on most.
  4. Compare two ways to solve the same problem: low-level C control vs a higher-level abstraction barrier. State the tradeoff clearly.
  5. Explain why Semester 5 would be difficult if Module 2 or Module 4 is still weak.

Self-Check Standard​

You should treat your review as strong only if:

  • Questions 1-10 feel precise rather than hand-wavy
  • Questions 11-20 include at least one diagram or command example
  • Questions 21-30 show that you can connect machine detail to design judgment

If your answers are mostly vocabulary with little mechanism, repeat the review after targeted repair work.


Repair Guide​

Use this when you miss a block:

  • Weak on Questions 1-5: return to Module 1 concepts, practice, and compile/link drills
  • Weak on Questions 6-10: redo memory diagrams, sanitizers, and struct-layout exercises from Module 2
  • Weak on Questions 11-15: rerun disassembly and cache experiments from Module 3
  • Weak on Questions 16-20: rebuild your fork/pipe/threads/sockets labs from Module 4
  • Weak on Questions 21-25: retrace the closure and interpreter exercises from Module 5

The goal is not a perfect score. The goal is reliable systems reasoning under pressure.

C input-contract evidence​

Require all CI1–CI6 at level 2 or above. Reuse the line-reader lab packet in the existing project: capacity traces, consecutive-line behavior, injected errors, compiler/diagnostic output and a fresh-case defense. No aggregate score waives missing input-contract evidence. Preserve the distinction between bounded storage and bounded running time.

Memory ownership evidence​

Require all MP1–MP6 at level 2 or above. Reuse the growable-buffer packet: checked sizing, ownership traces, allocation-failure recovery, cleanup and independent transfer. The 20–30-hour package replaces the former short lab; it is not a complete module workload. Required fuzzing/Rust/mitigation/platform work remains separate.

Performance evidence​

Require PE1–PE6 at level 2 or above. Reuse the locality measurement packet: checked sums, raw timings, target assembly, model assumptions and a bounded inference. A speedup or fabricated anomaly is never required. The specialized-platform strand remains separate.

Partial-I/O evidence​

Require IO1–IO6 at level 2 or above. Reuse the write-progress packet: exact accepted prefixes, bounded retry traces, descriptor ownership and diagnostic evidence. A complete local write does not imply durability or remote processing.

Lexical interpretation evidence​

Require all LI1–LI6 at level 2 or above. Reuse the interpreter packet: frame diagrams, two independent closure instances, evaluation-order tests, caller-scope fault evidence and explicit host/resource limitations. The small evaluator does not replace the original mutation, streams, staging or concurrency requirements. A failed gate remains incomplete regardless of aggregate score.

Integrated progression contract​

Use the 440–640-hour workload and advancement contract. All 30 module extension gates and all five safety/platform evidence categories must independently reach level 2, alongside existing checkpoint, exam, project and integrity thresholds. Missing evidence means repair required — incomplete. Reuse module artifacts and record time once; the three-hour written exam and two-hour fresh-case defense are included in integration time.