Sie sind auf Seite 1von 80

BAB 1 Pendahuluan

1.1. Arsitektur & Organisasi

Arsitekture komputer berkaitan dengan atribute-atribute yang nampak bagi Set Instruksi, jumlah bit yang digunakan untuk penyajian !ontoh" apakah tersedia instruksi untuk perkalian# Organisasi komputer berkaitan dengan unit-unit operasional dan data,

programmer mekanisme I/O, teknik pengalamantan (addressing techniques)

interkoneksinya yang merealisasikan spesi$ikasi arsitektural !ontrol signals, inter$aces, memory technology !ontoh" Apakah instruksi perkalian diimplementasikan secara hard%are,

ataukah dikerjakan dengan penambahan secara berulang#

Arsitektur sama, organisasi dapat berbeda Arsitektur bertahan lama, organisasi menyesuaikan perkembangan Semua Intel $amili &'( memiliki arsitektur dasar yang sama )amili I*+ System/,-. memiliki arsitektur dasar yang sama +emberikan compatibilitas instruksi le/el mesin At least back%ards Organisasi antar /ersi memiliki perbedaan

teknologi

1.2. Struktur & Fungsi Strukture adalah bagaimana masing-masing komponen saling berhubungan satu sama lain )ungsi merupakan operasi dari masing-masing komponen sebagai bagian dari struktur

a. FUNGSI

Semua komputer memiliki 0 $ungsi" 1engolahan data - 2ata processing 1enyimpanan data - 2ata storage 1emindahan data - 2ata mo/ement 3endali 4 !ontrol

Gambar 1.1. K m!uter dilihat dari sudut !andang Fungsi.

a )ungsi 4 1emindahan data

!ontoh" dari keyboard ke layar monitor

Gambar 1.2. Fungsi " Pemindahan data b )ungsi 4 1enyimpanan data

!ontoh" do%nload dari internet

Gambar 1.#. Fungsi " Pen$im!anan data

c )ungsi 4 1engolahan data !ontoh" updating bank statement

Gambar 1.%. Fungsi " Peng lahan data

d )ungsi 4 1engolahan data

!ontoh" pencetakan bank statement

Gambar 1.&. Fungsi " Peng lahan data

b. S'(UK'U(

Gambar 1.). Strukture K m!uter * ' ! +e,el

Gambar 1.-. Strukture .PU

Gambar 1./. Strukture * . ntr l Unit

BAB 2 0, lusi dan Kiner1a K m!uter


2.1. 0NIA.

5lectronic 6umerical Integrator And !omputer 5ckert and +auchly 7ni/ersity o$ 1ennsyl/ania 8abel 9intasan peluru +ulai dibuat :;0, Selesai :;0( 8erlambat untuk digunakan dlm 12-II 2ipakai sampai :;<<

2.2. 0NIA. * details

+enggunakan sistem 2ecimal (bukan binary) +emiliki =. accumulator untuk :. digits 2iprogram secara manual melalui sakelar *erisi :',... /acuum tubes *erat ,. tons 9uas :<,... square $eet 2aya :0. k> 3ecepatan" <,... penambahan per detik

2.#. , n Neumann2'uring

3onsep" Stored 1rogram !omputer +ain memory" menyimpan program dan data A97" mengerjakan operasi data biner !ontrol unit" interpretasi instruksi dari memory dan meng-eksekusi 1eratan Input/output dikendailkan oleh control unit 1rinceton Institute $or Ad/anced Studies 6

IAS Selesai dibuat :;<=

Gambar 2.1. Stru3ture 4esin , n Nuemann

2.%. IAS * details


3apasitas memori" :... & 0. bit %ords +enggunakan sistem bilangan *iner 1anjang instruksi =. bit ( : %ord ? = instruksi ) @egister-register dalam !17 +*@ (+emory *u$$er @egister) +A@ (+emory Address @egister) I@ (Instruction @egister) I*@ (Instruction *u$$er @egister) 1! (1rogram !ounter) A! (Accumulator) +A (+ultiplier Auotient)

Gambar 2.2. Stru3ture detail IAS 2.&. K m!uter K mersial

:;0- - 5ckert-+auchly !omputer !orporation 76IBA! I (7ni/ersal Automatic !omputer) 7ntuk kalkulasi sensus :;<. oleh 7S *ureau o$ !ensus +enjadi di/isi dari Sperry-@and !orporation 76IBA! II dipasarkan akhir th :;<.-an 9ebih cepat 3apasitas memori lebih besar

2.). IB4

1abrik peralatan 1unched-card :;<, 4 I*+--.: 3omputer pertama I*+ (stored program computer) 7ntuk keperluan aplikasi Scienti$ic

:;<< 4 I*+- -.= 7ntuk applikasi bisnis +erupakan a%al dari seri -../-... yang membuat I*+ menjadi pabrik

komputer yang dominan 2.-. 'ransist r

+enggantikan /acuum tubes 9ebih kecil 9ebih murah 2isipasi panas sedikit +erupakan komponen Solid State 2ibuat dari Silicon (Sand) 2itemukan pada th :;0- di laboratorium *ell Oleh >illiam Shockley dkk

2./. K m!uter berbasis'ransist r

+esin generasi II 6!@ C @!A menghasilkan small transistor machines I*+ -... 25! - :;<+embuat 121-:

2.5. 4i3r ele3tr ni3s

Secara hara$iah berarti Delectronika kecilE Sebuah computer dibuat dari gerbang logika ( gate), sel memori dan Sejumlah gate dikemas dalam satu keping semikonduktor silicon %a$er

interkoneksi

2.16. Generasi K m!uter

:;0(-:;<- " Bacuum tube :;<'-:;(0 " 8ransistor :;(<-:;-: " SSI - Small scale integration 7p to :.. de/ices on a chip :;-: " +SI - +edium scale integration ( :..-,,... de/ices on a chip :;-:-:;-- " 9SI - 9arge scale integration ,,... - :..,... de/ices on a chip :;-'" B9SI - Bery large scale integration :..,... - :..,...,... de/ices on a chip 7ltra large scale integration O/er :..,...,... de/ices on a chip re7s +a8

2.11. 4

Fordon +oore - co$ounder o$ Intel +eningkatkan kerapatan komponen dalam chip Gumlah transistors/chip meningkat = & lipat per tahun Sejak :;-. pengembangan agak lambat Gumlah transistors = & lipat setiap :' bulan Harga suatu chip tetap / hampir tidak berubah 3erapatan tinggi berarti jalur pendek, menghasilkan kinerja yang 7kuran semakin kecil, $le&ibilitas meningkat 2aya listrik lebih hemat, panas menurun Sambungan sedikit berarti semakin handal / reliable

meningkat

10

Gambar 2.#. 9umlah 'ransist r dalam .PU 2.12. IB4 seri #)6

:;(0 1engganti seri -... (tidak kompatibel) @ancangan a%al suatu DkeluargaE komputer +emiliki set instruksi yang sama atau identik +enggunakan O/S yang sama atau identik 3ecepatan meningkat Gumlah I/O ports bertambah (i e terminal tambah banyak) 3apasitas memori bertambah Harga meningkat

2.1#. :0. P:P*/

:;(0 +inicomputer pertama 8idak mengharuskan ruangan ber-A! 7kurannya kecil Harga I:(,... I:..kJ untuk I*+ ,(. 11

5mbedded applications C O5+ +enggunakan *7S S8@7!87@5

Gambar 2.%. Struktur Bus !ada :0. * P:P*/

2.1%. 4em ri Semi3 ndu3t r

:;-. )airchild 7kuran kecil ( sebesar : sel core memory) 2apat menyimpan =<( bits 6on-destructi/e read 9ebih cepat dari core memory 3apasitas meningkat = & lipat setiap tahun

2.1&. Intel

:;-: - 0..0 +icroprocessor pertama, !17 dalam : chip, 0 bit :;-= - '..' 12

' bit, 2igunakan untuk aplikasi khusus :;-0 - '.'. +icroprocessor general purpose yang pertama dari Intel :;-' - '.'(, '.='( :;'< - '.,'( :;'; - '.0'(

2.1). 4eningkatkan ke3e!atan

1ipelining On board cache On board 9: C 9= cache *ranch prediction 2ata $lo% analysis Speculati/e e&ecution

2.1-. Per; rman3e 4ismat3h

3ecepatan 1rocessor meningkat 3apasitas memory meningkat 3ecepatan memory tertinggal dari prosesor

13

Gambar 2.&. :(A4 and Pr 3ess r .hara3teristi3s

Gambar 2.). 'rends in :(A4 use

14

2.1/. S lusi

+eningkatkan jumlah bit per akses +engubah inter$ace 2@A+ !ache +engurangi $rekuensicy akses memory !ache yg lebih kompleks dan cache on chip +eningkatkan band%idth interkoneksi *us kecepatan tinggi - High speed buses Hierarchy o$ buses

2.15. Pentium

!IS! +enggunakan teknik-teknik superscalar 5ksekusi instruksi secara parallel 1( " menggunakan" *rach prediction 2ata $lo% analisys Speculti/e e&ecution 1- " menggunakan teknologi berbasis @IS!

2.26. P 8erP.

Sistem @IS! superscalar Hasil kerjasama I*+ 4 +otorolla - Apple 2iturunkan dari arsitektur 1O>5@ (I*+ @S/(...) 3eluarga 1o%er1!" (.:" ,=-bit (.," lo%-end desktop dan komputer portabel (.0" desktop dan lo%-end user (=." (0-bit penuh, high-end user

BAB #
15

Bus Sistem
#.1. K nse! Pr gram 1emrograman (hard%are) merupakan proses penghu-bungan berbagai komponen logik pada kon$igurasi yang diinginkan untuk membentuk operasi aritmatik dan logik pada data tertentu Hardwired program tidak $le&ibel General purpose hardware dapat mengerjakan berbagai macam tugas 2aripada melakukan re-wiring, 9ebih baik menambah-kan sinyal-sinyal

tergantung sinyal kendali yang diberikan kendali yang baru #.2. Pr gram

Adalah suatu deretan langkah-langkah 1ada setiap langkah, dikerjakan suatu operasi arithmetic atau logical 1ada setiap operasi, diperlukan sejumlah sinyal kendali tertentu

#.#. Fungsi . ntr l Unit

7ntuk setiap operasi disediakan kode yang unik !ontoh" A22, +OB5 *agian hard%are tertentu menerima kode tersebut kemudian

menghasilkan sinyal-sinyal kendali Gadilah komputerK

#.%. K m! nen $ang di!erlukan

!ontrol 7nit (!7) dan Arithmetic and 9ogic 7nit (A97) membentuk !entral 2ata dan instruksi harus diberikan ke sistem dan dikeluarkan dari sistem Input/output 2iperlukan tempat untuk menyimpan sementara kode instruksi dan hasil

1rocessing 7nit (!17)

operasi

16

+ain memory

Gambar #.1. K m! nen K m!uter< ' ! +e,el =ie8 #.&. Siklus Instruksi

8%o steps"

17

)etch 5&ecute

Gambar #.2. Siklus Instruksi #.). Fet3h .$3le

1rogram !ounter (1!) berisi

address instruksi berikutnya yang akan

diambil 1rocessor mengambil instruksi dari memory pada lokasi yang ditunjuk 6aikkan 1! 3ecuali ada perintah tertentu Instruksi dimasukkan ke Instruction @egister (I@) 1rocessor meng-interpret dan melakukan tindakan yang diperlukan oleh 1!

#.-. 0>e3ute .$3le

1rocessor-memory 8rans$er data antara !17 dengan main memory 1rocessor I/O 8rans$er data antara !17 dengan I/O module

18

2ata processing Operasi arithmetic dan logical pada data tertentu !ontrol +engubah urutan operasi !ontoh" jump 3ombinasi diatas

Gambar #.#. . nt h 0ksekusi Pr gram 19

Gambar #.%. :iagram Keadaan Siklus Instruksi #./. Interru!t

Suatu mekanisme yang disediakan bagi modul-modul lain (mis I/O) untuk 1rogram +isal" o/er$lo%, di/ision by Lero 8imer 2ihasilkan oleh internal processor timer 2igunakan dalam pre-empti/e multi-tasking I/O dari I/O controller Hard%are $ailure +isal" memory parity error

dapat meng-interupsi operasi normal !17

20

Gambar #.&. Pr gram Fl 8 . ntr l #.5. Siklus Interu!si

2itambahkan ke instruction cycle 1rocessor memeriksa adanya interrupt 2iberitahukan le%at interrupt signal Gika tidak ada interrupt, $etch ne&t instruction Gika ada interrupt" 8unda eksekusi dari program saat itu 21

Simpan context Set 1! ke a%al address dari routine interrupt handler 1roses interrupt 3embalikan context dan lanjutkan program yang terhenti

Gambar #.). :iagram keadaan Siklus Instruksi dengan Interru!t #.16. 4ulti!le Interru!ts

2isable interrupts 1rocessor akan mengabaikan interrupt berikutnya Interrupts tetap akan diperiksa setelah interrupt ynag pertama selesai Interrupts ditangani dalam urutan sesuai datangnya 2e$ine priorities 9o% priority interrupts dapat di interrupt oleh higher priority interrupts 22

dilayani

Setelah higher priority interrupt selesai dilayani, akan kembali ke interrupt

sebelumnya

Gambar #.-. 4ulti!le Interru!ts " Se?uential

Gambar #./. 4ulti!le Interru!ts * Nested

23

#.11. Sambungan

Semua unit harus tersambung 7nit yang beda memiliki sambungan yang beda +emory Input/Output !17

#.12. Sambungan 4em ri

+enerima dan mengirim data +enerima addresses +enerima sinyal kendali @ead >rite 8iming

#.1#. Sambungan In!ut2Out!ut

Serupa dengan sambungan memori Output +enerima data dari computer +engirimkan data ke peripheral Input +enerima data dari peripheral +engirimkan data ke computer

#.1%. Sambungan In!ut2Out!ut

+enerima sinyal kendali dari computer +engirimkan sinyal kendali ke peripherals !ontoh" spin disk +enerima address dari computer !ontoh" nomor port +engirimkan sinyal interrupt

24

#.1&. .PU . nne3ti n

+embaca instruksi dan data +enuliskan data (setelah diproses) +engirimkan sinyal kendali ke unit-unit lain +enerima (C menanggapi) interrupt

#.1). Bus

Ada beberapa kemungkinan interkoneksi sistem Mang biasa dipakai" Single *us dan multiple *7S 1!" !ontrol/Address/2ata bus 25!-121" 7nibus

a. Pengertian Bus

Galur komunikasi yang menghubungkan beberapa de/ice *iasanya menggunakan cara broadcast Seringkali dikelompokkan Satu bus berisi sejumlah kanal (jalur) !ontoh bus data ,=-bit berisi ,= jalur Galur sumber tegangan biasanya tidak diperlihatkan

b. :ata Bus

+emba%a data 8idak dibedakan antara DdataE dan DinstruksiE 9ebar jalur menentukan per$ormance ', :(, ,=, (0 bit

3. Address bus

+enentukan asal atau tujuan dari data

25

+isalkan !17 perlu membaca instruksi (data) dari memori pada lokasi 9ebar jalur menentukan kapasitas memori maksimum dari sistem !ontoh '.'. memiliki :( bit address bus maka ruang memori maksimum

tertentu

adalah (0k d. . ntr l Bus

In$ormasi kendali dan timing Sinyal read/%rite memory (+@2/+>@) Interrupt request (I@A) !lock signals (!3)

Gambar #.5. Skema Interk neksi Bus

e. Bentuk Fisik

*agaimana bentuk $isik bus#

26

Galur-jalur parallel 1!* @ibbon cables Strip connectors pada mother boards contoh 1!I 3umpulan kabel

#.1-. Pr blem !ada Single Bus

*anyak de/ices pada bus tunggal menyebabkan" 1ropagation delays Galur data yg panjang berarti memerlukan koordinasi pemkaian shg I$ aggregate data trans$er approaches bus capacity 3ebanyakan sistem menggunakan multiple bus

berpengaruh pada per$ormance

Gambar #.16. Bus 'raditi nal @ISAA @menggunakan 3a3heA

27

Gambar #.11. Bigh Per; rman3e Bus #.1/. 9enis Bus

2edicated Galur data C address terpisah +ultiple&ed Galur bersama Address dan data pada saat yg beda 3euntungan 4 jalur sedikit 3erugian 3endali lebih komplek +empengaruhi per$ormance

#.15. Arbitrasi Bus

*eberapa modul mengendalikan bus contoh !17 dan 2+A controller Setiap saat hanya satu modul yg mengendalikan Arbitrasi bisa secara centralised atau distributed

28

#.26. Arbitrasi .entralised

Ada satu hard%are de/ice yg mengendalikan akses bus *us !ontroller Arbitrer *isa berupa bagian dari !17 atau terpisah

#.21. Arbitrasi :istributed

Setiap module dapat meng-klaim bus Setiap modules memiliki !ontrol logic

#.22. 'iming

3oordinasi e/ent pada bus Synchronous 5/ent ditentukan oleh sinyal clock !ontrol *us termasuk jalur clock Siklus bus ( bus cycle) transmisi : ke . Semua de/ices dpt membaca jakur clock *iasanya sinkronisasi terjadi pada tepi naik (leading edge) Suatu e/ent biasanya dimualai pada a%al siklus

Gambar #.12. S$n3hr n us 'iming :iagram

29

Gambar #.12. As$n3hr n us 'iming :iagram #.2#. Bus P.I

1eripheral !omponent Interconnection 2ikeluarkan oleh Intel sebagai public domain ,= atau (0 bit <. Galur

#.2%. 9alur !ada Bus P.I @$g harusA

Galur System clock and reset Address C 2ata ,= jalur multiple& address/data Galur /alidasi Inter$ace !ontrol Arbitrasi 6ot shared 2irect connection to 1!I bus arbiter 5rror lines

30

#.2&. 9alur Bus P.I @O!ti nalA

Interrupt lines 6ot shared !ache support (0-bit *us 5&tension Additional ,= lines 8ime multiple&ed = lines to enable de/ices to agree to use (0-bit trans$er G8AF/*oundary Scan )or testing procedures

#.2). . mmand !ada P.I

8ransaksi antara initiator (master) dg target +aster pegang kendali bus +aster menentukan jenis transaksi +isal I/O read/%rite )ase Address )ase 2ata

Gambar #.1%. P.I (ead 'iming :iagram

31

Gambar #.1&. P.I Bus Arbitrati n

32

BAB % MEMORI INTERNAL


%.1. Karakteristik 4em ri

9okasi 3apasitas 7nit trans$er +etode Akses 3inerja Genis $isik Si$at-si$at $isik Organisasi

%.2. + kasi

!17 (register) Internal (main memori) 5&ternal (secondary memori)

%.#. Ka!asitas

7kuran >ord Satuan alami organisasi memori *anyaknya %ords atau *ytes

%.%. Satuan 'rans;er

Internal Gumlah bit dalam sekali akses Sama dengan jumlah saluran data (? ukuran %ord) 5&ternal 2alam satuan block yg merupakan kelipatan %ord

33

Addressable unit 9okasi terkecil yang dpt dialamati secara uniq Secara internal biasanya sama dengan >ord 7ntuk disk digunakan satuan !luster

%.&. 4et de Akses


Sekuensial +ulai dari a%al sampai lokasi yang dituju >aktu akses tergantung pada lokasi data dan lokasi sebelumnya !ontoh tape :ire3t Setiap blocks memilki address yg unique 1engaksesan dengan cara lompat ke kisaran umum (general /icinity) >aktu akses tdk tergantung pada lokasi dan lokasi sebelumnya contoh disk

ditambah pencarian sekuensial


%.). 4et de Akses


(and m Setiap lokasi memiliki alamat tertentu >aktu akses tdk tergantung pada urutan akses sebelumnya !ontoh @A+ Ass 3iati,e 2ata dicarai berdasarkan isinya bukan berdasarkan alamatnya >aktu akses tdk tergantung terhadap lokasi atau pola akses sebelumnya !ontoh" cache

%.-. Bierarki 4em ri

@egister 2alam !17 Internal/+ain memory

34

*isa lebih dari satu le/el dengan adanya cache D@A+E 5&ternal memory 1enyimpan cadangan

%./. Per; rman3e

Access time >aktu untuk melakukan operasi baca-tulis +emory !ycle time 2iperlukan %aktu tambahan untuk reco/ery sebelum akses berikutnya Access time J reco/ery 8rans$er @ate 3ecepatan trans$er data ke/dari unit memori

%.5. 9enis Fisik

Semiconductor @A+ +agnetic 2isk C 8ape Optical !2 C 2B2 Others *ubble Hologram

%.16. Karakteristik

2ecay Bolatility 5rasable 1o%er consumption

35

Organisasi

Susunan $isik bit-bit untuk membentuk %ord

%.11. Kendala (an3angan

*erapa banyak# !apacity Seberapa cepat# 8ime is money *erapa mahal#

%.12. Bierarki

@egisters 9: !ache 9= !ache +ain memory 2isk cache 2isk Optical 8ape

%.1#. Ingin K m!uter $g .e!atC

3omputer hanya menggunakan static @A+ Akan sangat cepat 8idak diperlukan cache Apa perlu cache untuk cache# Harga menjadi sangat mahal

%.1%. + 3alit$ ; (e;eren3e

36

Selama berlangsungnya eksekusi suatu program, re$erensi memori !ontoh" loops

cenderung untuk mengelompok (cluster)

%.1&. 4em ri Semi3 ndu3t r

@A+ 1enamaan yang salah karena semua memori semiconductor adalah @ead/>rite Bolatile 1enyimpan sementara Static atau dynamic

random access (termasuk @O+)

%.1). :$nami3 (A4 *it tersimpan berupa muatan dalam capacitor +uatan dapat bocor 1erlu di-re$resh 3onstruksi sederhana 7kuran per bit nya kecil +urah 1erlu re$resh-circuits 9ambat +ain memory

%.1-. Stati3 (A4 *it disimpan sebagai s%itches on/o$$ 8idk ada kebocoran 8dk perlu re$reshing 3onstruksi lebih comple& 7kuran per bit lebih besar 9ebih mahal

37

8idak memerlukan re$resh-circuits 9ebih cepat !ache

%.1/. (ead Onl$ 4em r$ @(O4A

+enyimpan secara permanen 7ntuk +icroprogramming 9ibrary subroutines Systems programs (*IOS) )unction tables

%.15. 9enis (O4

2itulisi pada saat dibuat Sangat mahal 1rogrammable (once) 1@O+ 2iperlukan peralatan khusus untuk memprogram @ead DmostlyE 5rasable 1rogrammable (51@O+) 2ihapus dg sinar 7B 5lectrically 5rasable (551@O+) 1erlu %aktu lebih lama untuk menulisi )lash memory +enghapus seleuruh memori secara electris

%.26. Organisasi


chip :

:(+bit chip dapat disusun dari :+ & :( bit %ord : bit/chip memiliki :( lots dengan bit ke : dari setiap %ord berada pada :(+bit chip dapat disusun dari array" =.0' & =.0' & 0bit

38

+engurangi jumlah addres pins +ultiple& ro% address dg column address :: pins untuk address (=::?=.0') +enambah : pin kapasitas menjadi 0&

%.21. (e;reshing

@angkaian @e$resh diamsukkan dalam chip 2isable chip 1encacahan melalui baris @ead C >rite back 1erlu %aktu +enurunkan kinerja

Gambar %.1. . nt h< 1) 4b :(A4 @%4 > %A

39

Gambar %.2. Pa3kaging

Gambar %.#. Organisati n 4 dule

40

Gambar %.%. Organisati n 4 dul @2A %.22. K reksi kesalahan

@usak berat !acat/rusak 1ermanent @usak ringan @andom, non-destructi/e @usak non permanent 2ideteksi menggunakan Hamming code

41

Gambar %.&. 0rr r . rre3ting . de Fun3ti n %.2#. .a3he

+emori cepat dg kapasitas yg sedikit 8erletak antara main memory dengan !17 *isa saja diletakkan dalam chip !17 atau module tersendiri

Gambar %.). Bubungan .a3he dengan .PU dan 4ain 4em r$.

42

%.2%. O!erasi !ada .a3he


cache

!17 meminta isi data dari lokasi memori tertentu 1eriksa data tersebut di cache Gika ada ambil dari cache (cepat) Gika tidak ada, baca : block data dari main memory ke cache Ambil dari cache ke !17 !ache bersisi tags untuk identitas block dari main memory yang berada di

%.2&. :esain .a3he

7kuran (siLe) )ungsi +apping Algoritma penggantian (replacement algrthm) !ara penulisan (%rite policy) 7kuran *lock Gumlah !ache

%.2). SiDe

!ost Semakin besar semakin mahal Speed Semakin besar semakin cepat !heck data di cache perlu %aktu

43

Gambar %.-. Organisasi .a3he %.2-. Fungsi 4a!!ing

7kuran !ache (0k*yte 7kuran block 0 bytes diperlukan :(k (=:0) alamat per alamat 0 bytes Gumlah jalur alamat cache :0 +ain memory :(+*ytes Galur alamat perlu =0 bit (==0?:(+)

%.2/. :ire3t 4a!!ing

Setiap block main memory dipetakan hanya ke satu jalur cache Gika suatu block ada di cache, maka tempatnya sudah tertentu Address terbagi dalam = bagian 9S-%-bit menunjukkan %ord tertentu +S-s-bit menentukan : blok memori +S* terbagi menjadi $ield jalur cache r dan tag sebesar s-r (most

signi$icant)

44

%.25. Struktur Alamat :ire3t 4a!!ing


=0 bit address = bit " %ord identi$ier (0 byte block) == bit" block identi$ier ' bit tag (?==-:0) :0 bit slot atau line = blocks pada line yg sama tidak boleh memiliki tag yg sama !ek isi cache dengan mencari line dan 8ag

Gambar %./. Struktur Alamat :ire3t 4a!!ing

%.#6. 'able .a3he +ine !ada :ire3t 4a!!ing

!ache line . : m-:

blocks main memori ., m, =m, ,mN=s-m :,mJ:, =mJ:N=s-mJ: m-:, =m-:,,m-:N=s-:

45

Gambar%.5. Organisai .a3he :ire3t 4a!!ing

Gambar %.16. . nt h :ire3t 4a!!ing 46

%.#1. Keuntungan & Kerugian :ire3t 4a!!ing

Sederhana +urah Suatu blok memiliki lokasi yang tetap Gika program mengakses = block yang di map ke line yang sama secara

berulang-ulang, maka cache-miss sanagat tinggi %.#2. Ass 3iati,e 4a!!ing

*lok main memori dpt di simpan ke cache line mana saja Alamat +emori di interpresi sbg tag dan %ord 8ag menunjukan identitas block memori Setiap baris tag dicari kecocokannya 1encarian data di !ache menjadi lama

Gambar %.11. Organisasi .a3he Full$ Ass 3iati,e

47

Gambar %.12. . nt h Ass 3iati,e 4a!!ing %.##. Struktur Address Ass 3iati,e 4a!!ing

== bit tag disimpan untuk blok data ,= bit tag $ield dibandingkan dg tag entry dalam cache untuk pengecekan data 9S = bits dari address menunjukkan :( bit %ord yang diperlukan dari ,= contoh Address )))))! 8ag )))))! 2ata =0('=0(' !ache line ,)))

bit data block

%.#%. Set Ass 3iati,e 4a!!ing

!ache dibagi dalam sejumlah sets Setiap set berisi sejumlah line Suatu blok di maps ke line mana saja dalam set misalkan *lock * dapat berada pada line mana saja dari set i

48

!ontoh" per set ada = line = %ay associati/e mapping Suatu block dpt berada pada satu dari = lines dan hanya dalam : set

%.#&. . nt h Set Ass 3iati,e 4a!!ing

6omor set :, bit 6omor *lock dlm main memori adl modulo =:, ......, ..A..., ..*..., ..!... N map ke set yang sama

Gambar %.1#. Organisasi .a3he< '8 Ea$ Set Ass 3iati,e

49

%.#). Struktur Address< Set Ass 3iati,e 4a!!ing

set $ield untuk menentukan set cache set yg dicari *andingkan tag $ield untuk mencari datanya !ontoh" Address :)) -))! ..: -))! :)) ..: 8ag 2ata :))) :))) Set number :=,0<(-' ::==,,00

Gambar %.1%. . nt h '8 Ea$ Set Ass 3iati,e 4a!!ing

50

%.#-. (e!la3ement Alg rithms @1A :ire3t ma!!ing

8idak ada pilihan Setiap block hanya di map ke : line Fanti line tersebut

%.#/. (e!la3ement Alg rithms @2A Ass 3iati,e & Set Ass 3iati,e

Hard%are implemented algorithm (speed) 9east @ecently used (9@7) e g in = %ay set associati/e >hich o$ the = block is lru# )irst in $irst out ()I)O) replace block that has been in cache longest 9east $requently used replace block %hich has had $e%est hits @andom

%.#5. Erite P li3$

+ust not o/er%rite a cache block unless main memory is up to date +ultiple !17s may ha/e indi/idual caches I/O may address main memory directly

%.%6. Erite thr ugh

All %rites go to main memory as %ell as cache +ultiple !17s can monitor main memory tra$$ic to keep local (to !17) 9ots o$ tra$$ic Slo%s do%n %rites @emember bogus %rite through cachesK

cache up to date

%.%1. Erite ba3k

51

7pdates initially made in cache only 7pdate bit $or cache slot is set %hen update occurs I$ block is to be replaced, %rite to main memory only i$ update bit is set Other caches get out o$ sync I/O must access main memory through cache 6 * :<O o$ memory re$erences are %rites

%.%2. Pentium .a3he

)oreground reading )ind out detail o$ 1entium II cache systems 6O8 just $rom StallingsK

%.%#. Ne8er (A4 'e3hn l g$ @1A

*asic 2@A+ same since $irst @A+ chips 5nhanced 2@A+ !ontains small S@A+ as %ell S@A+ holds last line read (c $ !acheK) !ache 2@A+ 9arger S@A+ component 7se as cache or serial bu$$er

%.%%. Ne8er (A4 'e3hn l g$ @2A

Synchronous 2@A+ (S2@A+) currently on 2I++s Access is synchroniLed %ith an e&ternal clock Address is presented to @A+ @A+ $inds data (!17 %aits in con/entional 2@A+) Since S2@A+ mo/es data in time %ith system clock, !17 kno%s %hen !17 does not ha/e to %ait, it can do something else *urst mode allo%s S2@A+ to set up stream o$ data and $ire it out in block

data %ill be ready

52

Gambar %.1&. S:(A4

%.%&. Ne8er (A4 'e3hn l g$ @#A

)oreground reading 53

!heck out any other @A+ you can $ind See >eb site" 8he @A+ Fuide

BAB & 4em ri 0>ternal


54

&.1. 9enis 4em ri 0>terna+

+agnetic 2isk @AI2 @emo/able Optical !2-@O+ !2->ritable (>O@+) !2-@/> 2B2 +agnetic 8ape

&.2. 4agneti3 :isk

+etal atau plastic dilapisi dg material yg bersi$at magnet (iron o&ide) Genis kemasan )loppy >inchester hard disk @emo/able hard disk

&.#. F rmat dan Organisasi :ata

9ingkaran konsentris atau track Ada Fap antar track Fap sempit, kapasitas bertambah Gumlah bit per track sama (kerapatan ber/ariasi) 3ecepatan putar tetap 8rack dibagi menjadi beberapa sector 7kuran minimum block adalah satu sector Satu block bisa berisi lebih dari satu sector

&.%. Fi>ed24 ,able Bead :isk

55

)i&ed head Ada satu head (r/%) per track Head diletakkan pada tangkai yg tetap +o/able head Hanya ada satu head per side 2iletakkan pada tangkai yg dpt bergerak

&.&. (em ,able 2 N nrem ,able

@emo/able disk 2apat dilepas dari dri/e dan diganti dg disk lain +emberikan kapasitas simpanan yg tak terbatas +udah melakukan trans$er data antar sistem 6onremo/able disk 8erpasanang permanen dalam dri/e

&.). Fl !!$ :isk

'E, < =<E, , <E 3apasitas kecil sampai : 00+byte (ada yg = ''+) 9ambat 7mum dipakai +urah

&.-. Ein3hester Bard :isk @1A

2ikembangkan oleh I*+ di >inchester (7SA) 2ikemas dalam satu unit *erisi satu cakram atau lebih Head sangat kecil Handal

&./. Ein3hester Bard :isk @2A

56

7mum digunakan +urah Sbg e&ternal storage yg sangat cepat 3apasitas semakin besar 2alam orde F*

&.5. (em ,able Bard :isk

PI1 +urah *anyak digunakan :..+* GAP +ahal :F 9-:=. (a" dri/e) Guga dpt untuk membaca , <E $loppy

&.16. Pen3arian Se3t r

Harus dapat mengenali a%al suatu track dan sector )ormat disk +enambahkan in$ormasi tambahan +emberi tanda a%al track dan sector

57

Gambar &.11. S'&6) ; rmat @ ldFA &.11. Karakteristik

)i&ed head atau mo/able head @emo/able disk atau $i&ed disk Single side atau double side Single platter atau multiple platter +ekanisme head !ontact ()loppy) )i&ed gap )lying (>inchester)

&.12. 4ulti!le Platter

Satu head per side Semua head di-join dan di-align 8rack-track yg setiap platter membentuk cylinder 2ata dipecah berdasarkan cylinder

58

+engurangi gerakan head +eningkatkan kecepatan (trans$er rate)

&.1#. Ke3e!atan

Seek time gerakan head ke track yg dituju (@otational) latency 1utar platter sampai posisi data diba%ah head Access time ? Seek J 9atency 8rans$er rate

&.1%. (AI:

@edundant Array o$ Independent 2isks @edundant Array o$ Ine&pensi/e 2isks Ada ( le/el 8idak berhirarki Sejumlah disks ($isik) yg dipandang sbg satu dri/e (logical) oleh Sistem 2ata tersebar diantara disk $isik

Operasi

&.1&. (AI: 6

6o redundancy 2ata striped across all disks @ound @obin striping Increase speed +ultiple data requests probably not on same disk 2isks seek in parallel A set o$ data is likely to be striped across multiple disks

&.1). (AI: 1 59

+irrored 2isks 2ata is striped across disks = copies o$ each stripe on separate disks @ead $rom either >rite to both @eco/ery is simple S%ap $aulty disk C re-mirror 6o do%n time 5&pensi/e

&.1-. (AI: 2

2isks are synchroniLed Bery small stripes O$ten single byte/%ord 5rror correction calculated across corresponding bits on disks +ultiple parity disks store Hamming code error correction in corresponding 9ots o$ redundancy 5&pensi/e 6ot used

positions

&.1/. (AI: #


in$o

Similar to @AI2 = Only one redundant disk, no matter ho% large the array Simple parity bit $or each set o$ corresponding bits 2ata on $ailed dri/e can be reconstructed $rom sur/i/ing data and parity Bery high trans$er rates

&.15. (AI: %

60

5ach disk operates independently Food $or high I/O request rate 9arge stripes *it by bit parity calculated across stripes on each disk 1arity stored on parity disk

&.26. (AI: &

9ike @AI2 0 1arity striped across all disks @ound robin allocation $or parity stripe A/oids @AI2 0 bottleneck at parity disk !ommonly used in net%ork ser/ers 6 * 2O5S 6O8 +5A6 < 2IS3SKKKKK

&.21. O!ti3al St rage .:*(O4

Originally $or audio (<.+bytes gi/ing o/er -. minutes audio 1olycarbonate coated %ith highly re$lecti/e coat, usually aluminum 2ata stored as pits @ead by re$lecting laser !onstant packing density !onstant linear /elocity

&.22. .:*(O4 :ri,e S!eeds

Audio is single speed !onstant linier /elocity : = ms-: 8rack (spiral) is < =-km long Fi/es 0,;: seconds ? -, = minutes Other speeds are quoted as multiples e g =0& 61

8he quoted $igure is the ma&imum the dri/e can achie/e

Gambar &.2. .:*(O4 F rmat

+ode .?blank data $ield +ode :?=.0' byte dataJerror correction +ode =?=,,( byte data

&.2#. (and m A33ess n .:*(O4

2i$$icult +o/e head to rough position Set correct speed @ead address Adjust to required location (Ma%nK) 9arge capacity (#)

&.2%. .:*(O4 ; r & against

62

5asy to mass produce @emo/able @obust 5&pensi/e $or small runs Slo% @ead only

&.2&. Other O!ti3al St rage

!2->ritable >O@+ 6o% a$$ordable !ompatible %ith !2-@O+ dri/es !2-@> 5rasable Fetting cheaper +ostly !2-@O+ dri/e compatible

&.2). :=: * 8hat7s in a nameC

2igital Bideo 2isk 7sed to indicate a player $or mo/ies Only plays /ideo disks 2igital Bersatile 2isk 7sed to indicate a computer dri/e >ill read computer disks and play /ideo disks 2ogs Beritable 2inner O$$icially - nothingKKK

&.2-. :=: * te3hn l g$

+ulti-layer Bery high capacity (0 -F per layer) 63

)ull length mo/ie on single disk 7sing +15F compression )inally standardiLed (honestK) +o/ies carry regional coding 1layers only play correct region $ilms !an be D$i&edE

&.2/. :=: * Eritable

9oads o$ trouble %ith standards )irst generation 2B2 dri/es may not read $irst generation 2B2-> disks )irst generation 2B2 dri/es may not read !2-@> disks >ait $or it to settle do%n be$ore buyingK

&.25. F regr und (eading

!heck out optical disk storage options !heck out +ini 2isk

&.#6. 4agneti3 'a!e

Serial access Slo% Bery cheap *ackup and archi/e

&.#1. :igital Audi 'a!e @:A'A

7ses rotating head (like /ideo) High capacity on small tape 0Fbyte uncompressed

64

'Fbyte compressed *ackup o$ 1!/net%ork ser/ers

BAB ) In!ut2Out!ut
).1. In!ut2Out!ut Pr blems 65

>ide /ariety o$ peripherals 2eli/ering di$$erent amounts o$ data At di$$erent speeds In di$$erent $ormats All slo%er than !17 and @A+ 6eed I/O modules

).2. In!ut2Out!ut 4 dule

Inter$ace to !17 and +emory Inter$ace to one or more peripherals F565@I! +O259 O) I/O 2IAF@A+ ( :

).#. 0>ternal :e,i3es

Human readable Screen, printer, keyboard +achine readable +onitoring and control !ommunication +odem 6et%ork Inter$ace !ard (6I!)

).%. I2O 4 dule Fun3ti n

!ontrol C 8iming !17 !ommunication 2e/ice !ommunication 2ata *u$$ering 5rror 2etection

).&. I2O Ste!s

!17 checks I/O module de/ice status I/O module returns status

66

I$ ready, !17 requests data trans$er I/O module gets data $rom de/ice I/O module trans$ers data to !17 Bariations $or output, 2+A, etc

Gambar ).1. I2O 4 dule :iagram ).). I2O 4 dule :e3isi ns

Hide or re/eal de/ice properties to !17 Support multiple or single de/ice !ontrol de/ice $unctions or lea/e $or !17 Also O/S decisions e g 7ni& treats e/erything it can as a $ile

).-. In!ut Out!ut 'e3hni?ues

1rogrammed Interrupt dri/en 2irect +emory Access (2+A)

67

)./. Pr grammed I2O

!17 has direct control o/er I/O Sensing status @ead/%rite commands 8rans$erring data !17 %aits $or I/O module to complete operation >astes !17 time

).5. Pr grammed I2O * detail

!17 requests I/O operation I/O module per$orms operation I/O module sets status bits !17 checks status bits periodically I/O module does not in$orm !17 directly I/O module does not interrupt !17 !17 may %ait or come back later

).16. I2O . mmands

!17 issues address Identi$ies module (C de/ice i$ Q: per module) !17 issues command !ontrol - telling module %hat to do e g spin up disk 8est - check status e g po%er# 5rror# @ead/>rite +odule trans$ers data /ia bu$$er $rom/to de/ice

).11. Addressing I2O :e,i3es 7nder programmed I/O data trans$er is /ery like memory access (!17 /ie%point)

68

5ach de/ice gi/en unique identi$ier !17 commands contain identi$ier (address)

).12. I2O 4a!!ing


+emory mapped I/O 2e/ices and memory share an address space I/O looks just like memory read/%rite 6o special commands $or I/O 9arge selection o$ memory access commands a/ailable Isolated I/O Separate address spaces 6eed I/O or memory select lines Special commands $or I/O 9imited set

).1#. Interru!t :ri,en I2O

O/ercomes !17 %aiting 6o repeated !17 checking o$ de/ice I/O module interrupts %hen ready

).1%. Interru!t :ri,en I2O *asic Operation

!17 issues read command I/O module gets data $rom peripheral %hilst !17 does other %ork I/O module interrupts !17 !17 requests data I/O module trans$ers data

).1&. .PU =ie8! int

Issue read command 2o other %ork

69

!heck $or interrupt at end o$ each instruction cycle I$ interrupted"Sa/e conte&t (registers) 1rocess interrupt )etch data C store See Operating Systems notes

).1). :esign Issues

Ho% do you identi$y the module issuing the interrupt# Ho% do you deal %ith multiple interrupts# i e an interrupt handler being interrupted

).1-. Identi;$ing Interru!ting 4 dule @1A

2i$$erent line $or each module 1! 9imits number o$ de/ices So$t%are poll !17 asks each module in turn Slo%

).1/. Identi;$ing Interru!ting 4 dule @2A

2aisy !hain or Hard%are poll Interrupt Ackno%ledge sent do%n a chain +odule responsible places /ector on bus !17 uses /ector to identi$y handler routine *us +aster +odule must claim the bus be$ore it can raise interrupt e g 1!I C S!SI

).15. 4ulti!le Interru!ts

5ach interrupt line has a priority

70

Higher priority lines can interrupt lo%er priority lines I$ bus mastering only current master can interrupt

).26. 0>am!le * P. Bus

'.&'( has one interrupt line '.'( based systems use one '=<;A interrupt controller '=<;A has ' interrupt lines

).21. Se?uen3e ; 0,ents

'=<;A accepts interrupts '=<;A determines priority '=<;A signals '.'( (raises I68@ line) !17 Ackno%ledges '=<;A puts correct /ector on data bus !17 processes interrupt

71

Gambar ).2. P. Interru!t +a$ ut

).22. ISA Bus Interru!t S$stem

ISA bus chains t%o '=<;As together 9ink is /ia interrupt = Fi/es :< lines :( lines less one $or link I@A ; is used to re-route anything trying to use I@A = *ack%ards compatibility Incorporated in chip set

72

Gambar ).#. ISA Interru!t +a$ ut ).2#. :ire3t 4em r$ A33ess

Interrupt dri/en and programmed I/O require acti/e !17 inter/ention 8rans$er rate is limited !17 is tied up 2+A is the ans%er

).2%. :4A Fun3ti n

Additional +odule (hard%are) on bus 2+A controller takes o/er $rom !17 $or I/O

).2&. :4A O!erati n

!17 tells 2+A controller"@ead/>rite 2e/ice address Starting address o$ memory block $or data Amount o$ data to be trans$erred !17 carries on %ith other %ork 2+A controller deals %ith trans$er 73

2+A controller sends interrupt %hen $inished

).2). :4A 'rans;er .$3le Stealing

2+A controller takes o/er bus $or a cycle 8rans$er o$ one %ord o$ data 6ot an interrupt !17 does not s%itch conte&t !17 suspended just be$ore it accesses bus i e be$ore an operand or data $etch or a data %rite Slo%s do%n !17 but not as much as !17 doing trans$er

).2-. Aside

>hat e$$ect does caching memory ha/e on 2+A# Hint" ho% much are the system buses a/ailable#

Gambar ).%. :4A . n;igurati ns @1A

Single *us, 2etached 2+A controller 5ach trans$er uses bus t%ice I/O to 2+A then 2+A to memory !17 is suspended t%ice

74

Gambar ).&. :4A . n;igurati ns @2A

Single *us, Integrated 2+A controller !ontroller may support Q: de/ice 5ach trans$er uses bus once 2+A to memory !17 is suspended once

Gambar ).). :4A . n;igurati ns @#A

75

Separate I/O *us *us supports all 2+A enabled de/ices 5ach trans$er uses bus once 2+A to memory !17 is suspended once

).2/. I2O .hannels

I/O de/ices getting more sophisticated e g ,2 graphics cards !17 instructs I/O controller to do trans$er I/O controller does entire trans$er Impro/es speed 8akes load o$$ !17 2edicated processor is $aster

).25. Inter;a3ing

!onnecting de/ices together *it o$ %ire# 2edicated processor/memory/buses# 5 g S!SI, )ire>ire

).#6. Small . m!uter S$stems Inter;a3e @S.SIA

1arallel inter$ace ', :(, ,= bit data lines 2aisy chained 2e/ices are independent 2e/ices can communicate %ith each other as %ell as host

).#1. S.SI * 1

5arly :;'.s ' bit

76

<+HL 2ata rate <+*ytes s-: Se/en de/ices 5ight including host inter$ace

).#2. S.SI * 2

:;;: :( and ,= bit :.+HL 2ata rate =. or 0. +bytes s-: (!heck out 7ltra/>ide S!SI)

).##. S.SI Signaling @1A

*et%een initiator and target 7sually host C de/ice *us $ree# (c $ 5thernet) Arbitration - take control o$ bus (c $ 1!I) Select target @eselection Allo%s reconnection a$ter suspension e g i$ request takes time to e&ecute, bus can be released

).#%. S.SI Signaling @2A

!ommand - target requesting $rom initiator 2ata request Status request +essage request (both %ays)

77

Gambar ).-. S.SI Bus Phases

).#&. . n;iguring S.SI

*us must be terminated at each end 7sually one end is host adapter 1lug in terminator or s%itch(es) S!SI Id must be set Gumpers or s%itches 7nique on chain . (Lero) $or boot de/ice Higher number is higher priority in arbitration

).#). I000 1#5% FireEire

High per$ormance serial bus )ast 9o% cost 5asy to implement Also being used in digital cameras, B!@s and 8B

78

).#-. FireEire . n;igurati n

2aisy chain 7p to (, de/ices on single port @eally (0 o$ %hich one is the inter$ace itsel$ 7p to :.== buses can be connected %ith bridges Automatic con$iguration 6o bus terminators +ay be tree structure

).#/. FireEire # +a$er Sta3k

1hysical 8ransmission medium, electrical and signaling characteristics 9ink 8ransmission o$ data in packets 8ransaction @equest-response protocol

).#5. FireEire * Ph$si3al +a$er

2ata rates $rom =< to 0..+bps 8%o $orms o$ arbitration *ased on tree structure @oot acts as arbiter )irst come $irst ser/ed 6atural priority controls simultaneous requests i e %ho is nearest to root )air arbitration 7rgent arbitration

).%6. FireEire * +ink +a$er

8%o transmission types 79

Asynchronous Bariable amount o$ data and se/eral bytes o$ transaction data trans$erred 8o e&plicit address Ackno%ledgement returned Isochronous Bariable amount o$ data in sequence o$ $i&ed siLe packets at regular Simpli$ied addressing 6o ackno%ledgement

as a packet

inter/als

80

Das könnte Ihnen auch gefallen