Abstraction
Subroutines
- encapsulate frequently used functions
- save system state on entering, restore on exit
- parameter passing through the stack or registers
Device drivers
- special subroutines for accessing peripheral devices
- may or may not include state
- interactions with other activities (e.g., interrupts)