ok 12 perform 1

Upload: ariefdp

Post on 31-Oct-2015

41 views

Category:

Documents


0 download

DESCRIPTION

organisasi komputer_ performance

TRANSCRIPT

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*PERFORMANCE/ UNJUK KERJAWISNU HENDRO MARTONO,M.Sc

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*AMDHAL LAW

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN* Introduction Perhatikan pd Pesawat Penumpang sbb: Pesawat mana yang memberikan Performance terbaik? Computer performance/ Unjuk Kerja Komputer: hubungannya terhadap waktu Berapa cepat komputer meng-eksekusi program anda Berapa banyak pekerjaan anda dpt terselesaikan pd hari ini,_ Bagaimana pekerjaan anda diperoleh hari ini Berapa lama akan diperoleh balasannya

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*DIFINISI Menetapkan Unjuk Kerja sangat sukar. Adanya satu bilangan yg menyebarkan nilai performance Banyaknya nilai pd literatur penjualan yg tak berarti The best workstation (individual computer) adalah salah satu program tercepat i.e. salah satunya memberi best response (execution, elapsed, wallclock) time The bestmulti-user computer paling lengkap menye- lesaikan pekerjaan dg waktu tertentu Yg di inginkan, tanpa Load workstations dan diperoleh:

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CONTOH Computer A gunakan 10 s menyelesaikan program P Computer B gunakan 15 s menyelesaikan program P Berapa nilai performance masing2? performanceA=1/10 or 0.1 performanceB=1/15 or 0.067 (perkiraan) Dapat membandingkan ukuran utk komputer yg berbeda jika diperoleh:

    Seberapa cepat A dibanding B? A is (1/10)/(1/15) = 15/10 = 1.5 times faster than B

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CPU TIME/ WAKTU CPU Apa yg dimaksud dg response time dari multi-programmed computer? multi-programmed = executes > 1 one program at a time Dapat dibedakan: wall-clock (or elapsed) time: total waktu yg diperlukan utk menyelesaikan program CPU time: waktu CPU yang digunakan menyelesaikan program. tidak termasuk waktu I/O , tidak termasuk waktu digunakan pd program lain

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*SYSTEM vs USER TIME CPU time dibagi menjadi: system time: CPU time yg digunakan OS utk menyelesaikan tugas program user time: CPU time yg digunakan oleh program Apportioning system time to different users may be difficult Penggunaan textbook system performance to mean 1/(wall-clock time) CPU performance to mean 1/(user time)

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*MEASURING TIME % time ./a.out90.7u 12.9s 2:39 65%% 90.7 seconds of user time 12.9 seconds of system time 103.6s of CPU time 2:39 = 159 seconds of elapsed time 103.6/159 = 0.65 = 65% 35% of the time must have gone to I/O or other programs

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN* CLOCK SYSTEM Setiap instruksi mengambil sejumlah siklus clock/ clock cycles (atau clocks, ticks) Kecepatan Clock dapat diukur dengan: Dg panjang siklus/ cycle length (or period), e.g. 10ns, atau Dg kecepatan / clock speed (or frequency, rate) e.g.

    Untuk meningkatkan kecepatan eksekusi program, dapat dilakukan dg: Menggunakan sedikit instruksi Menggunakan sedikit siklus per instruksi Menggunakan clock yg cepat

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*TINJAUAN PERFORMANCE LAINNYA Pandangan perancang perangkat keras terhadap unjuk kerja sbb:

    (P = program yg dieksekusi) Ada dua cara utk meningkatkan unjuk kerja komputer : meningkatkan kecepatan clock mengurangi jumlah siklus clock pd progam P tradeoff!

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CONTOH Komputer A mengeksekusi program P dg 10 second dan dg clock 400 MHz Komputer B menggunakan 1.2 kali banyaknya clock utk meng eksekusi P Jika kita ingin B utk meng eksekusi P pada 6 second, Berapa besar kecepatan clock diperlukan B A butuh 10 400 106 cycles to execute P B akan perlu 1.2 10 400 106 cycles Sekarang hitung kecepatan clock B : 6 x = 1.2 10 400 106 x = 800 106Hz = 800MHz

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CLOCK CYCLE per INSTRUCTION (CPI) Perancang Prosesor sering bekerja pd CPI Clock cycles Per Instruction CPI hubungannya dg waktu CPU (atau execution, atau user) sbb:

    CPI berguna utk membandingkan kemungkinan: Penerapan instruksi yg sama menghasilkan kode berurutan dengan kompilator berbeda

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CONTOH CPI A dan B diterapkan dengan cara berbeda pada set instruksi yg sama A dg 10 ns clock dan (rata-rata) CPI = 2 utk P B dg 20 ns clock dan CPI = 1.2 utk P Yang mana yg lebih cepat dan berapa banyak? Jika N adalah jumah instrusi pada P A perlu 2N clock utk meng eksekusi P, B perlu 1.2N A gunakan 2N 10 ns = 20N ns utk eksekusi P B gunakan 1.2N 20 ns = 24N ns utk eksekusi P Jadi A = (1/20N) / (1/24N) = 24/20 = 1.2 kali lebih cepat

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*Contoh CPI lainnya Andaikan perancang kompilator ingin membandingkan dua kode secara berurutan: urutan 1: 2 class A instructions; 1 B; 2 C urutan 2: 4 class A instructions; 1 B; 1 C Andaikan CPI utk klasifikasi tersebut diketahui ( dan konstan)

    Berapa banyak siklus clock diperlukan utk setiap urutan ? Berapa nilai rata rata CPI? Clock cycles1 = 2 + 2 + 6 = 10 clock, dan CPI1 = 10/5 = 2 Clock cycles2 = 4 + 2 + 3 = 9 clock, dan CPI2 = 9/6 = 1.5

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*BAGAIMANA MENGUKUR CPI P: METHODE 1 Untuk mengukur CPI P secara tepat buat daftar instruksi yg akan dieksekusi untuk setiap instruksi, catat nilai CPI jumlahkan nilai CPI Cocok utk potongan program kecil Tetapi tidak seluruh instruksi mempunyai nilai tetap CPI load dan store tergantung pd kecepatan memori instruksi dpt mempengaruhi I/O tergantung pada kecepatan device I/O instruksi pada prosesor pipeline tergantung pada instruksi tertentu

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*BAGAIMANA MENGUKUR CPI P: METHODE 2 Untuk memperkirakan CPI P gunakan ulang persamaan (4)

    ukur waktu CPU contoh; penggunaan waktu gunakan bantuan bentuk alat hitung instruksi atau gunakan simulator/ hardware monitor cari tahu kecepatan clock dari literatur pabrik

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*SATUAN UKUR UNJUK KERJA/PERFORMANCE Beberapa difinisi Unjuk Kerja/ performance digunakan pada saat lalu: MIPS (million instructions per second) MOPS (million operations per second) MFLOPS (million floating point operations per second) banyak benchmarks Hal yg dianggap benar utk membandingkan komputer dalam beberapa cara/ scenarios karena: sering digunakan dalam membandingkan hal yg tidak cocok/ invalid sering menyebabkan salah persepsi

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*MIPS

    Contoh: Computer X is a 100 MIPS machine, computer Y is 90 MIPS Comment X may have better performance but a MIPS measurement doesnt say which instructions what if Xs instructions are less powerful than Ys?

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*CONTOH MIPS Andaikan dipunyai dua mesin:A dan B, keduanya bekerja pada 100 MHz clock Machine A meng eksekusi program dg 5 million 1-CPI, 1 million 2-CPI and 1 million 3-CPI instructions Machine B meng-eksekusi program dg 10 million 1-CPI, 1 million 2-CPI and 1 million 3-CPI instructions Utk setiap dua machines, ingin dihitung Unjuk kerja ditentukan oleh response time Unjuk kerja ditentukan dlm satuan MIPS

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*Contoh MIPS (lanjutan) Response time and MIPS performance: Apa yg diperoleh dr tabel tsb? Mesin mana yg lebih baik? Pabrik terkadang mengiklankan nilai MIPS yg tinggi i.e. hasil ukur MIPS thd program yg mereka pilih sendiri

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*PERSOALAN MIPS Persoalan MIPS sebagai pengukur unjuk kerja: MIPS menentukan rata2 instruksi yg di eksekusi tetapi tidak melihat kemampuannya terhadap instruksi yg berbeda MIPS bervariasi nilainya thd program pada komputer yg sama, begitu pula mesin tidak pernah mempunyai satu nilai MIPS yang sama untuk seluruh program MIPS dapat bervariasi secara bergantian nilainya dg nilai unjuk kerja sesungguhnya

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*NILAI YG MENDEKATI MIPS Beberapa pabrik menggunakan nilai relative MIPS

    R adalah sebagai komputer referensi, yg sering digunakan adalah VAX-11/780 X = komputer yg akan diukur Proram P yg sama yg akan dieksekusi pd R dan X

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*MOPS and MFLOPSMOPS = Million OPerations per Second

    MFLOPS = Million FLoating point OPerations per Second

    Penggunaan operation/flop pada addition, subtraction, multiplication atau divisionDigunakan pada aplikasi scientific dan engineering

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*BENCHMARKS Program Benchmark adalah sejenis program tertentu dipilih untuk mengukur unjuk kerja Berupa program sungguhan Berupa program benchmark sintesa mudah untuk di aplikasikan mudah untuk di kendalikan campuran instruksinya Berupa kernel benchmarks Program sintetik benchmark benar-benar sungguhan Kecil, time-intensive sections of code dari program nyata sections berupa gabungan kedalam satu program kecil e.g. Linpack: kumpulan subroutine untuk pemecahan masalah aljabar linier

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*BENCHMARKSBenchmark adalah waktu untuk meng-eksekusi program benchmark Pengguna mencari sembarang benchmark programmer lebih suka pada compiler benchmark engineers lebih suka pada banyaknya crunching benchmarks publishers lebih suka pada kumpulan benchmark yg dihasilkan Beberapa perusahaan memperkenalkan komplator dengan bentuk tertentu optimisations tujuan akhir utk dapatkan program benchmark tertentu. Kompilator macam ini dapat menyebabkan kejelekan, atau sering tidak cocok, pada kode program aplikasi sesungguhnya!

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*GABUNGAN UNJUK KERJA Bagaimana membandingkan dua komputer yang diuji menolak beberapa benchmark ?

    A = 10 kali lebih cepat dibanding B, terhadap program 1 B = 10 kali lebih cepat dibanding A, terhadap program 2 Bagaimana menyimpulkan kedua hasil tersebut?

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*ARITHMATIC MEAN (AM) RESPONSE TIME Salah satu methode unjuk kerja menggunakan:

    Arithmetic mean (AM) response time contoh A executes P1 in 5s A executes P2 in 0.3 s A executes P3 in 1 s AM response time = 1/3 (5 + 0.3 + 1) = 2.1 s Asumsi ini pengguna A akan mengeksekusi P1 sesering pada P2 and P3.

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*WEIGHTED AM RESPONSE TIME Jika beberapa program dieksekusi lebih sering maka harus digunakan:

    Weighted AM response time

    dimana wi = faktor weighting Example: A me-eksekusi P1 2,000 kali, P2 6,000 kali dan P3 2,000 kali Berapa besar weighted AM response time? 20% 5 + 60% 0.3 + 20% 1 = 0.68 s

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*TRUE PERFORMANCE True performance hanya mengukur response time yang diberikan oleh P

    Sebagai perhatian dan evaluasi bagi perancang: Perancangan Set instruksi: mengurangi banyaknya instruksi pada program system pipelining dan memory: mengurangi CPI memperbaharui teknologi and organisasi: mengurangi perioda clock Tetapi hanya response time yg sesungguhnya yg menunjukan nilai akhir unjuk kerja/ final performance

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN

  • *ORGANISASI KOMPUTER by TIM DOSEN STT PLN*UNTUK LEBIH MEMAHAMI, ULANG MATERI INI DENGAN CARA MENGGUNAKAN SOAL YANG ADA PADA BUKU REFERENSI. TERIMA KASIH

    ORGANISASI KOMPUTER by TIM DOSEN STT PLN