Lazy loaded image
Compare GIC and event-driven
Words 554Read Time 2 min
2026-1-8

GIC vs Event-Driven Architecture: Analysis

1. Essential Similarities

Yes, fundamentally consistent. Both implement the same core pattern: decoupled event routing.
Aspect
GIC
Reactor/Actor
Event Source
Hardware peripherals (IRQ lines)
I/O events, messages
Dispatcher
Distributor → CPU interface
Event loop / Scheduler
Handler
ISR (Interrupt Service Routine)
Callback / Actor mailbox
Routing Logic
Affinity, priority, grouping
Selector, dispatcher rules
Shared principles:
  • Multiplexing: Many sources → single dispatcher → multiple handlers
  • Priority arbitration: Higher priority events preempt lower ones
  • Asynchronous decoupling: Producer doesn't block waiting for consumer
  • Handler isolation: Each handler runs independently

2. Key Differences

Dimension
GIC (Hardware)
Event-Driven (Software)
Preemption
True preemption via CPU exception
Cooperative (reactor) or OS-scheduled (actor)
Latency
Deterministic, sub-microsecond
Variable, depends on event loop/scheduler
State Model
Stateless dispatch; state in peripheral/memory
Stateful actors with encapsulated mailboxes
Concurrency
Physical parallelism (multi-core)
Logical concurrency (single-threaded reactor) or physical (actor systems)
Failure Isolation
Fault may crash entire system
Actor supervision trees enable fault recovery
Routing Granularity
Fixed IRQ number → CPU affinity bitmap
Dynamic routing rules, content-based dispatch
Critical distinction:
GIC operates at hardware abstraction level — it's a mechanism, not a model. Event-driven architectures are programming models built atop such mechanisms.
GIC is the foundation layer that enables efficient event-driven software. Reactor/Actor patterns are higher-level abstractions that organize application logic.

Summary

Question
Answer
Essentially similar?
Yes — same dispatch pattern
Interchangeable?
No — different abstraction layers
Relationship
GIC enables efficient software event loops
The GIC can be viewed as a hardware reactor — single-purpose, zero-overhead, but inflexible. Software patterns trade latency for flexibility, fault tolerance, and programmability.

Mailbox vs Pub/Sub

No. Mailbox is point-to-point; Pub/Sub is broadcast.

Core Distinction

Aspect
Mailbox (Actor)
Pub/Sub
Addressing
Direct: sender → specific actor
Indirect: publisher → topic → subscribers
Cardinality
1:1 (one sender, one receiver)
1:N (one publisher, many subscribers)
Coupling
Sender knows receiver identity
Publisher unaware of subscribers
Message Fate
Consumed once by owner
Copied to all subscribers
Backpressure
Per-actor queue depth
Per-subscriber or topic-level

Mental Model

When They Converge

  • Single subscriber pub/sub degrades to mailbox-like behavior
  • Actor with broadcast can simulate pub/sub (fan-out pattern)
  • Both are asynchronous and decoupled in time

Key Tradeoff

Model
Strength
Weakness
Mailbox
Precise routing, natural backpressure
Must know recipient
Pub/Sub
Full decoupling, dynamic subscribers
No delivery guarantee per-subscriber
Summary: Mailbox = addressed envelope. Pub/Sub = bulletin board.

Mailbox vs Pub/Sub

No. Mailbox is point-to-point; Pub/Sub is broadcast.

Core Distinction

Aspect
Mailbox (Actor)
Pub/Sub
Addressing
Direct: sender → specific actor
Indirect: publisher → topic → subscribers
Cardinality
1:1 (one sender, one receiver)
1:N (one publisher, many subscribers)
Coupling
Sender knows receiver identity
Publisher unaware of subscribers
Message Fate
Consumed once by owner
Copied to all subscribers
Backpressure
Per-actor queue depth
Per-subscriber or topic-level

Mental Model

When They Converge

  • Single subscriber pub/sub degrades to mailbox-like behavior
  • Actor with broadcast can simulate pub/sub (fan-out pattern)
  • Both are asynchronous and decoupled in time

Key Tradeoff

Model
Strength
Weakness
Mailbox
Precise routing, natural backpressure
Must know recipient
Pub/Sub
Full decoupling, dynamic subscribers
No delivery guarantee per-subscriber
Summary: Mailbox = addressed envelope. Pub/Sub = bulletin board.
上一篇
设计模式综述
下一篇
Guide to Linux System

Comments
Loading...