There is a data structure (called a control block) for each TTY device
of type struct tty. These are organized into an array called tty[].
Each array entry (a struct tty) contains everything that pertains to a
TTY (and its driver). Included in this are the following:
input queue, and pointers to its head and tail
output queue, and pointers to its head and tail
semaphores for input and output control
a high-priority echo queue, and pointers to its head and tail
a large set of configuration and state fields. For example, flags to
indicate whether input should be echoed, whether we echo both a CR and
LF when a NL is typed, whether output is currently stopped (ctrl-S), and
lots more.