Install
$ agentstack add skill-mohitmishra786-low-level-dev-skills-cpu-pipelines-and-hazards ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
CPU Pipelines and Hazards
Purpose
Explain classic and modern CPU pipeline concepts: stages, data and control hazards, forwarding/bypassing, stalls, and branch handling — foundational for optimization and understanding microarchitecture counters.
When to Use
- Interpreting pipeline stall metrics from
skills/profilers/intel-vtune-amd-uprof - Teaching why instruction order affects throughput
- Relating assembly scheduling to hardware behavior
- Debugging unexpected performance cliffs in hot loops
Workflow
1. Five-stage classic pipeline (MIPS-style mental model)
IF → ID → EX → MEM → WB
Overlapped execution: instruction N in EX while N+1 in ID.
2. Data hazards
| Type | Example | Mitigation | |------|---------|------------| | RAW (true) | add r1,r2,r3 then sub r4,r1,r5 | Forwarding from EX/MEM/WB | | WAR / WAW | Rare in in-order; relevant in OoO rename | Register renaming |
Without forwarding:
stall until writeback completes
3. Control hazards (branches)
Branch in ID → target unknown until EX
├── Predict taken/not-taken (static or dynamic)
├── Flush wrong-path instructions on mispredict
└── Penalty = pipeline depth (varies by CPU)
See skills/computer-architecture/branch-prediction-and-speculation.
4. Structural hazards
Limited functional units (single memory port) cause stalls even without dependencies.
5. Practical optimization hints
/* Bad — tight dependency chain */
for (int i = 0; i < n; i++)
acc = acc + data[i]; /* each iter waits on acc */
/* Better — multiple accumulators (ILP) */
acc0 = acc1 = 0;
for (int i = 0; i < n; i += 2) {
acc0 += data[i];
acc1 += data[i+1];
}
acc = acc0 + acc1;
Pair with skills/low-level-programming/cpu-cache-opt — memory often dominates.
6. Reading uops / ports (x86)
perf stat -e instructions,cycles,stalls-frontend,stalls-backend ./app
VTune "Microarchitecture Exploration" maps to pipeline slots.
7. Agent usage
/cpu-pipelines-and-hazards Explain RAW hazard in this ARM assembly loop and how to break it
Common Problems
| Symptom | Cause | Fix | |---------|-------|-----| | High stalls-frontend | I-cache misses / branch mispredict | Align hot loop; see branch skill | | No speedup from unroll | Memory bound | Profile loads; prefetch | | Wrong cycle model | Ignored OoO execution | Use perf hardware counters | | "NOP fixes it" | Timing-sensitive MMIO | Never tune device delays by NOP |
Related Skills
skills/computer-architecture/branch-prediction-and-speculation— mispredict costskills/computer-architecture/memory-hierarchy-and-caches— load latencyskills/low-level-programming/cpu-cache-opt— cache-line effectsskills/profilers/intel-vtune-amd-uprof— pipeline analysisskills/low-level-programming/assembly-arm— instruction scheduling
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: mohitmishra786
- Source: mohitmishra786/low-level-dev-skills
- License: MIT
- Homepage: https://www.lowleveldevskills.com
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.