Timer Subsystem
Time management and periodic interrupts
Overview
The timer subsystem manages clock events, time tracking, and task scheduling interrupts.
Timer Sources
PIT (Programmable Interval Timer)
- Legacy timer using I/O ports 0x40-0x43
- Provides periodic interrupts (IRQ 0)
- Simple but slower frequency
APIC Timer
- Modern local APIC timer
- Per-CPU timer for better synchronization
- Supports higher frequencies
Timer Functions
- ✓ System time tracking (uptime)
- ✓ Clock tick generation
- ✓ Context switch triggering
- ✓ Sleep/delay implementation
- ✓ Real-time deadline support
Key Takeaways
- ✓ Regular interrupts enable task switching
- ✓ Tracks system uptime and ticks
- ✓ Both PIT and APIC supported
- ✓ Enables sleep and delay functions
- ✓ Critical for real-time scheduling