The terminal subsystem consists of three layers
- The upper layer implements the character device interface (
open, read, write, close …)
- The line discipline
- The lower layer which communicates with the hardware or the pseudo terminal.
The line discipline glues the upper and the lower layer together.