Transcript disini

Organisasi & Arsitektur Komputer
1
ORGANISASI DAN ARSITEKTUR
KOMPUTER
Wisnu Djatmiko
TM 2
Daftar Pustaka
2
1. Bab 1
Organisasi & Arsitektur Komputer
Wisnu Djatmiko
Daftar Pustaka
3
2. Bab 2
Organisasi & Arsitektur Komputer
Wisnu Djatmiko
TIK
4



Peserta MK Arsikom dapat menjelaskan definisi
CPU Time dengan 90% benar.
Peserta MK Arsikom dapat menjelaskan cara
mengurangi CPU Time dengan 90% benar.
Peserta MK Arsikom dapat menghitung CPU time
sebuah fungsi dengan 90% benar.
Organisasi & Arsitektur Komputer
Wisnu Djatmiko
Pokok Bahasan
5

CPU time
Organisasi & Arsitektur Komputer
Wisnu Djatmiko
Architectural Development & Styles
6


Desainer Komputer berusaha meningkatkan kinerja
komputer (mengurangi "kesenjangan semantik“
antara high level vs low level)
Adanya kerumitan untuk membuat sebuah mesin
harus diprogram untuk dapat mengkonversikan
data (lambang) menjadi kode-kode biner
A
(latin capital letter A) = 0041H (ASCII)
Organisasi & Arsitektur Komputer
Architectural Development & Styles
7


Banyaknya mode pengalamatan (>20 mesin VAX)
menambah kompleksitas instruksi
Misal mesin CISC
 Intel
PentiumTM
Organisasi & Arsitektur Komputer
Architectural Development & Styles
8

Perlu strategi untuk mempercepat kinerja mesin
 Misal
nya meningkatkan kecepatan clock
 Efek stunami : meningkatkan kompleksitas perhitungan
dalam satu siklus clock.

Hasil penelitian menunjukkan 80% instruksi dari
sebuah program berisi :
 assignment
statements (50%),
 conditional branching , dan
 procedure calls.
Organisasi & Arsitektur Komputer
Architectural Development & Styles
9


[Optimasi arsitektur] : mempercepat instruksi
yang sering digunakan dapat mengurangi
kompleksitas instruksi dan jumlah mode
pengalamatan.
Misal : mesin RISC (Reduced Instructions Set
Computers)
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
10


CC (Clock Cycle) menyatakan jumlah siklus clock
sebuah CPU yang digunakan untuk menyeleseikan
sebuah tugas,
CT (Cycle Time) menyatakan waktu yang dibutuhkan
1 clock atau f (CPU Speed).
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
11

CPI (jumlah rata-rata clock cycle per instruksi)
dapat dihitung :

Persamaan CPU time menjadi :
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
12


It is known that the instruction set of a given machine
consists of a number of instruction categories: ALU
(simple assignment and arithmetic and logic
instructions), load, store, branch, and so on.
where Ii is the number of times an instruction of type i is executed in the
program and CPIi is the average number of clock cycles needed to execute
such instruction.
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
13



Example : Hitung CPI untuk Mesin A yang
mempunyai clock rate 200 MHz
CR = 200 MHz
CT = 5 nS
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
14

Example : Mesin A mengerjakan X dengan instruksi
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
15


Jika Mesin A mengerjakan program X menggunakan
100 instructions, maka CPI mesin A[X] adalah :
It should be noted that the CPI reflects the
organization and the ISA (instruction set architecture)
of the processor while the instruction count reflects the
instruction set architecture and compiler technology
used.
Organisasi & Arsitektur Komputer
PERFORMANCE MEASURES
16
Organisasi & Arsitektur Komputer
What time to measure?

Elapsed time, wall-clock time:
 actual
time from start to completion
 depends on CPU, system, I/O, etc.
 often used in real benchmarks
 only suitable choice when I/O is included
What time to measure?

CPU Time:
 measure/analyze
CPU performance only
 may be suitable when machine is timeshared
 possibly both user and system component
 User CPU time is our focus for first part of course
What time to measure?

Elapsed time = CPU time + Idle time
 usually
and assuming time is accurately accounted for
Metrics of performance

Different performance metrics are
appropriate at different levels:
Application
Frames per second
Operations per second
Programming
Language
Compiler
(millions) of Instructions per second –
MIPS (millions) of (F.P.) operations per
second – MFLOP/s
ISA
Datapath
Control
Function Units
Transistors
Cycles per second (clock rate)
Cycles per Instruction
Relating Processor Metrics



CPU execution time per program
= CPU clock cycles/program X Clock cycle time
= CPU clock cycles/program ÷ Clock rate (frequency)
CPU clock cycles/program
= Instructions/program X Clock cycles Per Instruction
Clock cycles Per Instruction (CPI) is an average measurement,
it depends on :




ISA, the implementation, and the program measured
CPI = CPU clock cycles/program ÷ Instructions/program
Also, Instructions per clock cycle or IPC = 1 / CPI
CPU execution time = Instructions X CPI X Clock cycle
How much work can our
structure perform?



For a program Q:
Time = Number of executed instr *
Number of cycles per instr *
cycle
T = Nq * CPI * Tc
Time per
How to reduce T?




T = Nq * CPI * Tc
Make this a function of the instruction
CPI goes up, but we can use an average, not the
worst case
Tc goes down, time to do the longes step, not the
entire instruction
CPU time ---24




CPI < 1 [RISC dan pipeling]
Branch Prediction
Modular
Terstruktur
Organisasi & Arsitektur Komputer