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.
In this repository9 other files it gives its agents.
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
- Distinctive: line 16
Treat every task as a state, timing, and synchronization contract.
- Very specific: line 19
Use references/knowledge-map.md for the conceptual map.
- Very specific: line 20
Use references/shared-memory-synchronization.md for locks, semaphores, monitors, condition variables, and Java/POSIX patterns.
- Very specific: line 21
Use references/mutual-exclusion-algorithms.md for Dijkstra conditions, refinement flow, Dekker, Peterson, N-process filters, busy waiting, …
- Very specific: line 22
Use references/monitor-signalling-semantics.md for AS, SC, SX, SW, SU, signal stealing, urgent queues, nested monitor calls, and monitor …
- Very specific: line 23
Use references/exercise-derived-patterns.md for canonical synchronization pseudocode: monitor semaphores, rendezvous, encoded-count …
- Very specific: line 24
Use references/message-passing-distributed.md for rendezvous, buffered/non-blocking communication, MPI, and SPMD systems.
- Very specific: line 25
Use references/distributed-programming-models.md for CSP guarded commands, alternative/repetitive orders, lack of fairness, RPC/RMI, remote …
- Very specific: line 26
Use references/realtime-scheduling-analysis.md for clocks, timers, drift, task attributes, RMS, EDF, blocking, priority inversion, and …
- Very specific: line 27
Use references/network-dataplane-and-kernel-bypass.md for DPDK, VPP, eBPF, XDP, AF_XDP, Linux TC, RSS, NAPI, IRQ suspension, SR-IOV, …
- Very specific: line 28
Use references/flow-and-diagram-patterns.md when a diagram, timeline, proof flow, monitor queue model, message-passing sequence, or …
- Very specific: line 29
Use references/development-environments/abstraction-level-map.md before choosing ASIC/FPGA, accelerator/offload, bare-metal, VM, container, …
- Distinctive: line 51
Do not assume process speed, scheduling order, or interleaving unless the platform contract explicitly guarantees it.
- Distinctive: line 53
Prefer blocking primitives over busy waiting unless latency constraints, hardware context, or a measured spin duration justify spinning.
- Distinctive: line 54
Use hierarchical lock/semaphore ordering for nested resources.
- Very specific: line 64
Run scripts/schedulability.py --help to compute RMS/EDF utilization checks and simulate preemptive schedules over a bounded horizon.
- Very specific: line 65
Run scripts/concurrency_static_scan.py <path> for heuristic checks around locks, semaphores, waits, notifications, MPI, sleeps, and drift …
- Very specific: line 66
Run scripts/tooling_probe.sh to inspect local tooling for C/C++, POSIX, MPI, RT Linux, containers, FPGA, and edge/Wasm targets.
- Distinctive: line 75
Do not claim correctness from a passing run alone.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.
Files
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.mdfor the conceptual map. - Use
references/shared-memory-synchronization.mdfor locks, semaphores, monitors, condition variables, and Java/POSIX patterns. - Use
references/mutual-exclusion-algorithms.mdfor Dijkstra conditions, refinement flow, Dekker, Peterson, N-process filters, busy waiting, and custom mutual exclusion proof. - Use
references/monitor-signalling-semantics.mdfor AS, SC, SX, SW, SU, signal stealing, urgent queues, nested monitor calls, and monitor verification rules. - Use
references/exercise-derived-patterns.mdfor 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.mdfor rendezvous, buffered/non-blocking communication, MPI, and SPMD systems. - Use
references/distributed-programming-models.mdfor CSP guarded commands, alternative/repetitive orders, lack of fairness, RPC/RMI, remote invocation, and rendezvous entry points. - Use
references/realtime-scheduling-analysis.mdfor clocks, timers, drift, task attributes, RMS, EDF, blocking, priority inversion, and aperiodic servers. - Use
references/network-dataplane-and-kernel-bypass.mdfor 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.mdwhen 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.mdbefore choosing ASIC/FPGA, accelerator/offload, bare-metal, VM, container, or edge targets.
First Pass
- Classify the work: concurrency bug, shared-memory design, message passing design, network dataplane design, real-time scheduling, performance tuning, environment selection, or code review.
- Identify execution units: process, thread, task, ISR, server, actor, MPI rank, kernel thread, accelerator kernel, VM, container, isolate, or edge worker.
- 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.
- State correctness properties: safety, liveness, fairness, absence of deadlock/starvation, data consistency, bounded blocking, and deadline satisfaction.
- 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, plustasks/apply-exercise-patterns.mdfor canonical monitor/semaphore pseudocode,references/mutual-exclusion-algorithms.mdfor custom protocols, andreferences/monitor-signalling-semantics.mdfor monitor/condition signalling. - Message passing, MPI, distributed server processes, CSP, RPC/RMI, or rendezvous:
tasks/design-message-passing-system.mdandreferences/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.mdandreferences/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 --helpto 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.shto 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.
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
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.

