- List in order the system calls a client would make in order
to create a socket connection with a server. For each function,
tell its purpose, the arguments it takes, the value it returns
(if any), and what system calls (if any) the server would need
to have made in order for the client's call to succeed.
- Assuming a client and server have established a socket
connection, they can exchange messages using read() and
write() system calls. Assume either the client or server
executes "bytesRead = read(fd, buffer, 512);"
and tell what conditions (if any) might cause bytesRead
to take on the values -1, 0, 321, 512, and 1024.
In addition, tell what might cause the read() function
never to return at all.
- Tell the difference between an iterative and a concurrent
server. Tell the types of application where each would be appropriate,
and outline algorithms that could be used to implement a server
of each type.
- For both the X Window System and the ftp protocol,
compare and contrast the roles of client and server
programs. Be sure your answer includes the following two pieces
of information:
- For both X and ftp, tell which program (the
client or the server) sends requests and which one sends
replies.
- For both X and ftp, give examples of the kinds of requests
and replies that are involved.
- What is the role of the following functions in a toolkit-based
application?
- XtVaAppInitialize()
- XtAppMainLoop()
- XtAddCallback()
- Describe the arguments that are passed to a callback function.
What does a callback function do when it finishes processing a
callback event? How can you debug a callback function using gdb
or ddd?
Christopher Vickery
Queens College of CUNY
Home Page