List of Experiments and Last 2 Programs
List of Experiments and Last 2 Programs
import java.util.Arrays;
this.distanceMatrix = distanceMatrix;
Arrays.fill(this.nextHop, -1);
boolean updated;
do {
updated = false;
nextHop[i] = j;
updated = true;
}
}
} while (updated);
System.out.println("Destination\tNext Hop\tDistance");
System.out.println();
int[][] distanceMatrix = {
{0, 1, 3, Integer.MAX_VALUE},
{Integer.MAX_VALUE, 2, 4, 0}
};
routingProtocol.printRoutingTable();
1 1 1
2 1 3
3 1 3
0 0 1
3 3 2
0 0 3
3 3 4
1 1 2
2 2 4
. Using JAVA RMI Write a program to implement Basic Calculator
// Java program for simple calculator
import java.io.*;
import java.lang.*;
import java.lang.Math;
import java.util.Scanner;
// Driver class
public class BasicCalculator {
// main function
public static void main(String[] args)
{
// Stores two numbers
double num1, num2;
char op = sc.next().charAt(0);
double o = 0;
switch (op) {
// case to add two numbers
case '+':
o = num1 + num2;
break;
List of Experiments:
Operating Systems Programs
1. Practicing of Basic UNIX Commands.
2. Write programs using the following UNIX operating system calls Fork, exec, getpid, exit, wait,
close, stat, opendir and readdir
3. Simulate UNIX commands like cp, ls, grep, etc.
4. Simulate the following CPU scheduling algorithms a) Round Robin b) SJF c) FCFS d) Priority
5. Simulate the following CPU scheduling algorithms a)FCFS b) Priority
6. Simulate dining philosopher’s problem.
7. Simulate producer-consumer problem using threads.
8.. Implement the following memory allocation methods for fixed partition a) First fit b) Worst fit
c) Best fit
9. Simulate the following page replacement algorithms a) FIFO b) LRU c) LFU etc.,
10. Simulate Paging Technique of memory management
11. Simulate Bankers Algorithm for Dead Lock avoidance and prevention