1.1. Arsitektur & Organisasi Arsitekture komputer berkaitan dengan atribute-atribute yang nampak bagi Set Instruksi, jumlah bit yang digunakan untuk penyajian Contoh: apakah tersedia instruksi untuk perkalian? Organisasi komputer berkaitan dengan unit-unit operasional dan data,
programmer
Control signals, interfaces, memory technology. Contoh: Apakah instruksi perkalian diimplementasikan secara hardware,
Arsitektur sama, organisasi dapat berbeda Arsitektur bertahan lama, organisasi menyesuaikan perkembangan Semua Intel famili x86 memiliki arsitektur dasar yang sama Famili IBM System/370 memiliki arsitektur dasar yang sama Memberikan compatibilitas instruksi level mesin At least backwards Organisasi antar versi memiliki perbedaan
teknologi
1.2. Struktur & Fungsi Strukture adalah bagaimana masing-masing komponen saling berhubungan satu sama lain Fungsi merupakan operasi dari masing-masing komponen sebagai bagian dari struktur
a. FUNGSI
Semua komputer memiliki 4 fungsi: Pengolahan data - Data processing Penyimpanan data - Data storage Pemindahan data - Data movement Kendali Control
b. STRUKTUR
Electronic Numerical Integrator And Computer Eckert and Mauchly University of Pennsylvania Tabel Lintasan peluru Mulai dibuat 1943 Selesai 1946 Terlambat untuk digunakan dlm PD-II Dipakai sampai 1955
Menggunakan sistem Decimal (bukan binary) Memiliki 20 accumulator untuk 10 digits Diprogram secara manual melalui sakelar Berisi 18,000 vacuum tubes Berat 30 tons Luas 15,000 square feet Daya 140 kW Kecepatan: 5,000 penambahan per detik
Konsep: Stored Program Computer Main memory: menyimpan program dan data ALU: mengerjakan operasi data biner Control unit: interpretasi instruksi dari memory dan meng-eksekusi Peratan Input/output dikendailkan oleh control unit Princeton Institute for Advanced Studies 6
Kapasitas memori: 1000 x 40 bit words Menggunakan sistem bilangan Biner Panjang instruksi 20 bit ( 1 word = 2 instruksi ) Register-register dalam CPU MBR (Memory Buffer Register) MAR (Memory Address Register) IR (Instruction Register) IBR (Instruction Buffer Register) PC (Program Counter) AC (Accumulator) MQ (Multiplier Quotient)
1947 - Eckert-Mauchly Computer Corporation UNIVAC I (Universal Automatic Computer) Untuk kalkulasi sensus 1950 oleh US Bureau of Census Menjadi divisi dari Sperry-Rand Corporation UNIVAC II dipasarkan akhir th. 1950-an Lebih cepat Kapasitas memori lebih besar
2.6. IBM
Pabrik peralatan Punched-card 1953 IBM-701 Komputer pertama IBM (stored program computer) Untuk keperluan aplikasi Scientific
1955 IBM- 702 Untuk applikasi bisnis Merupakan awal dari seri 700/7000 yang membuat IBM menjadi pabrik
Menggantikan vacuum tubes Lebih kecil Lebih murah Disipasi panas sedikit Merupakan komponen Solid State Dibuat dari Silicon (Sand) Ditemukan pada th 1947 di laboratorium Bell Oleh William Shockley dkk.
Mesin generasi II NCR & RCA menghasilkan small transistor machines IBM 7000 DEC - 1957 Membuat PDP-1
2.9. Microelectronics
Secara harafiah berarti electronika kecil Sebuah computer dibuat dari gerbang logika ( gate), sel memori dan Sejumlah gate dikemas dalam satu keping semikonduktor silicon wafer
interkoneksi
1946-1957 : Vacuum tube 1958-1964 : Transistor 1965-1971 : SSI - Small scale integration Up to 100 devices on a chip 1971 : MSI - Medium scale integration ( 100-3,000 devices on a chip 1971-1977 : LSI - Large scale integration 3,000 - 100,000 devices on a chip 1978: VLSI - Very large scale integration 100,000 - 100,000,000 devices on a chip Ultra large scale integration Over 100,000,000 devices on a chip
Gordon Moore - cofounder of Intel Meningkatkan kerapatan komponen dalam chip Jumlah transistors/chip meningkat 2 x lipat per tahun Sejak 1970 pengembangan agak lambat Jumlah transistors 2 x lipat setiap 18 bulan Harga suatu chip tetap / hampir tidak berubah Kerapatan tinggi berarti jalur pendek, menghasilkan kinerja yang Ukuran semakin kecil, flexibilitas meningkat Daya listrik lebih hemat, panas menurun Sambungan sedikit berarti semakin handal / reliable
meningkat
10
Gambar 2.3. Jumlah Transistor dalam CPU 2.12. IBM seri 360
1964 Pengganti seri 7000 (tidak kompatibel) Rancangan awal suatu keluarga komputer Memiliki set instruksi yang sama atau identik Menggunakan O/S yang sama atau identik Kecepatan meningkat Jumlah I/O ports bertambah (i.e. terminal tambah banyak) Kapasitas memori bertambah Harga meningkat
1964 Minicomputer pertama Tidak mengharuskan ruangan ber-AC Ukurannya kecil Harga $16,000 $100k+ untuk IBM 360 11
1970 Fairchild Ukuran kecil ( sebesar 1 sel core memory) Dapat menyimpan 256 bits Non-destructive read Lebih cepat dari core memory Kapasitas meningkat 2 x lipat setiap tahun
2.15. Intel
1971 - 4004 Microprocessor pertama, CPU dalam 1 chip, 4 bit 1972 - 8008 12
8 bit, Digunakan untuk aplikasi khusus 1974 - 8080 Microprocessor general purpose yang pertama dari Intel 1978 - 8086, 80286 1985 - 80386 1989 - 80486
Pipelining On board cache On board L1 & L2 cache Branch prediction Data flow analysis Speculative execution
Kecepatan Processor meningkat Kapasitas memory meningkat Kecepatan memory tertinggal dari prosesor
13
14
2.18. Solusi
Meningkatkan jumlah bit per akses Mengubah interface DRAM Cache Mengurangi frekuensicy akses memory Cache yg lebih kompleks dan cache on chip Meningkatkan bandwidth interkoneksi Bus kecepatan tinggi - High speed buses Hierarchy of buses
2.19. Pentium
CISC Menggunakan teknik-teknik superscalar Eksekusi instruksi secara parallel P6 : menggunakan: Brach prediction Data flow analisys Specultive execution P7 : menggunakan teknologi berbasis RISC
2.20. PowerPC
Sistem RISC superscalar Hasil kerjasama IBM Motorolla - Apple Diturunkan dari arsitektur POWER (IBM RS/6000) Keluarga PowerPC: 601: 32-bit 603: low-end desktop dan komputer portabel 604: desktop dan low-end user 620: 64-bit penuh, high-end user
BAB 3
15
Bus Sistem
3.1. Konsep Program Pemrograman (hardware) merupakan proses penghu-bungan berbagai komponen logik pada konfigurasi yang diinginkan untuk membentuk operasi aritmatik dan logik pada data tertentu Hardwired program tidak flexibel General purpose hardware dapat mengerjakan berbagai macam tugas Daripada melakukan re-wiring, Lebih baik menambah-kan sinyal-sinyal
tergantung sinyal kendali yang diberikan kendali yang baru 3.2. Program
Adalah suatu deretan langkah-langkah Pada setiap langkah, dikerjakan suatu operasi arithmetic atau logical Pada setiap operasi, diperlukan sejumlah sinyal kendali tertentu
Untuk setiap operasi disediakan kode yang unik Contoh: ADD, MOVE Bagian hardware tertentu menerima kode tersebut kemudian
Control Unit (CU) dan Arithmetic and Logic Unit (ALU) membentuk Central Data dan instruksi harus diberikan ke sistem dan dikeluarkan dari sistem Input/output Diperlukan tempat untuk menyimpan sementara kode instruksi dan hasil
operasi.
16
Main memory
Gambar 3.1. Komponen Komputer: Top Level View 3.5. Siklus Instruksi
Two steps:
17
Fetch Execute
diambil Processor mengambil instruksi dari memory pada lokasi yang ditunjuk Naikkan PC Kecuali ada perintah tertentu Instruksi dimasukkan ke Instruction Register (IR) Processor meng-interpret dan melakukan tindakan yang diperlukan oleh PC
Processor-memory Transfer data antara CPU dengan main memory Processor I/O Transfer data antara CPU dengan I/O module
18
Data processing Operasi arithmetic dan logical pada data tertentu Control Mengubah urutan operasi Contoh: jump Kombinasi diatas
Suatu mekanisme yang disediakan bagi modul-modul lain (mis. I/O) untuk Program Misal: overflow, division by zero Timer Dihasilkan oleh internal processor timer Digunakan dalam pre-emptive multi-tasking I/O dari I/O controller Hardware failure Misal: memory parity error
20
Ditambahkan ke instruction cycle Processor memeriksa adanya interrupt Diberitahukan lewat interrupt signal Jika tidak ada interrupt, fetch next instruction Jika ada interrupt: Tunda eksekusi dari program saat itu 21
Simpan context Set PC ke awal address dari routine interrupt handler Proses interrupt Kembalikan context dan lanjutkan program yang terhenti.
Gambar 3.6. Diagram keadaan Siklus Instruksi dengan Interrupt 3.10. Multiple Interrupts
Disable interrupts Processor akan mengabaikan interrupt berikutnya Interrupts tetap akan diperiksa setelah interrupt ynag pertama selesai Interrupts ditangani dalam urutan sesuai datangnya Define priorities Low priority interrupts dapat di interrupt oleh higher priority interrupts 22
dilayani
sebelumnya.
23
3.11. Sambungan
Semua unit harus tersambung Unit yang beda memiliki sambungan yang beda Memory Input/Output CPU
Menerima dan mengirim data Menerima addresses Menerima sinyal kendali Read Write Timing
Serupa dengan sambungan memori Output Menerima data dari computer Mengirimkan data ke peripheral Input Menerima data dari peripheral Mengirimkan data ke computer
Menerima sinyal kendali dari computer Mengirimkan sinyal kendali ke peripherals Contoh: spin disk Menerima address dari computer Contoh: nomor port Mengirimkan sinyal interrupt
24
Membaca instruksi dan data Menuliskan data (setelah diproses) Mengirimkan sinyal kendali ke unit-unit lain Menerima (& menanggapi) interrupt
3.16. Bus
Ada beberapa kemungkinan interkoneksi sistem Yang biasa dipakai: Single Bus dan multiple BUS PC: Control/Address/Data bus DEC-PDP: Unibus
a. Pengertian Bus
Jalur komunikasi yang menghubungkan beberapa device Biasanya menggunakan cara broadcast Seringkali dikelompokkan Satu bus berisi sejumlah kanal (jalur) Contoh bus data 32-bit berisi 32 jalur Jalur sumber tegangan biasanya tidak diperlihatkan
b. Data Bus
Membawa data Tidak dibedakan antara data dan instruksi Lebar jalur menentukan performance 8, 16, 32, 64 bit
c. Address bus
25
Misalkan CPU perlu membaca instruksi (data) dari memori pada lokasi Lebar jalur menentukan kapasitas memori maksimum dari sistem Contoh 8080 memiliki 16 bit address bus maka ruang memori maksimum
tertentu
Informasi kendali dan timing Sinyal read/write memory (MRD/MWR) Interrupt request (IRQ) Clock signals (CK)
e. Bentuk Fisik
26
Jalur-jalur parallel PCB Ribbon cables Strip connectors pada mother boards contoh PCI Kumpulan kabel
Banyak devices pada bus tunggal menyebabkan: Propagation delays Jalur data yg panjang berarti memerlukan koordinasi pemkaian shg If aggregate data transfer approaches bus capacity Kebanyakan sistem menggunakan multiple bus
27
Dedicated Jalur data & address terpisah Multiplexed Jalur bersama Address dan data pada saat yg beda Keuntungan jalur sedikit Kerugian Kendali lebih komplek Mempengaruhi performance
Beberapa modul mengendalikan bus contoh CPU dan DMA controller Setiap saat hanya satu modul yg mengendalikan Arbitrasi bisa secara centralised atau distributed
28
Ada satu hardware device yg mengendalikan akses bus Bus Controller Arbitrer Bisa berupa bagian dari CPU atau terpisah
Setiap module dapat meng-klaim bus Setiap modules memiliki Control logic
3.22. Timing
Koordinasi event pada bus Synchronous Event ditentukan oleh sinyal clock Control Bus termasuk jalur clock Siklus bus ( bus cycle) transmisi 1 ke 0 Semua devices dpt membaca jakur clock Biasanya sinkronisasi terjadi pada tepi naik (leading edge) Suatu event biasanya dimualai pada awal siklus
29
Peripheral Component Interconnection Dikeluarkan oleh Intel sebagai public domain 32 atau 64 bit 50 Jalur
Jalur System clock and reset Address & Data 32 jalur multiplex address/data Jalur validasi Interface Control Arbitrasi Not shared Direct connection to PCI bus arbiter Error lines
30
Interrupt lines Not shared Cache support 64-bit Bus Extension Additional 32 lines Time multiplexed 2 lines to enable devices to agree to use 64-bit transfer JTAG/Boundary Scan For testing procedures
Transaksi antara initiator (master) dg target Master pegang kendali bus Master menentukan jenis transaksi Misal I/O read/write Fase Address Fase Data
31
32
Lokasi Kapasitas Unit transfer Metode Akses Kinerja Jenis fisik Sifat-sifat fisik Organisasi
4.2. Lokasi
4.3. Kapasitas
Ukuran Word Satuan alami organisasi memori Banyaknya words atau Bytes
Internal Jumlah bit dalam sekali akses Sama dengan jumlah saluran data (= ukuran word) External Dalam satuan block yg merupakan kelipatan word
33
Addressable unit Lokasi terkecil yang dpt dialamati secara uniq Secara internal biasanya sama dengan Word Untuk disk digunakan satuan Cluster
Sekuensial Mulai dari awal sampai lokasi yang dituju Waktu akses tergantung pada lokasi data dan lokasi sebelumnya Contoh tape Direct Setiap blocks memilki address yg unique Pengaksesan dengan cara lompat ke kisaran umum (general vicinity) Waktu akses tdk tergantung pada lokasi dan lokasi sebelumnya contoh disk
Random Setiap lokasi memiliki alamat tertentu Waktu akses tdk tergantung pada urutan akses sebelumnya Contoh RAM Associative Data dicarai berdasarkan isinya bukan berdasarkan alamatnya Waktu akses tdk tergantung terhadap lokasi atau pola akses sebelumnya Contoh: cache
34
Bisa lebih dari satu level dengan adanya cache RAM External memory Penyimpan cadangan
4.8. Performance
Access time Waktu untuk melakukan operasi baca-tulis Memory Cycle time Diperlukan waktu tambahan untuk recovery sebelum akses berikutnya Access time + recovery Transfer Rate Kecepatan transfer data ke/dari unit memori
Semiconductor RAM Magnetic Disk & Tape Optical CD & DVD Others Bubble Hologram
4.10. Karakteristik
35
Organisasi
4.12. Hierarki
Registers L1 Cache L2 Cache Main memory Disk cache Disk Optical Tape
Komputer hanya menggunakan static RAM Akan sangat cepat Tidak diperlukan cache Apa perlu cache untuk cache? Harga menjadi sangat mahal
36
RAM Penamaan yang salah karena semua memori semiconductor adalah Read/Write Volatile Penyimpan sementara Static atau dynamic
4.16. Dynamic RAM Bit tersimpan berupa muatan dalam capacitor Muatan dapat bocor Perlu di-refresh Konstruksi sederhana Ukuran per bit nya kecil Murah Perlu refresh-circuits Lambat Main memory
4.17. Static RAM Bit disimpan sebagai switches on/off Tidk ada kebocoran Tdk perlu refreshing Konstruksi lebih complex Ukuran per bit lebih besar Lebih mahal
37
Menyimpan secara permanen Untuk Microprogramming Library subroutines Systems programs (BIOS) Function tables
Ditulisi pada saat dibuat Sangat mahal Programmable (once) PROM Diperlukan peralatan khusus untuk memprogram Read mostly Erasable Programmable (EPROM) Dihapus dg sinar UV Electrically Erasable (EEPROM) Perlu waktu lebih lama untuk menulisi Flash memory Menghapus seleuruh memori secara electris
4.20. Organisasi
chip 1
16Mbit chip dapat disusun dari 1M x 16 bit word 1 bit/chip memiliki 16 lots dengan bit ke 1 dari setiap word berada pada 16Mbit chip dapat disusun dari array: 2048 x 2048 x 4bit
38
Mengurangi jumlah addres pins Multiplex row address dg column address 11 pins untuk address (211=2048) Menambah 1 pin kapasitas menjadi 4x
4.21. Refreshing
Rangkaian Refresh diamsukkan dalam chip Disable chip Pencacahan melalui baris Read & Write back Perlu waktu Menurunkan kinerja
39
40
Rusak berat Cacat/rusak Permanent Rusak ringan Random, non-destructive Rusak non permanent Dideteksi menggunakan Hamming code
41
Memori cepat dg kapasitas yg sedikit Terletak antara main memory dengan CPU Bisa saja diletakkan dalam chip CPU atau module tersendiri
42
cache
CPU meminta isi data dari lokasi memori tertentu Periksa data tersebut di cache Jika ada ambil dari cache (cepat) Jika tidak ada, baca 1 block data dari main memory ke cache Ambil dari cache ke CPU Cache bersisi tags untuk identitas block dari main memory yang berada di
Ukuran (size) Fungsi Mapping Algoritma penggantian (replacement algrthm) Cara penulisan (write policy) Ukuran Block Jumlah Cache
4.26. Size
Cost Semakin besar semakin mahal Speed Semakin besar semakin cepat Check data di cache perlu waktu
43
Ukuran Cache 64kByte Ukuran block 4 bytes diperlukan 16k (214) alamat per alamat 4 bytes Jumlah jalur alamat cache 14 Main memory 16MBytes Jalur alamat perlu 24 bit (224=16M)
Setiap block main memory dipetakan hanya ke satu jalur cache Jika suatu block ada di cache, maka tempatnya sudah tertentu Address terbagi dalam 2 bagian LS-w-bit menunjukkan word tertentu MS-s-bit menentukan 1 blok memori MSB terbagi menjadi field jalur cache r dan tag sebesar s-r (most
significant)
44
24 bit address 2 bit : word identifier (4 byte block) 22 bit: block identifier 8 bit tag (=22-14) 14 bit slot atau line 2 blocks pada line yg sama tidak boleh memiliki tag yg sama Cek isi cache dengan mencari line dan Tag
45
Sederhana Murah Suatu blok memiliki lokasi yang tetap Jika program mengakses 2 block yang di map ke line yang sama secara
Blok main memori dpt di simpan ke cache line mana saja Alamat Memori di interpresi sbg tag dan word Tag menunjukan identitas block memori Setiap baris tag dicari kecocokannya Pencarian data di Cache menjadi lama
47
Gambar 4.12. Contoh Associative Mapping 4.33. Struktur Address Associative Mapping
22 bit tag disimpan untuk blok data 32 bit tag field dibandingkan dg tag entry dalam cache untuk pengecekan data LS 2 bits dari address menunjukkan 16 bit word yang diperlukan dari 32 contoh Address FFFFFC Tag FFFFFC Data 24682468 Cache line 3FFF
Cache dibagi dalam sejumlah sets Setiap set berisi sejumlah line Suatu blok di maps ke line mana saja dalam set misalkan Block B dapat berada pada line mana saja dari set i
48
Contoh: per set ada 2 line 2 way associative mapping Suatu block dpt berada pada satu dari 2 lines dan hanya dalam 1 set
Nomor set 13 bit Nomor Block dlm main memori adl modulo 2 13 000000, 00A000, 00B000, 00C000 map ke set yang sama
49
set field untuk menentukan set cache set yg dicari Bandingkan tag field untuk mencari datanya Contoh: Address 1FF 7FFC 001 7FFC 1FF 001 Tag Data 1FFF 1FFF Set number 12345678 11223344
50
Tidak ada pilihan Setiap block hanya di map ke 1 line Ganti line tersebut
Hardware implemented algorithm (speed) Least Recently used (LRU) e.g. in 2 way set associative Which of the 2 block is lru? First in first out (FIFO) replace block that has been in cache longest Least frequently used replace block which has had fewest hits Random
Must not overwrite a cache block unless main memory is up to date Multiple CPUs may have individual caches I/O may address main memory directly
All writes go to main memory as well as cache Multiple CPUs can monitor main memory traffic to keep local (to CPU) Lots of traffic Slows down writes Remember bogus write through caches!
cache up to date
51
Updates initially made in cache only Update bit for cache slot is set when update occurs If block is to be replaced, write to main memory only if update bit is set Other caches get out of sync I/O must access main memory through cache N.B. 15% of memory references are writes
Foreground reading Find out detail of Pentium II cache systems NOT just from Stallings!
Basic DRAM same since first RAM chips Enhanced DRAM Contains small SRAM as well SRAM holds last line read (c.f. Cache!) Cache DRAM Larger SRAM component Use as cache or serial buffer
Synchronous DRAM (SDRAM) currently on DIMMs Access is synchronized with an external clock Address is presented to RAM RAM finds data (CPU waits in conventional DRAM) Since SDRAM moves data in time with system clock, CPU knows when CPU does not have to wait, it can do something else Burst mode allows SDRAM to set up stream of data and fire it out in block
52
Foreground reading 53
Check out any other RAM you can find See Web site: The RAM Guide
Magnetic Disk RAID Removable Optical CD-ROM CD-Writable (WORM) CD-R/W DVD Magnetic Tape
Metal atau plastic dilapisi dg material yg bersifat magnet (iron oxide) Jenis kemasan Floppy Winchester hard disk Removable hard disk
Lingkaran konsentris atau track Ada Gap antar track Gap sempit, kapasitas bertambah Jumlah bit per track sama (kerapatan bervariasi) Kecepatan putar tetap Track dibagi menjadi beberapa sector Ukuran minimum block adalah satu sector Satu block bisa berisi lebih dari satu sector
55
Fixed head Ada satu head (r/w) per track Head diletakkan pada tangkai yg tetap Movable head Hanya ada satu head per side Diletakkan pada tangkai yg dpt bergerak
Removable disk Dapat dilepas dari drive dan diganti dg disk lain Memberikan kapasitas simpanan yg tak terbatas Mudah melakukan transfer data antar sistem Nonremovable disk Terpasanang permanen dalam drive
8, 5.25, 3.5 Kapasitas kecil sampai 1.44Mbyte (ada yg 2.88M) Lambat Umum dipakai Murah
Dikembangkan oleh IBM di Winchester (USA) Dikemas dalam satu unit Berisi satu cakram atau lebih Head sangat kecil Handal
56
Umum digunakan Murah Sbg external storage yg sangat cepat Kapasitas semakin besar Dalam orde GB
ZIP Murah Banyak digunakan 100MB JAZ Mahal 1G L-120 (a: drive) Juga dpt untuk membaca 3.5 floppy
Harus dapat mengenali awal suatu track dan sector Format disk Menambahkan informasi tambahan Memberi tanda awal track dan sector
57
Fixed head atau movable head Removable disk atau fixed disk Single side atau double side Single platter atau multiple platter Mekanisme head Contact (Floppy) Fixed gap Flying (Winchester)
Satu head per side Semua head di-join dan di-align Track-track yg setiap platter membentuk cylinder Data dipecah berdasarkan cylinder
58
5.13. Kecepatan
Seek time gerakan head ke track yg dituju (Rotational) latency Putar platter sampai posisi data dibawah head Access time = Seek + Latency Transfer rate
5.14. RAID
Redundant Array of Independent Disks Redundant Array of Inexpensive Disks Ada 6 level Tidak berhirarki Sejumlah disks (fisik) yg dipandang sbg satu drive (logical) oleh Sistem Data tersebar diantara disk fisik
Operasi
5.15. RAID 0
No redundancy Data striped across all disks Round Robin striping Increase speed Multiple data requests probably not on same disk Disks seek in parallel A set of data is likely to be striped across multiple disks
5.16. RAID 1 59
Mirrored Disks Data is striped across disks 2 copies of each stripe on separate disks Read from either Write to both Recovery is simple Swap faulty disk & re-mirror No down time Expensive
5.17. RAID 2
Disks are synchronized Very small stripes Often single byte/word Error correction calculated across corresponding bits on disks Multiple parity disks store Hamming code error correction in corresponding Lots of redundancy Expensive Not used
positions
5.18. RAID 3
info
Similar to RAID 2 Only one redundant disk, no matter how large the array Simple parity bit for each set of corresponding bits Data on failed drive can be reconstructed from surviving data and parity Very high transfer rates
5.19. RAID 4
60
Each disk operates independently Good for high I/O request rate Large stripes Bit by bit parity calculated across stripes on each disk Parity stored on parity disk
5.20. RAID 5
Like RAID 4 Parity striped across all disks Round robin allocation for parity stripe Avoids RAID 4 bottleneck at parity disk Commonly used in network servers N.B. DOES NOT MEAN 5 DISKS!!!!!
Originally for audio 650Mbytes giving over 70 minutes audio Polycarbonate coated with highly reflective coat, usually aluminum Data stored as pits Read by reflecting laser Constant packing density Constant linear velocity
Audio is single speed Constant linier velocity 1.2 ms-1 Track (spiral) is 5.27km long Gives 4391 seconds = 73.2 minutes Other speeds are quoted as multiples e.g. 24x 61
Mode 0=blank data field Mode 1=2048 byte data+error correction Mode 2=2336 byte data
Difficult Move head to rough position Set correct speed Read address Adjust to required location (Yawn!) Large capacity (?)
62
Easy to mass produce Removable Robust Expensive for small runs Slow Read only
CD-Writable WORM Now affordable Compatible with CD-ROM drives CD-RW Erasable Getting cheaper Mostly CD-ROM drive compatible
Digital Video Disk Used to indicate a player for movies Only plays video disks Digital Versatile Disk Used to indicate a computer drive Will read computer disks and play video disks Dogs Veritable Dinner Officially - nothing!!!
Full length movie on single disk Using MPEG compression Finally standardized (honest!) Movies carry regional coding Players only play correct region films Can be fixed
Loads of trouble with standards First generation DVD drives may not read first generation DVD-W disks First generation DVD drives may not read CD-RW disks Wait for it to settle down before buying!
Check out optical disk storage options Check out Mini Disk
Uses rotating head (like video) High capacity on small tape 4Gbyte uncompressed
64
BAB 6 Input/Output
6.1. Input/Output Problems 65
Wide variety of peripherals Delivering different amounts of data At different speeds In different formats All slower than CPU and RAM Need I/O modules
Interface to CPU and Memory Interface to one or more peripherals GENERIC MODEL OF I/O DIAGRAM 6.1
Human readable Screen, printer, keyboard Machine readable Monitoring and control Communication Modem Network Interface Card (NIC)
Control & Timing CPU Communication Device Communication Data Buffering Error Detection
CPU checks I/O module device status I/O module returns status
66
If ready, CPU requests data transfer I/O module gets data from device I/O module transfers data to CPU Variations for output, DMA, etc.
Hide or reveal device properties to CPU Support multiple or single device Control device functions or leave for CPU Also O/S decisions e.g. Unix treats everything it can as a file
67
CPU has direct control over I/O Sensing status Read/write commands Transferring data CPU waits for I/O module to complete operation Wastes CPU time
CPU requests I/O operation I/O module performs operation I/O module sets status bits CPU checks status bits periodically I/O module does not inform CPU directly I/O module does not interrupt CPU CPU may wait or come back later
CPU issues address Identifies module (& device if >1 per module) CPU issues command Control - telling module what to do e.g. spin up disk Test - check status e.g. power? Error? Read/Write Module transfers data via buffer from/to device
6.11. Addressing I/O Devices Under programmed I/O data transfer is very like memory access (CPU viewpoint)
68
Each device given unique identifier CPU commands contain identifier (address)
Memory mapped I/O Devices and memory share an address space I/O looks just like memory read/write No special commands for I/O Large selection of memory access commands available Isolated I/O Separate address spaces Need I/O or memory select lines Special commands for I/O Limited set
Overcomes CPU waiting No repeated CPU checking of device I/O module interrupts when ready
CPU issues read command I/O module gets data from peripheral whilst CPU does other work I/O module interrupts CPU CPU requests data I/O module transfers data
69
Check for interrupt at end of each instruction cycle If interrupted:Save context (registers) Process interrupt Fetch data & store See Operating Systems notes
How do you identify the module issuing the interrupt? How do you deal with multiple interrupts? i.e. an interrupt handler being interrupted
Different line for each module PC Limits number of devices Software poll CPU asks each module in turn Slow
Daisy Chain or Hardware poll Interrupt Acknowledge sent down a chain Module responsible places vector on bus CPU uses vector to identify handler routine Bus Master Module must claim the bus before it can raise interrupt e.g. PCI & SCSI
70
Higher priority lines can interrupt lower priority lines If bus mastering only current master can interrupt
80x86 has one interrupt line 8086 based systems use one 8259A interrupt controller 8259A has 8 interrupt lines
8259A accepts interrupts 8259A determines priority 8259A signals 8086 (raises INTR line) CPU Acknowledges 8259A puts correct vector on data bus CPU processes interrupt
71
ISA bus chains two 8259As together Link is via interrupt 2 Gives 15 lines 16 lines less one for link IRQ 9 is used to re-route anything trying to use IRQ 2 Backwards compatibility Incorporated in chip set
72
Interrupt driven and programmed I/O require active CPU intervention Transfer rate is limited CPU is tied up DMA is the answer
Additional Module (hardware) on bus DMA controller takes over from CPU for I/O
CPU tells DMA controller:Read/Write Device address Starting address of memory block for data Amount of data to be transferred CPU carries on with other work DMA controller deals with transfer 73
DMA controller takes over bus for a cycle Transfer of one word of data Not an interrupt CPU does not switch context CPU suspended just before it accesses bus i.e. before an operand or data fetch or a data write Slows down CPU but not as much as CPU doing transfer
6.27. Aside
What effect does caching memory have on DMA? Hint: how much are the system buses available?
Single Bus, Detached DMA controller Each transfer uses bus twice I/O to DMA then DMA to memory CPU is suspended twice
74
Single Bus, Integrated DMA controller Controller may support >1 device Each transfer uses bus once DMA to memory CPU is suspended once
75
Separate I/O Bus Bus supports all DMA enabled devices Each transfer uses bus once DMA to memory CPU is suspended once
I/O devices getting more sophisticated e.g. 3D graphics cards CPU instructs I/O controller to do transfer I/O controller does entire transfer Improves speed Takes load off CPU Dedicated processor is faster
6.29. Interfacing
Connecting devices together Bit of wire? Dedicated processor/memory/buses? E.g. SCSI, FireWire
Parallel interface 8, 16, 32 bit data lines Daisy chained Devices are independent Devices can communicate with each other as well as host
6.31. SCSI - 1
76
5MHz Data rate 5MBytes.s-1 Seven devices Eight including host interface
6.32. SCSI - 2
1991 16 and 32 bit 10MHz Data rate 20 or 40 Mbytes.s-1 (Check out Ultra/Wide SCSI)
Between initiator and target Usually host & device Bus free? (c.f. Ethernet) Arbitration - take control of bus (c.f. PCI) Select target Reselection Allows reconnection after suspension e.g. if request takes time to execute, bus can be released
Command - target requesting from initiator Data request Status request Message request (both ways)
77
Bus must be terminated at each end Usually one end is host adapter Plug in terminator or switch(es) SCSI Id must be set Jumpers or switches Unique on chain 0 (zero) for boot device Higher number is higher priority in arbitration
High performance serial bus Fast Low cost Easy to implement Also being used in digital cameras, VCRs and TV
78
Daisy chain Up to 63 devices on single port Really 64 of which one is the interface itself Up to 1022 buses can be connected with bridges Automatic configuration No bus terminators May be tree structure
Physical Transmission medium, electrical and signaling characteristics Link Transmission of data in packets Transaction Request-response protocol
Data rates from 25 to 400Mbps Two forms of arbitration Based on tree structure Root acts as arbiter First come first served Natural priority controls simultaneous requests i.e. who is nearest to root Fair arbitration Urgent arbitration
Asynchronous Variable amount of data and several bytes of transaction data transferred To explicit address Acknowledgement returned Isochronous Variable amount of data in sequence of fixed size packets at regular Simplified addressing No acknowledgement
as a packet
intervals
80