28 Program for Disk Scheduling Algorithm (CLOOK, SSTF, SCAN) in C

Program: #include <stdio.h> #include<stdlib.h> // Function to Sort Array void sort(int arr[],int n){ for(...
Read More

26 Program for Inter-Process Communication using shared memory

Basic Working of Shared Memory: The sender sends the data and the receiver receives the data, by applying the following steps: Sender: 1) Cr...
Read More

27 Program for Inter-Process Communication using message passing mkfifo

Working of Message Passing: The Sender Process: can use write() system call to write data into the pipe. The Receiver Process: can use read(...
Read More

25 Program for Optimal Page Replacement Algorithm

Program: #include<stdio.h> #include<limits.h> // This function is just use to check if the frame is containg ...
Read More

23 Program for First in First Out (FIFO) Page Replacement Algorithm

Program: #include<stdio.h> #include<limits.h> // This function is just use to check if the frame is containg ...
Read More

24 Program for Least Recently Used (LRU) Page Replacement Algorithm

Program: #include<stdio.h> #include<limits.h> // This function is just use to check if the frame is containg ...
Read More

22 Program for Resource Allocation Algorithm in OS

Program: // Banker's Algorithm // Resource Allocation Algorithm /* 5 3 1 1 2 2 1 2 4 0 1 0 2 0 1 1 2 4 3 3 3 2 2 9 0 ...
Read More

21 Program for Banker's Algorithm in Operating System

Program: #include <iostream> using namespace std; int n, m; void display(int mat[5][3]) { for (int i = 0; i <...
Read More

20 Reader Writer Program in C

Program: #include<stdlib.h> #include<stdio.h> #include<pthread.h> #include<semaphore.h> #define MA...
Read More

19 Producer Consumer Program in C

Producer Produces the Data and Consumer Consume the data. Conditions: 1) If the Buffer is Full, then the Producer should not generate data. ...
Read More

18 Use of Pthread Mutex in C

Program With Mutex: #include<pthread.h> #include<stdio.h> #include<stdlib.h> // binary semaphore pthrea...
Read More