C program to find the Shortest path for a given graph

Sunday, September 20th, 2009  »  Posted By Ranjith  »  Total 2 Comments

OUTPUT:
enter the cost matrix :
0 1 4 2 0
0 0 0 2 3
0 0 0 3 0
0 0 0 0 5
0 0 0 0 0
enter number of paths : 4
enter possible paths :
1 2 4 5 0
1 2 5 0 0
1 4 5 0 0
1 3 4 5 0
minimum cost : 4
minimum cost path :
1–>2–>5

C program for SJF CPU Scheduling Algorithm

Sunday, September 20th, 2009  »  Posted By Ranjith  »  Total 57 Comments

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

C program for Round Robin CPU Scheduling Algorithm

Sunday, September 20th, 2009  »  Posted By Ranjith  »  Total 30 Comments

INPUT : enter the process name : aaa enter the processing time : 4 enter the process name : bbb enter the processing time : 3 enter the process name : ccc enter the processing time : 2 enter the process name : ddd enter the processing time : 5 enter the process name : [...]

C program for finding remainder

Sunday, September 20th, 2009  »  Posted By Ranjith  »  Total 0 Comment

OUTPUT:
enter frame:
1 0 1 1 0 1 0 0
enter generator:
1 0 1 0
remainder is:
0 0 1 0

C Program for Priority CPU Scheduling Algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 18 Comments

OUTPUT: enter no of processes: 5 enter process1 name: aaa enter process time: 4 enter priority:5 enter process2 name: bbb enter process time: 3 enter priority:4 enter process3 name: ccc enter process time: 2 enter priority:3 enter process4 name: ddd enter process time: 5 enter priority:2 enter process5 name: eee enter process time: 1 enter [...]

C Program for Optimal Page Replacement Algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 11 Comments

OUTPUT :
2 -1 -1
2 3 -1
2 3 -1
2 3 1
2 3 5
2 3 5
4 3 5
4 3 5
4 3 5
2 3 5
2 3 5
2 3 5

no of page faults : 3

C program for LRU page replacement algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 8 Comments

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

Program for FIFO page replacement algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 17 Comments

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

C Program for FCFS CPU scheduling algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 51 Comments

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

Program for Deadlock detection algorithm

Saturday, September 19th, 2009  »  Posted By Ranjith  »  Total 17 Comments

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 [...]

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup