C program for LRU page replacement algorithm
by Ranjith | September 19th, 2009.OUTPUT :
2 -1 -1
2 3 -1
2 3 -1
2 3 1
2 5 1
2 5 1
2 5 4
2 5 4
3 5 4
3 5 2
3 5 2
3 5 2
no of page faults : 4

OUTPUT :
2 -1 -1
2 3 -1
2 3 -1
2 3 1
2 5 1
2 5 1
2 5 4
2 5 4
3 5 4
3 5 2
3 5 2
3 5 2
no of page faults : 4
OUTPUT :
2 -1 -1
2 3 -1
2 3 -1
2 3 1
5 3 1
5 2 1
5 2 4
5 2 4
3 2 4
3 2 4
3 5 4
3 5 2
Number of page faults : 6
OUTPUT:
enter no of processes: 5
enter process1 name: aaa
enter process time: 4
enter process2 name: bbb
enter process time: 3
enter process3 name: ccc
enter process time: 2
enter process4 name: ddd
enter process time: 5
enter process5 name: eee
enter process time: 1
INPUT: enter total no. of processes : 4 enter claim matrix : 0 1 0 0 1 0 0 1 0 1 0 0 0 0 1 1 0 1 0 1 enter allocation matrix : 1 0 1 1 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 [...]
INPUT:
enter frame :
1 1 1 1 1 1 1 1
enter generator :
1 1 0 1
OUTPUT:
frame received correctly
INPUT:
enter string:
asdlefgh
enter position: 8
invalid position,enter again: 3
enter the character: k
OUTPUT:
frame after stuffing:
dlestx as dle k dle dle dlefgh dleetx
Enter frame length: 10
Enter input frame (0′s & 1′s only):
1 0 1 0 1 1 1 1 1 1
After stuffing the frame is:
1 0 1 0 1 1 1 1 1 0 1
Let us start from the beginning. Here discusses a model program for calculating the circumference and the area of the circle, where the radius is specified by the user. Logic: As we know, Circumference is ‘Pi’ times diameter of the circle and Area is ‘Pi’ times the radius squared. Implementing the same is the main [...]
This project is an attempted step towards resolving the manual problems in controlling Induction Furnace and provides control for it, using Artificial Intelligence at a very small scale. The project deals with a simple aspect of giving information about the Induction Furnace and their control. Initially it provided a system release manual power as much [...]