You are on page 1of 7

2/10/2010

Input output Interface
• Peripherals are electromechanical  or 
electromagnetic or optical or..; 
I/O (Ch 1) • Working/operation is different
• Data transfer rate is different
f i diff
• Data codes and formats are different
• Operating modes are different

rajashree.jw@sicsr.ac.in       

I/O Device Examples


Device Behavior Partner Data Rate (KB/sec)
Keyboard Input Human 0.01
Connection between CPU and I/O Mouse Input Human 0.02
Line Printer Output Human 1.00
Floppy disk Storage Machine 50.00
Laser Printer Output Human 100.00
Address
dd ess Bus
us Data Optical Disk Storage Machine 500.00
Data Bus I/O
CPU Interface Control Magnetic Disk Storage Machine 5,000.00
Device
Control Bus Network-LAN In or Out Machine 20 – 1,000.00
I/O Device Graphics Display Output Human 30,000.00

The Above Given Differences Principles of IO interface


Have to Be Resolved Using „ Types of I/O
„ I/O mapped I/O
Special Hard Ware Called „ Memoryy Mapped
pp I/O
Input Output Interface „ Transmission format
„ Asynchronous
„ Synchronous
„ Method of transfer
„ Parallel data
„ Serial data

1
2/10/2010

I/O System Design Issues


„Performance Interfacing I/O devices
„Expandability
• How does the CPU request I/O?
Processor
interrupts – special instructions in the instruction set
– memory mapped I/O
interface
Cache • How does the I/O device contact the CPU?
H d th I/O d i t t th CPU?
– Interrupts
Memory - I/O Bus
• How do we transfer data to/from device?
Main I/O I/O I/O – programmed transfer 
Memory Controller/ Controller Controller
interface interface interface – DMA
Disk Disk Graphics Network
rajashree.jw@sicsr.ac.in       

• I/O processor
How to move data? – synchronous high speed transfers from 
• programmed I/O memory
– CPU moves data from I/O into CPU regs, and 
then out to memory
– “super DMA” device that evolves with the CPU‐
– how does CPU know when to move data? memory bus structure
– whether this transfer mode is suitable?
• DMA(Direct Memory Access) – functionality and speed similar to a CPU, as 
– initiated by CPU opposed to “slave” mode in DMA device
– start address (virtual or real?), count specified 
to I/O
– DMA devices and CPU compete for memory 
cycles, who should be given priority?
rajashree.jw@sicsr.ac.in        rajashree.jw@sicsr.ac.in       

Buses • Components Buses


– address lines
• how to connect I/O devices to CPU? – data lines
– separate I/O bus – control lines
• optimize each bus (I/O and memory) individually
• Synchronous control
• separate I/O instr. in processor architecture
separate I/O instr. in processor architecture
• Asynchronous control
h l
– memory mapped I/O
• this is the trend in state‐of‐the‐art processors 
• Arbitration
• device regs. mapped to memory space – daisy chain
– centralized parallel arbitration
– distributed arbitration by self selection
– distributed arbitration by collision detection
rajashree.jw@sicsr.ac.in        rajashree.jw@sicsr.ac.in       

2
2/10/2010

Storage Devices and Storage Media Mass Storage
• Disk
• Storage Media: Hardware where the data is  – surfaces (2 per platter), tracks, sectors, head 
actually stored. assembly, RPM
Ex: CD, Flash Memory card • all tracks have same number of sectors
• all sectors record same number of bits
• Storage Device: Where the corresponding storage 
• logical cylinder 
device is inserted
device is inserted – a set of corresponding tracks on all surfaces
They are two separate pieces [CD and CD Drive] • characteristics
– seek time, rotational latency, data transfer rate
Fixed Media Storage system – typical numbers
Better reliability, higher speed and a lower cost. • 20 surfaces, 1000 tracks, 128 sectors capacity=?
Removable Media storage system:  • transfer rate: 20 MB/sec, avg. seek time: a few ms, 
avg. rotational latency: a few ms 
Unlimited capacity, portability 
rajashree.jw@sicsr.ac.in        rajashree.jw@sicsr.ac.in       

More RAM = Better Performance!


minimize “swapping”
rajashree.jw@sicsr.ac.in       

Storage Systems
• Hard Drives
– 2 Types: SCSI and IDE
• IDE drives‐
– originally
originally developed as alternative to more expensive SCSI 
developed as alternative to more expensive SCSI
drives. 
– Modern versions called EIDE drives. 
– Support up to 4 multigigabyte drives. 
– If you want more devices, use SCSI or USB
– Low‐level formatted at the factory

rajashree.jw@sicsr.ac.in       

3
2/10/2010

Hard Drive Tracks and sectors
Can store
512 bytes

Sector = Track=
small arc concentric
of track circle

How Data is Organized on Disk
Disk access time
• Tracks‐
– circular areas of the disk 1. seek time 
– Length of a track one circumference of disk Move the read write head to the cylinder 
– Over 1000 on a hard disk
– Data first written to outer most track
that contains the desired data: 
• Sectors‐ 2. latency time/rotational delay 
– Divides tracks sections 
Divides tracks sections Rotate the disks into proper position so the
Rotate the disks into proper position so the  
– On a floppy 9 sectors exits
• Cylinders‐ R/W heads are located over the part of the 
– Logical groupings of the the same track on each disk surface in a disk  cylinder to be used: 
unit
• Clusters‐ 3. Data Movement time
– Groups of sectors used by operating system
– 64 sectors in one cluster

rajashree.jw@sicsr.ac.in       

Hard Disks Low Level Formatting
• Low‐level format‐ organizes both sides of each  • Low level format scans disk for defects and 
platter into tracks and sectors to define where  sets aside sectors with defects so they are not 
items will be stored on the disk.  used for data.
• Partitioning: divide hard disk into separate areas 
Partitioning: divide hard disk into separate areas • IDE drives should never
IDE drives should never be low level formatted 
be low level formatted
called partitions; each partition functions as if it  by a user or technician. Only high level format 
were a separate hard disk drive.  necessary.
• High‐level format defines the file allocation table 
(FAT) for each partition, which is a table of 
information used to locate files on the disk.

4
2/10/2010

Installing IDE/EIDE drives Floppies
• IDE supports TWO drives in a system  • Two sizes
– one master (boot disk) and one slave – 3.5 inch
– set master and slave using jumpers – 5.25 inch
• EIDE supports FOUR
t FOUR drives per system
di t • 3.5
3.5 inch holds 1.44 MB for High density and 
inch holds 1.44 MB for High density and
750 KB for Double Density
– 2 drives on each of 2 cables
• Connected with 34 pin ribbon cable
– only one master, all others are slaves
• Two Floppy Drives possible
• IDE and EIDE drives both use 40‐pin ribbon 
• Has twist in cable to distinguish A drive from B 
cable aligned to pin 1
drive

SCSI Installing and configuring SCSI
• Pronounced Scuzzy
• Small Computer Systems Interface • SCSI bus supports 8 devices
• For wide range of peripheral devices, including hard  • There are eight SCSI IDs numbered 0 through 
disks, tape drives, optical drives, CD‐ROMs and disk  7
arrays. 
• ID 7
ID 7 is always reserved for the SCSI host 
is always reserved for the SCSI host
• 8 devices can connect to a daisy chain adapter
• This chain must be terminated at both ends
• SCSI hard disk, if used as a boot drive, is 
• Each device on chain is assigned unique device ID  assigned SCSI ID 0
number that is determined by jumpers or DIP switches
• If you have both IDE and SCSI hard drive, IDE 
drive should be boot drive

Types of SCSIs RAID
• SCSI 1‐ 5 MB transfer rate, Centronics 50 pin  • Redundant Array of Independent Disks
or DB 25, has 8 bit bus • Category of disk drives that employs 2 or more 
• SCSI 2 ‐also SCSI Fast Wide, includes 16 bit bus  drives in combination for fault tolerance (error 
, called Wide SCSI, and twice as fast transfer 
called Wide SCSI and twice as fast transfer recovery)
rate • 10 levels of RAID 
• SCSI 3‐ Includes Ultra SCSI, Wide Ultra SCSI,  • 3 on test will be:
and Ultra 2 SCSI, 16 bit bus with up to 80  • RAID 0, RAID 3, RAID 5
MBps transfer rate

5
2/10/2010

RAID continued Interleaving
• RAID 0‐ Striped disk without parity • Allows the read/write head to use the rotation 
• RAID 3‐ Parallel transfer with parity of the disk to its advantage
• RAID 5‐ Data striping with parity • One sector is written to and the disk skips to 
several sectors down
several sectors down

Formatting Operating System File Systems
• Low level formatting done at factory • DOS uses FAT
– Builds the File Allocation Table (FAT) • Windows 3.x uses Virtual FAT
– Physically scans the disk media for defects • Win 95 uses VFAT and FAT32
• R
Remember FAT is always located at Track 0
b FAT i l l t d tT k0 • Win NT uses NTFS
• High level formatting is automatically done 
during installation of operating system

Partitioning Partitioning 
• FDISK command is used • Extended can be divided up to 23 times on disk. 
• Divides hard drive into logical subdivisions  • Partitioning disks improves disk efficiency through 
which are seen by the operating system as  reduced cluster size.
separate logical hard disks. 
p g • In DOS, Win 3x and early versions of Win 95 a hard 
In DOS, Win 3x and early versions of Win 95 a hard
• Hard drives divided into primary and extended  disk over 2 GB must be divided into smaller prtions
partitions. The primary partition boots the  • Now Win 95 and Win 98 can create a primary 
system. Can have up to 4 primary partitions partition of up to 8 GB
• Following partition, the first sector on cylinder 0 
reserved for master boot record

6
2/10/2010

Disk compression Backing up data
• Reduce amount of space taken up by files by  • Archival: full backup‐ contains everything from 
substituting codes for repeating patterns of  the hard disk
data
• Incremental: contains only files that have 
p ,
• To access data on compressed disk, must load  been modified since last (previous) backup
been modified since last (previous) backup
disk compression utility into RAM first
• This disk compression utility works between  • Differential: backs up all the data modified 
OS and disk controller to intercept requests  since last full backup
and compress or decompress files‐ the result  • Copy backup: copy duplicate of file, directory, 
is slower disk access or disk to another disk

You might also like