Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad MCA 2017 LINUX PROGRAMMING Previous Question Paper (August - 2017 - R09)
Answer any five questions. All questions carry equal marks.
Main
What are the features of LINUX Operating System?
Answer
Linux is a multitasking and multi-user operating system known for its stability and security. Key features include:
- Open Source: The source code is freely available, allowing users to modify and redistribute it.
- Portability: It can run on various hardware platforms with minimal changes.
- Hierarchical File System: Linux organizes files in a tree-like structure starting from the root directory.
- Shell: A powerful command-line interpreter that provides an interface between the user and the kernel.
- Security: It offers robust authentication, authorization, and file permission mechanisms.
- Virtual Memory: Efficient memory management that allows running processes larger than physical RAM.
Describe the contents of a directory, explaining the mechanism by which its entries are updated by cp, mv, and rm commands.
Answer
A Linux directory is a special file that contains a list of filenames and their corresponding inode numbers. The inode contains metadata about the file, such as permissions, ownership, and data block locations, but not the filename itself.
The mechanisms for updating directory entries are as follows:
- cp (Copy): When copying a file, the system creates a new inode for the destination file, copies the data blocks, and adds a new entry (filename and new inode number) to the destination directory.
- mv (Move/Rename): If moving within the same filesystem, the system simply updates the directory entry by changing the filename associated with the existing inode. The inode number remains unchanged.
- rm (Remove): The system removes the entry (filename and inode number) from the directory file. If the link count of the inode drops to zero, the system deallocates the inode and the associated data blocks.
Explain briefly about Mathematical functions in awk.
Answer
Sign in to view the complete answer paper.
Write a shell script to find the smallest of 10 integers using positional parameters.
Answer
Sign in to view the complete answer paper.
Differentiate between hard linking and soft linking.
Answer
Sign in to view the complete answer paper.
Write the syntax of read() and write() system calls and explain with an example code.
Answer
Sign in to view the complete answer paper.
Write the syntax of six versions of exec functions and also explain how these functions differ from each other.
Answer
Sign in to view the complete answer paper.
Define a signal. What are the uses of signals? What are the conditions that can generate a signal? Describe the actions to be taken by the kernel when a signal occurs.
Answer
Sign in to view the complete answer paper.
What are pipes? Explain how pipes are created and used in IPC with an example also mention their limitations.
Answer
Sign in to view the complete answer paper.
Explain the following POSIX APIs with clear syntax and with an example code:
pthread_self()
Answer
Sign in to view the complete answer paper.
pthread_kill()
Answer
Sign in to view the complete answer paper.
pthread_exit()
Answer
Sign in to view the complete answer paper.
Explain briefly about the following socket APIs with clear syntax:
socket()
Answer
Sign in to view the complete answer paper.
bind()
Answer
Sign in to view the complete answer paper.
listen()
Answer
Sign in to view the complete answer paper.
accept()
Answer
Sign in to view the complete answer paper.