JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2020 LINUX PROGRAMMING Previous Question Paper (October/ November - 2020 - R15)

MCA | 2020 | IV | R15 | October/ November - 2020

Answer PaperPaper Code: 824ABMaximum Marks: 75Time: 2 Hours

Answer any five questions. All questions carry equal marks.

Main

115 marks
a

Write a shell script to find the largest of 10 integers.

7 marks

Answer

The following shell script reads 10 integers from the user and determines the largest value using a loop and a comparison condition:

#!/bin/bash
echo "Enter 10 integers:"
read max
for i in {2..10}
do
  read num
  if [ $num -gt $max ]
  then
    max=$num
  fi
done
echo "The largest integer is: $max"
b

Explain various process utilities in Linux with clear syntax.

8 marks

Answer

Process utilities in Linux are used to monitor, manage, and control active processes. Key utilities include:

  • ps: Displays information about currently running processes. Syntax:
    ps [options]
    Common options include -e (all processes) and -f (full-format listing).
  • top: Provides a dynamic, real-time view of running system processes, showing CPU and memory usage. Syntax:
    top
  • kill: Sends a signal to a process, typically to terminate it. Syntax:
    kill [-signal] [PID]
  • nice: Starts a process with a modified scheduling priority. Syntax:
    nice -n [priority] [command]
  • renice: Alters the scheduling priority of an already running process. Syntax:
    renice [priority] -p [PID]
  • pgrep: Searches for processes based on name or other attributes and returns their PIDs. Syntax:
    pgrep [pattern]
215 marks
a

Write about the following UNIX commands with example: cal, date, echo, printf, bc, script, mailx, who, tty, stty.

7 marks

Answer

Sign in to view the complete answer paper.

b

How to declare and implement associative arrays? Give an example.

8 marks

Answer

Sign in to view the complete answer paper.

315 marks
a

Describe usage of dup( ) and dup2( ) system calls with example.

7 marks

Answer

Sign in to view the complete answer paper.

b

Explain about symlink( ) function with example program.

8 marks

Answer

Sign in to view the complete answer paper.

4

Write the syntax of the following system calls and explain with an example code:

a) telldir( ) b) mkdir( )

15 marks

Answer

Sign in to view the complete answer paper.

515 marks
a

Differentiate between fork( ) and vfork( ).

7 marks

Answer

Sign in to view the complete answer paper.

b

What is the need of exec( ) system call? Write a C program to illustrate exec( ).

8 marks

Answer

Sign in to view the complete answer paper.

615 marks
a

Define Signals. What do you mean by Unreliable Signals? Explain.

7 marks

Answer

Sign in to view the complete answer paper.

b

Describe SIGKILL and SIGINT with examples.

8 marks

Answer

Sign in to view the complete answer paper.

7

Write a program and explain how to transfer a large amount of data between two processes using Message queues.

15 marks

Answer

Sign in to view the complete answer paper.

8

Explain briefly about the following socket APIs with clear syntax:

a) accept( ) b) connect( ) c) bind( )

15 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the solved question paper with answers of LINUX PROGRAMMING from JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD for MCA 2020 IV, October/ November - 2020, R15.

For the question paper without answers, switch to the Question Paper tab.

Other papers in LINUX PROGRAMMING

Loading Question Papers

Fetching data from database...