JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD
JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD MCA 2023 LINUX PROGRAMMING Previous Question Paper (March/April - 2023 - R17)
Note: i) Question paper consists of Part A, Part B. ii) Part A is compulsory, which carries 25 marks. In Part A, Answer all questions. iii) In Part B, Answer any one question from each unit. Each question carries 10 marks and may have a, b as sub questions.
Part A
How do you build your own command library of programs?
Answer
To build a personal command library, follow these steps:
- Create a dedicated directory (e.g., ~/bin) to store your executable scripts or compiled binaries.
- Write your programs or scripts and save them within this directory.
- Ensure the files have execute permissions using the chmod +x filename command.
- Add the directory to your PATH environment variable by appending
to your .bashrc or .profile file.export PATH=$PATH:$HOME/bin - Source the configuration file or restart your shell to make the commands globally accessible.
What is a file? What are different types of files?
Answer
In Linux, a file is a collection of data stored on a storage medium, treated as a stream of bytes. Everything in Linux is represented as a file. The primary types include:
- Ordinary Files: Contain text, data, or executable code.
- Directories: Files that contain a list of other file names and their associated inodes.
- Device Files: Interfaces to hardware devices, categorized as character devices or block devices.
- Symbolic Links: Pointers or shortcuts to other files.
- Named Pipes (FIFOs): Used for inter-process communication.
- Sockets: Used for network communication between processes.
Explain various process attributes.
Answer
Sign in to view the complete answer paper.
What is file locking and record locking?
Answer
Sign in to view the complete answer paper.
List UNIX API for shared memory.
Answer
Sign in to view the complete answer paper.
Part B
What is shell script? How does shell support arithmetic operations?
Answer
Sign in to view the complete answer paper.
Distinguish between a C program and shell script.
Answer
Sign in to view the complete answer paper.
Explain how debugging of shell scripts is done.
Answer
Sign in to view the complete answer paper.
List and explain standard I/O functions for files in UNIX.
Answer
Sign in to view the complete answer paper.
Distinguish between dup and dup2.
Answer
Sign in to view the complete answer paper.
Explain pattern matching in perl.
Answer
Sign in to view the complete answer paper.
List and explain various signal functions.
Answer
Sign in to view the complete answer paper.
Distinguish between wait() and waitpid().
Answer
Sign in to view the complete answer paper.
Explain kill(), pause() and abort() system calls.
Answer
Sign in to view the complete answer paper.
Explain how interprocess communication is achieved through message queues.
Answer
Sign in to view the complete answer paper.
Explain various locking techniques in UNIX.
Answer
Sign in to view the complete answer paper.
Explain how file locking can be achieved through semaphores.
Answer
Sign in to view the complete answer paper.
Explain socket system calls for connection oriented protocol.
Answer
Sign in to view the complete answer paper.