Module Quiz
Complete this quiz after finishing all concept and practice pages. Save your answers before opening separate quiz calibration. Treat it as closed-book on the first pass; open notes on the second.
Current Module Questions
Question 1: What is a process, exactly?
Name the five runtime components that together define a process (as opposed to a program on disk). For each, say whether it lives in user space or kernel space.
Question 2: PCB transitions
List the PCB fields that must change when a process moves from RUNNING to BLOCKED because of a blocking read().
Question 3: fork and exec semantics
What state is preserved and what is replaced when a child process calls execve after fork?
Question 4: Gantt chart -- SJF vs FCFS
Workload: four jobs arriving at t=0 with lengths A=8, B=4, C=2, D=6. Draw the FCFS and SJF Gantt charts, then compute average turnaround time for each.
Question 5: Gantt chart -- Round-Robin
Same four jobs with Round-Robin quantum q=2, cyclic order A, B, C, D. Draw the first 20 time units of the Gantt chart and give the completion time of each job.
Question 6: Round-Robin quantum tradeoff
Round-Robin quantum q = 100 ms versus q = 1 ms on an 8-job workload. Which is fairer on response time? Which has better throughput? Justify in one sentence each.
Question 7: Why SJF is optimal for average turnaround
Sketch the exchange argument for why SJF minimizes average turnaround for a set of jobs all arriving at t=0.
Question 8: Metric conflict
Give a workload where Round-Robin has better average response time than FCFS but worse average turnaround time. Explain in one sentence why this is a general pattern.
Question 9: MLFQ rules
State MLFQ's two priority-adjustment rules and the reason each is needed.
Question 10: Priority inversion
Explain the Mars Pathfinder priority inversion in three sentences. Include what went wrong and what fixed it.
Question 11: Real-time schedulability
A uniprocessor has three periodic tasks with (C=1, T=4), (C=2, T=5), (C=1, T=8) (compute time C, period T). Is this schedulable under EDF? Under RMS? Explain.
Question 12: Context-switch anatomy
Rank the following by typical wall-clock cost on a modern x86-64 machine with Spectre mitigations enabled: (a) save/restore GP registers, (b) TLB flush on address-space change without PCID, (c) kernel trap entry+exit, (d) L1 cache cold start after being switched out.
Question 13: Threads vs processes
List five items of state that threads of the same process share, and five items that they do not.
Question 14: Multi-core load balancing
Why is a single global run queue impractical on a 64-core machine? Name two specific mechanisms modern kernels use instead.
Question 15: cgroups cpu.max vs cpu.weight
A container has cpu.weight = 100 and cpu.max = "50000 100000" on a 4-core, otherwise-idle host. It runs four CPU-bound workers. How much CPU does the container receive? Which knob bound it?
Interleaved Review Questions
Prior Module 1 (S1 Math: Combinatorics)
Two jobs are scheduled randomly in order onto a single CPU. How many distinct Gantt charts are possible, and how does this relate to the exchange argument for SJF?
Prior Module 2 (S1 Math: Probability)
If context-switch cost is ~2 µs and each job's quantum is 2 ms, what fraction of CPU is lost to context-switch overhead? If the quantum shrinks to 200 µs, what is the new fraction?
Prior Module 3 (S2 Algorithms: Asymptotic Analysis)
The Linux CFS scheduler uses a red-black tree keyed on vruntime. What are the asymptotic costs of (a) picking the next task to run, (b) inserting a waking task, (c) removing a task that went to sleep? Express in terms of the number of runnable tasks n.
Prior Module 4 (S2 Algorithms: Greedy)
Is SJF a greedy algorithm? If so, what is its exchange argument? If not, why not?
Prior Module 5 (S4 Computer Architecture: Memory Hierarchy)
Why does the L1 data cache get "cold" on a context switch, and how does that affect effective instruction throughput for the first few microseconds of the new task's execution?
Self-Assessment and Remediation
Mastery Level (90-100% correct):
- Retrieval is strong; complete all module and semester evidence gates before advancing.
Proficient Level (75-89% correct):
- Review only the missed concept pages and redo the matching Gantt exercises in Practice 1. One kata re-run (usually Kata 2 or 4) covers most remaining gaps.
Developing Level (60-74% correct):
- Rework Practice 1 (scheduling policy lab) and Practice 3 (context-switch clinic). Expect the gap to be: (a) you can define metrics but not compute them on a Gantt chart, or (b) you conflate response time with turnaround time. Also redo Kata 1 (mini scheduler) and Kata 2 (measure context-switch cost) -- these make the metrics visceral.
Insufficient Level (<60% correct):
- Go back to the concept sequence. Most likely issue: you are treating scheduling as "there is a best policy" rather than "every policy trades three metrics against each other." Restart from Cluster 2 and treat every policy page as an answer to "for what metric is this optimal, and what does it sacrifice?" Then return to Cluster 3 with that lens. Also redo Practice 2 (process model workshop) -- understanding state transitions is prerequisite for Cluster 4.
Progression boundary
Quiz performance calibrates retrieval and reasoning. It does not replace runnable work, changed-case transfer, the module assessment or required semester evidence. Consult practice calibration for the additional independent cases.