问题 问答题

[说明]
A公司准备建立一个合同管理和查询系统。该系统由1台服务器和100台客户机构成,服务器和客户机之间通过局域网进行通信,服务器通过专线连接到两个交易网关A和B。系统构成如图所示。


服务器是对称多处理器系统,操作系统使用虚拟存储。操作系统需要60MB的主存(假设与CPU的数量无关)。
系统需要处理4种类型的操作:从交易网关接收数据,完成应用1到应用3的操作。
服务器直接从交易网关接收数据(该操作被称为接收任务)。应用l至应用3需要客户机与服务器协作完成,其中由服务器执行的部分被分别称为应用任务1、应用任务2和应用任务3(如表所示)。对于接收任务,即便是在峰值时间,也必须在10s内完成,否则数据会丢失。


系统中的100台客户机的配置完全相同。一台客户机一次只能处理一个应用,不能同时处理多个应用。一个应用完成之后,才能处理下一个应用。
服务器根据客户机选择的应用创建不同的应用任务。当客户机上的处理完成后,相应的应用任务也完成了。当服务器启动时,分别为每个交易网关创建一个接收任务。
在峰值时间,处理应用1的客户机有50台,处理应用2的客户机有30台,处理应用3的客户机有 20台。
由于该系统使用虚拟存储,因此没有必要全部从主存中为操作系统和每个任务申请存储空间。但是,如果系统从主存中分配给操作系统的存储空间不到其所需的80%,分配给应用任务的存储空间不到其所需的50%,分配给接收任务的存储空间不到其所需的80%,则系统性能会下降到不能接受的程度。

在该系统中是否适合采用UDP作为服务器与客户机的通信协议用150字以内的文字说明原因(可针对不同应用进行讨论)。

答案

参考答案:由于UDP协议是一种不可靠、无连接的协议,其报头长度固定为8B,适用于一些要求运行效率较高的应用,而应用任务1、应用任务2用于实时显示交易数据,且数据在局域网内部传输,偶发性的数据包丢失关系不大,因此适合选择UDP协议
应用任务3用于处理合同数据,数据不准丢失,为了保证数据的完整性,不适合选择UDP协议

解析:
这是一道要求读者根据实际应用环境选择传输层协议的综合分析题。本题的解答思路如下。
①在TCP/IP协议簇中,传输层协议主要有传输控制协议(TCP)和用户数据报协议(UDP)。其中, TCP协议是一种提供高可靠服务、面向连接、全双工通信的协议,其报头长度为20-60B,它适用于需要大量传输交互式报文的应用场合(例如HTTP协议、SMTP协议、FTP协议等)。而UDP协议是一种不可靠的、无连接的协议,其报头长度固定为8B,它适用于一些要求运行效率较高的特殊应用场合(例如SNMP协议、DNS系统、IP电话、流媒体通信等)。
②在表5-9所提供的信息中,应用任务1、应用任务2用于实时显示交易数据,而且数据在局域网内部传输(数据的丢包率较低、可靠性较高),偶发性的数据包丢失关系不大,因此适合选择UDP协议。
③应用任务3用于处理合同数据,数据信息较为重要,不准丢失,因此为了保证数据的完整性,应用任务3应选用传输可靠性高的TCP协议,而不适合选择UDP协议。

阅读理解

阅读理解。

     Getting paid to talk about the World Cup is a great job. I' m not a football commentator (评论员), though-

just an English teacher in Japan.

     I came to Japan two years ago, and didn' t think I would stay, but Japan has that effect on you. People

often end up living here longer than they planned. I think it' s best to teach, in a bigger city where there are

other foreigners to mix with, rather than a small town where English teachers often complain of feeling like

a goldfish in a bowl. Many people choose to live in Tokyo, of course, which is good for tile nightlife factor.

But I' d say that for general quality of living, cities of neither too large nor too small, like Sapporo where I live,

are better choices.

     I teach English privately, which means I' m my own boss. If you want to devote yourself to private

teaching, it's well worth doing a TEFL course first, because your lessons will be much better for it. The

problem with private teaching is finding students; it took me a year to build up a full schedule (日程表) of

private lessons, so I started out teaching in schools part-time.

     Most of my foreign friends here work full-time for big English conversation schools. The salary is fine

to live on, but whether you can save money depends on how much going out and traveling you do here.

     The schools are reluctant to take time off-even teachers with tickets for the England-Argentina game had

trouble getting the day off.

1. From the passage we know in Japan the writer likes to live in _____. [ ]

A. Tokyo

B. a small town

C. a city of middle size

D. a big city

2. According to the writer, one had better _____ first to do private teaching better. [ ]

A. take a TEFL course

B. decide his or her own lessons

C. find students

D. build up a full schedule

3. The underlined sentence in the second paragraph implies that _____. [ ]

A. there are many foreigners in Japan

B. Japan is good for nightlife

C. they can teach English privately in Japan

D. Japan has something more attractive than expected

4. The underlined word "reluctant" in the passage may probably mean _____. [ ]

A. kind

B. unwilling

C. free

D. careless

多项选择题