R5311503-unix Programming

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View R5311503-unix Programming as PDF for free.

More details

  • Words: 887
  • Pages: 4
1

Code No: R5311503

III B.Tech I Semester(R05) Supplementary Examinations, May 2009 UNIX PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) Define Shell and kernel. Differentiate them. (b) Illustrate the cycle of command execution by Unix. 2. Explain the following commands Head, cut, nl, tar.

[8+8]

[4×4]

3. (a) Write a shell script to extract the parent directory from a files absolute path. Accept the path name from user. (b) If you define a variable at command prompt, how can you make its value available in a shell script. Explain with an example program. [8+8] 4. (a) What is a shell? How it is used as a command processor? Explain with an example. (b) What are the types of commands that the shell recognizes?

[8+8]

5. (a) Explain read, write and execute permissions in detail. (b) What is umask function? Write a program to illustrate umask function. 6. Discuss various forms of wait functions with examples.

[8+8] [16]

7. (a) Write a program to allocate all the physical memory and explain how it works. (b) What is the purpose of calloc function. Explain with example. 8. Explain various system calls used for message queues. ?????

[10+6] [16]

2

Code No: R5311503

III B.Tech I Semester(R05) Supplementary Examinations, May 2009 UNIX PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) Explain the functionality of the programs find in each of the following directories bin, src, man, sbin, lib (b) How directories are created and deleted recursively? Trace an illustrative path from the root to your current working directory. [8+8] 2. Explain the following commands Head, cut, nl, tar.

[4×4]

3. Attempt following: - write a shell script to find factorial of any number entered from keyboard. - Write a shell script to find gcd of 2 integers entered from key board. 4. Write short notes on following commands Trap, export, exit, expr, break, continue 5. Discuss about various low level file access functions.

[16] [16] [16]

6. (a) What are the differences between sleep and abort functions? Explain. (b) State the differences between parent and child processes.

[8+8]

7. (a) Write a short note on competing locks. (b) Explain the usage of read and write functions with locking.

[8+8]

8. (a) Explain differentiate between pipes and named pipes. (b) Write aprogram to send data from parent to child over a pipe. ?????

[8+8]

3

Code No: R5311503

III B.Tech I Semester(R05) Supplementary Examinations, May 2009 UNIX PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) In Unix, how are absolute file permissions set? How are these altered? (b) State the procedures for - listing the contents of a file - redirecting the output of a file - concatenation of 2 files.

[8+8]

2. (a) What are filters? How they are used in Unix program? List any 5 filters. (b) How will you find that the number of times the character∗ occurs in a file. [8+8] 3. (a) How do you clean the screen and place the cursor at row 15 and column 20? (b) Write a shell script to find the decimal equivalent of 1101001.

[8+8]

4. (a) Write a shell script to simulate cp command. (b) What is the use of set command? Explain with examples.

[8+8]

5. (a) What are the differences between open and opendir functions? Explain. (b) Give the syntax of functions that allow to change the user ID and group ID of a file. (c) Write the syntax of close function and explain its importance.

[6+4+6]

6. (a) Compare fork and vfork functions with examples. (b) Explain with syntax wait3 and wait4 function.

[8+8]

7. (a) State the importance of shared lock. (b) What is a dangling pointer? Explain. (c) What is freeing memory? Explain.

[4+6+6]

8. (a) Explain semop and semctl system calls. (b) Explain, how synchronization will be done by using semaphores. ?????

[10+6]

4

Code No: R5311503

III B.Tech I Semester(R05) Supplementary Examinations, May 2009 UNIX PROGRAMMING (Computer Science & Systems Engineering) Time: 3 hours Max Marks: 80 Answer any FIVE Questions All Questions carry equal marks ????? 1. (a) How the Unix file system characterized? (b) What is meant by inode? What does it contain? Explain. 2. Explain use of the following Unix commands with examples. cat, tail, sort, nl.

[8+8]

[4×4]

3. Which commands are actually programming languages in Unix? Explain them with each option. 16] 4. (a) What are the functions of a shell? (b) Explain the functions available in shell. (c) How will you select a shell? (d) How will you create shell variables? 5. Discuss various formatted I/O functions in detail.

[4×4] [16]

6. (a) State the differences between alarm, pause and sleep functions. (b) What is raise function? Write a program to implement a raise function.

[8+8]

7. (a) What is the purpose of F GETLK command? Explain. (b) Explain the purpose of fcntl function with suitable example.

[8+8]

8. Compare the IPC functionality provided by pipes and message queues. What are the advantages and drawbacks of each? When is one more suitable than the other. [16] ?????

Related Documents

Programming
November 2019 39
Programming
November 2019 29
Programming
November 2019 21
Programming Challenges
December 2019 10