> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/4.3-bsd-unix-cao-zuo-xi-tong-she-ji-yu-shi-xian/di-san-bu-fen-io-xi-tong/9.10.-xiao-jie.md).

# 9.10 小结

我们考察了 4.3BSD 的终端 I/O 系统。终端处理分在两处：终端所接字符设备的设备驱动，和所有此类驱动共享的行规程。标准终端行规程既支持伯克利的新终端规程，也支持第七版 UNIX 的旧规程。其他行规程支持串行线的非终端用途，如网络连接或数字化硬件的连接。如第 1 章所述，计划中的未来工作包括支持 POSIX 行规程。

## 习题

9.1 终端输入有哪三种可能的模式？用户与交互式屏幕编辑器对话时最常用哪种模式？

9.2 处理终端输入为什么用两个字符队列？描述各自的用途。

9.3 说终端线路“支持调制解调器控制”是什么意思？这类线路通常怎么用？

9.4 用户在会话中途断开调制解调器线路时，与终端关联的进程会收到哪些信号？

9.5 终端输出队列的高水位线如何确定？

9.6 DH-11 终端多路复用器的开销为什么显著低于 DZ-11？

\*9.7 考虑一个让一台终端上的辅导者监视并协助其他终端上学生的设施：学生键入的一切既作为输入传给系统，也作为输出传到辅导者终端；辅导者键入的一切都定向为各学生终端的输入。描述这一设施如何用专门的行规程实现。再描述这一设施有用的进一步推广。

\*9.8 终端行规程支持擦除字符、词和行时的输入文本逻辑擦除。记住用户键入输入行期间其他系统活动仍在继续，解释实现这一特性必须考虑哪些复杂情况。举出三种特例并描述其对实现的影响。

**9.9** 终端多路复用器的设备驱动使用行规程有哪些优点？有哪些局限？对终端 I/O 系统的当前结构提出一种替代方案。

**9.10** 考虑 Berknet 与 SLIP 规程的差异。虽然两者为求效率都使用替代行规程，其中一种用途若不修改内核（例如加一个专门的行规程模块）将极难实现。哪种用途难以实现？解释你的选择。

## 参考文献

Romkey, 1988. J. Romkey, “A Nonstandard for Transmission of IP Datagrams Over Serial Lines: SLIP,” RFC 1055, SRI Network Information Center, Menlo Park, CA (June 1988).

Scheifler & Gettys, 1986. R. W. Scheifler & J. Gettys, “The X Window System,” *ACM Transactions on Graphics* **5**(2), pp. 79–109 (April 1986).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://book.bsdcn.org/4.3-bsd-unix-cao-zuo-xi-tong-she-ji-yu-shi-xian/di-san-bu-fen-io-xi-tong/9.10.-xiao-jie.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
