Download Understanding Input/Output Systems in Computers: Buses, Controllers, and Devices and more Slides Advanced Computer Architecture in PDF only on Docsity! Input/Output • A computer system has three major components: – CPU – Memories (primary and secondary) – I/O (Input/Output) equipment • printers • scanners • modems • etc. Docsity.com Buses – Physically, most PCs have a structure similar to that shown on the next slide. – The PC contains a metal box with a large printed circuit board (the motherboard) at the bottom. The motherboard contains: • CPU chip • Slots for DIMM modules • Various support chips • A bus etched along its length (maybe two) • Sockets into which the edge connectors of I/O boards can be inserted. Docsity.com Logical Structure of a PC
Monitor
+ Flo Hard
Keyboard disk deve disk deive
==
{sz wey | oo | oO 000
. Floppy Hard
Video Keyboard : :
cru Mem ory controller controller con Mae cot atae
Bus
Figure 2-29. Logical structure of a simple personal computer
Docsity.com
Buses – The job of a controller is to control its I/O device and handle bus access for it. – A controller that reads or writes data to or from memory without CPU intervention is said to be performing Direct Memory Access (DMA). – When the transfer is finished, the controller issues an interrupt, forcing the CPU to switch from the running program to an interrupt handler. After this, the OS can resume the suspended job. Docsity.com Buses – The bus is used by both I/O controllers and the CPU. When both want to use the bus, a bus arbiter decides who will go next. In general, I/O devices are given precedence since disks and other moving devices cannot be stopped without losing data. – When no I/O is in progress, the CPU has all the bus cycles for itself to reference memory. When some I/O device is also running, it will request and be granted the bus. This is called cycle stealing and it slows down the computer. Docsity.com Keyboards – On PCs, when a key is depressed, an interrupt is generated and the keyboard interrupt handler is started. – The interrupt handler reads a hardware register inside the keyboard controller to get the number of the key depressed. – When a key is released, a second interrupt is generated. This allow for multikey sequences (including SHIFT, CTRL, and ALT), which are handled entirely in software. Docsity.com CRT Monitors – A monitor is a box containing a CRT (Cathode Ray Tube) and its power supplies. The CRT contains a gun that can shoot an electron beam against a phosphorescent screen near the front of the tube. • Color monitors have three electron guns for read, blue and green. • The CRT is a raster scan device since it produces an image line by line. • A full-screen image is repainted 30 to 60 times a second. Docsity.com CRT Monitors
Grid
Electron gun Screen
Spoton
screen
Wacwut
Vertical
deflection
plate
(a)
Horizontal scan
Verticaltetrace Horizontalretrace
(b)
Figure 2-31. (a) Cross section of aCRT. (b) CRT scanning pattern
Docsity.com
Character-Map Terminals – Three kinds of terminals are in common use: • Character-map terminals • Bit-map terminals • RS-232-C terminals – A character-map terminal is shown on the following slide. – To display characters, the CPU copies them to the video memory in alternate bytes. Associated with each character is an attribute byte that describes how that character is to be displayed. Docsity.com Character-Map Terminals • Attributes include color, intensity, blinking, etc. – A screen of 25 by 80 characters requires 4000 bytes of video memory, 2000 for the characters and 2000 for the attributes. – The video board fetches characters from the video RAM, a line at a time, and generates the necessary signal to drive the monitor. – Because the board outputs a video signal, the monitor must be within a few meters of the computer to prevent distortion. Docsity.com PC Video Output
Character
4 ttribute
Analog video signal
Main Video
cPU memory board
eT Monitor
A2B2C2 ree ————)
RAM ABG
tee
Figure 2-33. Terminal outputon a personal computer.
Docsity.com
Bit-map Terminals – To lessen this requirement, some computers use an 8-bit number to indicate the desired color. This number is then used as an index into a hardware table called the color palette that contains 256 entries, each holding a 24-bit RGB value. This is called indexed color. It reduces the required RAM by 2/3, but allows only 256 colors. – Usually each window on the screen has its own mapping. The palette is changed when a new window gains focus. Docsity.com Bit-map Terminals – To display full-screen full-color multimedia on a 1024x768 display requires copying 2.3 MB of data to the video RAM for every frame. For full-motion video, 25 frame/sec is needed for a total data rate of 57.6 MB/sec. • This is too much for an (E)ISA bus, so high-performance video cards need to be PCI cards. Docsity.com RS-232-C Terminals – To allow terminals to be used with many computer systems, a standard computer-terminal interface called RS-232-C has been developed. – When the computer and terminal are far apart, the only practical way to connect them is over the telephone system. The telephone system, however, is not capable of transmitting the signals required by RS-232-C, so a device known as a modem (modulator-demodulator) has to be used. Docsity.com Mice • A mouse is used as a pointing device. The mouse can have one, two, or three buttons. • Three kinds of mice have been produced: – mechanical mice – optical mice – electromechanical mice • The optical mouse is used on top of a special plastic pad containing a rectangular grid of lines. – A common arrangement is to have the mouse send a sequence of three bytes every time the mouse moves a certain minimum distance (e.g. 0.01 inch). Byte 1 gives movement in the x direction, 2 in the y direction and 3 gives the state of the mouse buttons. Docsity.com Mouse buttons
Mousa
Rubber ball
Mouse
Pointer contrallad by mouse
cut
e- [Pas te
Copy
Figure 2-35. A mouse being used to point to menu items.
Docsity.com
Printers – The cheapest kind of printer is the matrix printer, in which a print head of between 7 and 24 lines is scanned across each page. • Print quality can be increased by two techniques: – use more needles – have the dots overlap – Inkjet printers have a movable print head which holds an ink cartridge and is swept horizontally across the paper • An ink droplet inside a nozzle is heated to the boiling point, explodes out the front of the nozzle. Docsity.com Pr
File Edit Options Yiew Orientation Medi
Laser Printers
iow [-[o]
Help
File: figs2.ps 146, 55Spt_ Page: "38" 38 of 43
al
2 Rotating octagonal
i Laser .
yee mirror
2 Cb
Gg |
+ | Drum sprayed and charged
= I
= |
+5) \
iesI Light beam
5 1
strikes drum e
q Drum
a
Lf
(I 3
VB scraper
6 .
— Dis charger
C5
O Cs QO
O
Heated
rollers
Blank Stacked
paper output
Figure 2-37. Operation of a laser printer,
al Jo
Docsity.com
Laser Printers
Figure 2-38. Halftone dots for various gray scale ranges. (a)
0-6. (b) 14-20. (c) 28-34. (4) 56-82. (e) 105-111. (£E) 161-167.
Docsity.com
Color Printers – Nearly all color printing systems use four inks: cyan, magenta, yellow, and black. These systems are called CMYK printers. • In theory, CMY should be enough, but due to impurities in the ink, it is difficult to produce a pure black. • The lowest cost color printers are color ink jet printers which work with four ink cartridges. • Solid ink jet printers use a waxy ink which is melted into hot ink reservoirs. The ink is sprayed onto the paper where is solidifies and is fused with the paper by forcing it between two hard rollers. Docsity.com Modems • In frequency modulation, the voltage level is constant, but the carrier frequency is different for 1 and 0. • In phase modulation, the phase of the carrier is reversed 180 degrees when the data switch from 0 to 1, or 1 to 0. More sophisticated phase-modulated schemes are also possible. • Modems accept 8-bit characters and serialize them for transmission on the phone lines in amplitude-, frequency-, or phase-modulated form. Docsity.com (a)
(b)
fe}
Modems
0 1 0 0 1 0 1 1 0 0 0 1 0 oO
Ve
go Vi | 1 1 1
PP 1 1 1 1 1 1 1 1
2 4 hor lamas bo lame,
s ' ' ' ' ' ' am plitude I jam plitad 2
wee vey I treauency fo te coe
if ot | jequency | I tequency
\
|
SSS Sete Canes
Figure 2-39. Transmission of the binary number
01001011000100 over a telephone line bit by bit. (a) Two-
lewel signal. (b) Amplitude modulation. (c}) Frequency modu-
lation. (d) Phase modulation
Docsity.com
ISDN – ISDN (Integrated Services Digital Network) is a standard for digital telephony. – A digital ISDN line holds two independent digital channels at 64,000 bits/sec each plus a signaling channel at 16,000 bits/sec. – ISDN allows quicker connection, requires no modem, and is more reliable. – Specialized equipment must be installed to use ISDN. Docsity.com