MCA II/I Operating Systems Lab
1. Write a program to implement the producer-consumer problem using semaphores and shared memory.
2. Write a client-server program in which the client takes the name of the file as the input and server sends the contents of the file to the client, which display it on the screen.
3. Implement P and V operations on the semaphores using the system calls of UNIX and use them implement mutual exclusion.
4. Write a program to implement echo server using pipes.
5. Write a program to implement readers-writers problem using semaphores.
6. Write a program which normally keeps idle wakeup every I minute and reminds your appointments. The appointments are written in a file. Implement the above using alarm signal.
7. Write a program to create two processes. The parent process takes a word as input from the user and sends it to the child process. The child process counts the number of letters in the word and returns it to the parent process which displays the number on the screen. Implement the above using pipes.
8. Write a program to create two processes. The parent process takes a word as input from the user and sends it to the child process. The child process counts the number of letters in the word and returns it to the child process which displays the number on the screen. Implement the above using message queues.
9. Write a program to create two processes. The parent process takes a word as
input from the user and sends it to the child process. the child process looks up
for the word in a text file of words and returns yes or no message to the parent
process. Implement the above using pipes.
10. Write a program to create a child process. The parent process takes a word as
input from the user and sends it to the child process. The child process look up for
the word in a text file of words and returns yes or no message to the parent
process. implement the above using Message queues.
11.(a) Write a C program to list to display the command line arguments and the environment variables.
(b) Write a shell script rename all files whose names end with. c as. old
(For example example. c file should be renamed as example. old)
12. (a) Write a C program to redirect the standard output (file descriptor 2) to a file name " Examdata".
(b) Write a shell script rename all files whose names end with. c as. old
(For example example. c file should be renamed as example. old)
13. Write a program to create a child process. The parent process takes the name of a file and sends it to the child process and the child process finds the number of lines, words and the characters which it returns to the parent process. The parent process then display them on the screen. Use pipes for inter process communication.
14. Write a program to create a child process. The parent process takes the name of
a file and sends it to the child process and the child process finds the number of
lines, words and the characters which it returns to the parent process. The parent
process then display them on the screen. Use pipes for inter process
communication.
15. Write a program to create a child process. The parent process takes the name of
a file and sends it to the child process and the child process finds the number of
lines, words and the characters which it returns to the parent process. The parent
process then display them on the screen. Use message queues for inter-process
communication.
16.(a) Write a C program to redirect the standard output (file descriptor 2) to a file name " Examdata".
(b) Write a shell script to display the number of lines in each of the text file in given directory.
17. (a) Write a C program to list to display the command line arguments and the environment variables.
(b) Write a shell script to display the number of lines in each of the text file in given directory.
18. Write a program to create a child process. The parent process takes a shell
command (For example 'is') from the user and sends it to the child process the
child process executes the command and send the result to the parent process
which then displays the result on the screen. Use pipes as the inter-process
communication.
19. Write a program to create a child process. The parent process takes a shell
command (For example 'is') from the user and sends it to the child process the
child process executes the command and send the result to the parent process
which then displays the result on the screen. Use message queues as the queues
as inter communication.
20. Write a program to implement readers and writers problem using message
passing.
21. Write a program to implement echo server using message passing.
22. Write a program to implement dining philosophizers problem using semaphores.
23. Write a program to create a child process. The parent process reads the name of
the file from the user and sends it to the child process. The child process then
finds the type of the file sends it to the parent. The parent then displays it on the
screen. Use pipes as inter-process communication.
24. Write a program to create a child process. The parent process reads the name of
the file from the user and sends it to the child process. The child process then
finds the type of the file sends it to the parent. The parent then displays it on the
screen. Use Message queues as inter-process communication.
25. Write a program to create a child process. The parent process reads the name of
the user and the password from the user and sends it to the child process. The
child process then checks with password file it maintains and returns success or
failure accordingly to the parent process. The parent process reports it to the
user. Implement the above using pipes as inter-process communication.
26. Write a program to create a child process. The parent process reads the name of
the user and the password from the user and sends it to the child process. The
child process then checks with password file it maintains and returns success or
failure accordingly to the parent process. The parent process reports it to the
user. Implement the above using message queues as inter-process
communication.
27. Write a program to create a child process. The parent process reads the name of
the user and the password from the user and sends it to the child process. The
child process then checks with password file it maintains and returns success or
failure accordingly to the parent process. The parent process reports it to the
user. Implement the above using message queues as inter-process
communication.
28. Write a program to create a child process. The parent process reads the name of
the user from the user and sends it to the child process. The child process then
checks for the user name in a file it maintains and if the user name is found in
the file it send the current system time to the parent process. The parent process
then displays it on the screen. Implement the above using message queues as
inter-process communication.
29. Write a program to create a child process. The parent process reads the name of
the user from the user and sends it to the child process. The child process then
checks for the user name in a file it maintains and if the user name is found in
the file it send the current system time to the parent process. The parent process
then displays it on the screen. Implement the above using
message queues as inter-process communication.
30. Write a program to create a child process. The parent process reads the name of
the user from the user and sends it to the child process. The child process then
checks for the user name in a file it maintains and if the user name is found in
the file it sends 'ok' message to the parent process. The parent process then
prompts from the user and sends it to the child which stores the password along
with the password in another file. Implement the above using pipes as inter-
process communication.
*****

No comments:
Post a Comment