A control-theoretic design and analysis framework for resilient hard real-time systems