8
AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Unix Previous Question Papers

Embed Size (px)

DESCRIPTION

12 previous question papers

Citation preview

Page 1: Unix Previous Question Papers

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 2: Unix Previous Question Papers

Unix And Shell ProgrammingPrevious Question papers

Question Paper 1

1. Explain the following commands with syntax (a) mkdir (b) cp (c) mv (d) rm. [4×4=16]

2. Explain the following commands with syntax (a) cat (b) tail (c) head (d) uniq. [4×4=16]

3. Explain the following functions with syntax: (a) dup() (b) dup2() (c) lseek() (d) close() [4×4=16]

4. What is the problem with returning an error from the ‘exec’ system call? How can the kernelhandle this problem? [8+8]

5. (a) Explain about “sending signals using system calls”. [8] (b) What is signal handler. Explainhow to install a signal Handler. [3+5]

6. (a) What is region lock? What are the rules about the specification of the region to be locked orunlocked? [3+5] (b) Write about file locking versus Record Locking. [8]

7. (a) Explain, “about the events occurred, when you call the popen ( ) and pclose ( ) functions”?(b) Explain about the “Effect of O-NDELAY flag on PIPEs and FIFOs”. [8+8] 8. (a) With anexample, Explain in detail about the process of writing Messages on to a Queue.

8. (b) Explain about the following system calls i. msgrev ii. msgetl [4+4]

Question Paper 2

1. Explain in detail about the UNIX Operating system structure. [16]

2. What is the purpose of grep command? Explain the various options available with the grepcommand with an example. [4+8+4]

3. Explain the following functions with syntax: (a) stat() (b) read() (c) open() (d) fstat() [4x4=16]

4. Suppose a process does not wish to block until its children terminate. How can it ensure thatchild processes are cleaned up when they terminate? [16]

5. (a) Write about the signals implementation. Write about “sigpending”, “sigsuspend”. (b) What ismeant by reinstalling a signal handler? (c) Write about phase function. [6+5+5]

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 3: Unix Previous Question Papers

6. (a) What is region lock? What are the rules about the specification of the region to be locked orunlocked? [3+5] (b) Write a function to test for a locking condition. [8]

7. (a) Explain, “about the events occurred, when you call the popen( ) and pclose( ) functions”?(b) Explain about the “Effect of O-NDELAY flag on PIPEs and FIFOs”. [8+8]

8. What is shared memory? What is the importance of it? Explain in detail about the process of“Allocating a shared memory segment”. [3+5+8]

Question Paper 3

1. Explain the following commands with syntax (a) who (b) date (c) find (d) wc [4x4=16]

2. Explain the following commands with syntax (a) uniq (b) grep (c) tar (d) join [4x4=16]

3. What is the advantage of having lseek be a separate system call, instead of passing thestarting offset to every read or write? What are the drawbacks? [12+4]

4. Explain the following system calls with syntax: (a) alloca() (b) setjmp() (c) longjmp() (d) exit()[4x4=16]

5. (a) What are the phases in signaling process? Explain what is meant by the lifetime of a signal.[3+5] (b) What is meant by signal catching function? What are the advantages of signal function.[3+5]

6. (a) Explain in detail about fcntl( ) function. (b) Write about Advisory locking versus mandatorylocking. [8+8]

7. (a) What are the named pipes? Explain in detail. [3+5] (b) What is the importance of “semctl”system call. Explain in detail. [3+5]

8. Write an example, Explain in detail about the (a) Getting Message Queue status and (b)Removing Message Queue. [8+8]

Question Paper 4

1. Explain the following commands with syntax (a) df (b) umount (c) mv (d) find [4x4=16]

2. Explain the following commands with syntax (a) uniq (b) grep (c) tar (d) join [4x4=16]

3. What is the advantage of having lseek be a separate system call, instead of passing thestarting offset to every read or write? What are the drawbacks? [12+4]

4. Explain the following system calls with syntax: (a) getrlimit () (b) setrlimit () (c) fork() (d) wait()[4x4=16]

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 4: Unix Previous Question Papers

5. (a) What is signal function? Write and explain about the structure of signal function. [3+5] (b)What are the phases in signaling process? Explain what is meant by the lifetime of a signal. [3+5]

6. (a) Write a function to test for a locking condition. (b) Write about Dead lock. [8+8]

7. (a) What is a semaphore? How to synchronize processes using semaphores. [3+4] (b) Explainabout the semget( ), semctl( ) and semop( ) functions. [9]

8. What is shared memory? What is the importance of it? Explain in detail about the process of“Allocating a shared memory segment”. [3+5+8]

Question Paper 5

1. Explain the following commands with syntax (a) wc (b) umask (c) ulimit (d) mount [4x4=16]

2. What is the purpose of grep command? Explain the various options available with the grepcommand with an example. [4+8+4]

3. (a) Briefly explain the file directories. (b) Write in detail about Device drivers. [8+8]

4. What is meant by process termination? Explain the various types of process terminations withsuitable example. [4+8+4]

5. (a) What are the phases in signaling process? Explain what is meant by the lifetime of a signal.[3+5] (b) What is meant by signal catching function? What are the advantages of signal function.[3+5]

6. (a) Explain in detail about the requirement of file locking mechanism. (b) Explain in detail aboutfcntl( ) function. [8+8]

7. (a) Explain, “How do you multiplex, multiple writers to the same pipe”. (b) Explain, “about theevents occurred, when you call the popen( ) and pclose( ) functions”? [8+8]

8. (a) With an example, Explain in detail about the process of writing Messages on to a Queue.[4+4] (b) With an example, Explain in detail about the process of Reading a Message from theQueue. [4+4]

Question Paper 6

1. Write short notes on the following: (a) Process utilities (b) Disk utilities [8+8]

2. What is the purpose of grep command? Explain the various options available with the grepcommand with an example. [4+8+4]

3. Define file. Explain in detail about the various files. [4+12]

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 5: Unix Previous Question Papers

4. Write a program that calls fork and has the child create a new session. Verify that the childbecomes a process group leader, and that the child no longer has a controlling terminal. [16]

5. (a) Write in detail about the interrupted system calls. [8] (b) Write about the kill and raisefunctions. [4+4]

6. (a) Write a function to test for a locking condition. (b) Write about Dead lock. [8+8]

7. (a) Explain “popen” and “pclose” functions. [4+4] (b) What are the named pipes? Explain indetail. [3+5]

8. What is shared memory? What is the importance of it? Explain in detailabout the process of “Allocating a shared memory segment”. [3+5+8]

Question Paper 7

1. Explain the following commands with syntax (a) ln (b) mv (c) rm (d) ulimit [4x4=16]

2. Write a script that accepts a file name as argument and displays the last modifica- tion time, ifthe file exists and a suitable message if it doesnt. [16]

3. Define system call. Explain in detail about the working and syntax of file structure relatedsystem calls. [4+12]

4. What is meant by a process? Explain any four process related system calls with syntax.[4+3x4=16]

5. (a) Write about the slow system calls. [8] (b) Write about abort and system functions. [4+4]

6. (a) Explain in detail about the requirement of file locking mechanism. (b) Explain in detail aboutfcntl( ) function. [8+8]

7. (a) Explain about the “Effect of O-NDELAY flag on PIPEs and FIFOs”. (b) Explain, How toobtain the list of login names in sorted order into the file “usersinfo.dat” using pipes. [8+8]

8. (a) Write about Timing comparison of “Message Queues Vs. Stream Pipes”. (b) Explain aboutthe Message Queue id. (msqid ds) data structure. [8+8]

Question Paper 8

1. Explain the following commands with syntax (a) umask (b) find (c) mount (d) unlink [4x4=16]

2. What is the purpose of Stream editor? Explain which option should be used to place thecontents of a file f1 after line. [4+12]

3. Explain the following system calls with syntax: (a) mkdir() (b) rndir() (c) chdir() (d) symlink()

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 6: Unix Previous Question Papers

[4x4=16]

4. Write short notes on the following: (a) Process termination (b) Zombie process [8+8]

5. (a) What is signal handler? Explain how to install a signal Handler? [3+5] (b) Write in detailabout “Reliable signal Handling”. [8]

6. (a) With an example, Explain about the setting a lock. [3+5] (b) With an example, Explain aboutclearing a lock. [3+5]

7. (a) Explain, “about the events occurred, when you call the popen( ) and pclose() functions”? (b)Explain about the semget( ), semctl( ) and semop( ) functions. [7+9]

8. (a) With an example, Explain in detail about the process of writing Messages on to a Queue.[4+4] (b) With an example, Explain in detail about the process of Reading a Message from theQueue. [4+4]

Question Paper 9

1. Explain in detail about the UNIX Operating system structure. [16]

2. Explain the following commands with syntax (a) sort (b) cut (c) pg (d) comp [4x4=16]

3. Explain the following system calls with syntax: (a) fseek() (b) fgetc() (c) getc() (d) getchar()[4x4=16]

4. Suppose a process does not wish to block until its children terminate. How can it ensure thatchild processes are cleaned up when they terminate? [16]

5. (a) Explain about the “features added to enhance signal reliability”. [8] (b) Explain about “abort”and “kill” functions. [4+4]

6. (a) Write about Advisory locking versus mandatory locking. (b) Write about file locking versusRecord Locking. [8+8]

7. (a) What are the named pipes? Explain in detail. [3+5] (b) Explain, in detail about the client -server communication using FIFOS. [8]

8. (a) Draw & Explain about the “Message Queue structures in the Kernel” [3+5] (b) With anexample, Explain in detail about the process of Reading a Message from the Queue. [5+3]

Question Paper 10

1. Explain the following commands with syntax (a) finger (b) find (c) unlink (d) ulimit. [4×4=16]

2. Explain the following commands with syntax (a) fgrep (b) egrep (c) paste (d) tee. [4×4=16]

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 7: Unix Previous Question Papers

3. Explain the following functions with syntax: (a) read() (b) write() (c) open() (d) close() [4×4=16]

4. Is there any way for a function that is called by main function to examine the command-linearguments without (a) Passing ‘argc’ and ‘argv’ as arguments from main to the function. (b)Having main copy ‘argc’ and ‘argv’ into global variables. [8+8]

5. (a) What are the phases in signaling process? Explain what is meant by the lifetime of a signal.[3+5] (b) What is meant by signal catching function? What are the advantages of signal function.[3+5]

6. (a) Explain in detail about the requirements of file locking mechanism. [8] (b) With an example,Explain about the setting a lock. [3+5]

7. Explain in detail about the System V IPCs. [16] 8. (a) Explain, How to place “Data in sharedmemory”.

8. (b) What is the use of destroying a shared memory segment? Explain the process of“destroying a shared memory segment”. [3+5]

Question Paper 11

1. Explain the following commands with syntax (a) finger (b) find (c) unlink (d) ulimit. [4×4=16]

2. What is the purpose of Stream editor? Explain which option should be used to place thecontents of a file f1 after line. [4+12]

3. Explain the following system calls with syntax: (a) fgets() (b) gets() (c) fseek() (d) putc()[4×4=16]

4. Explain the following system calls with syntax: (a) fork() (b) vfork() (c) exit() (d) wait() [4×4=16]

5. (a) What is signal function? Write and explain about the structure of signal function. [3+5] (b)What are the phases in signaling process? Explain what is meant by the lifetime of a signal. [3+5]

6. (a) Explain in detail about the requirement of file locking mechanism. (b) Explain in detail aboutfcntl( ) function. [8+8]

7. (a) Write about the Timing comparison of “Semaphores Vs Record locking”. [8] (b) Write aboutthe semaphore adjustment on “exit”. Explain about the impor- tance of SEM UNDO. [3+5]

8. What is shared memory? What is the importance of it? Explain in detail about the process of“Allocating a shared memory segment”. [3+5+8]

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.

Page 8: Unix Previous Question Papers

Question Paper 12

1. Explain the following commands with syntax (a) ftp (b) date (c) arp (d) rlogin. [4×4=16]

2. Write a shell script that searches for a pattern (supplied as argument) in all file names in thecurrent directory and then calls up the vi editor into those files containing the pattern. How will yourepeat the search in the current file and other files? [8+8]

3. Explain in detail about the following: (a) Directories (b) System calls [8+8]

4. Suppose a process does not wish to block until its children terminate. How can it ensure thatchild processes are cleaned up when they terminate? [16]

5. (a) What is signal handler? Explain how to install a signal Handler? [3+5] (b) Write in detailabout “Predefined signal handlers”. [8]

6. (a) What is region lock? What are the rules about the specification of the region to be locked orunlocked? [3+5] (b) Write about file locking versus Record Locking. [8]

7. (a) What are the named pipes? Explain in detail. [3+5] (b) Explain, in detail about the client -server communication using FIFOS. [8]

8. What is shared memory? What is the importance of it? Explain in detail about the process of“Allocating a shared memory segment”. [3+5+8]

Free MaterialsE-books

Online BitsPrevious Question Papers

Important QuestionsSyllabus book

List of books to refer…n many more

For all JNTU related Stuff

www.jntu123.blogspot.com

AcroPDF - A Quality PDF Writer and PDF Converter to create PDF files. To remove the line, buy a license.