Edge vs. Level triggered logic

Edge vs. Level triggered logic

A brief explanation of "edge triggered" and "level triggered" logic.

569f10721398d92f5033097ac6d9132c?s=128

Tim Hockin

June 02, 2017
Tweet

Transcript

  1. 1.

    Google Cloud Platform Kubernetes: Edge vs. Level Triggered Logic Tim

    Hockin <thockin@google.com> Principal Software Engineer @thockin
  2. 2.

    Google Cloud Platform Once upon a time there was hardware

    When the hardware needed attention, it would signal the CPU == “interrupt” Interrupts used be a literal wire from the device to the CPU
  3. 4.

    Google Cloud Platform The device can change the voltage on

    the wire The CPU can detect changes in voltage
  4. 6.
  5. 8.

    Google Cloud Platform Problem: what happens if the CPU doesn’t

    detect a pulse? The interrupt doesn’t get serviced!
  6. 10.

    Google Cloud Platform The device can change the voltage and

    keep it there until the interrupt is serviced The CPU can’t miss edges The device can “stack” interrupt reasons - leave the voltage until all reasons are ACK’ed This is “level triggered”
  7. 12.

    Google Cloud Platform What does this mean for Kubernetes? State

    is more useful than events Level-driven software is about asserting state Clients can check and re-check state at any time This is the heart of Kubernetes’ controller model