Download Visvesvaraya Technological University (VTU) BE ( Bachelor of Engineering) CSE 2015 Scheme 2020 January Previous Question Paper 7th Sem UNIX System Programming
USN
Seventh Semester B.E. Degree Examination, Dec.2019/Jan.2020
UNIX System Programming
Time: 3 hrs. Max. Marks: 80
Note: Answer any FIVE full questions, choosing ONE full question
.
from each module.
? ...
Module-1
a. List the differences between ANSI C and KandR(K & R)C. Discuss any two differences in
detail. (08 Marks)
b. What is the necessity of sysconf( ), pathconf( ) and fpathconf( ) functions? Write a C/C++
programme to illustrate the same. (08 Marks)
I.)
?
6)
C.
0
I)
OR
- 5 d 2 a. What is error status code? List and explain the meaning of any 4 error status codes.
75
elJ
(06 Marks)
? oc
b.
"E List the common functions performed by UNIX APIs. (04 Marks)
rsi
F
r: ?I-
c.
Write a C program to illustrate the following using C preprocessor symbols.
i) to check whether the complier is ANSI C complaint
ii) to get the physical line number of a source file
iii) to get file name
iv)
to get date and time. (06 Marks)
c '
7
4
?
.
2 0-
c.,
Module-2
O
-
0 a. any 3 List four differences between hardlink and soft link (symbolic link).
? c
(04 Marks)
cz
b. Find the actual file permission if open( ) is called to create a file /usr/names?txt. Assume
default file permission is 0666 and umask of the calling process is :
umask (S_ IWOTHIS ? IXOTH IS IWGRP). (04 Marks)
0
O
c.
Discuss the working of ',seek' system call. Explain all the parameters in detail. (08 Marks)
z
i
o
' t)
C OR
. 0
4 a. Discuss how 'link' and 'unlink' system calls can be used to implement 'my' command in
rT,
UNIX.
(06 Marks)
= ?
ct
b. Using suitable diagram show the process's FDT (File Descriptor Table), FT (File Table) IT
?
aj
8
7
.
3
.
3
(Incode Table) contents after the operation : "A process has opened 3 fi les ? `xyz' for read
t+-
tf.)
0
only, `abc' for read write and `abc' again for write only". Discuss the same in detail.
-
(10 Marks)
a
O ;
2
=-
o
Module-3
5 a. Discuss how a C program is started and terminated in various ways along with suitable
diagram.
(10 Marks)
O b. Write a C program to avoid Zombie process by forking twice. (06 Marks)
t ?3
OR
6 a.
What is the use of `setjmp' and `Iongjmp' function? Write a C program to illustrate the
same.
(08 Marks)
b. What is Job control? List the 3 forms of support needed for Job control. (05 Marks)
c. Compare 'fork' and ?vfork' systemcall. (03 Marks)
1 of 2
FirstRanker.com - FirstRanker's Choice
MEE
USN
Seventh Semester B.E. Degree Examination, Dec.2019/Jan.2020
UNIX System Programming
Time: 3 hrs. Max. Marks: 80
Note: Answer any FIVE full questions, choosing ONE full question
.
from each module.
? ...
Module-1
a. List the differences between ANSI C and KandR(K & R)C. Discuss any two differences in
detail. (08 Marks)
b. What is the necessity of sysconf( ), pathconf( ) and fpathconf( ) functions? Write a C/C++
programme to illustrate the same. (08 Marks)
I.)
?
6)
C.
0
I)
OR
- 5 d 2 a. What is error status code? List and explain the meaning of any 4 error status codes.
75
elJ
(06 Marks)
? oc
b.
"E List the common functions performed by UNIX APIs. (04 Marks)
rsi
F
r: ?I-
c.
Write a C program to illustrate the following using C preprocessor symbols.
i) to check whether the complier is ANSI C complaint
ii) to get the physical line number of a source file
iii) to get file name
iv)
to get date and time. (06 Marks)
c '
7
4
?
.
2 0-
c.,
Module-2
O
-
0 a. any 3 List four differences between hardlink and soft link (symbolic link).
? c
(04 Marks)
cz
b. Find the actual file permission if open( ) is called to create a file /usr/names?txt. Assume
default file permission is 0666 and umask of the calling process is :
umask (S_ IWOTHIS ? IXOTH IS IWGRP). (04 Marks)
0
O
c.
Discuss the working of ',seek' system call. Explain all the parameters in detail. (08 Marks)
z
i
o
' t)
C OR
. 0
4 a. Discuss how 'link' and 'unlink' system calls can be used to implement 'my' command in
rT,
UNIX.
(06 Marks)
= ?
ct
b. Using suitable diagram show the process's FDT (File Descriptor Table), FT (File Table) IT
?
aj
8
7
.
3
.
3
(Incode Table) contents after the operation : "A process has opened 3 fi les ? `xyz' for read
t+-
tf.)
0
only, `abc' for read write and `abc' again for write only". Discuss the same in detail.
-
(10 Marks)
a
O ;
2
=-
o
Module-3
5 a. Discuss how a C program is started and terminated in various ways along with suitable
diagram.
(10 Marks)
O b. Write a C program to avoid Zombie process by forking twice. (06 Marks)
t ?3
OR
6 a.
What is the use of `setjmp' and `Iongjmp' function? Write a C program to illustrate the
same.
(08 Marks)
b. What is Job control? List the 3 forms of support needed for Job control. (05 Marks)
c. Compare 'fork' and ?vfork' systemcall. (03 Marks)
1 of 2
Module-4
7 a. Define signal. Categorize the ways in which a process can handle the signals. (05 Marks)
b. Discuss the working of `sigprocmask' API. Explain all the parameters in detail. (08 Marks)
c. Mention any 3 Daemon characteristics. (03 Marks)
OR
8 a. Write a C program that checks whether SIGINT signal is present in a process signal mask
and adds it to the mask if it is not there. It should clear SIGSEGV signal from the process
signal mask. (08 Marks)
b. Discuss how error logging is done by a Daemon process with suitable diagram. (08 Marks)
Module-5
9 a. Define IPC. List the 1PC types supported in UNIX system. (05 Marks)
b. How to create a pipe in UNIX programming? List the limitations of pipe. (04 Marks)
c. Develop a code snippet that the parent sends "Hello world" message to the child process
through the pipe. The child on receiving this message should display it on standard output.
(07 Marks)
OR
10 a. Illustrate how FIFO is useful in client server communication. (08 Marks)
b. Define message queue. Discuss how it is useful in inter-process communication. (08 Marks)
.."
--.
C.00:i!.'
/". ". ... - ' ir .. s.16
/?,,,,...---- ?-?-...,, ?:,'
l'"-1(
??????.: : .
A
J
'
?
I: . i \ .:`,---'
? -",i II
',l c
(
1 1,.,?, i :?:!: ./ P
,.. 1 ..... \.. tj %
V
-
'
???"*-2;;?- ?ii.'
2 of 2
FirstRanker.com - FirstRanker's Choice
This post was last modified on 02 March 2020