# operating system

May 8th, 2015
Studypool Tutor
Price: \$10 USD

Tutor description

1. AIM: To write a C program to simulate the shortest job first algorithm with preemption. DESCRIPTION:For implementing SJF algorithm with preemption, we consider the arrival times of each process, the burst times of all the previously arrived processes

Word Count: 466
Showing Page: 1/3
operating system1. AIM: To write a C program to simulate the shortest job first algorithm with preemption. DESCRIPTION:For implementing SJF algorithm with preemption, we consider the arrival times of each process, the burst times of all the previously arrived processes. After the arrival of all the processes into the ready queue, the average waiting time and turn around time can be calculated by using the above algorithm.ALGORITHM:1) start2) read the no of processes to n3) initialize i to 04) if ia[j] thena) swap a[i] and a[j]b) swap at[i] and at[j]c) swap b[i] and b[j]8) from i=0 to n doa) w[i]=s-b[i]-at[i]b) s=s+a[i]c) avg=avg+w[i]9)tt=tt+avg10) tt=tt/n11) avg=avg/n12)write the turn around time and average waiting time13) stop2) AIM: To write a program on Shortest Job First algorithm with Non-Preemption Description:Initially, In the shortest job first algori

## Review from student

Studypool Student
" Goes above and beyond expectations ! "

1831 tutors are online

### Other Documents

05/08/2015
05/08/2015

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors