Operating System subject lab tasks sem 5.
- Implementation of “cat” and “cp” command in C. (use of open, read, write, and close system calls)
- Implementation of “pwd” and “ls” command in C. (use of getcwd, opendir, readdir, closedir)
- Process Creation and Termination (Use of fork, wait, getpid, and getppid system calls).
- Call fork once, twice, thrice and print “Hello”. Observe and interpret the outcomes.
- Print PID and PPID for parent and child processes. Observe and interpret the outcomes.
- Write a program to print process id and process name of all the current processes in the system.
- Extend the above program to read and display other fields from the stat file.
- Thread creation and Termination. Synchronization using mutex lock and unlock. (Use of pthread_create, ptread_join, pthread_mutex_lock and pthread_mutex_unlock library functions of Pthread library).
- Write a program to create a thread using pthread_create.
- Write a program to pass a character string to the threaded function.
- Write a program to implement a simple calculator using threads.
- Write a program to multiply two matrices.
- Inter process communication ( Use of pipe system call and mkfifo )
- Write a program to create a pipe and print the values of pipe file descriptors.
- Write a program to pass a message from parent process to child process through a pipe.
- Write a program to pass file name from parent process to child process through a pipe, child process should pass the file contents to parent process and parent should print the contents
- Demonstrate the use of named pipe with appropriate programs and commands.
- Write a program to implement ls | sort functionality using the system calls and functions covered in the lab.
- Write a program to achieve following:
- Child process should open a file with the contents to be sorted, pass the contents to the parent process.
- Parent process should sort the contents of the file and display.
- Execv function demo program
- Implement the linux shell in C.
- Write a program to implement a solution of bounded buffer producer consumer problem using semaphores.
- Reader Writers problem ( Readers have priority).
- Reader Writers problem ( Writers have priority ).
- Sleeping Barber Problem
- Dining Philosopher Problem
- Banker's Algorithm