780 likes | 953 Views
TK 6123 COMPUTER ORGANISATION & ARCHITECTURE. Lecture 10: Computer Peripheral. Contents. This lecture will discuss: storage devices input devices and output devices. Introduction.
E N D
TK 6123COMPUTER ORGANISATION & ARCHITECTURE Lecture 10: Computer Peripheral
Contents • This lecture will discuss: • storage devices • input devices and • output devices.
Introduction • The peripherals are referred to all the items that are external to the CPU, main memory and power supply. These includes: • Thumb drive, a floppy disk drive, a hard disk drive, serial ports, parallel port(s), USB ports, a keyboard, a mouse, a network interface, CD-ROM or DVD-ROM drive, a sound system, a modem, a monitor, tape drives, scanners, printers, plotters, and audio, video input devices, etc. • Some of the peripherals use the parallel, USB, and serial ports as their interconnection point to the computer. • Others have their own interface to the system bus.
Introduction • Peripheral devices are classified as • storage devices (secondary memory) • Flash memory • Magnetic Disk • Magnetic tape • CD-ROM : (your assignment) • Etc. • input devices • Keyboard • Mouse • Touch screen • Graphics tablets • Etc. • output devices • Printers : (your assignment) • Scanners • Displays • Etc.
Secondary/External Memory • Is treated as I/O. • Data and programs in secondary storage must be copied to primary memory for CPU access. • Except for flash memory, secondary storage is significantly slower than primary storage, and flash memory is expensive compared to other forms of secondary storage. • Most secondary storage devices are mechanical in nature, and mechanical devices are usually slower than devices that are purely electronic.
Secondary/External Memory • Advantages of secondary storage, • Its permanence • The magnetic media used for disk and tape and the optical media used for disk retain the data indefinitely. • Capable of storing massive amounts of data. • Used for offline archiving, for transferring programs and data from machine to machine, installation purposes, and for offsite backup storage. • Relatively inexpensive compared to main memory.
Types of Secondary Memory • Flash memory • Thumb drive • Magnetic Disk • RAID • Removable • Optical • CD-ROM • CD-Recordable (CD-R) • CD-R/W • DVD • Magnetic Tape
USB flash drives • Typically small, lightweight, removable and rewritable. • Memory capacity typically ranges from 8 MB up to 64 GB, limited only by current flash memory densities. • As capacity increases, so does price. • Several advantages over other portable storage devices: • Generally faster, hold more data, and are considered more reliable (due to their lack of moving parts) than floppy disks.
USB flash drives • A flash drive has a small PCB encased in a robust plastic or metal casing, making the drive sturdy enough to be carried about in a pocket. • Only the USB connector protrudes from this protection, and is usually covered by a removable cap. • Most flash drives use a standard type-A USB connection allowing them to be connected directly to a port on a personal computer. • Most flash drives are active only when powered by a USB computer connection, and require no other external power source or battery power source.
USB flash drives • The controller contains a small RISC microprocessor and a small amount of on-chip ROM and RAM. • Flash storage devices are best compared to other common, portable, swappable data storage devices: floppy disks, Zip disks, and CD-R/CD-RW discs. 3.5 inch floppy disks and Iomega Zip disks.
USB flash drives • An obvious extension of flash memory would be as a replacement for hard disks. • Flash memory does not have the mechanical limitations and latencies of hard drives. • is attractive when considering speed, noise, power consumption, and reliability • However, the cost per gigabyte of flash memory remains significantly higher than that of platter-based hard drives.
Magnetic Disk • A magnetic disk consists of one or more flat, circular platters made of glass, metal, or plastic, and coated with a magnetic substance similar to that used on cassette tape. • Substance used to be aluminium • Now glass • Improved surface uniformity • Increases reliability • Reduction in surface defects • Reduced read/write errors • Better shock/damage resistance
Magnetic Disk • There are two major types of magnetic disks, hard disks and floppy disks or diskettes. • The design of a floppy disk limits the number of surfaces to two, specifically the top and bottom of the single disk platter within its diskette case. • Most hard disk drives contain several platters, all mounted on the same axis, with heads on each surface of each platter.
Magnetic Disk • The heads move in tandem, so they are positioned over the same point on each surface. • With the head in a particular position, it traces out a circle (track) on the disk surface as the disk rotates; • Since the heads on each surface all line up, the set of tracks for all the surfaces form a cylinder. • Each track contains one or more blocks of data, which commonly divided into equally sized pie shape segments (sectors). • Each sector on a single track contains one block of data, typically 512 bytes, and represents the smallest unit that can be independently read or written.
Disk Velocity • Bit near centre of rotating disk passes fixed point slower than bit on outside of disk • Increase spacing between bits in different tracks • Rotate disk at constant angular velocity (CAV) • Gives pie shaped sectors and concentric tracks • Individual tracks and sectors addressable • Move head to given track and wait for given sector • Waste of space on outer tracks • Lower data density • Can use zones to increase capacity • Each zone has fixed bits per track • More complex circuitry
Disk Layout Methods Diagram Multiple zone recording - A few high-density disks are designed with a different number of sectors in different tracks. This technique uses a constant speed motor but compensates for different transfer speeds in the controller.
Finding Sectors • Must be able to identify start of track and sector • Format disk • Additional information not available to user • Marks tracks and sectors
Characteristics • Fixed (rare) or movable head • Removable or fixed • Single or double (usually) sided • Single or multiple platter • Head mechanism • Contact (Floppy) • Fixed gap • Flying (Winchester)
Fixed/Movable Head Disk • Fixed head • One read write head per track • Heads mounted on fixed ridged arm • Movable head • One read write head per side • Mounted on a movable arm
Removable or Not • Removable disk • Can be removed from drive and replaced with another disk • Provides unlimited storage capacity • Easy data transfer between systems • Nonremovable disk • Permanently mounted in the drive
Multiple Platter • One head per side • Heads are joined and aligned • Aligned tracks on each platter form cylinders • Data is striped by cylinder • reduces head movement • Increases speed (transfer rate)
Hard Disk • Hard disk drives are accessed over one of a number of bus types: • Parallel ATA (PATA, also called IDE or EIDE), • Serial ATA (SATA), • SCSI, • Serial Attached SCSI (SAS), and • Fibre Channel. • Bridge circuitry is sometimes used to connect hard disk drives to buses that they cannot communicate with natively, such as IEEE 1394 and USB.
Floppy Disk • 8”, 5.25”, 3.5” • Small capacity • Up to 1.44Mbyte (2.88M never popular) • Slow • Universal • Cheap • Obsolete?
Floppy disks vs hard disks • A little difference between the operation of floppy disks and hard disks, but the mechanical differences have important effects on the overall capacity, speed, data transfer rate, and reliability of hard drives versus floppy disks. • Capacity: hard disk > a floppy disk • The heads on a hard disk do not touch the surface; rather, they ride on a bed of air a few millionths of an inch above the surface - allows the disk to rotate at high speed and also allows the designers to locate the tracks very close together. The result is a disk that can store large amounts of data and that retrieves data quickly.
Floppy disks vs hard disks • Because the floppy disk is soft and flexible, • it is necessary to support the disk surface as data is being read and written. • To do so, the disk is pinched lightly between two heads, one on each surface of the disk. • As a result of this physical contact between the disk surface and the heads, the disk must be rotated more slowly, so as not to wear out the heads or scrape the disk surface. • A typical hard disk rotates at 5400 revolutions per minute (rpm), 7200rpm, or even 10,800rpm. • The floppy disk rotates at 360 rpm.
Winchester Hard Disk • Developed by IBM in Winchester (USA) • The entire assembly is sealed to prevent dirt particles from wedging between the heads and the disk platter. • One or more platters (disks) • Heads fly on boundary layer of air as disk spins • Very small head to disk gap • Getting more robust
Winchester Hard Disk • Universal • Cheap • Fastest external storage • Getting larger all the time • 250 Gigabyte now easily available
Speed • Seek time • The arm first moves the head from its present track until it is over the desired track. • The average seek time is used as a specification for the disk. • Rotational latency (or rotational delay or latency time) • Once the head is located over the desired track, the read/write operation must wait for the disk rotate to the beginning of the correct sector. For a typical hard disk rotating at 3600 revolutions per minute, or 60 revolutions per second, the average latency is: ½ * 1/60 = 8.33msec
Speed • Access time = Seek + Latency • Transfer time – is the time required to transfer the block. The transfer time is defined by: Transfer time = For example, a hard disk rotating at 3600 rpm (or 60 revolutions per second), with 30 sectors per track. The transfer time for a single block would be: 1/(30*60) =0.55 msec
BERNOULLI DISK DRIVES • Bernoulli disk drives offer a hybrid approach to disk design that embodies the advantages of both floppy disk and hard disk technology. • The disk platter is a 3 1/2” floppy disk housed in a removable plastic shelled cartridge slightly thicker than that of a standard floppy disk. • The floppy disk platter spins at about 3000 rpm. • The Bernouffi principle states that a low-pressure layer is formed next to a surface moving rapidly in a fluid medium such as air.
BERNOULLI DISK DRIVES • The more rapid the surface is moving, the lower the pressure. • When not operating, the floppy medium bends away from the read/write head. • A cushion of air keeps the head from touching the surface. • Thus, the Bernoulli cartridge has the advantages of a hard disk drive, but with the flexibility of an inexpensive, removable cartridge.
BERNOULLI DISK DRIVES • Notice that when something goes wrong, the tendency of the Bernoulli disk is to fall away from the head, thus protecting the device from head crashes. • Because of the design, the Bernoulli drive uses only one surface and has only a single head. • Example: Zip drives
Disk Array • In larger computer environments, that provide program and data storage facilities for a network, it is common to group multiple disks together. • Such a grouping of two or more disk drives is called a disk array or a drive array. • A disk array can be used to reduce overall data access time by sharing the data among multiple disks and also to increase system reliability. • The assumption made is that the number of blocks to be manipulated at a given time is large enough and important enough. • Example: RAID (Redundant array of inexpensive disks).
RAID • Redundant Array of Inexpensive Disks (defined by Patterson et al., 1988). • Redundant Array of Independent Disks (industry redefined ‘I’ to be ‘Independent’) • 7 levels in common use: RAID 0, RAID 1,….RAID 6 • Not a hierarchy but designate different design architecture. • Set of physical disks viewed as single logical drive by O/S • Data distributed across physical drives • Can use redundant capacity to store parity information
RAID • Two standard methods of implementing a disk array: • mirrored array • Has two or more disk drives. • each disk stores exactly the same data. • During reads, alternate blocks of the data are read from different drives, then combined to reassemble the original data – faster access time. • striped array • requires a minimum of three disk drives. • one disk drive is reserved for error checking. • A file segment to be stored is divided into blocks, which are then written simultaneously to different disks.
Example: RAID 0 • No redundancy • Data striped across all disks • Round Robin striping • Increase speed • Use in supercomputer where performance and capacity are important and low cost is more important than reliability.
Example: RAID 1 • 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
Magnetic Tape • Serial access • Slow • Very cheap • Backup and archive
MAGNETIC TAPE • Is used for secondary storage: • when offline storage is acceptable or preferred, • when the data storage capacity requirements exceed those of a floppy disk and • when sequential access is adequate. • Tape is nonvolatile, and the data can be stored indefinitely. • Modern computers all use tape cartridges for offline storage. • easy to mount and dismount, • and small and easy to store. • Some can store as much as 300GB of compressed data.
DISPLAYS • A computer display (also known as a computer monitor, computer screen, or computer video display) is a device that can display signals generated by a computer as images on a screen. • It is used to display image (or text) to the user. • An image made up of thousands of individual pixels, or picture elements, arranged to make up a large rectangular screen. • Each pixel is a tiny square on the display. • A typical screen/display is made up of 768 rows of 1024 pixels each, known as a 1024 x 768 pixel screen. • Screens of 640 x 480 pixels or 800 x 600 pixels are also still in use, and resolutions of 1280 x 1024 pixels, or even higher have become common, especially on physically larger screens.