问题 问答题 简答题

文件传送协议FTP的主要工作过程是怎样的?为什么说FTP是带外传送控制信息?主进程和从属进程各起什么作用?

答案

参考答案:

(1)FTP使用客户服务器方式。一个FTP服务器进程可同时为多个客户进程提供服务。

FTP的服务器进程由两大部分组成:一个主进程,负责接受新的请求;另外有若干个从属进程,负责处理单个请求。

主进程的工作步骤:

1、打开熟知端口(端口号为21),使客户进程能够连接上。

2、等待客户进程发出连接请求。

3、启动从属进程来处理客户进程发来的请求。从属进程对客户进程的请求处理完毕后即终止,但从属进程在运行期间根据需要还可能创建其他一些子进程。

4、回到等待状态,继续接受其他客户进程发来的请求。主进程与从属进程的处理是并发地进行。FTP使用两个TCP连接。

控制连接在整个会话期间一直保持打开,FTP客户发出的传送请求通过控制连接发送给服务器端的控制进程,但控制连接不用来传送文件。

实际用于传输文件的是“数据连接”。服务器端的控制进程在接收到FTP客户发送来的文件传输请求后就创建“数据传送进程”和“数据连接”,用来连接客户端和服务器端的数据传送进程。

数据传送进程实际完成文件的传送,在传送完毕后关闭“数据传送连接”并结束运行。

阅读理解

One spring, when I was 10, during one of my father's layoffs, I could tell my mother was dispiriteD.I decided to cheer her up by buying her a special Mother's Day gift.

One day after school I rode my bike to the Agins, which, I learned years later, was known for its high-end fashions and style.I introduced myself to Sylvia Agins, telling her I was looking for a Mather's Day present.

"Do you think she'd like a purse?" she askeD.I told her.I thought she might.

She took out an Italian handbag made of leather. She asked me what I thought, and I told her that my mom would like it.

"How much money do you have?" she asked.

"Twelve bucks," I said.

“You’re in luck,” she told me. "It's only $11. You have a dollar left over for the card." She gift-wrapped  the purse and thanked me for my business, and I rode off home with the package under my arm.

When my mother opened the gift the next Sunday morning, she asked in an accusing tone, “Where did you get this?"

"I bought it at the Agins. It cost me $11." I said.

My mother was shocked into silence.

It wasn't until many years later, when I learned that the purse was worth several hundred dollars, that I appreciated just how wonderful Sylvia Agins had been to me. I always felt bad that I never had a chance to properly thank her.

"You know, my son, what really amazes me to this day," my mother saiD."Letting you have the purse for just a few dollars was unbelievable enough. But the fact that she let you leave the store with a dollar for the card was a touch of kindness that I'll never forget. "

小题1:The author bought his mother a purse to _____.

A.surprise his mother

B.make his mother happy

C.show his ability of making money

D.thank his mother for buying him a bike小题2:Why was the author's mother shocked?

A.She wasn't expecting a gift from her son.

B.The purse was bought from the Agins.

C.The author bought a card to go with the purse.

D.The Agins charged so little money for the purse.小题3:Sylvia Agins behavior shows that_____.

A.she is good at making money

B.she is kind and thoughtful

C.she knows how to choose presents

D.she is critical and mean小题4:Which of the following can be the best title for the text?

A.An Unforgettable Event.

B.A Considerate Mother.

C.A Priceless Mother's Day Gift.

D.A Kind-hearted Shop Owner.

问答题 简答题