VTU Computer Science (Semester 6)
Unix Systems Programming
May 2016
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1(a) Compare and explain: ANSI C and K and R C with examples.
8 M
1(b) List and explain features test macros in POSIX systems.
8 M
1(c) Compare: execution of an API with execution of C library function. Also list any four error status codes with their meaning.
4 M

2(a) What is file? Explain types of files with command examples.
6 M
2(b) Explain UNIX Kernel support for files with a neat sketch.
8 M
2(c) Write any three differences between:
i) Hard links and soft links ii) C steam pointer and file descriptor.
6 M

3(a) Explain file and record locking with C/C++ program.
8 M
3(b) Explain the following API's with their prototypes:
i) open ii) read iii) write iv) close.
8 M
3(c) Write a C/C++ program to rename a file [use mv command/link and unlink APIs].
4 M

4(a) With a neat diagram, explain about termination ways for a process ways for a process. Also write a C/C++ programs to display:
i) Command line arguments ii) Environment variables.
10 M
4(b) Explain setjmp and longjmp functions with their prototypes.
10 M
4(c) With neat sketch, explain memory structure layout of a C/C++ program that is to be executed.
4 M

5(a) What is race condition? Mention and explain routines to avoid race condition.
6 M
5(b) Explain the following:
i) orphaned process ii) zombie process iii) terminal login iv) network login.
10 M
5(c) Explain : i) process group ii) session.
4 M

6(a) What is daemon? Explain characteristics and coding rules.
10 M
6(b) Write a C/C++ program to show the use of alarm API.
6 M
6(c) Define and explain: i) SIGGHLD signal ii) waitpid function.
4 M

7(a) What is inter-process communication? List any 4 mechanisms (IPC). Also write a C/C++ programs that creates a child process to print a message.
8 M
7(b) Write a C/C++ program(s) to implement inter-process communication using FIFO file.
6 M
7(c) Explain briefly with examples: i) Message queues ii) semaphores.
6 M

8(a) Explain shared memory as an inter-process mechanism (IPC).
8 M
8(b) What are steam pipes? Explain passing of file descriptors.
6 M
8(c) Briefly explain client-server functions.
6 M



More question papers from Unix Systems Programming
SPONSORED ADVERTISEMENTS