#os-programs
- Write a program to implement Disk Scheduling algorithms like FCFS, SCAN and C- SCAN. Answer: FCFS serves requests in the given order; SCAN sorts the requests, moves the head towards one end serving requests, touches the last... 2
- Write a program to implement various page replacement policies Answer: FIFO replaces the page that came in first, LRU replaces the page not used for the longest time, and Optimal replaces the page that w... 2
- Write a program to implement dynamic partitioning placement algorithms i.e Best Fit, First – Fit and Worst –Fit. Answer: In dynamic partitioning, a process is placed in a free hole that is large enough: First Fit takes the first such hole, Best Fit the... 2
- Write a program to demonstrate the concept of deadlock avoidance through Banker’s Algorithm #include<stdio.h> int main() int n, m, i, j, k; n = 5; m = 3; int alloc[ 5 ] [ 3 ] = 0, 1, 0, 2, 0, 0, 3, 0, 2, 2, 1, 1, 0, 0, 2; int max[ 5... 1
- Program to simulate producer and consumer problem using semaphores Answer: Use a bounded buffer with three synchronisation objects: semaphore empty (initial value = buffer size), semaphore full (initial valu... 2
- Write a program to implement CPU Scheduling algorithms like FCFS & SJF Answer: For each process, Completion Time (CT) is found by simulation; then Turnaround Time TAT = CT − AT and Waiting Time WT = TAT − BT. FC... 2