FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download VTU BE 2020 Jan CSE Question Paper 15 Scheme 7th Sem UNIX System Programming

Download Visvesvaraya Technological University (VTU) BE ( Bachelor of Engineering) CSE 2015 Scheme 2020 January Previous Question Paper 7th Sem UNIX System Programming

This post was last modified on 02 March 2020

MEE
USN
Seventh Semester B.E. Degree Examination, Dec.2019/Jan.2020
UNIX System Programming
Time: 3 hrs. Max. Marks: 80

--- Content provided by FirstRanker.com ---

Note: Answer any FIVE full questions, choosing ONE full question
.
from each module.
? ...
Module-1

--- Content provided by FirstRanker.com ---

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.)

--- Content provided by FirstRanker.com ---

?
6)

C.
0

--- Content provided by FirstRanker.com ---

I)
OR
- 5 d 2 a. What is error status code? List and explain the meaning of any 4 error status codes.
75
elJ

--- Content provided by FirstRanker.com ---

(06 Marks)
? oc
b.
"E List the common functions performed by UNIX APIs. (04 Marks)
rsi

--- Content provided by FirstRanker.com ---

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

--- Content provided by FirstRanker.com ---

ii) to get the physical line number of a source file
iii) to get file name
iv)

to get date and time. (06 Marks)

--- Content provided by FirstRanker.com ---

c '
7
4
?
.

--- Content provided by FirstRanker.com ---


2 0-
c.,
Module-2
O

--- Content provided by FirstRanker.com ---

-
0 a. any 3 List four differences between hardlink and soft link (symbolic link).
? c
(04 Marks)
cz

--- Content provided by FirstRanker.com ---

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

--- Content provided by FirstRanker.com ---

c.
Discuss the working of ',seek' system call. Explain all the parameters in detail. (08 Marks)
z
i

--- Content provided by FirstRanker.com ---

o
' t)
C OR
. 0
4 a. Discuss how 'link' and 'unlink' system calls can be used to implement 'my' command in

--- Content provided by FirstRanker.com ---

rT,
UNIX.
(06 Marks)
= ?
ct

--- Content provided by FirstRanker.com ---

b. Using suitable diagram show the process's FDT (File Descriptor Table), FT (File Table) IT
?
aj

8

--- Content provided by FirstRanker.com ---

7
.
3
.
3

--- Content provided by FirstRanker.com ---

(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.

--- Content provided by FirstRanker.com ---

-
(10 Marks)
a
O ;
2

--- Content provided by FirstRanker.com ---

=-
o
Module-3
5 a. Discuss how a C program is started and terminated in various ways along with suitable
diagram.

--- Content provided by FirstRanker.com ---

(10 Marks)
O b. Write a C program to avoid Zombie process by forking twice. (06 Marks)
t ?3
OR
6 a.

--- Content provided by FirstRanker.com ---

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)

--- Content provided by FirstRanker.com ---

1 of 2
FirstRanker.com - FirstRanker's Choice
MEE
USN
Seventh Semester B.E. Degree Examination, Dec.2019/Jan.2020

--- Content provided by FirstRanker.com ---

UNIX System Programming
Time: 3 hrs. Max. Marks: 80
Note: Answer any FIVE full questions, choosing ONE full question
.
from each module.

--- Content provided by FirstRanker.com ---

? ...
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++

--- Content provided by FirstRanker.com ---

programme to illustrate the same. (08 Marks)
I.)
?
6)

--- Content provided by FirstRanker.com ---

C.
0
I)
OR
- 5 d 2 a. What is error status code? List and explain the meaning of any 4 error status codes.

--- Content provided by FirstRanker.com ---

75
elJ
(06 Marks)
? oc
b.

--- Content provided by FirstRanker.com ---

"E List the common functions performed by UNIX APIs. (04 Marks)
rsi
F
r: ?I-
c.

--- Content provided by FirstRanker.com ---

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)

--- Content provided by FirstRanker.com ---


to get date and time. (06 Marks)
c '
7
4

--- Content provided by FirstRanker.com ---

?
.

2 0-
c.,

--- Content provided by FirstRanker.com ---

Module-2
O
-
0 a. any 3 List four differences between hardlink and soft link (symbolic link).
? c

--- Content provided by FirstRanker.com ---

(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)

--- Content provided by FirstRanker.com ---

0
O
c.
Discuss the working of ',seek' system call. Explain all the parameters in detail. (08 Marks)
z

--- Content provided by FirstRanker.com ---

i

o
' t)
C OR

--- Content provided by FirstRanker.com ---

. 0
4 a. Discuss how 'link' and 'unlink' system calls can be used to implement 'my' command in
rT,
UNIX.
(06 Marks)

--- Content provided by FirstRanker.com ---

= ?
ct
b. Using suitable diagram show the process's FDT (File Descriptor Table), FT (File Table) IT
?
aj

--- Content provided by FirstRanker.com ---


8
7
.
3

--- Content provided by FirstRanker.com ---

.
3
(Incode Table) contents after the operation : "A process has opened 3 fi les ? `xyz' for read
t+-
tf.)

--- Content provided by FirstRanker.com ---

0
only, `abc' for read write and `abc' again for write only". Discuss the same in detail.
-
(10 Marks)
a

--- Content provided by FirstRanker.com ---

O ;
2
=-
o
Module-3

--- Content provided by FirstRanker.com ---

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

--- Content provided by FirstRanker.com ---

OR
6 a.
What is the use of `setjmp' and `Iongjmp' function? Write a C program to illustrate the
same.
(08 Marks)

--- Content provided by FirstRanker.com ---

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)

--- Content provided by FirstRanker.com ---

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

--- Content provided by FirstRanker.com ---

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)

--- Content provided by FirstRanker.com ---

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)

--- Content provided by FirstRanker.com ---

b. Define message queue. Discuss how it is useful in inter-process communication. (08 Marks)
.."
--.
C.00:i!.'
/". ". ... - ' ir .. s.16

--- Content provided by FirstRanker.com ---

/?,,,,...---- ?-?-...,, ?:,'
l'"-1(
?.: : .
A
J

--- Content provided by FirstRanker.com ---

'
?
I: . i \ .:`,---'
? -",i II
',l c

--- Content provided by FirstRanker.com ---

(
1 1,.,?, i :?:!: ./ P
,.. 1 ..... \.. tj %
V
-

--- Content provided by FirstRanker.com ---

'
?"*-2;;?- ?ii.'
2 of 2
FirstRanker.com - FirstRanker's Choice

--- Content provided by FirstRanker.com ---