Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30
COMPS 260
Computer Architecture and
Operating System
Unit 4 – Input, Output and Computer
Peripherals Input and Output - Devices I/O (input and output) is an important mechanism for a computer to handle tasks in our world. Different IO devices : Keyboards, Monitors, Printers, Mice, Scanner… Different IO devices have different characteristics – speeds, data rate, data transfer types…. IO modules (IO controllers) are used for controlling the IO devices. Input and Output - Buses IO devices are connected with the CPU by buses Different types of buses for different types of IO devices – ISA, PCI, PCIe, SCSI, ATA, SATA, AGP, USB, FIREWIRE (IEEE1394)…. Modes of IO – Synchronous IO control does not return to the user program until IO operation is completed. 1. CPU issues an IO request to IO module 2. Upon receiving the request, IO module instruct the IO device to carry out the action. 3. CPU suspends its operation and wait in a loop for the IO device to complete the action. 4. When IO completes, CPU either detects or being notified about the status. 5. CPU continues with the next instruction. Modes of IO – Asynchronous IO Control returns to the user program after initiating the IO request. The user program either detects or is notified when IO is completed. 1. CPU issues an IO request to IO module 2. Upon receiving the request, IO module instruct the IO device to carry out the action. 3. CPU carry on its other (possible) jobs while IO is carried out.. 4. During the course, CPU either periodically detects or being notified about the status. 5. CPU continues with the next instruction. Modes of IO Synchronous IO cannot make use of the CPU efficiently. At most, 1 IO operation can be carried out at 1 time. No simultaneous IO can be done. Asynchronous IO supports concurrent IO operations. It is not easy to write program to carried out asynchronous IOs, especially in handling exceptions. 3 essential types of IO operations Programmed IO (PIO) CPU is responsible for moving each block of data. Inefficient. 3 essential types of IO operations Interrupt driven IO Interrupt is a signal sent to the CPU by some hardwares, signifying the occurrence of an event. Whenever CPU receives an interrupt signal, it suspends its ongoing process, and performs to the interrupt service routine, whose address is recorded in the interrupt vector while system boots up. After completion of the interrupt service routine, CPU returns to the point that it was interrupted and continues its ongoing job. 3 essential types of IO operations Interrupt driven IO 3 essential types of IO operations Interrupt driven IO CPU sends an IO request to IO module. Then it carries on its ongoing jobs. IO modules once received the request and other relevant information, it performs the IO action. After completion, IO module sends an interrupt signal to CPU as notification. Once CPU got the notification, it handles the result accordingly. 3 essential types of IO operations Direct Memory Access (DMA) A mechanism makes use of interrupt mechanism to achieve high speed data transfer. DMA doesn’t require CPU’s intervention after setting up the data transfer. CPU can carry out other jobs in the course. This is also called “cycle stealing”. After data transfer is completed, an interrupt signal is sent to the CPU as notification. 3 essential types of IO operations Direct Memory Access (DMA) 3 basic conditions that must exist in order to carry out DMA: IO module must be able to read/read memory independently. There must be a way to connect the IO module and the memory directly. There must be a way to resolve the conflict while multiple components want to gain access to memory. 3 essential types of IO operations Direct Memory Access (DMA) 4 pieces of information are required for setting up the action of DMA: Starting address of the memory Starting address in the IO device Size of data needs to be moved Direction of movement. Storage Devices Flash Memory Also known as solid state memory. No moving parts, hence, it is fast compared with disks. Usually smaller in size than disks. So, good for portable devices. Magnetic Disk Magnetic Disk 2 Different arrangement of sectors: Constant Angular Velocity (CAV) Constant Linear Velocity (CLV) Magnetic Disk – Performance Measurement.
Seek Time – The time it takes for the disk
head to move to a designated track. Magnetic Disk – Performance Measurement.
Rotational Delay (Latency) – The time it takes
for a specific sector spins right under the disk head, once it is on the required track. Magnetic Disk – Performance Measurement.
Data Transfer Time – The time that is
required to read the block of data from, or write to, the sector. Magnetic Disk – Performance Measurement. Rotational Delay – it is defined by the motor that spins the disks. This is also cannot be adjusted after the hard disk reaches the market. That’s also why consumers always seek for higher speed hard disks in order to get a higher performance. The best case rotational delay is 0 sec, which is the case if the sector is right under the disk head when the data in the sector is needed. The worst case rotational delay is the time it takes to spin the disk 1 complete revolution, which is when the (starting location of) sector has just left the disk head. In a long run, the average rotational delay is the time it takes to spin the disk 0.5 revolution. Data Transfer time – it is also defined by the motor speed because, while the disk is spinning, the controller must be able to read all the data that a sector contains while it is still under the disk head. The job cannot be split into 2 separate goes. Magnetic Disk – Performance Measurement.
Seek Time – it is the time it takes to move the
disk head to a specific track. The is defined by the speed of the step motor, which cannot be adjusted after the hard disk reaches the market. Even this is so, we can still improve the performance of seek time by re-arranging the services to the disk tasks in order to get a smaller total (or average) seek time. This will be covered in later unit. Optical Disk Data is burnt onto the reflective layer on the disk, which then forms pits and lands. Laser can be reflected when shone to lands, but not on pits. There are different variations of optical disks : CD, DVD, BD Some can be further classified according to their differences in storage capacities. It is also common to classify them according to their ability of being written, re-written. Display Video display has been evolving a lot in the past decades. CRT monochrome, colour Interlaced scanning, progressive scanning LCD / LED Flat Panel Display Parameters that define the quality of a display Size – measured diagonally Resolution – number of pixels that can be shown across the length and breadth of the viewing area Pixel Pitch – the minimum distance between 2 adjacent pixels in order to make them distinguishable. Aspect Ratio – The ratio of the breadth and length of the viewing area. Colour depth – the amount of different colours that can be shown. Brightness – How bright a pixel can be illuminated. Contrast Ratio – The ratio of the max luminance to the minimum luminance. Printer Dot matrix Using colour ribbon to transfer marks onto the paper Slow, because of the mechanical movement of the print head Noisy, because of the noise generated by the impact of pins and the paper Difficult to produce colour printout. Good for the need of carbon transfer copies. Printer Ink jet Colour ink droplets are injected to the paper to form the marks. Slow, because of the mechanical movement of the print head. Quiet. Good to produce colourful printout. Some inks are not waterproof. Cannot support carbon transfer copies. Printer Laser Toner is transfer to the paper by electrostaticity. Fast, because no mechanical movement. Quiet. Sharp image. Long lasting printout. Expensive consumables, especially for colour printout. Most toners are waterproof. Cannot support carbon transfer copies. Printer Heat sublimation Colour wax film is transferred to the paper by heat. Quiet. High quality image. Good for photo printout. Expensive consumables, especially for colour printout. Scanner Sheet fed type and Flat bed type. Quality defined by the resolution of the scans. Editable text can be obtained by OCR softwares.