Download JNTUH MCA 3rd Sem R13 2017 August 813AM Linux Programming Question Paper

Download JNTUH (Jawaharlal nehru technological university) MCA (Master of Computer Applications) 3rd Sem (Third Semester) Regulation-R13 2017 August 813AM Linux Programming Previous Question Paper


R13

Code No: 813AM

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

MCA III Semester Examinations, August - 2017

LINUX PROGRAMMING



Time: 3 Hours













Max. Marks: 60


Note: This question paper contains two parts A and B.

Part A is compulsory which carries 20 marks. Answer all questions in Part A. Part B
consists of 5 Units. Answer any one full question from each unit. Each question carries 8
marks and may have a, b, c as sub questions.



PART - A



















5 ? 4 Marks = 20

1.a)

Write a bash script that displays a list of all the directory files in the current directory.[4]

b)

What are the differences among stat family (stat,fstat and lstat) of functions?

[4]

c)

What are the differences between fork( ) and vfork( ) functions?



[4]

d)

Give the syntax of semop( ) function. What are its uses?







[4]



e)

Draw a diagram that shows the calling sequence of socket system calls for connection
oriented communication between a Client and a Server.







[4]



PART - B















5 ? 8 Marks = 40

2.a)

Explain with examples the quoting methods in shell.

b)

Write an awk script to find the number of characters, words and lines in a file.

[4+4]

OR

3.a)

Explain the purpose of following commands:

i) chmod ii) tar
b)

Write a bash script that uses a function to find the factorial of a number.

[4+4]


4.

Write a C program that takes a file name as command-line argument and displays the



following information on the file:
i) file type ii) last access time.











[4+4]

OR

5.a)

Write a C program to display all the directory files in the current directory.

b)

What is the main difference between mandatory file locking and advisory file locking?

























[4+4]


6.a)

Explain with examples the different ways in which a process can respond to signals.

b)

Why were the signal facilities provided by Unix unreliable in older versions of Unix?

























[4+4]

OR

7.a)

When a child process is created, what resources are inherited from its parent? What
attributes are different between the parent and the child process?

b)

Explain with syntax the purpose of kill( ) function.







[4+4]








8.a)

How are the named and unnamed pipes created? What are the differences between them?

b)

Explain with syntax the purpose of popen( ) and pclose( )functions.



[4+4]

OR

9.

Explain with syntax the purpose of the following message queue functions:

a) msgget( ) b) msgsnd( ) c) msgrcv( ) d) msgctl( )





[8]


10.

Write C Programs (Send.c and Recve.c) to perform the following:
One process reads a string from standard input device into a Shared memory segment.
Another process writes the same string from the Shared memory segment to the standard
output device.















[8]

OR

11.

Write C Programs (Server.c and Client.c) for connection oriented communication between
Client and Server processes to perform the following using sockets in the internet domain:
Client process sends a string to the Server process. The Server process receives



the string, reverses it and sends it back to the Client process.





[8]




--ooOoo--


This post was last modified on 17 March 2023