Block-2 Memory and Input-Output Organisation
Block-2 Memory and Input-Output Organisation
Computer Organisation
Indira Gandhi
National Open University
School of Computer and
Information Sciences
Block
2
Memory and Input/Output Organisation
UNIT 5
The Memory System
UNIT 6
Advance Memory Organisation
UNIT 7
Input/Output Organisation
UNIT 8
Device Technology
FACULTY OF THE SCHOOL
Prof P. V. Suresh, Director Prof. V. V. Subrahmanyam
Dr Shashi Bhushan Mr Akshay Kumar
Mr M. P. Mishra Dr Sudhansh Sharma
PRINT PRODUCTION
March, 2021
© Indira Gandhi National Open University, 2021
All rights reserved. No part of this work may be reproduced in any form, by mimeograph or any other
means, without permission in writing from the Indira Gandhi National Open University.
Further information on the Indira Gandhi National Open University courses may be obtained from the
University’s office at Maidan Garhi, New Delhi-110068.
Printed and published on behalf of the Indira Gandhi National Open University, New Delhi by the
MPDD, IGNOU, New Delhi
Laser Typesetting : Akashdeep Printers, 20-Ansari Road, Daryaganj, New Delhi-110002
Printed at :
BLOCK 2 INTRODUCTION
In the first block this course, you are introduced to basic computer architectures, instruction execution, data
representation and logic circuits of a computer system. This Block covers two of the most important units that are part of
computer system architecture, viz. the memory system and Input/output system. This block consists of 4 units (unit 5 to
unit 8).
Unit 5 explains the basic memory hierarchy of a computer system. It also explains different kinds of memories used in a
computer system. The logic of RAM and ROM has also been explained in details. The unit also discusses secondary
memories like magnetic and optical disks in details.
Unit 6 provides details on advance memory organisation. It provides details on different aspects of cache memory and
main memory to cache mapping schemes. This unit also discusses the concept of interleaved memory, associative
memories and virtual memories used in a computer system.
Unit 7 explains the basic interfaces and mechanisms that are used to perform input and output. This unit also presents the
concept of DMA and input/output processor.
Unit 8 introduces you to basic technology of some of the popular input/output devices including keyboard, mouse,
monitor, printer etc.
A course on computers can never be complete because of the existing diversities of the computer systems. Therefore, you
are advised to read through further readings to enhance the basic understanding that you will acquire from the block.
1) Mano M Morris, Computer System Architecture, 3rd Edition/Latest Edition, Prentice Hall of India Publication,
Pearson Education Asia
2) Stallings W., Computer Organization & Architecture: Designing For Performance, 10th/11th Edition, Pearson
Education Asia
3) Hennessy/Patterson, Computer Organization and Design : The Hardware/ Software Interface; 5th/6th Edition,
Morgan Kaufmann.
The Memory System
UNIT 5 THE MEMORY SYSTEM
Structure Page Nos.
5.0 Introduction
5.1 Objectives
5.2 The Memory Hierarchy
5.3 SRAM, DRAM, ROM, Flash Memory
5.4 Secondary Memory and Characteristics
5.4.1 Hard Disk Drives
5.4.2 Optical Memories
5.4.3 Charge-coupled Devices, Bubble Memories and Solid State Devices
5.5 RAID and its Levels
5.6 Summary
5.7 Answers
5.0 INTRODUCTION
In the previous block, fundamentals of a computer system were discussed. These
fundamentals included discussion on von-Neumann architecture based machines,
instruction execution, representation of digital data and logic circuits etc. This Block
explains the most important component of memory and Input/output systems of a
computer. This unit covers the details of the Memory. This unit discusses issues
associated with various components of the memory system, the design issues of main
memory and the secondary memory. Various characteristics of secondary memory and
its types that are used in a computer system, would also be discussed. The unit also
defines how multiple disks can be used to create a redundant array of disks that can be
used to provide a faster and reliable storage.
5.1 OBJECTIVES
After going through this Unit, you will be able to:
explain the key characteristics of various types of memories and memory hierar-
chy;
explain and differentiate among various types of random access memories;
explain the characteristics of secondary storage devices and technologies;
explain the latest secondary storage technologies;
identify the various levels of RAID technologies
In subsequent sections and next unit, we will discuss various types of memories in
more detail.
1. RAS (Row Address Strobe): On the falling edge of RAS signal, it opens or strobe
the address lines (rows) to be addressed.
2. /CAS (Column Address Strobe): Similar to /RAS, on the falling edge, this enables a
column to be selected as mentioned in the column address from the rows opened by
the /RAS to complete the read-write operation.
3. R/(/W), Write enable: This signal determines whether to perform a read operation
or a write operation. While the signal is low, write operation is enabled and data input
is also captured on falling edge of /CAS whereas high enables the read operation.
4. Sense amplifier compares the charge of the capacitor to a threshold value and
returns either logic “0” or logic “1”.
For a read operation once the address line is selected, transistor turns ON and opens
the gate for the charge of the capacitor to move to the bit line where it is sensed by the
sense amplifier. Write operation is performed by applying a voltage signal to the bit
line followed by the address line allowing a capacitor to be charged by the voltage
signal.
A block diagram of 2m× n ROM looks similar to that of RAM. As ROM is a read-only
memory there is no need of explicit read and write signals. Once the chip is selected
using chip select signals a data word is read and placed on to the data bus. Hence, in
the case of ROM, you need an unidirectional data bus i.e. only in output mode as
shown in figure 5.7. Another interesting fact about ROM is that, ROM offers more
memory cells and thus, memory as compared to the RAM for same size chip.
10
T Memory Syystem
The
m m
As shhown in Figu ure 5.7, 2 × n ROM has 2 words of n bits each foor which it haas m
addreess lines and n output datta lines. For example, in 128 × 8 ROM M, you have 128
memmory words off 8-bit each. For
F 128 × 8 ROM R i.e. 2m = 27, m = 7, yoou need 7 adddress
lines (minimum number
n of bitss required to represent
r 1288) and 8-bit ou
utput data buss.
Figurre 5.8 shows a 32×8 ROM M.
Flash Memory
Flash memory is a non-volatile semiconductor memory which uses the programming
method of EPROM and erases electrically like EEPROM. Flash memory was
designed in 1980s. Unlike, EEPROM where user can erase a byte using electrical
signals, a section of the memory or a set of memory words can be erasable in flash
memory and hence the name flash memory i.e. which erases a large block of memory
at once. Flash memory is easily portable and mechanically robust as there is no
mechanical movement in the memory to read-write data. Flash memory is widely used
in USB memory, SD and micro SD memory cards used in cameras and mobile phones
respectively.
There are two types of flash memory, viz. NAND flash memory, where read operation
is performed by paging the contents to the RAM i.e. only a block of data is accessed
not an individual byte or word; and NOR flash memory, which are able to read an
individual memory byte/word or cell.
Erase
Write Volatile/
Memory Type Mechanism/
Mechanism Non- Volatile
Level
Random-access
Read–Write Electrical/ Byte Electrical Volatile
Memory (RAM)
Read –only
Read–Only Not Applicable Masks Non-volatile
Memory (ROM)
Programmable
Read–Only Not Applicable Electrical Non-volatile
ROM (PROM)
Erasable PROM Read-
UV light/ Chip Electrical Non-volatile
(EPROM) mostly
Electrically
Read- Electrical/
Erasable Electrical Non-volatile
mostly Byte
(EEPROM)
Read- Electrical/
Flash memory Electrical Non-volatile
mostly Block
……………………………………………………………………………………
……………………………………………………………………………………
12
3. A memory has a capacity of 16K 16 The Memory System
(a) How many data input and data output lines does it have?
(b) How many address lines does it have?
……………………………………………………………………………………
……………………………………………………………………………………
4. A DRAM that stores 4K bytes on a chip and uses a square register array. Each
array is of size 4 bits. How many address lines will be needed? If the same
configuration is used for a chip which does not use square array, then how many
address lines would be needed?
………………………………………………………………………………………
………………………………………………………………………………………
5. How many RAM chips of size 256K 4 bit are required to build 1M Byte
memory?
……………………………………………………………………………………...
……………………………………………………………………………………...
13
Basic Computer Orga
anisation for writing.. HDD is coomposed of manym concenntric magneticc disks mounnted on a
central shaft
ft as shown in Figure 5.8.
Two motorss are used in HDD. First one o is called the spindle motor,
m which is used to
d motor is used to move
rotate the sppindle on whiich all the plattters are mouunted. Second
the read/write heads across the entire surface of the platter radially and is called The Memory System
actuator or access arm.
Magnetic Read and Write Mechanisms
During a read/ write operation, read/write head is kept stationary while platter is
rotated by the spindle motor. As you know, data on the disk is recorded in the form of
magnetic field. The current is passed through the read/write head which induces a
magnetic field on the surface of platter and thus, records a bit on the surface. Different
directions of current generates magnetic fields with different polarities and hence are
used for storing “1” and “0”. Similarly, to read a bit from the surface, the magnetic
field is sensed by the read/write head which produces an electric current of the same
polarity and hence the bit value is read.
Data Organization and Formatting
As discussed and shown in figure 5.8, hard disk drives consists of number of
concentric platters which are mounted on a spindle forming a cylindrical structure.
Data is written in the form of magnetic fields on both surfaces of these platters and is
read by read/write head which is connected to an actuator. In this section, we will
discuss structure of magnetic disk in detail.
Structure of the disk is shown in figure 5.10. As you know, each magnetic disk is a
circular disk mounted on a common spindle but entire disk space is not used for data.
Disk surface is divided in to thousands of concentric circular regions called tracks.
The width of every track is kept the same. Data is stored in these tracks. Magnetic
field of one track should not affect the magnetic region in the other track thus two
tracks are kept apart with each other by a constant distance. Further, each track is
divided into number of sectors and two sectors are kept apart using inter-sector gap.
Data is stored in these sectors. Each track forms a cylindrical structure with other
tracks on other platters below or above it. For example, an outer most cylinder will
have outer most track of all the platters. So, if we have n tracks in a platter then there
will be n concentric cylinders too.
Components of the drive are controlled by a disk controller. Now a days, disk
controllers are built in to the disk drive. A new or blank magnetic disk is divided into
sectors. Each sector has three components: header, 512 byte (or more) data area and a
trailer. This process of is called physical / low level formatting. Header and trailer
contains metadata about the sectors e.g. sector number, error correcting code etc. Disk
controller uses this information whenever it writes or reads a data item on to a sector.
Data is stored in series of logical blocks. The disk controller maps the logical blocks
on to the physical disk space and also manages sectors which have been used for
storing data and which are still free. This is done by the operating system after
partitioning the disk in to one or more groups of cylinders. Disk controller stores the
initial data structure file of every sector on to the disk. This data structure file contains
a list of used and free sectors, list of bad sectors etc. Windows uses File Allocation
Table (FAT) for the said purpose.
15
Basic Computer Orga
anisation
There are tw wo arrangemments with whhich platters aare divided innto tracks annd sectors.
The first arrrangement is called as connstant linear vvelocity (CLVV), in which thhe density
of bits per track
t is kept uuniform, i.e. outer tracks aare longer thaan the inner tracks
t and
hence contaains more num mber of sectoors and data. O Outermost traacks are generally 40%
longer than the innermosst track. In this arrangemennt, in order to o maintain unniform bit/
mong tracks, tthe rotation speed
data rate am s is increeased from ouutermost to innner most
track. This approach
a is used by CD-ROM and DVD D-ROM drivees.
In another approach
a callled as constaant angular velocity
v (CAV)
V), the densityy of bits /
data per track is decreassing as we move from innnermost trackk to outermost track by
keeping thee disk rotationn speed consttant. As disk is moving att a constant speed,s the
width of thee data bits inccreases in thee outer trackss, which resullts in the connstant data
rate. Figuree 5.10 shows that the widdth of sectors in outer traacks is increasing and
density of bits is decreasiing.
Disk Perforrmance
Data is readd and written on the disks by the operatting system for f usage at laater stage.
A disk storees the program ms and relateed data. How
wever, disk is a much slow wer device
and the proograms storedd on it cannoot be executeed by the prrocessing uniit directly.
Therefore, the
t programs and its related data, whicch are not in the main meemory, are
loaded in thhe main mem mory from thhe secondaryy storage. Sinnce, the speeed of disk
read/write iss very slow inn compared tot RAM, timee to read or write
w a byte from
fr or on
to the disk affects the coomputer overrall efficiencyy. Therefore, in a single read/write
r
operation on disk data ofo one or morre sectors is transferred
t too/from the meemory. An
operating syystem, in geneeral, request for
f read/writee to one or moore sectors onn the disk.
The time takken by the dissk to complette a read/ writte request of the
t operatingg system is
known as diisk access timme. There are number of faactors which affect the perrformance
of the disk. These factorss are:
1. Seek Tiime: It is deffined as a tim
me taken by tthe read/writee head, or simmply as a
head, to
o reach the desired
d track on which thee requested sector
s is locaated. Head
should reach
r the desired track in minimum tim
me. Shorter seeek time leadds to faster
I/O operration.
2. Rotationnal Latency: Since, every track consistts of a numbeer of sectors, therefore,
the readd/write operaation can beb completedd only when the desired sector is
availablle under the read/write head
h for the I/O operatio on. It dependds on the
rotational speed of the spindle and is defined as a time taken by a particular sector The Memory System
to get underneath the read/write head.
3. Data Transfer Rate: Since, large amount of data is transferred in one read/write
operation, therefore, the data transfer rate is also a factor for I/O operation. It is
defined as the amount of data read or written by the read/write head per unit time.
4. Controller overhead: It is the time taken by the disk controller for mapping logical
blocks to physical storage and keep track of which sectors are free and which are
used.
5. Queuing Delay: time spent waiting for the disk to be free.
The disk access time is defined as the summation of seek time, rotational latency, data
transfer rate, controller overhead and queuing delay and is given by the equation.
Out of the five parameters mentioned in the above equation, most of the time of the
disk controller goes in moving the read/write to the desired location and thus seeking
the information. If the disk access requests are processed efficiently then performance
of the system can be improved. The aim of disk scheduling algorithm is to serve all
the disk access requests with least possible head movement. There are number of disk
scheduling algorithms which are presented here in brief.
First Come First Serve (FCFS) scheduling: This approach serves the disk access
request in the order they arrived in the queue.
Shortest Seek Time First (SSTF) scheduling: Shortest Seek Time First disk scheduling
algorithm selects the request from the queue which requires least movement of the
head.
SCAN scheduling: The current head position and the head direction is the necessary
input to this algorithm. Disk access requests are serviced by the disk arm as disk arm
starts from one end of the disk and moves towards the other end. On reaching the
other end the direction of the head is reversed and requests are continued to be
serviced.
C-SCAN scheduling: Unlike SCAN algorithm, C-SCAN does not serve any request in
the return trip. Instead, on reaching to the end, it reverses back to the beginning of the
disk and then serves the requests.
LOOK scheduling: LOOK is similar to SCAN algorithm with only a single difference,
after serving the last request, LOOK algorithm does not go till the end instead it
immediately reverses its direction and moves to the beginning of the other end.
17
Basic Computer Orga
anisation Initially, theese optical stoorage devices commonly known
k as com
mpact disk (CDD) or CD-
DA (Digitall Audio) weree used to storre only audioo data of 60 minute
m duratiion. Later,
huge comm mercial succeess of CD leead to devellopment of low cost opptical disk
technology. These CDs can be used as auxiliary storage and can store anny type of
digital data. A variety off optical-disk devices have been introduuced. We brieffly review
some of these types.
Compact Disk
D ROM (C
CD-ROM)
Compact Disk
D or CD-R ROM are mad de of a 1.2 m mm thick sheeet of a polyycarbonate
material. Eaach disk surfaace is coated with a reflecctive materiall generally alluminium.
The standarrd size of a coompact disk is 120 mm in diameter. Ann acrylic coat is applied
on top of thee reflective suurface to prottect the disk fr
from scratchess and dust.
F
Figure 5.11:: Outer Layoout of a CD
Figure 5.112: Spiral traack of CD Figure 5.133: Land & Piit formation in CD trackk
• Sync: It is the first field in every sector. The sync field is 12 byte long. The
first byte of sync field contains a sequence of 0s followed by 10 bytes of all 1s
and 1 byte of all 0s.
• Header: Header is four byte field in the sector. Three bytes are used to
represent the sector address and one byte is used to represent the mode i.e.
how subsequent fields in the sector are going to use. There are 3 modes:
• Data: Data field contains the user 2048 byte of user data when mode is 1 or
mode 2.
• L-ECC: Layered error correcting code field is 288 byte long field which is
used for error detection and correction in mode 1. In mode 2, this field is used
to carry an additional 288 bytes of user data.
Solid state drives also known as solid state storage devices are based on flash memory.
As discussed, flash memory, a non-volatile type memory uses semiconductor devices
to store the data. The major advantage of SSD is that it is purely an electronic device
i.e. unlike HDD, SSD does not have mechanical read/ write head other mechanical
components. Hence, reading and writing through SSD is faster than HDD. Now a
days, SSD have replaced HDD in computer systems, however, SSD disks are more
expensive than HDDs.
……………………………………………………………………………………
2. What would be the rotation latency time for the disk specified above, if it has a
rotational speed of 6000 rpm?
……………………………………………………………………………………
……………………………………………………………………………………
3. What are the advantages and disadvantages of using SSD over HDD?
………………………………………………………………………………………………
………………………………………………………………………………
21
Basic Computer Organisation Another important factor for secondary storage is the reliability of data storage
system. Storing same data on more than one disks enhances reliability. If one disk
fails, then data can be accessed through another disk. Replicating data on multiple
disks is called mirroring. Mirroring brings redundancy in data. So many schemes have
been employed to enhance the performance and reliability of data and collectively
they are called as redundant arrays of inexpensive disks (RAID). Based on the trade-
off between reliability and performance RAID schemes have been categorises into
various RAID levels.
Data striping increases the data transfer speed as different data bytes are accessed in
parallel from different disks in a single disk access time. Whereas mirroring protects
data from disk failures. If one disk fails then same data is accessed from the copy of
the data stored in other disk.
RAID Levels
RAID Level-0: RAID level-0 implements block splitting of data with no protection
against disk failures. In block splitting, each block is stored in a different disk in the
array. For example, ith block of a file will be store in ( i mod n ) + 1 disk, where n is
the total number of disks in the array. In this case, a significant enhancement on the
performance can be observed as n blocks can be accessed (one each from each disk) in
a single disk access time.
22
The Memory System
b0 b1 b2 b3 Parity(b)
RAID Level-4: This level uses block striping and one disk is used to keep parity
block. This is also called block-interleaved parity organization. The advantage of
block interleaving is that parity block along with corresponding blocks on other disks
is used to retrieve the damaged block or the blocks of the failed disk. Unlike in level-
3, block access reads one disk which allows parallel access to other blocks stored in
other disks in the array.
23
Basic Computer Organisation RAID Level-5: This level stores block of data and parity in all the disks in the array.
One disk store the parity while data is spread out on different disks in the array. This
structure is also known as block-interleaved distributed parity.
24
a) All member disks The Memory System
participate in every I/O
request.
b) Synchronizes the
spindles of all the disks
to the same position. Not useful for
Parallel
2 c) The blocks are very Poor Excellent commercial
Access
small in size (Byte or purposes.
word).
d) Hamming code is
used to detect double-
bit errors and correct
single-bit error.
a) Parallel access as in
level 2, with small data
Large I/O request
blocks.
Parallel size application,
3 b) A simple parity bit is Poor Excellent
Access such as imaging
computed for the set of
CAD
data for error
correction.
a) Each member disk
operates independently,
which enables multiple
input/output requests in
parallel. Not useful for
Independent Excellent/ Fair /
4 b) Block is large and commercial
access fair poor
parity strip is created purposes.
for bits of blocks of
each disk.
c) Parity strip is stored
on a separate disk.
a) Allows independent
access as in level 4.
b) Parity strips are
distributed across all High request rate
Independent Excellent Fair /
5 disks. read intensive,
access / fair poor
b) Distribution avoids data lookup
potential input/output
bottleneck found in
level 4.
Also called the p+q
redundancy scheme, is
Application
much like level 5, but
Independent Excellent/ Fair / requiring
6 stores extra redundant
access poor poor extremely high
information to guard
availability
against multiple disk
failures.
……………………………………………………………………………………
……………………………………………………………………………………
5.6 SUMMARY
This unit introduces the concept of memory hierarchy, which is primarily required due
to the high cost per bit of high speed memory. The processing unit have register,
cache, main memory and secondary or auxiliary memory. The main memory consists
of RAM or ROM. This unit explains the logic circuit and organisation of RAM and
ROM. The unit also explains several different types of secondary storage memories.
The unit provide details on hard disk and its characteristics. It also gives details of
different kind of optical disk. The concept of access time and constant linear and
angular velocity has also been explained in details. For larger computer systems
simple hard disk is not sufficient, rather an array of disks called RAID are used for
such systems to provide good performance and reliability. The concept of RAID and
various levels of RAID has been defined in this unit. The next unit will introduce you
to the concept of high speed memories.
5.7 ANSWERS
26
2. The time of one rotation = 1/6000 min = 60/6000 sec = 1/100 sec= 10 millisec The Memory System
Rotational latency = on an average time of half rotation = 5 ms
3. SSD drives does not require any mechanical rotation, therefore are less prone to
failure. In addition, they are much faster than HDD. But they are more expensive
than HDD
4. The size of sectors on CLV disks is same on the entire disk, therefore, these disks
are rotated a different speed. Density of data is same in all the sectors. In CAV
disks the rotation speed is same, thus, sector size is more in the outer tracks.
However, reading/writing process, in general, is faster.
Check Your Progress 3
1. RAID are a set of storage devices put together for better performance and
reliability. Different kind of RAID levels have different objectives.
3. Large number of I/O requests are fulfilled by RAID level 0, 1, 4,5 ,6.
27
The Memory System
UNIT 6 ADVANCE MEMORY
ORGANISATION
Structure Page Nos.
6.0 Introduction
6.1 Objectives
6.2 Locality of Reference
6.3 Cache Memory
6.4 Cache Organisation
6.4.1 Issues of Cache Design
6.4.2 Cache Mapping
6.4.3 Write Policy
6.5 Associative Memory
6.6 Interleaved Memory
6.7 Virtual Memory
6.8 Summary
6.9 Answers
6.0 INTRODUCTION
In the last unit, the concept of Memory hierarchy was discussed. The Unit also
discussed different types of memories including RAM, ROM, flash memory,
secondary storage technologies etc. The memory system of a computer uses variety of
memories for program execution. These memories vary in size, access speed, cost and
type, such as volatility (volatile/ non-volatile), read only or read-write memories etc.
As you know, a program is loaded in to the main memory for execution. Thus, the size
and speed of the main memory affects the performance of a computer system. This
unit will introduce you to concepts of cache memory, which is small memory between
the processing unit and main memory. Cache memory enhances the performance of a
computer system. Interleaved memory and associative memories are also used as
faster memories. Finally, the unit discusses the concept of virtual memory, which
allows programs larger than the physical memory.
6.1 OBJECTIVES
After going through this Unit, you will be able to:
explain the concept of locality of reference;
explain the different cache organisation schemes;
explain the characteristics of interleaved and associative memories;
explain the concept of virtual memory.
5
Basic Computer Orga
anisation The importaant task of a computer
c is to
t execute insstructions. It has
h been observed that
on an average 80-85 percent of thee execution ttime is spennt by the proocessor in
accessing thhe instructionn or data fromm the main mmemory. The situation
s becoomes even
worst whenn instruction tto be executeed or data to be processedd is not present in the
main memoory.
Another facctor which has been observved by analyssing various programs
p is thhat during
the programm execution, the processsor tends to access a seection of thee program
instructions or data for a specific timee period. For example, wh hen a program m enters in
a loop struccture, it conttinues to acceess and execute loop stattements as loong as the
looping conndition is satiisfied. Similaarly, wheneveer a program calls a subrooutine, the
subroutine statements
s aree going to exxecute. In another case, when
w a data ittem stored
in an array or
o array like sstructure is acccessed then it is very likeely that eitherr next data
item or prevvious data iteem will be accessed by thee processor. AllA these phennomenons
are known as
a Locality off Reference orr Principle off Locality.
So, accordinng to the priinciple of loccality, for a specific timee period, the processor
tends to maake memory references
r cloosed to each oother or accesses the samee memory
addresses again
a and again. The earrlier type is known as sppatial locality ty. Spatial
locality speccifies if a datta item is acccessed then daata item storeed in a nearbyy location
to the data item just acccessed may be b accessed inn near futuree. There can bbe special
case of spaatial locality, which is terrmed as sequuence localityy. Consider a program
accesses thee elements oof a single dim mensional arrray, which is a linear data structure,
in the sequeence of its inddex. Such acccesses will reead/write on a sequence of memory
locations onne after the otther. This typee of locality, which
w is a case of spatial locality,
l is
referred to as
a sequence loocality.
Another typpe of localitty is the tem mporal localiity, if a dataa item is accessed or
referenced at
a a particularr time, then thhe same data item is expected to be acccessed for
i near future. Typically it is observedd in loop stru
some time in uctures and subroutine
s
call.
As shown in n Figure 6.1, when the proogram enters iin the loop strructure at linee 7, it will
execute the loop statemeents again andd again multipple times till the loop termminates. In
this case, processor
p needs to access instructions 9 and 10 freequently. On the other
hand, when a program acccesses a dataa item store inn an array, thhen in the nexxt iteration
it accesses a data item stoored in an adjjacent memorry location to the previous one.
If you keep the content of the cluster of expected memory references in a small,
extremely fast memory then processing time of an instruction can be reduced by a
significant amount. Cache memory is a very high speed and expensive memory as
compared to the main memory and its access time is closer to the processing speed of
the processor. Cache memory act as a buffer memory between the processor and the
main memory.
Because cache is an expensive memory so its size in a computer system is also very
small as compared to the main memory. Thus, cache stores only those memory
clusters containing data/ instructions, which have been just accessed or going to be
accessed in near future. Data in the cache is updated based on the principle of locality
explained in the previous section.
Data in main memory is stored in the form of fixed size blocks/pages. Cache memory
contains some blocks of the main memory. When processor wants to read a data item
from the main memory, a check is made in the cache whether data item to be accessed
is present in the cache or not. If data item to be accessed is present in the cache then it
is read by the processor from the cache. If data item is not found in the cache, a
memory reference is made to read the data item from the main memory, and a copy of
the block containing data item is also copied into the cache for near future references
as explained by the principle of locality. So, whenever processor attempts to read the
data item next time, it is likely that the data item is found in the cache and saves the
time of memory reference to the main memory.
As shown in the Figure 6.2, if requested data item is found in the cache it is called as
cache hit and data item will be read by the processor from the cache. And if requested
data item is not found in cache, called cache miss, then a reference to the main
memory is made and requested data item is read and block containing data item will
also be copied into the cache.
7
Basic Computer Organisation Average access time for any data item is reduced significantly by using cache then
without using cache. For example, if a memory reference takes 200 ns and cache takes
20 ns to read a data item. Then for five continuous references will take:
Time taken with cache : 20 (for cache miss) + 200 (memory reference)
+ 4 x 20 (cache hit for subsequent access)
= 300 ns
Effective access time is defined as the average access time of memory access, when a
cache is used. The access time of memory access is reduced in case of a cache hit,
whereas it increases in case of cache miss. In the above mentioned example processor
takes 20 + 200 ns for a cache miss, whereas it takes only 20 ns for each cache hit.
Now suppose, we have a hit ratio of 80%, i.e. 80 percent of times a data item would
be found in the cache and 20 % of the times it would be accessed from the main
memory. So effective access time (EAT) will be computed as :
effective access time = (cache hit x data access time from cache only )
+(cache miss x data access time from cache and main memory)
From the example it is clear that cache reduces the average access time and effective
access time for a data item significantly and enhance the computer performance.
3. Hit ration of computer system is 90%. The cache has an access time of 10ns,
whereas the main memory has an access time of 50ns. Computer the effective
access time for the system.
……………………………………………………………………………………
……………………………………………………………………………………
……………………………………………………………………………………
8
The Memory System
Cache is an extremely fast but very expensive memory as compared to the main
memory. So large cache memory may shoot up the cost of the computer system and
too small cache might not be very useful in real time. So, based on various statistical
analyses, if a computer system has 4 GB of main memory then the size of the cache
may go up to 1MB.
What would be the block size for data transfer between cache and main memory?
Block size directly affects the cache performance. Higher block size would ensure
only fewer number of blocks in cache, whereas small block size contains fewer data
items. As you increase the block size, the hit ratio first increases but it decreases as
you further increase the block size. Further increase in block size will not necessarily
result in access of newer data items, as probability of accessing data items in the block
with larger number of data items tends to decrease. So, optimal size of the block
should be chosen to maximise the hit ratio.
As execution of the process continues, the processor requests for new data items. For
new data items and thus, new blocks to be present in the cache, the blocks containing
old data items must be replaced. So there must be a mechanism which may select the
block to be replaced which is least likely to be needed in near future.
When changes in the blocks will be written back on to the main memory?
During the program execution, the value of a data item in a cache block may get
changed. So the changed block must be written back to the main memory in order to
reflect those changes to ensure data consistency. So there must be a policy, which may
decide when the changed cache block is written back to the main memory.
In certain computer organisations, the cache memory for data and instruction are
placed separately. This results in separate address spaces for the instructions and data.
These separate caches for instructions and data are known as instruction cache and
data cache respectively. If processor requests an instruction, then it is provided by the
instruction cache, whereas requested data item is provided by the data cache. Using
separate cache memories for instruction and data enhances computer performance.
While some computer systems implements different cache memories for data and
instructions other implements multiple level of cache memories. Two level cache
popularly known as L1 cache and L2 cache is most commonly used. Size of level 1
cache or L1 cache is smaller than the level 2 or L2 cache. Comparatively more
frequently used data/ instructions are stored in L1 cache.
9
Basic Computer Organisation
As discussed earlier, the main memory is divided into blocks/ frames/ pages of k
words each. Each word of the memory unit has a unique address. A processor requests
for read/write of a memory word. When a processor's request of a data item cannot be
serviced by cache memory, i.e. a cache miss occurs, the block containing requested
data item is read from the main memory and a copy of the same is stored in cache
memory. A cache memory is organised as a sequence of line. Each cache line is
identified by a cache line number. A cache line stores a tag and a block of data. Cache
and main memory structure is shown in Figure 6.3. General structure of cache
memory having M lines and N=2n main memory size is shown in figure 6.3(a) and
figure 6.3(b) respectively.
Main Memory Block Address ((n-k) bits) Block address size (k bits)
((n-k)-m) bits for tag m bits to identify the Cache line Block address size (k bits)
Now, the following steps will be taken by the processing logic of processing unit and
hardware of Cache memory:
1. The tag number (FE in this case) is compared against the Tag number of data
stored in the cache line (DCB in this case).
2. In case both are identical
then (this is the case of cache hit): Ath word from the cache line DCB is
accessed by the processing logic.
else (this is a case of cache miss): The cache line 16 words data is read to
cache memory line (DCB) and its tag number is now FE. The
required Ath word is now accessed by the processing logic
Direct mapping is very easy to implement but has a disadvantage as location in which
a specific block is to be stored in cache is fixed. This arrangement leads to low hit
ratio as when processor wants to read two data items belongs to two different blocks,
which map to single cache location, then each time other data item is requested, the
block in the cache must be replaced by the requested one. This phenomenon is also
known as thrashing.
Associative Mapping:
Associative mapping is the most flexible mapping in cache organisation as it allows to
store any block of the main memory in any of the cache line/or location. It uses
complete (n-k) bits of block address field as a tag field. Cache memory stores (n-k)
bits of Tag and (2k × Word Size in bit) data. When a data item/ word is requested, (n-
k) bit tag field is used by the cache control logic to search the all the tag fields stored
in the cache simultaneously. If there is a match (cache hit) then corresponding data
item is read from the cache, otherwise (cache miss) the block of data that contains the
word to be accessed is read from the main memory. It replaces any of the cache line.
In addition, the block address of the accessed block from the main memory replaces
the tag of the cache line. It is also the fastest mapping amongst all types. Different
block replacement policies are used for replacing the existing cache content by newly
read data, however, those are beyond the scope of this unit. This mapping requires
most complex circuitry, as it requires all the cache tags to be checked simultaneously
with the block address of the access request.
Main Memory Address :
Address bits for identifying
Address of a block of data is same as Tag
a word in a Block
(n-k) bits k bits
13
Basic Computer Organisation
Tag Data Block of k words
14
Cache mapping logic uses d-bits to identify the set as 𝑣 2 and ((n-k)-d)) bits are The Memory System
used to represent the tag field. In set-associative mapping, a block j can be stored at
any of the cache line of set i. To read a data item, the cache control logic first
simultaneously looks into all the cache lines using ((n-k)-d)) bits of tag field of the set
identified by d-bits of the set field, otherwise a data item is read from the main
memory and corresponding data is copied into the cache accordingly. Set associative
mapping is also known as w-way set-associative mapping. It uses lesser number of
bits (((n-k)-d) bits) as compare to (n-k) bits in associative mapping in tag field.
A comprehensive example showing possible locations of main memory blocks
in Cache for different cache mapping schemes is discussed next.
A word like 00011110 can in any cache line, for example, in the cache memory
shown above it is in line 2 and can be accessed.
(iii) 2way set associative Mapping:
The size of cache = 32 bytes
The block size of main memory = words in one line of cache =4 ⇒ k=2 bits
The number of lines in a set (w) = 2 (this is a 2 way set associative memory)
The number of sets (v) = Size of cache in words/(words per line × w )
= 32/(4×2) =4
Thus, set number can be identified using 2 bits as 22 = 4
17
Basic Computer Organisation Tag size = (n-k)-v = (8 - 2) - 2 = 4
The address mapping for an address: 11111101
Block Address of Main Memory Address of a word in a
Block
1111 11 01
1111 11 01
Tag Set Number
Set number = 11 = 3 in decimal
Tag = 1111
The address mapping for an address: 00001011
Block Address of Main Memory Address of a word in a
Block
0000 10 11
0000 10 11
Tag Set Number
Set number = 10 = 2 in decimal
Tag = 0000
• Caches and main memory can be altered by multiple processes which may
result in inconsistency in the values of the data item in cache and main
memory.
18
The Memory System
• If there are multiple CPUs with individual cache memories, data item written
by one processor in one cache may invalidate the value of the data item in
other cache memories.
These issues can be addressed in two different ways:
1. Write through: This writing policy ensures that if a CPU updates a cache,
then it has to write/ or make the changes in the main memory as well. In
multiple processor systems, other CPUs-Cache need to keep an eye over the
updates made by other processor's cache into the main memory and make
suitable changes accordingly. It creates a bottleneck as many CPUs try to
access the main memory.
2. Write Back: Cache control logic uses an update bit. Changes are allowed to
write only in cache and whenever a data item is updated in the cache, the
update bit of the block is set. As long as data item is in the cache no update is
made in the main memory. All those blocks whose update bit is set is replaced
in the main memory at the time when the block is being replaced in the cache.
This policy ensures that all the accesses to the main memory are only through
cache, and this may create a bottleneck.
You may refer to further readings for more details on cache memories.
Check Your Progress 2
1. Assume that a Computer system have following memories:
RAM 64 words with each word of 16 bits
Cache memory of 8 Blocks (block size of cache is 32 bits)
Find in which location of cache memory a decimal address 21 can be found if
Associative Mapping is used.
……………………………………………………………………………………
……………………………………………………………………………………
2. For the system as given above, find in which location of cache memory a decimal
address 27 will be located if Direct Mapping is used.
…………………………………………………………………………………………
………………………………………………………………………………
3. For the system as given above, find in which location of cache memory a decimal
address 12 will be located if two way set associative Mapping is used.
……………………………………………………………………………………
……………………………………………………………………………………
Hardware Organization
Associative memory consists of a memory array and logic for m words with n bits per
word as shown in block diagram in Figure 6.15. Both argument register (A) and key
register (K) have n bits each. Each bit of argument and key register is for one bit of a
word. The match register M has m bits, one each for each memory word.
The key register provides a mask for choosing a particular field or key in the argument
word. The entire argument is compared with each memory word only if the key
register contains all 1s. Otherwise, only those bits in the argument that have 1s in their
corresponding positions of the key register are compared. Thus, the key provides a
mask or identifying information, which specifies how reference to memory is made.
The content of argument register is simultaneously matched with every word in the
memory. Corresponding bits in the mach register is set by the words that have match
with the content of the argument register. Set bits of the matching register indicates
that corresponding words have a match. Thereafter, memory is accessed sequentially,
to read only those words whose corresponding bits in the match register have been set.
21
Basic Computer Organisation
Example: Consider an associative memory of just 2 bytes. The content register and
argument registers are also shown in the diagram.
Please note as four most significant bits of key register are 1, therefore only they are
matched.
22
Let us say, you have a main memory of size 256K (218)words. This requires 18-bits to The Memory System
specify a physical address in main memory. A system also has an auxiliary memory as
large as the capacity of 16 main memories. So, the size of the auxiliary memory is
256K ×16 = 4096 K which requires 24 bits to address the auxiliary memory. A 24-bit
virtual address will be generated by the processor which will be mapped into an 18-bit
physical address by the address mapping mechanism as shown in Figure 6.17.
6.8 SUMMARY
This unit introduces you to the concept relating to cache memory. The unit defines
some of basic issues of cache design. The concept of cache mapping schemes were
explains in details. The direct mapping cache uses simple modulo function, but has
limited use. Associative mapping though allows flexibility but uses complex circuitry
and more bits for tag field. Set-associative mapping uses the concept of associative
and direct mapping cache. The unit also explain the use of memory interleaving,
which allows multiple words to be accessed in a single access cycle. The concept of
23
Basic Computer Organisation content addressable memories are also discussed. The cache memory, memory
interleaving and associative memories are primarily used to increase the speed of
memory access. Finally, the unit discusses the concept of virtual memory, which
allows execution of programs requiring more than physical memory space on a
computer. You may refer to further readings of the block for more details on memory
system.
6.9 ANSWERS
Check Your Progress 1
In set associative memory the given tag can be stored in any of the 8
lines.
2. Main memory size = 64 words (a word = 16 bits) = 26 ⇒ n=6 bits
Block Size = 32 bits = 2 words = 21 ⇒ k=1 bit
The size of cache = 8 blocks of 32 bits each = 8 lines ⇒ m=3 bits
Tag size for direct mapping = (n-k) - m = (6 - 1) - 3 = 2
The address mapping for an address: 27 in decimal that is 011011
1. Memory interleaving divides the main memory into modules. Each of these
module stores the words of main memory as follows (example uses 4 modules
and 16 word main memory.
Module 0: Words 0, 4, 8, 12 Module 1: Words 1, 5, 9, 13
Module 2: Words 2, 6, 10, 14 Module 3: Words 3, 7, 11, 15
Thus, several consecutive memory words can be fetched from the interleaved
memory in one access. For example, in a typical access words 4, 5, 6, and 7 can
be accessed simultaneously from the Modules 0, 1, 2 and 3 respectively.
2. Associative memory do not use addresses. They are accessed by contents. They
are very fast.
25
The Input / Output
UNIT 7 – INPUT/OUTPUT ORGANISATION System
Structure
7.0 Introduction
7.1 Objectives
7.2 Input/Output (I/O) Devices
7.3 The Input/Output (I/O) Interface
7.3.1 System Bus and I/O Interface Modules
7.3.2 I/O and Memory Bus
7.3.3Isolated and Memory-Mapped I/O
7.4 Device Controllers
7.4.1 Device Controller and I/O Interface
7.5 Device Drivers
7.6 Asynchronous Data Transfer
7.6.1 Strobe Control
7.6.2 Handshaking
7.7 Input/Output (I/O) Techniques
7.7.1 Programmed I/O
7.7.2 Interrupt-Driven I/O
7.7.3 Interrupt Handling
7.7.4 Direct Memory Access (DMA)
7.8 Input Output Processor (IOP)
7.8.1 Characteristics of I/O Channels
7.9 External Communication Interfaces
7.10 Summary
7.11 Solutions /Answers
7.0 INTRODUCTION
In the preceding units, you have learned the concepts of the memory system for a computer
system. The memory system of a computer includes primary, secondary and auxiliary, and
high-speed memories. As discussed, the main memory of thecomputer system is used for
storing the instructions and data of the programs, which are getting executed. To execute the
program, the computer may need some data which is known as input.The program execution
results in the creation of processed data, which is known as output. In addition to the memory
system, another important component is the input and output system which is used to
receive/send data from/to the external environment. This unit introduces you to various
Input/Output (I/O) techniques and controllers, device drivers, structure ofI/O interface, and
asynchronous data transfer.This unit also explains the I/O processor which is exclusively used
for I/O operations.
7.1 OBJECTIVES
After going though this unit, you should be able to:
define the structure of input/output (I/O) interface and I/O devices;
explain the structure of controllers;
explain different data transfermodes;
explain various techniques used for Input/Output in a computer system;
discuss the need of an input/output (I/O) processor;
explain the role of external serial and parallel communication interfaces;
explain the concepts of interrupt processing
The microcomputer, as shown in Figure 7.1, has a single micro processing unit (MPU). It also
has RAM and ROM, which may be constructed by a number of RAM and ROM chips. The
diagram also shows two basic interfaces, viz. keyboard interface and display interface, which
are connected through the system bus. You may please note that other I/O interface may be
connected in a similar way. Please also note that the system bus has been shown in the diagram
as three distinct buses, viz. control bus, address bus, and data bus.
An Input/Output (I/O) subsystem includes all the input/output interfaces and connected
Input/output devices.The basic objective of an I/O subsystem is to provide an efficient
communication medium between the computer system and the external environment (humans
and other devices).An I/O interface is used to connect an external I/O device with the computer
system. The I/O interface interchanges control, status and data with the external device. The
I/O interfaces can also be used to transfer instruction/data/control within the computer units,
including processor registers and memory units.An I/O device attached to the computer is also
known as peripheralor external device. The external devices may be categorized on the basis
of their communication endpoints as:
Human readable: These devices provide information in human readable form. Example-
display terminals,printers, etc.
Machine-readable:These devices provide information in machine readable form.
Example-magnetic disks, CD-RW, etc.
Communication:These devices provide information to communication devices such as
MODEM.
44
The Input / Output
Table 7.1: Peripheral devices and processing unit components System
Sr.
Processing unit components Peripheral Devices Remarks
No.
Hence, they perform
Processor and memory are Peripheral devices are
1 operations in a different
electronic devices. electromagnetic devices.
manner
Data transfer rate of processor is Data transfer rate of peripheral
2 Thus, a synchronization
very fast. devices is slow.
Peripherals, in general, use mechanism is required.
3 Processor uses word format.
bytes/blocks format.
Each peripheral device may have a
4
Processor may communicate either different operating mode. Thus, an interface to handle
directly with different manners or Each peripheral device must be different operating modes is
indirectly using an interface in controlled in such a way that the required.
5
similar fashion. operation of one does not disturb the
operation peripheral device.
To address the issues mentioned in Table 7.1, ahardware component between the peripheral
devices and CPU is required to control and synchronize all input/output operations in the
computer systems. These hardware components, which are used to provide an interface
between the peripheral devices and the processor, are known asinterface units.An I/O
interface acts as a bridge between the processor and peripheral devices.
The I/O interface offers an interface which connects the internal components i.e.,processor and
main memory as well as external components i.e., peripheral or external devices. In addition to
data transfer between processor to I/O devices, it also establishes the coordination between
them. Moreover, the I/O interface also hascomponents like buffer system and error detection
mechanism to deal with the speed differences between processor and peripheral devices.
Figure 7.2: A Block Diagram of an I/OInterface connectingwith Processor and External Devices
The I/O bus is connected to all peripheral devices through I/O interfaces. In order to
communicate with an intended device, the processor sendsthe address of the device using
address bus. Every I/O interface consistsof an address decoder to continuously monitor the
content of address bus. When anI/O interface observes the address of its own peripheral
device, it activates the associated device and the bus; otherwise, the peripheral device
is disabled. A control signal (I/O command) is also provided simultaneously through the
control bus. The four types of I/O commands that are arising out of the processor are as
follows:
1. Control Command: This is the control signal code which is sent to the
corresponding peripheral device and informs it about the action it has to perform.
2. Status Command: The is the statussignal which is used to test status conditions of
the peripheral devices and interface. Some status commands are BUSY, DATA
AVAILABLE, ERROR or NOT IN BUFFER etc.
46
3. Data Output Command: The signal/commandis utilized to activate the I/O interface The Input / Output
for data transfer from the processor to buffer of I/O interface. The data from the System
buffer is ultimately sent to the peripheral device. The data is sent from the CPU to
the buffer of interface after this command is provided.
4. Data Input Command: The processor sends this signalwhenever there is a need to
read data from data any peripheral device. After the issuance of this command, the
data from the intended peripheral device are extracted into the interface’s buffer and
this is followed by the data read operation by the processor.
7.3.2 I/O and Memory Bus
Aprocessor requires communicating with the I/O devices and memory system. The system
bus (I/O Bus & Memory Bus) is used to control the exchangeof data among the processor,
memory system and I/O devices. The I/O bus and memory bus; both busesconsist of data,
address and control lines. To establish communication with the memory and I/O devices, the
system bus can be used as follows:
i. One bus for each memory system and I/O.
ii. Shared data and addressbuses for both I/O devices and memory system but
exclusive control bus for both.
iii. Shared system bus for both memory system and I/O devices.
7.3.3 Isolated and Memory-Mapped I/O
In case ofisolated I/O, the data and address buses are shared between I/O and memory but
separate read/write control lines are used for I/O devices. Wheneverthe processor decodes
instruction for an I/O device, it places the address on the address line and activates I/O read
or write control line which causes data transfer between CPU and I/O device.
In other alternative, the computer employs the same set of read/write signals for I/O and
memory and does not differentiate between I/O and memory addresses. This configuration is
known as memory-mapped I/O.
47
Basic Computer
Organisation
Figure 7.5: Device Controller connecting I/O Devices and Computer System
………………………………………………………………………………………………
………………………………………………………………………………………………
2. What is the need of device controller? What are the major benefits?
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
.….………………………………………………………………………………………….
.……………………………………………………………………………………………..
49
Basic Computer 7.6.1 Strobe Control method
Organisation
In strobe control method a single control line is used each time for data transfer and this
control signal is referred to as Strobe. The strobe may be activated in the following two
different ways:
A. Source-initiated Strobe – Figure 7.7 depicts the block diagram and timing diagram for
source-initiated strobe method. In this method, the data transfer is performed as:
i. Initially, source unit putsthe data on data bus and the strobe signal is switched
ON.
ii. The destination unit reads data from the data bus.
iii. After reading data,the strobe gets OFF.
B. Destination-initiated Strobe –Figure 7.8 depicts the block diagram and timing diagram
for destination-initiated strobe method. The steps for data transfer are as follows:
i. First, the destination unit switches ON the strobe signal.
ii. After observingstrobe ON, the source unitputs data on the data bus.
iii. The destination unit reads the data from the data bus and the strobe signal gets
OFF.
50
The Input / Output
System
a. Block Diagram
b. Timing Diagram
Figure 7.9: Source Initiated Handshaking
a. Block Diagram
b. Timing Diagram
Figure 7.10: Destination Initiated Handshaking
51
Basic Computer
Organisation Table 7.3: Three I/O Techniques
I/O Commands
Wheneverthe processor addresses an I/O interface, it sends an address and I/O command.
There are four I/O commands which a processor may send to I/O interface for I/O
operation.The I/O commands are given as follows:
52
Control:Control commands are used to activate the device and also specify what The Input / Output
System
operation is to perform. For example- aUSE command to make a specific device as
current device for read/write operation.
Test: The Test I/O command is used to check the status of a device. For instance-
Whether the device is in error condition, ready state, or notreadystate.
Read: This command is used to receiveone item of input data from the I/O device
which is in communication.
Write:This command is used to sendone item of output data to the respective output
device.
7.7.2 Interrupt-driven I/O
For an I/O operation inprogrammed I/O, the processor continuously waits for the operation to
be completed and the data transfer occurs when the device is ready. This process is known as
polling which leads to slow performance of the processor. Interrupt-driven I/O can reduce the
polling time efficiently.In interrupt-driven I/O, the processor issues a read/write command and
it starts the execution of some other program/instructions. Whenever the desired device is
ready or has completed the assigned I/O task, an interrupt signal is sent to processor for further
actions. Figure 7.12 depicts the procedure of interrupt-driven I/O technique. The complete list
of steps in interrupt-driven I/O is as follows:
i. The processor issues read /write command
ii. The processor executes some other program/instructions
iii. The I/O interface reads data from the desiredI/O device
iv. I/O interface interrupts the processor
v. The processor checksthe interrupt after completingeach instruction cycle
vi. The processor saves the context of the program in execution
vii. The processor requests for the desired data
viii. The I/O interface transfers data
ix. The processor resumes the previous program it had been executing before the
interrupt.
Advantage: This technique reduces the overall waiting time of the processor.
54
The Input / Output
System
The following four general techniques can be used to solve the above design issues:
i. Multiple Interrupt Lines: Multiple interrupt lines can be used to handle multiple
interrupts. In this technique, the priorities are assigned to various interrupts.
Whenever an interrupt occurs, the highest priority interruptwill be handled first
among all interrupts. However, the practical realization of this technique is difficult
because computer system provides only a few lines for the interrupt.
ii. Software Poll: The processor jumps to an interrupt service routine after an interrupt
has occurred. The processor polls at I/O interface by observing the status register in
order to identify the I/O interface which caused the interrupt. The software poll
technique is time consuming due to polling process.
iii. Daisy Chain or Hardware Poll: In this technique, the interrupt request line is shared
by all I/O interfaces. Whenever an interrupt occurs, the processor sends an
55
Basic Computer acknowledgement of interrupt. This acknowledgement goes to all the I/O devices
Organisation through I/O interface. When it reaches to the I/O device which sends interrupt, the I/O
device sends a response by specifying an address or unique identifier through the data
bus. This unique identifier helps in deciding the appropriate interrupt servicing
program. The hardware poll consists of an in-built priority mechanism and this
priority is based on the sequence of devices on interrupt acknowledge line.
iv. Bus Arbitration: The bus arbitration technique allows only one I/O interface to
control the bus and this I/O interface is known as bus master. It means only one
interrupt request can be fulfilled at the same time. After acknowledgement of
interrupt by processor, the I/O interface sends the interrupt vector to processor
through data lines. The interrupt is handled according to the number in interrupt
vector.
7.7.4 Direct Memory Access (DMA)
The programmed I/O as well as interrupt-driven I/O techniques require the processor’s
interventions for data transfer to/from the main memory. Since processor may involve in the
execution of multiple programs due to multiprogramming, which restricts the processor time
for testing the I/O device and servicing the I/O request by transferring I/O data over the system
bus. Is it possible to store/retrieve data to/from main memory without involving the processor
in the data transfer? Yes! There exists an alternative approach which is referredto as direct
memory access (DMA). In DMA, the main memory andI/O interface exchange data directly
without the active involvement of processor. Figure 7.16 depicts the block diagram of direct
memory access (DMA) technique. Now, an obvious question arises: What is the use of DMA
interface? The DMA interface is mainly used to transfer a large quantity of data which
isexchanged between I/O device andmainmemory.
Figure 7.16 depicts the block diagram of DMA technique. The steps of the DMA technique
aregiven as follows:
i. Processor issues read/write command to DMA module for transferring the block of
data
ii. The processor sends the following information to DMA interface-
a. To perform read/write operation, the Read /Write signal is sent using control
lines
b. I/O Device address is communicated through a data bus
c. Beginning address of memory block using data bus
d. “The number of words to be transferred” is communicated through data bus. This
information is stored in a count register.
iii. The processor executes some other program.
iv. Now, DMA controller performs the data transfer
v. When DMA controller finishes the data transfer, it sends an interrupt signal to
processor
Figure 7.17 shows the block diagram of DMA module along with its different signal lines.
The DMA module handles data transfers to send the entire block of data and one word at a
time is transferred directly to or from memory without going through the registers of
processor.After transferring the entire block, an interrupt signal is sent to processor by DMA
module.Therefore, the processor involvement is limited only at the start and end of the I/O
operation.
In DMA, the processor intervention is minimized but it must use the path through system bus.
Thus, DMA interface requests for system bus to transfer one data word at a time and the
control of the system bus is returned to the processor after transferring on word of data. This
process is known as cycle stealing. The CPU cycle stealing causes the delay to the operation
56
of processor for one memory cycle. In DMA technique, the active involvement of processor The Input / Output
can be restricted at the beginning and at the completion of the I/O operation. System
Figure 7.18 depicts the five cycles of typical instruction execution. In Figure 7.18, three points
are marked where a processor can respond to DMA request, and; a point is also marked where
the processor can respond tointerrupt request. The point at which the interrupt request can be
acknowledged is called the interrupt cycle.
There exist different configurations to realize the DMA mechanism. Figure 7.19(a) shows one
of the several configurations. In this configuration, the system bus is shared by all interfaces.
The DMA works as a supportive component and may employ programmed I/O fordata transfer
between memory and I/O interface using DMA interface. The advantage of this configuration
and programmed I/O is that DMA does not require extra system bus cycles to transfer
information from DMA to/from I/O interface as well as from main memory to/from DMA.
57
Basic Computer
Organisation
Figure 7.19(b) depicts one more DMA configuration which has some advantages over the first
configuration shown in Figure 7.19(a). In this configuration, adirect path is provided between
the DMA interface and I/O interface and this path is different than the system bus.
Furthermore, DMA logic may actas aconstituent of I/O interface and single or multiple I/O
interfaces may be controlled by it. One more flexible configuration is shown in Figure 7.19(c)
in which the DMA interface is connected to I/O bus. This configuration isextendable in an easy
manner. The additional benefit in both configurations is that the data transfer can be performed
from DMA interface to I/O interface without the involvement of the system bus.
Check Your Progress 2
1. What do you understand by Programmed I/O technique?
………………………………………………………………………………………………
………………………………………………………………………………………………
…………………………………………………………………………………………….
2. Explain interrupt?What processing is performed on the occurrence of an interrupt?
………………………………………………………………………………………………
………………………………………………………………………………………………
……………………………………………………………………………………………..
3. Why is DMA needed? What are its advantage and disadvantages?
………………………………………………………………………………………………
………………………………………………………………………………………………
…………………………………………………………………………………………….
58
3. Control using I/O controllers with interrupts: In this configuration, the processor need not The Input / Output
to wait for an I/O operation to be completed which leads to improved efficiency of the System
processor.
4. Control transferred to DMA: In this configuration, the involvement of the processor is
restricted at the beginning and on completion of DMA operation. The I/O interface and
DMA module control the data transfer directly without the involvement of the processor.
5. Control transferred to I/O processor: On the request of main processor, the I/O processor
takes control of I/O operation and performs I/O operation with the intervention of the
main processor. This approach allows controllingvarious I/O devices with minimum
involvement of processor.
Through various evolution stages, it is evident that the responsibility of I/O tasks has been
shifted from CPU to I/O-processor and it leads to improvedperformance of the processor.
It is also evident from the recent developments that a major shift occurs due to the introduction
of I/O interface which is capable to executethe I/O instructions. Hence, the ‘I/O interface’ is
often called anI/O processor or I/O channel.
59
Basic Computer
Organisation
Then, the byte multiplexer I/O channel may send the bytes as follows:
C1 B1 A1 C2 B2 A2 C3 B3 A3……
For high-speed devices, block multiplexer I/O channels can be used which transfers data in
form of blocks.
60
examples of use of point-to-point interfaces point are: keyboard, printer and external modems. The Input / Output
Some common examples of point-to-point interfaces are EAI-232 and RS-232C. System
On the other hand, the multipoint external interfacesare used to support external multimedia
devices (such as audio, video, CD-ROM) and mass storage devices (such as tape drives and
disk). Some common examples of multipoint external interfaces are Infini Band and
FireWire.
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
7.10 SUMMARY
This unit explains exclusively the I/Oorganisation of a computer system. This unit presents the
description of I/O devices, the concept of I/O interface, the description and structure of device
controllers, and asynchronous data transfer modes. It also discusses three I/O techniques
i.e.,programmed I/O, interrupt-driven I/O, and direct memory access (DMA). The threeI/O
techniques involve processor at different levels and help processor to behave differently. The
interrupt processing is also discussed in detail.The evolution of I/O processor is also discussed
along with the brief explanation of the input/output processor as well as the external
communication interfaces. The I/O processors are the most recent I/O interfaces that are
capable to execute the I/O instructions without the involvement of the processor.
1. An I/O interface acts as a bridge between the I/O devices and processor. It provides a
communication interface to connect the computer with the external environment. The I/O
interfaces are used to send/receive data from the external environment using external
device or peripheral. The I/O interface offers the following major functions:
Synchronization of control and Timing signals
Establish communication between peripheral devices and processor
Data buffering to due to the speed mismatch between memory and processor
A mechanism for error detection
2. Device controllers work as a connecting mediumto connect the peripheral devices to a
computer system rather than connecting them directly to the system bus. On device
controller, the I/O device is connected at one end while it is connected with the system bus
on another end. Thus, a device controller works as an interface between the system bus
and the I/O device. The major benefits for connecting I/O devices to a computer system
using device controllers are as follows:
61
Basic Computer A single device controller can be used to connect multiple I/O devices with the
Organisation computer system simultaneously.
The device controllers allow I/O devices to upgrade/change without any
update/change required in the current configuration of computer system.
The device controllers allow connecting the I/O devices with different
configurations/manufacturers with the computer system. This feature offers more
flexibility to the computer users in order to buy I/O devices of different
configurations/manufacturers
3. A device driver is a software module which manages the communication with a specific
I/O device. It provides a software interface to hardware devices.Some examples of
different device drivers are printer driver, sound card driver, graphics driver, network card
driver, USB driver etc.
62
I/O Technology
UNIT 8 I/O TECHNOLOGY
Structure
8.0 Introduction
8.1 Objectives
8.2 Mouse
8.2.1 Classifications of Mice
8.3 Keyboard
8.3.1 Features of Keyboard
8.4 Monitors
8.4.1 Cathode Ray Tube
8.4.2 Liquid Crystal Display
8.4.3 Light-Emitting diode
8.5 Video Cards
8.5.1 Resolution
8.5.2 Color Depth
8.5.3 Video Memory
8.5.4 Refresh Rates
8.5.5 Graphic Accelerators
8.5.6 Video Card Interfaces
8.6 Sound Cards
8.7 Digital Camera
8.7.1 Webcam
8.8 Voice Based Input Devices
8.8.1 Siri
8.8.2 Alexa
8.9 Printers
8.9.1 Impact Printers
8.9.2 Non-impact Printers
8.10 Scanners
8.10.1 Resolution
8.11 Modems
8.12 Summary
8.13 Solutions /Answers
References
80
I/O Technology
8.0 INTRODUCTION
In the previous unit, you have studied the concept of input/output interfaces and I/O
techniques. The previous unit discussed three I/O techniques i.e., programmed I/O, Interrupt-
driven I/O and DMA were discussed along with the evolution of I/O processor. A computer
supports a number of I/O devices in order to perform data transfer with external environment.
This unit provides a brief introduction to the various I/O devices such as mouse, keyboard,
monitor, printer, scanner, video & sound cards etc. It also discusses the modern voice-based
input devices. The unit does not attempt to provide all the details of these devices, but attempts
to introduce you the characteristics, basic functions and use of the devices in the context of the
processor.
8.1 OBJECTIVES
After study of this unit, the students ought to be able to:
Explain the features of mouse and its classifications;
List the basic characteristics, functioning and interfacing requirements of keyboard;
Explain different types of monitors
Explain video Cards, sound cards, and digital camera
Explain different types of printers;
Explain the basic characteristics of Modems and scanners;
Explain the concept of voice-based input
8.2 MOUSE
Douglas C. Engelbart at Stanford Research Institute (now SRI International) proposed the
basic concept of mouse in order to use it with computer system. Xerox Corporation is first
organization which developed the first Mouse. It is hand-held hardware input pointing device,
which gives user a cursor (pointing mark) on monitor screen and this cursor is used to send the
input to computer system. The purpose of mouse is to detect two-dimensional movement
relative to surface. Typically, mouse is available with two or three buttons but a single button
is sufficient to control the movement of cursor. There exist different types of mice namely
Wired, Wireless, Bluetooth, Trackball, Optical, Laser, Magic, USB etc.
The unit of mouse resolution is Counts Per Inch (CPI) which represents the number of signals
per inch of physical travel of mouse. The value of CPI may range from 400 to 1600. The
mouse also sends CPI data to computer with some frequency which is known as polling rate.
The polling rate may range from 60 Hz to 1000 Hz. The large value of CPI will result in faster
movement of cursor which requires sending much data to computer demanding high polling
rate. Therefore, it will be difficult to control the accuracy for large value of CPI.
8.2.1 Classifications of Mice
The classifications of mice are based on connectors, number of buttons and position sensing
technologies. Two classifications are discussed-
1. Connectors: This category deals with categorization of computer mice based on
ports/physical channels which are used to connect the mouse and computers.
a) Bus Mouse-Bus was used to connect the first mouse with PC. Thus, it has been called
as the bus mouse. It was used with IBM-compatible personal computers in its early
days. A specialized bus interface was used to connect them with PC which was
implemented via an ISA add-in card.
b) Serial Mouse-In Serial mouse, serial port was used for connection. It is basically an
interface present physically on computer for communication. Bit by bit information
goes in and taken out of the computer through this port. It is a male port of D-type
having 9 pin (DB9M) which is found at the back of the motherboard. However, this
category of mice is no longer in use.
c) PS/2 Mouse-The green colored PS/2 port is used to connect the mouse. Introduced in
1987, PS/2 uses 6-pin mini-din connector. It is the successor of serial connectors.
PS/2 ports were first used in the PS/2 systems and they are still being used in modern
designs. Green color of PS/2 port is for mouse and purple colored is for keyboard.
d) USB Mouse-USB mouse are same in terms of shape and appearance but the
difference lies in terms of connector. They are connected to a USB port. USB stands
81
for universal serial bus has superseded the PS/2 ports, though some of the computers I/O Technology
still have the PS/2 ports. This standard defines the cables, connectors and
communication protocols for connection and communication between computers and
attached peripheral devices. The objective of this standard was to standardize
computer devices connection.
e) Wireless Mouse-These are the modern mouse that does not require any cable for
connection. Eliminating the clutter of cables, it provides a neat type of mouse to use.
Some of its key features are- comfortable ergonomic design, improved battery life,
Plug-and-Play, multi-function and wide compatibility
2. Sensing Technology: There are two types of mice based on sensing technologies i.e.,
mechanical mouse and optical mouse.
a) Mechanical mouse has a rubber or metal ball in middle, which is used to control the
movement of cursor. The sensors inside the ball detect the rotation of ball. When the
ball rolls with the movement of mouse, it causes sensors to detect the rotation of ball
along the two axes which consequently send signals to monitor screen. Figure 8.1(a)
depicts the mechanical mouse.
b) Optical mice use light emitting diodes (LEDs), optical sensors and digital image
processing. The optical mouse detects by sensing the changes in the reflected light.
The change in reflected light is measured by analyzing the images and the cursor
moves on screen accordingly. Figure 8.1(b) shows the optical mouse.
(a) (b)
Figure-8.1: Difference between (a) Mechanical Mouse and (b) Optical Mouse
8.3 KEYBOARD
A keyboard is an input device, which is used since the inception of the computer systems. The
keyboard allows manual input of alphabets, numbers, special characters, which are available as
keys on a board. Figure 8.2 depicts a keyboard. In general, users use a keyboard to transfer a
meaningful sequence of characters or numbers to a computer. Thus, a keyboard can be used to
send input data into a computer from the external world.
8.4 MONITORS
A monitor is an output display device connected to processor and it displays the vision into the
brain of the processor. It allows a user to graphically interact with the processor which is
helpful to send output as well as to receive input to/from the user. Technically speaking, it is
display device which provides a graphical vision by converting the digital/analog signals into
the visual form.
83
The monitor looks like a television set but both the devices are different with each other. The I/O Technology
monitors have greater sharpness, lower input lag, higher refresh rates, color purity, and operate
at higher frequencies in comparison to TV sets. The TV set consists of tuner or demodulator
circuit to convert the signals
Whenever users are interested to buy a monitor, they search for the better configurations in
minimum possible budget. The configuration of monitors consists of display size, resolution,
supported frequencies, the size of the picture tube and the type of connector used to connect to
the computer. Monitors are manufactured by many manufacturers like LG, Samsung, Acer,
Dell, HP, Lenovo, Sony, Asus, BenQ, etc. The monitors are available with different sizes i.e.,
14’’, 15’’, 17”, 19’’, 21.9’’, 24’’ or even higher. The monitors are also available with different
screen form factor i.e., flat and curved screens. The monitors can be categorized into three
categories based on the design technology. These categories are discussed in next sub-sections.
X deflects
Connector Pins
84
reflector is used to produce images in color or monochrome. An LCD blocks the light to I/O Technology
display patterns. LCDs are lightweight screens and are mainly used for portable computers.
They are known for low power consumption, good resolution and bright colors. The LCDs can
be divided into following three categories based on display generation techniques.
1. Reflective LCDs: The display is generated by selectively blocking reflected light.
2. Backlit LCDs: The display is generated due to a light source behind LCD panel.
3. Edgelite LCDs: The display is generated due to a light source that is adjacent to LCD
panel.
LCD Technology
To manufacture the LCD screens, Nematic technology is used. The molecules of liquid
crystals (rod-shaped crystals) which are known as Nematic cells are used. Figure 8.5 depicts
Nematic cells. The Nematic cells are packed (sandwich) between two thin plastic membranes.
The Nematic cells have special properties i.e., these cells can change the polarity and bend of
the light. The electric current is used to control these properties by applying the electric on
grooves in the plastic membranes.
85
I/O Technology
........................................................................................................................................................
........................................................................................................................................................
........................................................................................................................................................
........................................................................................................................................................
........................................................................................................................................................
........................................................................................................................................................
86
I/O Technology
Pixels
The display memory which is used to store the data for images is known as frame buffer. At
any moment, the frame buffer consists of data for bit-map representation of current image on
screen and the next image. The frames are read dozens of times per second and sent to the
monitor using a cable in serial manner. Upon receiving the stream of data, the monitor forms
and displays it on the screen by scanning raster movement from first up to down one row at a
time. Based on this raster movement CRT, the monitor will illuminate its small phosphor dots.
It is shown in Figure 8.9 and Figure 8.10.
Figure-8.9: Frame Buffer and the corresponding image displayed on the system
The greater number of dots leads to better resolution of the image as well as the sharper the
picture. The number of dots directly correspond to the richness of the image (or gray levels for
a monochrome display) displayed by the system. The higher the number of colors, the more is
the information required for each dot. Therefore, higher resolution and color depth of the
system required bigger memory storage by the system to store the frame buffers.
87
image and (ii) resolution of the image. An image will be sharper on a smaller screen in I/O Technology
comparison to bigger screen. For instance, an image may appear sharp on a 15" monitor and
may be a little jagged on a 12” monitor display. Figure 8.11 shows a circle with different
sharpness on different size monitor screens.
The computer system with a 3-bit RGB color planes utilized 1 bit for each of the red, green
and blue color components. Therefore, every color component can exist only in “ON" or
"OFF" state. The three-bit RGB ‘ON’ or ‘OFF” color components result in 8-colors consisting
of three primary RGB colors i.e., red, green and blue; two pure colors i.e., white and black;
and three complementary colors i.e., magenta, cyan, and yellow colors. The RGB values (ON"
or "OFF") of 3-bits color are given in Table 1 and the colors are displayed in Figure 8.13.
88
Bit-values (‘ON’ or ‘OFF’) Color I/O Technology
0 0 0 Black
0 0 1 Blue
0 1 0 Green
0 1 1 Cyan
1 0 0 Red
1 0 1 Magenta
1 1 0 Yellow
1 1 1 White
89
It implies that minimum RAM required for resolution 800 600 and 8 color depth is 180 KB. I/O Technology
But the memory is available in exponential power of 2 and the next minimum size of memory
is 256 KB. It implies that minimum size RAM required for resolution 800 600 and 8 color
depth is 256 KB.
Now-a-days, a very odd-looking resolution i.e., 1152×864 has become popular. Could you
guess why this is so? The following are the reasons behind its popularity. There are nearly one
million (9,95,328) pixels for VGA with 1152×864 resolution. For color depth value 8, nearly 8
million bits or 1 MB memory is required. Further, human eyes perceive only a few million
colors and this resolution is more suitable. In addition, a square pixel that has a ratio of 4: 3
allows easier programming.
Please note that the calculations shown above are not applicable for 3-D displays, which
requires more memory due to the issues like “Double Buffering” and/or “Z-Buffering”.
90
PCI- It is introduced by Intel and also known as Peripheral Component Interconnect. It is I/O Technology
a high-speed common bus which is used to attach the computer peripherals to the
motherboard. It is used to attach sound cards, network cards and video cards. The
computers may use now some modern technologies like PCI-Express (PCIe), USB and
AGP.
AGP-It is also known as Advanced Graphics Port. It is a standard connector port used to
connect the video card with the microprocessor and the main memory. It is a dedicated
high-speed connection interface which is used by only graphics subsystem. AGP employs
pipelining, isolated data and address buses and high-speed mode to improve the
performance of graphics card.
In specific computers, the video card is directly connected with the microprocessor and
may use direct memory access (DMA) I/O technique to send data from main memory to
frame buffer.
The three basic issues relating to sound cards are - Compatibility, Connections and Quality.
Compatibility: Sound cards must be compatible for hardware as well as for software
to meet the current industry standards/protocols. Some specific software like games
need sound cards to be compatible with industry standards. You may refer to further
readings to know about these standards.
Connections: The sound card must provide different connections in order to perform
various functions. It should provide MIDI port (Musical Instrument Device Interface)
which allows user to produce music directly by using synthesizer circuit in the sound
card. It also allows connecting a Piano keyboard to the computer system.
Quality: There exist different sound cards which provide sounds with different
qualities. The quality of sound differs due to the noise control, digital quality and the
ranges of frequency supported by the sound card.
1. Explain the concept of a frame buffer in the context of Video Card interfaces.
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
2. What do you understand by horizontal and vertical frequencies?
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
3. Compute the minimum required video memory for 16 color depth and a monitor screen
with the highest possible resolution 7680x4320.
91
................................................................................................................................................. I/O Technology
.................................................................................................................................................
.................................................................................................................................................
4. Explain sound card. What are the functions of sound card?
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
8.7.1 Webcam
A digital camera without storage connected to computer system or network is referred as
Webcam. In modern computers, the webcam can either be a separate component which is
plugged into the computer or be an in-built integrated camera. In order to use webcams, it is
necessary to install the required software. A webcam is an input device which is used to
capture the images/videos and then send it to the computer. Webcams are used for
videoconference or video calling or online meeting using Google Meet, Zoom, MS Team and
others services.
92
I/O Technology
8.8 Voice Based Input Device
Modern devices are capable to take human voice as input using speech recognition processes
and execute applications accordingly. These devices are known as Voice Based Input devices.
As compared to microphone, the speech recognition process of these devices recognizes
human voice; converts it into machine-language and execute programs/applications
accordingly. Figure 8.15 two devices which use speech recognition process to recognize
human voice.
Figure-8.15: (a) Siri (b) Echo Dot 3 Smart Speaker with Alexa
The Voice Based Input Devices can recognize spoken words in two ways. The spoken words
can either be recognized from a pre-defined vocabulary or be recognized from a known
speaker after training of the input device. Whenever speaker utters a word from the pre-defined
vocabulary, the Voice Based Input device may display the characters of monitor screen for
verification by the speaker. However, some of these devices may process the speech without
verification from the speaker. The process of speech recognition compares each uttered word
with the words stored in pre-defined vocabulary table.
8.8.1 Siri
Apple Inc. offers a built-in, voice-controlled virtual assistant with most of products i.e.,
iPhone, iPad, Apple Watch or Mac (macOS Sierra and later) etc. This voice-controlled
personal assistant is known as Siri. The users may talk to Siri as they talk to their friends. Siri
allows a seamless interaction with Apple devices such that user speaks to Siri and Siri speaks
to user. Siri helps users to get their job done after receiving user commands. Siri can help to
open a file, send messages, open a web browser, open a website, booking a ticket, watch
movies, and many other activities.
Siri works based on the Artificial Intelligence and Natural Language Processing fields. It
consists of three components -Conversational interface, personal context awareness and
service delegation systems. The conversational interface understands the user word-for-word
manner and the semantic of text is produced using personal context awareness which is based
on habit and language of the user. The service delegation helps to deliver services using built-
in apps and their inner workings.
8.8.2 Alexa
Amazon offers virtual interactive voice-based AI powered digital assistant known as Alexa.
This device has been designed in association with Alexa Voice Service (AVS) in order to
simulate real conversations. “Alexa” is basically the “wake word” which is used to alert the
device to start listening the voice to perform some tasks. Alexa employs intuitive voice
commands to provide services to perform some specific tasks. Figure 8.15(b) depicts the
Amazon Alexa. It is available as Echo speakers, smart thermostats, lamps and lights, and right
on your phone through the Alexa app. Alexa can do quick math, play music, check news and
weather updates, read emails and control many of the smart products.
Alexa also works based on the Artificial Intelligence and Natural Language Processing fields.
It Alexa consists of speakers, microphone and a processor which is used to activate the device.
It receives input and sends it to cloud where Alexa Voice services (AVS) interprets and
understands the user input. Accordingly, AVS sends the appropriate output back to user
device. The internet connection is the basic requirement to use Alexa.
8.9 PRINTERS
93
Printers are devices that accept textual and graphical contents as output from a computer I/O Technology
system and print contents on paper in a controlled manner. The text and photographic images
are produced by printers. Printers differ in technology used, memory, speed, resolution, color
supported, size, hardware compatibility, cost and others factors. The present-day printer
technologies include the dot matrix printer, Inkjet or tank printers, Laser Printers etc. to serve
different needs. The available printers can be divided into two classifications-Impact and Non-
impact printers. Figure 8.16 shows the classifications of printers.
(b)
(a)
Figure-8.17: (a) Dot-matrix printer (b) Local Railway ticket
94
Laser printers are very common page printers and print one page at once. Laser printers I/O Technology
employ a focused light beam to transfer image or text onto paper. The modern laser printer use
Resolution Enhancement Technology (RET) which is introduced by Hewlett-Packard. This
technology smoothens the edges of character, diagonal lines etc. to produce better quality
printouts. To produce high quality print, the basic requirement is the memory which increases
as a square of resolution i.e., dots per inch (DPI). For 600 dpi, approximately 3.5 MB
(600x600 bits) memory is required whereas 14 MB (1200x1200 bits) is required for 1200 dpi.
Figure 8.18 depicts a single function monochrome laser printer.
8.10 SCANNERS
A scanner is an electronic device which is used to capture images from tangible sources like
photographic images, paper, posters, slides and others. The scanner converts the captured
images into electronic form and stores them in computer memory in order to view/modify
later. The scanner employs light sensors arranged in the form of an array in scan-able area. The
light sensors detect differences in brightness of reflections from an image and then scan the
source.
The existing scanners differ in many factors such as compatibility, resolution, support for
different media and interfaces, etc. Two popular types of scanners are - Flatbed Scanners and
Handheld Scanners.
Flatbed Scanners are used to scan high-resolution tangible images into detailed and sharp
electronic images. The images are placed on a flat glass tray and movable sensors are used to
scan the images. Figure 8.19(a) shows a flatbed scanner. Handheld scanners are used to scan
the physical documents, and require good hand control for high quality scanning. These are the
most portable and cheapest scanners and shown in Figure-8.19(b).
Scanning is used for many different applications. The scanners are used as Magnetic Ink
Character Recognition (MICR) scanner in order to scan cheques and Bar-Code readers to
identify different objects. One more application is Optical Recognition of Characters (OCR).
The OCR software use character/pattern matching algorithms to recognize characters and
converts the scanned text to a text file. The OCR technology is very much useful in digitizing
the ancient text written in old scripts.
8.10.1 Resolution
The resolution of scanner is the quality of image achieved by scanner. It is measured in dots
per inch (dpi) and it indicates the number of dots per inch scanned horizontally and vertically.
95
It implies that the more is the dpi of a scanner, the more details a scanned electronic image will I/O Technology
have. The scanned file size increases with increased resolution. There are various ways to
measure the resolution.
Optical Resolution - The upper resolution limit of a scanner which is used to scan the images
is known as optical resolution (hardware resolution). For example- if the optical resolution of
a scanner is 300 dpi, it means 90000 (300x300) pixels per square inch can be captured by the
scanner. The scanners may be available with optical resolutions of 300, 600, 1200, 2400 dpi or
even more.
8.11 MODEMS
Modem (i.e., modulator-demodulator) is a device that connects two computers using telephone
lines in order to exchange data with each other. The modem receives digital signals from
computer, puts them into analog circuit by modifying a constant wave (known as carries) and
then analog signals are transmitted over the telephone lines. This process is known as
modulation. It occurs whenever user connects to the Internet. Demodulation is the inverse
process of modulation in which the digital signals are derived from the modulated wave. It
occurs whenever user receives data from a website, which is then displayed by your browser.
Figure 8.20 shows the process of modulation and demodulation performed by the modem. You
may refer to further readings for more details on modulation and demodulation techniques.
96
2. How characters are recognized by voice-based input devices? I/O Technology
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
3. Compare impact and non-impact printers.
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
4. Explain Interpolated resolution.
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
5. How many pixels can be captured by a scanner with 600 dpi optical resolution?
.................................................................................................................................................
.................................................................................................................................................
.................................................................................................................................................
8.12 SUMMARY
This unit discussed several input/output devices and the technologies behind them. This unit
covers different input device along with different components or types or features. It is
discussed Mouse and classifications of Mice, Keyboard along with its features, voice-based
input devices, scanners and webcam its different types. This unit also discussed output devices
along with other components or types or features. It discussed computer monitors with three
different categories i.e., CRT, LCD and TFT screens. The printers with their different
categories have also been discussed. The video cards have also been discussed with their
characteristics like resolution, color depth, video memory, refresh rates, graphic accelerators
and video card interfaces. It also discussed sound cards with its functions and different
characteristics. At last, the modem device is discussed in brief manner.
2. Scan Codes-When a key is pressed on a keyboard, it transfers the scan code relating to
those keys to the processor. Scan code of every key is unique. The scan codes are used to
communicate the desired data or action to the processor. A keyboard of processor is
connected through interrupt driven I/O mechanism. Therefore, when a key or several keys
are pressed together on the keyboard, it interrupts the processor, provided processor has
enabled interrupts. The processor receives the scan code/codes and identifies the key or
keys that were pressed using the scan code table stored in the ROM BIOS.
3. LCD monitors and LED monitors differ only in terms of backlighting; typical LCD
monitors uses fluorescent backlights whereas an LED monitor uses light-emitting diodes.
The earlier LCD monitors used CCFL instead of LEDs to illuminate the screen.
97
Check Your Progress 2 I/O Technology
1. The display memory which is used to store the data for images is known as frame buffer.
At any moment, the frame buffer consists of data for bit-map representation of current
image on screen and the next image. The frames are read dozens of times per second and
sent to the monitor using a cable in serial manner. Upon receiving the stream of data, the
monitor forms and displays it on the screen by scanning raster movement from first up to
down one row at a time. Based on this raster movement CRT, the monitor will illuminate
its small phosphor dots.
4. Sound card is used to convert digital audio data into analog audio in order to play back
through the speakers or headphones. The Sound card can either integrated into
motherboard (built-in sound card) or connected through expansion slot. The major
functions of a modern sound card are as follows:
a) Conversion from digital sound signals to analog form to play back the sound.
b) Amplifiers to augment the strength of sound signals
c) Sound recording.
d) Built-in synthesizer
e) Sound mixer circuits.
2. These devices recognize spoken words in two ways. The spoken words can either be
recognized from a pre-defined vocabulary or be recognized from a known speaker after
training of the input device. Whenever speaker utters a word from the pre-defined
vocabulary, the Voice Based Input device may display the characters on monitor screen
for verification by the speaker. However, some of these devices may process the speech
without verification from the speaker.
3. Impact printer uses mechanical components for printing i.e., the characters and graphics
are produced on a paper by striking whereas non-impact printer don’t strike or impact the
ribbon to print on paper. Impact printers produce banging noise during printing while non-
impact printers work silently.
98