A terminal is a typical character device that has two input queues and one output queue.
The two input queues are labeled the raw queue and the canonical queue. It works like
this: As the user types in each character, it’s collected in the raw input queue