cyberneticlibrary

Optimize memory and concurrency

systems-programmingskillsetup L164
Tibsfox/gsd-skill-creator
What it does

Reason about memory, concurrency, and OS-level code

Best for

Understanding and optimizing code that cannot ignore hardware constraints (kernels, embedded, HFT, databases)

Inputs
  • · low-level code
  • · performance requirement
  • · system-level bug
Outputs
  • · memory model analysis
  • · concurrency strategy
  • · optimization
  • · architecture recommendation
Requires
  • · Profiler
  • · Debugger (GDB/LLDB)
  • · Thread sanitizer
  • · Memory profiler
Preconditions
  • · code compiles
  • · can run locally or on target
Failure modes
  • · Cache-coherency bugs (machine-dependent)
  • · Data races (non-deterministic)
Trust signals
  • · Stack vs heap tradeoff explained
  • · Manual vs GC vs ownership/borrowing
  • · Threads/mutexes/channels/async
  • · Cache lines and false sharing