agentleFS
oghieoghie/skillsets/skills/realtime-systems-coding/SKILL.md

realtime-systems-coding

Skill9 starsChanged 5 months agoMITView on GitHub

Use when designing, implementing, reviewing, debugging, testing, profiling, or porting concurrent, parallel, distributed, high-performance, network dataplane, kernel-bypass, or real-time software, including locks, semaphores, monitors, MPI, CSP rendezvous, DPDK, VPP, eBPF, XDP, AF_XDP, SR-IOV, RSS, RoCEv2/RDMA, RMS/EDF, priority inversion, and environment selection from silicon to edge.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 5 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat every task as a state, timing, and synchronization contract.

    line 16
  2. Very specific:

    Use references/knowledge-map.md for the conceptual map.

    line 19
  3. Very specific:

    Use references/shared-memory-synchronization.md for locks, semaphores, monitors, condition variables, and Java/POSIX patterns.

    line 20
  4. Very specific:

    Use references/mutual-exclusion-algorithms.md for Dijkstra conditions, refinement flow, Dekker, Peterson, N-process filters, busy waiting, …

    line 21
  5. Very specific:

    Use references/monitor-signalling-semantics.md for AS, SC, SX, SW, SU, signal stealing, urgent queues, nested monitor calls, and monitor …

    line 22
  6. Very specific:

    Use references/exercise-derived-patterns.md for canonical synchronization pseudocode: monitor semaphores, rendezvous, encoded-count …

    line 23
  7. Very specific:

    Use references/message-passing-distributed.md for rendezvous, buffered/non-blocking communication, MPI, and SPMD systems.

    line 24
  8. Very specific:

    Use references/distributed-programming-models.md for CSP guarded commands, alternative/repetitive orders, lack of fairness, RPC/RMI, remote …

    line 25
  9. Very specific:

    Use references/realtime-scheduling-analysis.md for clocks, timers, drift, task attributes, RMS, EDF, blocking, priority inversion, and …

    line 26
  10. Very specific:

    Use references/network-dataplane-and-kernel-bypass.md for DPDK, VPP, eBPF, XDP, AF_XDP, Linux TC, RSS, NAPI, IRQ suspension, SR-IOV, …

    line 27
  11. Very specific:

    Use references/flow-and-diagram-patterns.md when a diagram, timeline, proof flow, monitor queue model, message-passing sequence, or …

    line 28
  12. Very specific:

    Use references/development-environments/abstraction-level-map.md before choosing ASIC/FPGA, accelerator/offload, bare-metal, VM, container, …

    line 29
  13. Distinctive:

    Do not assume process speed, scheduling order, or interleaving unless the platform contract explicitly guarantees it.

    line 51
  14. Distinctive:

    Prefer blocking primitives over busy waiting unless latency constraints, hardware context, or a measured spin duration justify spinning.

    line 53
  15. Distinctive:

    Use hierarchical lock/semaphore ordering for nested resources.

    line 54
  16. Very specific:

    Run scripts/schedulability.py --help to compute RMS/EDF utilization checks and simulate preemptive schedules over a bounded horizon.

    line 64
  17. Very specific:

    Run scripts/concurrency_static_scan.py <path> for heuristic checks around locks, semaphores, waits, notifications, MPI, sleeps, and drift …

    line 65
  18. Very specific:

    Run scripts/tooling_probe.sh to inspect local tooling for C/C++, POSIX, MPI, RT Linux, containers, FPGA, and edge/Wasm targets.

    line 66
  19. Distinctive:

    Do not claim correctness from a passing run alone.

    line 75

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Realtime Systems Coding

Core Rule

Treat every task as a state, timing, and synchronization contract. Identify the execution units, shared state, communication mode, timing limits, platform abstraction level, and correctness properties before writing or changing code.

Knowledge Grounding

  • Use references/knowledge-map.md for the conceptual map.
  • Use references/shared-memory-synchronization.md for locks, semaphores, monitors, condition variables, and Java/POSIX patterns.
  • Use references/mutual-exclusion-algorithms.md for Dijkstra conditions, refinement flow, Dekker, Peterson, N-process filters, busy waiting, and custom mutual exclusion proof.
  • Use references/monitor-signalling-semantics.md for AS, SC, SX, SW, SU, signal stealing, urgent queues, nested monitor calls, and monitor verification rules.
  • Use references/exercise-derived-patterns.md for canonical synchronization pseudocode: monitor semaphores, rendezvous, encoded-count buffers, readers-writers, bridge traffic, dining philosophers, priority allocation, FIFO/SJF queues, controller wakeups, and service pipelines.
  • Use references/message-passing-distributed.md for rendezvous, buffered/non-blocking communication, MPI, and SPMD systems.
  • Use references/distributed-programming-models.md for CSP guarded commands, alternative/repetitive orders, lack of fairness, RPC/RMI, remote invocation, and rendezvous entry points.
  • Use references/realtime-scheduling-analysis.md for clocks, timers, drift, task attributes, RMS, EDF, blocking, priority inversion, and aperiodic servers.
  • Use references/network-dataplane-and-kernel-bypass.md for DPDK, VPP, eBPF, XDP, AF_XDP, Linux TC, RSS, NAPI, IRQ suspension, SR-IOV, RoCEv2/RDMA, SmartNIC/DPU offload, TCP handoff, and IOAM-style telemetry.
  • Use references/flow-and-diagram-patterns.md when a diagram, timeline, proof flow, monitor queue model, message-passing sequence, or Gantt-style task model would make the work safer.
  • Use references/development-environments/abstraction-level-map.md before choosing ASIC/FPGA, accelerator/offload, bare-metal, VM, container, or edge targets.

First Pass

  1. Classify the work: concurrency bug, shared-memory design, message passing design, network dataplane design, real-time scheduling, performance tuning, environment selection, or code review.
  2. Identify execution units: process, thread, task, ISR, server, actor, MPI rank, kernel thread, accelerator kernel, VM, container, isolate, or edge worker.
  3. Identify interaction mode: shared memory, lock/semaphore/monitor, condition queue, synchronous rendezvous, buffered channel, non-blocking message, RPC/RMI, hardware offload queue, NIC RX/TX queue, or completion queue.
  4. State correctness properties: safety, liveness, fairness, absence of deadlock/starvation, data consistency, bounded blocking, and deadline satisfaction.
  5. Define verification evidence: invariant, interleaving argument, Gantt/timeline, schedulability test, stress test, trace, benchmark, or platform measurement.

Required Reads By Task

  • Intake, modeling, or ambiguous requirements: tasks/intake-and-modeling.md.
  • Shared-memory synchronization: tasks/design-shared-memory-concurrency.md, plus tasks/apply-exercise-patterns.md for canonical monitor/semaphore pseudocode, references/mutual-exclusion-algorithms.md for custom protocols, and references/monitor-signalling-semantics.md for monitor/condition signalling.
  • Message passing, MPI, distributed server processes, CSP, RPC/RMI, or rendezvous: tasks/design-message-passing-system.md and references/distributed-programming-models.md.
  • Network dataplane, kernel bypass, packet steering, RDMA, SR-IOV, eBPF/XDP/Linux TC, DPDK, VPP, SmartNIC/DPU, or TCP handoff: tasks/design-network-dataplane-system.md.
  • Periodic, sporadic, aperiodic, deadline, or priority work: tasks/design-realtime-scheduler.md.
  • High-performance implementation: tasks/implement-high-performance-pattern.md.
  • Race, deadlock, starvation, drift, missed deadline, or intermittent failures: tasks/diagnose-concurrency-bug.md.
  • Correctness argument, invariants, non-interference, monitor proof, or property review: tasks/derive-correctness-proof.md.
  • Diagram, timeline, state machine, queue model, or Gantt-style explanation: tasks/model-with-diagrams.md.
  • Final validation and review: tasks/verify-and-test-concurrent-realtime.md and references/review-checklist.md.

Design Heuristics

  • Do not assume process speed, scheduling order, or interleaving unless the platform contract explicitly guarantees it.
  • Minimize excluded interleavings: lock only the shared state that needs atomicity, and keep critical sections bounded.
  • Prefer blocking primitives over busy waiting unless latency constraints, hardware context, or a measured spin duration justify spinning.
  • Use hierarchical lock/semaphore ordering for nested resources; document the order and release in reverse order.
  • For monitors, associate each logical wait condition with the narrowest available condition variable and signal only when the condition is true.
  • For monitor signalling, name the assumed semantics. SC, SX, SW, and SU have different post-signal obligations.
  • For canonical synchronization problems, start from invariant-driven patterns before inventing new wait/signal code.
  • For message passing, choose blocking for safety and simplicity; choose non-blocking only with explicit completion checks before mutating buffers.
  • For network dataplanes, define queue-to-core mapping, buffer ownership, rule lifecycle, completion signal, rollback, and reset behavior before tuning throughput.
  • For guarded alternatives, never depend on nondeterministic choice being random or fair unless the runtime contract proves it.
  • For real-time work, distinguish sufficient tests from exact evidence; utilization alone is not proof when blocking, sporadic jobs, or resource sharing exists.

Script Helpers

  • Run scripts/schedulability.py --help to compute RMS/EDF utilization checks and simulate preemptive schedules over a bounded horizon.
  • Run scripts/concurrency_static_scan.py <path> for heuristic checks around locks, semaphores, waits, notifications, MPI, sleeps, and drift risks.
  • Run scripts/tooling_probe.sh to inspect local tooling for C/C++, POSIX, MPI, RT Linux, containers, FPGA, and edge/Wasm targets.

Verification Gate

  • For shared memory, name the protected data, synchronization object, acquisition order, blocking behavior, and invariant.
  • For monitors, name AS/SC/SX/SW/SU semantics, condition predicates, signal placement, and any nested monitor call policy.
  • For message passing, name sender, receiver, channel/tag/communicator, buffering mode, completion rule, and deadlock scenario considered.
  • For network dataplanes, name hook placement, RSS/NAPI/queue mapping, IRQ strategy, NUMA placement, buffer ownership, hardware/software rule lifecycle, and reset handling.
  • For real-time tasks, name Ci, Ti, Di, priority, phase, blocking Bi, clock granularity, timeout policy, and drift-control method.
  • Validate with code inspection plus at least one dynamic strategy: stress interleavings, sanitizer, deterministic scheduler, timeline simulation, trace, or runtime deadline monitor.
  • Do not claim correctness from a passing run alone; tie the claim to a property and evidence.

Output Standard

Lead with the chosen concurrency or real-time model. State assumptions, task/resource map, synchronization or communication protocol, schedulability/performance evidence, commands run, and residual platform risks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.