BIT3105  NETWORK PROGRAMMING. KCA Past Paper

UNIVERSITY EXAMINATIONS: 2016/2017
EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN
INFORMATION TECHNOLOGY
BIT 3105: NETWORK PROGRAMMING
BCT 2203: CLIENT/SERVER COMPUTING
FULLTIME/PART TIME/DISTANCE LEARNING
SPECIAL /SUPPLEMENTARY EXAMINATION
DATE: JULY, 2017 TIME: 2 HOURS
INSTRUCTIONS: Answer Question One & ANY OTHER TWO questions.

QUESTION ONE – Compulsory (Total Marks: 30)
(a) Differentiate between:
i. ARP and RARP (2 Marks)
ii. RMI and RPC (2 Marks)
iii. wait() and wait_pid() (2 Marks)
iv. TCP and UDP (2 Marks)
(b) What is the purpose of a zombie state? (2 Marks)
(c) Give the generic structure of a socket address and briefly explain the parts of the
structure.
(6 Marks)
(d) Distinguish between an “Ethernet frame” and an “IP datagram” (4 Marks)
(e) Differentiate between “Application Programming Interface” and “System Programming
Interface” as middleware interfaces. (4 Marks)
(f) Discuss the roles of the UA and MTA in a mail system with regard to Client/Server
systems. (4 Marks)
(g) What are the benefits of multi-process programming? (2 Marks)
QUESTION TWO – (Total Marks: 20)
(a) By use of an example, briefly explain how a RMI works. (8 Marks)
(b) Briefly discuss how an Inter-Process Communication takes place. (4 Marks)
(c) The banking industry has fully adopted and implemented client/server systems. With
appropriate examples, at least two (2), discuss these implementations. (8 Marks)
QUESTION THREE – (Total Marks: 20)
(a) Details of courses taken by students in a particular college are maintained in two related
database tables called ‘STUDENT’ and ‘COURSE’. The fields in the two tables are as
shown below:
COURSE: CourseCode, CourseName (for the Course Code and Course Name
respectively)
STUDENT: RegNo, IdNo, Name, Address, CourseCode (for the student’s registration
number, ID number, name, address and the code of the course being taken by the
student respectively).

Required: Write appropriate Oracle statements/SQL statements to do the following:
i. Create the ‘STUDENT’ table (assuming that the ‘COURSE’ table exists).
(2 Marks)
ii. Add a constraint that makes the ‘IdNo’ to be a unique field in the ‘STUDENT’
table. (2 Marks)
iii. To produce a listing of the names and registration numbers of the students who
take ‘BSc IT’ as their course name. (2 Marks)
iv. To delete a record in the ‘STUDENT’ table for a student by the name ‘Liz
Mwangi’. (2 Marks)
v. What is the difference between the ‘char’ and ‘varchar’ data types.
(2 Marks)
(b) Define the following terms as they relate to socket programming: (3 Marks)
i. Socket
ii. Half association
iii. Descriptor
(c) Using a well labeled diagram, illustrate the communication between a client and server
from the time a socket is created to when the connection is terminated.
(7 Marks)
QUESTION FOUR – (Total Marks: 20)
(a) Differentiate between the following concurrent server designs:
i. One child process per client and a thread per connection (2 Marks)
CourseCode
COURSE STUDENT
ii. Preforking multiple processes and static worker pool. (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)
(d) Explain the following ISO forms of transparencies as used in Network programming:
i. Access (2 Marks)
i. Concurrency (2 Marks)
i. Relocation (2 Marks)
i. Persistence (2 Marks)
QUESTION FIVE – (Total Marks: 20)
(a) With an aid of a simple program, explain the fork() system call. (7 Marks)
(b) What does the Child inherit when you use the fork() system call. (6 Marks)
(c) List two error messages that one can receive when using the fork () system call?
(2 Marks)
(d) Explain three ways for process to terminate normally after you have used the Fork()
system call
(3 Marks)
(e) What do you understand by the term Automatic port number assignment when used in
Network Programming? (2 Marks)

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

Written by