Category: operating system

operating system program in java

dining philosophers problem in java

dining philosophers problem in java

Dining Philosophers Problem: Consider five philosophers who spend time in thinking and eating.the philosophers share a common circular table surrounded by five chairs,each belonging to one philosopher.In the center of the table is a...

next fit program in java

next fit program in java

import java.io.*; class NFit { public static void main(String args[]) throws IOException { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); int nh,np; System.out.println(“Enter the number of Holes:”); nh=Integer.parseInt(br.readLine()); System.out.println(“Enter the number of Processes:”); np=Integer.parseInt(br.readLine()); int P[]=new int[np];...

Least Recently Used page replacement algorithm (LRU) program in java

Least Recently Used page replacement algorithm (LRU) program in java

In Least Recently Used page replacement algorithm (LRU) we use the recent past as an approximation of the near future,then we will replace the pagethat has not been used for the longest period of...

First In First Out page replacement algorithm (FIFO) program in java

First In First Out page replacement algorithm (FIFO) program in java

The Simplest page replacement algorithm is First In First Out (FIFO) .A First In First Out replacement algorithm (FIFO) associated with each page the time when that page was brought into memory.When a page...