Client-Server Model: Socket Interface - McGraw-Hill Higher Education

7 downloads 112 Views 248KB Size Report
1. CHAPTER 24. Client-Server Model: Socket Interface. Review Questions. 1. The client is a program running on a local machine that is requesting a service.
CHAPTER 24

Client-Server Model: Socket Interface Review Questions 1. The client is a program running on a local machine that is requesting a service from the server. The server is a program running on a remote machine that provides a service to a client. 3. An iterative server can process only one request at a time; it receives a request, processes it, and sends the response to the requestor before it handles another request. A concurrent server, on the other hand, can process many requests at the same time and thus can share its time between many requests. 5. A Socket Interface defines a set of system calls that are an extension of UNIX system calls that access files. 7. The stream socket, datagram socket, and raw socket are types of socket interface. 9. The server that runs infinitely and accepts a connection from a client is called the parent server. This parent server can create a child server to handle this client, so it can be free to take other incoming clients.

Multiple-Choice Questions 11. 13. 15. 17. 19. 21. 23. 25. 27.

c c d d b d a b c

1

2

CHAPTER 24

CLIENT-SERVER MODEL: SOCKET INTERFACE

Exercises 29. The server is always there waiting to accept clients. The client is finite; when it is finished, it shuts down. 31. It uses sequence numbers 33. Figure 24.7 is for communication over UDP, which always uses user datagram packets, discrete units of bytes. 35. There is no need for a child server in UDP. 37. Since the client is finite, it ends and no longer needs the services of the child server, which then ends. 39. The child server is killed by the parent after it finishes serving the client.