C Program to show an example of Shortest Job First Scheduling # include <stdio.h> void main ( ) { int n , i , j , k , pos [ 30 ] , temp1 , temp2 , a [ 30 ] , e [ 30 ] , t [ 30 ] , w [ 30 ] ; float m , p = 0 ; printf ( "Enter the number of process:" ) ; scanf ( "%d" , & n ) ; printf ( "Enter the execution time:" ) ; for ( i = 0 ; i < n ; i ++ ) { scanf ( "%d" , & a [ i ] ) ; pos [ i ] = i ; } for ( i = 0 ; i < n ; i ++ ) for ( j = 0 ; j < n ; j ++ ) if ( a [ i ] < a [ j ] ) { temp2 = a [ i ] ; a [ i ] = a [ j ] ; a [ j ] = temp2 ; temp1 = pos [ i ] ; pos [ i ] = pos [ j ] ; pos [ j ] = temp1 ; } for ( i = 0 ; i < n ; i ++ ) { e [ i ] = a [ i ] ; }...
Get the latest unboxing and tech news at you fingertips. Collect Software and other precious data overtime