BIT 3105 NETWORK PROGRAMMING KCA Past Paper

UNIVERSITY EXAMINATIONS: 2011/2012
THIRD YEAR EXAMINATION FOR THE BACHELOR OF
SCIENCE IN INFORMATION TECHNOLOGY
BIT 3105 NETWORK PROGRAMMING
DATE: JULY, 2012 TIME: 2 HOURS
INSTRUCTIONS: Answer Question ONE and any other TWO

QUESTION ONE
a) Define the following terms as used in client/server systems:
i. Socket programming [1 Mark]
ii. Middleware interface [1 Mark]
iii. Homogeneous Environment [1 Mark]
iv. Platform [1 Mark]
v. Client-based processing [1 Mark]
b) “Commitment to open and modular systems” and “networking is
fundamental to their operation” are among the characteristics of a Client/Server
systems. Discuss them. [4 Marks]
c) The transport layer provides two protocols (TCP and UDP) for use by
client/server applications. TCP provides connection-oriented, reliable, fullduplex and byte-stream delivery of TCP segments. Discuss the services appearing
in bold. [6 Marks]
d) Is the source address necessary in an Ethernet frame? Explain. [5 Marks]
e) Differentiate between a “process” and a ”thread”. [2 Marks]
f) Explain briefly what the code below does. [4 Marks]
k = listen(sockfd, 5)
g) Provide the Internet Socket Port number and the type of transport layer protocol
(whether TCP, UDP or both) used by the following applications: [4 Marks]
i. SMTP (Simple Mail Transfer Protocol)
ii. Telnet
iii. HTTPS (Hypertext Transfer Protocol over SSL/TLS)
iv. POP (Post Office Protocol)
QUESTION TWO
a) With the aid of a simple program, explain the concept of tiers. [8 Marks]
b) Discuss “Relocation” and “Persistence” as two forms of transparency [4 Marks]
c) Describe any three (3) main differences between an Ethernet frame and a TCP
segment. [6 Marks]
d) Briefly discuss the two (2) shortcomings of a multi-user one-tier client/server
system. [2 Marks]
QUESTION THREE
a) Explain the functions of “Fragment Offset” and “Header Checksum” fields in
an IP datagram. [4 Marks]
b) Study the lines of code presented below and answer the questions that follow:
1. pid = fork();
2. If($pid == 0 )
3. {
4. printf “This is a child process \n”;
5. printf “Child process is existing \n”;
6. exit 0;
7. }
8. printf “This is parent process and child ID is $pid \n”;
9. printf “Parent process is existing \n”;
10. exit 0;
i. What is the purpose of line 1? [2 Marks]
ii. Explain the possible outcomes of line 2. [2 Marks]
iii. When line 1 is executed three (3) values are likely to be passed to pid.
Explain the three values clearly stating what each of them means.
[6 Marks]
iv. Assuming that the program above executes/runs correctly, provide
what will be shown (results of the program) on the screen. [4 Marks]
a) Briefly explain “integration” and “manageability” as two attributes of a
middleware. [2 Marks]
QUESTION FOUR
a) Details of lecturers and the departments they belong to in KCA University are
maintained in two related database tables called ‘LECTURER’ and
‘DEPARTMENT’. The fields in the two tables are as shown below:
DEPARTMENT: DeptCode, DeptName (for the Department Code and
Department Name respectively)
LECTURER: LectPF, IdNo, Name, Address, DeptCode (for the Lecturer’s
personal file number, ID number, name, address and the code of the Department
the lecturer belongs to respectively).
Tables Relationships


Required:
Write appropriate Oracle statements/SQL statements to do the following:
i. Create the ‘LECTURER’ table (assuming that the ‘DEPARTMENT’
table exists). [4 Marks]
DeptCode
LECTURER DEPARTMENT
ii. Add a constraint that makes the ‘IdNo’ to be a unique field in the
‘LECTURER’ table. [2 Marks]
iii. To produce a listing of the names and personal file numbers of the
lecturers who are in the Faculty of Computing and Information
Management. [2 Marks]
iv. To delete a record in the ‘LECTURER’ table for a lecturer by the
name ‘Samuel Matende’. [2 Marks]
v. What is the difference between the ‘double’ and ‘float’ data types
[2 Marks]
b) Using the web browser and a proxy server, discuss how 2-tier client/server
applications are designed and implemented. [6 Marks]
c) Briefly discuss any two (2) reasons that have led to the popularity of RPCs.
[2 Marks]
QUESTION FIVE
a) Differentiate between “One child process per client” and “a thread per
connection” as two design options for concurrent servers. [4 Marks]
b) Discuss “At least once” and “At most once” as two call semantics in relation to
RPC. [4 Marks]
c) What do the following Socket APIs return?
i. recv() [1 Mark]
ii. write() [1 Mark]
iii. bind() [1 Mark]
d) Give the appropriate use of the above socket APIs in a client program. [3 Marks]
e) Explain the main function of “TCP TIME_WAIT” in a TCP connection.
[3 Marks]
f) i. What is ICMP? What is its role? [2 Marks]
ii. What is the main weakness of ICMP? [1 Mark]

(Visited 75 times, 1 visits today)
Share this:

Written by