a. What is a process. List and Explain various process utilities with suitable examples.
b. Explain basic file attributes. Discuss the appropriate commands associated with these attributes.
c. “Operating systems like UNIX provide services both for programs and users”. Jus- tify this statement with suitableexamples.
d. Explain the significance of the following commands. i. ls – ld ii. ls – l.
e. Give a note on vi editor.
f. What is an operating system? Explain How UNIX fulfills more than that role. Discuss suitable examples.
g. Explain various commands available in UNIX for networking. Discuss suitable examples.
h. Write short notes on:
(1) Unix system services
(2) Shell responsibilities? Inode block.
i. Define Shell and kernel. Differentiate them.
j. Illustrate the cycle of command execution by Unix. 1. (a) What is the difference between the text editing provided by ‘ed’ & ‘vi’ text editors.
k. What are the two operational modes of vi editor? What is the use of each?
a. Explain the different approach taken by diff command to display file differences.
b. Describe ‘comm’ command. Explain the output with -1,-2, or -3 options in ‘comm’ command.
c. Which is the command used for ordering a file? Discuss all the options available for this command. For every option Explain with an example.
d. What is a filter in UNIX? Explain any four filters in detail with examples.
e. How to remove duplicate lines from a file using sort?
f. How to count the number of ordinary files in home directory tree?
g. Select lines 5 to 10 of a file in two ways.
h. Discuss the various backup utilities available in UNIX. Ilustrate with suitable ex- amples.
i. Which is the command used for ordering a file? Discuss all the options available for this command. For every option Explain with an example.
j . Explain awk, tar, cpio with necessary examples.
k. What is the usage of filters?
l. Explain the following filters. more, cmp, tr, uniq.
m. Explain the following Unix shell commands with examples. cut, paste, egrep, fgrep.
n. What is the purpose of cat?
o. When using cat>abc, What happens if abc already contains something?
p. What happens when you use cat abc>abc?
q. Is the output of the following command be directed to the standard output. Cat abc xyz >/dev/tty.
A. Explain about the usage of multiple commands on the shell command line with example.
B. Write a menu driven shell script Which has following options.
i. Contents of /etc/passwd.
ii. List of users who have currently logged in.
iii. Present working directory.
iv. Exit. .
Make use of case statement. The menu should be placed appropriately in the centre of the screen and should be displayed in bold using the tput command. .
C. While executing a shell script either the LOGNAME or the UID is supplied at the command prompt. Write a shell script to find out at How many terminals has this user logged in?
D. Write a shell script to display first n numbers of Fibonacci series.
E. If x has the value 5, and you reassign it with x=”expr $x+10″, What is the new value of x? What would have been the value if single quotes were used? What’s wrong with all this anyway?
F. Devise a script that accept 2 directory names bar1 and bar2, and deletes those files in bar2 whose contents are identical to their namespaces in bar1.
G. Write a shell script Which reports names and sizes of all files in a directory (directory would be supplied as an argument to the shell script) whose size is exceeding 1000 bytes. The filename should be printed in descending order of their sizes. The total number of such files should also be reported.
H. Write a C program to search for the word ‘exam’ in a Given file, using Com- mand line arguments.
I. Write a shell script to accept a string from the terminal and use ‘case’ to echo a suitable message if the string does not have at least 10 characters using: i. case ii. expr
J. Write a shell script to display the processes in the system five times every 30 seconds using: i. while loop ii. for loop.
K. Write a shell script for the following task. The word ‘unix’ is present in only some of the files supplied as arguments to the shell script. Your shell script should searched each of these files in turn and stop at the first file that it encounters containing the word ‘unix’. This filename should be displayed on the screen.
L. Write a C program Which receives file names as command line arguments and display those filenames in ascending order according to their sizes.
M. Write a shell script Which will receive any number of filenames as arguments. The shell script should check whether every argument supplied is a file or a directory. If it is a directory it should be appropriately reported. If it is a Filename then name of the file as well as the number of lines present in it should be reported.
N. Write a C program to simulate ‘tail’ command.
O. Write short notes on:
(a) program development & debugging commands
(b) necessary commands to carry on day to day activities.
P. Write a shell script to simulate cp command.
Q. Write short notes on shell script arguments.
R. Write a shell script to check whether a Given file is a directory. If so, empty the contents of the directory and remove the directory.
S. How do you clean the screen and place the cursor at row 15 and column 20?
T. Write a shell script to find the decimal equivalent of 1101001.
A. Explain about different conditional exp?ressions available in Bourne shell.
B. Write a shell script Which receives two filenames as arguments. It should check whether the two file’s contents are same or not. If they are same then second file should be deleted. Use ‘cmp’ command to compare files.
C. What is metacharacter? List and Explain about any 7 metacharacters available in unix.
D. Write a shell script Which will receive either the filename or the filename with it’s full path during execution.this script should obtain information about this file as Given by ls – l and display in proper format.
E. What is a shell? What are the responsibilities of a shell?
F. What are the different types of shells available in unix.
G. Write a shell script Which gets executed the moment the user logs in. It should display the message “good morning/good afternoon/good evening” depending upon the time at Which the user logs in.
H. Explain about here documents with an example.
I. Explain following
(a) Shell meta characters
(b) Shell types in Unix
J. What is a loop? Compare and contrast while and until loops.
K. How for loop is used with command line arguments? Explain with a suitable example
L. Write short notes on following commands Trap, export, exit, expr, break, continue
M. Define Unix shell. Explain shell environment.
N. Briefly Explain Different shells available in Unix.
A. Write a C program to print the type of specified file (Regular, device, directory)
B. Write and Explain about hard and symbolic links.. give an example for each.
C. Explain about file descriptors & i-node?
D. Write the difference between fgetc and getc system calls.
E. Write the syntax of fflush system call give an example.
F. Write about ulink system call and give an example.
G. Write about Write system call and illustrate with an example.
H. Explain the differences between fgets, gets system call.
I. Explain link, unlink, remove and rename functions with syntaxes.
J. What are fflush and fseek functions? Explain.
K. Explain in detail about lseek function.
L. What is fcntl function? What is the purpose of using it?
M. Write the syntax of creat function. Explain, how this function is equivalent to open function.
N. Explain in detail, how an opened file can be positioned.
O. What are stat, fstat and lstat functions? Explain.
P. Give the syntaxes for chmod and fchmod functions and state their importance.
Q. Write the syntax of following system calls.
1. Write a program to illustrate the vfork function call.
2. Write a program for signal implementation.
3. Write a program which used both kill and raise functions.
4. Write a program which uses abort function.
5. Write a program which used both kill and raise functions.
6. Write the differences between wait and waitpid system calls.
7. Explain threads.
8. Write the system calls for process termination in detail.
9. Explain process creation and process termination in detail.
10. What is a process? Explain waiting for a process in detail.
11. What are the uses of fork function?
12. Write a short note on zombie process.
13. What are the different properties that are inherited by the child from its parent. Explain.
14. What are the differences between parent and child processes.
15. What are the differences between sleep and abort functions? Explain.
16. What is a zombie process? Explain.
17. What are the various properties that are inherited by the child from their parent?
18. Differentiate between parent and child processes.
19. Write the syntax of following functions. Explain each argument.
1. Write a comparative study of adversary and mandatory locking.
2. Write in detail about locking regions.
3. Explain the concept of requesting and releasing a lock.
4. Write in detail about locking regions.
5. Write about different Unix locking techniques.
6. Write a C program to use a function lock test to test for a lock.
7. Write about lockf function.
8. Write the differences between fcntl function and flock function.
9. Write and Explain locking routines using a create( ) system call.
• Explain with examples, competing locks and locking regions in detail.
• Write a short note on competing locks.
• Explain the usage of read and Write functions with locking.
• State the importance of file locking and Explain locking regions in detail.
• What is a null pointer? Explain with example, What happens when we try to access a null pointer.
1. Write about system call pipe . Give an example which uses pipe system call.
2. Explain the logic for opening or creating an IPC channel
3. Explain the following concepts about pipes
Pipes between two process
Pipes among three process in a shell
4. Explain the concept of IPC between two processes on a single system. Give Example.
5. What is the data stored by the kernel when a semaphore is created.
6. What is the system call that is used to create a shared memory segment and Explain each field in detail. [8+8]7. The syntax of msgget system call is int msgget(key t key, int flag)
Explain type of key
Explain What value it returns
What is the use of flag
8. Explain the following concepts
Pipes in single process
Pipes in single process, immediately after fork
9. Explain the concept of IPC between two processes on a single system. Give Example
10. What are the advantages and disadvantages of system v IPC?
11. What is a FIFO? Why FIFOs are called as named pipes? Explain
12. Write a program to create a pipe and to execute it on the client.
13. Mention the rules for writing information into the pipe.
14. 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.
15. Define Inter Process Communication? Explain IPC between two processes on different systems.
16. What is a pipe? Using pipe, how IPC can be implemented.