Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Stage 3 Exam Questions for BSc (Hons) in Software Development and Computer Networking, Exams of Computer Engineering and Programming

The instructions and questions for an exam in the bachelor of science (honours) in software development and computer networking – stage 3 program at cork institute of technology. The exam covers topics such as pipe usage, network daemons, rpc, shared memory, and sockets. Students are required to answer five questions, each carrying equal marks.

Typology: Exams

2012/2013

Uploaded on 03/28/2013

duraid
duraid 🇮🇳

4.3

(3)

55 documents

1 / 4

Toggle sidebar

Related documents


Partial preview of the text

Download Stage 3 Exam Questions for BSc (Hons) in Software Development and Computer Networking and more Exams Computer Engineering and Programming in PDF only on Docsity! Cork Institute of Technology Bachelor of Science (Honours) in Software Development and Computer Networking – Stage 3 (Bachelor of Science in Software Development and Computer Networking – Stage 3) (NFQ – Level 8) Autumn 2005 PROGRAMMING 3 (Time: 3 Hours) Instructions Answer FIVE questions. All questions carry equal marks. Method declarations are on the last page Examiners: Ms. Helen Fagan Dr. D. Chambers Mr. P. O’Connor Mr. E. A. Parslow Question 1 (a) Write a program to show how a pipe can be used to send a message from a child process to its parent. The child process should take input from the user and send it to the parent. The parent process should then print this message. (8 marks) (b) Explain when you would use the dup system call. (4 marks) (c) Explain the significance of the return value of the wait and the fork system call. (4 marks) (d) Write a program that receives and prints a message whenever it receives a SIGQUIT. (4 marks) Question 2 (a) What is a network daemon? (2 marks) (b) Describe the purpose of the super server process inetd on Linux. (4 marks) (c) Describe the basic architecture of the super server program. (6 marks) (d) Describe with the aid of an example the format of an entry in the inetd.conf file and the /etc/services file. (8 marks) 2 Question 3 (a) Explain the role of the port mapper in RPC. (4 marks) (b) Describe with the aid of a diagram the sequence of events that occur from the point where a remote procedure is called until the procedure returns. (6 marks) (c) Write a file student.x that you would use as a basis for an RPC program. The program should allow a client to: • register a students result for a specific subject with the server • retrieve a result for a student in a specific subject • retrieve a student’s average result for all subjects (10 marks) Question 4 (a) Write a program that creates a block of shared memory to store an array of 1024 characters. The shared memory block should have permissions (rw-rw-rw-). The agreed key is the filename ‘file.txt’and the letter ‘x’. The program should take a string from the user and write it into the start of the shared memory block. (14 marks) (b) What is the purpose of a semaphore? (2 marks) (c) What information does the operating system store for each semaphore group created? (4 marks) Question 5 (a) What information identifies a specific socket? (2 marks) (b) Write the code for an iterative connectionless server that waits continually for requests from clients. For each request it • Prints out the IP address of the client on the server. • Sends back the IP address to the client. (12 marks) (c) Explain the effect of the following system call where socket_fd is a socket file descriptor. fcntl( socket_fd, F_SETFL, O_NONBLOCK); (6 marks)
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved