Conso Penjadwalan CPU

CONTOH SOAL

eetth sebelumnya mungkin bisa untuk melihat univ bisa KLIK

langsung aja!
Berikut Soal Penjadwalan CPU Dengan Menggunakan 6 Metode yang berbeda

Proses
Burst Time
Waktu Kedatangan
Priority
Quantum Time
P1
6
0
3
4
P2
4
1
4
P3
3
3
1
P4
8
6
2


1.   FCFS (First-come, first-served )
                :Yang duluan datang, yang pertama di proses.

                Gant Chart
0__________p1____________6_______p2_______10_______p3____13________p4______________21
     WT (Waiting Time)
P1 = 0
P2 = 6-1 =5
P3 = 10-3=7
P4 = 13-6=7
                AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (0 + 5 + 7 + 7) / 4
=19 / 4
= 4.75
     TAT (Turn Around Time)
P1 = 6-0 = 6
P2 = 10-1= 9
P3 = 13-3=10
P4 = 21-6= 15
     ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(6 + 9 + 10 + 15) / 4
=40/4
=10


2.   RR (Round Robin )
                :hamper sama dengan  FCFS(First Come, Firs Served) tetapi pada RR(Round Robin) ini di batasi per QT (Quantum Time).


                Gant Chart
0___P1_______4____P2______8_____P3_____11______P4_____15___p1___17__p4___21
WT (Waiting Time)
P1 = 0
P2 = 4-1=3
P3 = 8-3=5
P4 = (11-6) + (17-15)=5+2=7
           AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (0 + 3 + 5 + 7) / 4
= 15/ 4
= 3.75
TAT (Turn Around Time)
P1 = 17-0=17
P2 = 8-1=7
P3 = 11-3=8
P4 = 21-6=15
ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(17 + 7 + 8 + 15) / 4
=47/4
=11.75


3. SJF NP (Shortest Job First Non-preemptive)

          : Yang burst time nya sedikit yang dahulu di eksekusi dan jika sudah di proses tidak boleh di hentikan oleh proses lain sebelum proses yang berjalan selesai.


               
           Gant Chart
0____p1_________6____p3______9________p2______13______p4___________________21
WT (Waiting Time)
P1 = 0
P2 = 9-1=8
P3 = 6-3=3
P4 = 7
           AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (0 + 8 + 3 + 7) / 4
= 18/ 4
= 4.5
TAT (Turn Around Time)
P1 = 6-0=6
P2 = 13-1=12
P3 = 9-3=6
P4 = 21-6=15
ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(6 + 12 + 6 + 15) / 4
=39/4

=9.75


4. SJF P (Shortest Job First Preemptive)

          : Yang burst time nya sedikit yang dahulu di eksekusi dan jika sudah di proses boleh di hentikan oleh proses lain yang masuk.


               
                Gant Chart
0___p1___1_______p2______5___p3________8_____p1_____13______p4_________21
WT (Waiting Time)
P1 = 8-1=7
P2 = 0
P3 = 5-3=2
P4 = 7
           AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (7 + 0 + 2 + 7) / 4
= 16/ 4
= 4
TAT (Turn Around Time)
P1 =13-0=13
P2 = 5-1=4
P3 = 8-3=5
P4 = 21-6=15
ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(13 + 4 + 5 + 15) / 4
=37/4
=9.25


5. PNP (Priority Non Preemtive)

          : Yang priority nya sedikit yang dahulu di eksekusi dan jika sudah di proses tidak boleh di hentikan oleh proses lain yang masuk sampai prosesnya yang berjalan selesai.


               
                Gant Chart
0____p1______6_____p3_____9_____________p4_____________17________p2________21
WT (Waiting Time)
P1 = 0
P2 = 17-1=16
P3 = 6-3=3
P4 = 9-6=3
           AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (0 + 16 + 3 + 3) / 4
= 22/ 4
= 5.5
TAT (Turn Around Time)
P1 = 6-0=6
P2 = 21-1=20
P3 = 9-3=6
P4 = 17-6=11
ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(6 + 20 + 6 + 11) / 4
=43/4
=10.75


6. PP (Priority Preemtive)

          : Yang priority nya sedikit yang dahulu di eksekusi dan jika sudah di proses  boleh di hentikan oleh proses lain.

               
                Gant Chart
0____p1_____3______p3_____6__________p4____________14______p1____17_____p2_____21
WT (Waiting Time)
P1 = 14-3=11
P2 = 17-1=16
P3 = 0
P4 = 0
           AWT (Average Waiting Time)
=(P1 + p2 + p3 + p4) / 4
= (11 + 16 + 0 + 0) / 4
= 27/ 4
= 6.75
TAT (Turn Around Time)
P1 = 17-0=17
P2 = 21-1=20
P3 = 6-3=3
P4 = 14-6=8
ATAT (Average Turn Around Time)
=(p1 + p2 + p3 + p4) / 4
=(17 + 20 + 3 + 8) / 4
=48/4
=12


Jangan lupa untuk di cek lagi yaa :)


Posting Komentar

0 Komentar