Welcome to our comprehensive guide for mastering the experiments in the Operating Systems Laboratory (CSE325). In this blog, we will provide you with detailed solutions and valuable insights for each experiment, allowing you to understand and implement various concepts related to operating systems. By the end of this blog, you will be equipped with the knowledge and skills necessary to excel in the lab and achieve the course outcomes.
Experiment 1: Introduction to Linux Commands
Que1: Write a program using directory system calls make a directory on desktop and create a file inside the directory and list the contents of the directory.
Experiment 2: Shell Programming
Your_text_is_here.
Experiment 3: File Manipulation Using System Calls
Your_text_is_here.
Experiment 4: Directory Manipulation Using System Calls
Que1: Write a program using directory system calls make a directory on desktop and create a file inside the directory and list the contents of the directory.
Que2: Write a program using directory and file manipulation system calls to copy the contents of one directory in a newly created directory.
Experiment 5: Process Management Using System Calls
Que1:Write a program using system calls for operation on process to simulate that n fork calls create (2n – 1) child processes.
Que2:Write a program using systems for operations on processes to create a hierarchy of processes P1 → P2 → P3. Also print the id and parent id for each process.
Que3:Write a program using system calls for operation on processes to create a hierarchy of processes as given in figure 1. Also, simulate process p4 as orphan and P5 as zombie.
Que4:Write a program using system calls for operation on processes to create a hierarchy of processes 2. Also, simulate P4 as an orphan process and P7 as a zombie.
Experiment 6: Creation of Multithreaded Processes using Pthread Library
Que1:Write a program using pthread to concatenate the strings, where multiple strings are passed to thread function.
Que2:Write a program using pthread to find the length of string, where strings are passed to thread function.
Que3:Write a program that performs statistical operations of calculating the average, maximum and minimum for a set of numbers. Create three threads where each performs their respective operations.
Que4:Write a multithreaded program where an array of integers is passed globally and is divided into two smaller lists and given as input to two threads. The thread will sort their half of the list and will pass the sorted list to a third thread which merges and sorts the list. The final sorted list is printed by the parent thread.
Experiment 7: Process Syncroniztion using Semaphores/Mutex
Your_text_is_here.
Experiment 8: Inter Process Communication Using Pipes/Shared Memory/RCP
Your_text_is_here.