Get premium membership and access revision papers, questions with answers as well as video lessons.
Got a question or eager to learn? Discover limitless learning on WhatsApp now - Start Now!

Systems Programming Question Paper

Systems Programming 

Course:Bachelor Of Science In Computer Science

Institution: Dedan Kimathi University Of Technology question papers

Exam Year:2011



KIMATHI UNIVERSITY COLLEGE OF TECHNOLOGY
SPECIAL/SUPLEMENTRAY EXAMINATIONS
ICS 2305: SYSTEMS PROGRAMMING (BSC IT Y4S1)
DATE: MARCH 2012 TIME: 2 HOURS
INSTRUCTIONS:
Answer Question ONE (30 Marks) and any other TWO (20 Marks each).
Question One (30 Marks)-Compulsory
a) Distinguish between the following terms(10 mks)
i. Loader and linker
ii. Compiler and interpreter
iii. System call and signal
iv. Operating system kernel and shell
v. Bootsrap and sysgen program
b) Using a basic CPU instruction cycle explain the execution of an interrupt( 4 marks)
c) Systems programs enable the operating system to facilitate the editing, compiling, loading and I/O
processing services. Explain ( 4 mks)
d) Define a system process and outline its three main components( 4 marks)
e) Explain the essential properties of the following operating systems and state their implementation
overheads( 8 mks)
i. Hand held system
ii. Multiprocessor systems
iii. Cluster systems
iv. Batch systems
Question Two (20 Marks)
a) The operation system is often viewed as defined by system programs, not the actual system calls. Discuss( 4
mks)
b) Using an elaborate diagram explain the execution of a system call read( fd,buffer,nbytes) ( 6 mks)
c) Using relevant examples, explain how system programs make direct use of the operating system services
through the following types of system calls (10 mks)
i. File management
ii. Device management
iii. Process management
iv. Device management
v. Communication
Question Three (20 Marks)
a) Explain the function of the following system programs
i. main() {
char buf[256];
for(;;) {
int i
int n = read(0,buf,256);
if ( n <= 0 ) exit(-n);
for ( i=0; i<n; i++ )
if ( buff[i] == ‘\r’ )
buff[i] = ‘\n’;
write(1,buf,n);
}
exit(0);
}
( 4 marks)
ii. #include <sgtty.h>
int echo_off(tty_fd)
int tty_fd;
{
struct sgttyb buf;
gtty(tty_fd,&buf);
buf.sg_flags &= ~ECHO;
return stty(tty_fd,&buf);
}
( 4 marks)
b) Describe the following kernel design approaches( 8 marks)
i. Hybrid
ii. Monolithic
iii. Microkernel
iv. Nanokernel
c) Define context switching and explain how it affects device performance( 2 marks)
d) Describe the importance of signals and show how they are implemented in a system program( 2
marks)
Question Four (20 Marks)
a) Define a system process and explain the meaning of a process state and process context ( 4 marks)
b) Explain the following portion of a system program( 6 marks)
while ( TRUE){
type_prompt();
read_command( command,parameters)
if( fork() !=0{
/* Parent code */
waitpid(-1, &status, 0);
} else{
/*Child code*/
execve( command, parameters, 0);
}
}
c) Describe how the following tools enable the implementation of simple batch operating systems( 10 marks)
i. Interupts
ii. Memory protection
iii. Timer
iv. Privileged instructions
v. Job control language
Question Five (20 marks)
a) Describe the concept of a system call and show three methods used to pass parameters between a running
program and the operating system( 8 marks)
b) Describe the meaning of the following system programs
i. read(fd,buffer,nbytes) ( 2 marks)
ii. Program a
int i = 5;
printf(“%d\n”,i);
execl(“B”, “B”, NULL);
printf(“%d\n”,i);
Program b
main()
{
printf(“hello\n”);
}
( 2 marks)
c) Discuss the implementation of interprocess communication using
i. Pipes ( 4 marks)
ii. Sockets( 4 marks)






More Question Papers


Popular Exams



Return to Question Papers