Skip to main content

Posts

Update Ubuntu Linux and Linux Mint with out Terminal

Update Ubuntu Linux and Linux Mint with out Terminal step1: go your Linux operating system menu and open software update step2: check your software update available or not. if available then press enter and put your password . after putting password press enter and the system will start automatically update

Update Ubuntu Linux , Linux Mint with help of Terminal

Update Ubuntu Linux , Linux Mint with help of Terminal updating system is very good. you have to update our system every  once week . this is very easy you have to follow few steps. Step1: open a terminal (ctrl + alt + t) step2: write on terminal sudo apt-get update and press enter   step3: enter your password and press enter then automatically update your linux operating system if any update available  

Write a program to implement the SJF scheduling algorithm (Assignment-6)

Q3) 3. Write a program to implement the SJF scheduling algorithm. Test case: Input No of processes: 4 Burst time: 4 9 8 3 Code: #include<stdio.h> void main() { int bt[20],p[20],wt[20],tat[20],i,j,n,total=0,pos,temp; float avg_wt,avg_tat; printf("Enter number of process:"); scanf("%d",&n); printf("\nEnter Burst Time:\n"); for(i=0;i<n;i++) { printf("p%d:",i+1); scanf("%d",&bt[i]); p[i]=i+1; } for(i=0;i<n;i++) { pos=i; for(j=i+1;j<n;j++) { if(bt[j]<bt[pos]) pos=j; } temp=bt[i]; bt[i]=bt[pos]; bt[pos]=temp; temp=p[i]; p[i]=p[pos]; p[pos]=temp; } wt[0]=0; for(i=1;i<n;i++) { wt[i]=0; for(j=0;j<i;j++) wt[i]+=bt[j]; total+=wt[i]; } avg_wt=(float)total/n; total=0; printf("\nProcess\t Burst Time \tWaiting Time\tTurnaround Time"); for(i=0;i<n;i++) { tat[i]=bt[i]+wt[i]; tot